File:  [Research Unix] / researchv9 / cmd / p / pad.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

typedef struct _PCBL{
	struct _PCBL *Pnextp;
	struct _PCBL *Pprevp;
	char *Pbase;		/* Pointer to head of character buffer */
	char *Pptr;		/* Pointer to current read position */
	char *Phiwat;		/* Pointer to high water mark for this buffer */
	int Pcnt;		/* Phiwat-Pptr.  for speed. */
}_PCBL;		/* Pad circular buffer list */

typedef struct _PAD{
	_PCBL	*Pcbl;		/* Circular list for this file descriptor */
	_PCBL	*Pcbb;		/* base of list so we can free it */
	int	Pfile;		/* file descriptor */
}PAD;

#define	Pgetc(p)	(--(p)->Pcbl->Pcnt>=0? *(p)->Pcbl->Pptr++&0377:_Pfilbuf(p))
PAD *Pfopen();
PAD *Pfdopen();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.