From 1e76e11201fe96db226e6fd39305a42c6300de9b Mon Sep 17 00:00:00 2001 From: nsz Date: Thu, 21 Jul 2011 22:46:21 +0200 Subject: [PATCH] allow same noteindex many times, recognize some new headings --- ann2html.sh | 11 +++++- n1548.html | 104 ++++++++++++++++++++++++++-------------------------- 2 files changed, 61 insertions(+), 54 deletions(-) diff --git a/ann2html.sh b/ann2html.sh index 14c5766..500e36a 100755 --- a/ann2html.sh +++ b/ann2html.sh @@ -161,7 +161,7 @@ seencontents && !seenfore && /^[^@]/ { next } -/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits|Environmental limits)$/ { +/^ ?(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits|Environmental limits)$/ { ss[sid] = ss[sid] "
" $0 "
\n" next } @@ -211,7 +211,14 @@ seencontents && !seenfore && /^[^@]/ { } s = p s p = "" - while (match(s, noteid "\\)")) { + for (;;) { + while (match(s, noteid-1 "\\)")) { + p = p substr(s,1,RSTART-1) + p = p "" noteid-1 ")" + s = substr(s,RSTART+RLENGTH) + } + if (!match(s, noteid "\\)")) + break if (noteid==1 && s !~ /\.1\)/) break p = p substr(s,1,RSTART-1) diff --git a/n1548.html b/n1548.html index 6fbc9f2..47d9b1b 100644 --- a/n1548.html +++ b/n1548.html @@ -2269,7 +2269,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. DBL_TRUE_MIN 1E-37 LDBL_TRUE_MIN 1E-37 - Recommended practice +
Recommended practice

Conversion from (at least) double to decimal with DECIMAL_DIG digits and back should be the identity function. @@ -2786,7 +2786,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. include the atomic types.

A pointer to void shall have the same representation and alignment requirements as a - pointer to a character type.48) Similarly, pointers to qualified or unqualified versions of + pointer to a character type.48) Similarly, pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements. All pointers to structure types shall have the same representation and alignment requirements as each other. All pointers to union types shall have the same representation and @@ -3576,7 +3576,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. When preprocessing tokens are converted to tokens during translation phase 7, if a preprocessing token could be converted to either a keyword or an identifier, it is converted to a keyword. - Implementation limits +

Implementation limits

As discussed in 5.2.4.1, an implementation may limit the number of significant initial characters in an identifier; the limit for an external name (an identifier that has external @@ -3856,7 +3856,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. conversion of a floating constant shall not raise an exceptional condition or a floating- point exception at execution time. All floating constants of the same source form75) shall convert to the same internal format with the same value. - Recommended practice +

Recommended practice

The implementation should produce a diagnostic message if a hexadecimal constant cannot be represented exactly in its evaluation format; the implementation should then @@ -6360,7 +6360,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. struct-or-union identifier occurs other than as part of one of the above forms, and no other declaration of the identifier as a tag is visible, then it declares an incomplete structure or union type, and - declares the identifier as the tag of that type.131) + declares the identifier as the tag of that type.131)

If a type specifier of the form

@@ -6722,7 +6722,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  function uses the inline definition or the external definition.140)
 

A function declared with a _Noreturn function specifier shall not return to its caller. - Recommended practice +

Recommended practice

The implementation should produce a diagnostic message for a function declared with a _Noreturn function specifier that appears to be capable of returning to its caller. @@ -6893,7 +6893,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. then ident has the type specified by the declaration ''T D''. Thus, a declarator in parentheses is identical to the unparenthesized declarator, but the binding of complicated declarators may be altered by parentheses. - Implementation limits +

Implementation limits

As discussed in 5.2.4.1, an implementation may limit the number of pointer, array, and function declarators that modify an arithmetic, structure, union, or void type, either @@ -7892,7 +7892,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. a default label, control jumps to the labeled statement. If no converted case constant expression matches and there is no default label, no part of the switch body is executed. - Implementation limits +

Implementation limits

As discussed in 5.2.4.1, the implementation may limit the number of case values in a switch statement. @@ -9117,7 +9117,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. __FILE__ The presumed name of the current source file (a character string literal).177) __LINE__ The presumed line number (within the current source file) of the current

