C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
A-7
G.3.14 Library Functions
For each signal recognized by the signal() function, at program startup the handler
SIG_DFL is registered for the all the signals by the C runtime.
The default handling is reset if a SIGILL signal is received by a handler specified to
the signal() function.
Streams and Files
The last line of a text stream does not require a terminating newline character. The file
is written with the characters requested.
The space characters that are written out to a text stream immediately before a
newline character appear when the stream is read back in.
Zero null characters may be appended to data written to a binary stream.
The file position indicator of an append mode stream is initially positioned at the start of
the file.
A write on a text stream does not cause the associated file to be truncated beyond that
point.
Full buffering best describes the file buffering of the native C run-time.
A zero-length file can actually exist.
These are the rules for composing a valid file name:
In the Guardian environment, the file name is formed as specified by the Guardian
file-name format, which is composed of system name, volume name, subvolume
name and file name, each separated by a period(.). Except for the file name, all the
other fields can be omitted, then the default subvolume is the present working
subvolume.
In the OSS environment, the newline file name must be a valid OSS filename.
The same file can be opened simultaneously multiple times, as long as it is not for
writing.
The effect of the remove() function on an open file is that it returns a nonzero value
and does not remove the file.
If a file with a new name already exists prior to a call to the rename() function, it
returns a nonzero value without renaming the file.
The output for %p conversion in the fprintf() function formats the value of a pointer
to a void argument using the format specified by the x conversion code.
The input for %p conversion in the fscanf() function matches an unsigned
hexadecimal integer that uses the lowercase letters a through f to represent the digits
10 through 15. The corresponding obj_ptr must be a pointer to void. Consequently,
the integer is interpreted as a pointer to void.