diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/skamisc.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/include/skalibs/skamisc.h b/src/include/skalibs/skamisc.h index 463f63a..657f526 100644 --- a/src/include/skalibs/skamisc.h +++ b/src/include/skalibs/skamisc.h @@ -21,10 +21,17 @@ extern int getlnmaxsep (buffer *, char *, size_t, size_t *, char const *, size_t extern int sauniquename (stralloc *) ; -extern int string_quote (stralloc *, char const *, size_t) ; +extern int string_quote_options (stralloc *, char const *, size_t, uint32_t) ; +#define string_quote(sa, s, len) string_quote_options(sa, s, (len), 0) +#define string_quote_nospace(sa, s, len) string_quote_options(sa, s, (len), 1) #define string_quotes(sa, s) string_quote(sa, (s), strlen(s)) -extern int string_quote_nodelim (stralloc *, char const *, size_t) ; -extern int string_quote_nodelim_mustquote (stralloc *, char const *, size_t, char const *, size_t) ; + +extern int string_quote_nodelim_mustquote_options (stralloc *, char const *, size_t, char const *, size_t, uint32_t) ; +#define string_quote_nodelim_mustquote(sa, s, len, delim, delimlen) string_quote_nodelim_mustquote_options(sa, s, len, delim, (delimlen), 0) +#define string_quote_nodelim_mustquote_nospace(sa, s, len, delim, delimlen) string_quote_nodelim_mustquote_options(sa, s, len, delim, (delimlen), 1) +#define string_quote_nodelim (sa, s, len) string_quote_nodelim_mustquote(sa, s, (len), "\"", 1) +#define string_quote_nodelim_nospace (sa, s, len) string_quote_nodelim_mustquote_nospace(sa, s, (len), "\"", 1) + extern int string_unquote (char *, size_t *, char const *, size_t, size_t *) ; extern ssize_t string_unquote_nodelim (char *, char const *, size_t) ; extern int string_unquote_withdelim (char *, size_t *, char const *, size_t, size_t *, char const *, size_t) ; |