From 84335d19c1aba5393801bc0939c2f625a2ded79d Mon Sep 17 00:00:00 2001 From: nsz Date: Thu, 21 Jul 2011 22:35:17 +0200 Subject: [PATCH] manually fix c99 section 7 --- ann2html.sh | 2 +- n1256.html | 1267 +++++++++++++++++++++++---------------------------- 2 files changed, 581 insertions(+), 688 deletions(-) diff --git a/ann2html.sh b/ann2html.sh index ecb0411..14c5766 100755 --- a/ann2html.sh +++ b/ann2html.sh @@ -161,7 +161,7 @@ seencontents && !seenfore && /^[^@]/ { next } -/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits)$/ { +/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits|Environmental limits)$/ { ss[sid] = ss[sid] "
" $0 "
\n" next } diff --git a/n1256.html b/n1256.html index 7be4916..dc5df8c 100644 --- a/n1256.html +++ b/n1256.html @@ -8540,7 +8540,7 @@ unsigned long long int
footnotes

166) See ''future library directions'' (7.26.1). -

167) The imaginary unit is a number i such that i 2 = -1. +

167) The imaginary unit is a number i such that i2 = -1.

168) A specification for imaginary types is in informative annex G. @@ -8599,9 +8599,9 @@ unsigned long long int

      (x + iy) x (u + iv) = (xu - yv) + i(yu + xv)
-     (x + iy) / (u + iv) = [(xu + yv) + i(yu - xv)]/(u2 + v 2 )
-     | x + iy | = (sqrt) x 2 + y 2
-                  ???????????????
+ (x + iy) / (u + iv) = [(xu + yv) + i(yu - xv)]/(u2 + v2) + | x + iy | = (sqrt)(x2 + y2) + where the programmer can determine they are safe. @@ -9349,9 +9349,7 @@ unsigned long long int
           FE_DFL_ENV
represents the default floating-point environment -- the one installed at program startup - + -- and has type ''pointer to const-qualified fenv_t''. It can be used as an argument to <fenv.h> functions that manage the floating-point environment.

Additional implementation-defined environments, with macro definitions beginning with @@ -10102,140 +10100,144 @@ unsigned long long int strings shall start and end in the initial shift state. The members with type char are nonnegative numbers, any of which can be CHAR_MAX to indicate that the value is not available in the current locale. The members include the following: - char *decimal_point -

-           The decimal-point character used to format nonmonetary quantities.
- char *thousands_sep -
+
+
char *decimal_point +
+ The decimal-point character used to format nonmonetary quantities. +
char *thousands_sep +
The character used to separate groups of digits before the decimal-point - character in formatted nonmonetary quantities.
- char *grouping -
+           character in formatted nonmonetary quantities.
+
char *grouping +
A string whose elements indicate the size of each group of digits in - formatted nonmonetary quantities.
- char *mon_decimal_point -
-           The decimal-point used to format monetary quantities.
- char *mon_thousands_sep -
+           formatted nonmonetary quantities.
+
char *mon_decimal_point +
+ The decimal-point used to format monetary quantities. +
char *mon_thousands_sep +
The separator for groups of digits before the decimal-point in formatted - monetary quantities.
- char *mon_grouping -
+           monetary quantities.
+
char *mon_grouping +
A string whose elements indicate the size of each group of digits in - formatted monetary quantities.
- char *positive_sign -
+           formatted monetary quantities.
+
char *positive_sign +
The string used to indicate a nonnegative-valued formatted monetary - quantity.
- char *negative_sign -
-           The string used to indicate a negative-valued formatted monetary quantity.
- char *currency_symbol -
-           The local currency symbol applicable to the current locale.
- char frac_digits -
+           quantity.
+
char *negative_sign +
+ The string used to indicate a negative-valued formatted monetary quantity. +
char *currency_symbol +
+ The local currency symbol applicable to the current locale. +
char frac_digits +
The number of fractional digits (those after the decimal-point) to be - displayed in a locally formatted monetary quantity.
- char p_cs_precedes -
+           displayed in a locally formatted monetary quantity.
+
char p_cs_precedes +
Set to 1 or 0 if the currency_symbol respectively precedes or - succeeds the value for a nonnegative locally formatted monetary quantity.
- char n_cs_precedes + succeeds the value for a nonnegative locally formatted monetary quantity. +
char n_cs_precedes -
+
Set to 1 or 0 if the currency_symbol respectively precedes or - succeeds the value for a negative locally formatted monetary quantity.
- char p_sep_by_space -
+           succeeds the value for a negative locally formatted monetary quantity.
+
char p_sep_by_space +
Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a nonnegative locally formatted monetary - quantity.
- char n_sep_by_space -
+           quantity.
+
char n_sep_by_space +
Set to a value indicating the separation of the currency_symbol, the sign string, and the value for a negative locally formatted monetary - quantity.
- char p_sign_posn -
+           quantity.
+
char p_sign_posn +
Set to a value indicating the positioning of the positive_sign for a - nonnegative locally formatted monetary quantity.
- char n_sign_posn -
+           nonnegative locally formatted monetary quantity.
+
char n_sign_posn +
Set to a value indicating the positioning of the negative_sign for a - negative locally formatted monetary quantity.
- char *int_curr_symbol -
+           negative locally formatted monetary quantity.
+
char *int_curr_symbol +
The international currency symbol applicable to the current locale. The first three characters contain the alphabetic international currency symbol in accordance with those specified in ISO 4217. The fourth character (immediately preceding the null character) is the character used to separate - the international currency symbol from the monetary quantity.
- char int_frac_digits -
+           the international currency symbol from the monetary quantity.
+
char int_frac_digits +
The number of fractional digits (those after the decimal-point) to be - displayed in an internationally formatted monetary quantity.
- char int_p_cs_precedes -
+           displayed in an internationally formatted monetary quantity.
+
char int_p_cs_precedes +
Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a nonnegative internationally formatted monetary - quantity.
- char int_n_cs_precedes -
+           quantity.
+
char int_n_cs_precedes +
Set to 1 or 0 if the int_curr_symbol respectively precedes or succeeds the value for a negative internationally formatted monetary - quantity.
- char int_p_sep_by_space + quantity. +
char int_p_sep_by_space -
+
Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a nonnegative internationally formatted - monetary quantity.
- char int_n_sep_by_space -
+           monetary quantity.
+
char int_n_sep_by_space +
Set to a value indicating the separation of the int_curr_symbol, the sign string, and the value for a negative internationally formatted monetary - quantity.
- char int_p_sign_posn -
+           quantity.
+
char int_p_sign_posn +
Set to a value indicating the positioning of the positive_sign for a - nonnegative internationally formatted monetary quantity.
- char int_n_sign_posn -

-

+           nonnegative internationally formatted monetary quantity.
+
char int_n_sign_posn +
Set to a value indicating the positioning of the negative_sign for a - negative internationally formatted monetary quantity.
+ negative internationally formatted monetary quantity. + +

The elements of grouping and mon_grouping are interpreted according to the following: - CHAR_MAX No further grouping is to be performed. - 0 The previous element is to be repeatedly used for the remainder of the -

-               digits.
- other The integer value is the number of digits that compose the current group. -

-

+
+
CHAR_MAX
No further grouping is to be performed. +
0
The previous element is to be repeatedly used for the remainder of the + digits. +
other
The integer value is the number of digits that compose the current group. The next element is examined to determine the size of the next group of - digits before the current group.
+ digits before the current group. + +

The values of p_sep_by_space, n_sep_by_space, int_p_sep_by_space, and int_n_sep_by_space are interpreted according to the following: - 0 No space separates the currency symbol and value. - 1 If the currency symbol and sign string are adjacent, a space separates them from the -

-     value; otherwise, a space separates the currency symbol from the value.
- 2 If the currency symbol and sign string are adjacent, a space separates them; -
-     otherwise, a space separates the sign string from the value.
+
+
0
No space separates the currency symbol and value. +
1
If the currency symbol and sign string are adjacent, a space separates them from the + value; otherwise, a space separates the currency symbol from the value. +
2
If the currency symbol and sign string are adjacent, a space separates them; + otherwise, a space separates the sign string from the value. +
For int_p_sep_by_space and int_n_sep_by_space, the fourth character of int_curr_symbol is used instead of a space.

The values of p_sign_posn, n_sign_posn, int_p_sign_posn, and int_n_sign_posn are interpreted according to the following: - 0 Parentheses surround the quantity and currency symbol. - 1 The sign string precedes the quantity and currency symbol. - 2 The sign string succeeds the quantity and currency symbol. - 3 The sign string immediately precedes the currency symbol. - 4 The sign string immediately succeeds the currency symbol. +

+
0
Parentheses surround the quantity and currency symbol. +
1
The sign string precedes the quantity and currency symbol. +
2
The sign string succeeds the quantity and currency symbol. +
3
The sign string immediately precedes the currency symbol. +
4
The sign string immediately succeeds the currency symbol. +

The implementation shall behave as if no library function calls the localeconv @@ -10251,19 +10253,20 @@ unsigned long long int EXAMPLE 1 The following table illustrates rules which may well be used by four countries to format monetary quantities.

-                               Local format                                     International format
+ Local format International format - Country Positive Negative Positive Negative + Country Positive Negative Positive Negative Country1 1.234,56 mk -1.234,56 mk FIM 1.234,56 FIM -1.234,56 Country2 L.1.234 -L.1.234 ITL 1.234 -ITL 1.234 - Country3 fl. 1.234,56 fl. -1.234,56 NLG 1.234,56 NLG -1.234,56 + Country3 fl. 1.234,56 fl. -1.234,56 NLG 1.234,56 NLG -1.234,56 Country4 SFrs.1,234.56 SFrs.1,234.56C CHF 1,234.56 CHF 1,234.56C +

