/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#ifndef _SFIO_T_H
/* This header file is for library writers who need to know certain
** internal info concerning the full Sfio_t structure. Including this
** file means that you agree to track closely with sfio development
** in case its internal architecture is changed.
**
** Written by Kiem-Phong Vo
*/
/* the parts of Sfio_t private to sfio functions */
#define _SFIO_PRIVATE \
unsigned char getr; /* the last sfgetr separator */ \
unsigned short bits; /* private flags */ \
unsigned int mode; /* current io mode */ \
#include "sfio.h"
/* mode bit to indicate that the structure hasn't been initialized */
/* short-hand for common stream types */
/* for static initialization of an Sfio_t structure */
{ (unsigned char*)(data), /* next */ \
(unsigned char*)(data), /* endw */ \
(unsigned char*)(data), /* endr */ \
(unsigned char*)(data), /* endb */ \
(Sfio_t*)0, /* push */ \
(short)(file), /* file */ \
(unsigned char*)(data), /* data */ \
(Sfoff_t)0, /* extent */ \
(Sfoff_t)0, /* here */ \
0, /* getr */ \
{0}, /* tiny */ \
0, /* bits */ \
(struct _sfpool_s*)0, /* pool */ \
(struct _sfrsrv_s*)0, /* rsrv */ \
(struct _sfproc_s*)0, /* proc */ \
(mutex), /* mutex */ \
(Void_t*)0, /* stdio */ \
(Sfoff_t)0, /* lpos */ \
(size_t)0 /* iosz */ \
}
/* function to clear an Sfio_t structure */
( (f)->next = (unsigned char*)0, /* next */ \
(f)->endw = (unsigned char*)0, /* endw */ \
(f)->endr = (unsigned char*)0, /* endr */ \
(f)->endb = (unsigned char*)0, /* endb */ \
(f)->flags = (unsigned short)0, /* flags */ \
(f)->data = (unsigned char*)0, /* data */ \
(f)->getr = 0, /* getr */ \
(f)->tiny[0] = 0, /* tiny */ \
(f)->bits = 0, /* bits */ \
(f)->mode = 0, /* mode */ \
)
/* expose next stream inside discipline function; state saved in int f */
/* restore SFDCNEXT() state from int f */
#endif /* _SFIO_T_H */