summaryrefslogtreecommitdiffstats
path: root/buffer_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer_0.c')
-rw-r--r--buffer_0.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/buffer_0.c b/buffer_0.c
new file mode 100644
index 0000000..6c5365a
--- /dev/null
+++ b/buffer_0.c
@@ -0,0 +1,12 @@
+#include "readwrite.h"
+#include "buffer.h"
+
+int buffer_0_read(fd,buf,len) int fd; char *buf; int len;
+{
+ if (buffer_flush(buffer_1) == -1) return -1;
+ return read(fd,buf,len);
+}
+
+char buffer_0_space[BUFFER_INSIZE];
+static buffer it = BUFFER_INIT(buffer_0_read,0,buffer_0_space,sizeof buffer_0_space);
+buffer *buffer_0 = ⁢