The header files for the C programming interface are supplied with two separate products:
The headers for POSIX functions are supplied as POSIX HEADER components with the POSIX-BC product, and the headers for BS2000 functions are supplied with CRTE (see table on "System requirements").
Headers may be included, i.e. copied into a program at compilation by means of an #include
preprocessor directive. A detailed description on how this is accomplished can be found in the C and C++ User Guides.
Headers contain declarations or definitions for the following:
functions or corresponding macros
external variables
symbolic constants and data types
Header files contain external "C"
declarations for all functions and data. This allows C library functions to be called from C++ sources.
In the POSIX subsystem, header files are located in the standard directories/usr/include
and /usr/include/sys
.
In BS2000, header files are stored as PLAM library members (of type S) in the libraries $.SYSLIB.CRTE
(for BS2000 functions) and $.SYSLIB.POSIX-HEADER
(for POSIX functions).
The compiler will accept include
statements in which the names of header elements contain slashes (/) for directories even if PLAM library elements are involved. Each slash in the name of a user-defined or standard header is internally converted to a period (.) for the purpose of searching PLAM libraries.
Consequently, when porting source programs from POSIX or UNIX to BS2000, for example, the slashes need not be converted to periods.
Similarly, periods need not be converted to slashes in source programs which are copied from the BS2000 environment to the POSIX subsystem. This applies only to the standard header elements, however, not to the user-defined headers.
Header file iso646.h
The header file iso646.h
contains the following 11 macros that are expanded to the symbols to the right of the macro and that therefore represent alternative ways of writing the operators:
and | && | compl | ~ | or_eq | |= |
and_eq | &= | not | ! | xor | ^ |
bitand | & | not_eq | != | xor_eq | ^= |
bitor | | | or | | | |