summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/bufalloc.h4
-rw-r--r--src/include/skalibs/buffer.h4
-rw-r--r--src/include/skalibs/cbuffer.h4
-rw-r--r--src/include/skalibs/textmessage.h8
4 files changed, 10 insertions, 10 deletions
diff --git a/src/include/skalibs/bufalloc.h b/src/include/skalibs/bufalloc.h
index 46b4f84..6e80881 100644
--- a/src/include/skalibs/bufalloc.h
+++ b/src/include/skalibs/bufalloc.h
@@ -16,8 +16,8 @@ struct bufalloc
ssize_t (*op) (int, char const *, size_t) ;
} ;
-#define BUFALLOC_ZERO { .x = STRALLOC_ZERO, .p = 0, .fd = -1, .op = 0 }
-#define BUFALLOC_INIT(f, d) { .x = STRALLOC_ZERO, .p = 0, .fd = (d), .op = (f) }
+#define BUFALLOC_ZERO { STRALLOC_ZERO, 0, -1, 0 }
+#define BUFALLOC_INIT(f, d) { STRALLOC_ZERO, 0, (d), (f) }
extern void bufalloc_init (bufalloc *, ssize_t (*)(int, char const *, size_t), int) ;
#define bufalloc_shrink(ba) stralloc_shrink(&(ba)->x)
#define bufalloc_free(ba) stralloc_free(&(ba)->x)
diff --git a/src/include/skalibs/buffer.h b/src/include/skalibs/buffer.h
index 3928689..63d8176 100644
--- a/src/include/skalibs/buffer.h
+++ b/src/include/skalibs/buffer.h
@@ -16,7 +16,7 @@ struct buffer_s
int fd ;
cbuffer_t c ;
} ;
-#define BUFFER_ZERO { .op = 0, .fd = -1, .c = CBUFFER_ZERO }
+#define BUFFER_ZERO { 0, -1, CBUFFER_ZERO }
/*
@@ -30,7 +30,7 @@ struct buffer_s
#define BUFFER_INSIZE_SMALL 512
#define BUFFER_OUTSIZE_SMALL 512
-#define BUFFER_INIT(f, d, buf, len) { .op = (f), .fd = (d), .c = CBUFFER_INIT(buf, len) }
+#define BUFFER_INIT(f, d, buf, len) { (f), (d), CBUFFER_INIT(buf, len) }
extern int buffer_init (buffer *, iovfunc_t_ref, int, char *, size_t) ;
diff --git a/src/include/skalibs/cbuffer.h b/src/include/skalibs/cbuffer.h
index 45d2e69..a0615dc 100644
--- a/src/include/skalibs/cbuffer.h
+++ b/src/include/skalibs/cbuffer.h
@@ -15,14 +15,14 @@ struct cbuffer_s
size_t p ; /* head */
size_t n ; /* tail */
} ;
-#define CBUFFER_ZERO { .x = 0, .a = 0, .p = 0, .n = 0 }
+#define CBUFFER_ZERO { 0, 0, 0, 0 }
/*
Circular buffers need to be 1 char bigger than the storage space,
so that the head == tail case is nonambiguous (empty).
*/
-#define CBUFFER_INIT(buf, len) { .x = (buf), .a = (len), .p = 0, .n = 0 }
+#define CBUFFER_INIT(buf, len) { (buf), (len), 0, 0 }
extern int cbuffer_init (cbuffer_t *, char *, size_t) ;
diff --git a/src/include/skalibs/textmessage.h b/src/include/skalibs/textmessage.h
index fd393a9..6dea9cf 100644
--- a/src/include/skalibs/textmessage.h
+++ b/src/include/skalibs/textmessage.h
@@ -23,9 +23,9 @@ struct textmessage_sender_s
{
bufalloc out ;
} ;
-#define TEXTMESSAGE_SENDER_ZERO { .out = BUFALLOC_ZERO }
+#define TEXTMESSAGE_SENDER_ZERO { BUFALLOC_ZERO }
extern textmessage_sender_t const textmessage_sender_zero ;
-#define TEXTMESSAGE_SENDER_INIT(fd) { .out = BUFALLOC_INIT(&fd_write, (fd)) }
+#define TEXTMESSAGE_SENDER_INIT(fd) { BUFALLOC_INIT(&fd_write, (fd)) }
#define textmessage_sender_init(ts, fd) bufalloc_init(&(ts)->out, &fd_write, fd)
#define textmessage_sender_free(ts) bufalloc_free(&(ts)->out)
@@ -58,9 +58,9 @@ struct textmessage_receiver_s
uint32_t wanted ;
uint32_t max ;
} ;
-#define TEXTMESSAGE_RECEIVER_ZERO { .in = BUFFER_ZERO, .indata = STRALLOC_ZERO, .wanted = 0, .max = 0 }
+#define TEXTMESSAGE_RECEIVER_ZERO { BUFFER_ZERO, STRALLOC_ZERO, 0, 0 }
extern textmessage_receiver_t const textmessage_receiver_zero ;
-#define TEXTMESSAGE_RECEIVER_INIT(fd, buf, len, n) { .in = BUFFER_INIT(&buffer_read, (fd), buf, len), .indata = STRALLOC_ZERO, .wanted = 0, .max = n }
+#define TEXTMESSAGE_RECEIVER_INIT(fd, buf, len, n) { BUFFER_INIT(&buffer_read, (fd), buf, len), STRALLOC_ZERO, 0, n }
extern int textmessage_receiver_init (textmessage_receiver_t *, int, char *, size_t, uint32_t) ;
extern void textmessage_receiver_free (textmessage_receiver_t *) ;