/* Copyright (c) 1979 Regents of the University of California */
#define FILE struct _iobuf
#define stdout (&_iob[1])
#define stderr (&_iob[2])
#define getc(p) (--(p)->_cnt>=0? *(p)->_ptr++&0377:_filbuf(p))
#define getchar() getc(stdin)
#define peekc(p) (p->_cnt>0? *(p)->_ptr&0377:_filbuf(p)==-1?-1:((p)->_cnt++,*--(p)->_ptr&0377))
#define peekchar() peekc(stdin)
#define putc(x,p) (((p)->_flag |= _IODIRT,--(p)->_cnt)>=0? ((int)(*(p)->_ptr++ = (unsigned)(x))):_flsbuf( (unsigned)(x),p))
#define putchar(x) putc(x,stdout)
#define feof(p) (((p)->_flag&_IOEOF)!=0)
#define ferror(p) (((p)->_flag&_IOERR)!=0)
#define fileno(p) p->_file