1: /***************************************************************************
   2:  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
   3:  * is provided to you without charge, and with no warranty.  You may give  *
   4:  * away copies of JOVE, including sources, provided that this notice is    *
   5:  * included in all the files.                                              *
   6:  ***************************************************************************/
   7: 
   8: #define putchar(c)  putc(c, stdout)
   9: #define putc(c, fp) (--(fp)->f_cnt >= 0 ? (*(fp)->f_ptr++ = (c)) : _flush((c), fp))
  10: #define getc(fp)    (((--(fp)->f_cnt < 0) ? filbuf(fp) : *(fp)->f_ptr++))
  11: 
  12: typedef struct File {
  13:     int f_cnt,      /* number of characters left in buffer */
  14:         f_bufsize,  /* size of what f_base points to */
  15:         f_fd,       /* fildes */
  16:         f_flags;    /* various flags */
  17:     char    *f_ptr,     /* current offset */
  18:         *f_base;    /* pointer to base */
  19:     char    *f_name;    /* name of open file */
  20: } File;
  21: 
  22: #define F_READ      01
  23: #define F_WRITE     02
  24: #define F_APPEND    04
  25: #define F_MODE(x)   (x&07)
  26: #define F_EOF       010
  27: #define F_STRING    020
  28: #define F_ERR       040
  29: #define F_LOCKED    0100    /* don't close this file upon error */
  30: #define F_MYBUF     0200    /* f_alloc allocated the buffer, so
  31: 				   f_close knows to free it up */
  32: #define F_TELLALL   0400    /* whether to display info upon close */
  33: 
  34: extern long io_chars;
  35: extern int  io_lines;
  36: 
  37: extern File
  38:     *stdout,
  39: 
  40:     *open_file(),
  41:     *fd_open(),
  42:     *f_open();
  43: 
  44: #ifdef VMUNIX
  45: #   define MAXTTYBUF    2048
  46: #else
  47: #   define MAXTTYBUF    512
  48: #endif

Defined struct's

File defined in line 12; never used

Defined typedef's

Defined macros

F_APPEND defined in line 24; used 4 times
F_EOF defined in line 26; used 6 times
F_ERR defined in line 28; used 4 times
F_LOCKED defined in line 29; used 4 times
F_MODE defined in line 25; used 1 times
F_MYBUF defined in line 30; used 2 times
F_STRING defined in line 27; used 2 times
F_TELLALL defined in line 32; used 2 times
MAXTTYBUF defined in line 47; used 2 times
getc defined in line 10; used 8 times
putc defined in line 9; used 21 times
putchar defined in line 8; used 8 times

Usage of this include

Last modified: 1988-03-15
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2427
Valid CSS Valid XHTML 1.0 Strict