-            source line (an integer constant).177)
+ source line (an integer constant).177)
__STDC__ The integer constant 1, intended to indicate a conforming implementation. __STDC_HOSTED__ The integer constant 1 if the implementation is a hosted
@@ -10070,7 +10070,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  The CMPLX macros expand to an expression of the specified complex type, with the real
  part having the (converted) value of x and the imaginary part having the (converted)
  value of y.
- Recommended practice
+
Recommended practice

The resulting expression should be suitable for use as an initializer for an object with static or thread storage duration, provided both arguments are likewise suitable. @@ -13000,7 +13000,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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:

then the expression &(t.member-designator) evaluates to an address constant. (If the specified member is a bit-field, the behavior is undefined.) - Recommended practice +
Recommended practice

The types used for size_t and ptrdiff_t should not have an integer conversion rank greater than that of signed long int unless the implementation supports objects @@ -14592,7 +14592,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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 @@ -14710,7 +14710,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. @@ -14779,7 +14779,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. existing file and that will automatically be removed when it is closed or at program termination. If the program terminates abnormally, whether an open temporary file is removed is implementation-defined. The file is opened for update with "wb+" mode. - Recommended practice +

Recommended practice

It should be possible to open at least TMP_MAX temporary files during the lifetime of the program (this limit may be shared with tmpnam) and there should be no limit on the @@ -14820,7 +14820,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. @@ -15323,7 +15323,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded to a hexadecimal floating number with the given precision. - Recommended practice +

Recommended practice

For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly representable in the given precision, the result should be one of the two adjacent numbers @@ -15345,7 +15345,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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. @@ -15573,7 +15573,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.279) + s Matches a sequence of non-white-space characters.279)

                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
@@ -15588,7 +15588,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
                added automatically.
[ Matches a nonempty sequence of characters from a set of expected characters
-               (the scanset).279)
+               (the scanset).279)
                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.
@@ -15943,7 +15943,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.
  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.281)
+ va_end macro.281)
 
Returns

The vfscanf function returns the value of the macro EOF if an input failure occurs @@ -15965,7 +15965,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.281) + va_end macro.281)

Returns

The vprintf function returns the number of characters transmitted, or a negative value @@ -15984,7 +15984,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.281) + macro.281)

Returns

The vscanf function returns the value of the macro EOF if an input failure occurs @@ -16006,7 +16006,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.281) If copying takes place between objects that overlap, the behavior is + va_end macro.281) If copying takes place between objects that overlap, the behavior is undefined.

Returns
@@ -16030,7 +16030,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.281) If copying takes place between objects that overlap, the behavior is + va_end macro.281) If copying takes place between objects that overlap, the behavior is undefined.
Returns

@@ -16051,7 +16051,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.281) + va_end macro.281)

Returns

The vsscanf function returns the value of the macro EOF if an input failure occurs @@ -16658,7 +16658,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null pointer. - Recommended practice +

Recommended practice

If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and the result is not exactly representable, the result should be one of the two numbers in the @@ -16793,7 +16793,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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. @@ -16985,7 +16985,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

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

Environmental limits

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

Returns
@@ -17009,7 +17009,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The at_quick_exit function registers the function pointed to by func, to be called without arguments should quick_exit be called.291) - Environmental limits +

Environmental limits

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

Returns
@@ -17472,7 +17472,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.299) + any.299) @@ -19626,7 +19626,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

For a and A conversions, if FLT_RADIX is a power of 2, the value is correctly rounded to a hexadecimal floating number with the given precision. - Recommended practice +

Recommended practice

For a and A conversions, if FLT_RADIX is not a power of 2 and the result is not exactly representable in the given precision, the result should be one of the two adjacent numbers @@ -19647,7 +19647,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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. @@ -20067,7 +20067,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.327) + va_end macro.327)

Returns

The vfwscanf function returns the value of the macro EOF if an input failure occurs @@ -20090,7 +20090,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.327) + va_end macro.327)

Returns

The vswprintf function returns the number of wide characters written in the array, not @@ -20112,7 +20112,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.327) + va_end macro.327)

Returns

The vswscanf function returns the value of the macro EOF if an input failure occurs @@ -20133,7 +20133,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.327) + va_end macro.327)

Returns