For these four countries, the respective values for the monetary members of the structure returned by localeconv could be:

-                                   Country1              Country2              Country3            Country4
+ Country1 Country2 Country3 Country4 mon_decimal_point "," "" "," "." mon_thousands_sep "." "." "." "," @@ -10286,30 +10289,28 @@ unsigned long long int int_n_sep_by_space 2 1 2 1 int_p_sign_posn 1 1 1 1 int_n_sign_posn 4 1 4 2 +

EXAMPLE 2 The following table illustrates how the cs_precedes, sep_by_space, and sign_posn members affect the formatted value.

-                                                               p_sep_by_space
- - p_cs_precedes p_sign_posn 0 1 2 - -
-                 0                    0         (1.25$)            (1.25 $)            (1.25$)
-                                      1         +1.25$             +1.25 $             + 1.25$
-                                      2         1.25$+             1.25 $+             1.25$ +
-                                      3         1.25+$             1.25 +$             1.25+ $
-                                      4         1.25$+             1.25 $+             1.25$ +
- - -
-                 1                    0         ($1.25)            ($ 1.25)            ($1.25)
-                                      1         +$1.25             +$ 1.25             + $1.25
-                                      2         $1.25+             $ 1.25+             $1.25 +
-                                      3         +$1.25             +$ 1.25             + $1.25
-                                      4         $+1.25             $+ 1.25             $ +1.25
+ p_sep_by_space + p_cs_precedes p_sign_posn 0 1 2 + 0 0 (1.25$) (1.25 $) (1.25$) + 1 +1.25$ +1.25 $ + 1.25$ + 2 1.25$+ 1.25 $+ 1.25$ + + 3 1.25+$ 1.25 +$ 1.25+ $ + 4 1.25$+ 1.25 $+ 1.25$ + + + 1 0 ($1.25) ($ 1.25) ($1.25) + 1 +$1.25 +$ 1.25 + $1.25 + 2 $1.25+ $ 1.25+ $1.25 + + 3 +$1.25 +$ 1.25 + $1.25 + 4 $+1.25 $+ 1.25 $ +1.25 + +

7.12 Mathematics

The header <math.h> declares two types and many mathematical functions and defines @@ -10873,7 +10874,7 @@ unsigned long long int magnitude of x is too large.

Returns

- The exp functions return ex . + The exp functions return ex.

7.12.6.2 The exp2 functions
Synopsis
@@ -10889,7 +10890,7 @@ unsigned long long int magnitude of x is too large.
Returns

- The exp2 functions return 2x . + The exp2 functions return 2x.

7.12.6.3 The expm1 functions
Synopsis
@@ -10906,7 +10907,7 @@ unsigned long long int error occurs if x is too large.208)
Returns

- The expm1 functions return ex - 1. + The expm1 functions return ex - 1.

footnotes

208) For small magnitude x, expm1(x) is expected to be more accurate than exp(x) - 1. @@ -10928,7 +10929,7 @@ unsigned long long int

If value is not a floating-point number, the results are unspecified. Otherwise, the frexp functions return the value x, such that x has a magnitude in the interval [1/2, 1) or - zero, and value equals x x 2*exp . If value is zero, both parts of the result are zero. + zero, and value equals x 2*exp . If value is zero, both parts of the result are zero.

7.12.6.5 The ilogb functions
Synopsis
@@ -10970,7 +10971,7 @@ unsigned long long int range error may occur.
Returns

- The ldexp functions return x x 2exp . + The ldexp functions return x 2exp .

7.12.6.7 The log functions
Synopsis
@@ -11061,7 +11062,7 @@ unsigned long long int format. If x is subnormal it is treated as though it were normalized; thus, for positive finite x,
-       1 <= x x FLT_RADIX-logb(x) < FLT_RADIX
+ 1 <= x FLT_RADIX-logb(x) < FLT_RADIX A domain error or range error may occur if the argument is zero.
Returns

@@ -11098,11 +11099,11 @@ unsigned long long int long double scalblnl(long double x, long int n);

Description

- The scalbn and scalbln functions compute x x FLT_RADIXn efficiently, not - normally by computing FLT_RADIXn explicitly. A range error may occur. + The scalbn and scalbln functions compute x FLT_RADIXn efficiently, not + normally by computing FLT_RADIXn explicitly. A range error may occur.

Returns

- The scalbn and scalbln functions return x x FLT_RADIXn . + The scalbn and scalbln functions return x FLT_RADIXn .

7.12.7 Power and absolute-value functions

@@ -11119,7 +11120,7 @@ unsigned long long int The cbrt functions compute the real cube root of x.
Returns

- The cbrt functions return x1/3 . + The cbrt functions return x1/3.

7.12.7.2 The fabs functions
Synopsis
@@ -11152,10 +11153,7 @@ unsigned long long int

Returns

- The hypot functions return (sqrt)x2 + y2 . -

-                            ???
-                            ???????????????
+ The hypot functions return (sqrt)(x2 + y2).
7.12.7.4 The pow functions
Synopsis
@@ -11173,7 +11171,7 @@ unsigned long long int is zero and y is less than zero.
Returns

- The pow functions return xy . + The pow functions return xy.

7.12.7.5 The sqrt functions
Synopsis
@@ -11190,10 +11188,7 @@ unsigned long long int the argument is less than zero.
Returns

- The sqrt functions return (sqrt)x. -

-                           ???
-                           ???
+ The sqrt functions return (sqrt)(x).

7.12.8 Error and gamma functions

@@ -11209,20 +11204,12 @@ unsigned long long int

The erf functions compute the error function of x.

Returns
+

+ The erf functions return

-                                    2        x
-                                         (integral)
- - The erf functions return erf x = e-t dt. -
-                                                   2
- - -
-                                    (sqrt)pi
-                                    ???
-                                    ???    0
- + 2 x + erf x = --- (integral) e-t2 dt . + (sqrt)(pi) 0
7.12.8.2 The erfc functions
Synopsis
@@ -11237,21 +11224,14 @@ unsigned long long int The erfc functions compute the complementary error function of x. A range error occurs if x is too large.
Returns
+

+ The erfc functions return

-                                                           2        (inf)
-                                                                (integral)
- - The erfc functions return erfc x = 1 - erf x = e-t dt. -
-                                                                          2
- + 2 (inf) + erfc x = 1 - erf x = --- (integral) e-t2 dt . + (sqrt)(pi) x -
-                                                           (sqrt)pi
-                                                           ???
-                                                           ???    x
-
7.12.8.3 The lgamma functions
Synopsis

@@ -11302,7 +11282,7 @@ unsigned long long int

Returns

- The ceil functions return ???x???, expressed as a floating-point number. + The ceil functions return [^x^], expressed as a floating-point number.

7.12.9.2 The floor functions
Synopsis
@@ -11317,7 +11297,7 @@ unsigned long long int The floor functions compute the largest integer value not greater than x.
Returns

- The floor functions return ???x???, expressed as a floating-point number. + The floor functions return [_x_], expressed as a floating-point number.

7.12.9.3 The nearbyint functions
Synopsis
@@ -11492,7 +11472,7 @@ unsigned long long int

The remquo functions compute the same remainder as the remainder functions. In the object pointed to by quo they store a value whose sign is the sign of x/y and whose - magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where + magnitude is congruent modulo 2n to the magnitude of the integral quotient of x/y, where n is an implementation-defined integer greater than or equal to 3.

Returns

@@ -11604,9 +11584,9 @@ unsigned long long int

The fdim functions determine the positive difference between their arguments:

