summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-09-14 19:30:40 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-09-14 19:30:40 +0300
commit23681ec5b179a4e981781ce2daa08f61cb7317d4 (patch)
tree3b558e0a6e276ba5dae5565aa4fa71770f6ab19a
parentdc03ae8d25acc19f27f015ab568e07f7d24fe2f6 (diff)
parent8a1df492afae19d544fa5e5b636ed427b2d1c3f5 (diff)
downloadgawk-23681ec5b179a4e981781ce2daa08f61cb7317d4.tar.gz
Merge branch 'gawk-4.1-stable'
-rw-r--r--ChangeLog6
-rw-r--r--awkgram.c35
-rw-r--r--awkgram.y35
-rw-r--r--awklib/eg/lib/strtonum.awk8
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info746
-rw-r--r--doc/gawk.texi61
-rw-r--r--doc/gawktexi.in49
8 files changed, 522 insertions, 422 deletions
diff --git a/ChangeLog b/ChangeLog
index eab657c5..a6745c5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (is_identchar): Change from simple macro to function
+ since use of isalnum() let non-ASCII letters slip through into
+ identifiers.
+
2014-09-07 Arnold D. Robbins <arnold@skeeve.com>
* awk.h: Move libsigsegv stuff to ...
diff --git a/awkgram.c b/awkgram.c
index 34099a0b..899a8493 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -195,7 +195,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#define is_identchar(c) (isalnum(c) || (c) == '_')
+static bool is_identchar(int c);
#line 201 "awkgram.c" /* yacc.c:339 */
@@ -8087,3 +8087,36 @@ install_builtins(void)
}
}
}
+
+/* is_identchar --- return true if c can be in an identifier */
+
+/*
+ * 9/2014: This can't be:
+ *
+ * #define is_identchar(c) (isalnum(c) || (c) == '_')
+ *
+ * because in non-C locales, character codes outside the set of
+ * ASCII letters and digits pass the test. BLEAH.
+ */
+
+static bool
+is_identchar(int c)
+{
+ switch (c) {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case '_':
+ return true;
+ }
+ return false;
+}
diff --git a/awkgram.y b/awkgram.y
index 0f57b452..c0155cd5 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -155,7 +155,7 @@ extern double fmod(double x, double y);
#define YYSTYPE INSTRUCTION *
-#define is_identchar(c) (isalnum(c) || (c) == '_')
+static bool is_identchar(int c);
%}
%token FUNC_CALL NAME REGEXP FILENAME
@@ -5748,3 +5748,36 @@ install_builtins(void)
}
}
}
+
+/* is_identchar --- return true if c can be in an identifier */
+
+/*
+ * 9/2014: This can't be:
+ *
+ * #define is_identchar(c) (isalnum(c) || (c) == '_')
+ *
+ * because in non-C locales, character codes outside the set of
+ * ASCII letters and digits pass the test. BLEAH.
+ */
+
+static bool
+is_identchar(int c)
+{
+ switch (c) {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case '_':
+ return true;
+ }
+ return false;
+}
diff --git a/awklib/eg/lib/strtonum.awk b/awklib/eg/lib/strtonum.awk
index 5e20626b..f82c89c5 100644
--- a/awklib/eg/lib/strtonum.awk
+++ b/awklib/eg/lib/strtonum.awk
@@ -13,8 +13,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -27,8 +27,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ab2b26c7..f31a09a4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: More edits during review, minor addition.
+
2014-09-08 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Remove text that won't get used.
diff --git a/doc/gawk.info b/doc/gawk.info
index 2b8c0e0b..7c08ae18 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -9822,9 +9822,8 @@ complicating the rest of the program, write a "weed out" rule near the
beginning, in the following manner:
NF != 4 {
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
}
Because of the `next' statement, the program's subsequent rules won't
@@ -14431,8 +14430,8 @@ versions of `awk':
ret = 0
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -14445,8 +14444,8 @@ versions of `awk':
for (i = 1; i <= n; i++) {
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -28543,8 +28542,8 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
- However, there are two reasons why the `gawk' maintainer likes to
-have everything in the repository.
+ However, there are several reasons why the `gawk' maintainer likes
+to have everything in the repository.
First, because it is then easy to reproduce any given version
completely, without relying upon the availability of (older, likely
@@ -28597,6 +28596,13 @@ maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but
critical, that for any given branch, the above incantation _just works_.
+ A third reason to have all the files is that without them, using `git
+bisect' to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create `configure' and
+so on; it was really painful. When the repository is self-contained,
+using `git bisect' in it is very easy.
+
What are some of the consequences and/or actions to take?
1. We don't mind that there are differing files in the different
@@ -31561,7 +31567,7 @@ Index
* BEGIN pattern, getline and: Getline Notes. (line 19)
* BEGIN pattern, headings, adding: Print Examples. (line 43)
* BEGIN pattern, next/nextfile statements and <1>: Next Statement.
- (line 45)
+ (line 44)
* BEGIN pattern, next/nextfile statements and: I/O And BEGIN/END.
(line 36)
* BEGIN pattern, OFS/ORS variables, assigning values to: Output Separators.
@@ -32187,7 +32193,7 @@ Index
* END pattern, Boolean patterns and: Expression Patterns. (line 70)
* END pattern, exit statement and: Exit Statement. (line 12)
* END pattern, next/nextfile statements and <1>: Next Statement.
- (line 45)
+ (line 44)
* END pattern, next/nextfile statements and: I/O And BEGIN/END.
(line 36)
* END pattern, operators and: Using BEGIN/END. (line 17)
@@ -32520,7 +32526,7 @@ Index
* functions, user-defined, next/nextfile statements and <1>: Nextfile Statement.
(line 47)
* functions, user-defined, next/nextfile statements and: Next Statement.
- (line 45)
+ (line 44)
* G-d: Acknowledgments. (line 92)
* Garfinkle, Scott: Contributors. (line 34)
* gawk program, dynamic profiling: Profiling. (line 179)
@@ -33042,7 +33048,7 @@ Index
* next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 36)
* next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE.
(line 49)
-* next statement, user-defined functions and: Next Statement. (line 45)
+* next statement, user-defined functions and: Next Statement. (line 44)
* nextfile statement: Nextfile Statement. (line 6)
* nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END.
(line 36)
@@ -33284,7 +33290,7 @@ Index
* POSIX awk, functions and, length(): String Functions. (line 176)
* POSIX awk, GNU long options and: Options. (line 15)
* POSIX awk, interval expressions in: Regexp Operators. (line 135)
-* POSIX awk, next/nextfile statements and: Next Statement. (line 45)
+* POSIX awk, next/nextfile statements and: Next Statement. (line 44)
* POSIX awk, numeric strings and: Variable Typing. (line 6)
* POSIX awk, OFMT variable and <1>: Strings And Numbers. (line 57)
* POSIX awk, OFMT variable and: OFMT. (line 27)
@@ -34273,361 +34279,361 @@ Node: Switch Statement412541
Node: Break Statement414929
Node: Continue Statement416970
Node: Next Statement418795
-Node: Nextfile Statement421185
-Node: Exit Statement423842
-Node: Built-in Variables426246
-Node: User-modified427373
-Ref: User-modified-Footnote-1435062
-Node: Auto-set435124
-Ref: Auto-set-Footnote-1448143
-Ref: Auto-set-Footnote-2448348
-Node: ARGC and ARGV448404
-Node: Pattern Action Summary452308
-Node: Arrays454531
-Node: Array Basics456080
-Node: Array Intro456906
-Ref: figure-array-elements458879
-Ref: Array Intro-Footnote-1461403
-Node: Reference to Elements461531
-Node: Assigning Elements463981
-Node: Array Example464472
-Node: Scanning an Array466204
-Node: Controlling Scanning469205
-Ref: Controlling Scanning-Footnote-1474378
-Node: Delete474694
-Ref: Delete-Footnote-1477445
-Node: Numeric Array Subscripts477502
-Node: Uninitialized Subscripts479685
-Node: Multidimensional481312
-Node: Multiscanning484425
-Node: Arrays of Arrays486014
-Node: Arrays Summary490677
-Node: Functions492782
-Node: Built-in493655
-Node: Calling Built-in494733
-Node: Numeric Functions496721
-Ref: Numeric Functions-Footnote-1501557
-Ref: Numeric Functions-Footnote-2501914
-Ref: Numeric Functions-Footnote-3501962
-Node: String Functions502231
-Ref: String Functions-Footnote-1525228
-Ref: String Functions-Footnote-2525357
-Ref: String Functions-Footnote-3525605
-Node: Gory Details525692
-Ref: table-sub-escapes527465
-Ref: table-sub-proposed528985
-Ref: table-posix-sub530349
-Ref: table-gensub-escapes531889
-Ref: Gory Details-Footnote-1533065
-Node: I/O Functions533216
-Ref: I/O Functions-Footnote-1540326
-Node: Time Functions540473
-Ref: Time Functions-Footnote-1550937
-Ref: Time Functions-Footnote-2551005
-Ref: Time Functions-Footnote-3551163
-Ref: Time Functions-Footnote-4551274
-Ref: Time Functions-Footnote-5551386
-Ref: Time Functions-Footnote-6551613
-Node: Bitwise Functions551879
-Ref: table-bitwise-ops552441
-Ref: Bitwise Functions-Footnote-1556686
-Node: Type Functions556870
-Node: I18N Functions558012
-Node: User-defined559657
-Node: Definition Syntax560461
-Ref: Definition Syntax-Footnote-1565774
-Node: Function Example565843
-Ref: Function Example-Footnote-1568483
-Node: Function Caveats568505
-Node: Calling A Function569023
-Node: Variable Scope569978
-Node: Pass By Value/Reference572966
-Node: Return Statement576476
-Node: Dynamic Typing579460
-Node: Indirect Calls580389
-Ref: Indirect Calls-Footnote-1590105
-Node: Functions Summary590233
-Node: Library Functions592883
-Ref: Library Functions-Footnote-1596501
-Ref: Library Functions-Footnote-2596644
-Node: Library Names596815
-Ref: Library Names-Footnote-1600288
-Ref: Library Names-Footnote-2600508
-Node: General Functions600594
-Node: Strtonum Function601622
-Node: Assert Function604496
-Node: Round Function607822
-Node: Cliff Random Function609363
-Node: Ordinal Functions610379
-Ref: Ordinal Functions-Footnote-1613444
-Ref: Ordinal Functions-Footnote-2613696
-Node: Join Function613907
-Ref: Join Function-Footnote-1615678
-Node: Getlocaltime Function615878
-Node: Readfile Function619614
-Node: Data File Management621453
-Node: Filetrans Function622085
-Node: Rewind Function626154
-Node: File Checking627712
-Ref: File Checking-Footnote-1628844
-Node: Empty Files629045
-Node: Ignoring Assigns631024
-Node: Getopt Function632578
-Ref: Getopt Function-Footnote-1643842
-Node: Passwd Functions644045
-Ref: Passwd Functions-Footnote-1653024
-Node: Group Functions653112
-Ref: Group Functions-Footnote-1661043
-Node: Walking Arrays661256
-Node: Library Functions Summary662859
-Node: Library Exercises664247
-Node: Sample Programs665527
-Node: Running Examples666297
-Node: Clones667025
-Node: Cut Program668249
-Node: Egrep Program678107
-Ref: Egrep Program-Footnote-1685694
-Node: Id Program685804
-Node: Split Program689458
-Ref: Split Program-Footnote-1692996
-Node: Tee Program693124
-Node: Uniq Program695911
-Node: Wc Program703334
-Ref: Wc Program-Footnote-1707599
-Node: Miscellaneous Programs707691
-Node: Dupword Program708904
-Node: Alarm Program710935
-Node: Translate Program715739
-Ref: Translate Program-Footnote-1720312
-Ref: Translate Program-Footnote-2720582
-Node: Labels Program720721
-Ref: Labels Program-Footnote-1724082
-Node: Word Sorting724166
-Node: History Sorting728209
-Node: Extract Program730045
-Node: Simple Sed737581
-Node: Igawk Program740643
-Ref: Igawk Program-Footnote-1754947
-Ref: Igawk Program-Footnote-2755148
-Node: Anagram Program755286
-Node: Signature Program758354
-Node: Programs Summary759601
-Node: Programs Exercises760816
-Ref: Programs Exercises-Footnote-1764947
-Node: Advanced Features765038
-Node: Nondecimal Data766986
-Node: Array Sorting768563
-Node: Controlling Array Traversal769260
-Node: Array Sorting Functions777540
-Ref: Array Sorting Functions-Footnote-1781447
-Node: Two-way I/O781641
-Ref: Two-way I/O-Footnote-1786585
-Ref: Two-way I/O-Footnote-2786764
-Node: TCP/IP Networking786846
-Node: Profiling789691
-Node: Advanced Features Summary797242
-Node: Internationalization799106
-Node: I18N and L10N800586
-Node: Explaining gettext801272
-Ref: Explaining gettext-Footnote-1806298
-Ref: Explaining gettext-Footnote-2806482
-Node: Programmer i18n806647
-Ref: Programmer i18n-Footnote-1811441
-Node: Translator i18n811490
-Node: String Extraction812284
-Ref: String Extraction-Footnote-1813417
-Node: Printf Ordering813503
-Ref: Printf Ordering-Footnote-1816285
-Node: I18N Portability816349
-Ref: I18N Portability-Footnote-1818798
-Node: I18N Example818861
-Ref: I18N Example-Footnote-1821567
-Node: Gawk I18N821639
-Node: I18N Summary822277
-Node: Debugger823616
-Node: Debugging824638
-Node: Debugging Concepts825079
-Node: Debugging Terms826935
-Node: Awk Debugging829532
-Node: Sample Debugging Session830424
-Node: Debugger Invocation830944
-Node: Finding The Bug832280
-Node: List of Debugger Commands838759
-Node: Breakpoint Control840091
-Node: Debugger Execution Control843755
-Node: Viewing And Changing Data847115
-Node: Execution Stack850473
-Node: Debugger Info851986
-Node: Miscellaneous Debugger Commands855980
-Node: Readline Support861164
-Node: Limitations862056
-Node: Debugging Summary864329
-Node: Arbitrary Precision Arithmetic865497
-Node: Computer Arithmetic866984
-Ref: Computer Arithmetic-Footnote-1871371
-Node: Math Definitions871428
-Ref: table-ieee-formats874717
-Ref: Math Definitions-Footnote-1875257
-Node: MPFR features875360
-Node: FP Math Caution876977
-Ref: FP Math Caution-Footnote-1878027
-Node: Inexactness of computations878396
-Node: Inexact representation879344
-Node: Comparing FP Values880699
-Node: Errors accumulate881663
-Node: Getting Accuracy883096
-Node: Try To Round885755
-Node: Setting precision886654
-Ref: table-predefined-precision-strings887336
-Node: Setting the rounding mode889129
-Ref: table-gawk-rounding-modes889493
-Ref: Setting the rounding mode-Footnote-1892947
-Node: Arbitrary Precision Integers893126
-Ref: Arbitrary Precision Integers-Footnote-1896899
-Node: POSIX Floating Point Problems897048
-Ref: POSIX Floating Point Problems-Footnote-1900924
-Node: Floating point summary900962
-Node: Dynamic Extensions903166
-Node: Extension Intro904718
-Node: Plugin License905983
-Node: Extension Mechanism Outline906668
-Ref: figure-load-extension907092
-Ref: figure-load-new-function908577
-Ref: figure-call-new-function909579
-Node: Extension API Description911563
-Node: Extension API Functions Introduction913013
-Node: General Data Types917880
-Ref: General Data Types-Footnote-1923573
-Node: Requesting Values923872
-Ref: table-value-types-returned924609
-Node: Memory Allocation Functions925567
-Ref: Memory Allocation Functions-Footnote-1928314
-Node: Constructor Functions928410
-Node: Registration Functions930168
-Node: Extension Functions930853
-Node: Exit Callback Functions933155
-Node: Extension Version String934403
-Node: Input Parsers935053
-Node: Output Wrappers944867
-Node: Two-way processors949383
-Node: Printing Messages951587
-Ref: Printing Messages-Footnote-1952664
-Node: Updating `ERRNO'952816
-Node: Accessing Parameters953555
-Node: Symbol Table Access954785
-Node: Symbol table by name955299
-Node: Symbol table by cookie957275
-Ref: Symbol table by cookie-Footnote-1961408
-Node: Cached values961471
-Ref: Cached values-Footnote-1964975
-Node: Array Manipulation965066
-Ref: Array Manipulation-Footnote-1966164
-Node: Array Data Types966203
-Ref: Array Data Types-Footnote-1968906
-Node: Array Functions968998
-Node: Flattening Arrays972872
-Node: Creating Arrays979724
-Node: Extension API Variables984455
-Node: Extension Versioning985091
-Node: Extension API Informational Variables986992
-Node: Extension API Boilerplate988078
-Node: Finding Extensions991882
-Node: Extension Example992442
-Node: Internal File Description993172
-Node: Internal File Ops997263
-Ref: Internal File Ops-Footnote-11008695
-Node: Using Internal File Ops1008835
-Ref: Using Internal File Ops-Footnote-11011182
-Node: Extension Samples1011450
-Node: Extension Sample File Functions1012974
-Node: Extension Sample Fnmatch1020542
-Node: Extension Sample Fork1022024
-Node: Extension Sample Inplace1023237
-Node: Extension Sample Ord1024912
-Node: Extension Sample Readdir1025748
-Ref: table-readdir-file-types1026604
-Node: Extension Sample Revout1027403
-Node: Extension Sample Rev2way1027994
-Node: Extension Sample Read write array1028735
-Node: Extension Sample Readfile1030614
-Node: Extension Sample API Tests1031714
-Node: Extension Sample Time1032239
-Node: gawkextlib1033554
-Node: Extension summary1036367
-Node: Extension Exercises1040060
-Node: Language History1040782
-Node: V7/SVR3.11042425
-Node: SVR41044745
-Node: POSIX1046187
-Node: BTL1047573
-Node: POSIX/GNU1048307
-Node: Feature History1054083
-Node: Common Extensions1067174
-Node: Ranges and Locales1068486
-Ref: Ranges and Locales-Footnote-11073103
-Ref: Ranges and Locales-Footnote-21073130
-Ref: Ranges and Locales-Footnote-31073364
-Node: Contributors1073585
-Node: History summary1079010
-Node: Installation1080379
-Node: Gawk Distribution1081330
-Node: Getting1081814
-Node: Extracting1082638
-Node: Distribution contents1084280
-Node: Unix Installation1090050
-Node: Quick Installation1090667
-Node: Additional Configuration Options1093109
-Node: Configuration Philosophy1094847
-Node: Non-Unix Installation1097198
-Node: PC Installation1097656
-Node: PC Binary Installation1098967
-Node: PC Compiling1100815
-Ref: PC Compiling-Footnote-11103814
-Node: PC Testing1103919
-Node: PC Using1105095
-Node: Cygwin1109247
-Node: MSYS1110056
-Node: VMS Installation1110570
-Node: VMS Compilation1111366
-Ref: VMS Compilation-Footnote-11112588
-Node: VMS Dynamic Extensions1112646
-Node: VMS Installation Details1114019
-Node: VMS Running1116271
-Node: VMS GNV1119105
-Node: VMS Old Gawk1119828
-Node: Bugs1120298
-Node: Other Versions1124302
-Node: Installation summary1130529
-Node: Notes1131585
-Node: Compatibility Mode1132450
-Node: Additions1133232
-Node: Accessing The Source1134157
-Node: Adding Code1135593
-Node: New Ports1141771
-Node: Derived Files1146252
-Ref: Derived Files-Footnote-11151333
-Ref: Derived Files-Footnote-21151367
-Ref: Derived Files-Footnote-31151963
-Node: Future Extensions1152077
-Node: Implementation Limitations1152683
-Node: Extension Design1153931
-Node: Old Extension Problems1155085
-Ref: Old Extension Problems-Footnote-11156602
-Node: Extension New Mechanism Goals1156659
-Ref: Extension New Mechanism Goals-Footnote-11160019
-Node: Extension Other Design Decisions1160208
-Node: Extension Future Growth1162314
-Node: Old Extension Mechanism1163150
-Node: Notes summary1164912
-Node: Basic Concepts1166098
-Node: Basic High Level1166779
-Ref: figure-general-flow1167051
-Ref: figure-process-flow1167650
-Ref: Basic High Level-Footnote-11170879
-Node: Basic Data Typing1171064
-Node: Glossary1174392
-Node: Copying1199544
-Node: GNU Free Documentation License1237100
-Node: Index1262236
+Node: Nextfile Statement421165
+Node: Exit Statement423822
+Node: Built-in Variables426226
+Node: User-modified427353
+Ref: User-modified-Footnote-1435042
+Node: Auto-set435104
+Ref: Auto-set-Footnote-1448123
+Ref: Auto-set-Footnote-2448328
+Node: ARGC and ARGV448384
+Node: Pattern Action Summary452288
+Node: Arrays454511
+Node: Array Basics456060
+Node: Array Intro456886
+Ref: figure-array-elements458859
+Ref: Array Intro-Footnote-1461383
+Node: Reference to Elements461511
+Node: Assigning Elements463961
+Node: Array Example464452
+Node: Scanning an Array466184
+Node: Controlling Scanning469185
+Ref: Controlling Scanning-Footnote-1474358
+Node: Delete474674
+Ref: Delete-Footnote-1477425
+Node: Numeric Array Subscripts477482
+Node: Uninitialized Subscripts479665
+Node: Multidimensional481292
+Node: Multiscanning484405
+Node: Arrays of Arrays485994
+Node: Arrays Summary490657
+Node: Functions492762
+Node: Built-in493635
+Node: Calling Built-in494713
+Node: Numeric Functions496701
+Ref: Numeric Functions-Footnote-1501537
+Ref: Numeric Functions-Footnote-2501894
+Ref: Numeric Functions-Footnote-3501942
+Node: String Functions502211
+Ref: String Functions-Footnote-1525208
+Ref: String Functions-Footnote-2525337
+Ref: String Functions-Footnote-3525585
+Node: Gory Details525672
+Ref: table-sub-escapes527445
+Ref: table-sub-proposed528965
+Ref: table-posix-sub530329
+Ref: table-gensub-escapes531869
+Ref: Gory Details-Footnote-1533045
+Node: I/O Functions533196
+Ref: I/O Functions-Footnote-1540306
+Node: Time Functions540453
+Ref: Time Functions-Footnote-1550917
+Ref: Time Functions-Footnote-2550985
+Ref: Time Functions-Footnote-3551143
+Ref: Time Functions-Footnote-4551254
+Ref: Time Functions-Footnote-5551366
+Ref: Time Functions-Footnote-6551593
+Node: Bitwise Functions551859
+Ref: table-bitwise-ops552421
+Ref: Bitwise Functions-Footnote-1556666
+Node: Type Functions556850
+Node: I18N Functions557992
+Node: User-defined559637
+Node: Definition Syntax560441
+Ref: Definition Syntax-Footnote-1565754
+Node: Function Example565823
+Ref: Function Example-Footnote-1568463
+Node: Function Caveats568485
+Node: Calling A Function569003
+Node: Variable Scope569958
+Node: Pass By Value/Reference572946
+Node: Return Statement576456
+Node: Dynamic Typing579440
+Node: Indirect Calls580369
+Ref: Indirect Calls-Footnote-1590085
+Node: Functions Summary590213
+Node: Library Functions592863
+Ref: Library Functions-Footnote-1596481
+Ref: Library Functions-Footnote-2596624
+Node: Library Names596795
+Ref: Library Names-Footnote-1600268
+Ref: Library Names-Footnote-2600488
+Node: General Functions600574
+Node: Strtonum Function601602
+Node: Assert Function604504
+Node: Round Function607830
+Node: Cliff Random Function609371
+Node: Ordinal Functions610387
+Ref: Ordinal Functions-Footnote-1613452
+Ref: Ordinal Functions-Footnote-2613704
+Node: Join Function613915
+Ref: Join Function-Footnote-1615686
+Node: Getlocaltime Function615886
+Node: Readfile Function619622
+Node: Data File Management621461
+Node: Filetrans Function622093
+Node: Rewind Function626162
+Node: File Checking627720
+Ref: File Checking-Footnote-1628852
+Node: Empty Files629053
+Node: Ignoring Assigns631032
+Node: Getopt Function632586
+Ref: Getopt Function-Footnote-1643850
+Node: Passwd Functions644053
+Ref: Passwd Functions-Footnote-1653032
+Node: Group Functions653120
+Ref: Group Functions-Footnote-1661051
+Node: Walking Arrays661264
+Node: Library Functions Summary662867
+Node: Library Exercises664255
+Node: Sample Programs665535
+Node: Running Examples666305
+Node: Clones667033
+Node: Cut Program668257
+Node: Egrep Program678115
+Ref: Egrep Program-Footnote-1685702
+Node: Id Program685812
+Node: Split Program689466
+Ref: Split Program-Footnote-1693004
+Node: Tee Program693132
+Node: Uniq Program695919
+Node: Wc Program703342
+Ref: Wc Program-Footnote-1707607
+Node: Miscellaneous Programs707699
+Node: Dupword Program708912
+Node: Alarm Program710943
+Node: Translate Program715747
+Ref: Translate Program-Footnote-1720320
+Ref: Translate Program-Footnote-2720590
+Node: Labels Program720729
+Ref: Labels Program-Footnote-1724090
+Node: Word Sorting724174
+Node: History Sorting728217
+Node: Extract Program730053
+Node: Simple Sed737589
+Node: Igawk Program740651
+Ref: Igawk Program-Footnote-1754955
+Ref: Igawk Program-Footnote-2755156
+Node: Anagram Program755294
+Node: Signature Program758362
+Node: Programs Summary759609
+Node: Programs Exercises760824
+Ref: Programs Exercises-Footnote-1764955
+Node: Advanced Features765046
+Node: Nondecimal Data766994
+Node: Array Sorting768571
+Node: Controlling Array Traversal769268
+Node: Array Sorting Functions777548
+Ref: Array Sorting Functions-Footnote-1781455
+Node: Two-way I/O781649
+Ref: Two-way I/O-Footnote-1786593
+Ref: Two-way I/O-Footnote-2786772
+Node: TCP/IP Networking786854
+Node: Profiling789699
+Node: Advanced Features Summary797250
+Node: Internationalization799114
+Node: I18N and L10N800594
+Node: Explaining gettext801280
+Ref: Explaining gettext-Footnote-1806306
+Ref: Explaining gettext-Footnote-2806490
+Node: Programmer i18n806655
+Ref: Programmer i18n-Footnote-1811449
+Node: Translator i18n811498
+Node: String Extraction812292
+Ref: String Extraction-Footnote-1813425
+Node: Printf Ordering813511
+Ref: Printf Ordering-Footnote-1816293
+Node: I18N Portability816357
+Ref: I18N Portability-Footnote-1818806
+Node: I18N Example818869
+Ref: I18N Example-Footnote-1821575
+Node: Gawk I18N821647
+Node: I18N Summary822285
+Node: Debugger823624
+Node: Debugging824646
+Node: Debugging Concepts825087
+Node: Debugging Terms826943
+Node: Awk Debugging829540
+Node: Sample Debugging Session830432
+Node: Debugger Invocation830952
+Node: Finding The Bug832288
+Node: List of Debugger Commands838767
+Node: Breakpoint Control840099
+Node: Debugger Execution Control843763
+Node: Viewing And Changing Data847123
+Node: Execution Stack850481
+Node: Debugger Info851994
+Node: Miscellaneous Debugger Commands855988
+Node: Readline Support861172
+Node: Limitations862064
+Node: Debugging Summary864337
+Node: Arbitrary Precision Arithmetic865505
+Node: Computer Arithmetic866992
+Ref: Computer Arithmetic-Footnote-1871379
+Node: Math Definitions871436
+Ref: table-ieee-formats874725
+Ref: Math Definitions-Footnote-1875265
+Node: MPFR features875368
+Node: FP Math Caution876985
+Ref: FP Math Caution-Footnote-1878035
+Node: Inexactness of computations878404
+Node: Inexact representation879352
+Node: Comparing FP Values880707
+Node: Errors accumulate881671
+Node: Getting Accuracy883104
+Node: Try To Round885763
+Node: Setting precision886662
+Ref: table-predefined-precision-strings887344
+Node: Setting the rounding mode889137
+Ref: table-gawk-rounding-modes889501
+Ref: Setting the rounding mode-Footnote-1892955
+Node: Arbitrary Precision Integers893134
+Ref: Arbitrary Precision Integers-Footnote-1896907
+Node: POSIX Floating Point Problems897056
+Ref: POSIX Floating Point Problems-Footnote-1900932
+Node: Floating point summary900970
+Node: Dynamic Extensions903174
+Node: Extension Intro904726
+Node: Plugin License905991
+Node: Extension Mechanism Outline906676
+Ref: figure-load-extension907100
+Ref: figure-load-new-function908585
+Ref: figure-call-new-function909587
+Node: Extension API Description911571
+Node: Extension API Functions Introduction913021
+Node: General Data Types917888
+Ref: General Data Types-Footnote-1923581
+Node: Requesting Values923880
+Ref: table-value-types-returned924617
+Node: Memory Allocation Functions925575
+Ref: Memory Allocation Functions-Footnote-1928322
+Node: Constructor Functions928418
+Node: Registration Functions930176
+Node: Extension Functions930861
+Node: Exit Callback Functions933163
+Node: Extension Version String934411
+Node: Input Parsers935061
+Node: Output Wrappers944875
+Node: Two-way processors949391
+Node: Printing Messages951595
+Ref: Printing Messages-Footnote-1952672
+Node: Updating `ERRNO'952824
+Node: Accessing Parameters953563
+Node: Symbol Table Access954793
+Node: Symbol table by name955307
+Node: Symbol table by cookie957283
+Ref: Symbol table by cookie-Footnote-1961416
+Node: Cached values961479
+Ref: Cached values-Footnote-1964983
+Node: Array Manipulation965074
+Ref: Array Manipulation-Footnote-1966172
+Node: Array Data Types966211
+Ref: Array Data Types-Footnote-1968914
+Node: Array Functions969006
+Node: Flattening Arrays972880
+Node: Creating Arrays979732
+Node: Extension API Variables984463
+Node: Extension Versioning985099
+Node: Extension API Informational Variables987000
+Node: Extension API Boilerplate988086
+Node: Finding Extensions991890
+Node: Extension Example992450
+Node: Internal File Description993180
+Node: Internal File Ops997271
+Ref: Internal File Ops-Footnote-11008703
+Node: Using Internal File Ops1008843
+Ref: Using Internal File Ops-Footnote-11011190
+Node: Extension Samples1011458
+Node: Extension Sample File Functions1012982
+Node: Extension Sample Fnmatch1020550
+Node: Extension Sample Fork1022032
+Node: Extension Sample Inplace1023245
+Node: Extension Sample Ord1024920
+Node: Extension Sample Readdir1025756
+Ref: table-readdir-file-types1026612
+Node: Extension Sample Revout1027411
+Node: Extension Sample Rev2way1028002
+Node: Extension Sample Read write array1028743
+Node: Extension Sample Readfile1030622
+Node: Extension Sample API Tests1031722
+Node: Extension Sample Time1032247
+Node: gawkextlib1033562
+Node: Extension summary1036375
+Node: Extension Exercises1040068
+Node: Language History1040790
+Node: V7/SVR3.11042433
+Node: SVR41044753
+Node: POSIX1046195
+Node: BTL1047581
+Node: POSIX/GNU1048315
+Node: Feature History1054091
+Node: Common Extensions1067182
+Node: Ranges and Locales1068494
+Ref: Ranges and Locales-Footnote-11073111
+Ref: Ranges and Locales-Footnote-21073138
+Ref: Ranges and Locales-Footnote-31073372
+Node: Contributors1073593
+Node: History summary1079018
+Node: Installation1080387
+Node: Gawk Distribution1081338
+Node: Getting1081822
+Node: Extracting1082646
+Node: Distribution contents1084288
+Node: Unix Installation1090058
+Node: Quick Installation1090675
+Node: Additional Configuration Options1093117
+Node: Configuration Philosophy1094855
+Node: Non-Unix Installation1097206
+Node: PC Installation1097664
+Node: PC Binary Installation1098975
+Node: PC Compiling1100823
+Ref: PC Compiling-Footnote-11103822
+Node: PC Testing1103927
+Node: PC Using1105103
+Node: Cygwin1109255
+Node: MSYS1110064
+Node: VMS Installation1110578
+Node: VMS Compilation1111374
+Ref: VMS Compilation-Footnote-11112596
+Node: VMS Dynamic Extensions1112654
+Node: VMS Installation Details1114027
+Node: VMS Running1116279
+Node: VMS GNV1119113
+Node: VMS Old Gawk1119836
+Node: Bugs1120306
+Node: Other Versions1124310
+Node: Installation summary1130537
+Node: Notes1131593
+Node: Compatibility Mode1132458
+Node: Additions1133240
+Node: Accessing The Source1134165
+Node: Adding Code1135601
+Node: New Ports1141779
+Node: Derived Files1146260
+Ref: Derived Files-Footnote-11151735
+Ref: Derived Files-Footnote-21151769
+Ref: Derived Files-Footnote-31152365
+Node: Future Extensions1152479
+Node: Implementation Limitations1153085
+Node: Extension Design1154333
+Node: Old Extension Problems1155487
+Ref: Old Extension Problems-Footnote-11157004
+Node: Extension New Mechanism Goals1157061
+Ref: Extension New Mechanism Goals-Footnote-11160421
+Node: Extension Other Design Decisions1160610
+Node: Extension Future Growth1162716
+Node: Old Extension Mechanism1163552
+Node: Notes summary1165314
+Node: Basic Concepts1166500
+Node: Basic High Level1167181
+Ref: figure-general-flow1167453
+Ref: figure-process-flow1168052
+Ref: Basic High Level-Footnote-11171281
+Node: Basic Data Typing1171466
+Node: Glossary1174794
+Node: Copying1199946
+Node: GNU Free Documentation License1237502
+Node: Index1262638

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index a809bd0d..ae0d728a 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -37,11 +37,13 @@
@ifnotdocbook
@set BULLET @bullet{}
@set MINUS @minus{}
+@set NUL @sc{nul}
@end ifnotdocbook
@ifdocbook
@set BULLET
@set MINUS
+@set NUL NUL
@end ifdocbook
@set xref-automatic-section-title
@@ -5277,10 +5279,10 @@ with @samp{A}.
@cindex POSIX @command{awk}, period (@code{.})@comma{} using
In strict POSIX mode (@pxref{Options}),
-@samp{.} does not match the @sc{nul}
+@samp{.} does not match the @value{NUL}
character, which is a character with all bits equal to zero.
-Otherwise, @sc{nul} is just another character. Other versions of @command{awk}
-may not be able to match the @sc{nul} character.
+Otherwise, @value{NUL} is just another character. Other versions of @command{awk}
+may not be able to match the @value{NUL} character.
@cindex @code{[]} (square brackets), regexp operator
@cindex square brackets (@code{[]}), regexp operator
@@ -6429,7 +6431,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6438,23 +6440,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -6479,7 +6481,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6488,23 +6490,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -10425,7 +10427,7 @@ double-quotation marks. For example:
@cindex strings, length limitations
represents the string whose contents are @samp{parrot}. Strings in
@command{gawk} can be of any length, and they can contain any of the possible
-eight-bit ASCII characters including ASCII @sc{nul} (character code zero).
+eight-bit ASCII characters including ASCII @value{NUL} (character code zero).
Other @command{awk}
implementations may have difficulty with some character codes.
@@ -14128,9 +14130,8 @@ the beginning, in the following manner:
@example
NF != 4 @{
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
@}
@end example
@@ -20532,8 +20533,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -20546,8 +20547,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -31300,7 +31301,7 @@ and is managed by @command{gawk} from then on.
The API defines several simple @code{struct}s that map values as seen
from @command{awk}. A value can be a @code{double}, a string, or an
array (as in multidimensional arrays, or when creating a new array).
-String values maintain both pointer and length since embedded @sc{nul}
+String values maintain both pointer and length since embedded @value{NUL}
characters are allowed.
@quotation NOTE
@@ -31432,7 +31433,7 @@ Scalar values in @command{awk} are either numbers or strings. The
indicates what is in the @code{union}.
Representing numbers is easy---the API uses a C @code{double}. Strings
-require more work. Since @command{gawk} allows embedded @sc{nul} bytes
+require more work. Since @command{gawk} allows embedded @value{NUL} bytes
in string values, a string must be represented as a pair containing a
data-pointer and length. This is the @code{awk_string_t} type.
@@ -38678,7 +38679,7 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
-However, there are two reasons why the @command{gawk} maintainer
+However, there are several reasons why the @command{gawk} maintainer
likes to have everything in the repository.
First, because it is then easy to reproduce any given version completely,
@@ -38747,6 +38748,14 @@ the maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but critical,
that for any given branch, the above incantation @emph{just works}.
+@c Added 9/2014:
+A third reason to have all the files is that without them, using @samp{git
+bisect} to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create @command{configure}
+and so on; it was really painful. When the repository is self-contained,
+using @command{git bisect} in it is very easy.
+
@c So - that's my reasoning and philosophy.
What are some of the consequences and/or actions to take?
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 679073bf..f3b7de56 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -32,11 +32,13 @@
@ifnotdocbook
@set BULLET @bullet{}
@set MINUS @minus{}
+@set NUL @sc{nul}
@end ifnotdocbook
@ifdocbook
@set BULLET
@set MINUS
+@set NUL NUL
@end ifdocbook
@set xref-automatic-section-title
@@ -5105,10 +5107,10 @@ with @samp{A}.
@cindex POSIX @command{awk}, period (@code{.})@comma{} using
In strict POSIX mode (@pxref{Options}),
-@samp{.} does not match the @sc{nul}
+@samp{.} does not match the @value{NUL}
character, which is a character with all bits equal to zero.
-Otherwise, @sc{nul} is just another character. Other versions of @command{awk}
-may not be able to match the @sc{nul} character.
+Otherwise, @value{NUL} is just another character. Other versions of @command{awk}
+may not be able to match the @value{NUL} character.
@cindex @code{[]} (square brackets), regexp operator
@cindex square brackets (@code{[]}), regexp operator
@@ -6208,7 +6210,7 @@ a value that you know doesn't occur in the input file. This is hard
to do in a general way, such that a program always works for arbitrary
input files.
-You might think that for text files, the @sc{nul} character, which
+You might think that for text files, the @value{NUL} character, which
consists of a character with all bits equal to zero, is a good
value to use for @code{RS} in this case:
@@ -6217,23 +6219,23 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@end example
@cindex differences in @command{awk} and @command{gawk}, strings, storing
-@command{gawk} in fact accepts this, and uses the @sc{nul}
+@command{gawk} in fact accepts this, and uses the @value{NUL}
character for the record separator.
This works for certain special files, such as @file{/proc/environ} on
-GNU/Linux systems, where the @sc{nul} character is in fact the record separator.
+GNU/Linux systems, where the @value{NUL} character is in fact the record separator.
However, this usage is @emph{not} portable
to most other @command{awk} implementations.
@cindex dark corner, strings, storing
Almost all other @command{awk} implementations@footnote{At least that we know
about.} store strings internally as C-style strings. C strings use the
-@sc{nul} character as the string terminator. In effect, this means that
+@value{NUL} character as the string terminator. In effect, this means that
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
-It happens that recent versions of @command{mawk} can use the @sc{nul}
+It happens that recent versions of @command{mawk} can use the @value{NUL}
character as a record separator. However, this is a special case:
-@command{mawk} does not allow embedded @sc{nul} characters in strings.
+@command{mawk} does not allow embedded @value{NUL} characters in strings.
@cindex records, treating files as
@cindex treating files, as single records
@@ -9927,7 +9929,7 @@ double-quotation marks. For example:
@cindex strings, length limitations
represents the string whose contents are @samp{parrot}. Strings in
@command{gawk} can be of any length, and they can contain any of the possible
-eight-bit ASCII characters including ASCII @sc{nul} (character code zero).
+eight-bit ASCII characters including ASCII @value{NUL} (character code zero).
Other @command{awk}
implementations may have difficulty with some character codes.
@@ -13462,9 +13464,8 @@ the beginning, in the following manner:
@example
NF != 4 @{
- err = sprintf("%s:%d: skipped: NF != 4\n", FILENAME, FNR)
- print err > "/dev/stderr"
- next
+ printf("%s:%d: skipped: NF != 4\n", FILENAME, FNR) > "/dev/stderr"
+ next
@}
@end example
@@ -19659,8 +19660,8 @@ function mystrtonum(str, ret, n, i, k, c)
ret = 0
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("1234567", c)
ret = ret * 8 + k
@@ -19673,8 +19674,8 @@ function mystrtonum(str, ret, n, i, k, c)
for (i = 1; i <= n; i++) @{
c = substr(str, i, 1)
c = tolower(c)
- # index() returns 0 if c not in string,
- # includes c == "0"
+ # index() returns 0 if c not in string,
+ # includes c == "0"
k = index("123456789abcdef", c)
ret = ret * 16 + k
@@ -30398,7 +30399,7 @@ and is managed by @command{gawk} from then on.
The API defines several simple @code{struct}s that map values as seen
from @command{awk}. A value can be a @code{double}, a string, or an
array (as in multidimensional arrays, or when creating a new array).
-String values maintain both pointer and length since embedded @sc{nul}
+String values maintain both pointer and length since embedded @value{NUL}
characters are allowed.
@quotation NOTE
@@ -30530,7 +30531,7 @@ Scalar values in @command{awk} are either numbers or strings. The
indicates what is in the @code{union}.
Representing numbers is easy---the API uses a C @code{double}. Strings
-require more work. Since @command{gawk} allows embedded @sc{nul} bytes
+require more work. Since @command{gawk} allows embedded @value{NUL} bytes
in string values, a string must be represented as a pair containing a
data-pointer and length. This is the @code{awk_string_t} type.
@@ -37776,7 +37777,7 @@ the derived files, because that keeps the repository less cluttered,
and it is easier to see the substantive changes when comparing versions
and trying to understand what changed between commits.
-However, there are two reasons why the @command{gawk} maintainer
+However, there are several reasons why the @command{gawk} maintainer
likes to have everything in the repository.
First, because it is then easy to reproduce any given version completely,
@@ -37845,6 +37846,14 @@ the maintainer is no different than Jane User who wants to try to build
Thus, the maintainer thinks that it's not just important, but critical,
that for any given branch, the above incantation @emph{just works}.
+@c Added 9/2014:
+A third reason to have all the files is that without them, using @samp{git
+bisect} to try to find the commit that introduced a bug is exceedingly
+difficult. The maintainer tried to do that on another project that
+requires running bootstrapping scripts just to create @command{configure}
+and so on; it was really painful. When the repository is self-contained,
+using @command{git bisect} in it is very easy.
+
@c So - that's my reasoning and philosophy.
What are some of the consequences and/or actions to take?