HP C/iX Library Reference Manual (30026-90004)

Chapter 4 45
HP C/iX Library Header Descriptions
Header File Contents
Input/Output <stdio.h>
The header <stdio.h> defines a structure, functions, and macros that are used for input
and output.
The following identifiers are defined in <stdio.h>:
offsetof(
type,
identifier
)
macro Expands to an integral constant that has type size_t, the
value of which is the offset in bytes, from the beginning of
a structure designated by
type
, of the member designated
by
identifier
.
ptrdiff_t type definition The signed integral type of subtracting two pointers.
size_t type definition The unsigned integral type of the sizeof operator.
wchar_t type definition The integral data type large enough to represent all
members of the largest extended character set among the
supported locales.
Table 4-13. Input/Output <stdio.h>
Name Type Description
BUFSIZ macro Specifies the size of the buffers used by setbuf.
clearerr() macro, function Clears the end-of-file and error indicator of a stream.
ctermid()
a
function Returns $stdlist as the file name for the terminal.
EOF macro Returned upon end-of-file or upon error by most integer
functions that deal with streams.
fclose() function Closes an open file.
fdopen() function Opens a stream on a file descriptor.
feof() macro, function Tests whether the end-of-file indicator for a stream has been
set.
ferror() macro, function Tests whether the error indicator for a stream has been set.
fflush() function Flushes an I/O buffer to a file.
fgetc() function Returns the next character from an open stream.
fgetpos() function Returns the current file position of an open stream.
fgets() function Reads a string from an open stream.
FILE type definition A type definition for a file descriptor. This type defines a
data structure used internally by the I/O routines to identify
open files and maintain context when accessing files.
Table 4-12. Common Definitions <stddef.h>
Name Type Description