diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/skalibs/buffer.h | 12 | ||||
-rw-r--r-- | src/libstddjb/buffer_puts.c | 9 | ||||
-rw-r--r-- | src/libstddjb/buffer_putsall.c | 9 | ||||
-rw-r--r-- | src/libstddjb/buffer_putsallflush.c | 9 | ||||
-rw-r--r-- | src/libstddjb/buffer_putsallnoflush.c | 9 | ||||
-rw-r--r-- | src/libstddjb/buffer_putsflush.c | 9 | ||||
-rw-r--r-- | src/libstddjb/buffer_putsnoflush.c | 9 |
7 files changed, 60 insertions, 6 deletions
diff --git a/src/include/skalibs/buffer.h b/src/include/skalibs/buffer.h index 7397b6e..0c7866a 100644 --- a/src/include/skalibs/buffer.h +++ b/src/include/skalibs/buffer.h @@ -41,27 +41,27 @@ extern int buffer_flush (buffer *) ; #define buffer_putnoflush(b, s, len) cbuffer_put(&(b)->c, s, len) #define buffer_putvnoflush(b, v, n) cbuffer_putv(&(b)->c, v, n) -#define buffer_putsnoflush(b, s) buffer_putnoflush(b, (s), str_len(s)) +extern int buffer_putsnoflush (buffer *, char const *) ; extern int buffer_putallnoflush (buffer *, char const *, unsigned int) ; extern int buffer_putvallnoflush (buffer *, siovec_t const *, unsigned int) ; -#define buffer_putsallnoflush(b, s) buffer_putallnoflush(b, (s), str_len(s)) +extern int buffer_putsallnoflush (buffer *, char const *) ; extern int buffer_putall (buffer *, char const *, unsigned int, unsigned int *) ; extern int buffer_putvall (buffer *, siovec_t const *, unsigned int, unsigned int *) ; -#define buffer_putsall(b, s, w) buffer_putall(b, s, str_len(s), w) +extern int buffer_putsall (buffer *, char const *, unsigned int *) ; #define buffer_putallflush(b, s, len, w) (buffer_putall(b, s, len, w) && buffer_flush(b)) #define buffer_putvallflush(b, v, n, w) (buffer_putvall(b, v, n, w) && buffer_flush(b)) -#define buffer_putsallflush(b, s, w) buffer_putallflush(b, s, str_len(s), w) +extern int buffer_putsallflush (buffer *, char const *, unsigned int *) ; extern int buffer_put (buffer *, char const *, unsigned int) ; extern int buffer_putv (buffer *, siovec_t const *, unsigned int) ; -#define buffer_puts(b, s) buffer_put(b, (s), str_len(s)) +extern int buffer_puts (buffer *, char const *) ; extern int buffer_putflush (buffer *, char const *, unsigned int) ; extern int buffer_putvflush (buffer *, siovec_t const *, unsigned int) ; -#define buffer_putsflush(b, s) buffer_putflush(b, (s), str_len(s)) +extern int buffer_putsflush (buffer *, char const *) ; #define buffer_unput(b, n) cbuffer_unput(&(b)->c, n) #define buffer_wpeek(b, v) cbuffer_wpeek(&(b)->c, v) 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)) ; +} |