aboutsummaryrefslogtreecommitdiff
path: root/support/support.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-11-27 21:35:56 +0100
committerFlorian Weimer <fweimer@redhat.com>2018-11-27 21:35:56 +0100
commitc74a91deaa5de416237c02bbb3e41bda76ca4c7b (patch)
tree33f46f86274a8c4286ba6ddb46370e8c8cfd0e32 /support/support.h
parentd527c860f5a3f0ed687bd03f0cb464612dc23408 (diff)
downloadglibc-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.h5
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