Guardian C Library Calls Reference Manual

__ns_fset_file_state (supplementary)
3-132 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
When you open a file in append mode, the file-position indicator is set to the end of
the file before each write operation, regardless of previous positioning.
If you include a system name in the file name, you must precede the system name
with two backslashes instead of one because backslash is an escape character in C.
For example, to open the file \sys.$vol.svol.file, you would use the C string:
"\\sys.$vol.svol.file"
Unless you include b in the access string, the file is opened as a text file.
If the file does not already exist, __ns_fopen_special creates a C binary file if you
include b in the access string; otherwise, it creates an Edit file.
The default number of secondary extents for files created by __ns_fopen_special is
16.
The default number of maxextents for files created by __ns_fopen_special is 500.
If an error occurs, errno is set to one of the following:
EINVAL, if an invalid argument is specified.
ENOIMEM, if insufficient memory is available.
An fopen function error code, if an error occurs on the file open.
In addition to either the CLARGE or CWIDE library file, you must bind the
CNONSTOP library file into programs that use this function.
This function can only be used in the Guardian environment.
Refer to the Guardian Programmer’s Guide for complete details on fault-tolerant
programming in C.
__ns_fset_file_state (supplementary)
The __ns_fset_file_state function sets the state information for an ANSI I/O file.
stream
denotes a file opened for ANSI I/O.
file_state
points to a variable that stores the file state information.
#include <nonstoph>
long __ns_fset_file_state(
FILE *stream,
__ns_std_io_file_state *file_state);