nakedmud-mod/
nakedmud-mod/html/tutorials/
nakedmud-mod/html/tutorials/building_extras/
nakedmud-mod/html/tutorials/c/
nakedmud-mod/html/tutorials/reference/
nakedmud-mod/html/tutorials/scripting/
nakedmud-mod/html/tutorials/scripting_extras/
nakedmud-mod/lib/
nakedmud-mod/lib/help/A/
nakedmud-mod/lib/help/B/
nakedmud-mod/lib/help/C/
nakedmud-mod/lib/help/D/
nakedmud-mod/lib/help/G/
nakedmud-mod/lib/help/H/
nakedmud-mod/lib/help/J/
nakedmud-mod/lib/help/L/
nakedmud-mod/lib/help/M/
nakedmud-mod/lib/help/O/
nakedmud-mod/lib/help/P/
nakedmud-mod/lib/help/R/
nakedmud-mod/lib/help/S/
nakedmud-mod/lib/help/W/
nakedmud-mod/lib/logs/
nakedmud-mod/lib/misc/
nakedmud-mod/lib/players/
nakedmud-mod/lib/pymodules/polc/
nakedmud-mod/lib/txt/
nakedmud-mod/lib/world/
nakedmud-mod/lib/world/zones/examples/
nakedmud-mod/lib/world/zones/examples/mproto/
nakedmud-mod/lib/world/zones/examples/oproto/
nakedmud-mod/lib/world/zones/examples/reset/
nakedmud-mod/lib/world/zones/examples/rproto/
nakedmud-mod/lib/world/zones/examples/trigger/
nakedmud-mod/lib/world/zones/limbo/
nakedmud-mod/lib/world/zones/limbo/room/
nakedmud-mod/lib/world/zones/limbo/rproto/
nakedmud-mod/src/alias/
nakedmud-mod/src/dyn_vars/
nakedmud-mod/src/editor/
nakedmud-mod/src/example_module/
nakedmud-mod/src/help2/
nakedmud-mod/src/set_val/
nakedmud-mod/src/socials/
nakedmud-mod/src/time/
#ifndef FILEBUF_H
#define FILEBUF_H
//*****************************************************************************
//
// filebuf.h
//
// buffered file io
//
//*****************************************************************************

typedef struct buffered_file FILEBUF;

//
// create a new buffered file reader for reading, writing, 
// or appending, specified by the mode
FILEBUF *fbopen(const char *fname, const char *mode);

//
// close, flush, and delete the buffered file reader
void fbclose(FILEBUF *buf);

//
// flush the buffered file reader
void fbflush(FILEBUF *buf);

//
// return the next char in the buffered file
char fbgetc(FILEBUF *buf);

//
// print the formatting to the file
int fbprintf(FILEBUF *buf, const char *fmt, ...) 
__attribute__ ((format (printf, 2, 3)));

//
// append the text to the buffer
void fbwrite(FILEBUF *fb, const char *str);

//
// go to the position, from the specified offset. Uses SEEK_CUR, SEEK_SET,
// and SEEK_END from stdio.h
void fbseek(FILEBUF *buf, int offset, int origin);


#endif // FILEBUF