#include <stdio.h>
#endif
+#include <string.h>
+
#include "lib/unaligned.h"
/*
/* FastIO on standard files */
struct fastbuf *bopen(byte *name, uns mode, uns buffer);
+struct fastbuf *bopen_tmp(uns buffer);
struct fastbuf *bfdopen(int fd, uns buffer);
void bbcopy(struct fastbuf *f, struct fastbuf *t, uns l);
return (f->bptr < f->bstop) ? (int) *f->bptr : bpeekc_slow(f);
}
-static inline void bungetc(struct fastbuf *f, byte c)
+static inline void bungetc(struct fastbuf *f)
{
- *--f->bptr = c;
+ f->bptr--;
}
-void bputc_slow(struct fastbuf *f, byte c);
-static inline void bputc(struct fastbuf *f, byte c)
+void bputc_slow(struct fastbuf *f, uns c);
+static inline void bputc(struct fastbuf *f, uns c)
{
if (f->bptr < f->bufend)
*f->bptr++ = c;
return bget5_slow(f);
}
-void bputw_slow(struct fastbuf *f, word w);
-static inline void bputw(struct fastbuf *f, word w)
+void bputw_slow(struct fastbuf *f, uns w);
+static inline void bputw(struct fastbuf *f, uns w)
{
if (f->bptr + 2 <= f->bufend)
{