-       ???x - y if x > y
-       ???
-       ???+0     if x <= y
+ {x - y if x > y + { + {+0 if x <= y A range error may occur.
Returns

@@ -11668,12 +11648,12 @@ unsigned long long int long double z);

Description

- The fma functions compute (x x y) + z, rounded as one ternary operation: they compute + The fma functions compute (x y) + z, rounded as one ternary operation: they compute the value (as if) to infinite precision and round once to the result format, according to the current rounding mode. A range error may occur.

Returns

- The fma functions return (x x y) + z, rounded as one ternary operation. + The fma functions return (x y) + z, rounded as one ternary operation. @@ -11840,7 +11820,7 @@ unsigned long long int If the return is from a direct invocation, the setjmp macro returns the value zero. If the return is from a call to the longjmp function, the setjmp macro returns a nonzero value. - Environmental limits +

Environmental limits

An invocation of the setjmp macro shall appear only in one of the following contexts:

    @@ -12197,13 +12177,13 @@ unsigned long long int va_list ap; char *array[MAXARGS]; int ptr_no = 0; - if (n_ptrs > MAXARGS) - n_ptrs = MAXARGS; - va_start(ap, n_ptrs); - while (ptr_no < n_ptrs) - array[ptr_no++] = va_arg(ap, char *); - va_end(ap); - f2(n_ptrs, array); + if (n_ptrs > MAXARGS) + n_ptrs = MAXARGS; + va_start(ap, n_ptrs); + while (ptr_no < n_ptrs) + array[ptr_no++] = va_arg(ap, char *); + va_end(ap); + f2(n_ptrs, array); } Each call to f1 is required to have visible the definition of the function or a declaration such as
    @@ -12473,33 +12453,42 @@ unsigned long long int

    • minimum values of exact-width signed integer types - INTN_MIN exactly -(2 N -1 ) +
      +  INTN_MIN                                    exactly -(2N-1)
    • maximum values of exact-width signed integer types - INTN_MAX exactly 2 N -1 - 1 +
      +  INTN_MAX                                    exactly 2N-1 - 1
    • maximum values of exact-width unsigned integer types - UINTN_MAX exactly 2 N - 1 +
      +  UINTN_MAX                                   exactly 2N - 1
    7.18.2.2 Limits of minimum-width integer types

    • minimum values of minimum-width signed integer types - INT_LEASTN_MIN -(2 N -1 - 1) +
      +  INT_LEASTN_MIN                                      -(2N-1 - 1)
    • maximum values of minimum-width signed integer types - INT_LEASTN_MAX 2 N -1 - 1 +
      +  INT_LEASTN_MAX                                      2N-1 - 1
    • maximum values of minimum-width unsigned integer types - UINT_LEASTN_MAX 2N - 1 +
      +  UINT_LEASTN_MAX                                     2N - 1
    7.18.2.3 Limits of fastest minimum-width integer types

    • minimum values of fastest minimum-width signed integer types - INT_FASTN_MIN -(2 N -1 - 1) +
      +  INT_FASTN_MIN                                       -(2N-1 - 1)
    • maximum values of fastest minimum-width signed integer types - INT_FASTN_MAX 2 N -1 - 1 +
      +  INT_FASTN_MAX                                       2N-1 - 1
    • maximum values of fastest minimum-width unsigned integer types - UINT_FASTN_MAX 2N - 1 +
      +  UINT_FASTN_MAX                                      2N - 1
    7.18.2.4 Limits of integer types capable of holding object pointers
    @@ -12507,24 +12496,28 @@ unsigned long long int
    • minimum value of pointer-holding signed integer type
      -     INTPTR_MIN                                       -(215 - 1)
      + INTPTR_MIN -(215 - 1)
    • maximum value of pointer-holding signed integer type
      -     INTPTR_MAX                                       215 - 1
      + INTPTR_MAX 215 - 1
    • maximum value of pointer-holding unsigned integer type - UINTPTR_MAX 216 - 1 +
      +   UINTPTR_MAX                                        216 - 1
    7.18.2.5 Limits of greatest-width integer types

    • minimum value of greatest-width signed integer type - INTMAX_MIN -(263 - 1) +
      +   INTMAX_MIN                                         -(263 - 1)
    • maximum value of greatest-width signed integer type - INTMAX_MAX 263 - 1 +
      +   INTMAX_MAX                                         263 - 1
    • maximum value of greatest-width unsigned integer type - UINTMAX_MAX 264 - 1 +
      +   UINTMAX_MAX                                        264 - 1

    7.18.3 Limits of other integer types

    @@ -12541,23 +12534,31 @@ unsigned long long int actually provides.228)
    • limits of ptrdiff_t - PTRDIFF_MIN -65535 - PTRDIFF_MAX +65535 +
      +   PTRDIFF_MIN                                            -65535
      +   PTRDIFF_MAX                                            +65535
      +
    • limits of sig_atomic_t - SIG_ATOMIC_MIN see below - SIG_ATOMIC_MAX see below +
      +   SIG_ATOMIC_MIN                                         see below
      +   SIG_ATOMIC_MAX                                         see below
      +
    • limit of size_t - SIZE_MAX 65535 +
      +   SIZE_MAX                                               65535
      +
    • limits of wchar_t - - - WCHAR_MIN see below - WCHAR_MAX see below +
      +   WCHAR_MIN                                              see below
      +   WCHAR_MAX                                              see below
      +
    • limits of wint_t - WINT_MIN see below - WINT_MAX see below +
      +   WINT_MIN                                               see below
      +   WINT_MAX                                               see below
      +

    If sig_atomic_t (see 7.14) is defined as a signed integer type, the value of @@ -12789,7 +12790,7 @@ unsigned long long int value of this mbstate_t object as part of the value of the fpos_t object. A later successful call to fsetpos using the same stored fpos_t value restores the value of the associated mbstate_t object as well as the position within the controlled stream. - Environmental limits +

    Environmental limits

    An implementation shall support text files with lines containing at least 254 characters, including the terminating new-line character. The value of the macro BUFSIZ shall be at @@ -12858,9 +12859,7 @@ unsigned long long int

    At program startup, three text streams are predefined and need not be opened explicitly -

      -
    • standard input (for reading conventional input), standard output (for writing -
    + -- standard input (for reading conventional input), standard output (for writing conventional output), and standard error (for writing diagnostic output). As initially opened, the standard error stream is not fully buffered; the standard input and standard output streams are fully buffered if and only if the stream can be determined not to refer @@ -12907,7 +12906,7 @@ unsigned long long int multibyte character. The wide character input/output functions and the byte input/output functions store the value of the macro EILSEQ in errno if and only if an encoding error occurs. - Environmental limits +
    Environmental limits

    The value of FOPEN_MAX shall be at least eight, including the three standard text streams. @@ -13015,7 +13014,7 @@ unsigned long long int function may modify the same object). If the argument is not a null pointer, it is assumed to point to an array of at least L_tmpnam chars; the tmpnam function writes its result in that array and returns the argument as its value. - Environmental limits +

    Environmental limits

    The value of the macro TMP_MAX shall be at least 25. @@ -13083,23 +13082,22 @@ unsigned long long int

    The argument mode points to a string. If the string is one of the following, the file is open in the indicated mode. Otherwise, the behavior is undefined.237) - r open text file for reading - w truncate to zero length or create text file for writing - a append; open or create text file for writing at end-of-file - rb open binary file for reading - wb truncate to zero length or create binary file for writing - ab append; open or create binary file for writing at end-of-file - r+ open text file for update (reading and writing) - w+ truncate to zero length or create text file for update - a+ append; open or create text file for update, writing at end-of-file - - - +

    +
    r
    open text file for reading +
    w
    truncate to zero length or create text file for writing +
    a
    append; open or create text file for writing at end-of-file +
    rb
    open binary file for reading +
    wb
    truncate to zero length or create binary file for writing +
    ab
    append; open or create binary file for writing at end-of-file +
    r+
    open text file for update (reading and writing) +
    w+
    truncate to zero length or create text file for update +
    a+
    append; open or create text file for update, writing at end-of-file - r+b or rb+ open binary file for update (reading and writing) - w+b or wb+ truncate to zero length or create binary file for update - a+b or ab+ append; open or create binary file for update, writing at end-of-file +
    r+b or rb+
    open binary file for update (reading and writing) +
    w+b or wb+
    truncate to zero length or create binary file for update +
    a+b or ab+
    append; open or create binary file for update, writing at end-of-file +

    Opening a file with read mode ('r' as the first character in the mode argument) fails if the file does not exist or cannot be read. @@ -13284,25 +13282,18 @@ unsigned long long int precision were omitted.

    The flag characters and their meanings are: - - The result of the conversion is left-justified within the field. (It is right-justified if -

    -          this flag is not specified.)
    - + The result of a signed conversion always begins with a plus or minus sign. (It -
    -          begins with a sign only when a negative value is converted if this flag is not
    - - - +
    +
    -
    The result of the conversion is left-justified within the field. (It is right-justified if + this flag is not specified.) +
    +
    The result of a signed conversion always begins with a plus or minus sign. (It + begins with a sign only when a negative value is converted if this flag is not -
    -           specified.)242)
    - space If the first character of a signed conversion is not a sign, or if a signed conversion -
    +           specified.)242)
    +
    space
    If the first character of a signed conversion is not a sign, or if a signed conversion results in no characters, a space is prefixed to the result. If the space and + flags - both appear, the space flag is ignored.
    - # The result is converted to an ''alternative form''. For o conversion, it increases -
    +       both appear, the space flag is ignored.
    +
    #
    The result is converted to an ''alternative form''. For o conversion, it increases the precision, if and only if necessary, to force the first digit of the result to be a zero (if the value and precision are both 0, a single 0 is printed). For x (or X) conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g, @@ -13310,84 +13301,74 @@ unsigned long long int
    contains a decimal-point character, even if no digits follow it. (Normally, a decimal-point character appears in the result of these conversions only if a digit follows it.) For g and G conversions, trailing zeros are not removed from the - result. For other conversions, the behavior is undefined. - 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros -

    -

    +           result. For other conversions, the behavior is undefined.
    +
    0
    For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros (following any indication of sign or base) are used to pad to the field width rather than performing space padding, except when converting an infinity or NaN. If the 0 and - flags both appear, the 0 flag is ignored. For d, i, o, u, x, and X conversions, if a precision is specified, the 0 flag is ignored. For other - conversions, the behavior is undefined.
    + conversions, the behavior is undefined. +
    +

    The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -

    +
    +
    hh
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a signed char or unsigned char argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to signed char or unsigned char before printing); or that a following n conversion specifier applies to a pointer to a signed char - argument.
    - h Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                argument.
    +
    h
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a short int or unsigned short int argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to short int or unsigned short int before printing); or that a following n conversion specifier applies to a pointer to a short - int argument.
    - l (ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                int argument.
    +
    l (ell)
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long int or unsigned long int argument; that a following n - conversion specifier applies to a pointer to a long int argument; that a
    - + conversion specifier applies to a pointer to a long int argument; that a -
                   following c conversion specifier applies to a wint_t argument; that a
                   following s conversion specifier applies to a pointer to a wchar_t
                   argument; or has no effect on a following a, A, e, E, f, F, g, or G conversion
    -              specifier.
    - ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +              specifier.
    +
    ll (ell-ell)
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long long int or unsigned long long int argument; or that a following n conversion specifier applies to a pointer to a long long int - argument.
    - j Specifies that a following d, i, o, u, x, or X conversion specifier applies to -
    +              argument.
    +
    j
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to an intmax_t or uintmax_t argument; or that a following n conversion - specifier applies to a pointer to an intmax_t argument.
    - z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +              specifier applies to a pointer to an intmax_t argument.
    +
    z
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a size_t or the corresponding signed integer type argument; or that a following n conversion specifier applies to a pointer to a signed integer type - corresponding to size_t argument.
    - t Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +              corresponding to size_t argument.
    +
    t
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a ptrdiff_t or the corresponding unsigned integer type argument; or that a following n conversion specifier applies to a pointer to a ptrdiff_t - argument.
    - L Specifies that a following a, A, e, E, f, F, g, or G conversion specifier -
    -              applies to a long double argument.
    - If a length modifier appears with any conversion specifier other than as specified above, + argument. +
    L
    Specifies that a following a, A, e, E, f, F, g, or G conversion specifier + applies to a long double argument. + +If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined.

    The conversion specifiers and their meanings are: - d,i The int argument is converted to signed decimal in the style [-]dddd. The -

    +
    +
    d,i
    The int argument is converted to signed decimal in the style [-]dddd. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a zero - value with a precision of zero is no characters.
    - o,u,x,X The unsigned int argument is converted to unsigned octal (o), unsigned + value with a precision of zero is no characters. +
    o,u,x,X
    The unsigned int argument is converted to unsigned octal (o), unsigned -
              decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the
              letters abcdef are used for x conversion and the letters ABCDEF for X
              conversion. The precision specifies the minimum number of digits to appear;
              if the value being converted can be represented in fewer digits, it is expanded
              with leading zeros. The default precision is 1. The result of converting a
    -         zero value with a precision of zero is no characters.
    - f,F A double argument representing a floating-point number is converted to -
    +         zero value with a precision of zero is no characters.
    +
    f,F
    A double argument representing a floating-point number is converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is zero and the # flag is @@ -13400,9 +13381,8 @@ unsigned long long int
    [-]nan or [-]nan(n-char-sequence) -- which style, and the meaning of any n-char-sequence, is implementation-defined. The F conversion specifier produces INF, INFINITY, or NAN instead of inf, infinity, or nan, - respectively.243) - e,E A double argument representing a floating-point number is converted in the -
    +              respectively.243)
    +
    e,E
    A double argument representing a floating-point number is converted in the style [-]d.ddd e(+-)dd, where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as @@ -13413,26 +13393,24 @@ unsigned long long int
    and only as many more digits as necessary to represent the exponent. If the value is zero, the exponent is zero. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier. - g,G A double argument representing a floating-point number is converted in -
    +              of an f or F conversion specifier.
    +
    g,G
    A double argument representing a floating-point number is converted in style f or e (or in style F or E in the case of a G conversion specifier), depending on the value converted and the precision. Let P equal the precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero. Then, if a conversion with style E would have an exponent of X : - -- if P > X >= -4, the conversion is with style f (or F) and precision +
      +
    • if P > X >= -4, the conversion is with style f (or F) and precision P - (X + 1). - -- otherwise, the conversion is with style e (or E) and precision P - 1. - Finally, unless the # flag is used, any trailing zeros are removed from the
    - +
  • otherwise, the conversion is with style e (or E) and precision P - 1. +
