From: Martin Mares Date: Sat, 10 Mar 2007 19:44:43 +0000 (+0100) Subject: lib/fastbuf.h no longer includes . X-Git-Tag: holmes-import~506^2~98^2~6 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=eea73ef26a06a3b1e4508fa305a0dcaaf03df457;p=libucw.git lib/fastbuf.h no longer includes . Added zillions of missing includes and fixed handling of EOF. Mentioned in doc/changes. --- diff --git a/lib/fastbuf.c b/lib/fastbuf.c index 79229d4e..4817bab3 100644 --- a/lib/fastbuf.c +++ b/lib/fastbuf.c @@ -1,7 +1,7 @@ /* * UCW Library -- Fast Buffered I/O * - * (c) 1997--2006 Martin Mares + * (c) 1997--2007 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -10,6 +10,7 @@ #include "lib/lib.h" #include "lib/fastbuf.h" +#include #include void bclose(struct fastbuf *f) @@ -66,7 +67,7 @@ int bgetc_slow(struct fastbuf *f) if (f->bptr < f->bstop) return *f->bptr++; if (!f->refill(f)) - return EOF; + return -1; return *f->bptr++; } @@ -75,7 +76,7 @@ int bpeekc_slow(struct fastbuf *f) if (f->bptr < f->bstop) return *f->bptr; if (!f->refill(f)) - return EOF; + return -1; return *f->bptr; } diff --git a/lib/fastbuf.h b/lib/fastbuf.h index 12bb5da2..6961fd2c 100644 --- a/lib/fastbuf.h +++ b/lib/fastbuf.h @@ -1,7 +1,7 @@ /* * UCW Library -- Fast Buffered I/O * - * (c) 1997--2004 Martin Mares + * (c) 1997--2007 Martin Mares * (c) 2004 Robert Spalek * * This software may be freely distributed and used according to the terms @@ -11,10 +11,6 @@ #ifndef _UCW_FASTBUF_H #define _UCW_FASTBUF_H -#ifndef EOF -#include -#endif - #include #include diff --git a/lib/fb-buffer.c b/lib/fb-buffer.c index 9ad248a2..d8094eb0 100644 --- a/lib/fb-buffer.c +++ b/lib/fb-buffer.c @@ -10,6 +10,7 @@ #include "lib/lib.h" #include "lib/fastbuf.h" +#include #include static int diff --git a/lib/fb-file.c b/lib/fb-file.c index c4543277..bd0f4d1e 100644 --- a/lib/fb-file.c +++ b/lib/fb-file.c @@ -11,6 +11,7 @@ #include "lib/fastbuf.h" #include "lib/lfs.h" +#include #include #include #include diff --git a/lib/fb-grow.c b/lib/fb-grow.c index 1a10a501..a5ed4d68 100644 --- a/lib/fb-grow.c +++ b/lib/fb-grow.c @@ -10,6 +10,7 @@ #include "lib/lib.h" #include "lib/fastbuf.h" +#include #include struct fb_gbuf { diff --git a/lib/fb-mem.c b/lib/fb-mem.c index c3f104f1..c304e16d 100644 --- a/lib/fb-mem.c +++ b/lib/fb-mem.c @@ -10,6 +10,8 @@ #include "lib/lib.h" #include "lib/fastbuf.h" +#include + struct memstream { unsigned blocksize; unsigned uc; diff --git a/lib/fb-temp.c b/lib/fb-temp.c index 7162fd2e..4bcced6c 100644 --- a/lib/fb-temp.c +++ b/lib/fb-temp.c @@ -12,6 +12,7 @@ #include "lib/fastbuf.h" #include "lib/threads.h" +#include #include #include diff --git a/lib/ff-printf.c b/lib/ff-printf.c index 769f830e..8825a288 100644 --- a/lib/ff-printf.c +++ b/lib/ff-printf.c @@ -10,6 +10,7 @@ #include "lib/lib.h" #include "lib/fastbuf.h" +#include #include int diff --git a/lib/qache.c b/lib/qache.c index 5a832bb7..c1a5024a 100644 --- a/lib/qache.c +++ b/lib/qache.c @@ -11,6 +11,7 @@ #include "lib/fastbuf.h" #include "lib/qache.h" +#include #include #include #include