summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/skalibs/iobuffer.h26
-rw-r--r--src/libstddjb/iobufferk_flush.c6
-rw-r--r--src/libstddjb/iobufferu_flush.c2
-rw-r--r--src/libstddjb/iobufferu_init.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/src/include/skalibs/iobuffer.h b/src/include/skalibs/iobuffer.h
index c1864cf..d9d44d8 100644
--- a/src/include/skalibs/iobuffer.h
+++ b/src/include/skalibs/iobuffer.h
@@ -3,7 +3,7 @@
#ifndef IOBUFFER_H
#define IOBUFFER_H
-#define IOBUFFER_SIZE 65536U
+#define IOBUFFER_SIZE 65537U
/* iobufferu */
@@ -19,10 +19,10 @@ struct iobufferu_s
char *buf ;
} ;
-extern int iobufferu_init (iobufferu_ref, int, int) ;
-extern int iobufferu_fill (iobufferu_ref) ;
-extern int iobufferu_flush (iobufferu_ref) ;
-extern void iobufferu_finish (iobufferu_ref) ;
+extern int iobufferu_init (iobufferu *, int, int) ;
+extern int iobufferu_fill (iobufferu *) ;
+extern int iobufferu_flush (iobufferu *) ;
+extern void iobufferu_finish (iobufferu *) ;
#define iobufferu_len(u) buffer_len(&(u)->b[0])
#define iobufferu_available(u) buffer_available(&(u)->b[1])
@@ -50,9 +50,9 @@ struct iobufferk_s
unsigned int nb : 2 ;
} ;
-typedef int iobufferk_io_func_t (iobufferk_ref) ;
+typedef int iobufferk_io_func_t (iobufferk *) ;
typedef iobufferk_io_func_t *iobufferk_io_func_t_ref ;
-typedef void iobufferk_finish_func_t (iobufferk_ref) ;
+typedef void iobufferk_finish_func_t (iobufferk *) ;
typedef iobufferk_finish_func_t *iobufferk_finish_func_t_ref ;
extern iobufferk_io_func_t iobufferk_nosys ;
@@ -94,13 +94,13 @@ struct iobuffer_s
unsigned int isk : 1 ;
} ;
-extern int iobuffer_ufromk (iobufferu_ref, iobufferk_ref) ;
-extern int iobuffer_kfromu (iobufferk_ref, iobufferu_ref) ;
-extern int iobuffer_salvage (iobuffer_ref) ;
+extern int iobuffer_ufromk (iobufferu *, iobufferk *) ;
+extern int iobuffer_kfromu (iobufferk *, iobufferu *) ;
+extern int iobuffer_salvage (iobuffer *) ;
-extern int iobuffer_init (iobuffer_ref, int, int) ;
-extern int iobuffer_fill (iobuffer_ref) ;
-extern int iobuffer_flush (iobuffer_ref) ;
+extern int iobuffer_init (iobuffer *, int, int) ;
+extern int iobuffer_fill (iobuffer *) ;
+extern int iobuffer_flush (iobuffer *) ;
#define iobuffer_finish(b) ((b)->isk ? iobufferk_finish(&(b)->x.k) : iobufferu_finish(&(b)->x.u))
#define iobuffer_len(b) ((b)->isk ? iobufferk_len(&(b)->x.k) : iobufferu_len(&(b)->x.u))
diff --git a/src/libstddjb/iobufferk_flush.c b/src/libstddjb/iobufferk_flush.c
index fb51e32..674ffec 100644
--- a/src/libstddjb/iobufferk_flush.c
+++ b/src/libstddjb/iobufferk_flush.c
@@ -9,7 +9,7 @@
#include <errno.h>
#include <skalibs/iobuffer.h>
-static int iobufferk_flush_0 (iobufferk_ref k)
+static int iobufferk_flush_0 (iobufferk *k)
{
while (k->n)
{
@@ -21,13 +21,13 @@ static int iobufferk_flush_0 (iobufferk_ref k)
return 1 ;
}
-static int fakeflush (iobufferk_ref k)
+static int fakeflush (iobufferk *k)
{
k->n = 0 ;
return 1 ;
}
-static int iobufferk_flush_3 (iobufferk_ref k)
+static int iobufferk_flush_3 (iobufferk *k)
{
while (k->n)
{
diff --git a/src/libstddjb/iobufferu_flush.c b/src/libstddjb/iobufferu_flush.c
index 734fab1..8830599 100644
--- a/src/libstddjb/iobufferu_flush.c
+++ b/src/libstddjb/iobufferu_flush.c
@@ -3,7 +3,7 @@
#include <skalibs/buffer.h>
#include <skalibs/iobuffer.h>
-int iobufferu_flush (iobufferu_ref b)
+int iobufferu_flush (iobufferu *b)
{
register int r = buffer_flush(&b->b[1]) ;
b->b[0].c.p = b->b[1].c.p ;
diff --git a/src/libstddjb/iobufferu_init.c b/src/libstddjb/iobufferu_init.c
index e9ea5c8..d2b86c8 100644
--- a/src/libstddjb/iobufferu_init.c
+++ b/src/libstddjb/iobufferu_init.c
@@ -4,7 +4,7 @@
#include <skalibs/buffer.h>
#include <skalibs/iobuffer.h>
-int iobufferu_init (iobufferu_ref b, int fdin, int fdout)
+int iobufferu_init (iobufferu *b, int fdin, int fdout)
{
register char *x = alloc(IOBUFFERU_SIZE) ;
if (!x) return 0 ;