+ Finally, unless the # flag is used, any trailing zeros are removed from the -
                fractional portion of the result and the decimal-point character is removed if
                there is no fractional portion remaining.
                A double argument representing an infinity or NaN is converted in the style
-               of an f or F conversion specifier.
- a,A A double argument representing a floating-point number is converted in the -
+               of an f or F conversion specifier.
+
a,A
A double argument representing a floating-point number is converted in the style [-]0xh.hhhh p(+-)d, where there is one hexadecimal digit (which is nonzero if the argument is a normalized floating-point number and is otherwise unspecified) before the decimal-point character244) and the number @@ -13448,22 +13426,17 @@ unsigned long long int
least one digit, and only as many more digits as necessary to represent the decimal exponent of 2. If the value is zero, the exponent is zero. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier. - c If no l length modifier is present, the int argument is converted to an -
+               of an f or F conversion specifier.
+
c
If no l length modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l length modifier is present, the wint_t argument is converted as if by an ls conversion specification with no precision and an argument that points to the initial element of a two-element array of wchar_t, the first element containing the wint_t argument to the lc conversion specification and the - second a null wide character.
- s If no l length modifier is present, the argument shall be a pointer to the initial -
-               element of an array of character type.246) Characters from the array are
- - + second a null wide character. +
s
If no l length modifier is present, the argument shall be a pointer to the initial + element of an array of character type.246) Characters from the array are -
                 written up to (but not including) the terminating null character. If the
                 precision is specified, no more than that many bytes are written. If the
                 precision is not specified or is greater than the size of the array, the array shall
@@ -13480,21 +13453,19 @@ unsigned long long int
written (including shift sequences, if any), and the array shall contain a null wide character if, to equal the multibyte character sequence length given by the precision, the function would need to access a wide character one past the - end of the array. In no case is a partial multibyte character written.247) - p The argument shall be a pointer to void. The value of the pointer is -
+                end of the array. In no case is a partial multibyte character written.247)
+
p
The argument shall be a pointer to void. The value of the pointer is converted to a sequence of printing characters, in an implementation-defined - manner.
- n The argument shall be a pointer to signed integer into which is written the -
+                manner.
+
n
The argument shall be a pointer to signed integer into which is written the number of characters written to the output stream so far by this call to fprintf. No argument is converted, but one is consumed. If the conversion specification includes any flags, a field width, or a precision, the behavior is - undefined.
- % A % character is written. No argument is converted. The complete + undefined. +
%
A % character is written. No argument is converted. The complete + conversion specification shall be %%. +

-

-                conversion specification shall be %%.
If a conversion specification is invalid, the behavior is undefined.248) If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined. @@ -13529,7 +13500,7 @@ unsigned long long int

The fprintf function returns the number of characters transmitted, or a negative value if an output or encoding error occurred. - Environmental limits +

Environmental limits

The number of characters that can be produced by any single conversion shall be at least 4095. @@ -13592,7 +13563,7 @@ unsigned long long int

244) Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so that subsequent digits align to nibble (4-bit) boundaries. -

245) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is +

245) The precision p is sufficient to distinguish values of the source type if 16p-1 > b n where b is FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p might suffice depending on the implementation's scheme for determining the digit to the left of the decimal-point character. @@ -13681,73 +13652,61 @@ unsigned long long int in the object, the behavior is undefined.

The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -

-              to an argument with type pointer to signed char or unsigned char.
- h Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+
+
hh
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies + to an argument with type pointer to signed char or unsigned char. +
h
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to short int or unsigned short - int.
- l (ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+              int.
+
l (ell)
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to long int or unsigned long int; that a following a, A, e, E, f, F, g, or G conversion specifier applies to an argument with type pointer to double; or that a following c, s, or [ - conversion specifier applies to an argument with type pointer to wchar_t.
- ll (ell-ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+              conversion specifier applies to an argument with type pointer to wchar_t.
+
ll (ell-ell)
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to long long int or unsigned - long long int.
- j Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
-              to an argument with type pointer to intmax_t or uintmax_t.
- z Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+              long long int.
+
j
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies + to an argument with type pointer to intmax_t or uintmax_t. +
z
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to size_t or the corresponding signed - integer type.
- t Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
+              integer type.
+
t
Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to ptrdiff_t or the corresponding - unsigned integer type.
- L Specifies that a following a, A, e, E, f, F, g, or G conversion specifier -
-              applies to an argument with type pointer to long double.
+ unsigned integer type. +
L
Specifies that a following a, A, e, E, f, F, g, or G conversion specifier + applies to an argument with type pointer to long double. + If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined.

The conversion specifiers and their meanings are: - d Matches an optionally signed decimal integer, whose format is the same as -

+
+
d
Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the strtol function with the value 10 for the base argument. The corresponding argument shall be a pointer to - signed integer.
- i Matches an optionally signed integer, whose format is the same as expected + signed integer. +
i
Matches an optionally signed integer, whose format is the same as expected -
              for the subject sequence of the strtol function with the value 0 for the
              base argument. The corresponding argument shall be a pointer to signed
-             integer.
- o Matches an optionally signed octal integer, whose format is the same as -
+             integer.
+
o
Matches an optionally signed octal integer, whose format is the same as expected for the subject sequence of the strtoul function with the value 8 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
- u Matches an optionally signed decimal integer, whose format is the same as -
+               unsigned integer.
+
u
Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the strtoul function with the value 10 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
- x Matches an optionally signed hexadecimal integer, whose format is the same -
+               unsigned integer.
+
x
Matches an optionally signed hexadecimal integer, whose format is the same as expected for the subject sequence of the strtoul function with the value 16 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
- a,e,f,g Matches an optionally signed floating-point number, infinity, or NaN, whose -
+               unsigned integer.
+
a,e,f,g
Matches an optionally signed floating-point number, infinity, or NaN, whose format is the same as expected for the subject sequence of the strtod - function. The corresponding argument shall be a pointer to floating.
- c Matches a sequence of characters of exactly the number specified by the field -
+         function. The corresponding argument shall be a pointer to floating.
+
c
Matches a sequence of characters of exactly the number specified by the field width (1 if no field width is present in the directive).252) If no l length modifier is present, the corresponding argument shall be a pointer to the initial element of a character array large enough to accept the @@ -13759,27 +13718,22 @@ unsigned long long int
initialized to zero before the first multibyte character is converted. The corresponding argument shall be a pointer to the initial element of an array of wchar_t large enough to accept the resulting sequence of wide characters. - No null wide character is added. - s Matches a sequence of non-white-space characters.252) -
+               No null wide character is added.
+
s
Matches a sequence of non-white-space characters.252) If no l length modifier is present, the corresponding argument shall be a pointer to the initial element of a character array large enough to accept the sequence and a terminating null character, which will be added automatically. - If an l length modifier is present, the input shall be a sequence of multibyte
- - + If an l length modifier is present, the input shall be a sequence of multibyte -
           characters that begins in the initial shift state. Each multibyte character is
           converted to a wide character as if by a call to the mbrtowc function, with
           the conversion state described by an mbstate_t object initialized to zero
           before the first multibyte character is converted. The corresponding argument
           shall be a pointer to the initial element of an array of wchar_t large enough
           to accept the sequence and the terminating null wide character, which will be
