C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-10
ANSISTREAMS
ANSISTREAMS
The ANSISTREAMS pragma specifies that Guardian files created by the program,
including the standard files (standard input, standard output, and standard error), are
odd-unstructured disk files with a file code of 180. The maximum length of a line for
type 180 files is the maximum size of a file. If this pragma is not asserted, files are
EDIT files with a file code of 101.
This pragma enables the compiler to conform to the ISO/ANSI C standard that requires
that the compiler support text files with lines containing at least 254 characters
including the terminating new-line character.
The pragma default settings are:
Usage Guidelines
•
The ANSISTREAMS pragma is a command-line directive that can be entered only
on the compiler RUN command line. With the c89 utility, ANSISTREAMS can be
specified with the -Wansistreams flag.
•
A text file opened with the ANSISTREAMS pragma in effect cannot be manipulated
with the edfseek(), edftell(), or edlseek() functions.
•
Without the ANSISTREAMS pragma, a text line can contain as many as 239
characters.
•
The ANSISTREAMS pragma does not affect I/O performed by Guardian
procedures.
ANSISTREAMS
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set ANSISTREAMS
G-series TNS c89 utility ANSISTREAMS ANSISTREAMS
TNS/R native C and C++ compilers Not set ANSISTREAMS
Native c89 utility ANSISTREAMS ANSISTREAMS
TNS/E native C and C++ compilers Not set ANSISTREAMS