diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-11-27 21:35:56 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-11-27 21:35:56 +0100 |
commit | c74a91deaa5de416237c02bbb3e41bda76ca4c7b (patch) | |
tree | 33f46f86274a8c4286ba6ddb46370e8c8cfd0e32 /support/support.h | |
parent | d527c860f5a3f0ed687bd03f0cb464612dc23408 (diff) | |
download | glibc-c74a91deaa5de416237c02bbb3e41bda76ca4c7b.tar glibc-c74a91deaa5de416237c02bbb3e41bda76ca4c7b.tar.gz glibc-c74a91deaa5de416237c02bbb3e41bda76ca4c7b.tar.bz2 glibc-c74a91deaa5de416237c02bbb3e41bda76ca4c7b.zip |
support: Implement support_quote_string
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'support/support.h')
-rw-r--r-- | support/support.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/support/support.h b/support/support.h index 9418cd11ef..835e7173eb 100644 --- a/support/support.h +++ b/support/support.h @@ -69,6 +69,11 @@ void support_write_file_string (const char *path, const char *contents); the result). */ char *support_quote_blob (const void *blob, size_t length); +/* Quote the contents of the at STR, in such a way that the result + string can be included in a C literal (in single/double quotes, + without putting the quotes into the result). */ +char *support_quote_string (const char *str); + /* Returns non-zero if the file descriptor is a regular file on a file system which supports holes (that is, seeking and writing does not allocate storage for the range of zeros). FD must refer to a |