aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-02-14 13:25:02 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-02-14 13:25:02 +0200
commitddf5569cacf57c9dfebb3dd3db325da7fbbd033e (patch)
tree30e36aa562196c03bfb53d06b050bc75df693a06
parent858d9d8eeb7c0869b035c850e0646204302c2229 (diff)
parenta6131306dd49537de45afdfdc6d4ad2dcac7655b (diff)
downloadegawk-ddf5569cacf57c9dfebb3dd3db325da7fbbd033e.tar.gz
egawk-ddf5569cacf57c9dfebb3dd3db325da7fbbd033e.tar.bz2
egawk-ddf5569cacf57c9dfebb3dd3db325da7fbbd033e.zip
Merge branch 'gawk-4.1-stable'
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info921
-rw-r--r--doc/gawk.texi134
-rw-r--r--doc/gawktexi.in124
-rw-r--r--extension/ChangeLog4
-rw-r--r--extension/time.c31
-rw-r--r--vms/ChangeLog7
-rw-r--r--vms/vmstest.com11
8 files changed, 645 insertions, 591 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 30f7d1b0..2c54d1e3 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Lots of small edits.
+
2014-02-07 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: More minor fixes, update UPDATE_MONTH.
diff --git a/doc/gawk.info b/doc/gawk.info
index 6e721a2b..bc7a1b67 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -4083,18 +4083,23 @@ use for `RS' in this case:
BEGIN { RS = "\0" } # whole file becomes one record?
`gawk' in fact accepts this, and uses the NUL character for the
-record separator. However, this usage is _not_ portable to other `awk'
-implementations.
+record separator. However, this usage is _not_ portable to most other
+`awk' implementations.
- All other `awk' implementations(1) store strings internally as
-C-style strings. C strings use the NUL character as the string
+ Almost all other `awk' implementations(1) store strings internally
+as C-style strings. C strings use the NUL character as the string
terminator. In effect, this means that `RS = "\0"' is the same as `RS
= ""'. (d.c.)
+ It happens that recent versions of `mawk' can use the NUL character
+as a record separator. However, this is a special case: `mawk' does not
+allow embedded NUL characters in strings.
+
The best way to treat a whole file as a single record is to simply
read the file in, one record at a time, concatenating each record onto
the end of the previous ones.
+
---------- Footnotes ----------
(1) At least that we know about.
@@ -7171,7 +7176,7 @@ decimal point when reading the `awk' program source code, and for
command-line variable assignments (*note Other Arguments::). However,
when interpreting input data, for `print' and `printf' output, and for
number to string conversion, the local decimal point character is used.
-(d.c.). Here are some examples indicating the difference in behavior,
+(d.c.) Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
$ export POSIXLY_CORRECT=1 Force POSIX behavior
@@ -31150,7 +31155,7 @@ Index
* files, /inet/... (gawk): TCP/IP Networking. (line 6)
* files, /inet4/... (gawk): TCP/IP Networking. (line 6)
* files, /inet6/... (gawk): TCP/IP Networking. (line 6)
-* files, as single records: Records. (line 200)
+* files, as single records: Records. (line 204)
* files, awk programs in: Long. (line 6)
* files, awkprof.out: Profiling. (line 6)
* files, awkvars.out: Options. (line 93)
@@ -32160,7 +32165,7 @@ Index
* records, printing: Print. (line 22)
* records, splitting input into: Records. (line 6)
* records, terminating: Records. (line 117)
-* records, treating files as: Records. (line 200)
+* records, treating files as: Records. (line 204)
* recursive functions: Definition Syntax. (line 73)
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
@@ -32811,456 +32816,456 @@ Node: Leftmost Longest171273
Node: Computed Regexps172474
Node: Reading Files175811
Node: Records177813
-Ref: Records-Footnote-1186702
-Node: Fields186739
-Ref: Fields-Footnote-1189772
-Node: Nonconstant Fields189858
-Node: Changing Fields192060
-Node: Field Separators198019
-Node: Default Field Splitting200721
-Node: Regexp Field Splitting201838
-Node: Single Character Fields205180
-Node: Command Line Field Separator206239
-Node: Full Line Fields209673
-Ref: Full Line Fields-Footnote-1210181
-Node: Field Splitting Summary210227
-Ref: Field Splitting Summary-Footnote-1213326
-Node: Constant Size213427
-Node: Splitting By Content218034
-Ref: Splitting By Content-Footnote-1221783
-Node: Multiple Line221823
-Ref: Multiple Line-Footnote-1227670
-Node: Getline227849
-Node: Plain Getline230065
-Node: Getline/Variable232160
-Node: Getline/File233307
-Node: Getline/Variable/File234648
-Ref: Getline/Variable/File-Footnote-1236247
-Node: Getline/Pipe236334
-Node: Getline/Variable/Pipe239033
-Node: Getline/Coprocess240140
-Node: Getline/Variable/Coprocess241392
-Node: Getline Notes242129
-Node: Getline Summary244916
-Ref: table-getline-variants245324
-Node: Read Timeout246236
-Ref: Read Timeout-Footnote-1249977
-Node: Command line directories250034
-Node: Printing250664
-Node: Print252295
-Node: Print Examples253632
-Node: Output Separators256416
-Node: OFMT258176
-Node: Printf259534
-Node: Basic Printf260440
-Node: Control Letters261979
-Node: Format Modifiers265791
-Node: Printf Examples271800
-Node: Redirection274515
-Node: Special Files281480
-Node: Special FD282013
-Ref: Special FD-Footnote-1285638
-Node: Special Network285712
-Node: Special Caveats286562
-Node: Close Files And Pipes287358
-Ref: Close Files And Pipes-Footnote-1294341
-Ref: Close Files And Pipes-Footnote-2294489
-Node: Expressions294639
-Node: Values295771
-Node: Constants296447
-Node: Scalar Constants297127
-Ref: Scalar Constants-Footnote-1297986
-Node: Nondecimal-numbers298168
-Node: Regexp Constants301168
-Node: Using Constant Regexps301643
-Node: Variables304698
-Node: Using Variables305353
-Node: Assignment Options307077
-Node: Conversion308949
-Ref: table-locale-affects314450
-Ref: Conversion-Footnote-1315074
-Node: All Operators315183
-Node: Arithmetic Ops315813
-Node: Concatenation318318
-Ref: Concatenation-Footnote-1321110
-Node: Assignment Ops321230
-Ref: table-assign-ops326218
-Node: Increment Ops327549
-Node: Truth Values and Conditions330983
-Node: Truth Values332066
-Node: Typing and Comparison333115
-Node: Variable Typing333908
-Ref: Variable Typing-Footnote-1337805
-Node: Comparison Operators337927
-Ref: table-relational-ops338337
-Node: POSIX String Comparison341885
-Ref: POSIX String Comparison-Footnote-1342841
-Node: Boolean Ops342979
-Ref: Boolean Ops-Footnote-1347057
-Node: Conditional Exp347148
-Node: Function Calls348880
-Node: Precedence352474
-Node: Locales356143
-Node: Patterns and Actions357232
-Node: Pattern Overview358286
-Node: Regexp Patterns359955
-Node: Expression Patterns360498
-Node: Ranges364183
-Node: BEGIN/END367149
-Node: Using BEGIN/END367911
-Ref: Using BEGIN/END-Footnote-1370642
-Node: I/O And BEGIN/END370748
-Node: BEGINFILE/ENDFILE373030
-Node: Empty375944
-Node: Using Shell Variables376260
-Node: Action Overview378545
-Node: Statements380902
-Node: If Statement382756
-Node: While Statement384255
-Node: Do Statement386299
-Node: For Statement387455
-Node: Switch Statement390607
-Node: Break Statement392704
-Node: Continue Statement394694
-Node: Next Statement396487
-Node: Nextfile Statement398877
-Node: Exit Statement401520
-Node: Built-in Variables403936
-Node: User-modified405031
-Ref: User-modified-Footnote-1413389
-Node: Auto-set413451
-Ref: Auto-set-Footnote-1426921
-Ref: Auto-set-Footnote-2427126
-Node: ARGC and ARGV427182
-Node: Arrays431033
-Node: Array Basics432538
-Node: Array Intro433364
-Node: Reference to Elements437681
-Node: Assigning Elements439951
-Node: Array Example440442
-Node: Scanning an Array442174
-Node: Controlling Scanning444488
-Ref: Controlling Scanning-Footnote-1449575
-Node: Delete449891
-Ref: Delete-Footnote-1452656
-Node: Numeric Array Subscripts452713
-Node: Uninitialized Subscripts454896
-Node: Multidimensional456523
-Node: Multiscanning459616
-Node: Arrays of Arrays461205
-Node: Functions465845
-Node: Built-in466664
-Node: Calling Built-in467742
-Node: Numeric Functions469730
-Ref: Numeric Functions-Footnote-1473562
-Ref: Numeric Functions-Footnote-2473919
-Ref: Numeric Functions-Footnote-3473967
-Node: String Functions474236
-Ref: String Functions-Footnote-1497156
-Ref: String Functions-Footnote-2497285
-Ref: String Functions-Footnote-3497533
-Node: Gory Details497620
-Ref: table-sub-escapes499299
-Ref: table-sub-posix-92500653
-Ref: table-sub-proposed502004
-Ref: table-posix-sub503358
-Ref: table-gensub-escapes504903
-Ref: Gory Details-Footnote-1506079
-Ref: Gory Details-Footnote-2506130
-Node: I/O Functions506281
-Ref: I/O Functions-Footnote-1513266
-Node: Time Functions513413
-Ref: Time Functions-Footnote-1524346
-Ref: Time Functions-Footnote-2524414
-Ref: Time Functions-Footnote-3524572
-Ref: Time Functions-Footnote-4524683
-Ref: Time Functions-Footnote-5524795
-Ref: Time Functions-Footnote-6525022
-Node: Bitwise Functions525288
-Ref: table-bitwise-ops525850
-Ref: Bitwise Functions-Footnote-1530071
-Node: Type Functions530255
-Node: I18N Functions531406
-Node: User-defined533033
-Node: Definition Syntax533837
-Ref: Definition Syntax-Footnote-1538747
-Node: Function Example538816
-Node: Function Caveats541410
-Node: Calling A Function541831
-Node: Variable Scope542946
-Node: Pass By Value/Reference545909
-Node: Return Statement549417
-Node: Dynamic Typing552398
-Node: Indirect Calls553329
-Node: Library Functions563014
-Ref: Library Functions-Footnote-1566527
-Ref: Library Functions-Footnote-2566670
-Node: Library Names566841
-Ref: Library Names-Footnote-1570312
-Ref: Library Names-Footnote-2570532
-Node: General Functions570618
-Node: Strtonum Function571646
-Node: Assert Function574576
-Node: Round Function577902
-Node: Cliff Random Function579445
-Node: Ordinal Functions580461
-Ref: Ordinal Functions-Footnote-1583533
-Ref: Ordinal Functions-Footnote-2583785
-Node: Join Function583994
-Ref: Join Function-Footnote-1585765
-Node: Getlocaltime Function585965
-Node: Readfile Function589706
-Node: Data File Management591545
-Node: Filetrans Function592177
-Node: Rewind Function596246
-Node: File Checking597633
-Node: Empty Files598727
-Node: Ignoring Assigns600957
-Node: Getopt Function602510
-Ref: Getopt Function-Footnote-1613813
-Node: Passwd Functions614016
-Ref: Passwd Functions-Footnote-1622991
-Node: Group Functions623079
-Node: Walking Arrays631163
-Node: Sample Programs633300
-Node: Running Examples633974
-Node: Clones634702
-Node: Cut Program635926
-Node: Egrep Program645771
-Ref: Egrep Program-Footnote-1653544
-Node: Id Program653654
-Node: Split Program657270
-Ref: Split Program-Footnote-1660789
-Node: Tee Program660917
-Node: Uniq Program663720
-Node: Wc Program671149
-Ref: Wc Program-Footnote-1675415
-Ref: Wc Program-Footnote-2675615
-Node: Miscellaneous Programs675707
-Node: Dupword Program676895
-Node: Alarm Program678926
-Node: Translate Program683679
-Ref: Translate Program-Footnote-1688066
-Ref: Translate Program-Footnote-2688314
-Node: Labels Program688448
-Ref: Labels Program-Footnote-1691819
-Node: Word Sorting691903
-Node: History Sorting695787
-Node: Extract Program697626
-Ref: Extract Program-Footnote-1705129
-Node: Simple Sed705257
-Node: Igawk Program708319
-Ref: Igawk Program-Footnote-1723476
-Ref: Igawk Program-Footnote-2723677
-Node: Anagram Program723815
-Node: Signature Program726883
-Node: Advanced Features727983
-Node: Nondecimal Data729869
-Node: Array Sorting731452
-Node: Controlling Array Traversal732149
-Node: Array Sorting Functions740433
-Ref: Array Sorting Functions-Footnote-1744302
-Node: Two-way I/O744496
-Ref: Two-way I/O-Footnote-1749928
-Node: TCP/IP Networking749998
-Node: Profiling752842
-Node: Internationalization760339
-Node: I18N and L10N761764
-Node: Explaining gettext762450
-Ref: Explaining gettext-Footnote-1767518
-Ref: Explaining gettext-Footnote-2767702
-Node: Programmer i18n767867
-Node: Translator i18n772069
-Node: String Extraction772862
-Ref: String Extraction-Footnote-1773823
-Node: Printf Ordering773909
-Ref: Printf Ordering-Footnote-1776693
-Node: I18N Portability776757
-Ref: I18N Portability-Footnote-1779206
-Node: I18N Example779269
-Ref: I18N Example-Footnote-1781907
-Node: Gawk I18N781979
-Node: Debugger782600
-Node: Debugging783571
-Node: Debugging Concepts784004
-Node: Debugging Terms785860
-Node: Awk Debugging788457
-Node: Sample Debugging Session789349
-Node: Debugger Invocation789869
-Node: Finding The Bug791201
-Node: List of Debugger Commands797689
-Node: Breakpoint Control799023
-Node: Debugger Execution Control802687
-Node: Viewing And Changing Data806047
-Node: Execution Stack809403
-Node: Debugger Info810870
-Node: Miscellaneous Debugger Commands814852
-Node: Readline Support820028
-Node: Limitations820859
-Node: Arbitrary Precision Arithmetic823111
-Ref: Arbitrary Precision Arithmetic-Footnote-1824760
-Node: General Arithmetic824908
-Node: Floating Point Issues826628
-Node: String Conversion Precision827509
-Ref: String Conversion Precision-Footnote-1829214
-Node: Unexpected Results829323
-Node: POSIX Floating Point Problems831476
-Ref: POSIX Floating Point Problems-Footnote-1835301
-Node: Integer Programming835339
-Node: Floating-point Programming837078
-Ref: Floating-point Programming-Footnote-1843409
-Ref: Floating-point Programming-Footnote-2843679
-Node: Floating-point Representation843943
-Node: Floating-point Context845108
-Ref: table-ieee-formats845947
-Node: Rounding Mode847331
-Ref: table-rounding-modes847810
-Ref: Rounding Mode-Footnote-1850825
-Node: Gawk and MPFR851004
-Node: Arbitrary Precision Floats852259
-Ref: Arbitrary Precision Floats-Footnote-1854702
-Node: Setting Precision855018
-Ref: table-predefined-precision-strings855704
-Node: Setting Rounding Mode857849
-Ref: table-gawk-rounding-modes858253
-Node: Floating-point Constants859440
-Node: Changing Precision860869
-Ref: Changing Precision-Footnote-1862266
-Node: Exact Arithmetic862440
-Node: Arbitrary Precision Integers865578
-Ref: Arbitrary Precision Integers-Footnote-1868596
-Node: Dynamic Extensions868743
-Node: Extension Intro870201
-Node: Plugin License871466
-Node: Extension Mechanism Outline872151
-Ref: load-extension872568
-Ref: load-new-function874046
-Ref: call-new-function875041
-Node: Extension API Description877056
-Node: Extension API Functions Introduction878269
-Node: General Data Types883135
-Ref: General Data Types-Footnote-1888737
-Node: Requesting Values889036
-Ref: table-value-types-returned889767
-Node: Constructor Functions890721
-Node: Registration Functions893741
-Node: Extension Functions894426
-Node: Exit Callback Functions896651
-Node: Extension Version String897900
-Node: Input Parsers898550
-Node: Output Wrappers908307
-Node: Two-way processors912817
-Node: Printing Messages915025
-Ref: Printing Messages-Footnote-1916102
-Node: Updating `ERRNO'916254
-Node: Accessing Parameters916993
-Node: Symbol Table Access918223
-Node: Symbol table by name918735
-Node: Symbol table by cookie920482
-Ref: Symbol table by cookie-Footnote-1924612
-Node: Cached values924675
-Ref: Cached values-Footnote-1928124
-Node: Array Manipulation928215
-Ref: Array Manipulation-Footnote-1929313
-Node: Array Data Types929352
-Ref: Array Data Types-Footnote-1932055
-Node: Array Functions932147
-Node: Flattening Arrays935913
-Node: Creating Arrays942765
-Node: Extension API Variables947490
-Node: Extension Versioning948126
-Node: Extension API Informational Variables950027
-Node: Extension API Boilerplate951113
-Node: Finding Extensions954917
-Node: Extension Example955477
-Node: Internal File Description956207
-Node: Internal File Ops960298
-Ref: Internal File Ops-Footnote-1971806
-Node: Using Internal File Ops971946
-Ref: Using Internal File Ops-Footnote-1974299
-Node: Extension Samples974565
-Node: Extension Sample File Functions976089
-Node: Extension Sample Fnmatch984574
-Node: Extension Sample Fork986300
-Node: Extension Sample Inplace987518
-Node: Extension Sample Ord989296
-Node: Extension Sample Readdir990132
-Node: Extension Sample Revout991664
-Node: Extension Sample Rev2way992257
-Node: Extension Sample Read write array992947
-Node: Extension Sample Readfile994830
-Node: Extension Sample API Tests995648
-Node: Extension Sample Time996173
-Node: gawkextlib997537
-Node: Language History1000318
-Node: V7/SVR3.11001911
-Node: SVR41004231
-Node: POSIX1005673
-Node: BTL1007059
-Node: POSIX/GNU1007793
-Node: Feature History1013392
-Node: Common Extensions1026356
-Node: Ranges and Locales1027668
-Ref: Ranges and Locales-Footnote-11032286
-Ref: Ranges and Locales-Footnote-21032313
-Ref: Ranges and Locales-Footnote-31032573
-Node: Contributors1032794
-Node: Installation1037939
-Node: Gawk Distribution1038833
-Node: Getting1039317
-Node: Extracting1040143
-Node: Distribution contents1041835
-Node: Unix Installation1047540
-Node: Quick Installation1048157
-Node: Additional Configuration Options1050601
-Node: Configuration Philosophy1052337
-Node: Non-Unix Installation1054691
-Node: PC Installation1055149
-Node: PC Binary Installation1056448
-Node: PC Compiling1058296
-Node: PC Testing1061240
-Node: PC Using1062416
-Node: Cygwin1066601
-Node: MSYS1067601
-Node: VMS Installation1068115
-Node: VMS Compilation1068879
-Ref: VMS Compilation-Footnote-11070494
-Node: VMS Dynamic Extensions1070552
-Node: VMS Installation Details1071925
-Node: VMS Running1074172
-Node: VMS GNV1077006
-Node: VMS Old Gawk1077729
-Node: Bugs1078199
-Node: Other Versions1082117
-Node: Notes1088201
-Node: Compatibility Mode1089001
-Node: Additions1089784
-Node: Accessing The Source1090711
-Node: Adding Code1092151
-Node: New Ports1098196
-Node: Derived Files1102331
-Ref: Derived Files-Footnote-11107652
-Ref: Derived Files-Footnote-21107686
-Ref: Derived Files-Footnote-31108286
-Node: Future Extensions1108384
-Node: Implementation Limitations1108967
-Node: Extension Design1110219
-Node: Old Extension Problems1111373
-Ref: Old Extension Problems-Footnote-11112881
-Node: Extension New Mechanism Goals1112938
-Ref: Extension New Mechanism Goals-Footnote-11116303
-Node: Extension Other Design Decisions1116489
-Node: Extension Future Growth1118595
-Node: Old Extension Mechanism1119431
-Node: Basic Concepts1121171
-Node: Basic High Level1121852
-Ref: figure-general-flow1122123
-Ref: figure-process-flow1122722
-Ref: Basic High Level-Footnote-11125951
-Node: Basic Data Typing1126136
-Node: Glossary1129491
-Node: Copying1154953
-Node: GNU Free Documentation License1192510
-Node: Index1217647
+Ref: Records-Footnote-1186901
+Node: Fields186938
+Ref: Fields-Footnote-1189971
+Node: Nonconstant Fields190057
+Node: Changing Fields192259
+Node: Field Separators198218
+Node: Default Field Splitting200920
+Node: Regexp Field Splitting202037
+Node: Single Character Fields205379
+Node: Command Line Field Separator206438
+Node: Full Line Fields209872
+Ref: Full Line Fields-Footnote-1210380
+Node: Field Splitting Summary210426
+Ref: Field Splitting Summary-Footnote-1213525
+Node: Constant Size213626
+Node: Splitting By Content218233
+Ref: Splitting By Content-Footnote-1221982
+Node: Multiple Line222022
+Ref: Multiple Line-Footnote-1227869
+Node: Getline228048
+Node: Plain Getline230264
+Node: Getline/Variable232359
+Node: Getline/File233506
+Node: Getline/Variable/File234847
+Ref: Getline/Variable/File-Footnote-1236446
+Node: Getline/Pipe236533
+Node: Getline/Variable/Pipe239232
+Node: Getline/Coprocess240339
+Node: Getline/Variable/Coprocess241591
+Node: Getline Notes242328
+Node: Getline Summary245115
+Ref: table-getline-variants245523
+Node: Read Timeout246435
+Ref: Read Timeout-Footnote-1250176
+Node: Command line directories250233
+Node: Printing250863
+Node: Print252494
+Node: Print Examples253831
+Node: Output Separators256615
+Node: OFMT258375
+Node: Printf259733
+Node: Basic Printf260639
+Node: Control Letters262178
+Node: Format Modifiers265990
+Node: Printf Examples271999
+Node: Redirection274714
+Node: Special Files281679
+Node: Special FD282212
+Ref: Special FD-Footnote-1285837
+Node: Special Network285911
+Node: Special Caveats286761
+Node: Close Files And Pipes287557
+Ref: Close Files And Pipes-Footnote-1294540
+Ref: Close Files And Pipes-Footnote-2294688
+Node: Expressions294838
+Node: Values295970
+Node: Constants296646
+Node: Scalar Constants297326
+Ref: Scalar Constants-Footnote-1298185
+Node: Nondecimal-numbers298367
+Node: Regexp Constants301367
+Node: Using Constant Regexps301842
+Node: Variables304897
+Node: Using Variables305552
+Node: Assignment Options307276
+Node: Conversion309148
+Ref: table-locale-affects314648
+Ref: Conversion-Footnote-1315272
+Node: All Operators315381
+Node: Arithmetic Ops316011
+Node: Concatenation318516
+Ref: Concatenation-Footnote-1321308
+Node: Assignment Ops321428
+Ref: table-assign-ops326416
+Node: Increment Ops327747
+Node: Truth Values and Conditions331181
+Node: Truth Values332264
+Node: Typing and Comparison333313
+Node: Variable Typing334106
+Ref: Variable Typing-Footnote-1338003
+Node: Comparison Operators338125
+Ref: table-relational-ops338535
+Node: POSIX String Comparison342083
+Ref: POSIX String Comparison-Footnote-1343039
+Node: Boolean Ops343177
+Ref: Boolean Ops-Footnote-1347255
+Node: Conditional Exp347346
+Node: Function Calls349078
+Node: Precedence352672
+Node: Locales356341
+Node: Patterns and Actions357430
+Node: Pattern Overview358484
+Node: Regexp Patterns360153
+Node: Expression Patterns360696
+Node: Ranges364381
+Node: BEGIN/END367347
+Node: Using BEGIN/END368109
+Ref: Using BEGIN/END-Footnote-1370840
+Node: I/O And BEGIN/END370946
+Node: BEGINFILE/ENDFILE373228
+Node: Empty376142
+Node: Using Shell Variables376458
+Node: Action Overview378743
+Node: Statements381100
+Node: If Statement382954
+Node: While Statement384453
+Node: Do Statement386497
+Node: For Statement387653
+Node: Switch Statement390805
+Node: Break Statement392902
+Node: Continue Statement394892
+Node: Next Statement396685
+Node: Nextfile Statement399075
+Node: Exit Statement401718
+Node: Built-in Variables404134
+Node: User-modified405229
+Ref: User-modified-Footnote-1413587
+Node: Auto-set413649
+Ref: Auto-set-Footnote-1427119
+Ref: Auto-set-Footnote-2427324
+Node: ARGC and ARGV427380
+Node: Arrays431231
+Node: Array Basics432736
+Node: Array Intro433562
+Node: Reference to Elements437879
+Node: Assigning Elements440149
+Node: Array Example440640
+Node: Scanning an Array442372
+Node: Controlling Scanning444686
+Ref: Controlling Scanning-Footnote-1449773
+Node: Delete450089
+Ref: Delete-Footnote-1452854
+Node: Numeric Array Subscripts452911
+Node: Uninitialized Subscripts455094
+Node: Multidimensional456721
+Node: Multiscanning459814
+Node: Arrays of Arrays461403
+Node: Functions466043
+Node: Built-in466862
+Node: Calling Built-in467940
+Node: Numeric Functions469928
+Ref: Numeric Functions-Footnote-1473760
+Ref: Numeric Functions-Footnote-2474117
+Ref: Numeric Functions-Footnote-3474165
+Node: String Functions474434
+Ref: String Functions-Footnote-1497354
+Ref: String Functions-Footnote-2497483
+Ref: String Functions-Footnote-3497731
+Node: Gory Details497818
+Ref: table-sub-escapes499497
+Ref: table-sub-posix-92500851
+Ref: table-sub-proposed502202
+Ref: table-posix-sub503556
+Ref: table-gensub-escapes505101
+Ref: Gory Details-Footnote-1506277
+Ref: Gory Details-Footnote-2506328
+Node: I/O Functions506479
+Ref: I/O Functions-Footnote-1513464
+Node: Time Functions513611
+Ref: Time Functions-Footnote-1524544
+Ref: Time Functions-Footnote-2524612
+Ref: Time Functions-Footnote-3524770
+Ref: Time Functions-Footnote-4524881
+Ref: Time Functions-Footnote-5524993
+Ref: Time Functions-Footnote-6525220
+Node: Bitwise Functions525486
+Ref: table-bitwise-ops526048
+Ref: Bitwise Functions-Footnote-1530269
+Node: Type Functions530453
+Node: I18N Functions531604
+Node: User-defined533231
+Node: Definition Syntax534035
+Ref: Definition Syntax-Footnote-1538945
+Node: Function Example539014
+Node: Function Caveats541608
+Node: Calling A Function542029
+Node: Variable Scope543144
+Node: Pass By Value/Reference546107
+Node: Return Statement549615
+Node: Dynamic Typing552596
+Node: Indirect Calls553527
+Node: Library Functions563212
+Ref: Library Functions-Footnote-1566725
+Ref: Library Functions-Footnote-2566868
+Node: Library Names567039
+Ref: Library Names-Footnote-1570510
+Ref: Library Names-Footnote-2570730
+Node: General Functions570816
+Node: Strtonum Function571844
+Node: Assert Function574774
+Node: Round Function578100
+Node: Cliff Random Function579643
+Node: Ordinal Functions580659
+Ref: Ordinal Functions-Footnote-1583731
+Ref: Ordinal Functions-Footnote-2583983
+Node: Join Function584192
+Ref: Join Function-Footnote-1585963
+Node: Getlocaltime Function586163
+Node: Readfile Function589904
+Node: Data File Management591743
+Node: Filetrans Function592375
+Node: Rewind Function596444
+Node: File Checking597831
+Node: Empty Files598925
+Node: Ignoring Assigns601155
+Node: Getopt Function602708
+Ref: Getopt Function-Footnote-1614011
+Node: Passwd Functions614214
+Ref: Passwd Functions-Footnote-1623189
+Node: Group Functions623277
+Node: Walking Arrays631361
+Node: Sample Programs633498
+Node: Running Examples634172
+Node: Clones634900
+Node: Cut Program636124
+Node: Egrep Program645969
+Ref: Egrep Program-Footnote-1653742
+Node: Id Program653852
+Node: Split Program657468
+Ref: Split Program-Footnote-1660987
+Node: Tee Program661115
+Node: Uniq Program663918
+Node: Wc Program671347
+Ref: Wc Program-Footnote-1675613
+Ref: Wc Program-Footnote-2675813
+Node: Miscellaneous Programs675905
+Node: Dupword Program677093
+Node: Alarm Program679124
+Node: Translate Program683877
+Ref: Translate Program-Footnote-1688264
+Ref: Translate Program-Footnote-2688512
+Node: Labels Program688646
+Ref: Labels Program-Footnote-1692017
+Node: Word Sorting692101
+Node: History Sorting695985
+Node: Extract Program697824
+Ref: Extract Program-Footnote-1705327
+Node: Simple Sed705455
+Node: Igawk Program708517
+Ref: Igawk Program-Footnote-1723674
+Ref: Igawk Program-Footnote-2723875
+Node: Anagram Program724013
+Node: Signature Program727081
+Node: Advanced Features728181
+Node: Nondecimal Data730067
+Node: Array Sorting731650
+Node: Controlling Array Traversal732347
+Node: Array Sorting Functions740631
+Ref: Array Sorting Functions-Footnote-1744500
+Node: Two-way I/O744694
+Ref: Two-way I/O-Footnote-1750126
+Node: TCP/IP Networking750196
+Node: Profiling753040
+Node: Internationalization760537
+Node: I18N and L10N761962
+Node: Explaining gettext762648
+Ref: Explaining gettext-Footnote-1767716
+Ref: Explaining gettext-Footnote-2767900
+Node: Programmer i18n768065
+Node: Translator i18n772267
+Node: String Extraction773060
+Ref: String Extraction-Footnote-1774021
+Node: Printf Ordering774107
+Ref: Printf Ordering-Footnote-1776891
+Node: I18N Portability776955
+Ref: I18N Portability-Footnote-1779404
+Node: I18N Example779467
+Ref: I18N Example-Footnote-1782105
+Node: Gawk I18N782177
+Node: Debugger782798
+Node: Debugging783769
+Node: Debugging Concepts784202
+Node: Debugging Terms786058
+Node: Awk Debugging788655
+Node: Sample Debugging Session789547
+Node: Debugger Invocation790067
+Node: Finding The Bug791399
+Node: List of Debugger Commands797887
+Node: Breakpoint Control799221
+Node: Debugger Execution Control802885
+Node: Viewing And Changing Data806245
+Node: Execution Stack809601
+Node: Debugger Info811068
+Node: Miscellaneous Debugger Commands815050
+Node: Readline Support820226
+Node: Limitations821057
+Node: Arbitrary Precision Arithmetic823309
+Ref: Arbitrary Precision Arithmetic-Footnote-1824958
+Node: General Arithmetic825106
+Node: Floating Point Issues826826
+Node: String Conversion Precision827707
+Ref: String Conversion Precision-Footnote-1829412
+Node: Unexpected Results829521
+Node: POSIX Floating Point Problems831674
+Ref: POSIX Floating Point Problems-Footnote-1835499
+Node: Integer Programming835537
+Node: Floating-point Programming837276
+Ref: Floating-point Programming-Footnote-1843607
+Ref: Floating-point Programming-Footnote-2843877
+Node: Floating-point Representation844141
+Node: Floating-point Context845306
+Ref: table-ieee-formats846145
+Node: Rounding Mode847529
+Ref: table-rounding-modes848008
+Ref: Rounding Mode-Footnote-1851023
+Node: Gawk and MPFR851202
+Node: Arbitrary Precision Floats852457
+Ref: Arbitrary Precision Floats-Footnote-1854900
+Node: Setting Precision855216
+Ref: table-predefined-precision-strings855902
+Node: Setting Rounding Mode858047
+Ref: table-gawk-rounding-modes858451
+Node: Floating-point Constants859638
+Node: Changing Precision861067
+Ref: Changing Precision-Footnote-1862464
+Node: Exact Arithmetic862638
+Node: Arbitrary Precision Integers865776
+Ref: Arbitrary Precision Integers-Footnote-1868794
+Node: Dynamic Extensions868941
+Node: Extension Intro870399
+Node: Plugin License871664
+Node: Extension Mechanism Outline872349
+Ref: load-extension872766
+Ref: load-new-function874244
+Ref: call-new-function875239
+Node: Extension API Description877254
+Node: Extension API Functions Introduction878467
+Node: General Data Types883333
+Ref: General Data Types-Footnote-1888935
+Node: Requesting Values889234
+Ref: table-value-types-returned889965
+Node: Constructor Functions890919
+Node: Registration Functions893939
+Node: Extension Functions894624
+Node: Exit Callback Functions896849
+Node: Extension Version String898098
+Node: Input Parsers898748
+Node: Output Wrappers908505
+Node: Two-way processors913015
+Node: Printing Messages915223
+Ref: Printing Messages-Footnote-1916300
+Node: Updating `ERRNO'916452
+Node: Accessing Parameters917191
+Node: Symbol Table Access918421
+Node: Symbol table by name918933
+Node: Symbol table by cookie920680
+Ref: Symbol table by cookie-Footnote-1924810
+Node: Cached values924873
+Ref: Cached values-Footnote-1928322
+Node: Array Manipulation928413
+Ref: Array Manipulation-Footnote-1929511
+Node: Array Data Types929550
+Ref: Array Data Types-Footnote-1932253
+Node: Array Functions932345
+Node: Flattening Arrays936111
+Node: Creating Arrays942963
+Node: Extension API Variables947688
+Node: Extension Versioning948324
+Node: Extension API Informational Variables950225
+Node: Extension API Boilerplate951311
+Node: Finding Extensions955115
+Node: Extension Example955675
+Node: Internal File Description956405
+Node: Internal File Ops960496
+Ref: Internal File Ops-Footnote-1972004
+Node: Using Internal File Ops972144
+Ref: Using Internal File Ops-Footnote-1974497
+Node: Extension Samples974763
+Node: Extension Sample File Functions976287
+Node: Extension Sample Fnmatch984772
+Node: Extension Sample Fork986498
+Node: Extension Sample Inplace987716
+Node: Extension Sample Ord989494
+Node: Extension Sample Readdir990330
+Node: Extension Sample Revout991862
+Node: Extension Sample Rev2way992455
+Node: Extension Sample Read write array993145
+Node: Extension Sample Readfile995028
+Node: Extension Sample API Tests995846
+Node: Extension Sample Time996371
+Node: gawkextlib997735
+Node: Language History1000516
+Node: V7/SVR3.11002109
+Node: SVR41004429
+Node: POSIX1005871
+Node: BTL1007257
+Node: POSIX/GNU1007991
+Node: Feature History1013590
+Node: Common Extensions1026554
+Node: Ranges and Locales1027866
+Ref: Ranges and Locales-Footnote-11032484
+Ref: Ranges and Locales-Footnote-21032511
+Ref: Ranges and Locales-Footnote-31032771
+Node: Contributors1032992
+Node: Installation1038137
+Node: Gawk Distribution1039031
+Node: Getting1039515
+Node: Extracting1040341
+Node: Distribution contents1042033
+Node: Unix Installation1047738
+Node: Quick Installation1048355
+Node: Additional Configuration Options1050799
+Node: Configuration Philosophy1052535
+Node: Non-Unix Installation1054889
+Node: PC Installation1055347
+Node: PC Binary Installation1056646
+Node: PC Compiling1058494
+Node: PC Testing1061438
+Node: PC Using1062614
+Node: Cygwin1066799
+Node: MSYS1067799
+Node: VMS Installation1068313
+Node: VMS Compilation1069077
+Ref: VMS Compilation-Footnote-11070692
+Node: VMS Dynamic Extensions1070750
+Node: VMS Installation Details1072123
+Node: VMS Running1074370
+Node: VMS GNV1077204
+Node: VMS Old Gawk1077927
+Node: Bugs1078397
+Node: Other Versions1082315
+Node: Notes1088399
+Node: Compatibility Mode1089199
+Node: Additions1089982
+Node: Accessing The Source1090909
+Node: Adding Code1092349
+Node: New Ports1098394
+Node: Derived Files1102529
+Ref: Derived Files-Footnote-11107850
+Ref: Derived Files-Footnote-21107884
+Ref: Derived Files-Footnote-31108484
+Node: Future Extensions1108582
+Node: Implementation Limitations1109165
+Node: Extension Design1110417
+Node: Old Extension Problems1111571
+Ref: Old Extension Problems-Footnote-11113079
+Node: Extension New Mechanism Goals1113136
+Ref: Extension New Mechanism Goals-Footnote-11116501
+Node: Extension Other Design Decisions1116687
+Node: Extension Future Growth1118793
+Node: Old Extension Mechanism1119629
+Node: Basic Concepts1121369
+Node: Basic High Level1122050
+Ref: figure-general-flow1122321
+Ref: figure-process-flow1122920
+Ref: Basic High Level-Footnote-11126149
+Node: Basic Data Typing1126334
+Node: Glossary1129689
+Node: Copying1155151
+Node: GNU Free Documentation License1192708
+Node: Index1217845

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 16cd4b49..a79aa1a6 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -3289,8 +3289,8 @@ The following list describes @command{gawk}-specific options:
@table @code
@item -b
@itemx --characters-as-bytes
-@cindex @code{-b} option
-@cindex @code{--characters-as-bytes} option
+@cindex @option{-b} option
+@cindex @option{--characters-as-bytes} option
Cause @command{gawk} to treat all input data as single-byte characters.
In addition, all output written with @code{print} or @code{printf}
are treated as single-byte characters.
@@ -3304,8 +3304,8 @@ multibyte characters. This option is an easy way to tell @command{gawk}:
@item -c
@itemx --traditional
-@cindex @code{-c} option
-@cindex @code{--traditional} option
+@cindex @option{-c} option
+@cindex @option{--traditional} option
@cindex compatibility mode (@command{gawk}), specifying
Specify @dfn{compatibility mode}, in which the GNU extensions to
the @command{awk} language are disabled, so that @command{gawk} behaves just
@@ -3316,17 +3316,17 @@ which summarizes the extensions. Also see
@item -C
@itemx --copyright
-@cindex @code{-C} option
-@cindex @code{--copyright} option
+@cindex @option{-C} option
+@cindex @option{--copyright} option
@cindex GPL (General Public License), printing
Print the short version of the General Public License and then exit.
@item -d@r{[}@var{file}@r{]}
@itemx --dump-variables@r{[}=@var{file}@r{]}
-@cindex @code{-d} option
-@cindex @code{--dump-variables} option
-@cindex @code{awkvars.out} file
-@cindex files, @code{awkvars.out}
+@cindex @option{-d} option
+@cindex @option{--dump-variables} option
+@cindex @file{awkvars.out} file
+@cindex files, @file{awkvars.out}
@cindex variables, global, printing list of
Print a sorted list of global variables, their types, and final values
to @var{file}. If no @var{file} is provided, print this
@@ -3345,8 +3345,8 @@ names like @code{i}, @code{j}, etc.)
@item -D@r{[}@var{file}@r{]}
@itemx --debug=@r{[}@var{file}@r{]}
-@cindex @code{-D} option
-@cindex @code{--debug} option
+@cindex @option{-D} option
+@cindex @option{--debug} option
@cindex @command{awk} debugging, enabling
Enable debugging of @command{awk} programs
(@pxref{Debugging}).
@@ -3358,8 +3358,8 @@ No space is allowed between the @option{-D} and @var{file}, if
@item -e @var{program-text}
@itemx --source @var{program-text}
-@cindex @code{-e} option
-@cindex @code{--source} option
+@cindex @option{-e} option
+@cindex @option{--source} option
@cindex source code, mixing
Provide program source code in the @var{program-text}.
This option allows you to mix source code in files with source
@@ -3370,8 +3370,8 @@ programs (@pxref{AWKPATH Variable}).
@item -E @var{file}
@itemx --exec @var{file}
-@cindex @code{-E} option
-@cindex @code{--exec} option
+@cindex @option{-E} option
+@cindex @option{--exec} option
@cindex @command{awk} programs, location of
@cindex CGI, @command{awk} scripts for
Similar to @option{-f}, read @command{awk} program text from @var{file}.
@@ -3401,8 +3401,8 @@ with @samp{#!} scripts (@pxref{Executable Scripts}), like so:
@item -g
@itemx --gen-pot
-@cindex @code{-g} option
-@cindex @code{--gen-pot} option
+@cindex @option{-g} option
+@cindex @option{--gen-pot} option
@cindex portable object files, generating
@cindex files, portable object, generating
Analyze the source program and
@@ -3413,8 +3413,8 @@ for information about this option.
@item -h
@itemx --help
-@cindex @code{-h} option
-@cindex @code{--help} option
+@cindex @option{-h} option
+@cindex @option{--help} option
@cindex GNU long options, printing list of
@cindex options, printing list of
@cindex printing, list of options
@@ -3439,8 +3439,8 @@ find the main source code via the @option{-f} option or on the command-line.
@item -l @var{lib}
@itemx --load @var{lib}
-@cindex @code{-l} option
-@cindex @code{--load} option
+@cindex @option{-l} option
+@cindex @option{--load} option
@cindex loading, library
Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH}
environment variable. The correct library suffix for your platform will be
@@ -3451,8 +3451,8 @@ a shared library.
@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
-@cindex @code{-l} option
-@cindex @code{--lint} option
+@cindex @option{-l} option
+@cindex @option{--lint} option
@cindex lint checking, issuing warnings
@cindex warnings, issuing
Warn about constructs that are dubious or nonportable to
@@ -3474,16 +3474,16 @@ care to search for all occurrences of each inappropriate construct. As
@item -M
@itemx --bignum
-@cindex @code{-M} option
-@cindex @code{--bignum} option
+@cindex @option{-M} option
+@cindex @option{--bignum} option
Force arbitrary precision arithmetic on numbers. This option has no effect
if @command{gawk} is not compiled to use the GNU MPFR and MP libraries
(@pxref{Arbitrary Precision Arithmetic}).
@item -n
@itemx --non-decimal-data
-@cindex @code{-n} option
-@cindex @code{--non-decimal-data} option
+@cindex @option{-n} option
+@cindex @option{--non-decimal-data} option
@cindex hexadecimal values@comma{} enabling interpretation of
@cindex octal values@comma{} enabling interpretation of
@cindex troubleshooting, @code{--non-decimal-data} option
@@ -3498,15 +3498,15 @@ Use with care.
@item -N
@itemx --use-lc-numeric
-@cindex @code{-N} option
-@cindex @code{--use-lc-numeric} option
+@cindex @option{-N} option
+@cindex @option{--use-lc-numeric} option
Force the use of the locale's decimal point character
when parsing numeric input data (@pxref{Locales}).
@item -o@r{[}@var{file}@r{]}
@itemx --pretty-print@r{[}=@var{file}@r{]}
-@cindex @code{-o} option
-@cindex @code{--pretty-print} option
+@cindex @option{-o} option
+@cindex @option{--pretty-print} option
Enable pretty-printing of @command{awk} programs.
By default, output program is created in a file named @file{awkprof.out}.
The optional @var{file} argument allows you to specify a different
@@ -3516,16 +3516,16 @@ No space is allowed between the @option{-o} and @var{file}, if
@item -O
@itemx --optimize
-@cindex @code{--optimize} option
-@cindex @code{-O} option
+@cindex @option{--optimize} option
+@cindex @option{-O} option
Enable some optimizations on the internal representation of the program.
At the moment this includes just simple constant folding. The @command{gawk}
maintainer hopes to add more optimizations over time.
@item -p@r{[}@var{file}@r{]}
@itemx --profile@r{[}=@var{file}@r{]}
-@cindex @code{-p} option
-@cindex @code{--profile} option
+@cindex @option{-p} option
+@cindex @option{--profile} option
@cindex @command{awk} profiling, enabling
Enable profiling of @command{awk} programs
(@pxref{Profiling}).
@@ -3540,8 +3540,8 @@ in the left margin, and function call counts for each function.
@item -P
@itemx --posix
-@cindex @code{-P} option
-@cindex @code{--posix} option
+@cindex @option{-P} option
+@cindex @option{--posix} option
@cindex POSIX mode
@cindex @command{gawk}, extensions@comma{} disabling
Operate in strict POSIX mode. This disables all @command{gawk}
@@ -3590,8 +3590,8 @@ also issues a warning if both options are supplied.
@item -r
@itemx --re-interval
-@cindex @code{-r} option
-@cindex @code{--re-interval} option
+@cindex @option{-r} option
+@cindex @option{--re-interval} option
@cindex regular expressions, interval expressions and
Allow interval expressions
(@pxref{Regexp Operators})
@@ -3602,8 +3602,8 @@ and for use in combination with the @option{--traditional} option.
@item -S
@itemx --sandbox
-@cindex @code{-S} option
-@cindex @code{--sandbox} option
+@cindex @option{-S} option
+@cindex @option{--sandbox} option
@cindex sandbox mode
Disable the @code{system()} function,
input redirections with @code{getline},
@@ -3615,16 +3615,16 @@ can't access your system (other than the specified input data file).
@item -t
@itemx --lint-old
-@cindex @code{-L} option
-@cindex @code{--lint-old} option
+@cindex @option{-L} option
+@cindex @option{--lint-old} option
Warn about constructs that are not available in the original version of
@command{awk} from Version 7 Unix
(@pxref{V7/SVR3.1}).
@item -V
@itemx --version
-@cindex @code{-V} option
-@cindex @code{--version} option
+@cindex @option{-V} option
+@cindex @option{--version} option
@cindex @command{gawk}, versions of, information about@comma{} printing
Print version information for this particular copy of @command{gawk}.
This allows you to determine if your copy of @command{gawk} is up to date
@@ -5043,8 +5043,8 @@ These sequences are:
@item Collating symbols
Multicharacter collating elements enclosed between
@samp{[.} and @samp{.]}. For example, if @samp{ch} is a collating element,
-then @code{[[.ch.]]} is a regexp that matches this collating element, whereas
-@code{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
+then @samp{[[.ch.]]} is a regexp that matches this collating element, whereas
+@samp{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
@cindex bracket expressions, equivalence classes
@item Equivalence classes
@@ -5052,7 +5052,7 @@ Locale-specific names for a list of
characters that are equal. The name is enclosed between
@samp{[=} and @samp{=]}.
For example, the name @samp{e} might be used to represent all of
-``e,'' ``@`e,'' and ``@'e.'' In this case, @code{[[=e=]]} is a regexp
+``e,'' ``@`e,'' and ``@'e.'' In this case, @samp{[[=e=]]} is a regexp
that matches any of @samp{e}, @samp{@'e}, or @samp{@`e}.
@end table
@@ -5096,7 +5096,7 @@ or underscores (@samp{_}):
@item \s
Matches any whitespace character.
Think of it as shorthand for
-@w{@code{[[:space:]]}}.
+@w{@samp{[[:space:]]}}.
@c @cindex operators, @code{\S} (@command{gawk})
@cindex backslash (@code{\}), @code{\S} operator (@command{gawk})
@@ -5104,7 +5104,7 @@ Think of it as shorthand for
@item \S
Matches any character that is not whitespace.
Think of it as shorthand for
-@w{@code{[^[:space:]]}}.
+@w{@samp{[^[:space:]]}}.
@c @cindex operators, @code{\w} (@command{gawk})
@cindex backslash (@code{\}), @code{\w} operator (@command{gawk})
@@ -5112,7 +5112,7 @@ Think of it as shorthand for
@item \w
Matches any word-constituent character---that is, it matches any
letter, digit, or underscore. Think of it as shorthand for
-@w{@code{[[:alnum:]_]}}.
+@w{@samp{[[:alnum:]_]}}.
@c @cindex operators, @code{\W} (@command{gawk})
@cindex backslash (@code{\}), @code{\W} operator (@command{gawk})
@@ -5120,7 +5120,7 @@ letter, digit, or underscore. Think of it as shorthand for
@item \W
Matches any character that is not word-constituent.
Think of it as shorthand for
-@w{@code{[^[:alnum:]_]}}.
+@w{@samp{[^[:alnum:]_]}}.
@c @cindex operators, @code{\<} (@command{gawk})
@cindex backslash (@code{\}), @code{\<} operator (@command{gawk})
@@ -5231,7 +5231,7 @@ are allowed.
@item @code{--traditional}
Traditional Unix @command{awk} regexps are matched. The GNU operators
are not special, and interval expressions are not available.
-The POSIX character classes (@code{[[:alnum:]]}, etc.) are supported,
+The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported,
as Brian Kernighan's @command{awk} does support them.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regexp metacharacters.
@@ -5857,21 +5857,27 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+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
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
+
@docbook
</sidebar>
@end docbook
@@ -5902,20 +5908,26 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+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
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
@end cartouche
@end ifnotdocbook
@c ENDOFRANGE inspl
@@ -10105,7 +10117,7 @@ point when reading the @command{awk} program source code, and for command-line
variable assignments (@pxref{Other Arguments}).
However, when interpreting input data, for @code{print} and @code{printf} output,
and for number to string conversion, the local decimal point character is used.
-@value{DARKCORNER}.
+@value{DARKCORNER}
Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
@@ -34096,7 +34108,7 @@ The option for raw sockets was removed, since it was never implemented
(@pxref{TCP/IP Networking}).
@item
-Ranges of the form @code{[d-h]} are treated as if they were in the
+Ranges of the form @samp{[d-h]} are treated as if they were in the
C locale, no matter what kind of regexp is being used, and even if
@option{--posix}
(@pxref{Ranges and Locales}).
@@ -34304,7 +34316,7 @@ When @command{gawk} switched to using locale-aware regexp matchers,
the problems began; especially as both GNU/Linux and commercial Unix
vendors started implementing non-ASCII locales, @emph{and making them
the default}. Perhaps the most frequently asked question became something
-like ``why does @code{[A-Z]} match lowercase letters?!?''
+like ``why does @samp{[A-Z]} match lowercase letters?!?''
This situation existed for close to 10 years, if not more, and
the @command{gawk} maintainer grew weary of trying to explain that
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 4bb52d2d..83e22e7d 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -3217,8 +3217,8 @@ The following list describes @command{gawk}-specific options:
@table @code
@item -b
@itemx --characters-as-bytes
-@cindex @code{-b} option
-@cindex @code{--characters-as-bytes} option
+@cindex @option{-b} option
+@cindex @option{--characters-as-bytes} option
Cause @command{gawk} to treat all input data as single-byte characters.
In addition, all output written with @code{print} or @code{printf}
are treated as single-byte characters.
@@ -3232,8 +3232,8 @@ multibyte characters. This option is an easy way to tell @command{gawk}:
@item -c
@itemx --traditional
-@cindex @code{-c} option
-@cindex @code{--traditional} option
+@cindex @option{-c} option
+@cindex @option{--traditional} option
@cindex compatibility mode (@command{gawk}), specifying
Specify @dfn{compatibility mode}, in which the GNU extensions to
the @command{awk} language are disabled, so that @command{gawk} behaves just
@@ -3244,17 +3244,17 @@ which summarizes the extensions. Also see
@item -C
@itemx --copyright
-@cindex @code{-C} option
-@cindex @code{--copyright} option
+@cindex @option{-C} option
+@cindex @option{--copyright} option
@cindex GPL (General Public License), printing
Print the short version of the General Public License and then exit.
@item -d@r{[}@var{file}@r{]}
@itemx --dump-variables@r{[}=@var{file}@r{]}
-@cindex @code{-d} option
-@cindex @code{--dump-variables} option
-@cindex @code{awkvars.out} file
-@cindex files, @code{awkvars.out}
+@cindex @option{-d} option
+@cindex @option{--dump-variables} option
+@cindex @file{awkvars.out} file
+@cindex files, @file{awkvars.out}
@cindex variables, global, printing list of
Print a sorted list of global variables, their types, and final values
to @var{file}. If no @var{file} is provided, print this
@@ -3273,8 +3273,8 @@ names like @code{i}, @code{j}, etc.)
@item -D@r{[}@var{file}@r{]}
@itemx --debug=@r{[}@var{file}@r{]}
-@cindex @code{-D} option
-@cindex @code{--debug} option
+@cindex @option{-D} option
+@cindex @option{--debug} option
@cindex @command{awk} debugging, enabling
Enable debugging of @command{awk} programs
(@pxref{Debugging}).
@@ -3286,8 +3286,8 @@ No space is allowed between the @option{-D} and @var{file}, if
@item -e @var{program-text}
@itemx --source @var{program-text}
-@cindex @code{-e} option
-@cindex @code{--source} option
+@cindex @option{-e} option
+@cindex @option{--source} option
@cindex source code, mixing
Provide program source code in the @var{program-text}.
This option allows you to mix source code in files with source
@@ -3298,8 +3298,8 @@ programs (@pxref{AWKPATH Variable}).
@item -E @var{file}
@itemx --exec @var{file}
-@cindex @code{-E} option
-@cindex @code{--exec} option
+@cindex @option{-E} option
+@cindex @option{--exec} option
@cindex @command{awk} programs, location of
@cindex CGI, @command{awk} scripts for
Similar to @option{-f}, read @command{awk} program text from @var{file}.
@@ -3329,8 +3329,8 @@ with @samp{#!} scripts (@pxref{Executable Scripts}), like so:
@item -g
@itemx --gen-pot
-@cindex @code{-g} option
-@cindex @code{--gen-pot} option
+@cindex @option{-g} option
+@cindex @option{--gen-pot} option
@cindex portable object files, generating
@cindex files, portable object, generating
Analyze the source program and
@@ -3341,8 +3341,8 @@ for information about this option.
@item -h
@itemx --help
-@cindex @code{-h} option
-@cindex @code{--help} option
+@cindex @option{-h} option
+@cindex @option{--help} option
@cindex GNU long options, printing list of
@cindex options, printing list of
@cindex printing, list of options
@@ -3367,8 +3367,8 @@ find the main source code via the @option{-f} option or on the command-line.
@item -l @var{lib}
@itemx --load @var{lib}
-@cindex @code{-l} option
-@cindex @code{--load} option
+@cindex @option{-l} option
+@cindex @option{--load} option
@cindex loading, library
Load a shared library @var{lib}. This searches for the library using the @env{AWKLIBPATH}
environment variable. The correct library suffix for your platform will be
@@ -3379,8 +3379,8 @@ a shared library.
@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
-@cindex @code{-l} option
-@cindex @code{--lint} option
+@cindex @option{-l} option
+@cindex @option{--lint} option
@cindex lint checking, issuing warnings
@cindex warnings, issuing
Warn about constructs that are dubious or nonportable to
@@ -3402,16 +3402,16 @@ care to search for all occurrences of each inappropriate construct. As
@item -M
@itemx --bignum
-@cindex @code{-M} option
-@cindex @code{--bignum} option
+@cindex @option{-M} option
+@cindex @option{--bignum} option
Force arbitrary precision arithmetic on numbers. This option has no effect
if @command{gawk} is not compiled to use the GNU MPFR and MP libraries
(@pxref{Arbitrary Precision Arithmetic}).
@item -n
@itemx --non-decimal-data
-@cindex @code{-n} option
-@cindex @code{--non-decimal-data} option
+@cindex @option{-n} option
+@cindex @option{--non-decimal-data} option
@cindex hexadecimal values@comma{} enabling interpretation of
@cindex octal values@comma{} enabling interpretation of
@cindex troubleshooting, @code{--non-decimal-data} option
@@ -3426,15 +3426,15 @@ Use with care.
@item -N
@itemx --use-lc-numeric
-@cindex @code{-N} option
-@cindex @code{--use-lc-numeric} option
+@cindex @option{-N} option
+@cindex @option{--use-lc-numeric} option
Force the use of the locale's decimal point character
when parsing numeric input data (@pxref{Locales}).
@item -o@r{[}@var{file}@r{]}
@itemx --pretty-print@r{[}=@var{file}@r{]}
-@cindex @code{-o} option
-@cindex @code{--pretty-print} option
+@cindex @option{-o} option
+@cindex @option{--pretty-print} option
Enable pretty-printing of @command{awk} programs.
By default, output program is created in a file named @file{awkprof.out}.
The optional @var{file} argument allows you to specify a different
@@ -3444,16 +3444,16 @@ No space is allowed between the @option{-o} and @var{file}, if
@item -O
@itemx --optimize
-@cindex @code{--optimize} option
-@cindex @code{-O} option
+@cindex @option{--optimize} option
+@cindex @option{-O} option
Enable some optimizations on the internal representation of the program.
At the moment this includes just simple constant folding. The @command{gawk}
maintainer hopes to add more optimizations over time.
@item -p@r{[}@var{file}@r{]}
@itemx --profile@r{[}=@var{file}@r{]}
-@cindex @code{-p} option
-@cindex @code{--profile} option
+@cindex @option{-p} option
+@cindex @option{--profile} option
@cindex @command{awk} profiling, enabling
Enable profiling of @command{awk} programs
(@pxref{Profiling}).
@@ -3468,8 +3468,8 @@ in the left margin, and function call counts for each function.
@item -P
@itemx --posix
-@cindex @code{-P} option
-@cindex @code{--posix} option
+@cindex @option{-P} option
+@cindex @option{--posix} option
@cindex POSIX mode
@cindex @command{gawk}, extensions@comma{} disabling
Operate in strict POSIX mode. This disables all @command{gawk}
@@ -3518,8 +3518,8 @@ also issues a warning if both options are supplied.
@item -r
@itemx --re-interval
-@cindex @code{-r} option
-@cindex @code{--re-interval} option
+@cindex @option{-r} option
+@cindex @option{--re-interval} option
@cindex regular expressions, interval expressions and
Allow interval expressions
(@pxref{Regexp Operators})
@@ -3530,8 +3530,8 @@ and for use in combination with the @option{--traditional} option.
@item -S
@itemx --sandbox
-@cindex @code{-S} option
-@cindex @code{--sandbox} option
+@cindex @option{-S} option
+@cindex @option{--sandbox} option
@cindex sandbox mode
Disable the @code{system()} function,
input redirections with @code{getline},
@@ -3543,16 +3543,16 @@ can't access your system (other than the specified input data file).
@item -t
@itemx --lint-old
-@cindex @code{-L} option
-@cindex @code{--lint-old} option
+@cindex @option{-L} option
+@cindex @option{--lint-old} option
Warn about constructs that are not available in the original version of
@command{awk} from Version 7 Unix
(@pxref{V7/SVR3.1}).
@item -V
@itemx --version
-@cindex @code{-V} option
-@cindex @code{--version} option
+@cindex @option{-V} option
+@cindex @option{--version} option
@cindex @command{gawk}, versions of, information about@comma{} printing
Print version information for this particular copy of @command{gawk}.
This allows you to determine if your copy of @command{gawk} is up to date
@@ -4890,8 +4890,8 @@ These sequences are:
@item Collating symbols
Multicharacter collating elements enclosed between
@samp{[.} and @samp{.]}. For example, if @samp{ch} is a collating element,
-then @code{[[.ch.]]} is a regexp that matches this collating element, whereas
-@code{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
+then @samp{[[.ch.]]} is a regexp that matches this collating element, whereas
+@samp{[ch]} is a regexp that matches either @samp{c} or @samp{h}.
@cindex bracket expressions, equivalence classes
@item Equivalence classes
@@ -4899,7 +4899,7 @@ Locale-specific names for a list of
characters that are equal. The name is enclosed between
@samp{[=} and @samp{=]}.
For example, the name @samp{e} might be used to represent all of
-``e,'' ``@`e,'' and ``@'e.'' In this case, @code{[[=e=]]} is a regexp
+``e,'' ``@`e,'' and ``@'e.'' In this case, @samp{[[=e=]]} is a regexp
that matches any of @samp{e}, @samp{@'e}, or @samp{@`e}.
@end table
@@ -4943,7 +4943,7 @@ or underscores (@samp{_}):
@item \s
Matches any whitespace character.
Think of it as shorthand for
-@w{@code{[[:space:]]}}.
+@w{@samp{[[:space:]]}}.
@c @cindex operators, @code{\S} (@command{gawk})
@cindex backslash (@code{\}), @code{\S} operator (@command{gawk})
@@ -4951,7 +4951,7 @@ Think of it as shorthand for
@item \S
Matches any character that is not whitespace.
Think of it as shorthand for
-@w{@code{[^[:space:]]}}.
+@w{@samp{[^[:space:]]}}.
@c @cindex operators, @code{\w} (@command{gawk})
@cindex backslash (@code{\}), @code{\w} operator (@command{gawk})
@@ -4959,7 +4959,7 @@ Think of it as shorthand for
@item \w
Matches any word-constituent character---that is, it matches any
letter, digit, or underscore. Think of it as shorthand for
-@w{@code{[[:alnum:]_]}}.
+@w{@samp{[[:alnum:]_]}}.
@c @cindex operators, @code{\W} (@command{gawk})
@cindex backslash (@code{\}), @code{\W} operator (@command{gawk})
@@ -4967,7 +4967,7 @@ letter, digit, or underscore. Think of it as shorthand for
@item \W
Matches any character that is not word-constituent.
Think of it as shorthand for
-@w{@code{[^[:alnum:]_]}}.
+@w{@samp{[^[:alnum:]_]}}.
@c @cindex operators, @code{\<} (@command{gawk})
@cindex backslash (@code{\}), @code{\<} operator (@command{gawk})
@@ -5078,7 +5078,7 @@ are allowed.
@item @code{--traditional}
Traditional Unix @command{awk} regexps are matched. The GNU operators
are not special, and interval expressions are not available.
-The POSIX character classes (@code{[[:alnum:]]}, etc.) are supported,
+The POSIX character classes (@samp{[[:alnum:]]}, etc.) are supported,
as Brian Kernighan's @command{awk} does support them.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regexp metacharacters.
@@ -5655,20 +5655,26 @@ BEGIN @{ RS = "\0" @} # whole file becomes one record?
@command{gawk} in fact accepts this, and uses the @sc{nul}
character for the record separator.
However, this usage is @emph{not} portable
-to other @command{awk} implementations.
+to most other @command{awk} implementations.
@cindex dark corner, strings, storing
-All other @command{awk} implementations@footnote{At least that we know
+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
@samp{RS = "\0"} is the same as @samp{RS = ""}.
@value{DARKCORNER}
+It happens that recent versions of @command{mawk} can use the @sc{nul}
+character as a record separator. However, this is a special case:
+@command{mawk} does not allow embedded @sc{nul} characters in strings.
+
@cindex records, treating files as
@cindex files, as single records
The best way to treat a whole file as a single record is to
simply read the file in, one record at a time, concatenating each
record onto the end of the previous ones.
+
+@c @strong{FIXME}: Using @sc{nul} is good for @file{/proc/environ} etc.
@end sidebar
@c ENDOFRANGE inspl
@c ENDOFRANGE recspl
@@ -9602,7 +9608,7 @@ point when reading the @command{awk} program source code, and for command-line
variable assignments (@pxref{Other Arguments}).
However, when interpreting input data, for @code{print} and @code{printf} output,
and for number to string conversion, the local decimal point character is used.
-@value{DARKCORNER}.
+@value{DARKCORNER}
Here are some examples indicating the difference in behavior,
on a GNU/Linux system:
@@ -33245,7 +33251,7 @@ The option for raw sockets was removed, since it was never implemented
(@pxref{TCP/IP Networking}).
@item
-Ranges of the form @code{[d-h]} are treated as if they were in the
+Ranges of the form @samp{[d-h]} are treated as if they were in the
C locale, no matter what kind of regexp is being used, and even if
@option{--posix}
(@pxref{Ranges and Locales}).
@@ -33453,7 +33459,7 @@ When @command{gawk} switched to using locale-aware regexp matchers,
the problems began; especially as both GNU/Linux and commercial Unix
vendors started implementing non-ASCII locales, @emph{and making them
the default}. Perhaps the most frequently asked question became something
-like ``why does @code{[A-Z]} match lowercase letters?!?''
+like ``why does @samp{[A-Z]} match lowercase letters?!?''
This situation existed for close to 10 years, if not more, and
the @command{gawk} maintainer grew weary of trying to explain that
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 965e0c66..bde626de 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-12 John E. Malmberg <wb8tyw@qsl.net>
+
+ * time.c: Better hack for nanosleep bug based on feedback from HP.
+
2013-12-29 John E. Malmberg <wb8tyw@qsl.net>
* filefuncs.c: Fix compile on VMS.
diff --git a/extension/time.c b/extension/time.c
index b1e9a40a..c336df88 100644
--- a/extension/time.c
+++ b/extension/time.c
@@ -1,25 +1,24 @@
/*
* time.c - Builtin functions that provide time-related functions.
- *
*/
/*
* Copyright (C) 2012, 2013
* the Free Software Foundation, Inc.
- *
+ *
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
- *
+ *
* GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* GAWK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -46,18 +45,28 @@
#undef gettimeofday
#endif
#ifdef __ia64__
-/* nanosleep not working on IA64 */
+/* nanosleep not working correctly on IA64 */
static int
-vms_fake_nanosleep(const struct timespec *rqdly, struct timespec *rmdly)
+vms_fake_nanosleep(struct timespec *rqdly, struct timespec *rmdly)
{
int result;
+ struct timespec mtime1, mtime2;
- result = sleep(rqdly->tv_sec);
- if (result == 0) {
+ result = nanosleep(rqdly, &mtime1);
+ if (result == 0)
return 0;
- } else {
- return -1;
+
+ /* On IA64 it returns 100 nanoseconds early with an error */
+ if ((mtime1.tv_sec == 0) && (mtime1.tv_nsec <= 100)) {
+ mtime1.tv_nsec += 100;
+ result = nanosleep(&mtime1, &mtime2);
+ if (result == 0)
+ return 0;
+ if ((mtime2.tv_sec == 0) && (mtime2.tv_nsec <= 100)) {
+ return 0;
+ }
}
+ return result;
}
#define nanosleep(x,y) vms_fake_nanosleep(x, y)
#endif
diff --git a/vms/ChangeLog b/vms/ChangeLog
index c3780cf3..94bc9f1a 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-12 John E. Malmberg <wb8tyw@qsl.net>
+
+ * vmstest.com: (strftime) requires GNV Coreutils date command to run
+ (readdir) fix file cleanup to not generate warnings.
+
2014-01-21 John E. Malmberg <wb8tyw@qsl.net>
* generate_config_vms_h_gawk.com: upate copyright and fix exit status.
@@ -9,7 +14,7 @@
2014-01-03 John E. Malmberg <wb8tyw@qsl.net>
* config_h.com, generate_config_vms_h_gawk.com,
- vms_args.c, vms_cli.c, vms_fwrite.c, vms_gawk.c, vms_misc.c,
+ vms_args.c, vms_cli.c, vms_fwrite.c, vms_gawk.c, vms_misc.c,
vms_popen.c: Update copyright to 2014.
* descrip.mms: Improve spotless cleanup.
* vmstest.com: Improve test cleanup.
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 4b5e2d5c..30bdbf22 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -606,6 +606,14 @@ $ ! this test could fail on slow machines or on a second boundary,
$ ! so if it does, double check the actual results
$ ! This test needs SYS$TIMEZONE_NAME and SYS$TIMEZONE_RULE
$ ! to be properly defined.
+$ ! This test now needs GNV Corutils to work
+$ date_bin = "gnv$gnu:[bin]gnv$date.exe"
+$ if f$search(date_bin) .eqs. ""
+$ then
+$ echo "''test' skipped"
+$ return
+$ endif
+$ date := $'date_bin'
$!! date | gawk -v "OUTPUT"=_strftime.tmp -f strftime.awk
$ now = f$time()
$ wkd = f$extract(0,3,f$cvtime(now,,"WEEKDAY"))
@@ -1902,7 +1910,8 @@ $ then
$ call exit_code '$status' _'test'.tmp
$ write sys$output _'test'.tmp
$ else
-$ rm _'test'.tmp;*,_'test'.;*
+$ if f$search("_''test'.tmp") .nes. "" then rm _'test'.tmp;*
+$ if f$search("_''test'.") .nes. "" then rm _'test'.;*
$ endif
$ set On
$ return