home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 11 / AUCD11B.iso / LANGUAGES / WraithSet / AwkStuff / MawkSrc / h / fin < prev    next >
Text File  |  1993-07-03  |  1KB  |  57 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 1.1.1.1  1993/07/03  18:58:13  mike
  15.  * move source to cvs
  16.  *
  17.  * Revision 5.2  1992/01/06  08:16:24  brennan
  18.  * setmode() proto for MSDOS
  19.  *
  20.  * Revision 5.1  91/12/05  07:59:20  brennan
  21.  * 1.1 pre-release
  22.  * 
  23. */
  24.  
  25. /* fin.h */
  26.  
  27. #ifndef  FIN_H
  28. #define  FIN_H
  29. /* structure to control input files */
  30.  
  31. typedef struct {
  32. int  fd ;
  33. FILE *fp ;   /* NULL unless interactive */
  34. char *buff ;
  35. char *buffp ;
  36. unsigned nbuffs ; /* sizeof *buff in BUFFSZs */
  37. int  flags ;
  38. }  FIN ;
  39.  
  40. #define  MAIN_FLAG    1   /* part of main input stream if on */
  41. #define  EOF_FLAG     2
  42. #define  START_FLAG   4   /* used when RS == "" */
  43.  
  44. FIN *  PROTO (FINdopen, (int, int) );
  45. FIN *  PROTO (FINopen, (char *, int) );
  46. void   PROTO (FINclose, (FIN *) ) ;
  47. void   PROTO (FINsemi_close, (FIN *)) ;
  48. char*  PROTO (FINgets, (FIN *, unsigned *) ) ;
  49. unsigned PROTO ( fillbuff, (int, char *, unsigned) ) ;
  50.  
  51.  
  52. extern  FIN  *main_fin ;  /* for the main input stream */
  53. void   PROTO( open_main, (void) ) ;
  54.  
  55. void  PROTO(setmode, (int,int)) ;
  56. #endif  /* FIN_H */
  57.