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

leno(3) Guardian Native C Library Calls Reference Manual
NAME
leno - Maps a stream pointer to a le descriptor
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>
int leno(
FILE *stream);
PARAMETERS
stream Species the input stream.
DESCRIPTION
The leno() function returns the le descriptor of a stream.
NOTES
OSS les have le descriptors. Guardian les have le numbers. Use this function only on an
opened OSS le.
RETURN VALUES
Upon successful completion, the leno() function returns the le descriptor associated with the
stream parameter. Otherwise, the leno() function returns -1 and sets errno.
ERRORS
If the following condition occurs, the leno() function sets errno to the corresponding value.
[EINVAL] The stream is an invalid stream.
RELATED INFORMATION
Functions: clearerr(3), fdopen(3), feof(3), ferror(3), fopen(3), open(2).
STANDRDS CONFORMANCE
This function conforms to the Single UNIX Specication, Version 2, with the following excep-
tion:
The errno value [EINVAL] is returned instead of [EBADF].
224 Hewlett-Packard Company 527192-007