home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / mawk11as.zip / FIN.H < prev    next >
C/C++ Source or Header  |  1992-01-06  |  1KB  |  54 lines

  1.  
  2. /********************************************
  3. fin.h
  4. copyright 1991, Michael D. Brennan
  5.  
  6. This is a source file for mawk, an implementation of
  7. the AWK programming language.
  8.  
  9. Mawk is distributed without warranty under the terms of
  10. the GNU General Public License, version 2, 1991.
  11. ********************************************/
  12.  
  13. /*$Log:    fin.h,v $
  14.  * Revision 5.2  92/01/06  08:16:24  brennan
  15.  * setmode() proto for MSDOS
  16.  * 
  17.  * Revision 5.1  91/12/05  07:59:20  brennan
  18.  * 1.1 pre-release
  19.  * 
  20. */
  21.  
  22. /* fin.h */
  23.  
  24. #ifndef  FIN_H
  25. #define  FIN_H
  26. /* structure to control input files */
  27.  
  28. typedef struct {
  29. int  fd ;
  30. FILE *fp ;   /* NULL unless interactive */
  31. char *buff ;
  32. char *buffp ;
  33. unsigned nbuffs ; /* sizeof *buff in BUFFSZs */
  34. int  flags ;
  35. }  FIN ;
  36.  
  37. #define  MAIN_FLAG    1   /* part of main input stream if on */
  38. #define  EOF_FLAG     2
  39. #define  START_FLAG   4   /* used when RS == "" */
  40.  
  41. FIN *  PROTO (FINdopen, (int, int) );
  42. FIN *  PROTO (FINopen, (char *, int) );
  43. void   PROTO (FINclose, (FIN *) ) ;
  44. void   PROTO (FINsemi_close, (FIN *)) ;
  45. char*  PROTO (FINgets, (FIN *, unsigned *) ) ;
  46. unsigned PROTO ( fillbuff, (int, char *, unsigned) ) ;
  47.  
  48.  
  49. extern  FIN  *main_fin ;  /* for the main input stream */
  50. void   PROTO( open_main, (void) ) ;
  51.  
  52. void  PROTO(setmode, (int,int)) ;
  53. #endif  /* FIN_H */
  54.