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

tmple_guardian(3) Guardian Native C Library Calls Reference Manual
NAME
tmple_guardian - Creates a temporary le (Guardian tmple( ) function)
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>
FILE *tmple(void);
FILE *tmple_guardian(void);
DESCRIPTION
The tmple() Guardian function and tmple_guardian() function create a temporary le and
return its FILE pointer. The le is opened for update. The temporary le is automatically deleted
when the process using it terminates.
The temporary le is a type 180 C binary le, opened for ANSI I/O, and with binary update
access ("wb+").
These functions are identical in the Guardian environment. Unless otherwise noted, this refer-
ence page uses tmple() to refer to both the tmple() Guardian function and
tmple_guardian() function.
Interoperability Variants
The C run-time library supports two variants of the tmple() function: tmple_oss( ) and
tmple_guardian(). The variants support the unique le-naming conventions and structures of
the OSS and Guardian le systems, respectively.
For the TNS C runtime library only, the header le maps calls to tmple() to the variant that
matches the target compilation environment. The target environment is set with the systype
pragma.
Explicit calls to the tmple_oss() and tmple_guardian() variants in source code are only
made when the behavior of one environment is desired from the other environment.
tmple_oss() is functionally identical to the tmple() function of the OSS environment. It is the
same as setting systype oss at compile time. systype oss is the default setting for c89 in
the OSS environment.
tmple_guardian() is functionally identical to the tmple() function of the Guardian environ-
ment. It is the same as setting systype guardian at compile time. systype guardian is
the default setting for the C and C++ compilers in the Guardian environment.
To use the tmple_oss() or tmple_guardian() functions, specify the _TANDEM_SOURCE
feature test macro.
RETURN VALUES
Upon successful completion, the tmple() function returns a pointer to the stream of the le that
is created. Otherwise, it returns a null pointer, and sets errno to indicate the error.
ERRORS
If any of these conditions occurs, the tmple() function sets errno to the corresponding value:
[EMFILE] The OPEN_MAX le descriptors are currently open in the calling process.
718 Hewlett-Packard Company 527192-007