<!--page 6 -->
<li><a href="#7.26.10"> 7.26.10 General utilities <stdlib.h></a>
<li><a href="#7.26.11"> 7.26.11 String handling <string.h></a>
-<li><a href="#7.26.12"> 7.26.12 Extended multibyte and wide character utilities <wchar.h></a>
-<li><a href="#7.26.13"> 7.26.13 Wide character classification and mapping utilities <wctype.h></a>
+<li><a href="#7.26.12"> 7.26.12 Extended multibyte and wide character utilities <wchar.h></a>
+<li><a href="#7.26.13"> 7.26.13 Wide character classification and mapping utilities <wctype.h></a>
</ul>
</ul>
<li><a href="#A">Annex A (informative) Language syntax summary</a>
specified in <a href="#7.18"><stdint.h></a>.
<p><b> Forward references</b>: integer types <a href="#7.18"><stdint.h></a> (<a href="#7.18">7.18</a>).
-<h5><a name="5.2.4.2.1" href="#5.2.4.2.1">5.2.4.2.1 Sizes of integer types <limits.h></a></h5>
+<h5><a name="5.2.4.2.1" href="#5.2.4.2.1">5.2.4.2.1 Sizes of integer types <limits.h></a></h5>
<p><!--para 1 -->
The values given below shall be replaced by constant expressions suitable for use in #if
preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, the
<p><small><a name="note15" href="#note15">15)</a> See <a href="#6.2.5">6.2.5</a>.
</small>
-<h5><a name="5.2.4.2.2" href="#5.2.4.2.2">5.2.4.2.2 Characteristics of floating types <float.h></a></h5>
+<h5><a name="5.2.4.2.2" href="#5.2.4.2.2">5.2.4.2.2 Characteristics of floating types <float.h></a></h5>
<p><!--para 1 -->
The characteristics of floating types are defined in terms of a model that describes a
representation of floating-point numbers and values that provide information about an
<p><small><a name="note164" href="#note164">164)</a> Thus, a signal handler cannot, in general, call standard library functions.
</small>
-<h3><a name="7.2" href="#7.2">7.2 Diagnostics <assert.h></a></h3>
+<h3><a name="7.2" href="#7.2">7.2 Diagnostics <assert.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.2"><assert.h></a> defines the assert macro and refers to another macro,
<pre>
Assertion failed: expression, function abc, file xyz, line nnn.
</small>
-<h3><a name="7.3" href="#7.3">7.3 Complex arithmetic <complex.h></a></h3>
+<h3><a name="7.3" href="#7.3">7.3 Complex arithmetic <complex.h></a></h3>
<h4><a name="7.3.1" href="#7.3.1">7.3.1 Introduction</a></h4>
<p><!--para 1 -->
<p><small><a name="note171" href="#note171">171)</a> For a variable z of complex type, z == creal(z) + cimag(z)*I.
</small>
-<h3><a name="7.4" href="#7.4">7.4 Character handling <ctype.h></a></h3>
+<h3><a name="7.4" href="#7.4">7.4 Character handling <ctype.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.4"><ctype.h></a> declares several functions useful for classifying and mapping
characters.<sup><a href="#note172"><b>172)</b></a></sup> In all cases the argument is an int, the value of which shall be
for any given locale); otherwise, the argument is returned unchanged.
<!--page 198 -->
-<h3><a name="7.5" href="#7.5">7.5 Errors <errno.h></a></h3>
+<h3><a name="7.5" href="#7.5">7.5 Errors <errno.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.5"><errno.h></a> defines several macros, all relating to the reporting of error
conditions.
<p><small><a name="note177" href="#note177">177)</a> See ''future library directions'' (<a href="#7.26.3">7.26.3</a>).
</small>
-<h3><a name="7.6" href="#7.6">7.6 Floating-point environment <fenv.h></a></h3>
+<h3><a name="7.6" href="#7.6">7.6 Floating-point environment <fenv.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.6"><fenv.h></a> declares two types and several macros and functions to provide
access to the floating-point environment. The floating-point environment refers
}
</pre>
-<h3><a name="7.7" href="#7.7">7.7 Characteristics of floating types <float.h></a></h3>
+<h3><a name="7.7" href="#7.7">7.7 Characteristics of floating types <float.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.7"><float.h></a> defines several macros that expand to various limits and
parameters of the standard floating-point types.
in <a href="#5.2.4.2.2">5.2.4.2.2</a>.
<!--page 210 -->
-<h3><a name="7.8" href="#7.8">7.8 Format conversion of integer types <inttypes.h></a></h3>
+<h3><a name="7.8" href="#7.8">7.8 Format conversion of integer types <inttypes.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.8"><inttypes.h></a> includes the header <a href="#7.18"><stdint.h></a> and extends it with
additional facilities provided by hosted implementations.
(<a href="#7.24.4.1.2">7.24.4.1.2</a>).
<!--page 214 -->
-<h3><a name="7.9" href="#7.9">7.9 Alternative spellings <iso646.h></a></h3>
+<h3><a name="7.9" href="#7.9">7.9 Alternative spellings <iso646.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.9"><iso646.h></a> defines the following eleven macros (on the left) that expand
to the corresponding tokens (on the right):
xor_eq ^=
</pre>
-<h3><a name="7.10" href="#7.10">7.10 Sizes of integer types <limits.h></a></h3>
+<h3><a name="7.10" href="#7.10">7.10 Sizes of integer types <limits.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.10"><limits.h></a> defines several macros that expand to various limits and
parameters of the standard integer types.
in <a href="#5.2.4.2.1">5.2.4.2.1</a>.
<!--page 216 -->
-<h3><a name="7.11" href="#7.11">7.11 Localization <locale.h></a></h3>
+<h3><a name="7.11" href="#7.11">7.11 Localization <locale.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.11"><locale.h></a> declares two functions, one type, and defines several macros.
<p><!--para 2 -->
</pre>
<!--page 224 -->
-<h3><a name="7.12" href="#7.12">7.12 Mathematics <math.h></a></h3>
+<h3><a name="7.12" href="#7.12">7.12 Mathematics <math.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.12"><math.h></a> declares two types and many mathematical functions and defines
several macros. Most synopses specify a family of functions consisting of a principal
The isunordered macro returns 1 if its arguments are unordered and 0 otherwise.
<!--page 255 -->
-<h3><a name="7.13" href="#7.13">7.13 Nonlocal jumps <setjmp.h></a></h3>
+<h3><a name="7.13" href="#7.13">7.13 Nonlocal jumps <setjmp.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.13"><setjmp.h></a> defines the macro setjmp, and declares one function and
one type, for bypassing the normal function call and return discipline.<sup><a href="#note216"><b>216)</b></a></sup>
<p><small><a name="note218" href="#note218">218)</a> This includes, but is not limited to, the floating-point status flags and the state of open files.
</small>
-<h3><a name="7.14" href="#7.14">7.14 Signal handling <signal.h></a></h3>
+<h3><a name="7.14" href="#7.14">7.14 Signal handling <signal.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.14"><signal.h></a> declares a type and two functions and defines several macros,
for handling various signals (conditions that may be reported during program execution).
The raise function returns zero if successful, nonzero if unsuccessful.
<!--page 261 -->
-<h3><a name="7.15" href="#7.15">7.15 Variable arguments <stdarg.h></a></h3>
+<h3><a name="7.15" href="#7.15">7.15 Variable arguments <stdarg.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.15"><stdarg.h></a> declares a type and defines four macros, for advancing
through a list of arguments whose number and types are not known to the called function
}
</pre>
-<h3><a name="7.16" href="#7.16">7.16 Boolean type and values <stdbool.h></a></h3>
+<h3><a name="7.16" href="#7.16">7.16 Boolean type and values <stdbool.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.16"><stdbool.h></a> defines four macros.
<p><!--para 2 -->
<p><small><a name="note222" href="#note222">222)</a> See ''future library directions'' (<a href="#7.26.7">7.26.7</a>).
</small>
-<h3><a name="7.17" href="#7.17">7.17 Common definitions <stddef.h></a></h3>
+<h3><a name="7.17" href="#7.17">7.17 Common definitions <stddef.h></a></h3>
<p><!--para 1 -->
The following types and macros are defined in the standard header <a href="#7.17"><stddef.h></a>. Some
are also defined in other headers, as noted in their respective subclauses.
<p><b> Forward references</b>: localization (<a href="#7.11">7.11</a>).
<!--page 267 -->
-<h3><a name="7.18" href="#7.18">7.18 Integer types <stdint.h></a></h3>
+<h3><a name="7.18" href="#7.18">7.18 Integer types <stdint.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.18"><stdint.h></a> declares sets of integer types having specified widths, and
defines corresponding sets of macros.<sup><a href="#note223"><b>223)</b></a></sup> It also defines macros that specify limits of
UINTMAX_C(value)
</pre>
-<h3><a name="7.19" href="#7.19">7.19 Input/output <stdio.h></a></h3>
+<h3><a name="7.19" href="#7.19">7.19 Input/output <stdio.h></a></h3>
<h4><a name="7.19.1" href="#7.19.1">7.19.1 Introduction</a></h4>
<p><!--para 1 -->
<p><b> Forward references</b>: the strerror function (<a href="#7.21.6.2">7.21.6.2</a>).
<!--page 318 -->
-<h3><a name="7.20" href="#7.20">7.20 General utilities <stdlib.h></a></h3>
+<h3><a name="7.20" href="#7.20">7.20 General utilities <stdlib.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.20"><stdlib.h></a> declares five types and several functions of general utility, and
defines several macros.<sup><a href="#note257"><b>257)</b></a></sup>
any.<sup><a href="#note267"><b>267)</b></a></sup>
<!--page 337 -->
-<h3><a name="7.21" href="#7.21">7.21 String handling <string.h></a></h3>
+<h3><a name="7.21" href="#7.21">7.21 String handling <string.h></a></h3>
<h4><a name="7.21.1" href="#7.21.1">7.21.1 String function conventions</a></h4>
<p><!--para 1 -->
character.
<!--page 347 -->
-<h3><a name="7.22" href="#7.22">7.22 Type-generic math <tgmath.h></a></h3>
+<h3><a name="7.22" href="#7.22">7.22 Type-generic math <tgmath.h></a></h3>
<p><!--para 1 -->
The header <a href="#7.22"><tgmath.h></a> includes the headers <a href="#7.12"><math.h></a> and <a href="#7.3"><complex.h></a> and
defines several type-generic macros.
the behavior is undefined.
</small>
-<h3><a name="7.23" href="#7.23">7.23 Date and time <time.h></a></h3>
+<h3><a name="7.23" href="#7.23">7.23 Date and time <time.h></a></h3>
<h4><a name="7.23.1" href="#7.23.1">7.23.1 Components of time</a></h4>
<p><!--para 1 -->
zero is returned and the contents of the array are indeterminate.
<!--page 360 -->
-<h3><a name="7.24" href="#7.24">7.24 Extended multibyte and wide character utilities <wchar.h></a></h3>
+<h3><a name="7.24" href="#7.24">7.24 Extended multibyte and wide character utilities <wchar.h></a></h3>
<h4><a name="7.24.1" href="#7.24.1">7.24.1 Introduction</a></h4>
<p><!--para 1 -->
include those necessary to reach the initial shift state immediately before the null byte.
</small>
-<h3><a name="7.25" href="#7.25">7.25 Wide character classification and mapping utilities <wctype.h></a></h3>
+<h3><a name="7.25" href="#7.25">7.25 Wide character classification and mapping utilities <wctype.h></a></h3>
<h4><a name="7.25.1" href="#7.25.1">7.25.1 Introduction</a></h4>
<p><!--para 1 -->
The following names are grouped under individual headers for convenience. All external
names described below are reserved no matter what headers are included by the program.
-<h4><a name="7.26.1" href="#7.26.1">7.26.1 Complex arithmetic <complex.h></a></h4>
+<h4><a name="7.26.1" href="#7.26.1">7.26.1 Complex arithmetic <complex.h></a></h4>
<p><!--para 1 -->
The function names
<pre>
and the same names suffixed with f or l may be added to the declarations in the
<a href="#7.3"><complex.h></a> header.
-<h4><a name="7.26.2" href="#7.26.2">7.26.2 Character handling <ctype.h></a></h4>
+<h4><a name="7.26.2" href="#7.26.2">7.26.2 Character handling <ctype.h></a></h4>
<p><!--para 1 -->
Function names that begin with either is or to, and a lowercase letter may be added to
the declarations in the <a href="#7.4"><ctype.h></a> header.
-<h4><a name="7.26.3" href="#7.26.3">7.26.3 Errors <errno.h></a></h4>
+<h4><a name="7.26.3" href="#7.26.3">7.26.3 Errors <errno.h></a></h4>
<p><!--para 1 -->
Macros that begin with E and a digit or E and an uppercase letter may be added to the
declarations in the <a href="#7.5"><errno.h></a> header.
-<h4><a name="7.26.4" href="#7.26.4">7.26.4 Format conversion of integer types <inttypes.h></a></h4>
+<h4><a name="7.26.4" href="#7.26.4">7.26.4 Format conversion of integer types <inttypes.h></a></h4>
<p><!--para 1 -->
Macro names beginning with PRI or SCN followed by any lowercase letter or X may be
added to the macros defined in the <a href="#7.8"><inttypes.h></a> header.
-<h4><a name="7.26.5" href="#7.26.5">7.26.5 Localization <locale.h></a></h4>
+<h4><a name="7.26.5" href="#7.26.5">7.26.5 Localization <locale.h></a></h4>
<p><!--para 1 -->
Macros that begin with LC_ and an uppercase letter may be added to the definitions in
the <a href="#7.11"><locale.h></a> header.
-<h4><a name="7.26.6" href="#7.26.6">7.26.6 Signal handling <signal.h></a></h4>
+<h4><a name="7.26.6" href="#7.26.6">7.26.6 Signal handling <signal.h></a></h4>
<p><!--para 1 -->
Macros that begin with either SIG and an uppercase letter or SIG_ and an uppercase
letter may be added to the definitions in the <a href="#7.14"><signal.h></a> header.
-<h4><a name="7.26.7" href="#7.26.7">7.26.7 Boolean type and values <stdbool.h></a></h4>
+<h4><a name="7.26.7" href="#7.26.7">7.26.7 Boolean type and values <stdbool.h></a></h4>
<p><!--para 1 -->
The ability to undefine and perhaps then redefine the macros bool, true, and false is
an obsolescent feature.
-<h4><a name="7.26.8" href="#7.26.8">7.26.8 Integer types <stdint.h></a></h4>
+<h4><a name="7.26.8" href="#7.26.8">7.26.8 Integer types <stdint.h></a></h4>
<p><!--para 1 -->
Typedef names beginning with int or uint and ending with _t may be added to the
types defined in the <a href="#7.18"><stdint.h></a> header. Macro names beginning with INT or UINT
<a href="#7.18"><stdint.h></a> header.
<!--page 414 -->
-<h4><a name="7.26.9" href="#7.26.9">7.26.9 Input/output <stdio.h></a></h4>
+<h4><a name="7.26.9" href="#7.26.9">7.26.9 Input/output <stdio.h></a></h4>
<p><!--para 1 -->
Lowercase letters may be added to the conversion specifiers and length modifiers in
fprintf and fscanf. Other characters may be used in extensions.
The use of ungetc on a binary stream where the file position indicator is zero prior to
the call is an obsolescent feature.
-<h4><a name="7.26.10" href="#7.26.10">7.26.10 General utilities <stdlib.h></a></h4>
+<h4><a name="7.26.10" href="#7.26.10">7.26.10 General utilities <stdlib.h></a></h4>
<p><!--para 1 -->
Function names that begin with str and a lowercase letter may be added to the
declarations in the <a href="#7.20"><stdlib.h></a> header.
-<h4><a name="7.26.11" href="#7.26.11">7.26.11 String handling <string.h></a></h4>
+<h4><a name="7.26.11" href="#7.26.11">7.26.11 String handling <string.h></a></h4>
<p><!--para 1 -->
Function names that begin with str, mem, or wcs and a lowercase letter may be added
to the declarations in the <a href="#7.21"><string.h></a> header.
-<h4><a name="7.26.12" href="#7.26.12">7.26.12 Extended multibyte and wide character utilities <wchar.h></a></h4>
+<h4><a name="7.26.12" href="#7.26.12">7.26.12 Extended multibyte and wide character utilities <wchar.h></a></h4>
<p><!--para 1 -->
Function names that begin with wcs and a lowercase letter may be added to the
declarations in the <a href="#7.24"><wchar.h></a> header.
Library summary
</pre>
-<h3><a name="B.1" href="#B.1">B.1 Diagnostics <assert.h></a></h3>
+<h3><a name="B.1" href="#B.1">B.1 Diagnostics <assert.h></a></h3>
<pre>
NDEBUG
void assert(scalar expression);
</pre>
-<h3><a name="B.2" href="#B.2">B.2 Complex <complex.h></a></h3>
+<h3><a name="B.2" href="#B.2">B.2 Complex <complex.h></a></h3>
<!--page 432 -->
<!--page 433 -->
<pre>
long double creall(long double complex z);
</pre>
-<h3><a name="B.3" href="#B.3">B.3 Character handling <ctype.h></a></h3>
+<h3><a name="B.3" href="#B.3">B.3 Character handling <ctype.h></a></h3>
<pre>
int isalnum(int c);
int isalpha(int c);
int toupper(int c);
</pre>
-<h3><a name="B.4" href="#B.4">B.4 Errors <errno.h></a></h3>
+<h3><a name="B.4" href="#B.4">B.4 Errors <errno.h></a></h3>
<pre>
EDOM EILSEQ ERANGE errno
</pre>
-<h3><a name="B.5" href="#B.5">B.5 Floating-point environment <fenv.h></a></h3>
+<h3><a name="B.5" href="#B.5">B.5 Floating-point environment <fenv.h></a></h3>
<!--page 434 -->
<pre>
fenv_t FE_OVERFLOW FE_TOWARDZERO
int feupdateenv(const fenv_t *envp);
</pre>
-<h3><a name="B.6" href="#B.6">B.6 Characteristics of floating types <float.h></a></h3>
+<h3><a name="B.6" href="#B.6">B.6 Characteristics of floating types <float.h></a></h3>
<pre>
FLT_ROUNDS DBL_MIN_EXP FLT_MAX
FLT_EVAL_METHOD LDBL_MIN_EXP DBL_MAX
FLT_MIN_EXP LDBL_MAX_10_EXP
</pre>
-<h3><a name="B.7" href="#B.7">B.7 Format conversion of integer types <inttypes.h></a></h3>
+<h3><a name="B.7" href="#B.7">B.7 Format conversion of integer types <inttypes.h></a></h3>
<!--page 435 -->
<pre>
imaxdiv_t
wchar_t ** restrict endptr, int base);
</pre>
-<h3><a name="B.8" href="#B.8">B.8 Alternative spellings <iso646.h></a></h3>
+<h3><a name="B.8" href="#B.8">B.8 Alternative spellings <iso646.h></a></h3>
<pre>
and bitor not_eq xor
and_eq compl or xor_eq
bitand not or_eq
</pre>
-<h3><a name="B.9" href="#B.9">B.9 Sizes of integer types <limits.h></a></h3>
+<h3><a name="B.9" href="#B.9">B.9 Sizes of integer types <limits.h></a></h3>
<pre>
CHAR_BIT CHAR_MAX INT_MIN ULONG_MAX
SCHAR_MIN MB_LEN_MAX INT_MAX LLONG_MIN
CHAR_MIN USHRT_MAX LONG_MAX
</pre>
-<h3><a name="B.10" href="#B.10">B.10 Localization <locale.h></a></h3>
+<h3><a name="B.10" href="#B.10">B.10 Localization <locale.h></a></h3>
<pre>
struct lconv LC_ALL LC_CTYPE LC_NUMERIC
NULL LC_COLLATE LC_MONETARY LC_TIME
struct lconv *localeconv(void);
</pre>
-<h3><a name="B.11" href="#B.11">B.11 Mathematics <math.h></a></h3>
+<h3><a name="B.11" href="#B.11">B.11 Mathematics <math.h></a></h3>
<!--page 436 -->
<!--page 437 -->
<!--page 438 -->
int isunordered(real-floating x, real-floating y);
</pre>
-<h3><a name="B.12" href="#B.12">B.12 Nonlocal jumps <setjmp.h></a></h3>
+<h3><a name="B.12" href="#B.12">B.12 Nonlocal jumps <setjmp.h></a></h3>
<pre>
jmp_buf
int setjmp(jmp_buf env);
void longjmp(jmp_buf env, int val);
</pre>
-<h3><a name="B.13" href="#B.13">B.13 Signal handling <signal.h></a></h3>
+<h3><a name="B.13" href="#B.13">B.13 Signal handling <signal.h></a></h3>
<pre>
sig_atomic_t SIG_IGN SIGILL SIGTERM
SIG_DFL SIGABRT SIGINT
int raise(int sig);
</pre>
-<h3><a name="B.14" href="#B.14">B.14 Variable arguments <stdarg.h></a></h3>
+<h3><a name="B.14" href="#B.14">B.14 Variable arguments <stdarg.h></a></h3>
<pre>
va_list
type va_arg(va_list ap, type);
void va_start(va_list ap, parmN);
</pre>
-<h3><a name="B.15" href="#B.15">B.15 Boolean type and values <stdbool.h></a></h3>
+<h3><a name="B.15" href="#B.15">B.15 Boolean type and values <stdbool.h></a></h3>
<!--page 441 -->
<pre>
bool
__bool_true_false_are_defined
</pre>
-<h3><a name="B.16" href="#B.16">B.16 Common definitions <stddef.h></a></h3>
+<h3><a name="B.16" href="#B.16">B.16 Common definitions <stddef.h></a></h3>
<pre>
ptrdiff_t size_t wchar_t NULL
offsetof(type, member-designator)
</pre>
-<h3><a name="B.17" href="#B.17">B.17 Integer types <stdint.h></a></h3>
+<h3><a name="B.17" href="#B.17">B.17 Integer types <stdint.h></a></h3>
<pre>
intN_t INT_LEASTN_MIN PTRDIFF_MAX
uintN_t INT_LEASTN_MAX SIG_ATOMIC_MIN
UINTN_MAX PTRDIFF_MIN
</pre>
-<h3><a name="B.18" href="#B.18">B.18 Input/output <stdio.h></a></h3>
+<h3><a name="B.18" href="#B.18">B.18 Input/output <stdio.h></a></h3>
<!--page 442 -->
<!--page 443 -->
<pre>
void perror(const char *s);
</pre>
-<h3><a name="B.19" href="#B.19">B.19 General utilities <stdlib.h></a></h3>
+<h3><a name="B.19" href="#B.19">B.19 General utilities <stdlib.h></a></h3>
<!--page 444 -->
<!--page 445 -->
<pre>
const wchar_t * restrict pwcs, size_t n);
</pre>
-<h3><a name="B.20" href="#B.20">B.20 String handling <string.h></a></h3>
+<h3><a name="B.20" href="#B.20">B.20 String handling <string.h></a></h3>
<!--page 446 -->
<pre>
size_t
size_t strlen(const char *s);
</pre>
-<h3><a name="B.21" href="#B.21">B.21 Type-generic math <tgmath.h></a></h3>
+<h3><a name="B.21" href="#B.21">B.21 Type-generic math <tgmath.h></a></h3>
<pre>
acos sqrt fmod nextafter
asin fabs frexp nexttoward
pow fmin nearbyint creal
</pre>
-<h3><a name="B.22" href="#B.22">B.22 Date and time <time.h></a></h3>
+<h3><a name="B.22" href="#B.22">B.22 Date and time <time.h></a></h3>
<!--page 447 -->
<pre>
NULL size_t time_t
const struct tm * restrict timeptr);
</pre>
-<h3><a name="B.23" href="#B.23">B.23 Extended multibyte/wide character utilities <wchar.h></a></h3>
+<h3><a name="B.23" href="#B.23">B.23 Extended multibyte/wide character utilities <wchar.h></a></h3>
<!--page 448 -->
<!--page 449 -->
<pre>
mbstate_t * restrict ps);
</pre>
-<h3><a name="B.24" href="#B.24">B.24 Wide character classification and mapping utilities <wctype.h></a></h3>
+<h3><a name="B.24" href="#B.24">B.24 Wide character classification and mapping utilities <wctype.h></a></h3>
<!--page 450 -->
<!--page 451 -->
<pre>
This table is reproduced unchanged from ISO/IEC TR 10176:1998, produced by ISO/IEC
JTC 1/SC 22/WG 20, except for the omission of ranges that are part of the basic character
sets.
- Latin: 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217,
-<pre>
+<table border=1>
+<tr><td> Latin: <td> 00AA, 00BA, 00C0-00D6, 00D8-00F6, 00F8-01F5, 01FA-0217,
0250-02A8, 1E00-1E9B, 1EA0-1EF9, 207F
-</pre>
- Greek: 0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6,
-<pre>
+<tr><td> Greek: <td> 0386, 0388-038A, 038C, 038E-03A1, 03A3-03CE, 03D0-03D6,
03DA, 03DC, 03DE, 03E0, 03E2-03F3, 1F00-1F15, 1F18-1F1D,
1F20-1F45, 1F48-1F4D, 1F50-1F57, 1F59, 1F5B, 1F5D,
1F5F-1F7D, 1F80-1FB4, 1FB6-1FBC, 1FC2-1FC4, 1FC6-1FCC,
1FD0-1FD3, 1FD6-1FDB, 1FE0-1FEC, 1FF2-1FF4, 1FF6-1FFC
-</pre>
- Cyrillic: 0401-040C, 040E-044F, 0451-045C, 045E-0481, 0490-04C4,
-<pre>
+<tr><td> Cyrillic: <td> 0401-040C, 040E-044F, 0451-045C, 045E-0481, 0490-04C4,
04C7-04C8, 04CB-04CC, 04D0-04EB, 04EE-04F5, 04F8-04F9
-</pre>
- Armenian: 0531-0556, 0561-0587
- Hebrew: 05B0-05B9, 05BB-05BD, 05BF, 05C1-05C2, 05D0-05EA,
-<pre>
+<tr><td> Armenian: <td> 0531-0556, 0561-0587
+<tr><td> Hebrew: <td> 05B0-05B9, 05BB-05BD, 05BF, 05C1-05C2, 05D0-05EA,
05F0-05F2
-</pre>
- Arabic: 0621-063A, 0640-0652, 0670-06B7, 06BA-06BE, 06C0-06CE,
-<pre>
+<tr><td> Arabic: <td> 0621-063A, 0640-0652, 0670-06B7, 06BA-06BE, 06C0-06CE,
06D0-06DC, 06E5-06E8, 06EA-06ED
-</pre>
- Devanagari: 0901-0903, 0905-0939, 093E-094D, 0950-0952, 0958-0963
- Bengali: 0981-0983, 0985-098C, 098F-0990, 0993-09A8, 09AA-09B0,
-<pre>
+<tr><td> Devanagari:<td> 0901-0903, 0905-0939, 093E-094D, 0950-0952, 0958-0963
+<tr><td> Bengali: <td> 0981-0983, 0985-098C, 098F-0990, 0993-09A8, 09AA-09B0,
09B2, 09B6-09B9, 09BE-09C4, 09C7-09C8, 09CB-09CD,
09DC-09DD, 09DF-09E3, 09F0-09F1
-</pre>
- Gurmukhi: 0A02, 0A05-0A0A, 0A0F-0A10, 0A13-0A28, 0A2A-0A30,
-<pre>
+<tr><td> Gurmukhi: <td> 0A02, 0A05-0A0A, 0A0F-0A10, 0A13-0A28, 0A2A-0A30,
0A32-0A33, 0A35-0A36, 0A38-0A39, 0A3E-0A42, 0A47-0A48,
0A4B-0A4D, 0A59-0A5C, 0A5E, 0A74
-</pre>
- Gujarati: 0A81-0A83, 0A85-0A8B, 0A8D, 0A8F-0A91, 0A93-0AA8,
-<pre>
+<tr><td> Gujarati: <td> 0A81-0A83, 0A85-0A8B, 0A8D, 0A8F-0A91, 0A93-0AA8,
0AAA-0AB0, 0AB2-0AB3, 0AB5-0AB9, 0ABD-0AC5,
0AC7-0AC9, 0ACB-0ACD, 0AD0, 0AE0
-</pre>
- Oriya: 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30,
+<tr><td> Oriya: <td> 0B01-0B03, 0B05-0B0C, 0B0F-0B10, 0B13-0B28, 0B2A-0B30,
<!--page 453 -->
-<pre>
0B32-0B33, 0B36-0B39, 0B3E-0B43, 0B47-0B48, 0B4B-0B4D,
0B5C-0B5D, 0B5F-0B61
-</pre>
- Tamil: 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A,
-<pre>
+<tr><td> Tamil: <td> 0B82-0B83, 0B85-0B8A, 0B8E-0B90, 0B92-0B95, 0B99-0B9A,
0B9C, 0B9E-0B9F, 0BA3-0BA4, 0BA8-0BAA, 0BAE-0BB5,
0BB7-0BB9, 0BBE-0BC2, 0BC6-0BC8, 0BCA-0BCD
-</pre>
- Telugu: 0C01-0C03, 0C05-0C0C, 0C0E-0C10, 0C12-0C28, 0C2A-0C33,
-<pre>
+<tr><td> Telugu: <td> 0C01-0C03, 0C05-0C0C, 0C0E-0C10, 0C12-0C28, 0C2A-0C33,
0C35-0C39, 0C3E-0C44, 0C46-0C48, 0C4A-0C4D, 0C60-0C61
-</pre>
- Kannada: 0C82-0C83, 0C85-0C8C, 0C8E-0C90, 0C92-0CA8, 0CAA-0CB3,
-<pre>
+<tr><td> Kannada: <td> 0C82-0C83, 0C85-0C8C, 0C8E-0C90, 0C92-0CA8, 0CAA-0CB3,
0CB5-0CB9, 0CBE-0CC4, 0CC6-0CC8, 0CCA-0CCD, 0CDE,
0CE0-0CE1
-</pre>
- Malayalam: 0D02-0D03, 0D05-0D0C, 0D0E-0D10, 0D12-0D28, 0D2A-0D39,
-<pre>
+<tr><td> Malayalam: <td> 0D02-0D03, 0D05-0D0C, 0D0E-0D10, 0D12-0D28, 0D2A-0D39,
0D3E-0D43, 0D46-0D48, 0D4A-0D4D, 0D60-0D61
-</pre>
- Thai: 0E01-0E3A, 0E40-0E5B
- Lao: 0E81-0E82, 0E84, 0E87-0E88, 0E8A, 0E8D, 0E94-0E97,
-<pre>
+<tr><td> Thai: <td> 0E01-0E3A, 0E40-0E5B
+<tr><td> Lao: <td> 0E81-0E82, 0E84, 0E87-0E88, 0E8A, 0E8D, 0E94-0E97,
0E99-0E9F, 0EA1-0EA3, 0EA5, 0EA7, 0EAA-0EAB,
0EAD-0EAE, 0EB0-0EB9, 0EBB-0EBD, 0EC0-0EC4, 0EC6,
0EC8-0ECD, 0EDC-0EDD
-</pre>
- Tibetan: 0F00, 0F18-0F19, 0F35, 0F37, 0F39, 0F3E-0F47, 0F49-0F69,
-<pre>
+<tr><td> Tibetan: <td> 0F00, 0F18-0F19, 0F35, 0F37, 0F39, 0F3E-0F47, 0F49-0F69,
0F71-0F84, 0F86-0F8B, 0F90-0F95, 0F97, 0F99-0FAD,
0FB1-0FB7, 0FB9
-</pre>
- Georgian: 10A0-10C5, 10D0-10F6
- Hiragana: 3041-3093, 309B-309C
- Katakana: 30A1-30F6, 30FB-30FC
- Bopomofo: 3105-312C
- CJK Unified Ideographs: 4E00-9FA5
- Hangul: AC00-D7A3
- Digits: 0660-0669, 06F0-06F9, 0966-096F, 09E6-09EF, 0A66-0A6F,
-<pre>
+<tr><td> Georgian: <td> 10A0-10C5, 10D0-10F6
+<tr><td> Hiragana: <td> 3041-3093, 309B-309C
+<tr><td> Katakana: <td> 30A1-30F6, 30FB-30FC
+<tr><td> Bopomofo: <td> 3105-312C
+<tr><td> CJK Unified Ideographs:<td> 4E00-9FA5
+<tr><td> Hangul: <td> AC00-D7A3
+<tr><td> Digits: <td> 0660-0669, 06F0-06F9, 0966-096F, 09E6-09EF, 0A66-0A6F,
0AE6-0AEF, 0B66-0B6F, 0BE7-0BEF, 0C66-0C6F, 0CE6-0CEF,
0D66-0D6F, 0E50-0E59, 0ED0-0ED9, 0F20-0F33
-</pre>
- Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1,
+<tr><td> Special characters:<td> 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1,
<!--page 454 -->
-<pre>
02E0-02E4, 037A, 0559, 093D, 0B3D, 1FBE, 203F-2040, 2102,
2107, 210A-2113, 2115, 2118-211D, 2124, 2126, 2128, 212A-2131,
2133-2138, 2160-2182, 3005-3007, 3021-3029
-</pre>
+</table>
<h2><a name="E" href="#E">Annex E</a></h2>
<pre>
<h4><a name="F.8.2" href="#F.8.2">F.8.2 Expression transformations</a></h4>
<p><!--para 1 -->
- x / 2 <-> x * 0.5 Although similar transformations involving inexact
-<pre>
+<table border=1>
+<tr><td><pre> x / 2 <-> x * 0.5 </pre><td> Although similar transformations involving inexact
constants generally do not yield numerically equivalent
expressions, if the constants are exact then such
transformations can be made on IEC 60559 machines
and others that round perfectly.
-</pre>
- 1 * x and x / 1 -> x The expressions 1 * x, x / 1, and x are equivalent
-<pre>
+<tr><td><pre> 1 * x and x / 1 -> x </pre><td> The expressions 1 * x, x / 1, and x are equivalent
(on IEC 60559 machines, among others).<sup><a href="#note317"><b>317)</b></a></sup>
-</pre>
- x / x -> 1.0 The expressions x / x and 1.0 are not equivalent if x
-<pre>
+<tr><td><pre> x / x -> 1.0 </pre><td> The expressions x / x and 1.0 are not equivalent if x
can be zero, infinite, or NaN.
-</pre>
- x - y <-> x + (-y) The expressions x - y, x + (-y), and (-y) + x
-<pre>
+<tr><td><pre> x - y <-> x + (-y) </pre><td> The expressions x - y, x + (-y), and (-y) + x
are equivalent (on IEC 60559 machines, among others).
-</pre>
- x - y <-> -(y - x) The expressions x - y and -(y - x) are not
-<pre>
+<tr><td><pre> x - y <-> -(y - x) </pre><td> The expressions x - y and -(y - x) are not
equivalent because 1 - 1 is +0 but -(1 - 1) is -0 (in the
default rounding direction).<sup><a href="#note318"><b>318)</b></a></sup>
-</pre>
- x - x -> 0.0 The expressions x - x and 0.0 are not equivalent if
-<pre>
+<tr><td><pre> x - x -> 0.0 </pre><td> The expressions x - x and 0.0 are not equivalent if
x is a NaN or infinite.
-</pre>
- 0 * x -> 0.0 The expressions 0 * x and 0.0 are not equivalent if
-<pre>
+<tr><td><pre> 0 * x -> 0.0 </pre><td> The expressions 0 * x and 0.0 are not equivalent if
x is a NaN, infinite, or -0.
-</pre>
- x + 0->x The expressions x + 0 and x are not equivalent if x is
-<pre>
+<tr><td><pre> x + 0 -> x </pre><td> The expressions x + 0 and x are not equivalent if x is
-0, because (-0) + (+0) yields +0 (in the default
rounding direction), not -0.
-</pre>
- x - 0->x (+0) - (+0) yields -0 when rounding is downward
-<pre>
+<tr><td><pre> x - 0 -> x </pre><td> (+0) - (+0) yields -0 when rounding is downward
(toward -(inf)), but +0 otherwise, and (-0) - (+0) always
yields -0; so, if the state of the FENV_ACCESS pragma
is ''off'', promising default rounding, then the
implementation can replace x - 0 by x, even if x
-</pre>
-
-
<!--page 465 -->
-<pre>
might be zero.
-</pre>
- -x <-> 0 - x The expressions -x and 0 - x are not equivalent if x
-<pre>
+<tr><td><pre> -x <-> 0 - x </pre><td> The expressions -x and 0 - x are not equivalent if x
is +0, because -(+0) yields -0, but 0 - (+0) yields +0
(unless rounding is downward).
-</pre>
+</table>
<p><b>Footnotes</b>
<p><small><a name="note317" href="#note317">317)</a> Strict support for signaling NaNs -- not required by this specification -- would invalidate these and
<h4><a name="F.8.3" href="#F.8.3">F.8.3 Relational operators</a></h4>
<p><!--para 1 -->
- x != x -> false The statement x != x is true if x is a NaN.
- x == x -> true The statement x == x is false if x is a NaN.
- x < y -> isless(x,y) (and similarly for <=, >, >=) Though numerically
-<pre>
+<table border=1>
+<tr><td><pre> x != x -> false </pre><td> The statement x != x is true if x is a NaN.
+<tr><td><pre> x == x -> true </pre><td> The statement x == x is false if x is a NaN.
+<tr><td><pre> x < y -> isless(x,y) </pre><td> (and similarly for <=, >, >=) Though numerically
equal, these expressions are not equivalent because of
side effects when x or y is a NaN and the state of the
FENV_ACCESS pragma is ''on''. This transformation,
cause the ''invalid'' floating-point exception for
unordered cases, could be performed provided the state
of the FENV_ACCESS pragma is ''off''.
-</pre>
+</table>
The sense of relational operators shall be maintained. This includes handling unordered
cases as expressed by the source code.
<p><!--para 2 -->
<p><small><a name="note319" href="#note319">319)</a> 0 - 0 yields -0 instead of +0 just when the rounding direction is downward.
</small>
-<h3><a name="F.9" href="#F.9">F.9 Mathematics <math.h></a></h3>
+<h3><a name="F.9" href="#F.9">F.9 Mathematics <math.h></a></h3>
<p><!--para 1 -->
This subclause contains specifications of <a href="#7.12"><math.h></a> facilities that are particularly suited
for IEC 60559 implementations.
x + iy (x (+-) u) + iy x + i(y (+-) v) (x (+-) u) + i(y (+-) v)
</pre>
-<h3><a name="G.6" href="#G.6">G.6 Complex arithmetic <complex.h></a></h3>
+<h3><a name="G.6" href="#G.6">G.6 Complex arithmetic <complex.h></a></h3>
<p><!--para 1 -->
The macros
<pre>
and the result, the result has the same sign as the argument.
<p><!--para 3 -->
The functions are continuous onto both sides of their branch cuts, taking into account the
- sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)2. ???
+ sign of zero. For example, csqrt(-2 (+-) i0) = (+-)i(sqrt)(2).
<p><!--para 4 -->
Since complex and imaginary values are composed of real values, each function may be
regarded as computing real values from real values. Except as noted, the functions treat
<!--page 492 -->
</ul>
-<h3><a name="G.7" href="#G.7">G.7 Type-generic math <tgmath.h></a></h3>
+<h3><a name="G.7" href="#G.7">G.7 Type-generic math <tgmath.h></a></h3>
<p><!--para 1 -->
Type-generic macros that accept complex arguments also accept imaginary arguments. If
an argument is imaginary, the macro expands to an expression whose type is real,
only integer divide-by-zero need be detected.
<p><!--para 2 -->
The parameters for the integer data types can be accessed by the following:
- maxint INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,
<pre>
+ maxint INT_MAX, LONG_MAX, LLONG_MAX, UINT_MAX, ULONG_MAX,
ULLONG_MAX
-</pre>
minint INT_MIN, LONG_MIN, LLONG_MIN
+</pre>
<p><!--para 3 -->
The parameter ''bounded'' is always true, and is not provided. The parameter ''minint''
is always 0 for the unsigned types, and is not provided for those types.
<h5><a name="H.2.2.1" href="#H.2.2.1">H.2.2.1 Integer operations</a></h5>
<p><!--para 1 -->
The integer operations on integer types are the following:
+<pre>
addI x + y
subI x - y
mulI x * y
leqI x <= y
gtrI x > y
geqI x >= y
+</pre>
where x and y are expressions of the same integer type.
<h4><a name="H.2.3" href="#H.2.3">H.2.3 Floating-point types</a></h4>
<h5><a name="H.2.3.1" href="#H.2.3.1">H.2.3.1 Floating-point parameters</a></h5>
<p><!--para 1 -->
The parameters for a floating point data type can be accessed by the following:
+<pre>
r FLT_RADIX
p FLT_MANT_DIG, DBL_MANT_DIG, LDBL_MANT_DIG
emax FLT_MAX_EXP, DBL_MAX_EXP, LDBL_MAX_EXP
emin FLT_MIN_EXP, DBL_MIN_EXP, LDBL_MIN_EXP
+</pre>
<p><!--para 2 -->
The derived constants for the floating point types are accessed by the following:
<!--page 495 -->
+<pre>
fmax FLT_MAX, DBL_MAX, LDBL_MAX
fminN FLT_MIN, DBL_MIN, LDBL_MIN
epsilon FLT_EPSILON, DBL_EPSILON, LDBL_EPSILON
rnd_style FLT_ROUNDS
+</pre>
<h5><a name="H.2.3.2" href="#H.2.3.2">H.2.3.2 Floating-point operations</a></h5>
<p><!--para 1 -->
The floating-point operations on floating-point types are the following:
+<pre>
addF x + y
subF x - y
mulF x * y
absF fabsf(x), fabs(x), fabsl(x)
exponentF 1.f+logbf(x), 1.0+logb(x), 1.L+logbl(x)
scaleF scalbnf(x, n), scalbn(x, n), scalbnl(x, n),
-<pre>
scalblnf(x, li), scalbln(x, li), scalblnl(x, li)
-</pre>
intpartF modff(x, &y), modf(x, &y), modfl(x, &y)
fractpartF modff(x, &y), modf(x, &y), modfl(x, &y)
eqF x == y
leqF x <= y
gtrF x > y
geqF x >= y
+</pre>
where x and y are expressions of the same floating point type, n is of type int, and li
is of type long int.
that only one identifier for each is provided to map to LIA-1.
<p><!--para 2 -->
The FLT_ROUNDS parameter can be used to indicate the LIA-1 rounding styles:
+<pre>
truncate FLT_ROUNDS == 0
<!--page 496 -->
nearest FLT_ROUNDS == 1
other FLT_ROUNDS != 0 && FLT_ROUNDS != 1
+</pre>
provided that an implementation extends FLT_ROUNDS to cover the rounding style used
in all relevant LIA-1 operations, not just addition as in C.
<h4><a name="H.2.4" href="#H.2.4">H.2.4 Type conversions</a></h4>
<p><!--para 1 -->
The LIA-1 type conversions are the following type casts:
- cvtI' -> I (int)i, (long int)i, (long long int)i,
<pre>
+ cvtI' -> I (int)i, (long int)i, (long long int)i,
(unsigned int)i, (unsigned long int)i,
(unsigned long long int)i
-</pre>
cvtF -> I (int)x, (long int)x, (long long int)x,
-<pre>
(unsigned int)x, (unsigned long int)x,
(unsigned long long int)x
-</pre>
cvtI -> F (float)i, (double)i, (long double)i
cvtF' -> F (float)x, (double)x, (long double)x
+</pre>
<p><!--para 2 -->
In the above conversions from floating to integer, the use of (cast)x can be replaced with
(cast)round(x), (cast)rint(x), (cast)nearbyint(x), (cast)trunc(x),
C's <a href="#7.6"><fenv.h></a> status flags are compatible with the LIA-1 indicators.
<p><!--para 2 -->
The following mapping is for floating-point types:
+<pre>
undefined FE_INVALID, FE_DIVBYZERO
floating_overflow FE_OVERFLOW
underflow FE_UNDERFLOW
+</pre>
<p><!--para 3 -->
The floating-point indicator interrogation and manipulation operations are:
+<pre>
set_indicators feraiseexcept(i)
clear_indicators feclearexcept(i)
test_indicators fetestexcept(i)
current_indicators fetestexcept(FE_ALL_EXCEPT)
+</pre>
where i is an expression of type int representing a subset of the LIA-1 indicators.
<p><!--para 4 -->
C allows an implementation to provide the following LIA-1 required behavior: at
<h2><a name="Index" href="#Index">Index</a></h2>
<pre>
- ??? x ???, <a href="#3.18">3.18</a> , (comma punctuator), <a href="#6.5.2">6.5.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.7.2.2">6.7.2.2</a>,
+ [^ x ^], <a href="#3.18">3.18</a> , (comma punctuator), <a href="#6.5.2">6.5.2</a>, <a href="#6.7">6.7</a>, <a href="#6.7.2.1">6.7.2.1</a>, <a href="#6.7.2.2">6.7.2.2</a>,
<a href="#6.7.2.3">6.7.2.3</a>, <a href="#6.7.8">6.7.8</a>
- ??? x ???, <a href="#3.19">3.19</a> - (subtraction operator), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a>
+ [_ x _], <a href="#3.19">3.19</a> - (subtraction operator), <a href="#6.5.6">6.5.6</a>, <a href="#F.3">F.3</a>, <a href="#G.5.2">G.5.2</a>
! (logical negation operator), <a href="#6.5.3.3">6.5.3.3</a> - (unary minus operator), <a href="#6.5.3.3">6.5.3.3</a>, <a href="#F.3">F.3</a>
!= (inequality operator), <a href="#6.5.9">6.5.9</a> -- (postfix decrement operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.2.4">6.5.2.4</a>
# operator, <a href="#6.10.3.2">6.10.3.2</a> -- (prefix decrement operator), <a href="#6.3.2.1">6.3.2.1</a>, <a href="#6.5.3.1">6.5.3.1</a>