summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-06-02 14:08:00 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-06-02 14:08:00 +0000
commiteffe4db8a69d475ae77bb7bf85bf53c009445d0e (patch)
treef5b499449afe0a37f96cf7f614199766d1ebef50 /src/libstddjb
parentf476227930793f94e6ca9bd268b76bbf5c4f29c3 (diff)
downloadskalibs-effe4db8a69d475ae77bb7bf85bf53c009445d0e.tar.xz
Turn non-linear buffer macros calling str_len() into functions. >.>
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/buffer_puts.c9
-rw-r--r--src/libstddjb/buffer_putsall.c9
-rw-r--r--src/libstddjb/buffer_putsallflush.c9
-rw-r--r--src/libstddjb/buffer_putsallnoflush.c9
-rw-r--r--src/libstddjb/buffer_putsflush.c9
-rw-r--r--src/libstddjb/buffer_putsnoflush.c9
6 files changed, 54 insertions, 0 deletions
diff --git a/src/libstddjb/buffer_puts.c b/src/libstddjb/buffer_puts.c
new file mode 100644
index 0000000..aaaac2e
--- /dev/null
+++ b/src/libstddjb/buffer_puts.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_puts (buffer *b, char const *s)
+{
+ return buffer_put(b, s, str_len(s)) ;
+}
diff --git a/src/libstddjb/buffer_putsall.c b/src/libstddjb/buffer_putsall.c
new file mode 100644
index 0000000..dbd306c
--- /dev/null
+++ b/src/libstddjb/buffer_putsall.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_putsall (buffer *b, char const *s, unsigned int *w)
+{
+ return buffer_putall(b, s, str_len(s), w) ;
+}
diff --git a/src/libstddjb/buffer_putsallflush.c b/src/libstddjb/buffer_putsallflush.c
new file mode 100644
index 0000000..fa4c98c
--- /dev/null
+++ b/src/libstddjb/buffer_putsallflush.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_putsallflush (buffer *b, char const *s, unsigned int *w)
+{
+ return buffer_putallflush(b, s, str_len(s), w) ;
+}
diff --git a/src/libstddjb/buffer_putsallnoflush.c b/src/libstddjb/buffer_putsallnoflush.c
new file mode 100644
index 0000000..0056cb4
--- /dev/null
+++ b/src/libstddjb/buffer_putsallnoflush.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_putsallnoflush (buffer *b, char const *s)
+{
+ return buffer_putallnoflush(b, s, str_len(s)) ;
+}
diff --git a/src/libstddjb/buffer_putsflush.c b/src/libstddjb/buffer_putsflush.c
new file mode 100644
index 0000000..4be4c34
--- /dev/null
+++ b/src/libstddjb/buffer_putsflush.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_putsflush (buffer *b, char const *s)
+{
+ return buffer_putflush(b, s, str_len(s)) ;
+}
diff --git a/src/libstddjb/buffer_putsnoflush.c b/src/libstddjb/buffer_putsnoflush.c
new file mode 100644
index 0000000..ad6b372
--- /dev/null
+++ b/src/libstddjb/buffer_putsnoflush.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/buffer.h>
+
+int buffer_putsnoflush (buffer *b, char const *s)
+{
+ return buffer_putnoflush(b, s, str_len(s)) ;
+}