libowfat/buffer/buffer_fromsa.c

19 lines
293 B
C
Raw Normal View History

#include "stralloc.h"
#include "buffer.h"
2006-11-07 17:56:05 +00:00
static ssize_t dummyreadwrite(int fd,char* buf,size_t len) {
(void)fd;
(void)buf;
(void)len;
return 0;
}
void buffer_fromsa(buffer* b,stralloc* sa) {
b->x=sa->s;
b->p=0;
b->n=sa->len;
b->a=sa->a;
b->fd=0;
b->op=dummyreadwrite;
}