C/C++ Programmer's Guide (G06.25+)

Using the C Run-Time Library
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
4-2
Input/Output Models
Complete semantics and syntax of functions and macros in each version of the C run-
time library are documented in the following manuals:
Input/Output Models
The C run-time library provides direct input and output access to several types of
physical files:
C disk files, which are odd-unstructured files and have a file code of 180
EDIT disk files, which have a file code of 101
Processes
Terminals
To provide uniform access to these various types of physical files, the C run-time
library uses two logical file types, binary and text, to characterize and interpret the data
found in a given file.
In addition, the C run-time library provides two sets of input and output functions. Each
set has its own method of tracking, maintaining, and referring to a file. These methods,
called file-reference models, are the ANSI model, which uses FILE pointers to identify
files, and the alternate model, which uses file descriptors for this purpose. The ANSI
model is the same for the Guardian and OSS environments. For TNS C, the alternate
model is different between the Guardian and OSS environments. In the Guardian TNS
environment, the alternate model is an HP extension to the ISO/ANSI C standard. The
OSS TNS environment, however, and in both the OSS and Guardian native
environments use the model based on the XPG4 specification. (The Guardian native
environment permits access to the alternate model.)
The discussion presented later in this section describes the alternate model defined by
HP for the Guardian TNS environment. For details on the alternate model in both the
OSS TNS and OSS native environments and in the Guardian native environment, refer
to the reference pages for the alternate model I/O functions or an appropriate edition of
the Open System Services Library Calls Reference Manual.
If no combination of file-reference model and logical file type provides the I/O services
you require, you can call Guardian system procedures directly to perform specialized
I/O functions. To find out how to access these procedures, see Section 3, Interfacing to
Guardian Procedures and OSS Functions.
Version Manual
Guardian TNS C run-time library Guardian TNS C Library Calls Reference Manual
OSS TNS C G-series run-time
library
D30 edition of the Open System Services Library Calls
Reference Manual
Guardian native C run-time
libraries
Guardian Native C Library Calls Reference Manual
OSS native C run-time libraries Open System Services Library Calls Reference Manual