add buffer_init_allocbuf, buffer_init_read, buffer_init_write, buffer_init_read_allocbuf, buffer_init_write_allocbuf

This commit is contained in:
leitner
2021-01-03 23:15:28 +00:00
parent 68a04bf226
commit e2673d3782
7 changed files with 72 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
#include <unistd.h>
#include <buffer.h>
int buffer_init_write(buffer* b, int fd, char* y,size_t ylen) {
if (fd==-1) return -1;
buffer_init(b, write, fd, y, ylen);
return 0;
}