#ifndef __STDIO_LOADED #define __STDIO_LOADED 1 #ifndef __STDIO_PROCESSED #define __STDIO_PROCESSED /**************************************************************************** ** ** - Standard Input/Output ** ***************************************************************************** ** Header introduced by the ANSI C Standard ***************************************************************************** ** ** Copyright 2006 Hewlett-Packard Development Company, L.P. ** ** Confidential computer software. Valid license from HP and/or ** its subsidiaries required for possession, use, or copying. ** ** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, ** Computer Software Documentation, and Technical Data for Commercial ** Items are licensed to the U.S. Government under vendor's standard ** commercial license. ** ** Neither HP nor any of its subsidiaries shall be liable for technical ** or editorial errors or omissions contained herein. The information ** in this document is provided "as is" without warranty of any kind and ** is subject to change without notice. The warranties for HP products ** are set forth in the express limited warranty statements accompanying ** such products. Nothing herein should be construed as constituting an ** additional warranty. ** ***************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** Cplusplus and unix_putc does not work together. ** Primarily for pragma inline functions. So put out an error. */ # if defined __UNIX_PUTC && defined __cplusplus # error " Use of __UNIX_PUTC not permitted with C++" # endif /* ** Member align structures */ #pragma __member_alignment __save #pragma __member_alignment /* ** Create 'public' typedefs that are either insensitive to pointer size or ** are sensitive to pointer size and must use short pointers. */ #ifndef NULL # define NULL __NULL #endif struct _iobuf { int _cnt; char *_ptr; char *_base; unsigned char _flag; #if __CRTL_VER >= 70000000 unsigned char _padfile; unsigned char _pad1; unsigned char _pad2; int _file; #else unsigned char _file; unsigned char _pad1; unsigned char _pad2; #endif }; #ifdef __NAMESPACE_STD namespace std { #endif #ifndef __FILE_T # define __FILE_T typedef __FILE FILE; #endif typedef struct __fpos {unsigned __f0 : 32; unsigned __f1 : 32; } fpos_t; #ifndef __SIZE_T # define __SIZE_T 1 typedef __size_t size_t; #endif #ifdef __NAMESPACE_STD } /* namespace std */ #endif #if !defined(_DECC_V4_SOURCE) && (__USE_OFF64_T || defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) ) # ifndef __OFF_T # define __OFF_T 1 typedef __off_t off_t; # endif #endif /* ** Define macros to access stdin, stdout, and stderr */ #ifndef __VAX # define stderr (decc$ga_stderr) # define stdin (decc$ga_stdin) # define stdout (decc$ga_stdout) #else # define stderr (*decc$ga_stderr) # define stdin (*decc$ga_stdin) # define stdout (*decc$ga_stdout) #endif /* ** Define stdin, stdout, and stderr */ #pragma __extern_model __save #pragma __extern_model __strict_refdef extern __FILE * stderr; extern __FILE * stdin; extern __FILE * stdout; #pragma __extern_model __restore /* ** Define optind, opterr, optopt, and optarg. X/Open originally ** specified these in . ISO POSIX-2 moved them to ** X/Open retains them in both. */ #if __CRTL_VER >= 60200000 /* Supported starting with OpenVMS V6.2 */ # if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) # pragma __extern_model __save # pragma __extern_model __strict_refdef extern int optind; extern int opterr; extern int optopt; extern char *optarg; # pragma __extern_model __restore # endif #endif /* ** The ANSI standard defines the following integral constant expressions as ** having distinct values, suitable for use as the third argument to the ** setvbuf function. */ #define _IOLBF 0x01 #define _IOFBF 0x02 #define _IONBF 0x04 /* ** Values for _flag field in the _iobuf structure. This flag is used by the ** functions clearerr(), feof() and ferror(). A standards conforming ** program should not use _IOEOF or _IOERR. Use clearerr, feof ** and ferror macros instead. */ # define _IOEOF 0x10 # define _IOERR 0x20 #ifndef _ANSI_C_SOURCE # define _IOREAD 0x01 # define _IOWRT 0x02 # define _IOMYBUF 0x08 # define _IOSTRG 0x40 # define _IORW 0x80 #endif /* ** Define seek modes. Note that the SEEK_EOF value is not defined by ** the ANSI standard, but is provided for compatibility with VAX C. */ #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #ifndef _ANSI_C_SOURCE # define SEEK_EOF SEEK_END #endif /* ** The literal BUFSIZ is defined by the ANSI standard as the size of the ** buffer used by the setbuf function. */ #ifndef __VAX # define BUFSIZ 32768 #else # define BUFSIZ 8192 #endif /* ** DEC C RTL extension. Define the values TRUE and FALSE. */ #ifndef _ANSI_C_SOURCE # ifndef TRUE # define TRUE 1 # endif # ifndef FALSE # define FALSE 0 # endif #endif /* ** The ANSI standard defines EOF as a negative integral constant expression ** that is returned by several functions to indicate end-of-file. Internal ** __EOF macro is defined in header as (-1) */ #define EOF __EOF /* ** The ANSI standard defines FILENAME_MAX as an integral constant ** expression that is the size needed for an array of char large enough to ** hold the longest file name string that the implementation guarantees ** can be opened. ** ** The ANSI standard defines FOPEN_MAX as an integral constant expression ** that is the minumum number of files that the implementation guarantees ** can be opened simultaneously. This value is difficult to define as an ** accurate constant value since many things affect the ability to open a ** given number of files. */ #define FILENAME_MAX 256 #define FOPEN_MAX 8 /* ** DEC C RTL extension. Define OPEN_MAX to be identical to FOPEN_MAX. Also ** define _NFILE for VAX C compatibility. */ #ifndef _ANSI_C_SOURCE # define OPEN_MAX FOPEN_MAX # define _NFILE 20 #endif /* ** The literal values L_tmpnam and TMP_MAX are defined by the ANSI ** standard. If the argument to the tmpnam() function is not a null ** pointer, it is assumed to point to an array of at least L_tmpnam ** characters. The value TMP_MAX represents the number of unique names ** which must be returned from the tmpnam() function on successive calls. */ #define L_tmpnam 256 #if __CRTL_VER >= 70301000 # define TMP_MAX 17576 #else # define TMP_MAX 156 #endif /* ** ISO POSIX-1 extensions. These literal values are analogous to the ** L_tmpnam value for tmpnam() function calls. */ #if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE) # define L_cuserid 16 # define L_ctermid 64 #endif /* ** DEC C RTL extensions. These literal values are analogous to the ** L_tmpnam value for tmpnam() function calls. */ #ifndef _ANSI_C_SOURCE # define L_lcltmpnam 256 # define L_nettmpnam 256 #endif /* ** The MIA standard requires use of a special rename() and freopen() ** function. Define macros when compiling with that mode. */ #ifdef __MIA # define rename decc$mia_rename # define freopen decc$mia_freopen #endif /* ** Conditions for X/Open file pointer locking functions to be visible. */ #if ( (defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE)) && \ (__CRTL_VER >= 80200000) ) # define __FP_LOCKING 1 #else # define __FP_LOCKING 0 #endif /* ** Conditions to permit optimizations not requiring X/Open file pointer locking. */ #ifdef __STDIO_UNLOCK_CHAR_IO # define __FP_OPTIMIZATIONS 1 #else # if __FP_LOCKING # define __FP_OPTIMIZATIONS 0 # else # define __FP_OPTIMIZATIONS 1 # endif #endif /* ** Throughout this header file, for a C++ compilation with __NAMESPACE_STD ** enabled, functions from ANSI C standard that are defined as macros in this ** header file, are defined as inline functions instead of macros. ** ** This is to comply with clause 17.4.1.2 Headers [lib.headers] of the C++ ** standard which says, in particular: -6- Names that are defined as functions in C shall be defined as functions in the C++ Standard Library.*) *) This disallows the practice, allowed in C, of providing a "masking macro" in addition to the function prototype. The only way to achieve equivalent "inline" behavior in C++ is to provide a definition as an extern inline function. */ /* ** DEC C Performance (Macros) */ #define __feof_(stream) (((unsigned int)((*(stream))->_flag) & _IOEOF) != 0) #define __ferror_(stream) (((unsigned int)((*(stream))->_flag) & _IOERR) != 0) #define __clearerr_(stream) ((void)((*(stream))->_flag &= ~(_IOERR | _IOEOF))) #ifndef __NAMESPACE_STD #if __FP_OPTIMIZATIONS #define feof(stream) __feof_(stream) #define ferror(stream) __ferror_(stream) #define clearerr(stream) __clearerr_(stream) #endif #else #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 64 #endif namespace std { #pragma __extern_prefix __save #pragma __extern_prefix "CXXL$" #if __FP_OPTIMIZATIONS inline int feof(FILE* stream) { return __feof_(stream); } inline int ferror(FILE* stream) { return __ferror_(stream); } inline void clearerr(FILE* stream) { __clearerr_(stream); } #endif #pragma __extern_prefix __restore } /* namespace std */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #endif /* __NAMESPACE_STD */ /* ** DEC C Performance (Inlined) ** ** Certain DEC C functions are available as inline code instead of making a ** call to the DEC C RTL. Using this inline code offers performance ** improvements and are enabled here for all programs not on VAX. */ #ifndef __VAX /* ** Optimized getc, getchar, putc, putchar, fgetc, fputc. ** ANSI standard says that getc/putc can evaluate its parameters ** more than once. ** */ # ifndef __NAMESPACE_STD /* ** C compilation, define macros ** ** Any change in the macro below should be made in corresponding ** inline function for a C++ compilation, and vice versa. ** */ # define __getc_(__fp) ((*(__fp)) ? \ (((((*(__fp))->_cnt > 0) & !((int)(*(__fp))->_flag & 0x40)) ? \ ((*(__fp))->_cnt--, ((int) ((unsigned char) *((*(__fp))->_ptr++)))) : \ (getc)(__fp))) : (getc)(__fp)) # if !defined(getc) && __FP_OPTIMIZATIONS # define getc(__fp) __getc_(__fp) # endif # define __getchar_() ((*stdin) ? \ (((((*stdin)->_cnt > 0) & !((int)(*stdin)->_flag & 0x40)) ? \ ((*stdin)->_cnt--, ((int) ((unsigned char) *((*stdin)->_ptr++)))) : \ (getchar)())) : (getchar)()) # if !defined(getchar) && __FP_OPTIMIZATIONS # define getchar() __getchar_() # endif # else /* __NAMESPACE_STD */ #if __FP_OPTIMIZATIONS /* ** C++ compilation, define inline functions */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 64 #endif namespace std { #pragma __extern_prefix __save #pragma __extern_prefix "CXXL$" inline int getc(FILE* __fp); inline int getchar(); #pragma __extern_prefix __restore inline int getc(FILE* __fp) { int decc$getc(FILE*); return ((*__fp) ? (((((*__fp)->_cnt > 0) & !((int)(*__fp)->_flag & 0x40)) ? ((*__fp)->_cnt--, ((int) ((unsigned char) *((*__fp)->_ptr++)))) : (decc$getc)(__fp))) : (decc$getc)(__fp)); } inline int getchar() { int decc$getchar(void); return ((*stdin) ? (((((*stdin)->_cnt > 0) & !((int)(*stdin)->_flag & 0x40)) ? ((*stdin)->_cnt--, ((int) ((unsigned char) *((*stdin)->_ptr++)))) : (decc$getchar)())) : (decc$getchar)()); } } /* namespace std */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #endif /* FP locking */ # endif /* __NAMESPACE_STD */ /* ** This is conditional until a problem with static inline ** procedures is corrected in the compiler. ** When this is corrected, we must separate this and ** conditionalize this out of c++. ** */ # ifdef __UNIX_PUTC # ifndef putc # pragma __inline __putc static int __putc( int __c, struct _iobuf **__p2 ) { struct _iobuf *__p = *__p2; if (!(*__p2)) return (putc)(__c,__p2); if ( !((__p)->_flag & 0x40) & ((int)((__p)->_ptr) != (int) *(((int *) (__p)) + 6)) & !(*(((unsigned char *)(__p))+14) & 0x10 )) { if ((__p)->_cnt) (__p)->_cnt--; *(__p)->_ptr++ = (__c); *(((unsigned char *) (__p)) + 14) |= 0x02; return __c; } else return (putc)(__c,__p2); } # if __FP_OPTIMIZATIONS # define putc(c,fp) __putc(c,fp) # endif # endif # ifndef putchar # pragma __inline __putchar static int __putchar( int __c ) { struct _iobuf *__p = *stdout; if (!(*stdout)) return (putchar)(__c); if (!((__p)->_flag & 0x40) & ((int)((__p)->_ptr)!=(int) *(((int *)(__p))+6)) & !(*(((unsigned char *)(__p))+14) & 0x10 )) { if ((__p)->_cnt) (__p)->_cnt--; *(__p)->_ptr++ = (__c); *(((unsigned char *) (__p)) + 14) |= 0x02; return __c; } else return (putchar)(__c); } # if __FP_OPTIMIZATIONS # define putchar(c) __putchar(c) # endif # endif # endif /* ** ANSI standard says that fgetc/fputc cannot evaluate its ** parameters more than once so make sure it is done ** via a static inline function. and surrounded by unix conditionals. */ # ifdef __UNIX_PUTC # ifndef fgetc # pragma inline __fgetc static int __fgetc (__FILE *__fp) {return (getc (__fp));} # if __FP_OPTIMIZATIONS # define fgetc(fp) __fgetc(fp) # endif # endif # ifndef fputc # pragma __inline __fputc static int __fputc(int __c, struct _iobuf **__p2) {return (putc(__c, __p2));} # if __FP_OPTIMIZATIONS # define fputc(c,fp) __fputc(c,fp) # endif # endif # endif #endif /* ! __VAX */ /* ** This section is for functions and declarations which do not support ** 64 bit pointers being passed (or returned). */ #ifdef __NAMESPACE_STD namespace std { #endif void setbuf (__FILE *__stream, char *__buf); int setvbuf (__FILE *__stream, char *__buf, int __mode, __size_t __size); #ifdef __NAMESPACE_STD } /* namespace std */ #endif /* ** The function cuserid is defined by IEEE Std 1003.1-1988 and was changed ** from mandatory to permitted by ISO POSIX-1. With IEEE Std 1003.1-1988, the ** definition is in . X/Open added it to while retaining ** the definition in ** ** The function getopt was originally in ISO POSIX-2 moved it to ** X/Open retains it in both. */ #if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) # if __CRTL_VER >= 60200000 /* Supported starting with OpenVMS V6.2 */ int getopt (int __argc, char * const __argv[], const char *__optstring); # endif #endif /* ** We are done (for now) defining things which must always be short pointers. ** If the user has used /pointer_size=short or /pointer_size=long, we will ** allow long pointers to be used in function calls. */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 #endif #ifdef __NAMESPACE_STD namespace std { #endif /* ** ANSI Function prototypes */ __size_t fread (void *__ptr, __size_t __size, __size_t __nmemb, __FILE *__stream); __size_t fwrite (const void *__ptr, __size_t __size, __size_t __nmemb, __FILE *__stream); int fclose (__FILE *__stream); int fflush (__FILE *__stream); int fgetpos (__FILE *__stream, fpos_t *__pos); int fprintf (__FILE *__stream, const char *__format, ...); int fputs (const char *__s, __FILE *__stream); int fscanf (__FILE *__stream, const char *__format, ...); int fseek (__FILE *__stream, long int __offset, int __whence); int fsetpos (__FILE *__stream, const fpos_t *__pos); long ftell (__FILE *__stream); #ifdef __NAMESPACE_STD } /* namespace std */ #endif #if __USE_OFF64_T || defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) # if __USE_OFF64_T # pragma extern_prefix __save # pragma __extern_prefix "__off64_" __off_t fseeko (__FILE *__stream, __off_t __offset, int __whence); __off_t ftello (__FILE *__stream); # pragma __extern_prefix __restore # elif __CRTL_VER >= 70301000 __off_t fseeko (__FILE *__stream, __off_t __offset, int __whence); __off_t ftello (__FILE *__stream); # endif #endif #ifdef __NAMESPACE_STD namespace std { #endif void perror (const char *__s); int printf (const char *__format, ...); int puts (const char *__s); int remove (const char *__filename); int rename (const char *__old, const char *__new); int scanf (const char *__format, ...); int sprintf (char *__s, const char *__format, ...); int sscanf (const char *__s, const char *__format, ...); int ungetc (int __c, __FILE *__stream); int vfprintf (__FILE *__stream, const char *__format, __va_list __arg); int vprintf (const char *__format, __va_list __arg); int vsprintf (char *__s, const char *__format, __va_list __arg); __FILE_ptr32 tmpfile(void); /* ** The following function prototypes may be defined as macros */ #ifndef __NAMESPACE_STD /* ** For a C++ compilation with __NAMESPACE_STD macro defined, the functions ** below may have been already defined as inline functions. We declare them ** here only if function definitions have not been provided. */ void (clearerr) (__FILE *__stream); int (feof) (__FILE *__stream); int (ferror) (__FILE *__stream); int (getc) (__FILE *__stream); int (getchar) (void); #else #if !(__FP_OPTIMIZATIONS) void (clearerr) (__FILE *__stream); int (feof) (__FILE *__stream); int (ferror) (__FILE *__stream); int (getc) (__FILE *__stream); int (getchar) (void); #endif #endif int (fgetc) (__FILE *__stream); int (fputc) (int __c, __FILE *__stream); int (putc) (int __c, __FILE *__stream); int (putchar) (int __c); /* ** By defining __UNIX_FOPEN, a macro for fopen is defined which ensures ** that the created file does not inherit attributes from an existing ** file. To use the fopen function with optional RMS arguments, the ** caller is required to use (fopen)() to prevent macro expansion. */ #ifdef __UNIX_FOPEN __FILE_ptr32 fopen (const char *__filename, const char *__mode, ...); # define fopen(__p1,__p2) \ (fopen)(__p1,__p2,"ctx=stm","rfm=stmlf","rat=cr","mrs=0") #else # ifdef _ANSI_C_SOURCE __FILE_ptr32 fopen (const char *__filename, const char *__mode); # else __FILE_ptr32 fopen (const char *__filename, const char *__mode, ...); # endif #endif /* ** The DEC C RTL extends the ANSI standard definitions of the following ** functions. The function prototypes used in this header file differ ** when the user is compiling /standard=ansi89. */ #ifdef _ANSI_C_SOURCE __FILE_ptr32 freopen (const char *__filename, const char *__mode, __FILE *__stream); void rewind (__FILE *__stream); #else __FILE_ptr32 freopen (const char *__filename, const char *__mode, __FILE *__stream, ...); int rewind (__FILE *__stream); #endif #ifdef __NAMESPACE_STD } /* namespace std */ #endif /* ** The following functions have interfaces of XXX, _XXX32, and _XXX64 due ** to the fact that the return argument is a pointer that is relative to ** one of the arguments. */ #if __INITIAL_POINTER_SIZE == 32 #pragma __pointer_size 32 #endif #if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE) char *ctermid (char *__str); #endif #if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) char *cuserid (char *__str); #endif #ifdef __NAMESPACE_STD namespace std { #endif char *gets (char *__s); char *fgets (char *__s, int __n, __FILE *__stream); char *tmpnam (char *__s); #ifdef __NAMESPACE_STD } /* namespace std */ #endif /* ** End functions with interfaces of XXX, _XXX32, and _XXX64 ** Restore allowing long pointers to be used in function calls if ** the user has used /pointer_size=short or /pointer_size=long. */ #if __INITIAL_POINTER_SIZE #pragma __pointer_size 64 #endif #if !(defined(__DECCXX) && \ (defined(__STD_STRICT_ANSI) || defined(__STD_STRICT_ANSI_ERRORS))) /* ** The functions below are not in the ISO/IEC 9899:1990 standard (so called ** C89). They should not be visible in a C++ compilation in strict ansi mode. */ #if __CRTL_VER >= 70301000 int vfscanf (__FILE *__stream, const char *__format, __va_list __arg); int vscanf (const char *__format, __va_list __arg); int vsscanf (const char *__s, const char *__format, __va_list __arg); #endif #if __CRTL_VER >= 70312000 int snprintf(char *__s, __size_t __n, const char *__format, ...); int vsnprintf(char *__s, __size_t __n, const char *__format, __va_list __ap); #endif #endif /* C++ compilation in strict ansi mode */ #if __INITIAL_POINTER_SIZE && !defined(_ANSI_C_SOURCE) && __CRTL_VER >= 70000000 # pragma __pointer_size 32 char *_ctermid32 (char *__str); char *_cuserid32 (char *__str); char *_gets32 (char *); char *_fgets32 (char *, int, __FILE *); char *_tmpnam32 (char *); # pragma __pointer_size 64 char *_ctermid64 (char *__str); char *_cuserid64 (char *__str); char *_gets64 (char *); char *_fgets64 (char *, int, __FILE *); char *_tmpnam64 (char *); #endif /* ** ISO POSIX-1 Extensions */ #if defined(_POSIX_C_SOURCE) || !defined(_ANSI_C_SOURCE) int (fileno) (__FILE *__stream); __FILE_ptr32 fdopen(int __file_desc, const char *__mode); #endif /* ** ISO POSX-2 Extensions */ #if _POSIX_C_SOURCE >= 2 || !defined(_ANSI_C_SOURCE) && __CRTL_VER >= 70000000 __FILE_ptr32 popen(const char *__command, const char *__mode); # if __CRTL_VER >= 70301000 && defined(_VMS_WAIT) # ifdef __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __save # pragma __extern_prefix "__vms_" # else # define pclose(__p1) __vms_pclose(__p1) # endif int pclose(__FILE *__stream); # ifdef __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __restore # endif # else int pclose(__FILE *__stream); # endif #endif /* ** X/Open extensions */ #if defined(_XOPEN_SOURCE) || !defined(_ANSI_C_SOURCE) int getw (__FILE *__stream); int putw (int __integer, __FILE *__stream); # if __CRTL_VER >= 70000000 /* tempnam() was introduced in OpenVMS V7.0 */ /* ** P_tmpdir is the directory name used for tempnam(). It is defined ** by X/Open. */ # define P_tmpdir "SYS$SCRATCH:" # if __CRTL_VER >= 70301000 __char_ptr32 tempnam(const char *dir, const char *pfx, ...); # else __char_ptr32 tempnam(const char *dir, const char *pfx); # endif # endif #endif /* ** DEC C RTL extensions. This include explicit 64-bit interfaces ** to otherwise standard routines. */ #ifndef _ANSI_C_SOURCE # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif char *fgetname(__FILE *__stream, char *__buf, ...); # if __INITIAL_POINTER_SIZE && __CRTL_VER >= 70000000 # pragma __pointer_size 32 char *_fgetname32(__FILE *__stream, char *__buf, ...); # pragma __pointer_size 64 char *_fgetname64(__FILE *__stream, char *__buf, ...); # endif int DECC$RECORD_READ(__FILE *__stream, void *__buffer, int __nbytes, ...); int DECC$RECORD_WRITE(__FILE *__stream, void *__buffer, int __nbytes, ...); int decc$read (int __file_desc, void *__buffer, int __nbytes); # define decc$record_read(stream, buf, max_size) decc$read (((*(stream))->_file), (buf), (max_size)) # define decc$record_write(stream, buf, size) fwrite ((buf), (size), 1, (stream)) int fwait (__FILE *__stream); int lwait (int __file_desc); /* ** fsync is standardized by X/Open to be in */ int fsync (int __file_desc); # endif /* ** Support code for precompiled printf functions */ #if ((__DECC_VER > 50600000) && defined(_INTRINSICS)) # pragma intrinsic(printf, fprintf, sprintf) # if defined(_INLINE_INTRINSICS) && __FP_OPTIMIZATIONS static __inline int decc$__CFE_print_puts(const char *x) { return(fputs(x,stdout)); } static __inline int decc$__CFE_print_putc(int x) { putc(x,stdout); return(1); } static __inline int decc$__CFE_print_putc_nl(int x) { putc(x,stdout); putc('\n',stdout); return(2); } static __inline int decc$__CFE_fprint_puts_nl(const char *x, __FILE *f) { register int i = fputs(x,f); putc('\n',f); return(i+1); } static __inline int decc$__CFE_fprint_putc(int x, __FILE *f) { putc(x,f); return(1); } static __inline int decc$__CFE_fprint_putc_nl(int x, __FILE *f) { putc(x,f); putc('\n',f); return(2); } # else int decc$__CFE_print_puts( const char *x ); int decc$__CFE_print_putc( int x ); int decc$__CFE_print_putc_nl( int x ); int decc$__CFE_fprint_puts_nl( const char *x, __FILE *f ); int decc$__CFE_fprint_putc( int x, __FILE *f ); int decc$__CFE_fprint_putc_nl( int x, __FILE *f ); # endif #endif #if __FP_LOCKING /* ** These functions shall provide for explicit application-level locking of ** stdio ( FILE *) objects. These functions can be used by a thread to ** delineate a sequence of I/O statements that are executed as a unit. */ void flockfile(__FILE *__stream); int ftrylockfile(__FILE *__stream); void funlockfile(__FILE *__stream); /* ** Versions of the file pointer functions which are functionally ** equivalent to the original versions, with the exception that they ** are not required to be implemented in a thread-safe manner. ** They may only safely be used within a scope protected by flockfile() ** (or ftrylockfile()) and funlockfile(). */ # define clearerr_unlocked(stream) __clearerr_(stream) # define getc_unlocked(stream) __getc_(stream) # define getchar_unlocked(stream) __getchar_(stream) # define feof_unlocked(stream) __feof_(stream) # define ferror_unlocked(stream) __ferror_(stream) void (clearerr_unlocked) (__FILE *__stream); int (getc_unlocked) (__FILE *__stream); int (getchar_unlocked) (void); int (feof_unlocked) (__FILE *__stream); int (ferror_unlocked) (__FILE *__stream); # ifdef __UNIX_PUTC # define fgetc_unlocked(stream) __fgetc(stream) # define fputc_unlocked(c, stream) __fputc(c, stream) # define putc_unlocked(c,fp) __putc(c,fp) # define putchar_unlocked(c) __putchar(c) int (fgetc_unlocked) (__FILE *__stream); int (fputc_unlocked) (int __c, __FILE *__stream); int (putc_unlocked) (int __c, __FILE *__stream); int (putchar_unlocked) (int __c); # endif #endif /* X/Open file locking */ /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #pragma __standard #endif /* __STDIO_PROCESSED */ #if defined(__NAMESPACE_STD) && !defined(__NAMESPACE_STD_ONLY) # ifndef __USING_STDIO_NAMES # define __USING_STDIO_NAMES using std::FILE; using std::clearerr; using std::fclose; using std::feof; using std::ferror; using std::fflush; using std::fgetc; using std::fgetpos; using std::fgets; using std::fopen; using std::fpos_t; using std::fprintf; using std::fputc; using std::fputs; using std::fread; using std::freopen; using std::fscanf; using std::fseek; using std::fsetpos; using std::ftell; using std::fwrite; using std::getc; using std::getchar; using std::gets; using std::perror; using std::printf; using std::putc; using std::putchar; using std::puts; using std::remove; using std::rename; using std::rewind; using std::scanf; using std::setbuf; using std::setvbuf; using std::sprintf; using std::sscanf; using std::tmpfile; using std::tmpnam; using std::ungetc; using std::vfprintf; using std::vprintf; using std::vsprintf; using std::size_t; # endif #endif #endif /* __STDIO_LOADED */