The include files <stdio.h> and <stdlib.h> of the C runtime system contain some functions that support both IEEE floating-point arithmetic and ASCII encoding.
The original functions (/390, EBCDIC) are mapped to the corresponding ASCII/IEEE functions when the preprocessor defines _IEEE_SOURCE
(see "Controlling the mapping of original functions to the associated IEEE variants") and _ASCII_-SOURCE
(see "Controlling the mapping of original functions to the associated ASCII variants") are both set to 1.
Names of the ASCII/IEEE functions
The syntax of the names of these ASCII/IEEE functions is as follows:
__
originalfunction_ascii_ieee()
The name of the original function should be used for originalfunction.
The ASCII/IEEE variant of printf()
, for example, is __printf_ascii_ieee()
.
C library functions for which there is an ASCII/IEEE function
There is an ASCII/IEEE variant for each of the following C library functions:
atof | ecvt | fcvt | fprintf | fscanf | gcvt |
printf | scanf | snprintf | sprintf | sscanf | srtod |
strtof | strtold | vfprintf | vfscanf | vprintf | vscanf |
vsnprintf | vsprintf | vsscanf |