The vwprintf function returns the number of wide characters transmitted, or a negative @@ -20153,7 +20153,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 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.327) + va_end macro.327)

Returns

The vwscanf function returns the value of the macro EOF if an input failure occurs @@ -20502,7 +20502,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a null pointer. - Recommended practice +

Recommended practice

If the subject sequence has the hexadecimal form, FLT_RADIX is not a power of 2, and the result is not exactly representable, the result should be one of the two numbers in the @@ -21596,7 +21596,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

The iswpunct function tests for any printing wide character that is one of a locale- specific set of punctuation wide characters for which neither iswspace nor iswalnum - is true.342) + is true.342)

7.29.2.1.10 The iswspace function
Synopsis
@@ -23926,7 +23926,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. - Recommended practice +
Recommended practice

The long double type should match an IEC 60559 extended format. @@ -24090,7 +24090,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. A contracted expression is correctly rounded (once) and treats infinities, NaNs, signed zeros, subnormals, and the rounding directions in a manner consistent with the basic arithmetic operations covered by IEC 60559. - Recommended practice +

Recommended practice

A contracted expression should raise floating-point exceptions in a manner generally consistent with the basic arithmetic operations. * @@ -24133,7 +24133,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

  • The rounding precision mode (if supported) is set so that results are not shortened.
  • Trapping or stopping (if supported) is disabled on all floating-point exceptions. - Recommended practice +
    Recommended practice

    The implementation should produce a diagnostic message for each translation-time floating-point exception, other than ''inexact'';352) the implementation should then @@ -24466,7 +24466,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. For families of functions, the specifications apply to all of the functions even though only the principal function is shown. Unless otherwise specified, where the symbol ''(+-)'' occurs in both an argument and the result, the result has the same sign as the argument. - Recommended practice +

    Recommended practice

    If a function with one or more NaN arguments returns a NaN result, the result should be the same as one of the NaN arguments (after possible type conversion), except perhaps @@ -27231,7 +27231,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. which expands to a value373) of type size_t. Functions that have parameters of type rsize_t consider it a runtime-constraint violation if the values of those parameters are greater than RSIZE_MAX. - Recommended practice +

    Recommended practice

    Extremely large object sizes are frequently a sign that an object's size was calculated incorrectly. For example, negative numbers appear as very large positive numbers when @@ -27302,7 +27302,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If the file was created successfully, then the pointer to FILE pointed to by streamptr will be set to the pointer to the object controlling the opened file. Otherwise, the pointer to FILE pointed to by streamptr will be set to a null pointer. - Recommended practice +

    Recommended practice
    It should be possible to open at least TMP_MAX_S temporary files during the lifetime of the program (this limit may be shared with tmpnam_s) and there should be no limit on the number simultaneously open other than this limit and any limit on the number of open @@ -27342,7 +27342,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

    The implementation shall behave as if no library function except tmpnam calls the tmpnam_s function.375) - Recommended practice +

    Recommended practice

    After a program obtains a file name using the tmpnam_s function and before the program creates a file with that name, the possibility exists that someone else may create @@ -27358,7 +27358,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

    Otherwise, the tmpnam_s function writes the string in the array pointed to by s and returns zero. - Environmental limits +

    Environmental limits

    The value of the macro TMP_MAX_S shall be at least 25. @@ -28125,7 +28125,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. If end-of-file is encountered and no characters have been read into the array, or if a read error occurs during the operation, then s[0] is set to the null character, and the other elements of s take unspecified values. - Recommended practice +

    Recommended practice

    The fgets function allows properly-written programs to safely process input lines too long to store in the result array. In general this requires that callers of fgets pay @@ -29235,7 +29235,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''.

  • The character new line.
  • The null character. - Recommended practice +
    Recommended practice
    The strftime function allows more flexible formatting and supports locale-specific behavior. If you do not require the exact form of the result string produced by the asctime_s function, consider using the strftime function instead. @@ -29266,7 +29266,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. the form of a string. It is equivalent to
             asctime_s(s, maxsize, localtime_s(timer))
    - Recommended practice +
    Recommended practice
    The strftime function allows more flexible formatting and supports locale-specific behavior. If you do not require the exact form of the result string produced by the ctime_s function, consider using the strftime function instead. -- 2.20.1