Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (f) fopen_std_
le(3)
NAME
fopen_std_le - Opens standard input, standard output, or standard error le
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
short fopen_std_le (
short le
[,short die_on_error]
);
PARAMETERS
file Species which standard le to open: 0 indicates standard input, 1 indicates
standard output, and 2 indicates standard error.
die_on_error Indicates what occurs if there is an error when attempting to open the le. If
die_on_error is a nonzero value and an open error occurs, normal process shut-
down sequence runs, which includes writing a standard message and calling the
Guardian system procedure PROCESS_STOP_. If die_on_error parameter is
omitted or is zero, the function returns to the calling function on an error.
DESCRIPTION
The fopen_std_le() function opens the specied standard input, standard output, or standard
error le. This function is used if the standard le was not opened automatically because the
NOSTDFILES pragma was specied or because the main function was not written in the C
language.
You can call the fopen_std_le() function in Guardian modules (modules compiled for the Guar-
dian environment) within Guardian processes only.
RETURN VALUES
Upon successful completion, the value 0 (zero) is returned. Otherwise, fopen_std_le() returns
1 if the le is already open, -1 if there is a problem with a parameter, and -2 if the open failed.
The -2 is not returned if a nonzero value was passed for the die_on_error parameter.
RELATED INFORMATION
Functions: fopen(3).
STANDARDS CONFORMANCE
The fopen_std_le() function is an HP extension to the XPG4 Version 2 specication.
527192-007 Hewlett-Packard Company 247