/*
- * Sherlock Library -- Fast Buffered I/O
+ * UCW Library -- Fast Buffered I/O
*
* (c) 1997--2004 Martin Mares <mj@ucw.cz>
* (c) 2004 Robert Spalek <robert@ucw.cz>
* of the GNU Lesser General Public License.
*/
-#ifndef _SHERLOCK_FASTBUF_H
-#define _SHERLOCK_FASTBUF_H
+#ifndef _UCW_FASTBUF_H
+#define _UCW_FASTBUF_H
#ifndef EOF
#include <stdio.h>
bdirect_read_prepare(struct fastbuf *f, byte **buf)
{
if (f->bptr == f->bstop && !f->refill(f))
- return 0;
+ {
+ *buf = NULL; // This is not needed, but it helps to get rid of spurious warnings
+ return 0;
+ }
*buf = f->bptr;
return bavailr(f);
}
/* 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