1: /*************************************************************************
   2:  * This program is copyright (C) 1985, 1986 by Jonathan Payne.  It is    *
   3:  * provided to you without charge for use only on a licensed Unix        *
   4:  * system.  You may copy JOVE provided that this notice is included with *
   5:  * the copy.  You may not sell copies of this program or versions        *
   6:  * modified for use on microcomputer systems, unless the copies are      *
   7:  * included with a Unix system distribution and the source is provided.  *
   8:  *************************************************************************/
   9: 
  10: #define putchar(c)  putc(c, stdout)
  11: #define putc(c, fp) (--(fp)->f_cnt >= 0 ? (*(fp)->f_ptr++ = (c)) : _flush((c), fp))
  12: #define getc(fp)    (((--(fp)->f_cnt < 0) ? filbuf(fp) : *(fp)->f_ptr++))
  13: 
  14: typedef struct {
  15:     int f_cnt,      /* number of characters left in buffer */
  16:         f_bufsize,  /* size of what f_base points to */
  17:         f_fd,       /* fildes */
  18:         f_flags;    /* various flags */
  19:     char    *f_ptr,     /* current offset */
  20:         *f_base;    /* pointer to base */
  21:     char    *f_name;    /* name of open file */
  22: } File;
  23: 
  24: #define F_READ      01
  25: #define F_WRITE     02
  26: #define F_APPEND    04
  27: #define F_MODE(x)   (x&07)
  28: #define F_EOF       010
  29: #define F_STRING    020
  30: #define F_ERR       040
  31: #define F_LOCK      0100    /* don't close this file upon error */
  32: #define F_MYBUF     0200    /* f_alloc allocated the buffer, so
  33: 				   f_close knows to free it up */
  34: 
  35: extern long io_chars;
  36: extern int  io_lines;
  37: 
  38: extern File
  39:     *stdout,
  40:     *mru_file,
  41: 
  42:     *open_file(),
  43:     *fd_open(),
  44:     *f_open();

Defined macros

F_APPEND defined in line 26; used 4 times
F_EOF defined in line 28; used 4 times
F_ERR defined in line 30; used 2 times
F_LOCK defined in line 31; used 3 times
F_MODE defined in line 27; used 1 times
F_MYBUF defined in line 32; used 2 times
F_STRING defined in line 29; used 2 times
getc defined in line 12; used 2 times
putc defined in line 11; used 16 times
putchar defined in line 10; used 9 times

Usage of this include

Last modified: 1986-03-28
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1020
Valid CSS Valid XHTML 1.0 Strict