X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffastbuf.h;h=219fec19a7fd07852a86a560c67900c060f623b1;hb=e23b57dd8b0ac4da53451625be99ca1fa75caa48;hp=ea71f1206a38c2e40f915d14db7b44c155ec275a;hpb=0694dbcb2739fc128cf42f39b41234810fae739f;p=libucw.git diff --git a/lib/fastbuf.h b/lib/fastbuf.h index ea71f120..219fec19 100644 --- a/lib/fastbuf.h +++ b/lib/fastbuf.h @@ -109,6 +109,12 @@ fbbuf_count_written(struct fastbuf *f) return f->bptr - f->bstop; } +/* FastIO on recyclable growing buffers */ + +struct fastbuf *fbgrow_create(unsigned basic_size); +void fbgrow_reset(struct fastbuf *b); /* Reset stream and prepare for writing */ +void fbgrow_rewind(struct fastbuf *b); /* Prepare for reading */ + /* Configuring stream parameters */ int bconfig(struct fastbuf *f, uns type, int data); @@ -411,7 +417,7 @@ bdirect_write_commit(struct fastbuf *f, byte *pos) /* Formatted output */ -int bprintf(struct fastbuf *b, byte *msg, ...); -int vbprintf(struct fastbuf *b, byte *msg, va_list args); +int bprintf(struct fastbuf *b, char *msg, ...) FORMAT_CHECK(printf,2,3); +int vbprintf(struct fastbuf *b, char *msg, va_list args); #endif