summaryrefslogtreecommitdiff
path: root/src/libstddjb/genwrite_put_stralloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/genwrite_put_stralloc.c')
-rw-r--r--src/libstddjb/genwrite_put_stralloc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstddjb/genwrite_put_stralloc.c b/src/libstddjb/genwrite_put_stralloc.c
new file mode 100644
index 0000000..2a8a8e8
--- /dev/null
+++ b/src/libstddjb/genwrite_put_stralloc.c
@@ -0,0 +1,10 @@
+/* ISC license. */
+
+#include <skalibs/stralloc.h>
+#include <skalibs/genwrite.h>
+
+int genwrite_put_stralloc (void *target, char const *s, unsigned int len)
+{
+ register stralloc *sa = target ;
+ return stralloc_catb(sa, s, len) ? (int)len : -1 ;
+}