Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-37
fdopen (supplementary)
fdopen (supplementary)
The fdopen function opens a file for ANSI I/O that was opened for alternate I/O.
file_des
is the descriptor denoting a file opened for alternate I/O.
access
points to a string that specifies how you want to access the new file. Refer to
“fopen” on page 3-48 for the possible values of *access.
Return Value
is a pointer to FILE if the operation is successful; otherwise, fdopen returns the
pointer value NULL.
Usage Guidelines
If *access is incompatible with the type of access that the file had on entry to
fdopen, then fdopen returns the pointer value NULL, which indicates failure.
#include <stdioh>
FILE *fdopen(int file_des, char *access);