sfio.h revision 7c2fbfb345896881c631598ee3852ce9ce33fb07
1008N/A/*********************************************************************** 1008N/A* This software is part of the ast package * 1008N/A* Copyright (c) 1985-2008 AT&T Intellectual Property * 1008N/A* and is licensed under the * 1008N/A* Common Public License, Version 1.0 * 1008N/A* by AT&T Intellectual Property * 1008N/A* A copy of the License is available at * 1008N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1008N/A* Information and Software Systems Research * 1008N/A* Glenn Fowler <gsf@research.att.com> * 1008N/A* David Korn <dgk@research.att.com> * 1008N/A* Phong Vo <kpv@research.att.com> * 1008N/A***********************************************************************/ 1008N/A/* Public header file for the sfio library 1008N/A/* Sfoff_t should be large enough for largest file address */ 1255N/A/* formatting environment */ 1008N/A/* bits for various types of files */ 1008N/A/* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */ 1008N/A/* for stack and disciplines */ 1008N/A/* for the notify function and discipline exception */ 1008N/A/* namespace incursion workarounds -- migrate to the new names */ /* mutex locking for thread-safety */ /* io functions with discipline continuation */ /* portable handling of primitive types */ /* miscellaneous function analogues of fast in-line functions */ /* coding long integers in a portable and compact fashion */ (
int)(*
_SF_(f)->
_next++ = (
unsigned char)(c)) )
#
ifndef _SFSTR_H /* GSF's string manipulation stuff */ (((p) < 0 || (p) > (f)->
_size) ? (
char*)0 : \
((f)->
_next -= (p), (
char*)0) : (
char*)(f)->
_next ) ) \
( ((p) > 0 || (f)->
_size+(p) < 0) ? (
char*)0 : \
((f)->
_data == (
unsigned char*)(b) ? 0 : -
1) \