home *** CD-ROM | disk | FTP | other *** search
- /*
- frwdecl.h
-
- % Generic file read/write includes and definitions.
-
- 5/02/89 by Ted.
-
- OWL 1.1
- Copyright (c) 1989 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- */
- /* -------------------------------------------------------------------------- */
-
- #include "jadecl.h" /* for bfile stuff */
- #include "symldecl.h" /* for bfile stuff */
- #include "bfdecl.h" /* for bfile stuff */
-
- /* -------------------------------------------------------------------------- */
- /* File Read/Write Structure */
-
- typedef struct frw_struct {
- unsigned isbfile:1;
- unsigned writemode:1;
- FILE *fd;
- bfile_type bfile;
-
- byte *buf;
- SIZE_T bufsize, bufptr, bufend;
- } *frw_type;
-
- #define FRW_WRITEMODE TRUE
- #define FRW_READMODE FALSE
- /* -------------------------------------------------------------------------- */
-
- extern boolean frw_openbuf(_arg3(frw_type frw, SIZE_T bufsize, boolean writemode));
- extern void frw_closebuf(_arg1(frw_type frw));
- extern SIZE_T frw_read(_arg3(frw_type frw, VOID *buf, SIZE_T n));
- extern unsigned frw_readb(_arg1(frw_type frw));
- extern SIZE_T frw_write(_arg3(frw_type frw, VOID *buf, SIZE_T n));
- extern boolean frw_writeb(_arg2(frw_type frw, byte b));
- /* -------------------------------------------------------------------------- */
-
-