summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-10-10 07:59:47 +0000
committerLaurent Bercot <ska@appnovation.com>2023-10-10 07:59:47 +0000
commit4fa9aa58a926275c2db31a4cc98122e7883c714a (patch)
tree6abde1fc064b7b113503f9d3723d9b91b2c79688 /src/include
parent753ceac3272a8c4f150ace8b4695991a85345c3c (diff)
downloadskalibs-4fa9aa58a926275c2db31a4cc98122e7883c714a.tar.xz
Add string_quotes macro
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/skamisc.h3
1 files changed, 2 insertions, 1 deletions
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 <sys/types.h>
+#include <string.h>
#include <skalibs/buffer.h>
#include <skalibs/stralloc.h>
@@ -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 *) ;