X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fff-string.c;h=ed7815bc7028c472022feb057302d09a42577e12;hb=d9c55a4d021b4a317a25f14f89468d62592aae0b;hp=366092bf7568a90193bf0f55e097ecfc5dcacbec;hpb=1cf8ac51f5495ccd5187dc220ffc69e95d6e0cfc;p=libucw.git diff --git a/ucw/ff-string.c b/ucw/ff-string.c index 366092bf..ed7815bc 100644 --- a/ucw/ff-string.c +++ b/ucw/ff-string.c @@ -8,10 +8,10 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" -#include "ucw/fastbuf.h" -#include "ucw/mempool.h" -#include "ucw/bbuf.h" +#include +#include +#include +#include char * /* Non-standard */ bgets(struct fastbuf *f, char *b, uns l) @@ -35,7 +35,7 @@ bgets(struct fastbuf *f, char *b, uns l) *b++ = v; } if (unlikely(cnt == l)) - die("%s: Line too long", f->name); + bthrow(f, "toolong", "%s: Line too long", f->name); l -= cnt; bdirect_read_commit(f, src); src_len = bdirect_read_prepare(f, &src); @@ -114,7 +114,7 @@ bgets_bb(struct fastbuf *f, struct bb_t *bb, uns limit) if (cnt == buf_len) { if (unlikely(len == limit)) - die("%s: Line too long", f->name); + bthrow(f, "toolong", "%s: Line too long", f->name); bb_do_grow(bb, len + 1); buf = bb->ptr + len; buf_len = MIN(bb->len, limit) - len; @@ -212,7 +212,7 @@ bgets0(struct fastbuf *f, char *b, uns l) b++; } if (unlikely(cnt == l)) - die("%s: Line too long", f->name); + bthrow(f, "toolong", "%s: Line too long", f->name); l -= cnt; bdirect_read_commit(f, src); src_len = bdirect_read_prepare(f, &src);