-          added automatically.
- [ Matches a nonempty sequence of characters from a set of expected characters -
-          (the scanset).252)
+          added automatically.
+
[
Matches a nonempty sequence of characters from a set of expected characters + (the scanset).252) If no l length modifier is present, the corresponding argument shall be a pointer to the initial element of a character array large enough to accept the sequence and a terminating null character, which will be added automatically. @@ -13802,28 +13756,26 @@ unsigned long long int
the first following right bracket character is the one that ends the specification. If a - character is in the scanlist and is not the first, nor the second where the first character is a ^, nor the last character, the behavior is - implementation-defined. - p Matches an implementation-defined set of sequences, which should be the + implementation-defined. +
p
Matches an implementation-defined set of sequences, which should be the -
           same as the set of sequences that may be produced by the %p conversion of
           the fprintf function. The corresponding argument shall be a pointer to a
           pointer to void. The input item is converted to a pointer value in an
           implementation-defined manner. If the input item is a value converted earlier
           during the same program execution, the pointer that results shall compare
-          equal to that value; otherwise the behavior of the %p conversion is undefined.
- n No input is consumed. The corresponding argument shall be a pointer to -
+          equal to that value; otherwise the behavior of the %p conversion is undefined.
+
n
No input is consumed. The corresponding argument shall be a pointer to signed integer into which is to be written the number of characters read from the input stream so far by this call to the fscanf function. Execution of a %n directive does not increment the assignment count returned at the completion of execution of the fscanf function. No argument is converted, but one is consumed. If the conversion specification includes an assignment- - suppressing character or a field width, the behavior is undefined.
- % Matches a single % character; no conversion or assignment occurs. The + suppressing character or a field width, the behavior is undefined. +
%
Matches a single % character; no conversion or assignment occurs. The + complete conversion specification shall be %%. +

-

-                complete conversion specification shall be %%.
If a conversion specification is invalid, the behavior is undefined.253)

The conversion specifiers A, E, F, G, and X are also valid and behave the same as, @@ -14131,7 +14083,7 @@ unsigned long long int The vfscanf function is equivalent to fscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vfscanf function does not invoke the - va_end macro.254) + va_end macro.254)

Returns

The vfscanf function returns the value of the macro EOF if an input failure occurs @@ -14152,7 +14104,7 @@ unsigned long long int The vprintf function is equivalent to printf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vprintf function does not invoke the - va_end macro.254) + va_end macro.254)

Returns

The vprintf function returns the number of characters transmitted, or a negative value @@ -14172,7 +14124,7 @@ unsigned long long int The vscanf function is equivalent to scanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vscanf function does not invoke the va_end - macro.254) + macro.254)

Returns

The vscanf function returns the value of the macro EOF if an input failure occurs @@ -14194,7 +14146,7 @@ unsigned long long int The vsnprintf function is equivalent to snprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsnprintf function does not invoke the - va_end macro.254) If copying takes place between objects that overlap, the behavior is + va_end macro.254) If copying takes place between objects that overlap, the behavior is undefined.

Returns

@@ -14218,7 +14170,7 @@ unsigned long long int The vsprintf function is equivalent to sprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsprintf function does not invoke the - va_end macro.254) If copying takes place between objects that overlap, the behavior is + va_end macro.254) If copying takes place between objects that overlap, the behavior is undefined.

Returns

@@ -14239,7 +14191,7 @@ unsigned long long int The vsscanf function is equivalent to sscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vsscanf function does not invoke the - va_end macro.254) + va_end macro.254)

Returns

