home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / XFILE.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  792b  |  44 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  xfile.h -- definitions for fast line buffered files
  5. */
  6.  
  7. #ifndef __XFILE_H__
  8. #define __XFILE_H__
  9.  
  10. struct _xfile {
  11.     int   fd;
  12.     int   bufSize;
  13.     char *buf;
  14.     char *nextChar;
  15.     char *lastChar;
  16. };
  17.  
  18. typedef struct _xfile XFILE;
  19.  
  20. #include <dos.h>
  21.  
  22. #if defined(__ZTC__)
  23.  #include <io.h>
  24.  #define DOS_OPEN dos_open
  25.  #define READ     read
  26.  #define CLOSE    close
  27. #elif defined(__TURBOC__)
  28.  #include <io.h>
  29.  #include <fcntl.h>
  30.  #define DOS_OPEN _open
  31.  #define READ     _read
  32.  #define CLOSE    _close
  33. #else /* MSC */
  34.  #include <stdlib.h>
  35.  #include <fcntl.h>
  36.  #define CLOSE    _dos_close
  37. #endif
  38.  
  39. XFILE *xopen(char const *);
  40. void   xclose(XFILE *);
  41. char  *xgetline(XFILE *);
  42.  
  43. #endif  /* __XFILE_H__ */
  44.