home *** CD-ROM | disk | FTP | other *** search
- /*
- frwdecl.h
-
- % Generic file read/write includes and definitions.
-
- 5/02/89 by Ted.
-
- OWL 1.2
- Copyright (c) 1989 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 12/11/89 jmd removed includes
- 3/28/90 jmd ansi-fied
- */
- /* -------------------------------------------------------------------------- */
-
- #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;
- SIZE_T bufptr;
- SIZE_T bufend;
- } *frw_type;
-
- #define FRW_WRITEMODE TRUE
- #define FRW_READMODE FALSE
- /* -------------------------------------------------------------------------- */
-
- /* FRW.C */
- extern boolean frw_openbuf(struct frw_struct *frw, SIZE_T bufsize, boolean writemode);
- extern void frw_closebuf(struct frw_struct *frw);
- extern SIZE_T frw_read(struct frw_struct *frw, VOID *buf, SIZE_T n);
- extern unsigned frw_readb(struct frw_struct *frw);
- extern SIZE_T frw_write(struct frw_struct *frw, VOID *buf, SIZE_T n);
- extern boolean frw_writeb(struct frw_struct *frw, byte b);
-
- /* -------------------------------------------------------------------------- */
-
-