gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5067-g2be92f67


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5067-g2be92f67
Date: Sun, 4 Jun 2023 14:13:16 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.2-stable has been updated
       via  2be92f67bce70d6dc77636cc8a6b7bfb74ba2112 (commit)
      from  b4b0b04b82cd63313a04963def3cf8fa5f010369 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=2be92f67bce70d6dc77636cc8a6b7bfb74ba2112

commit 2be92f67bce70d6dc77636cc8a6b7bfb74ba2112
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Jun 4 21:12:57 2023 +0300

    Small fix in gensub. Update tests and doc.

diff --git a/ChangeLog b/ChangeLog
index 6e8e52d1..6c8990cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * builtin.c (do_sub): Fix a Day 1 gensub bug, reported by
+       Denys Vlasenko <dvlasenk@redhat.com>.
+
 2023-06-02         Arnold D. Robbins     <arnold@skeeve.com>
 
        * NEWS: Updated.
diff --git a/builtin.c b/builtin.c
index 0e609220..e394cc34 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3218,6 +3218,8 @@ do_sub(int nargs, unsigned int flags)
                                                                        *bp++ = 
*cp;
                                                        }
                                                        scan++;
+                                               } else if (scan+1 == replend) {
+                                                       *bp++ = *scan;
                                                } else  /* \q for any q --> q */
                                                        *bp++ = *++scan;
                                        } else if (do_posix) {
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 23a6bb6b..7c817613 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawktexi.in (String Functions): Improve doc on gensub()
+       for backslash before non-digit or at end of string.
+
 2023-06-02         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawk.1: Remove last use of \c and fix a typo reported by
diff --git a/doc/gawk.info b/doc/gawk.info
index 56f6002f..8a79dec6 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -13269,6 +13269,11 @@ Options::):
      original unchanged value of TARGET.  Note that, as mentioned above,
      the returned value is a string, even if TARGET was not.
 
+     In the replacement string, a backslash before a non-digit character
+     is simply elided.  For example, ‘\q’ becomes ‘q’ in the result.  
If
+     the final character in the replacement string is a backslash, it is
+     left alone.
+
 ‘gsub(REGEXP, REPLACEMENT’ [‘, TARGET’]‘)’
      Search TARGET for _all_ of the longest, leftmost, _nonoverlapping_
      matching substrings it can find and replace them with REPLACEMENT.
@@ -35787,7 +35792,7 @@ Index
 * * (asterisk), *= operator <1>:         Precedence.          (line  94)
 * * (asterisk), **= operator <1>:        Precedence.          (line  94)
 * * (asterisk), * operator, null strings, matching: String Functions.
-                                                              (line 563)
+                                                              (line 568)
 * + (plus sign), regexp operator:        Regexp Operator Details.
                                                               (line 107)
 * + (plus sign), += operator:            Assignment Ops.      (line  81)
@@ -36169,7 +36174,7 @@ Index
 * arrays, multidimensional, scanning:    Multiscanning.       (line  11)
 * arrays, arrays of arrays:              Arrays of Arrays.    (line   6)
 * arrays, elements, retrieving number of: String Functions.   (line  41)
-* arrays, number of elements:            String Functions.    (line 214)
+* arrays, number of elements:            String Functions.    (line 219)
 * arrays, as parameters to functions:    Pass By Value/Reference.
                                                               (line  44)
 * arrays, associative, library functions and: Library Names.  (line  58)
@@ -36228,7 +36233,7 @@ Index
 * asterisk (*), *= operator <1>:         Precedence.          (line  94)
 * asterisk (*), **= operator <1>:        Precedence.          (line  94)
 * asterisk (*), * operator, null strings, matching: String Functions.
-                                                              (line 563)
+                                                              (line 568)
 * at-sign (@), @include directive:       Include Files.       (line   8)
 * at-sign (@), @load directive:          Loading Shared Libraries.
                                                               (line   8)
@@ -36504,7 +36509,7 @@ Index
 * Brian Kernighan’s awk <9>:             Continue Statement.  (line  44)
 * Brian Kernighan’s awk <10>:            Nextfile Statement.  (line  47)
 * Brian Kernighan’s awk <11>:            Delete.              (line  51)
-* Brian Kernighan’s awk <12>:            String Functions.    (line 510)
+* Brian Kernighan’s awk <12>:            String Functions.    (line 515)
 * Brian Kernighan’s awk <13>:            Gory Details.        (line  19)
 * Brian Kernighan’s awk <14>:            I/O Functions.       (line  43)
 * Brian Kernighan’s awk, extensions:     BTL.                 (line   6)
@@ -36571,7 +36576,7 @@ Index
 * case sensitivity, string comparisons and: User-modified.    (line  79)
 * case sensitivity, regexps and <1>:     User-modified.       (line  79)
 * case sensitivity, array indices and:   Array Intro.         (line 100)
-* case sensitivity, converting case:     String Functions.    (line 540)
+* case sensitivity, converting case:     String Functions.    (line 545)
 * case sensitivity, example programs:    Library Functions.   (line  50)
 * CGI, awk scripts for:                  Options.             (line 146)
 * character sets (machine character encodings): Ordinal Functions.
@@ -36654,7 +36659,7 @@ Index
 * common extensions, **= operator:       Assignment Ops.      (line 139)
 * common extensions, delete to delete entire arrays: Delete.  (line  39)
 * common extensions, length() applied to an array: String Functions.
-                                                              (line 214)
+                                                              (line 219)
 * common extensions, func keyword:       Definition Syntax.   (line  99)
 * common extensions, BINMODE variable:   PC Using.            (line  18)
 * comp.lang.awk newsgroup:               Usenet.              (line  11)
@@ -36712,9 +36717,9 @@ Index
 * converting, numbers to strings:        Strings And Numbers. (line   6)
 * converting, integer array subscripts to strings: Numeric Array Subscripts.
                                                               (line  31)
-* converting, string to numbers <1>:     String Functions.    (line 408)
-* converting, string to lower case:      String Functions.    (line 541)
-* converting, string to upper case:      String Functions.    (line 547)
+* converting, string to numbers <1>:     String Functions.    (line 413)
+* converting, string to lower case:      String Functions.    (line 546)
+* converting, string to upper case:      String Functions.    (line 552)
 * converting, dates to timestamps:       Time Functions.      (line  77)
 * converting, string to numbers <2>:     Bitwise Functions.   (line 110)
 * converting, numbers to strings <1>:    Bitwise Functions.   (line 110)
@@ -36802,9 +36807,9 @@ Index
 * dark corner, array subscripts:         Uninitialized Subscripts.
                                                               (line  43)
 * dark corner, regexp as second argument to index(): String Functions.
-                                                              (line 178)
-* dark corner, length() function:        String Functions.    (line 200)
-* dark corner, split() function:         String Functions.    (line 379)
+                                                              (line 183)
+* dark corner, length() function:        String Functions.    (line 205)
+* dark corner, split() function:         String Functions.    (line 384)
 * dark corner, parameter name restrictions: Definition Syntax.
                                                               (line  44)
 * dark corner <1>:                       Glossary.            (line 266)
@@ -37054,11 +37059,11 @@ Index
 * differences in awk and gawk, function arguments: Calling Built-in.
                                                               (line  16)
 * differences in awk and gawk, length() function: String Functions.
-                                                              (line 214)
+                                                              (line 219)
 * differences in awk and gawk, match() function: String Functions.