The vsscanf function returns the value of the macro EOF if an input failure occurs @@ -14831,7 +14783,7 @@ unsigned long long int

  • a 0x or 0X, then a nonempty sequence of hexadecimal digits optionally containing a decimal-point character, then an optional binary exponent part as defined in 6.4.4.2;
  • INF or INFINITY, ignoring case -
  • NAN or NAN(n-char-sequenceopt), ignoring case in the NAN part, where: +
  • NAN or NAN(n-char-sequenceopt), ignoring case in the NAN part, where:
               n-char-sequence:
                      digit
    @@ -14854,7 +14806,7 @@ unsigned long long int
    the subject sequence begins with a minus sign, the sequence is interpreted as negated.258) A character sequence INF or INFINITY is interpreted as an infinity, if representable in the return type, else like a floating constant that is too large for the range of the return - type. A character sequence NAN or NAN(n-char-sequenceopt), is interpreted as a quiet + type. A character sequence NAN or NAN(n-char-sequenceopt), is interpreted as a quiet NaN, if supported in the return type, else like a subject sequence part that does not have the expected form; the meaning of the n-char sequences is implementation-defined.259) A pointer to the final string is stored in the object pointed to by endptr, provided that @@ -15003,7 +14955,7 @@ unsigned long long int
    Returns

    The rand function returns a pseudo-random integer. - Environmental limits +

    Environmental limits

    The value of the RAND_MAX macro shall be at least 32767. @@ -15164,7 +15116,7 @@ unsigned long long int

    The atexit function registers the function pointed to by func, to be called without arguments at normal program termination. - Environmental limits +

    Environmental limits

    The implementation shall support the registration of at least 32 functions.

    Returns
    @@ -15584,7 +15536,7 @@ unsigned long long int If a wide character is encountered that does not correspond to a valid multibyte character, the wcstombs function returns (size_t)(-1). Otherwise, the wcstombs function returns the number of bytes modified, not including a terminating null character, if - any.267) + any.267)

    7.21 String handling

    @@ -16101,6 +16053,7 @@ unsigned long long int
              <math.h>          <complex.h>           type-generic
               function            function              macro
    +
                acos               cacos                acos
                asin               casin                asin
                atan               catan                atan
    @@ -16160,7 +16113,8 @@ unsigned long long int
    functions invoked by use of type-generic macros are shown in the following table:
    -                  macro use                                  invokes
    +                macro use                                  invokes
    +
                  exp(n)                              exp(n), the function
                  acosh(f)                            acoshf(f)
                  sin(d)                              sin(d), the function
    @@ -16385,9 +16339,9 @@ unsigned long long int
             Sun Sep 16 01:03:52 1973\n\0
    using the equivalent of the following algorithm. +
      char *asctime(const struct tm *timeptr)
      {
    -
           static const char wday_name[7][3] = {
                "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
           };
    @@ -16402,8 +16356,9 @@ unsigned long long int
    timeptr->tm_mday, timeptr->tm_hour, timeptr->tm_min, timeptr->tm_sec, 1900 + timeptr->tm_year); - return result;
    + return result; } +
    Returns

    The asctime function returns a pointer to the string. @@ -16484,125 +16439,102 @@ unsigned long long int of the current locale and by the values of zero or more members of the broken-down time structure pointed to by timeptr, as specified in brackets in the description. If any of the specified values is outside the normal range, the characters stored are unspecified. - %a is replaced by the locale's abbreviated weekday name. [tm_wday] - %A is replaced by the locale's full weekday name. [tm_wday] - %b is replaced by the locale's abbreviated month name. [tm_mon] - %B is replaced by the locale's full month name. [tm_mon] - %c is replaced by the locale's appropriate date and time representation. [all specified -

    -       in 7.23.1]
    - %C is replaced by the year divided by 100 and truncated to an integer, as a decimal -
    -       number (00-99). [tm_year]
    - %d is replaced by the day of the month as a decimal number (01-31). [tm_mday] - %D is equivalent to ''%m/%d/%y''. [tm_mon, tm_mday, tm_year] - %e is replaced by the day of the month as a decimal number (1-31); a single digit is -
    -       preceded by a space. [tm_mday]
    - %F is equivalent to ''%Y-%m-%d'' (the ISO 8601 date format). [tm_year, tm_mon, -
    -       tm_mday]
    - %g is replaced by the last 2 digits of the week-based year (see below) as a decimal -
    -       number (00-99). [tm_year, tm_wday, tm_yday]
    - %G is replaced by the week-based year (see below) as a decimal number (e.g., 1997). -
    -       [tm_year, tm_wday, tm_yday]
    - %h is equivalent to ''%b''. [tm_mon] - %H is replaced by the hour (24-hour clock) as a decimal number (00-23). [tm_hour] - %I is replaced by the hour (12-hour clock) as a decimal number (01-12). [tm_hour] - %j is replaced by the day of the year as a decimal number (001-366). [tm_yday] - %m is replaced by the month as a decimal number (01-12). [tm_mon] - %M is replaced by the minute as a decimal number (00-59). [tm_min] - %n is replaced by a new-line character. - %p is replaced by the locale's equivalent of the AM/PM designations associated with a -
    -       12-hour clock. [tm_hour]
    - %r is replaced by the locale's 12-hour clock time. [tm_hour, tm_min, tm_sec] - %R is equivalent to ''%H:%M''. [tm_hour, tm_min] - %S is replaced by the second as a decimal number (00-60). [tm_sec] - %t is replaced by a horizontal-tab character. - %T is equivalent to ''%H:%M:%S'' (the ISO 8601 time format). [tm_hour, tm_min, +
    +
    %a
    is replaced by the locale's abbreviated weekday name. [tm_wday] +
    %A
    is replaced by the locale's full weekday name. [tm_wday] +
    %b
    is replaced by the locale's abbreviated month name. [tm_mon] +
    %B
    is replaced by the locale's full month name. [tm_mon] +
    %c
    is replaced by the locale's appropriate date and time representation. [all specified + in 7.23.1] +
    %C
    is replaced by the year divided by 100 and truncated to an integer, as a decimal + number (00-99). [tm_year] +
    %d
    is replaced by the day of the month as a decimal number (01-31). [tm_mday] +
    %D
    is equivalent to ''%m/%d/%y''. [tm_mon, tm_mday, tm_year] +
    %e
    is replaced by the day of the month as a decimal number (1-31); a single digit is + preceded by a space. [tm_mday] +
    %F
    is equivalent to ''%Y-%m-%d'' (the ISO 8601 date format). [tm_year, tm_mon, + tm_mday] +
    %g
    is replaced by the last 2 digits of the week-based year (see below) as a decimal + number (00-99). [tm_year, tm_wday, tm_yday] +
    %G
    is replaced by the week-based year (see below) as a decimal number (e.g., 1997). + [tm_year, tm_wday, tm_yday] +
    %h
    is equivalent to ''%b''. [tm_mon] +
    %H
    is replaced by the hour (24-hour clock) as a decimal number (00-23). [tm_hour] +
    %I
    is replaced by the hour (12-hour clock) as a decimal number (01-12). [tm_hour] +
    %j
    is replaced by the day of the year as a decimal number (001-366). [tm_yday] +
    %m
    is replaced by the month as a decimal number (01-12). [tm_mon] +
    %M
    is replaced by the minute as a decimal number (00-59). [tm_min] +
    %n
    is replaced by a new-line character. +
    %p
    is replaced by the locale's equivalent of the AM/PM designations associated with a + 12-hour clock. [tm_hour] +
    %r
    is replaced by the locale's 12-hour clock time. [tm_hour, tm_min, tm_sec] +
    %R
    is equivalent to ''%H:%M''. [tm_hour, tm_min] +
    %S
    is replaced by the second as a decimal number (00-60). [tm_sec] +
    %t
    is replaced by a horizontal-tab character. +
    %T
    is equivalent to ''%H:%M:%S'' (the ISO 8601 time format). [tm_hour, tm_min, -
    -       tm_sec]
    - %u is replaced by the ISO 8601 weekday as a decimal number (1-7), where Monday -
    -      is 1. [tm_wday]
    - %U is replaced by the week number of the year (the first Sunday as the first day of week -
    -      1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]
    - %V is replaced by the ISO 8601 week number (see below) as a decimal number -
    -      (01-53). [tm_year, tm_wday, tm_yday]
    - %w is replaced by the weekday as a decimal number (0-6), where Sunday is 0. -
    -      [tm_wday]
    - %W is replaced by the week number of the year (the first Monday as the first day of -
    -      week 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday]
    - %x is replaced by the locale's appropriate date representation. [all specified in 7.23.1] - %X is replaced by the locale's appropriate time representation. [all specified in 7.23.1] - %y is replaced by the last 2 digits of the year as a decimal number (00-99). -
    -      [tm_year]
    - %Y is replaced by the year as a decimal number (e.g., 1997). [tm_year] - %z is replaced by the offset from UTC in the ISO 8601 format ''-0430'' (meaning 4 -
    +       tm_sec]
    +
    %u
    is replaced by the ISO 8601 weekday as a decimal number (1-7), where Monday + is 1. [tm_wday] +
    %U
    is replaced by the week number of the year (the first Sunday as the first day of week + 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday] +
    %V
    is replaced by the ISO 8601 week number (see below) as a decimal number + (01-53). [tm_year, tm_wday, tm_yday] +
    %w
    is replaced by the weekday as a decimal number (0-6), where Sunday is 0. + [tm_wday] +
    %W
    is replaced by the week number of the year (the first Monday as the first day of + week 1) as a decimal number (00-53). [tm_year, tm_wday, tm_yday] +
    %x
    is replaced by the locale's appropriate date representation. [all specified in 7.23.1] +
    %X
    is replaced by the locale's appropriate time representation. [all specified in 7.23.1] +
    %y
    is replaced by the last 2 digits of the year as a decimal number (00-99). + [tm_year] +
    %Y
    is replaced by the year as a decimal number (e.g., 1997). [tm_year] +
    %z
    is replaced by the offset from UTC in the ISO 8601 format ''-0430'' (meaning 4 hours 30 minutes behind UTC, west of Greenwich), or by no characters if no time - zone is determinable. [tm_isdst]
    - %Z is replaced by the locale's time zone name or abbreviation, or by no characters if no -
    -      time zone is determinable. [tm_isdst]
    - %% is replaced by %. + zone is determinable. [tm_isdst] +
    %Z
    is replaced by the locale's time zone name or abbreviation, or by no characters if no + time zone is determinable. [tm_isdst] +
    %%
    is replaced by %. +

    Some conversion specifiers can be modified by the inclusion of an E or O modifier character to indicate an alternative format or specification. If the alternative format or specification does not exist for the current locale, the modifier is ignored. - %Ec is replaced by the locale's alternative date and time representation. - %EC is replaced by the name of the base year (period) in the locale's alternative -

    -     representation.
    - %Ex is replaced by the locale's alternative date representation. - %EX is replaced by the locale's alternative time representation. - %Ey is replaced by the offset from %EC (year only) in the locale's alternative -
    -     representation.
    - %EY is replaced by the locale's full alternative year representation. - %Od is replaced by the day of the month, using the locale's alternative numeric symbols -
    +
    +
    %Ec
    is replaced by the locale's alternative date and time representation. +
    %EC
    is replaced by the name of the base year (period) in the locale's alternative + representation. +
    %Ex
    is replaced by the locale's alternative date representation. +
    %EX
    is replaced by the locale's alternative time representation. +
    %Ey
    is replaced by the offset from %EC (year only) in the locale's alternative + representation. +
    %EY
    is replaced by the locale's full alternative year representation. +
    %Od
    is replaced by the day of the month, using the locale's alternative numeric symbols (filled as needed with leading zeros, or with leading spaces if there is no alternative - symbol for zero).
    - %Oe is replaced by the day of the month, using the locale's alternative numeric symbols -
    -     (filled as needed with leading spaces).
    - %OH is replaced by the hour (24-hour clock), using the locale's alternative numeric + symbol for zero). +
    %Oe
    is replaced by the day of the month, using the locale's alternative numeric symbols + (filled as needed with leading spaces). +
    %OH
    is replaced by the hour (24-hour clock), using the locale's alternative numeric -
    -     symbols.
    - %OI is replaced by the hour (12-hour clock), using the locale's alternative numeric -
    -     symbols.
    - %Om is replaced by the month, using the locale's alternative numeric symbols. - %OM is replaced by the minutes, using the locale's alternative numeric symbols. - %OS is replaced by the seconds, using the locale's alternative numeric symbols. - %Ou is replaced by the ISO 8601 weekday as a number in the locale's alternative -
    -     representation, where Monday is 1.
    - %OU is replaced by the week number, using the locale's alternative numeric symbols. - %OV is replaced by the ISO 8601 week number, using the locale's alternative numeric -
    -     symbols.
    - %Ow is replaced by the weekday as a number, using the locale's alternative numeric -
    -     symbols.
    - %OW is replaced by the week number of the year, using the locale's alternative numeric -
    -     symbols.
    - %Oy is replaced by the last 2 digits of the year, using the locale's alternative numeric + symbols. +
    %OI
    is replaced by the hour (12-hour clock), using the locale's alternative numeric + symbols. +
    %Om
    is replaced by the month, using the locale's alternative numeric symbols. +
    %OM
    is replaced by the minutes, using the locale's alternative numeric symbols. +
    %OS
    is replaced by the seconds, using the locale's alternative numeric symbols. +
    %Ou
    is replaced by the ISO 8601 weekday as a number in the locale's alternative + representation, where Monday is 1. +
    %OU
    is replaced by the week number, using the locale's alternative numeric symbols. +
    %OV
    is replaced by the ISO 8601 week number, using the locale's alternative numeric + symbols. +
    %Ow
    is replaced by the weekday as a number, using the locale's alternative numeric + symbols. +
    %OW
    is replaced by the week number of the year, using the locale's alternative numeric + symbols. +
    %Oy
    is replaced by the last 2 digits of the year, using the locale's alternative numeric + symbols. +

    -

    -     symbols.
    %g, %G, and %V give values according to the ISO 8601 week-based year. In this system, weeks begin on a Monday and week 1 of the year is the week that includes January 4th, which is also the week that includes the first Thursday of the year, and is also the first @@ -16617,16 +16549,18 @@ unsigned long long int

    In the "C" locale, the E and O modifiers are ignored and the replacement strings for the following specifiers are: - %a the first three characters of %A. - %A one of ''Sunday'', ''Monday'', ... , ''Saturday''. - %b the first three characters of %B. - %B one of ''January'', ''February'', ... , ''December''. - %c equivalent to ''%a %b %e %T %Y''. - %p one of ''AM'' or ''PM''. - %r equivalent to ''%I:%M:%S %p''. - %x equivalent to ''%m/%d/%y''. - %X equivalent to %T. - %Z implementation-defined. +

    +
    %a
    the first three characters of %A. +
    %A
    one of ''Sunday'', ''Monday'', ... , ''Saturday''. +
    %b
    the first three characters of %B. +
    %B
    one of ''January'', ''February'', ... , ''December''. +
    %c
    equivalent to ''%a %b %e %T %Y''. +
    %p
    one of ''AM'' or ''PM''. +
    %r
    equivalent to ''%I:%M:%S %p''. +
    %x
    equivalent to ''%m/%d/%y''. +
    %X
    equivalent to %T. +
    %Z
    implementation-defined. +
    Returns

    @@ -16761,105 +16695,93 @@ unsigned long long int precision were omitted.

    The flag wide characters and their meanings are: - - The result of the conversion is left-justified within the field. (It is right-justified if -

    -          this flag is not specified.)
    - + The result of a signed conversion always begins with a plus or minus sign. (It -
    +
    +
    -
    The result of the conversion is left-justified within the field. (It is right-justified if + this flag is not specified.) +
    +
    The result of a signed conversion always begins with a plus or minus sign. (It begins with a sign only when a negative value is converted if this flag is not - specified.)282)
    - space If the first wide character of a signed conversion is not a sign, or if a signed -
    +          specified.)282)
    +
    space
    If the first wide character of a signed conversion is not a sign, or if a signed conversion results in no wide characters, a space is prefixed to the result. If the - space and + flags both appear, the space flag is ignored.
    - # The result is converted to an ''alternative form''. For o conversion, it increases -
    +       space and + flags both appear, the space flag is ignored.
    +
    #
    The result is converted to an ''alternative form''. For o conversion, it increases the precision, if and only if necessary, to force the first digit of the result to be a zero (if the value and precision are both 0, a single 0 is printed). For x (or X) - conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g,
    + conversion, a nonzero result has 0x (or 0X) prefixed to it. For a, A, e, E, f, F, g, -
                and G conversions, the result of converting a floating-point number always
                contains a decimal-point wide character, even if no digits follow it. (Normally, a
                decimal-point wide character appears in the result of these conversions only if a
                digit follows it.) For g and G conversions, trailing zeros are not removed from the
    -           result. For other conversions, the behavior is undefined.
    - 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros -

    -

    +           result. For other conversions, the behavior is undefined.
    +
    0
    For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros (following any indication of sign or base) are used to pad to the field width rather than performing space padding, except when converting an infinity or NaN. If the 0 and - flags both appear, the 0 flag is ignored. For d, i, o, u, x, and X conversions, if a precision is specified, the 0 flag is ignored. For other - conversions, the behavior is undefined.
    + conversions, the behavior is undefined. + +

    The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -

    +
    +
    hh
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a signed char or unsigned char argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to signed char or unsigned char before printing); or that a following n conversion specifier applies to a pointer to a signed char - argument.
    - h Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                argument.
    +
    h
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a short int or unsigned short int argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to short int or unsigned short int before printing); or that a following n conversion specifier applies to a pointer to a short - int argument.
    - l (ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                int argument.
    +
    l (ell)
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long int or unsigned long int argument; that a following n conversion specifier applies to a pointer to a long int argument; that a following c conversion specifier applies to a wint_t argument; that a following s conversion specifier applies to a pointer to a wchar_t argument; or has no effect on a following a, A, e, E, f, F, g, or G conversion - specifier.
    - ll (ell-ell) Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                specifier.
    +
    ll (ell-ell)
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a long long int or unsigned long long int argument; or that a following n conversion specifier applies to a pointer to a long long int - argument.
    - j Specifies that a following d, i, o, u, x, or X conversion specifier applies to + argument. +
    j
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to -
                     an intmax_t or uintmax_t argument; or that a following n conversion
    -                specifier applies to a pointer to an intmax_t argument.
    - z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +                specifier applies to a pointer to an intmax_t argument.
    +
    z
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a size_t or the corresponding signed integer type argument; or that a following n conversion specifier applies to a pointer to a signed integer type - corresponding to size_t argument.
    - t Specifies that a following d, i, o, u, x, or X conversion specifier applies to a -
    +             corresponding to size_t argument.
    +
    t
    Specifies that a following d, i, o, u, x, or X conversion specifier applies to a ptrdiff_t or the corresponding unsigned integer type argument; or that a following n conversion specifier applies to a pointer to a ptrdiff_t - argument.
    - L Specifies that a following a, A, e, E, f, F, g, or G conversion specifier -
    -             applies to a long double argument.
    + argument. +
    L
    Specifies that a following a, A, e, E, f, F, g, or G conversion specifier + applies to a long double argument. + If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined.

    The conversion specifiers and their meanings are: - d,i The int argument is converted to signed decimal in the style [-]dddd. The -

    +
    +
    d,i
    The int argument is converted to signed decimal in the style [-]dddd. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a zero - value with a precision of zero is no wide characters.
    - o,u,x,X The unsigned int argument is converted to unsigned octal (o), unsigned -
    +            value with a precision of zero is no wide characters.
    +
    o,u,x,X
    The unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal notation (x or X) in the style dddd; the letters abcdef are used for x conversion and the letters ABCDEF for X conversion. The precision specifies the minimum number of digits to appear; if the value being converted can be represented in fewer digits, it is expanded with leading zeros. The default precision is 1. The result of converting a - zero value with a precision of zero is no wide characters.
    - f,F A double argument representing a floating-point number is converted to + zero value with a precision of zero is no wide characters. +
    f,F
    A double argument representing a floating-point number is converted to -
                 decimal notation in the style [-]ddd.ddd, where the number of digits after
                 the decimal-point wide character is equal to the precision specification. If the
                 precision is missing, it is taken as 6; if the precision is zero and the # flag is
    @@ -16872,9 +16794,8 @@ unsigned long long int
    [-]nan or [-]nan(n-wchar-sequence) -- which style, and the meaning of any n-wchar-sequence, is implementation-defined. The F conversion specifier produces INF, INFINITY, or NAN instead of inf, infinity, or - nan, respectively.283) - e,E A double argument representing a floating-point number is converted in the -
    +              nan, respectively.283)
    +
    e,E
    A double argument representing a floating-point number is converted in the style [-]d.ddd e(+-)dd, where there is one digit (which is nonzero if the argument is nonzero) before the decimal-point wide character and the number of digits after it is equal to the precision; if the precision is missing, it is taken @@ -16885,32 +16806,29 @@ unsigned long long int
    and only as many more digits as necessary to represent the exponent. If the value is zero, the exponent is zero. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier. - g,G A double argument representing a floating-point number is converted in -
    +              of an f or F conversion specifier.
    +
    g,G
    A double argument representing a floating-point number is converted in style f or e (or in style F or E in the case of a G conversion specifier), depending on the value converted and the precision. Let P equal the precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero. Then, if a conversion with style E would have an exponent of X : - -- if P > X >= -4, the conversion is with style f (or F) and precision +
      +
    • if P > X >= -4, the conversion is with style f (or F) and precision P - (X + 1). - -- otherwise, the conversion is with style e (or E) and precision P - 1. +
    • otherwise, the conversion is with style e (or E) and precision P - 1. +
    Finally, unless the # flag is used, any trailing zeros are removed from the fractional portion of the result and the decimal-point wide character is removed if there is no fractional portion remaining. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier.
    - a,A A double argument representing a floating-point number is converted in the -
    +              of an f or F conversion specifier.
    +
    a,A
    A double argument representing a floating-point number is converted in the style [-]0xh.hhhh p(+-)d, where there is one hexadecimal digit (which is nonzero if the argument is a normalized floating-point number and is otherwise unspecified) before the decimal-point wide character284) and the number of hexadecimal digits after it is equal to the precision; if the precision - is missing and FLT_RADIX is a power of 2, then the precision is sufficient
    - - + is missing and FLT_RADIX is a power of 2, then the precision is sufficient -
                   for an exact representation of the value; if the precision is missing and
                   FLT_RADIX is not a power of 2, then the precision is sufficient to
                   distinguish285) values of type double, except that trailing zeros may be
    @@ -16922,14 +16840,12 @@ unsigned long long int
    represent the decimal exponent of 2. If the value is zero, the exponent is zero. A double argument representing an infinity or NaN is converted in the style - of an f or F conversion specifier. - c If no l length modifier is present, the int argument is converted to a wide -
    +              of an f or F conversion specifier.
    +
    c
    If no l length modifier is present, the int argument is converted to a wide character as if by calling btowc and the resulting wide character is written. If an l length modifier is present, the wint_t argument is converted to - wchar_t and written.
    - s If no l length modifier is present, the argument shall be a pointer to the initial -
    +              wchar_t and written.
    +
    s
    If no l length modifier is present, the argument shall be a pointer to the initial element of a character array containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted as if by repeated calls to the mbrtowc function, with the conversion state @@ -16944,24 +16860,20 @@ unsigned long long int
    written up to (but not including) a terminating null wide character. If the precision is specified, no more than that many wide characters are written. If the precision is not specified or is greater than the size of the array, the array - shall contain a null wide character. - p The argument shall be a pointer to void. The value of the pointer is -
    -              converted to a sequence of printing wide characters, in an implementation-
    - + shall contain a null wide character. +
    p
    The argument shall be a pointer to void. The value of the pointer is + converted to a sequence of printing wide characters, in an implementation- -
    -                defined manner.
    - n The argument shall be a pointer to signed integer into which is written the -
    +                defined manner.
    +
    n
    The argument shall be a pointer to signed integer into which is written the number of wide characters written to the output stream so far by this call to fwprintf. No argument is converted, but one is consumed. If the conversion specification includes any flags, a field width, or a precision, the - behavior is undefined.
    - % A % wide character is written. No argument is converted. The complete + behavior is undefined. +
    %
    A % wide character is written. No argument is converted. The complete + conversion specification shall be %%. +

    -

    -                conversion specification shall be %%.
    If a conversion specification is invalid, the behavior is undefined.286) If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined. @@ -16993,7 +16905,7 @@ unsigned long long int value if an output or encoding error occurred. - Environmental limits +
    Environmental limits

    The number of wide characters that can be produced by any single conversion shall be at least 4095. @@ -17026,7 +16938,7 @@ unsigned long long int

    284) Binary implementations can choose the hexadecimal digit to the left of the decimal-point wide character so that subsequent digits align to nibble (4-bit) boundaries. -

    285) The precision p is sufficient to distinguish values of the source type if 16 p-1 > b n where b is +

    285) The precision p is sufficient to distinguish values of the source type if 16p-1 > b n where b is FLT_RADIX and n is the number of base-b digits in the significand of the source type. A smaller p might suffice depending on the implementation's scheme for determining the digit to the left of the decimal-point wide character. @@ -17113,73 +17025,61 @@ unsigned long long int represented in the object, the behavior is undefined.

    The length modifiers and their meanings are: - hh Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -

    -             to an argument with type pointer to signed char or unsigned char.
    - h Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    +
    +
    hh
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies + to an argument with type pointer to signed char or unsigned char. +
    h
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to short int or unsigned short - int.
    - l (ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    +             int.
    +
    l (ell)
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to long int or unsigned long int; that a following a, A, e, E, f, F, g, or G conversion specifier applies to an argument with type pointer to double; or that a following c, s, or [ - conversion specifier applies to an argument with type pointer to wchar_t.
    - ll (ell-ell) Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    +             conversion specifier applies to an argument with type pointer to wchar_t.
    +
    ll (ell-ell)
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to long long int or unsigned - long long int.
    - j Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    -             to an argument with type pointer to intmax_t or uintmax_t.
    - z Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    +              long long int.
    +
    j
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies + to an argument with type pointer to intmax_t or uintmax_t. +
    z
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to size_t or the corresponding signed - integer type.
    - t Specifies that a following d, i, o, u, x, X, or n conversion specifier applies -
    +             integer type.
    +
    t
    Specifies that a following d, i, o, u, x, X, or n conversion specifier applies to an argument with type pointer to ptrdiff_t or the corresponding - unsigned integer type.
    - L Specifies that a following a, A, e, E, f, F, g, or G conversion specifier -
    -             applies to an argument with type pointer to long double.
    + unsigned integer type. +
    L
    Specifies that a following a, A, e, E, f, F, g, or G conversion specifier + applies to an argument with type pointer to long double. + If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined.

    The conversion specifiers and their meanings are: - d Matches an optionally signed decimal integer, whose format is the same as -

    +
    +
    d
    Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the wcstol function with the value 10 for the base argument. The corresponding argument shall be a pointer to - signed integer.
    - i Matches an optionally signed integer, whose format is the same as expected + signed integer. +
    i
    Matches an optionally signed integer, whose format is the same as expected -
                 for the subject sequence of the wcstol function with the value 0 for the
                 base argument. The corresponding argument shall be a pointer to signed
    -             integer.
    - o Matches an optionally signed octal integer, whose format is the same as -
    +             integer.
    +
    o
    Matches an optionally signed octal integer, whose format is the same as expected for the subject sequence of the wcstoul function with the value 8 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
    - u Matches an optionally signed decimal integer, whose format is the same as -
    +             unsigned integer.
    +
    u
    Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the wcstoul function with the value 10 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
    - x Matches an optionally signed hexadecimal integer, whose format is the same -
    +             unsigned integer.
    +
    x
    Matches an optionally signed hexadecimal integer, whose format is the same as expected for the subject sequence of the wcstoul function with the value 16 for the base argument. The corresponding argument shall be a pointer to - unsigned integer.
    - a,e,f,g Matches an optionally signed floating-point number, infinity, or NaN, whose -
    +             unsigned integer.
    +
    a,e,f,g
    Matches an optionally signed floating-point number, infinity, or NaN, whose format is the same as expected for the subject sequence of the wcstod - function. The corresponding argument shall be a pointer to floating.
    - c Matches a sequence of wide characters of exactly the number specified by the -
    +         function. The corresponding argument shall be a pointer to floating.
    +
    c
    Matches a sequence of wide characters of exactly the number specified by the field width (1 if no field width is present in the directive). If no l length modifier is present, characters from the input field are converted as if by repeated calls to the wcrtomb function, with the @@ -17189,10 +17089,9 @@ unsigned long long int
    accept the sequence. No null character is added. If an l length modifier is present, the corresponding argument shall be a pointer to the initial element of an array of wchar_t large enough to accept - the sequence. No null wide character is added. - s Matches a sequence of non-white-space wide characters. + the sequence. No null wide character is added. +
    s
    Matches a sequence of non-white-space wide characters. -
                  If no l length modifier is present, characters from the input field are
                  converted as if by repeated calls to the wcrtomb function, with the
                  conversion state described by an mbstate_t object initialized to zero
    @@ -17203,9 +17102,8 @@ unsigned long long int
    If an l length modifier is present, the corresponding argument shall be a pointer to the initial element of an array of wchar_t large enough to accept the sequence and the terminating null wide character, which will be added - automatically. - [ Matches a nonempty sequence of wide characters from a set of expected -
    +          automatically.
    +
    [
    Matches a nonempty sequence of wide characters from a set of expected characters (the scanset). If no l length modifier is present, characters from the input field are converted as if by repeated calls to the wcrtomb function, with the @@ -17229,29 +17127,27 @@ unsigned long long int
    the specification; otherwise the first following right bracket wide character is the one that ends the specification. If a - wide character is in the scanlist and is not the first, nor the second where the first wide character is a ^, nor the - last character, the behavior is implementation-defined. - p Matches an implementation-defined set of sequences, which should be the -
    +          last character, the behavior is implementation-defined.
    +
    p
    Matches an implementation-defined set of sequences, which should be the same as the set of sequences that may be produced by the %p conversion of the fwprintf function. The corresponding argument shall be a pointer to a pointer to void. The input item is converted to a pointer value in an implementation-defined manner. If the input item is a value converted earlier during the same program execution, the pointer that results shall compare - equal to that value; otherwise the behavior of the %p conversion is undefined.
    - n No input is consumed. The corresponding argument shall be a pointer to + equal to that value; otherwise the behavior of the %p conversion is undefined. +
    n
    No input is consumed. The corresponding argument shall be a pointer to -
               signed integer into which is to be written the number of wide characters read
               from the input stream so far by this call to the fwscanf function. Execution
               of a %n directive does not increment the assignment count returned at the
               completion of execution of the fwscanf function. No argument is
                     converted, but one is consumed. If the conversion specification includes an
                     assignment-suppressing wide character or a field width, the behavior is
    -                undefined.
    - % Matches a single % wide character; no conversion or assignment occurs. The + undefined. +
    %
    Matches a single % wide character; no conversion or assignment occurs. The + complete conversion specification shall be %%. +

    -

    -                complete conversion specification shall be %%.
    If a conversion specification is invalid, the behavior is undefined.290)

    The conversion specifiers A, E, F, G, and X are also valid and behave the same as, @@ -17413,7 +17309,7 @@ unsigned long long int The vfwscanf function is equivalent to fwscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vfwscanf function does not invoke the - va_end macro.291) + va_end macro.291)

    Returns

    The vfwscanf function returns the value of the macro EOF if an input failure occurs @@ -17436,7 +17332,7 @@ unsigned long long int The vswprintf function is equivalent to swprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vswprintf function does not invoke the - va_end macro.291) + va_end macro.291)

    Returns

    The vswprintf function returns the number of wide characters written in the array, not @@ -17458,7 +17354,7 @@ unsigned long long int The vswscanf function is equivalent to swscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vswscanf function does not invoke the - va_end macro.291) + va_end macro.291)

    Returns

    The vswscanf function returns the value of the macro EOF if an input failure occurs @@ -17479,7 +17375,7 @@ unsigned long long int The vwprintf function is equivalent to wprintf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vwprintf function does not invoke the - va_end macro.291) + va_end macro.291)

    Returns

    The vwprintf function returns the number of wide characters transmitted, or a negative @@ -17499,7 +17395,7 @@ unsigned long long int The vwscanf function is equivalent to wscanf, with the variable argument list replaced by arg, which shall have been initialized by the va_start macro (and possibly subsequent va_arg calls). The vwscanf function does not invoke the - va_end macro.291) + va_end macro.291)

    Returns

    The vwscanf function returns the value of the macro EOF if an input failure occurs @@ -17807,7 +17703,7 @@ unsigned long long int decimal-point wide character, then an optional binary exponent part as defined in 6.4.4.2;

  • INF or INFINITY, or any other wide string equivalent except for case -
  • NAN or NAN(n-wchar-sequenceopt), or any other wide string equivalent except for +
  • NAN or NAN(n-wchar-sequenceopt), or any other wide string equivalent except for case in the NAN part, where:
               n-wchar-sequence:
    @@ -17833,7 +17729,7 @@ unsigned long long int
    sign, the sequence is interpreted as negated.294) A wide character sequence INF or INFINITY is interpreted as an infinity, if representable in the return type, else like a floating constant that is too large for the range of the return type. A wide character - sequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supported + sequence NAN or NAN(n-wchar-sequenceopt) is interpreted as a quiet NaN, if supported in the return type, else like a subject sequence part that does not have the expected form; the meaning of the n-wchar sequences is implementation-defined.295) A pointer to the final wide string is stored in the object pointed to by endptr, provided that endptr is @@ -18591,23 +18487,20 @@ unsigned long long int

    The mbrtowc function returns the first of the following that applies (given the current conversion state): - 0 if the next n or fewer bytes complete the multibyte character that -

    -                       corresponds to the null wide character (which is the value stored).
    - between 1 and n inclusive if the next n or fewer bytes complete a valid multibyte -
    +
    +
    0
    if the next n or fewer bytes complete the multibyte character that + corresponds to the null wide character (which is the value stored). +
    between 1 and n inclusive
    if the next n or fewer bytes complete a valid multibyte character (which is the value stored); the value returned is the number - of bytes that complete the multibyte character.
    - (size_t)(-2) if the next n bytes contribute to an incomplete (but potentially valid) -
    +                    of bytes that complete the multibyte character.
    +
    (size_t)(-2)
    if the next n bytes contribute to an incomplete (but potentially valid) multibyte character, and all n bytes have been processed (no value is - stored).300)
    - (size_t)(-1) if an encoding error occurs, in which case the next n or fewer bytes -
    +              stored).300)
    +
    (size_t)(-1)
    if an encoding error occurs, in which case the next n or fewer bytes do not contribute to a complete and valid multibyte character (no value is stored); the value of the macro EILSEQ is stored in errno, - and the conversion state is unspecified.
    - + and the conversion state is unspecified. +
    footnotes
    -- 2.20.1