From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONTRIB/SNIP/xfile.h | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 reference/C/CONTRIB/SNIP/xfile.h (limited to 'reference/C/CONTRIB/SNIP/xfile.h') diff --git a/reference/C/CONTRIB/SNIP/xfile.h b/reference/C/CONTRIB/SNIP/xfile.h new file mode 100755 index 0000000..afebe3f --- /dev/null +++ b/reference/C/CONTRIB/SNIP/xfile.h @@ -0,0 +1,41 @@ +/* +** xfile.h -- definitions for fast line buffered files +*/ + +#ifndef __XFILE_H__ +#define __XFILE_H__ + +struct _xfile { + int fd; + int bufSize; + char *buf; + char *nextChar; + char *lastChar; +}; + +typedef struct _xfile XFILE; + +#include + +#if defined(__ZTC__) + #include + #define DOS_OPEN dos_open + #define READ read + #define CLOSE close +#elif defined(__TURBOC__) + #include + #include + #define DOS_OPEN _open + #define READ _read + #define CLOSE _close +#else /* MSC */ + #include + #include + #define CLOSE _dos_close +#endif + +XFILE *xopen(char const *); +void xclose(XFILE *); +char *xgetline(XFILE *); + +#endif /* __XFILE_H__ */ -- cgit v1.2.3-54-g00ecf