home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / FRWDECL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.3 KB  |  46 lines

  1. /*
  2.     frwdecl.h
  3.  
  4.     % Generic file read/write includes and definitions.
  5.  
  6.     5/02/89  by Ted.
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1989 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14. */
  15. /* -------------------------------------------------------------------------- */
  16.  
  17. #include "jadecl.h"            /* for bfile stuff */
  18. #include "symldecl.h"        /* for bfile stuff */
  19. #include "bfdecl.h"            /* for bfile stuff */
  20.  
  21. /* -------------------------------------------------------------------------- */
  22. /* File Read/Write Structure */
  23.  
  24. typedef struct frw_struct {
  25.     unsigned isbfile:1;
  26.     unsigned writemode:1;
  27.     FILE *fd;
  28.     bfile_type bfile;
  29.  
  30.     byte *buf;
  31.     SIZE_T bufsize, bufptr, bufend;
  32. } *frw_type;
  33.  
  34. #define FRW_WRITEMODE    TRUE
  35. #define FRW_READMODE    FALSE
  36. /* -------------------------------------------------------------------------- */
  37.  
  38. extern boolean    frw_openbuf(_arg3(frw_type frw, SIZE_T bufsize, boolean writemode));
  39. extern void        frw_closebuf(_arg1(frw_type frw));
  40. extern SIZE_T    frw_read(_arg3(frw_type frw, VOID *buf, SIZE_T n));
  41. extern unsigned    frw_readb(_arg1(frw_type frw));
  42. extern SIZE_T    frw_write(_arg3(frw_type frw, VOID *buf, SIZE_T n));
  43. extern boolean    frw_writeb(_arg2(frw_type frw, byte b));
  44. /* -------------------------------------------------------------------------- */
  45.  
  46.