1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)stdio.h	5.3.2 (2.11BSD) 1997/7/29
   7:  */
   8: 
   9: # ifndef FILE
  10: #define BUFSIZ  1024
  11: extern  struct  _iobuf {
  12:     int _cnt;
  13:     char    *_ptr;      /* should be unsigned char */
  14:     char    *_base;     /* ditto */
  15:     int _bufsiz;
  16:     short   _flag;
  17:     char    _file;      /* should be short */
  18: } _iob[];
  19: 
  20: #define _IOREAD 01
  21: #define _IOWRT  02
  22: #define _IONBF  04
  23: #define _IOMYBUF    010
  24: #define _IOEOF  020
  25: #define _IOERR  040
  26: #define _IOSTRG 0100
  27: #define _IOLBF  0200
  28: #define _IORW   0400
  29: 
  30: /*
  31:  * The following definition is for ANSI C, which took them
  32:  * from System V, which brilliantly took internal interface macros and
  33:  * made them official arguments to setvbuf(), without renaming them.
  34:  * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
  35: */
  36: #define _IOFBF  0   /* setvbuf should set fully buffered */
  37:             /* _IONBF and _IOLBF are used from the flags above */
  38: 
  39: #ifndef NULL
  40: #define NULL    0
  41: #endif
  42: 
  43: #define FILE    struct _iobuf
  44: #define EOF (-1)
  45: 
  46: #define stdin   (&_iob[0])
  47: #define stdout  (&_iob[1])
  48: #define stderr  (&_iob[2])
  49: #ifndef lint
  50: #define getc(p)     (--(p)->_cnt>=0? (int)(*(unsigned char *)(p)->_ptr++):_filbuf(p))
  51: #endif not lint
  52: #define getchar()   getc(stdin)
  53: #ifndef lint
  54: #define putc(x, p)  (--(p)->_cnt >= 0 ?\
  55:     (int)(*(unsigned char *)(p)->_ptr++ = (x)) :\
  56:     (((p)->_flag & _IOLBF) && -(p)->_cnt < (p)->_bufsiz ?\
  57:         ((*(p)->_ptr = (x)) != '\n' ?\
  58:             (int)(*(unsigned char *)(p)->_ptr++) :\
  59:             _flsbuf(*(unsigned char *)(p)->_ptr, p)) :\
  60:         _flsbuf((unsigned char)(x), p)))
  61: #endif not lint
  62: #define putchar(x)  putc(x,stdout)
  63: #define feof(p)     (((p)->_flag&_IOEOF)!=0)
  64: #define ferror(p)   (((p)->_flag&_IOERR)!=0)
  65: #define fileno(p)   ((p)->_file)
  66: #define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
  67: 
  68: FILE    *fopen();
  69: FILE    *fdopen();
  70: FILE    *freopen();
  71: FILE    *popen();
  72: long    ftell();
  73: char    *fgets();
  74: char    *gets();
  75: # endif /* _FILE */

Defined struct's

_iobuf defined in line 11; used 2 times

Defined macros

BUFSIZ defined in line 10; used 874 times
EOF defined in line 44; used 935 times
FILE defined in line 43; used 1718 times
NULL defined in line 40; used 4028 times
clearerr defined in line 66; used 49 times
feof defined in line 63; used 89 times
ferror defined in line 64; used 161 times
fileno defined in line 65; used 425 times
getc defined in line 50; used 617 times
getchar defined in line 52; used 395 times
putc defined in line 54; used 731 times
putchar defined in line 62; used 1026 times
stderr defined in line 48; used 3540 times
stdin defined in line 46; used 712 times
stdout defined in line 47; used 1581 times

Usage of this include

stdio.h used 1073 times
Last modified: 1997-07-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 9671
Valid CSS Valid XHTML 1.0 Strict