From 4fa9aa58a926275c2db31a4cc98122e7883c714a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 10 Oct 2023 07:59:47 +0000 Subject: Add string_quotes macro Signed-off-by: Laurent Bercot --- src/include/skalibs/skamisc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/skalibs/skamisc.h b/src/include/skalibs/skamisc.h index a266c3e..463f63a 100644 --- a/src/include/skalibs/skamisc.h +++ b/src/include/skalibs/skamisc.h @@ -3,7 +3,7 @@ #ifndef SKALIBS_SKAMISC_H #define SKALIBS_SKAMISC_H -#include +#include #include #include @@ -22,6 +22,7 @@ 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) ; +#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_unquote (char *, size_t *, char const *, size_t, size_t *) ; -- cgit v1.2.3