summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/buffer_fill.c2
-rw-r--r--src/libstddjb/buffer_flush.c4
-rw-r--r--src/libstddjb/buffer_flush1read.c4
-rw-r--r--src/libstddjb/buffer_init.c4
-rw-r--r--src/libstddjb/buffer_read.c5
-rw-r--r--src/libstddjb/buffer_write.c5
6 files changed, 11 insertions, 13 deletions
diff --git a/src/libstddjb/buffer_fill.c b/src/libstddjb/buffer_fill.c
index c158abe..07a916b 100644
--- a/src/libstddjb/buffer_fill.c
+++ b/src/libstddjb/buffer_fill.c
@@ -10,7 +10,7 @@ int buffer_fill (buffer *b)
register int r ;
if (buffer_isfull(b)) return (errno = ENOBUFS, -1) ;
buffer_wpeek(b, v) ;
- r = (*b->op)(b->fd, v, 2, b->aux) ;
+ r = (*b->op)(b->fd, v, 2) ;
if (r <= 0) return r ;
cbuffer_WSEEK(&b->c, r) ;
return r ;
diff --git a/src/libstddjb/buffer_flush.c b/src/libstddjb/buffer_flush.c
index ca6ca6b..46512fc 100644
--- a/src/libstddjb/buffer_flush.c
+++ b/src/libstddjb/buffer_flush.c
@@ -1,8 +1,8 @@
/* ISC license. */
-#include <skalibs/buffer.h>
#include <skalibs/cbuffer.h>
#include <skalibs/siovec.h>
+#include <skalibs/buffer.h>
int buffer_flush (buffer *b)
{
@@ -12,7 +12,7 @@ int buffer_flush (buffer *b)
register int r ;
buffer_rpeek(b, v) ;
if (!v[0].len && !v[1].len) break ;
- r = (*b->op)(b->fd, v, 2, b->aux) ;
+ r = (*b->op)(b->fd, v, 2) ;
if (r <= 0) return 0 ;
cbuffer_RSEEK(&b->c, r) ;
}
diff --git a/src/libstddjb/buffer_flush1read.c b/src/libstddjb/buffer_flush1read.c
index 9dcdf81..1a771ea 100644
--- a/src/libstddjb/buffer_flush1read.c
+++ b/src/libstddjb/buffer_flush1read.c
@@ -3,8 +3,8 @@
#include <skalibs/buffer.h>
#include <skalibs/siovec.h>
-int buffer_flush1read (int fd, siovec_t const *v, unsigned int n, void *aux)
+int buffer_flush1read (int fd, siovec_t const *v, unsigned int n)
{
if (!buffer_flush(buffer_1)) return -1 ;
- return buffer_read(fd, v, n, aux) ;
+ return buffer_read(fd, v, n) ;
}
diff --git a/src/libstddjb/buffer_init.c b/src/libstddjb/buffer_init.c
index 09d4910..2831fe1 100644
--- a/src/libstddjb/buffer_init.c
+++ b/src/libstddjb/buffer_init.c
@@ -1,13 +1,13 @@
/* ISC license. */
#include <errno.h>
+#include <skalibs/cbuffer.h>
#include <skalibs/buffer.h>
-int buffer_init_aux (buffer *b, buffer_io_func_t *op, int fd, char *s, unsigned int len, void *aux)
+int buffer_init (buffer *b, buffer_io_func_t *op, int fd, char *s, unsigned int len)
{
if (!cbuffer_init(&b->c, s, len)) return 0 ;
b->fd = fd ;
b->op = op ;
- b->aux = aux ;
return 1 ;
}
diff --git a/src/libstddjb/buffer_read.c b/src/libstddjb/buffer_read.c
index 150bc15..88003b4 100644
--- a/src/libstddjb/buffer_read.c
+++ b/src/libstddjb/buffer_read.c
@@ -3,13 +3,12 @@
#include <sys/types.h>
#include <sys/uio.h>
#include <skalibs/allreadwrite.h>
-#include <skalibs/buffer.h>
#include <skalibs/siovec.h>
+#include <skalibs/buffer.h>
-int buffer_read (int fd, siovec_t const *v, unsigned int n, void *aux)
+int buffer_read (int fd, siovec_t const *v, unsigned int n)
{
struct iovec iov[n] ;
iovec_from_siovec(iov, v, n) ;
- (void)aux ;
return fd_readv(fd, iov, n) ;
}
diff --git a/src/libstddjb/buffer_write.c b/src/libstddjb/buffer_write.c
index 40ffd46..e669f60 100644
--- a/src/libstddjb/buffer_write.c
+++ b/src/libstddjb/buffer_write.c
@@ -3,13 +3,12 @@
#include <sys/types.h>
#include <sys/uio.h>
#include <skalibs/allreadwrite.h>
-#include <skalibs/buffer.h>
#include <skalibs/siovec.h>
+#include <skalibs/buffer.h>
-int buffer_write (int fd, siovec_t const *v, unsigned int n, void *aux)
+int buffer_write (int fd, siovec_t const *v, unsigned int n)
{
struct iovec iov[n] ;
iovec_from_siovec(iov, v, n) ;
- (void)aux ;
return fd_writev(fd, iov, n) ;
}