-                                                              (line 276)
+                                                              (line 281)
 * differences in awk and gawk, split() function: String Functions.
-                                                              (line 364)
+                                                              (line 369)
 * differences in awk and gawk, indirect function calls: Indirect Calls.
                                                               (line   6)
 * differences in awk and gawk, BINMODE variable <1>: PC Using.
@@ -37336,7 +37341,7 @@ Index
 * extensions, common, **= operator:      Assignment Ops.      (line 139)
 * extensions, common, delete to delete entire arrays: Delete. (line  39)
 * extensions, common, length() applied to an array: String Functions.
-                                                              (line 214)
+                                                              (line 219)
 * extensions, common, fflush() function: I/O Functions.       (line  43)
 * extensions, common, func keyword:      Definition Syntax.   (line  99)
 * extensions, loadable, allocating memory: Memory Allocation Functions.
@@ -37467,7 +37472,7 @@ Index
                                                               (line  80)
 * files, message object, converting from portable object files: I18N Example.
                                                               (line  80)
-* find substring in string:              String Functions.    (line 169)
+* find substring in string:              String Functions.    (line 174)
 * finding extensions:                    Finding Extensions.  (line   6)
 * finish debugger command:               Debugger Execution Control.
                                                               (line  39)
@@ -37503,7 +37508,7 @@ Index
 * format time string:                    Time Functions.      (line  50)
 * formats, numeric output:               OFMT.                (line   6)
 * formatting, output:                    Printf.              (line   6)
-* formatting, strings:                   String Functions.    (line 401)
+* formatting, strings:                   String Functions.    (line 406)
 * forward slash (/), to enclose regular expressions: Regexp.  (line  10)
 * forward slash (/), /= operator:        Assignment Ops.      (line 129)
 * forward slash (/), /= operator, vs. /=.../ regexp constant: Assignment Ops.
@@ -37807,8 +37812,8 @@ Index
 * groups, information about:             Group Functions.     (line   6)
 * gsub:                                  Standard Regexp Constants.
                                                               (line  43)
-* gsub <1>:                              String Functions.    (line 153)
-* gsub() function, arguments of:         String Functions.    (line 480)
+* gsub <1>:                              String Functions.    (line 158)
+* gsub() function, arguments of:         String Functions.    (line 485)
 * gsub() function, escape processing:    Gory Details.        (line   6)
 * Guerrero, Juan Manuel:                 Acknowledgments.     (line  60)
 * Guerrero, Juan Manuel <1>:             Contributors.        (line 150)
@@ -37874,7 +37879,7 @@ Index
 * @include directive:                    Include Files.       (line   8)
 * including files, @include directive:   Include Files.       (line   8)
 * increment operators:                   Increment Ops.       (line   6)
-* index:                                 String Functions.    (line 169)
+* index:                                 String Functions.    (line 174)
 * indexing arrays:                       Array Intro.         (line  49)
 * indirect function calls:               Indirect Calls.      (line   6)
 * indirect function calls, @-notation:   Indirect Calls.      (line  47)
@@ -37900,7 +37905,7 @@ Index
                                                               (line   6)
 * input files, counting elements in:     Wc Program.          (line   6)
 * input pipeline:                        Getline/Pipe.        (line  10)
-* input record, length of:               String Functions.    (line 191)
+* input record, length of:               String Functions.    (line 196)
 * input redirection:                     Getline/File.        (line   6)
 * input/output, from BEGIN and END:      I/O And BEGIN/END.   (line   6)
 * input/output, binary:                  User-modified.       (line  15)
@@ -38020,9 +38025,9 @@ Index
 * left angle bracket (<), <= operator <1>: Precedence.        (line  64)
 * left shift, bitwise:                   Bitwise Functions.   (line  33)
 * leftmost longest match:                Multiple Line.       (line  26)
-* length:                                String Functions.    (line 184)
-* length of input record:                String Functions.    (line 191)
-* length of string:                      String Functions.    (line 184)
+* length:                                String Functions.    (line 189)
+* length of input record:                String Functions.    (line 196)
+* length of string:                      String Functions.    (line 189)
 * Lesser General Public License (LGPL):  Glossary.            (line 489)
 * LGPL (Lesser General Public License):  Glossary.            (line 489)
 * libmawk:                               Other Versions.      (line 153)
@@ -38111,15 +38116,15 @@ Index
 * marked string extraction (internationalization): String Extraction.
                                                               (line   6)
 * Marx, Groucho:                         Increment Ops.       (line  60)
-* match:                                 String Functions.    (line 224)
-* match regexp in string:                String Functions.    (line 224)
+* match:                                 String Functions.    (line 229)
+* match regexp in string:                String Functions.    (line 229)
 * match() function, RSTART/RLENGTH variables: String Functions.
-                                                              (line 241)
-* match() function, side effects:        String Functions.    (line 241)
+                                                              (line 246)
+* match() function, side effects:        String Functions.    (line 246)
 * matching, leftmost longest:            Multiple Line.       (line  26)
 * matching, expressions:                 Typing and Comparison.
                                                               (line   9)
-* matching, null strings:                String Functions.    (line 563)
+* matching, null strings:                String Functions.    (line 568)
 * mawk utility:                          Escape Sequences.    (line 120)
 * mawk utility <1>:                      Getline/Pipe.        (line  62)
 * mawk utility <2>:                      Concatenation.       (line  36)
@@ -38250,9 +38255,9 @@ Index
 * null strings, as array subscripts:     Uninitialized Subscripts.
                                                               (line  43)
 * null strings, deleting array elements and: Delete.          (line  27)
-* null strings, matching:                String Functions.    (line 563)
+* null strings, matching:                String Functions.    (line 568)
 * null strings <3>:                      Basic Data Typing.   (line  26)
