HP C/iX Library Reference Manual (30026-90004)

Chapter 4 35
HP C/iX Library Header Descriptions
Header File Contents
short subsys_num; /* subsystem number */
};
typedef union {
struct _status_work decode; /* for individual part access */
int word; /* for complete struct access */
} t_mpe_status /* for type definition */
extern t_mpe_status _mpe_status;
/******************************************************************/
if (fclose(unopened_file))
if (errno == ESYSERR)
HPERRMSG(2, , , _mpe_status.word, , , status);
else
perror(0);
To close a file, the HP C/iX library function fclose calls the system intrinsic FCLOSE. If
this intrinsic call fails, errno is set to ESYSERR, _mpe_errno is set to the value returned by
the FCHECK intrinsic, and _mpe_status is set to a value consisting of two parts. The two
parts are as follows: _mpe_status.decode.subsys_num is the file system subsystem
number (143), and _mpe_status.decode.error_num is set to the value returned by the
FCHECK intrinsic (the same as _mpe_errno).
The call to HPERRMSG as shown above writes the proper error message to the terminal
screen. If the function fclose fails for a reason other than a failing intrinsic, the C/iX
library function perror supplies the appropriate messages.
File Control <fcntl.h>
The header <fcntl.h> defines arguments to the open function. The macros define
constant values for file access options. See the open function in chapter 5 for more detailed
information.
NOTE
This header file is not defined by the ANSI C standard. Programs using this
header are likely to be less portable.
Floating Types <float.h>
The header <float.h> defines macros that specify the characteristics of floating-point
types. The following macros are defined in this header file:
Table 4-2. Floating Types <float.h>
Name Description
FLT_RADIX Radix of exponent representation.
FLT_MANT_DIG,
DBL_MANT_DIG,
LDBL_MANT_DIG
Number of base-2 digits in the floating-point significand,
p
.