From 7b66d3ad4645f68fd8dc1848c28c7256550cc181 Mon Sep 17 00:00:00 2001 From: nsz Date: Mon, 4 Jul 2011 03:02:41 +0200 Subject: [PATCH] add internal links to annexes --- n1256.html | 39 ++++++++++++++++++++------------------- n1516.html | 43 ++++++++++++++++++++++--------------------- tohtml.sh | 28 +++++++++++++++++++--------- 3 files changed, 61 insertions(+), 49 deletions(-) diff --git a/n1256.html b/n1256.html index d92365c..bbf1a1e 100644 --- a/n1256.html +++ b/n1256.html @@ -718,7 +718,7 @@ WG14/N1256 Committee Draft -- Septermber 7, 2007 - 2) A strictly conforming program can use conditional features (such as those in annex F) provided the + 2) A strictly conforming program can use conditional features (such as those in annex F) provided the use is guarded by a #ifdef directive with the appropriate macro. For example: #ifdef __STDC_IEC_559__ /* FE_UPWARD defined */ /* ... */ @@ -927,7 +927,7 @@ preprocessing directives (6.10), trigraph sequences (annex C.) 3 In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce that its value is not used and that no needed side effects are produced (including any caused by @@ -948,7 +948,7 @@ preprocessing directives (6.10), trigraph sequences (annex F for details. The floating-point environment library <fenv.h> provides a programming facility for indicating when these side effects matter, freeing the implementations in other cases. @@ -1565,7 +1565,7 @@ Forward references: conditional inclusion (6.10.1), indicates an optional expression enclosed in braces. 2 When syntactic categories are referred to in the main text, they are not italicized and words are separated by spaces instead of hyphens. -3 A summary of the language syntax is given in annex A. +3 A summary of the language syntax is given in annex A. 6.2 Concepts 6.2.1 Scopes of identifiers 1 An identifier can denote an object; a function; a tag or a member of a structure, union, or @@ -1788,7 +1788,7 @@ Forward references: conditional inclusion (6.10.1), 31) The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions. 32) See ''future language directions'' (6.11.1). - 33) A specification for imaginary types is in informative annex G. + 33) A specification for imaginary types is in informative annex G. 34) An implementation may define new keywords that provide alternative ways to designate a basic (or any other) type; this does not violate the requirement that all basic types be different. Implementation-defined keywords shall have the form of an identifier reserved for any use as @@ -2389,7 +2389,7 @@ Forward references: conditional inclusion (6.10.1), - 59) One possible specification for imaginary types appears in annex G. + 59) One possible specification for imaginary types appears in annex G. [page 50] (Contents) @@ -2417,7 +2417,7 @@ Forward references: conditional inclusion (6.10.1), one or more entities as described in 6.2.1. Lowercase and uppercase letters are distinct. There is no specific limit on the maximum length of an identifier. 3 Each universal character name in an identifier shall designate a character whose encoding - in ISO/IEC 10646 falls into one of the ranges specified in annex D.60) The initial + in ISO/IEC 10646 falls into one of the ranges specified in annex D.60) The initial character shall not be a universal character name designating a digit. An implementation may allow multibyte characters that are not part of the basic source character set to appear in identifiers; which characters and their correspondence to universal character @@ -6843,9 +6843,9 @@ Forward references: conditional inclusion (6.10.1), 2 The following macro names are conditionally defined by the implementation: __STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the - specifications in annex F (IEC 60559 floating-point arithmetic). + specifications in annex F (IEC 60559 floating-point arithmetic). __STDC_IEC_559_COMPLEX__ The integer constant 1, intended to indicate - adherence to the specifications in informative annex G (IEC 60559 + adherence to the specifications in informative annex G (IEC 60559 compatible complex arithmetic). __STDC_ISO_10646__ An integer constant of the form yyyymmL (for example, 199712L). If this symbol is defined, then every character in the Unicode @@ -6993,7 +6993,7 @@ replacement, as in: fully protected by parentheses where necessary, so that it groups in an arbitrary expression as if it were a single identifier. 6 Any declaration of a library function shall have external linkage. -7 A summary of the contents of the standard headers is given in annex B. +7 A summary of the contents of the standard headers is given in annex B. Forward references: diagnostics (7.2). @@ -7181,13 +7181,13 @@ replacement, as in: defined, I shall expand to _Complex_I. 5 Notwithstanding the provisions of 7.1.3, a program may undefine and perhaps then redefine the macros complex, imaginary, and I. - Forward references: IEC 60559-compatible complex arithmetic (annex G). + Forward references: IEC 60559-compatible complex arithmetic (annex G). 166) See ''future library directions'' (7.26.1). 167) The imaginary unit is a number i such that i 2 = -1. - 168) A specification for imaginary types is in informative annex G. + 168) A specification for imaginary types is in informative annex G. [page 170] (Contents) @@ -7197,13 +7197,13 @@ replacement, as in: 7.3.3 Branch cuts 1 Some of the functions below have branch cuts, across which the function is discontinuous. For implementations with a signed zero (including all IEC 60559 - implementations) that follow the specifications of annex G, the sign of zero distinguishes + implementations) that follow the specifications of annex G, the sign of zero distinguishes one side of a cut from another so the function is continuous (except for format limitations) as the cut is approached from either side. For example, for the square root function, which has a branch cut along the negative real axis, the top of the cut, with imaginary part +0, maps to the positive imaginary axis, and the bottom of the cut, with imaginary part -0, maps to the negative imaginary axis. -2 Implementations that do not support a signed zero (see annex F) cannot distinguish the +2 Implementations that do not support a signed zero (see annex F) cannot distinguish the sides of branch cuts. These implementations shall map a cut so the function is continuous as the cut is approached coming around the finite endpoint of the cut in a counter clockwise direction. (Branch cuts for the functions specified here have just one finite @@ -18254,7 +18254,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, (informative) IEC 60559-compatible complex arithmetic G.1 Introduction -1 This annex supplements annex F to specify complex arithmetic for compatibility with +1 This annex supplements annex F to specify complex arithmetic for compatibility with IEC 60559 real floating-point arithmetic. Although these specifications have been carefully designed, there is little existing practice to validate the design decisions. Therefore, these specifications are not normative, but should be viewed more as @@ -18512,7 +18512,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, implementations, including IEC 60559 ones, in 7.3.9. These functions raise no floating- point exceptions. 6 Each of the functions cabs and carg is specified by a formula in terms of a real - function (whose special cases are covered in annex F): + function (whose special cases are covered in annex F): cabs(x + iy) = hypot(x, y) carg(x + iy) = atan2(y, x) 7 Each of the functions casin, catan, ccos, csin, and ctan is specified implicitly by @@ -18781,7 +18781,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, H.1 Introduction 1 This annex documents the extent to which the C language supports the ISO/IEC 10967-1 standard for language-independent arithmetic (LIA-1). LIA-1 is more general than - IEC 60559 (annex F) in that it covers integer and diverse floating-point arithmetics. + IEC 60559 (annex F) in that it covers integer and diverse floating-point arithmetics. H.2 Types 1 The relevant C arithmetic types meet the requirements of LIA-1 types if an implementation adds notification of exceptional arithmetic operations and meets the 1 @@ -18830,7 +18830,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, LIA-1. If an implementation adds support for the LIA-1 exceptional values ''underflow'', ''floating_overflow'', and ''"undefined'', then those types are conformant with LIA-1. An implementation that uses IEC 60559 floating-point formats and - operations (see annex F) along with IEC 60559 status flags and traps has LIA-1 + operations (see annex F) along with IEC 60559 status flags and traps has LIA-1 conformant types. H.2.3.1 Floating-point parameters 1 The parameters for a floating point data type can be accessed by the following: @@ -20689,7 +20689,7 @@ islower function, 7.4.1.2, 7.4.1.7 7.4.2.2 isnan macro, 7.12.3.4, F.3 jmp_buf type, 7.13 isnormal macro, 7.12.3.5 jump statements, 6.8.6 -ISO 31-11, 2, 3 +ISO 31-11, 2, 3 ISO 4217, 2, 7.11.2.1 keywords, 6.4.1, G.2, J.5.9, J.5.10 ISO 8601, 2, 7.23.3.5 known constant size, 6.2.5 ISO/IEC 10646, 2, 6.4.2.1, 6.4.3, 6.10.8 @@ -21252,3 +21252,4 @@ wctrans_t type, 7.25.1, 7.25.3.2.27.25.2.2.1, 7.25.2.2.2 [page 540] (Contents) + diff --git a/n1516.html b/n1516.html index fb2cd8d..50b0914 100644 --- a/n1516.html +++ b/n1516.html @@ -879,7 +879,7 @@ margin: deleted text is marked with ''*'', new or changed text with '' ''. 2 NOTE 1 Despite the similar terms, a runtime-constraint is not a kind of constraint as defined by 3.8, and need not be diagnosed at translation time. -3 NOTE 2 Implementations that support the extensions in annex K are required to verify that the runtime- +3 NOTE 2 Implementations that support the extensions in annex K are required to verify that the runtime- constraints for a library function are not violated by the program; see K.3.1.4. [page 6] (Contents) @@ -1176,7 +1176,7 @@ preprocessing directives (6.10), trigraph sequences (annex C.) 4 In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce that its value is not used and that no needed side effects are produced (including any caused by @@ -1186,7 +1186,7 @@ preprocessing directives (6.10), trigraph sequences (annex F for details. The floating-point environment library <fenv.h> provides a programming facility for indicating when these side effects matter, freeing the implementations in other cases. 13) The executions of unsequenced evaluations can interleave. Indeterminately sequenced evaluations @@ -2041,7 +2041,7 @@ Forward references: conditional inclusion (6.10.1), indicates an optional expression enclosed in braces. 2 When syntactic categories are referred to in the main text, they are not italicized and words are separated by spaces instead of hyphens. -3 A summary of the language syntax is given in annex A. +3 A summary of the language syntax is given in annex A. 6.2 Concepts 6.2.1 Scopes of identifiers 1 An identifier can denote an object; a function; a tag or a member of a structure, union, or @@ -2305,7 +2305,7 @@ Forward references: conditional inclusion (6.10.1), - 43) A specification for imaginary types is in informative annex G. + 43) A specification for imaginary types is in informative annex G. 44) An implementation may define new keywords that provide alternative ways to designate a basic (or any other) type; this does not violate the requirement that all basic types be different. Implementation-defined keywords shall have the form of an identifier reserved for any use as @@ -2989,7 +2989,7 @@ Forward references: conditional inclusion (6.10.1), one or more entities as described in 6.2.1. Lowercase and uppercase letters are distinct. There is no specific limit on the maximum length of an identifier. 3 Each universal character name in an identifier shall designate a character whose encoding - in ISO/IEC 10646 falls into one of the ranges specified in annex D.71) The initial + in ISO/IEC 10646 falls into one of the ranges specified in annex D.71) The initial character shall not be a universal character name designating a digit. An implementation may allow multibyte characters that are not part of the basic source character set to appear in identifiers; which characters and their correspondence to universal character @@ -2997,7 +2997,7 @@ Forward references: conditional inclusion (6.10.1), - 70) One possible specification for imaginary types appears in annex G. + 70) One possible specification for imaginary types appears in annex G. 71) On systems in which linkers cannot accept extended characters, an encoding of the universal character name may be used in forming valid external identifiers. For example, some otherwise unused character or sequence of characters may be used to encode the \u in a universal character name. @@ -7696,14 +7696,14 @@ Forward references: conditional inclusion (6.10.1), 6.10.8.3 Conditional feature macros 1 The following macro names are conditionally defined by the implementation: __STDC_ANALYZABLE__ The integer constant 1, intended to indicate conformance to - the specifications in annex L (Analyzability). + the specifications in annex L (Analyzability). __STDC_IEC_559__ The integer constant 1, intended to indicate conformance to the - specifications in annex F (IEC 60559 floating-point arithmetic). + specifications in annex F (IEC 60559 floating-point arithmetic). __STDC_IEC_559_COMPLEX__ The integer constant 1, intended to indicate - adherence to the specifications in informative annex G (IEC 60559 + adherence to the specifications in informative annex G (IEC 60559 compatible complex arithmetic). __STDC_LIB_EXT1__ The integer constant 201ymmL, intended to indicate support - for the extensions defined in annex K (Bounds-checking interfaces).177) + for the extensions defined in annex K (Bounds-checking interfaces).177) __STDC_NO_COMPLEX__ The integer constant 1, intended to indicate that the implementation does not support complex types or the <complex.h> header. @@ -7860,7 +7860,7 @@ Forward references: conditional inclusion (6.10.1), [page 179] (Contents) -7 A summary of the contents of the standard headers is given in annex B. +7 A summary of the contents of the standard headers is given in annex B. Forward references: diagnostics (7.2). 7.1.3 Reserved identifiers 1 Each header declares or defines all identifiers listed in its associated subclause, and @@ -8076,24 +8076,24 @@ Forward references: conditional inclusion (6.10.1), 190) See ''future library directions'' (7.30.1). 191) The imaginary unit is a number i such that i 2 = -1. - 192) A specification for imaginary types is in informative annex G. + 192) A specification for imaginary types is in informative annex G. [page 186] (Contents) - Forward references: IEC 60559-compatible complex arithmetic (annex G). + Forward references: IEC 60559-compatible complex arithmetic (annex G). 7.3.2 Conventions 1 Values are interpreted as radians, not degrees. An implementation may set errno but is not required to. 7.3.3 Branch cuts 1 Some of the functions below have branch cuts, across which the function is discontinuous. For implementations with a signed zero (including all IEC 60559 - implementations) that follow the specifications of annex G, the sign of zero distinguishes + implementations) that follow the specifications of annex G, the sign of zero distinguishes one side of a cut from another so the function is continuous (except for format limitations) as the cut is approached from either side. For example, for the square root function, which has a branch cut along the negative real axis, the top of the cut, with imaginary part +0, maps to the positive imaginary axis, and the bottom of the cut, with imaginary part -0, maps to the negative imaginary axis. -2 Implementations that do not support a signed zero (see annex F) cannot distinguish the +2 Implementations that do not support a signed zero (see annex F) cannot distinguish the sides of branch cuts. These implementations shall map a cut so the function is continuous as the cut is approached coming around the finite endpoint of the cut in a counter clockwise direction. (Branch cuts for the functions specified here have just one finite @@ -20795,7 +20795,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, (informative) IEC 60559-compatible complex arithmetic G.1 Introduction -1 This annex supplements annex F to specify complex arithmetic for compatibility with +1 This annex supplements annex F to specify complex arithmetic for compatibility with IEC 60559 real floating-point arithmetic. Although these specifications have been carefully designed, there is little existing practice to validate the design decisions. Therefore, these specifications are not normative, but should be viewed more as @@ -21053,7 +21053,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, implementations, including IEC 60559 ones, in 7.3.9. These functions raise no floating- point exceptions. 6 Each of the functions cabs and carg is specified by a formula in terms of a real - function (whose special cases are covered in annex F): + function (whose special cases are covered in annex F): cabs(x + iy) = hypot(x, y) carg(x + iy) = atan2(y, x) 7 Each of the functions casin, catan, ccos, csin, and ctan is specified implicitly by @@ -21322,7 +21322,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, H.1 Introduction 1 This annex documents the extent to which the C language supports the ISO/IEC 10967-1 standard for language-independent arithmetic (LIA-1). LIA-1 is more general than - IEC 60559 (annex F) in that it covers integer and diverse floating-point arithmetics. + IEC 60559 (annex F) in that it covers integer and diverse floating-point arithmetics. H.2 Types 1 The relevant C arithmetic types meet the requirements of LIA-1 types if an implementation adds notification of exceptional arithmetic operations and meets the 1 @@ -21371,7 +21371,7 @@ Special characters: 00B5, 00B7, 02B0-02B8, 02BB, 02BD-02C1, 02D0-02D1, LIA-1. If an implementation adds support for the LIA-1 exceptional values ''underflow'', ''floating_overflow'', and ''"undefined'', then those types are conformant with LIA-1. An implementation that uses IEC 60559 floating-point formats and - operations (see annex F) along with IEC 60559 status flags and traps has LIA-1 + operations (see annex F) along with IEC 60559 status flags and traps has LIA-1 conformant types. H.2.3.1 Floating-point parameters 1 The parameters for a floating point data type can be accessed by the following: @@ -26149,7 +26149,7 @@ INT_MAX macro, 5.2.4.2.1, 7.12, 5.2.4.2.1, 7.12 7.4.2.2 integer arithmetic functions, 7.8.2.1, 7.8.2.2, isnan macro, 7.12.3.4, F.3 7.22.6 isnormal macro, 7.12.3.5 -integer character constant, 6.4.4.4 ISO 31-11, 2, 3 +integer character constant, 6.4.4.4 ISO 31-11, 2, 3 integer constant, 6.4.4.1 ISO 4217, 2, 7.11.2.1 integer constant expression, 6.3.2.3, 6.6, 6.7.2.1, ISO 8601, 2, 7.26.3.5 6.7.2.2, 6.7.6.2, 6.7.9, 6.7.10, 6.8.4.2, 6.10.1, ISO/IEC 10646, 2, 6.4.2.1, 6.4.3, 6.10.8.2 @@ -26866,3 +26866,4 @@ WINT_MIN macro, 7.20.3 wint_t type, 7.20.3, 7.21.6.1, 7.28.1, 7.28.2.1, [page 678] (Contents) + diff --git a/tohtml.sh b/tohtml.sh index 1eee1d2..1b2b2b7 100755 --- a/tohtml.sh +++ b/tohtml.sh @@ -71,23 +71,33 @@ BEGIN { r = "[ (][A-Z1-9]\\.[0-9.]*[0-9]" while (match(s, r)) { p = p substr(s,1,RSTART) - l = substr(s,RSTART+1,RLENGTH-1) - if (l ~ /[4-9][0-9]/ || l ~ /[0-3][0-9][0-9]/ || substr(s,RSTART+RLENGTH,1) ~ /[a-zA-Z]/) - p = p l + m = substr(s,RSTART+1,RLENGTH-1) + if (m ~ /[4-9][0-9]/ || m ~ /[0-3][0-9][0-9]/ || substr(s,RSTART+RLENGTH,1) ~ /[a-zA-Z\-]/) + p = p m else - p = p "" l "" + p = p "" m "" + s = substr(s,RSTART+RLENGTH) + } + s = p s + p = "" + while (match(s, /[Aa]nnex [A-Z]/)) { + p = p substr(s,1,RSTART-1) + m = substr(s,RSTART,RLENGTH) + p = p "" m "" s = substr(s,RSTART+RLENGTH) } s = p s p = "" while (match(s, /<[a-zA-Z0-9_]*\.h>/)) { p = p substr(s,1,RSTART-1) - h = substr(s,RSTART,RLENGTH) - if (h in header) - p = p "" h "" + m = substr(s,RSTART,RLENGTH) + if (m in header) + p = p "" m "" else - p = p h + p = p m s = substr(s,RSTART+RLENGTH) } print p s -}' +} + +END { print "" }' -- 2.20.1