-* number of array elements:              String Functions.    (line 214)
+* number of array elements:              String Functions.    (line 219)
 * number sign (#), #! (executable scripts): Executable Scripts.
                                                               (line   6)
 * number sign (#), commenting:           Comments.            (line   6)
@@ -38362,7 +38367,7 @@ Index
 * Path environment variable:             PC Binary Installation.
                                                               (line   6)
 * PATH environment variable:             Derived Files.       (line  94)
-* patsplit:                              String Functions.    (line 310)
+* patsplit:                              String Functions.    (line 315)
 * patterns, default:                     Very Simple.         (line  34)
 * patterns, regexp constants as:         Regexp Usage.        (line   6)
 * patterns:                              Patterns and Actions.
@@ -38432,8 +38437,8 @@ Index
 * portability, operators:                Increment Ops.       (line  60)
 * portability, operators, not in POSIX awk: Precedence.       (line  97)
 * portability, deleting array elements:  Delete.              (line  56)
-* portability, length() function:        String Functions.    (line 193)
-* portability, substr() function:        String Functions.    (line 530)
+* portability, length() function:        String Functions.    (line 198)
+* portability, substr() function:        String Functions.    (line 535)
 * portability, functions, defining:      Definition Syntax.   (line 114)
 * portability, next statement in user-defined functions: Function Caveats.
                                                               (line  26)
@@ -38487,7 +38492,7 @@ Index
 * POSIX awk, continue statement and:     Continue Statement.  (line  44)
 * POSIX awk, next/nextfile statements and: Next Statement.    (line  44)
 * POSIX awk, CONVFMT variable and:       User-modified.       (line  30)
-* POSIX awk, functions and, length():    String Functions.    (line 193)
+* POSIX awk, functions and, length():    String Functions.    (line 198)
 * POSIX awk, functions and, gsub()/sub(): Gory Details.       (line  92)
 * POSIX awk, timestamps and:             Time Functions.      (line   6)
 * POSIX awk, date utility and:           Time Functions.      (line 254)
@@ -38507,7 +38512,7 @@ Index
                                                               (line  12)
 * POSIX mode <9>:                        POSIX String Comparison.
                                                               (line  34)
-* POSIX mode <10>:                       String Functions.    (line 397)
+* POSIX mode <10>:                       String Functions.    (line 402)
 * POSIX mode <11>:                       Controlling Array Traversal.
                                                               (line 226)
 * POSIX mode <12>:                       POSIX Floating Point Problems.
@@ -38737,7 +38742,7 @@ Index
 * regular expressions, as patterns <1>:  Regexp Patterns.     (line   6)
 * regular expressions, case sensitivity <1>: User-modified.   (line  79)
 * regular expressions, searching for:    Egrep Program.       (line   6)
-* replace in string:                     String Functions.    (line 426)
+* replace in string:                     String Functions.    (line 431)
 * retrying input:                        Retrying Input.      (line   6)
 * return debugger command:               Debugger Execution Control.
                                                               (line  54)
@@ -38761,7 +38766,7 @@ Index
 * right shift, bitwise:                  Bitwise Functions.   (line  33)
 * Ritchie, Dennis:                       Basic Data Typing.   (line  54)
 * RLENGTH variable:                      Auto-set.            (line 335)
-* RLENGTH variable, match() function and: String Functions.   (line 241)
+* RLENGTH variable, match() function and: String Functions.   (line 246)
 * Robbins, Miriam:                       Acknowledgments.     (line  94)
 * Robbins, Jean:                         Acknowledgments.     (line  94)
 * Robbins, Harry:                        Acknowledgments.     (line  94)
@@ -38791,7 +38796,7 @@ Index
 * RS variable <1>:                       User-modified.       (line 135)
 * rshift:                                Bitwise Functions.   (line  55)
 * RSTART variable:                       Auto-set.            (line 341)
-* RSTART variable, match() function and: String Functions.    (line 241)
+* RSTART variable, match() function and: String Functions.    (line 246)
 * RT variable:                           awk split records.   (line 118)
 * RT variable <1>:                       gawk split records.  (line  66)
 * RT variable <2>:                       Multiple Line.       (line 138)
@@ -38819,7 +38824,7 @@ Index
 * Schreiber, Bert:                       Acknowledgments.     (line  38)
 * Schreiber, Rita:                       Acknowledgments.     (line  38)
 * search and replace in strings:         String Functions.    (line  98)
-* search for substring:                  String Functions.    (line 169)
+* search for substring:                  String Functions.    (line 174)
 * search paths, for source files:        AWKPATH Variable.    (line   6)
 * search paths, for loadable extensions: AWKLIBPATH Variable. (line   6)
 * search paths:                          Programs Exercises.  (line  70)
@@ -38901,9 +38906,9 @@ Index
 * side effects, statements:              Action Overview.     (line  32)
 * side effects, array indexing:          Reference to Elements.
                                                               (line  43)
-* side effects, match() function:        String Functions.    (line 241)
-* side effects, sub() function:          String Functions.    (line 480)
-* side effects, gsub() function:         String Functions.    (line 480)
+* side effects, match() function:        String Functions.    (line 246)
+* side effects, sub() function:          String Functions.    (line 485)
+* side effects, gsub() function:         String Functions.    (line 485)
 * side effects, asort() function:        Array Sorting Functions.
                                                               (line  24)
 * side effects, asorti() function:       Array Sorting Functions.
@@ -38937,7 +38942,7 @@ Index
                                                               (line 148)
 * sidebar, Operator Evaluation Order:    Increment Ops.       (line  58)
 * sidebar, Changing NR and FNR:          Auto-set.            (line 407)
-* sidebar, Matching the Null String:     String Functions.    (line 561)
+* sidebar, Matching the Null String:     String Functions.    (line 566)
 * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions.
                                                               (line  73)
 * sidebar, Controlling Output Buffering with system(): I/O Functions.
@@ -39011,13 +39016,13 @@ Index
 * source files, search path for:         Programs Exercises.  (line  70)
 * sparse arrays:                         Array Intro.         (line  76)
 * Spencer, Henry:                        Glossary.            (line  16)
-* split:                                 String Functions.    (line 331)
-* split string into array:               String Functions.    (line 310)
+* split:                                 String Functions.    (line 336)
+* split string into array:               String Functions.    (line 315)
 * split utility:                         Split Program.       (line   6)
 * split() function, array elements, deleting: Delete.         (line  61)
 * split.awk program:                     Split Program.       (line  51)
 * sprintf:                               OFMT.                (line  15)
-* sprintf <1>:                           String Functions.    (line 401)
+* sprintf <1>:                           String Functions.    (line 406)
 * sprintf() function, print/printf statements and: Round Function.
                                                               (line   6)
 * sqrt:                                  Numeric Functions.   (line  77)
@@ -39052,8 +39057,8 @@ Index
 * string, constants, vs. regexp constants: Computed Regexps.  (line  40)
 * string, constants:                     Scalar Constants.    (line  15)
 * string, operators:                     Concatenation.       (line   9)
-* string, length:                        String Functions.    (line 184)
-* string, regular expression match of:   String Functions.    (line 224)
+* string, length:                        String Functions.    (line 189)
+* string, regular expression match of:   String Functions.    (line 229)
 * string, extraction (internationalization): String Extraction.
                                                               (line   6)
 * string-manipulation functions:         String Functions.    (line   6)
@@ -39068,23 +39073,23 @@ Index
 * strings, numeric:                      Variable Typing.     (line  67)
 * strings, converting, numbers to:       User-modified.       (line  30)
 * strings, converting, numbers to <1>:   User-modified.       (line 107)
-* strings, splitting, example:           String Functions.    (line 350)
-* strings, converting letter case:       String Functions.    (line 540)
+* strings, splitting, example:           String Functions.    (line 355)
+* strings, converting letter case:       String Functions.    (line 545)
 * strings, converting <1>:               Bitwise Functions.   (line 110)
 * strings, merging arrays into:          Join Function.       (line   6)
 * strings, for localization:             Programmer i18n.     (line  13)
 * strings, extracting:                   String Extraction.   (line   6)
 * strptime() extension function:         Extension Sample Time.
                                                               (line  31)
-* strtonum:                              String Functions.    (line 408)
+* strtonum:                              String Functions.    (line 413)
 * strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data.
                                                               (line  35)
 * STR_CHAIN_MAX environment variable:    Other Environment Variables.
                                                               (line  91)
 * sub:                                   Standard Regexp Constants.
                                                               (line  43)
-* sub <1>:                               String Functions.    (line 426)
-* sub() function, arguments of:          String Functions.    (line 480)
+* sub <1>:                               String Functions.    (line 431)
+* sub() function, arguments of:          String Functions.    (line 485)
 * sub() function, escape processing:     Gory Details.        (line   6)
 * subscript separators:                  User-modified.       (line 148)
 * subscripts in arrays, numbers as:      Numeric Array Subscripts.
@@ -39098,8 +39103,8 @@ Index
 * SUBSEP variable, multidimensional arrays and: Multidimensional.
                                                               (line  16)
 * substitute in string:                  String Functions.    (line  98)
-* substr:                                String Functions.    (line 499)
-* substring:                             String Functions.    (line 499)
+* substr:                                String Functions.    (line 504)
+* substring:                             String Functions.    (line 504)
 * Sumner, Andrew:                        Other Versions.      (line  64)
 * supplementary groups of gawk process:  Auto-set.            (line 292)
 * switch statement:                      Switch Statement.    (line   6)
@@ -39162,8 +39167,8 @@ Index
 * timestamps, converting dates to:       Time Functions.      (line  77)
 * timestamps, formatted:                 Getlocaltime Function.
                                                               (line   6)
-* tolower:                               String Functions.    (line 541)
-* toupper:                               String Functions.    (line 547)
+* tolower:                               String Functions.    (line 546)
+* toupper:                               String Functions.    (line 552)
 * tr utility:                            Translate Program.   (line   6)
 * trace debugger command:                Miscellaneous Debugger Commands.
                                                               (line 108)
@@ -39195,9 +39200,9 @@ Index
 * troubleshooting, function call syntax: Function Calls.      (line  30)
 * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in.
                                                               (line  16)
-* troubleshooting, match() function:     String Functions.    (line 305)
-* troubleshooting, gsub()/sub() functions: String Functions.  (line 490)
-* troubleshooting, substr() function:    String Functions.    (line 517)
+* troubleshooting, match() function:     String Functions.    (line 310)
+* troubleshooting, gsub()/sub() functions: String Functions.  (line 495)
+* troubleshooting, substr() function:    String Functions.    (line 522)
 * troubleshooting, fflush() function:    I/O Functions.       (line  62)
 * troubleshooting, system() function:    I/O Functions.       (line 127)
 * troubleshooting, readable data files:  File Checking.       (line   6)
@@ -39647,369 +39652,369 @@ Ref: Numeric Functions-Footnote-1576578
 Ref: Numeric Functions-Footnote-2577262
 Ref: Numeric Functions-Footnote-3577314
 Node: String Functions577590
-Ref: String Functions-Footnote-1603420
-Ref: String Functions-Footnote-2603554
-Ref: String Functions-Footnote-3603814
-Node: Gory Details603901
-Ref: table-sub-escapes605808
-Ref: table-sub-proposed607454
-Ref: table-posix-sub608964
-Ref: table-gensub-escapes610652
-Ref: Gory Details-Footnote-1611586
-Node: I/O Functions611740
-Ref: table-system-return-values618427
-Ref: I/O Functions-Footnote-1620598
-Ref: I/O Functions-Footnote-2620746
-Node: Time Functions620866
-Ref: Time Functions-Footnote-1632022
-Ref: Time Functions-Footnote-2632098
-Ref: Time Functions-Footnote-3632260
-Ref: Time Functions-Footnote-4632371
-Ref: Time Functions-Footnote-5632489
-Ref: Time Functions-Footnote-6632724
-Node: Bitwise Functions633006
-Ref: table-bitwise-ops633608
-Ref: Bitwise Functions-Footnote-1639862
-Ref: Bitwise Functions-Footnote-2640041
-Node: Type Functions640238
-Node: I18N Functions643831
-Node: User-defined645574
-Node: Definition Syntax646394
-Ref: Definition Syntax-Footnote-1652222
-Node: Function Example652299
-Ref: Function Example-Footnote-1655278
-Node: Function Calling655300
-Node: Calling A Function655894
-Node: Variable Scope656864
-Node: Pass By Value/Reference659918
-Node: Function Caveats662650
-Ref: Function Caveats-Footnote-1664745
-Node: Return Statement664869
-Node: Dynamic Typing667924
-Node: Indirect Calls670325
-Node: Functions Summary681484
-Node: Library Functions684261
-Ref: Library Functions-Footnote-1687809
-Ref: Library Functions-Footnote-2687952
-Node: Library Names688127
-Ref: Library Names-Footnote-1691921
-Ref: Library Names-Footnote-2692148
-Node: General Functions692244
-Node: Strtonum Function693438
-Node: Assert Function696520
-Node: Round Function699972
-Node: Cliff Random Function701550
-Node: Ordinal Functions702583
-Ref: Ordinal Functions-Footnote-1705692
-Ref: Ordinal Functions-Footnote-2705944
-Node: Join Function706158
-Ref: Join Function-Footnote-1707961
-Node: Getlocaltime Function708165
-Node: Readfile Function711939
-Node: Shell Quoting713968
-Node: Isnumeric Function715424
-Node: Data File Management716836
-Node: Filetrans Function717468
-Node: Rewind Function721762
-Node: File Checking723741
-Ref: File Checking-Footnote-1725113
-Node: Empty Files725320
-Node: Ignoring Assigns727387
-Node: Getopt Function728961
-Ref: Getopt Function-Footnote-1744795
-Node: Passwd Functions745007
-Ref: Passwd Functions-Footnote-1754189
-Node: Group Functions754277
-Ref: Group Functions-Footnote-1762415
-Node: Walking Arrays762628
-Node: Library Functions Summary765676
-Node: Library Exercises767100
-Node: Sample Programs767587
-Node: Running Examples768369
-Node: Clones769121
-Node: Cut Program770393
-Node: Egrep Program780834
-Node: Id Program790151
-Node: Split Program800265
-Ref: Split Program-Footnote-1810500
-Node: Tee Program810687
-Node: Uniq Program813596
-Node: Wc Program821461
-Node: Bytes vs. Characters821856
-Node: Using extensions823458
-Node: wc program824238
-Node: Miscellaneous Programs829244
-Node: Dupword Program830473
-Node: Alarm Program832536
-Node: Translate Program837449
-Ref: Translate Program-Footnote-1842190
-Node: Labels Program842468
-Ref: Labels Program-Footnote-1845909
-Node: Word Sorting846001
-Node: History Sorting850195
-Node: Extract Program852470
-Node: Simple Sed860739
-Node: Igawk Program863955
-Ref: Igawk Program-Footnote-1879202
-Ref: Igawk Program-Footnote-2879408
-Ref: Igawk Program-Footnote-3879538
-Node: Anagram Program879665
-Node: Signature Program882761
-Node: Programs Summary884013
-Node: Programs Exercises885271
-Ref: Programs Exercises-Footnote-1889587
-Node: Advanced Features889673
-Node: Nondecimal Data892167
-Node: Boolean Typed Values893797
-Node: Array Sorting895772
-Node: Controlling Array Traversal896501
-Ref: Controlling Array Traversal-Footnote-1905008
-Node: Array Sorting Functions905130
-Ref: Array Sorting Functions-Footnote-1911249
-Node: Two-way I/O911457
-Ref: Two-way I/O-Footnote-1919452
-Ref: Two-way I/O-Footnote-2919643
-Node: TCP/IP Networking919725
-Node: Profiling922905
-Node: Persistent Memory932615
-Ref: Persistent Memory-Footnote-1942225
-Node: Extension Philosophy942356
-Node: Advanced Features Summary943891
-Node: Internationalization946161
-Node: I18N and L10N947867
-Node: Explaining gettext948562
-Ref: Explaining gettext-Footnote-1954715
-Ref: Explaining gettext-Footnote-2954910
-Node: Programmer i18n955075
-Ref: Programmer i18n-Footnote-1960188
-Node: Translator i18n960237
-Node: String Extraction961073
-Ref: String Extraction-Footnote-1962251
-Node: Printf Ordering962349
-Ref: Printf Ordering-Footnote-1965211
-Node: I18N Portability965279
-Ref: I18N Portability-Footnote-1967853
-Node: I18N Example967924
-Ref: I18N Example-Footnote-1971324
-Ref: I18N Example-Footnote-2971400
-Node: Gawk I18N971517
-Node: I18N Summary972173
-Node: Debugger973574
-Node: Debugging974598
-Node: Debugging Concepts975047
-Node: Debugging Terms976873
-Node: Awk Debugging979486
-Ref: Awk Debugging-Footnote-1980463
-Node: Sample Debugging Session980603
-Node: Debugger Invocation981155
-Node: Finding The Bug982784
-Node: List of Debugger Commands989470
-Node: Breakpoint Control990847
-Node: Debugger Execution Control994679
-Node: Viewing And Changing Data998159
-Node: Execution Stack1001897
-Node: Debugger Info1003578
-Node: Miscellaneous Debugger Commands1007877
-Node: Readline Support1013130
-Node: Limitations1014076
-Node: Debugging Summary1016720
-Node: Namespaces1018019
-Node: Global Namespace1019146
-Node: Qualified Names1020591
-Node: Default Namespace1021626
-Node: Changing The Namespace1022401
-Node: Naming Rules1024095
-Node: Internal Name Management1026010
-Node: Namespace Example1027080
-Node: Namespace And Features1029663
-Node: Namespace Summary1031120
-Node: Arbitrary Precision Arithmetic1032633
-Node: Computer Arithmetic1034152
-Ref: table-numeric-ranges1037969
-Ref: table-floating-point-ranges1038467
-Ref: Computer Arithmetic-Footnote-11039126
-Node: Math Definitions1039185
-Ref: table-ieee-formats1042230
-Node: MPFR features1042804
-Node: MPFR On Parole1043257
-Ref: MPFR On Parole-Footnote-11044101
-Node: MPFR Intro1044260
-Node: FP Math Caution1045950
-Ref: FP Math Caution-Footnote-11047024
-Node: Inexactness of computations1047401
-Node: Inexact representation1048432
-Node: Comparing FP Values1049815
-Node: Errors accumulate1051073
-Node: Strange values1052540
-Ref: Strange values-Footnote-11055206
-Node: Getting Accuracy1055311
-Node: Try To Round1058048
-Node: Setting precision1058955
-Ref: table-predefined-precision-strings1059660
-Node: Setting the rounding mode1061545
-Ref: table-gawk-rounding-modes1061927
-Ref: Setting the rounding mode-Footnote-11065985
-Node: Arbitrary Precision Integers1066168
-Ref: Arbitrary Precision Integers-Footnote-11069380
-Node: Checking for MPFR1069536
-Node: POSIX Floating Point Problems1071026
-Ref: POSIX Floating Point Problems-Footnote-11075890
-Node: Floating point summary1075928
-Node: Dynamic Extensions1078192
-Node: Extension Intro1079791
-Node: Plugin License1081099
-Node: Extension Mechanism Outline1081912
-Ref: figure-load-extension1082363
-Ref: figure-register-new-function1083948
-Ref: figure-call-new-function1085058
-Node: Extension API Description1087182
-Node: Extension API Functions Introduction1088911
-Ref: table-api-std-headers1090809
-Node: General Data Types1095273
-Ref: General Data Types-Footnote-11104441
-Node: Memory Allocation Functions1104756
-Ref: Memory Allocation Functions-Footnote-11109481
-Node: Constructor Functions1109580
-Node: API Ownership of MPFR and GMP Values1113485
-Node: Registration Functions1115046
-Node: Extension Functions1115750
-Node: Exit Callback Functions1121326
-Node: Extension Version String1122645
-Node: Input Parsers1123340
-Node: Output Wrappers1137984
-Node: Two-way processors1142832
-Node: Printing Messages1145193
-Ref: Printing Messages-Footnote-11146407
-Node: Updating ERRNO1146562
-Node: Requesting Values1147361
-Ref: table-value-types-returned1148114
-Node: Accessing Parameters1149223
-Node: Symbol Table Access1150507
-Node: Symbol table by name1151023
-Ref: Symbol table by name-Footnote-11154234
-Node: Symbol table by cookie1154366
-Ref: Symbol table by cookie-Footnote-11158647
-Node: Cached values1158711
-Ref: Cached values-Footnote-11162355
-Node: Array Manipulation1162512
-Ref: Array Manipulation-Footnote-11163615
-Node: Array Data Types1163652
-Ref: Array Data Types-Footnote-11166474
-Node: Array Functions1166574
-Node: Flattening Arrays1171603
-Node: Creating Arrays1178655
-Node: Redirection API1183505
-Node: Extension API Variables1186526
-Node: Extension Versioning1187251
-Ref: gawk-api-version1187688
-Node: Extension GMP/MPFR Versioning1189476
-Node: Extension API Informational Variables1191182
-Node: Extension API Boilerplate1192343
-Node: Changes from API V11196479
-Node: Finding Extensions1198113
-Node: Extension Example1198688
-Node: Internal File Description1199512
-Node: Internal File Ops1203836
-Ref: Internal File Ops-Footnote-11215394
-Node: Using Internal File Ops1215542
-Ref: Using Internal File Ops-Footnote-11217973
-Node: Extension Samples1218251
-Node: Extension Sample File Functions1219820
-Node: Extension Sample Fnmatch1227958
-Node: Extension Sample Fork1229553
-Node: Extension Sample Inplace1230829
-Node: Extension Sample Ord1234501
-Node: Extension Sample Readdir1235377
-Ref: table-readdir-file-types1236166
-Node: Extension Sample Revout1237527
-Node: Extension Sample Rev2way1238124
-Node: Extension Sample Read write array1238876
-Node: Extension Sample Readfile1242150
-Node: Extension Sample Time1243281
-Node: Extension Sample API Tests1245571
-Node: gawkextlib1246079
-Node: Extension summary1249115
-Node: Extension Exercises1252973
-Node: Language History1254251
-Node: V7/SVR3.11255965
-Node: SVR41258315
-Node: POSIX1259847
-Node: BTL1261272
-Node: POSIX/GNU1262041
-Node: Feature History1268572
-Node: Common Extensions1287690
-Node: Ranges and Locales1289059
-Ref: Ranges and Locales-Footnote-11293860
-Ref: Ranges and Locales-Footnote-21293887
-Ref: Ranges and Locales-Footnote-31294126
-Node: Contributors1294349
-Node: History summary1300554
-Node: Installation1302000
-Node: Gawk Distribution1302964
-Node: Getting1303456
-Node: Extracting1304455
-Node: Distribution contents1306167
-Node: Unix Installation1314247
-Node: Quick Installation1315069
-Node: Compiling with MPFR1317615
-Node: Shell Startup Files1318321
-Node: Additional Configuration Options1319478
-Node: Configuration Philosophy1321865
-Node: Compiling from Git1324367
-Node: Building the Documentation1324926
-Node: Non-Unix Installation1326338
-Node: PC Installation1326814
-Node: PC Binary Installation1327687
-Node: PC Compiling1328592
-Node: PC Using1329770
-Node: Cygwin1333498
-Node: MSYS1334754
-Node: OpenVMS Installation1335386
-Node: OpenVMS Compilation1336067
-Ref: OpenVMS Compilation-Footnote-11337550
-Node: OpenVMS Dynamic Extensions1337612
-Node: OpenVMS Installation Details1339248
-Node: OpenVMS Running1341683
-Node: OpenVMS GNV1345820
-Node: Bugs1346575
-Node: Bug definition1347499
-Node: Bug address1351150
-Node: Usenet1354741
-Node: Performance bugs1355972
-Node: Asking for help1358990
-Node: Maintainers1360981
-Node: Other Versions1362008
-Node: Installation summary1371351
-Node: Notes1372735
-Node: Compatibility Mode1373545
-Node: Additions1374367
-Node: Accessing The Source1375312
-Node: Adding Code1376847
-Node: New Ports1383983
-Node: Derived Files1388493
-Ref: Derived Files-Footnote-11394340
-Ref: Derived Files-Footnote-21394375
-Ref: Derived Files-Footnote-31394992
-Node: Future Extensions1395106
-Node: Implementation Limitations1395778
-Node: Extension Design1397020
-Node: Old Extension Problems1398184
-Ref: Old Extension Problems-Footnote-11399760
-Node: Extension New Mechanism Goals1399821
-Ref: Extension New Mechanism Goals-Footnote-11403317
-Node: Extension Other Design Decisions1403518
-Node: Extension Future Growth1405717
-Node: Notes summary1406341
-Node: Basic Concepts1407554
-Node: Basic High Level1408239
-Ref: figure-general-flow1408521
-Ref: figure-process-flow1409228
-Ref: Basic High Level-Footnote-11412629
-Node: Basic Data Typing1412818
-Node: Glossary1416236
-Node: Copying1449358
-Node: GNU Free Documentation License1487119
-Node: Index1512442
+Ref: String Functions-Footnote-1603665
+Ref: String Functions-Footnote-2603799
+Ref: String Functions-Footnote-3604059
+Node: Gory Details604146
+Ref: table-sub-escapes606053
+Ref: table-sub-proposed607699
+Ref: table-posix-sub609209
+Ref: table-gensub-escapes610897
+Ref: Gory Details-Footnote-1611831
+Node: I/O Functions611985
+Ref: table-system-return-values618672
+Ref: I/O Functions-Footnote-1620843
+Ref: I/O Functions-Footnote-2620991
+Node: Time Functions621111
+Ref: Time Functions-Footnote-1632267
+Ref: Time Functions-Footnote-2632343
+Ref: Time Functions-Footnote-3632505
+Ref: Time Functions-Footnote-4632616
+Ref: Time Functions-Footnote-5632734
+Ref: Time Functions-Footnote-6632969
+Node: Bitwise Functions633251
+Ref: table-bitwise-ops633853
+Ref: Bitwise Functions-Footnote-1640107
+Ref: Bitwise Functions-Footnote-2640286
+Node: Type Functions640483
+Node: I18N Functions644076
+Node: User-defined645819
+Node: Definition Syntax646639
+Ref: Definition Syntax-Footnote-1652467
+Node: Function Example652544
+Ref: Function Example-Footnote-1655523
+Node: Function Calling655545
+Node: Calling A Function656139
+Node: Variable Scope657109
+Node: Pass By Value/Reference660163
+Node: Function Caveats662895
+Ref: Function Caveats-Footnote-1664990
+Node: Return Statement665114
+Node: Dynamic Typing668169
+Node: Indirect Calls670570
+Node: Functions Summary681729
+Node: Library Functions684506
+Ref: Library Functions-Footnote-1688054
+Ref: Library Functions-Footnote-2688197
+Node: Library Names688372
+Ref: Library Names-Footnote-1692166
+Ref: Library Names-Footnote-2692393
+Node: General Functions692489
+Node: Strtonum Function693683
+Node: Assert Function696765
+Node: Round Function700217
+Node: Cliff Random Function701795
+Node: Ordinal Functions702828
+Ref: Ordinal Functions-Footnote-1705937
+Ref: Ordinal Functions-Footnote-2706189
+Node: Join Function706403
+Ref: Join Function-Footnote-1708206
+Node: Getlocaltime Function708410
+Node: Readfile Function712184
+Node: Shell Quoting714213
+Node: Isnumeric Function715669
+Node: Data File Management717081
+Node: Filetrans Function717713
+Node: Rewind Function722007
+Node: File Checking723986
+Ref: File Checking-Footnote-1725358
+Node: Empty Files725565
+Node: Ignoring Assigns727632
+Node: Getopt Function729206
+Ref: Getopt Function-Footnote-1745040
+Node: Passwd Functions745252
+Ref: Passwd Functions-Footnote-1754434
+Node: Group Functions754522
+Ref: Group Functions-Footnote-1762660
+Node: Walking Arrays762873
+Node: Library Functions Summary765921
+Node: Library Exercises767345
+Node: Sample Programs767832
+Node: Running Examples768614
+Node: Clones769366
+Node: Cut Program770638
+Node: Egrep Program781079
+Node: Id Program790396
+Node: Split Program800510
+Ref: Split Program-Footnote-1810745
+Node: Tee Program810932
+Node: Uniq Program813841
+Node: Wc Program821706
+Node: Bytes vs. Characters822101
+Node: Using extensions823703
+Node: wc program824483
+Node: Miscellaneous Programs829489
+Node: Dupword Program830718
+Node: Alarm Program832781
+Node: Translate Program837694
+Ref: Translate Program-Footnote-1842435
+Node: Labels Program842713
+Ref: Labels Program-Footnote-1846154
+Node: Word Sorting846246
+Node: History Sorting850440
+Node: Extract Program852715
+Node: Simple Sed860984
+Node: Igawk Program864200
+Ref: Igawk Program-Footnote-1879447
+Ref: Igawk Program-Footnote-2879653
+Ref: Igawk Program-Footnote-3879783
+Node: Anagram Program879910
+Node: Signature Program883006
+Node: Programs Summary884258
+Node: Programs Exercises885516
+Ref: Programs Exercises-Footnote-1889832
+Node: Advanced Features889918
+Node: Nondecimal Data892412
+Node: Boolean Typed Values894042
+Node: Array Sorting896017
+Node: Controlling Array Traversal896746
+Ref: Controlling Array Traversal-Footnote-1905253
+Node: Array Sorting Functions905375
+Ref: Array Sorting Functions-Footnote-1911494
+Node: Two-way I/O911702
+Ref: Two-way I/O-Footnote-1919697
+Ref: Two-way I/O-Footnote-2919888
+Node: TCP/IP Networking919970
+Node: Profiling923150
+Node: Persistent Memory932860
+Ref: Persistent Memory-Footnote-1942470
+Node: Extension Philosophy942601
+Node: Advanced Features Summary944136
+Node: Internationalization946406
+Node: I18N and L10N948112
+Node: Explaining gettext948807
+Ref: Explaining gettext-Footnote-1954960
+Ref: Explaining gettext-Footnote-2955155
+Node: Programmer i18n955320
+Ref: Programmer i18n-Footnote-1960433
+Node: Translator i18n960482
+Node: String Extraction961318
+Ref: String Extraction-Footnote-1962496
+Node: Printf Ordering962594
+Ref: Printf Ordering-Footnote-1965456
+Node: I18N Portability965524
+Ref: I18N Portability-Footnote-1968098
+Node: I18N Example968169
+Ref: I18N Example-Footnote-1971569
+Ref: I18N Example-Footnote-2971645
+Node: Gawk I18N971762
+Node: I18N Summary972418
+Node: Debugger973819
+Node: Debugging974843
+Node: Debugging Concepts975292
+Node: Debugging Terms977118
+Node: Awk Debugging979731
+Ref: Awk Debugging-Footnote-1980708
+Node: Sample Debugging Session980848
+Node: Debugger Invocation981400
+Node: Finding The Bug983029
+Node: List of Debugger Commands989715
+Node: Breakpoint Control991092
+Node: Debugger Execution Control994924
+Node: Viewing And Changing Data998404
+Node: Execution Stack1002142
+Node: Debugger Info1003823
+Node: Miscellaneous Debugger Commands1008122
+Node: Readline Support1013375
+Node: Limitations1014321
+Node: Debugging Summary1016965
+Node: Namespaces1018264
+Node: Global Namespace1019391
+Node: Qualified Names1020836
+Node: Default Namespace1021871
+Node: Changing The Namespace1022646
+Node: Naming Rules1024340
+Node: Internal Name Management1026255
+Node: Namespace Example1027325
+Node: Namespace And Features1029908
+Node: Namespace Summary1031365
+Node: Arbitrary Precision Arithmetic1032878
+Node: Computer Arithmetic1034397
+Ref: table-numeric-ranges1038214
+Ref: table-floating-point-ranges1038712
+Ref: Computer Arithmetic-Footnote-11039371
+Node: Math Definitions1039430
+Ref: table-ieee-formats1042475
+Node: MPFR features1043049
+Node: MPFR On Parole1043502
+Ref: MPFR On Parole-Footnote-11044346
+Node: MPFR Intro1044505
+Node: FP Math Caution1046195
+Ref: FP Math Caution-Footnote-11047269
+Node: Inexactness of computations1047646
+Node: Inexact representation1048677
+Node: Comparing FP Values1050060
+Node: Errors accumulate1051318
+Node: Strange values1052785
+Ref: Strange values-Footnote-11055451
+Node: Getting Accuracy1055556
+Node: Try To Round1058293
+Node: Setting precision1059200
+Ref: table-predefined-precision-strings1059905
+Node: Setting the rounding mode1061790
+Ref: table-gawk-rounding-modes1062172
+Ref: Setting the rounding mode-Footnote-11066230
+Node: Arbitrary Precision Integers1066413
+Ref: Arbitrary Precision Integers-Footnote-11069625
+Node: Checking for MPFR1069781
+Node: POSIX Floating Point Problems1071271
+Ref: POSIX Floating Point Problems-Footnote-11076135
+Node: Floating point summary1076173
+Node: Dynamic Extensions1078437
+Node: Extension Intro1080036
+Node: Plugin License1081344
+Node: Extension Mechanism Outline1082157
+Ref: figure-load-extension1082608
+Ref: figure-register-new-function1084193
+Ref: figure-call-new-function1085303
+Node: Extension API Description1087427
+Node: Extension API Functions Introduction1089156
+Ref: table-api-std-headers1091054
+Node: General Data Types1095518
+Ref: General Data Types-Footnote-11104686
+Node: Memory Allocation Functions1105001
+Ref: Memory Allocation Functions-Footnote-11109726
+Node: Constructor Functions1109825
+Node: API Ownership of MPFR and GMP Values1113730
+Node: Registration Functions1115291
+Node: Extension Functions1115995
+Node: Exit Callback Functions1121571
+Node: Extension Version String1122890
+Node: Input Parsers1123585
+Node: Output Wrappers1138229
+Node: Two-way processors1143077
+Node: Printing Messages1145438
+Ref: Printing Messages-Footnote-11146652
+Node: Updating ERRNO1146807
+Node: Requesting Values1147606
+Ref: table-value-types-returned1148359
+Node: Accessing Parameters1149468
+Node: Symbol Table Access1150752
+Node: Symbol table by name1151268
+Ref: Symbol table by name-Footnote-11154479
+Node: Symbol table by cookie1154611
+Ref: Symbol table by cookie-Footnote-11158892
+Node: Cached values1158956
+Ref: Cached values-Footnote-11162600
+Node: Array Manipulation1162757
+Ref: Array Manipulation-Footnote-11163860
+Node: Array Data Types1163897
+Ref: Array Data Types-Footnote-11166719
+Node: Array Functions1166819
+Node: Flattening Arrays1171848
+Node: Creating Arrays1178900
+Node: Redirection API1183750
+Node: Extension API Variables1186771
+Node: Extension Versioning1187496
+Ref: gawk-api-version1187933
+Node: Extension GMP/MPFR Versioning1189721
+Node: Extension API Informational Variables1191427
+Node: Extension API Boilerplate1192588
+Node: Changes from API V11196724
+Node: Finding Extensions1198358
+Node: Extension Example1198933
+Node: Internal File Description1199757
+Node: Internal File Ops1204081
+Ref: Internal File Ops-Footnote-11215639
+Node: Using Internal File Ops1215787
+Ref: Using Internal File Ops-Footnote-11218218
+Node: Extension Samples1218496
+Node: Extension Sample File Functions1220065
+Node: Extension Sample Fnmatch1228203
+Node: Extension Sample Fork1229798
+Node: Extension Sample Inplace1231074
+Node: Extension Sample Ord1234746
+Node: Extension Sample Readdir1235622
+Ref: table-readdir-file-types1236411
+Node: Extension Sample Revout1237772
+Node: Extension Sample Rev2way1238369
+Node: Extension Sample Read write array1239121
+Node: Extension Sample Readfile1242395
+Node: Extension Sample Time1243526
+Node: Extension Sample API Tests1245816
+Node: gawkextlib1246324
+Node: Extension summary1249360
+Node: Extension Exercises1253218
+Node: Language History1254496
+Node: V7/SVR3.11256210
+Node: SVR41258560
+Node: POSIX1260092
+Node: BTL1261517
+Node: POSIX/GNU1262286
+Node: Feature History1268817
+Node: Common Extensions1287935
+Node: Ranges and Locales1289304
+Ref: Ranges and Locales-Footnote-11294105
+Ref: Ranges and Locales-Footnote-21294132
+Ref: Ranges and Locales-Footnote-31294371
+Node: Contributors1294594
+Node: History summary1300799
+Node: Installation1302245
+Node: Gawk Distribution1303209
+Node: Getting1303701
+Node: Extracting1304700
+Node: Distribution contents1306412
+Node: Unix Installation1314492
+Node: Quick Installation1315314
+Node: Compiling with MPFR1317860
+Node: Shell Startup Files1318566
+Node: Additional Configuration Options1319723
+Node: Configuration Philosophy1322110
+Node: Compiling from Git1324612
+Node: Building the Documentation1325171
+Node: Non-Unix Installation1326583
+Node: PC Installation1327059
+Node: PC Binary Installation1327932
+Node: PC Compiling1328837
+Node: PC Using1330015
+Node: Cygwin1333743
+Node: MSYS1334999
+Node: OpenVMS Installation1335631
+Node: OpenVMS Compilation1336312
+Ref: OpenVMS Compilation-Footnote-11337795
+Node: OpenVMS Dynamic Extensions1337857
+Node: OpenVMS Installation Details1339493
+Node: OpenVMS Running1341928
+Node: OpenVMS GNV1346065
+Node: Bugs1346820
+Node: Bug definition1347744
+Node: Bug address1351395
+Node: Usenet1354986
+Node: Performance bugs1356217
+Node: Asking for help1359235
+Node: Maintainers1361226
+Node: Other Versions1362253
+Node: Installation summary1371596
+Node: Notes1372980
+Node: Compatibility Mode1373790
+Node: Additions1374612
+Node: Accessing The Source1375557
+Node: Adding Code1377092
+Node: New Ports1384228
+Node: Derived Files1388738
+Ref: Derived Files-Footnote-11394585
+Ref: Derived Files-Footnote-21394620
+Ref: Derived Files-Footnote-31395237
+Node: Future Extensions1395351
+Node: Implementation Limitations1396023
+Node: Extension Design1397265
+Node: Old Extension Problems1398429
+Ref: Old Extension Problems-Footnote-11400005
+Node: Extension New Mechanism Goals1400066
+Ref: Extension New Mechanism Goals-Footnote-11403562
+Node: Extension Other Design Decisions1403763
+Node: Extension Future Growth1405962
+Node: Notes summary1406586
+Node: Basic Concepts1407799
+Node: Basic High Level1408484
+Ref: figure-general-flow1408766
+Ref: figure-process-flow1409473
+Ref: Basic High Level-Footnote-11412874
+Node: Basic Data Typing1413063
+Node: Glossary1416481
+Node: Copying1449603
+Node: GNU Free Documentation License1487364
+Node: Index1512687
 
 End Tag Table
 
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 854b85e1..5d017e11 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -18937,6 +18937,11 @@ If @var{regexp} does not match @var{target}, 
@code{gensub()}'s return value
 is the original unchanged value of @var{target}.  Note that, as mentioned
 above, the returned value is a string, even if @var{target} was not.
 
+In the replacement string, a backslash before a non-digit character
+is simply elided. For example, @samp{\q} becomes @samp{q} in the result.
+If the final character in the replacement string is a backslash,
+it is left alone.
+
 @item @code{gsub(@var{regexp}, @var{replacement}} [@code{, 
@var{target}}]@code{)}
 @cindexawkfunc{gsub}
 Search @var{target} for
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 65f7aa48..79b7373e 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -18151,6 +18151,11 @@ If @var{regexp} does not match @var{target}, 
@code{gensub()}'s return value
 is the original unchanged value of @var{target}.  Note that, as mentioned
 above, the returned value is a string, even if @var{target} was not.
 
+In the replacement string, a backslash before a non-digit character
+is simply elided. For example, @samp{\q} becomes @samp{q} in the result.
+If the final character in the replacement string is a backslash,
+it is left alone.
+
 @item @code{gsub(@var{regexp}, @var{replacement}} [@code{, 
@var{target}}]@code{)}
 @cindexawkfunc{gsub}
 Search @var{target} for
diff --git a/pc/ChangeLog b/pc/ChangeLog
index ac82cf68..0f3d17fe 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2023-06-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.tst: Regenerated.
+
 2023-05-28         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 609128b5..781f6e55 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -197,7 +197,7 @@ GAWK_EXT_TESTS = \
        elemnew1 elemnew2 elemnew3 errno exit fieldwdth forcenum fpat1 fpat2 \
        fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \
        functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \
-       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \
+       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 gensub4 \
        getlndir gnuops2 gnuops3 gnureops gsubind icasefs icasers id \
        igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe incdupe2 \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
@@ -2930,6 +2930,11 @@ gensub3:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 
|| echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+gensub4:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 getlndir:
        @echo $@ $(ZOS_FAIL)
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 845aa96f..45f95485 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-04         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * Makefile.am (EXTRA_DIST): New test, gensub4.
+       * gensub4.awk, gensub4.ok: New files.
+
 2023-05-28         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (readdir_test): Adjust comparison programs.
diff --git a/test/Makefile.am b/test/Makefile.am
index 96abfe6f..e0b93c16 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -489,6 +489,8 @@ EXTRA_DIST = \
        gensub3.awk \
        gensub3.in \
        gensub3.ok \
+       gensub4.awk \
+       gensub4.ok \
        getfile.awk \
        getfile.ok \
        getline.awk \
@@ -1513,7 +1515,7 @@ GAWK_EXT_TESTS = \
        elemnew1 elemnew2 elemnew3 errno exit fieldwdth forcenum fpat1 fpat2 \
        fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \
        functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \
-       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \
+       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 gensub4 \
        getlndir gnuops2 gnuops3 gnureops gsubind icasefs icasers id \
        igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe incdupe2 \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 3bcaed5b..1d0c56b0 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -757,6 +757,8 @@ EXTRA_DIST = \
        gensub3.awk \
        gensub3.in \
        gensub3.ok \
+       gensub4.awk \
+       gensub4.ok \
        getfile.awk \
        getfile.ok \
        getline.awk \
@@ -1781,7 +1783,7 @@ GAWK_EXT_TESTS = \
        elemnew1 elemnew2 elemnew3 errno exit fieldwdth forcenum fpat1 fpat2 \
        fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs functab1 \
        functab2 functab3 functab6 funlen fwtest fwtest2 fwtest3 fwtest4 \
-       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 \
+       fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 gensub4 \
        getlndir gnuops2 gnuops3 gnureops gsubind icasefs icasers id \
        igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe incdupe2 \
        incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
@@ -4696,6 +4698,11 @@ gensub3:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 
|| echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+gensub4:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 getlndir:
        @echo $@ $(ZOS_FAIL)
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index f532fc92..6bb3e9be 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1617,6 +1617,11 @@ gensub3:
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  < "$(srcdir)"/$@.in >_$@ 2>&1 
|| echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
 
+gensub4:
+       @echo $@
+       @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
+       @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
 getlndir:
        @echo $@ $(ZOS_FAIL)
        @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk  >_$@ 2>&1 || echo EXIT CODE: 
$$? >>_$@
diff --git a/test/gensub4.awk b/test/gensub4.awk
new file mode 100644
index 00000000..06b54974
--- /dev/null
+++ b/test/gensub4.awk
@@ -0,0 +1 @@
+BEGIN { s="b\\";g=gensub("a",s,1,"a");print g }
diff --git a/test/gensub4.ok b/test/gensub4.ok
new file mode 100644
index 00000000..e5d69319
--- /dev/null
+++ b/test/gensub4.ok
@@ -0,0 +1 @@
+b\

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |   5 +
 builtin.c        |   2 +
 doc/ChangeLog    |   5 +
 doc/gawk.info    | 855 ++++++++++++++++++++++++++++---------------------------
 doc/gawk.texi    |   5 +
 doc/gawktexi.in  |   5 +
 pc/ChangeLog     |   4 +
 pc/Makefile.tst  |   7 +-
 test/ChangeLog   |   5 +
 test/Makefile.am |   4 +-
 test/Makefile.in |   9 +-
 test/Maketests   |   5 +
 test/gensub4.awk |   1 +
 test/gensub4.ok  |   1 +
 14 files changed, 485 insertions(+), 428 deletions(-)
 create mode 100644 test/gensub4.awk
 create mode 100644 test/gensub4.ok


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]