[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/namespaces, created. gawk-4.1.0-
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/namespaces, created. gawk-4.1.0-2570-gc5788a1 |
Date: |
Tue, 30 May 2017 07:04:16 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/namespaces has been created
at c5788a173624edc1d3e7396d71c868e30a37e809 (commit)
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=c5788a173624edc1d3e7396d71c868e30a37e809
commit c5788a173624edc1d3e7396d71c868e30a37e809
Author: Arnold D. Robbins <address@hidden>
Date: Tue May 30 14:03:35 2017 +0300
More namespace doc. Make -e require full syntactic units.
diff --git a/ChangeLog b/ChangeLog
index c4a1a1a..1257afb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2017-05-30 Arnold D. Robbins <address@hidden>
+ * awkgram.y (nextc): Force -e chunks to be syntactic units.
+ Needed for namespaces to work correctly.
+
+2017-05-30 Arnold D. Robbins <address@hidden>
+
* NEWS: Mention PROCINFO["argv"].
2017-05-24 Andrew J. Schorr <address@hidden>
diff --git a/awkgram.c b/awkgram.c
index 4325e77..0e9a8d7 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5514,6 +5514,9 @@ check_bad_char(int c)
/* nextc --- get the next input character */
+// For namespaces, -e chunks must be syntactic units.
+#define NO_CONTINUE_SOURCE_STRINGS 1
+
static int
nextc(bool check_for_bad)
{
@@ -5601,6 +5604,7 @@ again:
return END_SRC;
}
}
+#undef NO_CONTINUE_SOURCE_STRINGS
/* pushback --- push a character back on the input */
diff --git a/awkgram.y b/awkgram.y
index e4f5bab..37acf28 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3094,6 +3094,9 @@ check_bad_char(int c)
/* nextc --- get the next input character */
+// For namespaces, -e chunks must be syntactic units.
+#define NO_CONTINUE_SOURCE_STRINGS 1
+
static int
nextc(bool check_for_bad)
{
@@ -3181,6 +3184,7 @@ again:
return END_SRC;
}
}
+#undef NO_CONTINUE_SOURCE_STRINGS
/* pushback --- push a character back on the input */
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 2efa50b..9dc07ed 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -2,6 +2,7 @@
* gawktexi.in: Initial doc on namespaces. Serves as a design
right now.
+ * gawktexi.in: More doc added.
2017-05-30 Arnold D. Robbins <address@hidden>
diff --git a/doc/gawk.info b/doc/gawk.info
index 66998ed..537cae6 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -83,6 +83,7 @@ in (a) below. A copy of the license is included in the
section entitled
* Library Functions:: A Library of 'awk' Functions.
* Sample Programs:: Many 'awk' programs with complete
explanations.
+* Namespaces:: How namespaces work in 'gawk'.
* Advanced Features:: Stuff for advanced users, specific to
'gawk'.
* Internationalization:: Getting 'gawk' to speak your
@@ -479,6 +480,12 @@ in (a) below. A copy of the license is included in the
section entitled
time on their hands.
* Programs Summary:: Summary of programs.
* Programs Exercises:: Exercises.
+* Global Namespace:: The global namespace in standard 'awk'.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
* Nondecimal Data:: Allowing nondecimal input data.
* Array Sorting:: Facilities for controlling array
traversal and sorting arrays.
@@ -2568,15 +2575,15 @@ The following list describes options mandated by the
POSIX standard:
character (even if it doesn't). This makes building the total
program easier.
- CAUTION: At the moment, there is no requirement that each
- PROGRAM-TEXT be a full syntactic unit. I.e., the following
- currently works:
+ CAUTION: Prior to version *FIXME* 5.0, there was no
+ requirement that each PROGRAM-TEXT be a full syntactic unit.
+ I.e., the following worked:
$ gawk -e 'BEGIN { a = 5 ;' -e 'print a }'
-| 5
- However, this could change in the future, so it's not a good
- idea to rely upon this feature.
+ However, this is no longer true. If you have any scripts that
+ rely upon this feature, you should revise them.
'-E' FILE
'--exec' FILE
@@ -19742,6 +19749,13 @@ This major node describes a feature that is specific
to 'gawk'.
* Menu:
+* Global Namespace:: The global namespace in standard 'awk'.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
+
File: gawk.info, Node: Global Namespace, Next: Qualified Names, Up:
Namespaces
@@ -19801,6 +19815,9 @@ unqualified identifiers whose names are all uppercase
letters to be in
the 'awk' namespace. This makes it possible for you to easily reference
'gawk''s global variables from different namespaces.
+ It is a syntactic error to use qualified names for function parameter
+names.
+
File: gawk.info, Node: Changing The Namespace, Next: Namespace Example,
Prev: Default Namespace, Up: Namespaces
@@ -19812,7 +19829,7 @@ the top level of your program:
@namespace "passwd"
- BEGIN { }
+ BEGIN { ... }
...
After this directive, all simple non-uppercase identifiers are placed
@@ -19825,17 +19842,14 @@ file, although this is likely to become confusing if
you do it a lot.
being parsed by 'gawk'. There is no concept of a "current"
namespace during runtime. Be sure you understand the distinction.
- Each source file for '-i' and '-f' starts out with an implicit '
-"awk"'.
+ Each source file for '-i' and '-f' starts out with an implicit
+'@namespace "awk"'.
Similarly, each chunk of command-line code with '-e' has such an
implicit statement.
- FIXME: The semantics of '-e' change to require it to be syntactic
-unit.
-
- FIXME: Update doc earlier in this book and change the corresponding
-code.
+ The use of '@namespace' has no influence upon the order of execution
+of 'BEGIN', 'BEGINFILE', 'END', and 'ENDFILE' rules.
File: gawk.info, Node: Namespace Example, Next: Namespace Misc, Prev:
Changing The Namespace, Up: Namespaces
@@ -19875,11 +19889,11 @@ File: gawk.info, Node: Namespace Example, Next:
Namespace Misc, Prev: Changin
RS = "\n"
pwcat = _pw_awklib "pwcat"
- while ((pwcat | getline) > 0)
+ while ((pwcat | getline) > 0) {
Byname[$1] = $0
Byuid[$3] = $0
Bycount[++_pw_total] = $0
-
+ }
close(pwcat)
Count = 0
Inited = 1
@@ -19949,6 +19963,9 @@ File: gawk.info, Node: Namespace Misc, Prev:
Namespace Example, Up: Namespace
Other notes for reviewers:
+'SYMTAB', 'FUNCTAB' and 'PROCINFO["identifiers"]'
+ The subscripts are all fully qualified names.
+
Profiler:
When profiling, we can add an 'Op_Namespace' to the start of each
rule. If it has changed since the previous one, output an
@@ -19957,11 +19974,42 @@ Profiler:
if 'XXX' is all uppercase, strip off the 'awk' part.
Debugger:
- Simply prints fully qualified names all the time. Maybe allow a
+ Simply print fully qualified names all the time. Maybe allow a
'namespace XXX' command in the debugger to set the namespace and it
will use that to create fully qualified names? Have to be careful
about all uppercase names though.
+How does this affect indirect calls?
+ The current namespace is a parse time thing, not a dynamic thing,
+ so for indirect calls to work, use something like:
+
+ @namespace "foo"
+
+ function bar() { ... }
+
+ {
+ ...
+ x = "foo.bar"
+ ...
+ @x()
+ }
+
+ This is particularly true if 'x' is passed as a "function pointer"
+ to another function in another namespace for that function to call
+ through it.
+
+How does this affect '@include'?
+ Basically '@include' should push and pop the namespace. Each
+ '@include' saves the current namespace and starts over with
+ namespace 'awk' until an '@namespace' is seen.
+
+Extension functions
+ Revise the current macros to pass '"awk"' as the namespace argument
+ and add new macros with '_ns' or some such in the name that pass
+ the namespace of the extension. This preserves backwards
+ compatibility at the source level while providing access to
+ namespaces as needed.
+
File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev:
Namespaces, Up: Top
@@ -35973,587 +36021,587 @@ Index
Tag Table:
Node: Top1200
-Node: Foreword343279
-Node: Foreword447721
-Node: Preface49253
-Ref: Preface-Footnote-152112
-Ref: Preface-Footnote-252219
-Ref: Preface-Footnote-352453
-Node: History52595
-Node: Names54947
-Ref: Names-Footnote-156041
-Node: This Manual56188
-Ref: This Manual-Footnote-162673
-Node: Conventions62773
-Node: Manual History65127
-Ref: Manual History-Footnote-168122
-Ref: Manual History-Footnote-268163
-Node: How To Contribute68237
-Node: Acknowledgments68888
-Node: Getting Started73774
-Node: Running gawk76213
-Node: One-shot77403
-Node: Read Terminal78666
-Node: Long80659
-Node: Executable Scripts82172
-Ref: Executable Scripts-Footnote-184967
-Node: Comments85070
-Node: Quoting87554
-Node: DOS Quoting93071
-Node: Sample Data Files95126
-Node: Very Simple97721
-Node: Two Rules102623
-Node: More Complex104508
-Node: Statements/Lines107374
-Ref: Statements/Lines-Footnote-1111833
-Node: Other Features112098
-Node: When113034
-Ref: When-Footnote-1114788
-Node: Intro Summary114853
-Node: Invoking Gawk115737
-Node: Command Line117251
-Node: Options118049
-Ref: Options-Footnote-1134668
-Ref: Options-Footnote-2134898
-Node: Other Arguments134923
-Node: Naming Standard Input137870
-Node: Environment Variables138963
-Node: AWKPATH Variable139521
-Ref: AWKPATH Variable-Footnote-1142932
-Ref: AWKPATH Variable-Footnote-2142966
-Node: AWKLIBPATH Variable143227
-Node: Other Environment Variables144484
-Node: Exit Status148305
-Node: Include Files148982
-Node: Loading Shared Libraries152577
-Node: Obsolete154005
-Node: Undocumented154697
-Node: Invoking Summary154994
-Node: Regexp156654
-Node: Regexp Usage158108
-Node: Escape Sequences160145
-Node: Regexp Operators166377
-Ref: Regexp Operators-Footnote-1173793
-Ref: Regexp Operators-Footnote-2173940
-Node: Bracket Expressions174038
-Ref: table-char-classes176514
-Node: Leftmost Longest179651
-Node: Computed Regexps180954
-Node: GNU Regexp Operators184381
-Node: Case-sensitivity188060
-Ref: Case-sensitivity-Footnote-1190947
-Ref: Case-sensitivity-Footnote-2191182
-Node: Regexp Summary191290
-Node: Reading Files192756
-Node: Records195025
-Node: awk split records195758
-Node: gawk split records200689
-Ref: gawk split records-Footnote-1205229
-Node: Fields205266
-Node: Nonconstant Fields208007
-Ref: Nonconstant Fields-Footnote-1210243
-Node: Changing Fields210447
-Node: Field Separators216375
-Node: Default Field Splitting219073
-Node: Regexp Field Splitting220191
-Node: Single Character Fields223544
-Node: Command Line Field Separator224604
-Node: Full Line Fields227822
-Ref: Full Line Fields-Footnote-1229344
-Ref: Full Line Fields-Footnote-2229390
-Node: Field Splitting Summary229491
-Node: Constant Size231565
-Node: Fixed width data232297
-Node: Skipping intervening235764
-Node: Allowing trailing data236562
-Node: Fields with fixed data237599
-Node: Splitting By Content239117
-Ref: Splitting By Content-Footnote-1242767
-Node: Testing field creation242930
-Node: Multiple Line244551
-Ref: Multiple Line-Footnote-1250435
-Node: Getline250614
-Node: Plain Getline253083
-Node: Getline/Variable255724
-Node: Getline/File256875
-Node: Getline/Variable/File258263
-Ref: Getline/Variable/File-Footnote-1259868
-Node: Getline/Pipe259956
-Node: Getline/Variable/Pipe262663
-Node: Getline/Coprocess263798
-Node: Getline/Variable/Coprocess265065
-Node: Getline Notes265807
-Node: Getline Summary268604
-Ref: table-getline-variants269028
-Node: Read Timeout269776
-Ref: Read Timeout-Footnote-1273682
-Node: Retrying Input273740
-Node: Command-line directories274939
-Node: Input Summary275845
-Node: Input Exercises279017
-Node: Printing279745
-Node: Print281579
-Node: Print Examples283036
-Node: Output Separators285816
-Node: OFMT287833
-Node: Printf289189
-Node: Basic Printf289974
-Node: Control Letters291548
-Node: Format Modifiers295536
-Node: Printf Examples301551
-Node: Redirection304037
-Node: Special FD310878
-Ref: Special FD-Footnote-1314046
-Node: Special Files314120
-Node: Other Inherited Files314737
-Node: Special Network315738
-Node: Special Caveats316598
-Node: Close Files And Pipes317547
-Ref: table-close-pipe-return-values324454
-Ref: Close Files And Pipes-Footnote-1325237
-Ref: Close Files And Pipes-Footnote-2325385
-Node: Nonfatal325537
-Node: Output Summary327862
-Node: Output Exercises329084
-Node: Expressions329763
-Node: Values330951
-Node: Constants331629
-Node: Scalar Constants332320
-Ref: Scalar Constants-Footnote-1333184
-Node: Nondecimal-numbers333434
-Node: Regexp Constants336435
-Node: Using Constant Regexps336961
-Node: Standard Regexp Constants337583
-Node: Strong Regexp Constants340771
-Node: Variables343729
-Node: Using Variables344386
-Node: Assignment Options346296
-Node: Conversion348169
-Node: Strings And Numbers348693
-Ref: Strings And Numbers-Footnote-1351756
-Node: Locale influences conversions351865
-Ref: table-locale-affects354623
-Node: All Operators355241
-Node: Arithmetic Ops355870
-Node: Concatenation358376
-Ref: Concatenation-Footnote-1361223
-Node: Assignment Ops361330
-Ref: table-assign-ops366321
-Node: Increment Ops367634
-Node: Truth Values and Conditions371094
-Node: Truth Values372168
-Node: Typing and Comparison373216
-Node: Variable Typing374036
-Ref: Variable Typing-Footnote-1380499
-Ref: Variable Typing-Footnote-2380571
-Node: Comparison Operators380648
-Ref: table-relational-ops381067
-Node: POSIX String Comparison384562
-Ref: POSIX String Comparison-Footnote-1386257
-Ref: POSIX String Comparison-Footnote-2386396
-Node: Boolean Ops386480
-Ref: Boolean Ops-Footnote-1390962
-Node: Conditional Exp391054
-Node: Function Calls392790
-Node: Precedence396667
-Node: Locales400326
-Node: Expressions Summary401958
-Node: Patterns and Actions404531
-Node: Pattern Overview405651
-Node: Regexp Patterns407328
-Node: Expression Patterns407870
-Node: Ranges411651
-Node: BEGIN/END414759
-Node: Using BEGIN/END415520
-Ref: Using BEGIN/END-Footnote-1418256
-Node: I/O And BEGIN/END418362
-Node: BEGINFILE/ENDFILE420676
-Node: Empty423583
-Node: Using Shell Variables423900
-Node: Action Overview426174
-Node: Statements428499
-Node: If Statement430347
-Node: While Statement431842
-Node: Do Statement433870
-Node: For Statement435018
-Node: Switch Statement438176
-Node: Break Statement440562
-Node: Continue Statement442654
-Node: Next Statement444481
-Node: Nextfile Statement446864
-Node: Exit Statement449516
-Node: Built-in Variables451919
-Node: User-modified453052
-Node: Auto-set460819
-Ref: Auto-set-Footnote-1476416
-Ref: Auto-set-Footnote-2476622
-Node: ARGC and ARGV476678
-Node: Pattern Action Summary480891
-Node: Arrays483321
-Node: Array Basics484650
-Node: Array Intro485494
-Ref: figure-array-elements487469
-Ref: Array Intro-Footnote-1490173
-Node: Reference to Elements490301
-Node: Assigning Elements492765
-Node: Array Example493256
-Node: Scanning an Array495015
-Node: Controlling Scanning498037
-Ref: Controlling Scanning-Footnote-1503436
-Node: Numeric Array Subscripts503752
-Node: Uninitialized Subscripts505936
-Node: Delete507555
-Ref: Delete-Footnote-1510307
-Node: Multidimensional510364
-Node: Multiscanning513459
-Node: Arrays of Arrays515050
-Node: Arrays Summary519817
-Node: Functions521910
-Node: Built-in522948
-Node: Calling Built-in524029
-Node: Numeric Functions526025
-Ref: Numeric Functions-Footnote-1530970
-Ref: Numeric Functions-Footnote-2531327
-Ref: Numeric Functions-Footnote-3531375
-Node: String Functions531647
-Ref: String Functions-Footnote-1555305
-Ref: String Functions-Footnote-2555433
-Ref: String Functions-Footnote-3555681
-Node: Gory Details555768
-Ref: table-sub-escapes557559
-Ref: table-sub-proposed559078
-Ref: table-posix-sub560441
-Ref: table-gensub-escapes561982
-Ref: Gory Details-Footnote-1562805
-Node: I/O Functions562959
-Ref: table-system-return-values569541
-Ref: I/O Functions-Footnote-1571521
-Ref: I/O Functions-Footnote-2571669
-Node: Time Functions571789
-Ref: Time Functions-Footnote-1582456
-Ref: Time Functions-Footnote-2582524
-Ref: Time Functions-Footnote-3582682
-Ref: Time Functions-Footnote-4582793
-Ref: Time Functions-Footnote-5582905
-Ref: Time Functions-Footnote-6583132
-Node: Bitwise Functions583398
-Ref: table-bitwise-ops583992
-Ref: Bitwise Functions-Footnote-1590025
-Ref: Bitwise Functions-Footnote-2590198
-Node: Type Functions590389
-Node: I18N Functions593064
-Node: User-defined594715
-Node: Definition Syntax595520
-Ref: Definition Syntax-Footnote-1601207
-Node: Function Example601278
-Ref: Function Example-Footnote-1604200
-Node: Function Caveats604222
-Node: Calling A Function604740
-Node: Variable Scope605698
-Node: Pass By Value/Reference608692
-Node: Return Statement612191
-Node: Dynamic Typing615170
-Node: Indirect Calls616100
-Ref: Indirect Calls-Footnote-1626351
-Node: Functions Summary626479
-Node: Library Functions629184
-Ref: Library Functions-Footnote-1632791
-Ref: Library Functions-Footnote-2632934
-Node: Library Names633105
-Ref: Library Names-Footnote-1636565
-Ref: Library Names-Footnote-2636788
-Node: General Functions636874
-Node: Strtonum Function637977
-Node: Assert Function640999
-Node: Round Function644325
-Node: Cliff Random Function645866
-Node: Ordinal Functions646882
-Ref: Ordinal Functions-Footnote-1649945
-Ref: Ordinal Functions-Footnote-2650197
-Node: Join Function650407
-Ref: Join Function-Footnote-1652177
-Node: Getlocaltime Function652377
-Node: Readfile Function656119
-Node: Shell Quoting658091
-Node: Data File Management659492
-Node: Filetrans Function660124
-Node: Rewind Function664220
-Node: File Checking666126
-Ref: File Checking-Footnote-1667460
-Node: Empty Files667661
-Node: Ignoring Assigns669640
-Node: Getopt Function671190
-Ref: Getopt Function-Footnote-1682659
-Node: Passwd Functions682859
-Ref: Passwd Functions-Footnote-1691698
-Node: Group Functions691786
-Ref: Group Functions-Footnote-1699684
-Node: Walking Arrays699891
-Node: Library Functions Summary702899
-Node: Library Exercises704305
-Node: Sample Programs704770
-Node: Running Examples705533
-Node: Clones706261
-Node: Cut Program707485
-Node: Egrep Program717414
-Ref: Egrep Program-Footnote-1724926
-Node: Id Program725036
-Node: Split Program728716
-Ref: Split Program-Footnote-1732175
-Node: Tee Program732304
-Node: Uniq Program735094
-Node: Wc Program742520
-Ref: Wc Program-Footnote-1746775
-Node: Miscellaneous Programs746869
-Node: Dupword Program748082
-Node: Alarm Program750112
-Node: Translate Program754967
-Ref: Translate Program-Footnote-1759532
-Node: Labels Program759802
-Ref: Labels Program-Footnote-1763153
-Node: Word Sorting763237
-Node: History Sorting767309
-Node: Extract Program769144
-Node: Simple Sed776673
-Node: Igawk Program779747
-Ref: Igawk Program-Footnote-1794078
-Ref: Igawk Program-Footnote-2794280
-Ref: Igawk Program-Footnote-3794402
-Node: Anagram Program794517
-Node: Signature Program797579
-Node: Programs Summary798826
-Node: Programs Exercises800040
-Ref: Programs Exercises-Footnote-1804169
-Node: Namespaces804260
-Node: Global Namespace804481
-Node: Qualified Names805721
-Node: Default Namespace806402
-Node: Changing The Namespace807099
-Node: Namespace Example808203
-Node: Namespace Misc810262
-Node: Advanced Features811040
-Node: Nondecimal Data813025
-Node: Array Sorting814616
-Node: Controlling Array Traversal815316
-Ref: Controlling Array Traversal-Footnote-1823683
-Node: Array Sorting Functions823801
-Ref: Array Sorting Functions-Footnote-1828892
-Node: Two-way I/O829088
-Ref: Two-way I/O-Footnote-1835639
-Ref: Two-way I/O-Footnote-2835826
-Node: TCP/IP Networking835908
-Node: Profiling839026
-Ref: Profiling-Footnote-1847698
-Node: Advanced Features Summary848021
-Node: Internationalization849865
-Node: I18N and L10N851345
-Node: Explaining gettext852032
-Ref: Explaining gettext-Footnote-1857924
-Ref: Explaining gettext-Footnote-2858109
-Node: Programmer i18n858274
-Ref: Programmer i18n-Footnote-1863223
-Node: Translator i18n863272
-Node: String Extraction864066
-Ref: String Extraction-Footnote-1865198
-Node: Printf Ordering865284
-Ref: Printf Ordering-Footnote-1868070
-Node: I18N Portability868134
-Ref: I18N Portability-Footnote-1870590
-Node: I18N Example870653
-Ref: I18N Example-Footnote-1873459
-Node: Gawk I18N873532
-Node: I18N Summary874177
-Node: Debugger875518
-Node: Debugging876540
-Node: Debugging Concepts876981
-Node: Debugging Terms878790
-Node: Awk Debugging881365
-Node: Sample Debugging Session882271
-Node: Debugger Invocation882805
-Node: Finding The Bug884191
-Node: List of Debugger Commands890669
-Node: Breakpoint Control892002
-Node: Debugger Execution Control895696
-Node: Viewing And Changing Data899058
-Node: Execution Stack902432
-Node: Debugger Info904069
-Node: Miscellaneous Debugger Commands908140
-Node: Readline Support913228
-Node: Limitations914124
-Node: Debugging Summary916233
-Node: Arbitrary Precision Arithmetic917512
-Node: Computer Arithmetic918997
-Ref: table-numeric-ranges922588
-Ref: Computer Arithmetic-Footnote-1923310
-Node: Math Definitions923367
-Ref: table-ieee-formats926681
-Ref: Math Definitions-Footnote-1927284
-Node: MPFR features927389
-Node: FP Math Caution929106
-Ref: FP Math Caution-Footnote-1930178
-Node: Inexactness of computations930547
-Node: Inexact representation931507
-Node: Comparing FP Values932867
-Node: Errors accumulate933949
-Node: Getting Accuracy935382
-Node: Try To Round938092
-Node: Setting precision938991
-Ref: table-predefined-precision-strings939688
-Node: Setting the rounding mode941518
-Ref: table-gawk-rounding-modes941892
-Ref: Setting the rounding mode-Footnote-1945300
-Node: Arbitrary Precision Integers945479
-Ref: Arbitrary Precision Integers-Footnote-1950384
-Node: Checking for MPFR950533
-Node: POSIX Floating Point Problems951830
-Ref: POSIX Floating Point Problems-Footnote-1955701
-Node: Floating point summary955739
-Node: Dynamic Extensions957929
-Node: Extension Intro959482
-Node: Plugin License960748
-Node: Extension Mechanism Outline961545
-Ref: figure-load-extension961984
-Ref: figure-register-new-function963549
-Ref: figure-call-new-function964641
-Node: Extension API Description966703
-Node: Extension API Functions Introduction968345
-Node: General Data Types973679
-Ref: General Data Types-Footnote-1980884
-Node: Memory Allocation Functions981183
-Ref: Memory Allocation Functions-Footnote-1984028
-Node: Constructor Functions984127
-Node: Registration Functions987126
-Node: Extension Functions987811
-Node: Exit Callback Functions993024
-Node: Extension Version String994274
-Node: Input Parsers994937
-Node: Output Wrappers1007644
-Node: Two-way processors1012156
-Node: Printing Messages1014421
-Ref: Printing Messages-Footnote-11015592
-Node: Updating ERRNO1015745
-Node: Requesting Values1016484
-Ref: table-value-types-returned1017221
-Node: Accessing Parameters1018157
-Node: Symbol Table Access1019392
-Node: Symbol table by name1019904
-Node: Symbol table by cookie1021693
-Ref: Symbol table by cookie-Footnote-11025878
-Node: Cached values1025942
-Ref: Cached values-Footnote-11029478
-Node: Array Manipulation1029569
-Ref: Array Manipulation-Footnote-11030660
-Node: Array Data Types1030697
-Ref: Array Data Types-Footnote-11033355
-Node: Array Functions1033447
-Node: Flattening Arrays1037846
-Node: Creating Arrays1044787
-Node: Redirection API1049556
-Node: Extension API Variables1052398
-Node: Extension Versioning1053031
-Ref: gawk-api-version1053468
-Node: Extension API Informational Variables1055196
-Node: Extension API Boilerplate1056260
-Node: Changes from API V11060122
-Node: Finding Extensions1060782
-Node: Extension Example1061341
-Node: Internal File Description1062139
-Node: Internal File Ops1066219
-Ref: Internal File Ops-Footnote-11077619
-Node: Using Internal File Ops1077759
-Ref: Using Internal File Ops-Footnote-11080142
-Node: Extension Samples1080416
-Node: Extension Sample File Functions1081945
-Node: Extension Sample Fnmatch1089594
-Node: Extension Sample Fork1091081
-Node: Extension Sample Inplace1092299
-Node: Extension Sample Ord1095509
-Node: Extension Sample Readdir1096345
-Ref: table-readdir-file-types1097234
-Node: Extension Sample Revout1098039
-Node: Extension Sample Rev2way1098628
-Node: Extension Sample Read write array1099368
-Node: Extension Sample Readfile1101310
-Node: Extension Sample Time1102405
-Node: Extension Sample API Tests1103753
-Node: gawkextlib1104245
-Node: Extension summary1106692
-Node: Extension Exercises1110394
-Node: Language History1111892
-Node: V7/SVR3.11113548
-Node: SVR41115700
-Node: POSIX1117134
-Node: BTL1118513
-Node: POSIX/GNU1119242
-Node: Feature History1125134
-Node: Common Extensions1139558
-Node: Ranges and Locales1140841
-Ref: Ranges and Locales-Footnote-11145457
-Ref: Ranges and Locales-Footnote-21145484
-Ref: Ranges and Locales-Footnote-31145719
-Node: Contributors1145940
-Node: History summary1151500
-Node: Installation1152880
-Node: Gawk Distribution1153824
-Node: Getting1154308
-Node: Extracting1155269
-Node: Distribution contents1156907
-Node: Unix Installation1163249
-Node: Quick Installation1163931
-Node: Shell Startup Files1166345
-Node: Additional Configuration Options1167434
-Node: Configuration Philosophy1169423
-Node: Non-Unix Installation1171792
-Node: PC Installation1172252
-Node: PC Binary Installation1173090
-Node: PC Compiling1173525
-Node: PC Using1174642
-Node: Cygwin1177687
-Node: MSYS1178457
-Node: VMS Installation1178958
-Node: VMS Compilation1179749
-Ref: VMS Compilation-Footnote-11180978
-Node: VMS Dynamic Extensions1181036
-Node: VMS Installation Details1182721
-Node: VMS Running1184974
-Node: VMS GNV1189253
-Node: VMS Old Gawk1189988
-Node: Bugs1190459
-Node: Bug address1191122
-Node: Usenet1193519
-Node: Maintainers1194296
-Node: Other Versions1195672
-Node: Installation summary1202256
-Node: Notes1203291
-Node: Compatibility Mode1204156
-Node: Additions1204938
-Node: Accessing The Source1205863
-Node: Adding Code1207298
-Node: New Ports1213516
-Node: Derived Files1218004
-Ref: Derived Files-Footnote-11223489
-Ref: Derived Files-Footnote-21223524
-Ref: Derived Files-Footnote-31224122
-Node: Future Extensions1224236
-Node: Implementation Limitations1224894
-Node: Extension Design1226077
-Node: Old Extension Problems1227231
-Ref: Old Extension Problems-Footnote-11228749
-Node: Extension New Mechanism Goals1228806
-Ref: Extension New Mechanism Goals-Footnote-11232170
-Node: Extension Other Design Decisions1232359
-Node: Extension Future Growth1234472
-Node: Old Extension Mechanism1235308
-Node: Notes summary1237071
-Node: Basic Concepts1238253
-Node: Basic High Level1238934
-Ref: figure-general-flow1239216
-Ref: figure-process-flow1239901
-Ref: Basic High Level-Footnote-11243202
-Node: Basic Data Typing1243387
-Node: Glossary1246715
-Node: Copying1278662
-Node: GNU Free Documentation License1316201
-Node: Index1341319
+Node: Foreword343786
+Node: Foreword448228
+Node: Preface49760
+Ref: Preface-Footnote-152619
+Ref: Preface-Footnote-252726
+Ref: Preface-Footnote-352960
+Node: History53102
+Node: Names55454
+Ref: Names-Footnote-156548
+Node: This Manual56695
+Ref: This Manual-Footnote-163180
+Node: Conventions63280
+Node: Manual History65634
+Ref: Manual History-Footnote-168629
+Ref: Manual History-Footnote-268670
+Node: How To Contribute68744
+Node: Acknowledgments69395
+Node: Getting Started74281
+Node: Running gawk76720
+Node: One-shot77910
+Node: Read Terminal79173
+Node: Long81166
+Node: Executable Scripts82679
+Ref: Executable Scripts-Footnote-185474
+Node: Comments85577
+Node: Quoting88061
+Node: DOS Quoting93578
+Node: Sample Data Files95633
+Node: Very Simple98228
+Node: Two Rules103130
+Node: More Complex105015
+Node: Statements/Lines107881
+Ref: Statements/Lines-Footnote-1112340
+Node: Other Features112605
+Node: When113541
+Ref: When-Footnote-1115295
+Node: Intro Summary115360
+Node: Invoking Gawk116244
+Node: Command Line117758
+Node: Options118556
+Ref: Options-Footnote-1135199
+Ref: Options-Footnote-2135429
+Node: Other Arguments135454
+Node: Naming Standard Input138401
+Node: Environment Variables139494
+Node: AWKPATH Variable140052
+Ref: AWKPATH Variable-Footnote-1143463
+Ref: AWKPATH Variable-Footnote-2143497
+Node: AWKLIBPATH Variable143758
+Node: Other Environment Variables145015
+Node: Exit Status148836
+Node: Include Files149513
+Node: Loading Shared Libraries153108
+Node: Obsolete154536
+Node: Undocumented155228
+Node: Invoking Summary155525
+Node: Regexp157185
+Node: Regexp Usage158639
+Node: Escape Sequences160676
+Node: Regexp Operators166908
+Ref: Regexp Operators-Footnote-1174324
+Ref: Regexp Operators-Footnote-2174471
+Node: Bracket Expressions174569
+Ref: table-char-classes177045
+Node: Leftmost Longest180182
+Node: Computed Regexps181485
+Node: GNU Regexp Operators184912
+Node: Case-sensitivity188591
+Ref: Case-sensitivity-Footnote-1191478
+Ref: Case-sensitivity-Footnote-2191713
+Node: Regexp Summary191821
+Node: Reading Files193287
+Node: Records195556
+Node: awk split records196289
+Node: gawk split records201220
+Ref: gawk split records-Footnote-1205760
+Node: Fields205797
+Node: Nonconstant Fields208538
+Ref: Nonconstant Fields-Footnote-1210774
+Node: Changing Fields210978
+Node: Field Separators216906
+Node: Default Field Splitting219604
+Node: Regexp Field Splitting220722
+Node: Single Character Fields224075
+Node: Command Line Field Separator225135
+Node: Full Line Fields228353
+Ref: Full Line Fields-Footnote-1229875
+Ref: Full Line Fields-Footnote-2229921
+Node: Field Splitting Summary230022
+Node: Constant Size232096
+Node: Fixed width data232828
+Node: Skipping intervening236295
+Node: Allowing trailing data237093
+Node: Fields with fixed data238130
+Node: Splitting By Content239648
+Ref: Splitting By Content-Footnote-1243298
+Node: Testing field creation243461
+Node: Multiple Line245082
+Ref: Multiple Line-Footnote-1250966
+Node: Getline251145
+Node: Plain Getline253614
+Node: Getline/Variable256255
+Node: Getline/File257406
+Node: Getline/Variable/File258794
+Ref: Getline/Variable/File-Footnote-1260399
+Node: Getline/Pipe260487
+Node: Getline/Variable/Pipe263194
+Node: Getline/Coprocess264329
+Node: Getline/Variable/Coprocess265596
+Node: Getline Notes266338
+Node: Getline Summary269135
+Ref: table-getline-variants269559
+Node: Read Timeout270307
+Ref: Read Timeout-Footnote-1274213
+Node: Retrying Input274271
+Node: Command-line directories275470
+Node: Input Summary276376
+Node: Input Exercises279548
+Node: Printing280276
+Node: Print282110
+Node: Print Examples283567
+Node: Output Separators286347
+Node: OFMT288364
+Node: Printf289720
+Node: Basic Printf290505
+Node: Control Letters292079
+Node: Format Modifiers296067
+Node: Printf Examples302082
+Node: Redirection304568
+Node: Special FD311409
+Ref: Special FD-Footnote-1314577
+Node: Special Files314651
+Node: Other Inherited Files315268
+Node: Special Network316269
+Node: Special Caveats317129
+Node: Close Files And Pipes318078
+Ref: table-close-pipe-return-values324985
+Ref: Close Files And Pipes-Footnote-1325768
+Ref: Close Files And Pipes-Footnote-2325916
+Node: Nonfatal326068
+Node: Output Summary328393
+Node: Output Exercises329615
+Node: Expressions330294
+Node: Values331482
+Node: Constants332160
+Node: Scalar Constants332851
+Ref: Scalar Constants-Footnote-1333715
+Node: Nondecimal-numbers333965
+Node: Regexp Constants336966
+Node: Using Constant Regexps337492
+Node: Standard Regexp Constants338114
+Node: Strong Regexp Constants341302
+Node: Variables344260
+Node: Using Variables344917
+Node: Assignment Options346827
+Node: Conversion348700
+Node: Strings And Numbers349224
+Ref: Strings And Numbers-Footnote-1352287
+Node: Locale influences conversions352396
+Ref: table-locale-affects355154
+Node: All Operators355772
+Node: Arithmetic Ops356401
+Node: Concatenation358907
+Ref: Concatenation-Footnote-1361754
+Node: Assignment Ops361861
+Ref: table-assign-ops366852
+Node: Increment Ops368165
+Node: Truth Values and Conditions371625
+Node: Truth Values372699
+Node: Typing and Comparison373747
+Node: Variable Typing374567
+Ref: Variable Typing-Footnote-1381030
+Ref: Variable Typing-Footnote-2381102
+Node: Comparison Operators381179
+Ref: table-relational-ops381598
+Node: POSIX String Comparison385093
+Ref: POSIX String Comparison-Footnote-1386788
+Ref: POSIX String Comparison-Footnote-2386927
+Node: Boolean Ops387011
+Ref: Boolean Ops-Footnote-1391493
+Node: Conditional Exp391585
+Node: Function Calls393321
+Node: Precedence397198
+Node: Locales400857
+Node: Expressions Summary402489
+Node: Patterns and Actions405062
+Node: Pattern Overview406182
+Node: Regexp Patterns407859
+Node: Expression Patterns408401
+Node: Ranges412182
+Node: BEGIN/END415290
+Node: Using BEGIN/END416051
+Ref: Using BEGIN/END-Footnote-1418787
+Node: I/O And BEGIN/END418893
+Node: BEGINFILE/ENDFILE421207
+Node: Empty424114
+Node: Using Shell Variables424431
+Node: Action Overview426705
+Node: Statements429030
+Node: If Statement430878
+Node: While Statement432373
+Node: Do Statement434401
+Node: For Statement435549
+Node: Switch Statement438707
+Node: Break Statement441093
+Node: Continue Statement443185
+Node: Next Statement445012
+Node: Nextfile Statement447395
+Node: Exit Statement450047
+Node: Built-in Variables452450
+Node: User-modified453583
+Node: Auto-set461350
+Ref: Auto-set-Footnote-1476947
+Ref: Auto-set-Footnote-2477153
+Node: ARGC and ARGV477209
+Node: Pattern Action Summary481422
+Node: Arrays483852
+Node: Array Basics485181
+Node: Array Intro486025
+Ref: figure-array-elements488000
+Ref: Array Intro-Footnote-1490704
+Node: Reference to Elements490832
+Node: Assigning Elements493296
+Node: Array Example493787
+Node: Scanning an Array495546
+Node: Controlling Scanning498568
+Ref: Controlling Scanning-Footnote-1503967
+Node: Numeric Array Subscripts504283
+Node: Uninitialized Subscripts506467
+Node: Delete508086
+Ref: Delete-Footnote-1510838
+Node: Multidimensional510895
+Node: Multiscanning513990
+Node: Arrays of Arrays515581
+Node: Arrays Summary520348
+Node: Functions522441
+Node: Built-in523479
+Node: Calling Built-in524560
+Node: Numeric Functions526556
+Ref: Numeric Functions-Footnote-1531501
+Ref: Numeric Functions-Footnote-2531858
+Ref: Numeric Functions-Footnote-3531906
+Node: String Functions532178
+Ref: String Functions-Footnote-1555836
+Ref: String Functions-Footnote-2555964
+Ref: String Functions-Footnote-3556212
+Node: Gory Details556299
+Ref: table-sub-escapes558090
+Ref: table-sub-proposed559609
+Ref: table-posix-sub560972
+Ref: table-gensub-escapes562513
+Ref: Gory Details-Footnote-1563336
+Node: I/O Functions563490
+Ref: table-system-return-values570072
+Ref: I/O Functions-Footnote-1572052
+Ref: I/O Functions-Footnote-2572200
+Node: Time Functions572320
+Ref: Time Functions-Footnote-1582987
+Ref: Time Functions-Footnote-2583055
+Ref: Time Functions-Footnote-3583213
+Ref: Time Functions-Footnote-4583324
+Ref: Time Functions-Footnote-5583436
+Ref: Time Functions-Footnote-6583663
+Node: Bitwise Functions583929
+Ref: table-bitwise-ops584523
+Ref: Bitwise Functions-Footnote-1590556
+Ref: Bitwise Functions-Footnote-2590729
+Node: Type Functions590920
+Node: I18N Functions593595
+Node: User-defined595246
+Node: Definition Syntax596051
+Ref: Definition Syntax-Footnote-1601738
+Node: Function Example601809
+Ref: Function Example-Footnote-1604731
+Node: Function Caveats604753
+Node: Calling A Function605271
+Node: Variable Scope606229
+Node: Pass By Value/Reference609223
+Node: Return Statement612722
+Node: Dynamic Typing615701
+Node: Indirect Calls616631
+Ref: Indirect Calls-Footnote-1626882
+Node: Functions Summary627010
+Node: Library Functions629715
+Ref: Library Functions-Footnote-1633322
+Ref: Library Functions-Footnote-2633465
+Node: Library Names633636
+Ref: Library Names-Footnote-1637096
+Ref: Library Names-Footnote-2637319
+Node: General Functions637405
+Node: Strtonum Function638508
+Node: Assert Function641530
+Node: Round Function644856
+Node: Cliff Random Function646397
+Node: Ordinal Functions647413
+Ref: Ordinal Functions-Footnote-1650476
+Ref: Ordinal Functions-Footnote-2650728
+Node: Join Function650938
+Ref: Join Function-Footnote-1652708
+Node: Getlocaltime Function652908
+Node: Readfile Function656650
+Node: Shell Quoting658622
+Node: Data File Management660023
+Node: Filetrans Function660655
+Node: Rewind Function664751
+Node: File Checking666657
+Ref: File Checking-Footnote-1667991
+Node: Empty Files668192
+Node: Ignoring Assigns670171
+Node: Getopt Function671721
+Ref: Getopt Function-Footnote-1683190
+Node: Passwd Functions683390
+Ref: Passwd Functions-Footnote-1692229
+Node: Group Functions692317
+Ref: Group Functions-Footnote-1700215
+Node: Walking Arrays700422
+Node: Library Functions Summary703430
+Node: Library Exercises704836
+Node: Sample Programs705301
+Node: Running Examples706064
+Node: Clones706792
+Node: Cut Program708016
+Node: Egrep Program717945
+Ref: Egrep Program-Footnote-1725457
+Node: Id Program725567
+Node: Split Program729247
+Ref: Split Program-Footnote-1732706
+Node: Tee Program732835
+Node: Uniq Program735625
+Node: Wc Program743051
+Ref: Wc Program-Footnote-1747306
+Node: Miscellaneous Programs747400
+Node: Dupword Program748613
+Node: Alarm Program750643
+Node: Translate Program755498
+Ref: Translate Program-Footnote-1760063
+Node: Labels Program760333
+Ref: Labels Program-Footnote-1763684
+Node: Word Sorting763768
+Node: History Sorting767840
+Node: Extract Program769675
+Node: Simple Sed777204
+Node: Igawk Program780278
+Ref: Igawk Program-Footnote-1794609
+Ref: Igawk Program-Footnote-2794811
+Ref: Igawk Program-Footnote-3794933
+Node: Anagram Program795048
+Node: Signature Program798110
+Node: Programs Summary799357
+Node: Programs Exercises800571
+Ref: Programs Exercises-Footnote-1804700
+Node: Namespaces804791
+Node: Global Namespace805406
+Node: Qualified Names806646
+Node: Default Namespace807327
+Node: Changing The Namespace808105
+Node: Namespace Example809194
+Node: Namespace Misc811265
+Node: Advanced Features813179
+Node: Nondecimal Data815164
+Node: Array Sorting816755
+Node: Controlling Array Traversal817455
+Ref: Controlling Array Traversal-Footnote-1825822
+Node: Array Sorting Functions825940
+Ref: Array Sorting Functions-Footnote-1831031
+Node: Two-way I/O831227
+Ref: Two-way I/O-Footnote-1837778
+Ref: Two-way I/O-Footnote-2837965
+Node: TCP/IP Networking838047
+Node: Profiling841165
+Ref: Profiling-Footnote-1849837
+Node: Advanced Features Summary850160
+Node: Internationalization852004
+Node: I18N and L10N853484
+Node: Explaining gettext854171
+Ref: Explaining gettext-Footnote-1860063
+Ref: Explaining gettext-Footnote-2860248
+Node: Programmer i18n860413
+Ref: Programmer i18n-Footnote-1865362
+Node: Translator i18n865411
+Node: String Extraction866205
+Ref: String Extraction-Footnote-1867337
+Node: Printf Ordering867423
+Ref: Printf Ordering-Footnote-1870209
+Node: I18N Portability870273
+Ref: I18N Portability-Footnote-1872729
+Node: I18N Example872792
+Ref: I18N Example-Footnote-1875598
+Node: Gawk I18N875671
+Node: I18N Summary876316
+Node: Debugger877657
+Node: Debugging878679
+Node: Debugging Concepts879120
+Node: Debugging Terms880929
+Node: Awk Debugging883504
+Node: Sample Debugging Session884410
+Node: Debugger Invocation884944
+Node: Finding The Bug886330
+Node: List of Debugger Commands892808
+Node: Breakpoint Control894141
+Node: Debugger Execution Control897835
+Node: Viewing And Changing Data901197
+Node: Execution Stack904571
+Node: Debugger Info906208
+Node: Miscellaneous Debugger Commands910279
+Node: Readline Support915367
+Node: Limitations916263
+Node: Debugging Summary918372
+Node: Arbitrary Precision Arithmetic919651
+Node: Computer Arithmetic921136
+Ref: table-numeric-ranges924727
+Ref: Computer Arithmetic-Footnote-1925449
+Node: Math Definitions925506
+Ref: table-ieee-formats928820
+Ref: Math Definitions-Footnote-1929423
+Node: MPFR features929528
+Node: FP Math Caution931245
+Ref: FP Math Caution-Footnote-1932317
+Node: Inexactness of computations932686
+Node: Inexact representation933646
+Node: Comparing FP Values935006
+Node: Errors accumulate936088
+Node: Getting Accuracy937521
+Node: Try To Round940231
+Node: Setting precision941130
+Ref: table-predefined-precision-strings941827
+Node: Setting the rounding mode943657
+Ref: table-gawk-rounding-modes944031
+Ref: Setting the rounding mode-Footnote-1947439
+Node: Arbitrary Precision Integers947618
+Ref: Arbitrary Precision Integers-Footnote-1952523
+Node: Checking for MPFR952672
+Node: POSIX Floating Point Problems953969
+Ref: POSIX Floating Point Problems-Footnote-1957840
+Node: Floating point summary957878
+Node: Dynamic Extensions960068
+Node: Extension Intro961621
+Node: Plugin License962887
+Node: Extension Mechanism Outline963684
+Ref: figure-load-extension964123
+Ref: figure-register-new-function965688
+Ref: figure-call-new-function966780
+Node: Extension API Description968842
+Node: Extension API Functions Introduction970484
+Node: General Data Types975818
+Ref: General Data Types-Footnote-1983023
+Node: Memory Allocation Functions983322
+Ref: Memory Allocation Functions-Footnote-1986167
+Node: Constructor Functions986266
+Node: Registration Functions989265
+Node: Extension Functions989950
+Node: Exit Callback Functions995163
+Node: Extension Version String996413
+Node: Input Parsers997076
+Node: Output Wrappers1009783
+Node: Two-way processors1014295
+Node: Printing Messages1016560
+Ref: Printing Messages-Footnote-11017731
+Node: Updating ERRNO1017884
+Node: Requesting Values1018623
+Ref: table-value-types-returned1019360
+Node: Accessing Parameters1020296
+Node: Symbol Table Access1021531
+Node: Symbol table by name1022043
+Node: Symbol table by cookie1023832
+Ref: Symbol table by cookie-Footnote-11028017
+Node: Cached values1028081
+Ref: Cached values-Footnote-11031617
+Node: Array Manipulation1031708
+Ref: Array Manipulation-Footnote-11032799
+Node: Array Data Types1032836
+Ref: Array Data Types-Footnote-11035494
+Node: Array Functions1035586
+Node: Flattening Arrays1039985
+Node: Creating Arrays1046926
+Node: Redirection API1051695
+Node: Extension API Variables1054537
+Node: Extension Versioning1055170
+Ref: gawk-api-version1055607
+Node: Extension API Informational Variables1057335
+Node: Extension API Boilerplate1058399
+Node: Changes from API V11062261
+Node: Finding Extensions1062921
+Node: Extension Example1063480
+Node: Internal File Description1064278
+Node: Internal File Ops1068358
+Ref: Internal File Ops-Footnote-11079758
+Node: Using Internal File Ops1079898
+Ref: Using Internal File Ops-Footnote-11082281
+Node: Extension Samples1082555
+Node: Extension Sample File Functions1084084
+Node: Extension Sample Fnmatch1091733
+Node: Extension Sample Fork1093220
+Node: Extension Sample Inplace1094438
+Node: Extension Sample Ord1097648
+Node: Extension Sample Readdir1098484
+Ref: table-readdir-file-types1099373
+Node: Extension Sample Revout1100178
+Node: Extension Sample Rev2way1100767
+Node: Extension Sample Read write array1101507
+Node: Extension Sample Readfile1103449
+Node: Extension Sample Time1104544
+Node: Extension Sample API Tests1105892
+Node: gawkextlib1106384
+Node: Extension summary1108831
+Node: Extension Exercises1112533
+Node: Language History1114031
+Node: V7/SVR3.11115687
+Node: SVR41117839
+Node: POSIX1119273
+Node: BTL1120652
+Node: POSIX/GNU1121381
+Node: Feature History1127273
+Node: Common Extensions1141697
+Node: Ranges and Locales1142980
+Ref: Ranges and Locales-Footnote-11147596
+Ref: Ranges and Locales-Footnote-21147623
+Ref: Ranges and Locales-Footnote-31147858
+Node: Contributors1148079
+Node: History summary1153639
+Node: Installation1155019
+Node: Gawk Distribution1155963
+Node: Getting1156447
+Node: Extracting1157408
+Node: Distribution contents1159046
+Node: Unix Installation1165388
+Node: Quick Installation1166070
+Node: Shell Startup Files1168484
+Node: Additional Configuration Options1169573
+Node: Configuration Philosophy1171562
+Node: Non-Unix Installation1173931
+Node: PC Installation1174391
+Node: PC Binary Installation1175229
+Node: PC Compiling1175664
+Node: PC Using1176781
+Node: Cygwin1179826
+Node: MSYS1180596
+Node: VMS Installation1181097
+Node: VMS Compilation1181888
+Ref: VMS Compilation-Footnote-11183117
+Node: VMS Dynamic Extensions1183175
+Node: VMS Installation Details1184860
+Node: VMS Running1187113
+Node: VMS GNV1191392
+Node: VMS Old Gawk1192127
+Node: Bugs1192598
+Node: Bug address1193261
+Node: Usenet1195658
+Node: Maintainers1196435
+Node: Other Versions1197811
+Node: Installation summary1204395
+Node: Notes1205430
+Node: Compatibility Mode1206295
+Node: Additions1207077
+Node: Accessing The Source1208002
+Node: Adding Code1209437
+Node: New Ports1215655
+Node: Derived Files1220143
+Ref: Derived Files-Footnote-11225628
+Ref: Derived Files-Footnote-21225663
+Ref: Derived Files-Footnote-31226261
+Node: Future Extensions1226375
+Node: Implementation Limitations1227033
+Node: Extension Design1228216
+Node: Old Extension Problems1229370
+Ref: Old Extension Problems-Footnote-11230888
+Node: Extension New Mechanism Goals1230945
+Ref: Extension New Mechanism Goals-Footnote-11234309
+Node: Extension Other Design Decisions1234498
+Node: Extension Future Growth1236611
+Node: Old Extension Mechanism1237447
+Node: Notes summary1239210
+Node: Basic Concepts1240392
+Node: Basic High Level1241073
+Ref: figure-general-flow1241355
+Ref: figure-process-flow1242040
+Ref: Basic High Level-Footnote-11245341
+Node: Basic Data Typing1245526
+Node: Glossary1248854
+Node: Copying1280801
+Node: GNU Free Documentation License1318340
+Node: Index1343458
End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 17890ad..17bf2b6 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -454,6 +454,7 @@ particular records in a file and perform operations upon
them.
* Library Functions:: A Library of @command{awk} Functions.
* Sample Programs:: Many @command{awk} programs with complete
explanations.
+* Namespaces:: How namespaces work in @command{gawk}.
* Advanced Features:: Stuff for advanced users, specific to
@command{gawk}.
* Internationalization:: Getting @command{gawk} to speak your
@@ -851,6 +852,12 @@ particular records in a file and perform operations upon
them.
time on their hands.
* Programs Summary:: Summary of programs.
* Programs Exercises:: Exercises.
+* Global Namespace:: The global namespace in standard
@command{awk}.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
* Nondecimal Data:: Allowing nondecimal input data.
* Array Sorting:: Facilities for controlling array
traversal and sorting arrays.
@@ -3973,8 +3980,9 @@ a newline character (even if it doesn't). This makes
building
the total program easier.
@quotation CAUTION
-At the moment, there is no requirement that each @var{program-text}
-be a full syntactic unit. I.e., the following currently works:
+Prior to @value{PVERSION} @strong{FIXME} 5.0, there was
+no requirement that each @var{program-text}
+be a full syntactic unit. I.e., the following worked:
@example
$ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
@@ -3982,8 +3990,8 @@ $ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
@end example
@noindent
-However, this could change in the future, so it's not a
-good idea to rely upon this feature.
+However, this is no longer true. If you have any scripts that
+rely upon this feature, you should revise them.
@end quotation
@item @option{-E} @var{file}
@@ -27605,6 +27613,12 @@ It contains the following chapters:
This @value{CHAPTER} describes a feature that is specific to @command{gawk}.
@menu
+* Global Namespace:: The global namespace in standard @command{awk}.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
@end menu
@node Global Namespace
@@ -27629,7 +27643,7 @@ still a single namespace for the namespaces, but the
hope is that there
are much fewer namespaces in use by any given program, and thus much
less chance for collisions.)
-Starting with version @strong{FIXME} 5.0, @command{gawk} provides a
+Starting with @value{PVERSION} @strong{FIXME} 5.0, @command{gawk} provides a
mechanism to put functions and global variables into different
namespaces.
@@ -27661,6 +27675,8 @@ forces unqualified identifiers whose names are all
uppercase letters
to be in the @samp{awk} namespace. This makes it possible for you to easily
reference @command{gawk}'s global variables from different namespaces.
+It is a syntactic error to use qualified names for function parameter names.
+
@node Changing The Namespace
@section Changing The Namespace
@@ -27670,7 +27686,7 @@ at the top level of your program:
@example
@@namespace "passwd"
-BEGIN @{ @dot{} @}
+BEGIN @{ @dots{} @}
@dots{}
@end example
@@ -27689,14 +27705,13 @@ the distinction.
@end quotation
Each source file for @option{-i} and @option{-f} starts out with an implicit
address@hidden@namespace "awk"}.
address@hidden@@namespace "awk"}.
Similarly, each chunk of command-line code with @option{-e} has such an
implicit
statement.
-FIXME: The semantics of @option{-e} change to require it to be syntactic unit.
-
-FIXME: Update doc earlier in this book and change the corresponding code.
+The use of @samp{@@namespace} has no influence upon the order of execution
+of @code{BEGIN}, @code{BEGINFILE}, @code{END}, and @code{ENDFILE} rules.
@node Namespace Example
@section Namespace Example
@@ -27734,11 +27749,11 @@ function Init( oldfs, oldrs, olddol0, pwcat,
using_fw, using_fpat)
RS = "\n"
pwcat = _pw_awklib "pwcat"
- while ((pwcat | getline) > 0) {
+ while ((pwcat | getline) > 0) @{
Byname[$1] = $0
Byuid[$3] = $0
Bycount[++_pw_total] = $0
- }
+ @}
close(pwcat)
Count = 0
Inited = 1
@@ -27806,7 +27821,10 @@ function endpwent()
Other notes for reviewers:
address@hidden
address@hidden @asis
address@hidden @code{SYMTAB}, @code{FUNCTAB} and @code{PROCINFO["identifiers"]}
+The subscripts are all fully qualified names.
+
@item Profiler:
When profiling, we can add an @code{Op_Namespace} to the start of
each rule. If it has changed since the previous one, output an
@@ -27816,10 +27834,44 @@ For all @samp{awk.XXX} if @samp{XXX} is all
uppercase, strip
off the @samp{awk} part.
@item Debugger:
-Simply prints fully qualified names all the time. Maybe allow a
+Simply print fully qualified names all the time. Maybe allow a
@samp{namespace @var{xxx}} command in the debugger to set the
namespace and it will use that to create fully qualified names?
Have to be careful about all uppercase names though.
+
address@hidden How does this affect indirect calls?
+The current namespace is a parse time thing, not a dynamic
+thing, so for indirect calls to work, use something like:
+
address@hidden
+@@namespace "foo"
+
+function bar() @{ @dots{} @}
+
address@hidden
+ @dots{}
+ x = "foo.bar"
+ @dots{}
+ @@x()
address@hidden
address@hidden example
+
address@hidden
+This is particularly true if @code{x} is passed as a ``function pointer''
+to another function in another namespace for that function to call
+through it.
+
address@hidden How does this affect @code{@@include}?
+Basically @code{@@include} should push and pop the namespace. Each
@code{@@include}
+saves the current namespace and starts over with namespace @samp{awk} until
+an @code{@@namespace} is seen.
+
address@hidden Extension functions
+Revise the current macros to pass @code{"awk"} as the namespace
+argument and add new macros with @samp{_ns} or some such in the name that
+pass the namespace of the extension. This preserves backwards
+compatibility at the source level while providing access to namespaces
+as needed.
@end table
@node Advanced Features
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 814362a..ef88264 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -449,6 +449,7 @@ particular records in a file and perform operations upon
them.
* Library Functions:: A Library of @command{awk} Functions.
* Sample Programs:: Many @command{awk} programs with complete
explanations.
+* Namespaces:: How namespaces work in @command{gawk}.
* Advanced Features:: Stuff for advanced users, specific to
@command{gawk}.
* Internationalization:: Getting @command{gawk} to speak your
@@ -846,6 +847,12 @@ particular records in a file and perform operations upon
them.
time on their hands.
* Programs Summary:: Summary of programs.
* Programs Exercises:: Exercises.
+* Global Namespace:: The global namespace in standard
@command{awk}.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
* Nondecimal Data:: Allowing nondecimal input data.
* Array Sorting:: Facilities for controlling array
traversal and sorting arrays.
@@ -3884,8 +3891,9 @@ a newline character (even if it doesn't). This makes
building
the total program easier.
@quotation CAUTION
-At the moment, there is no requirement that each @var{program-text}
-be a full syntactic unit. I.e., the following currently works:
+Prior to @value{PVERSION} @strong{FIXME} 5.0, there was
+no requirement that each @var{program-text}
+be a full syntactic unit. I.e., the following worked:
@example
$ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
@@ -3893,8 +3901,8 @@ $ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
@end example
@noindent
-However, this could change in the future, so it's not a
-good idea to rely upon this feature.
+However, this is no longer true. If you have any scripts that
+rely upon this feature, you should revise them.
@end quotation
@item @option{-E} @var{file}
@@ -26619,6 +26627,12 @@ It contains the following chapters:
This @value{CHAPTER} describes a feature that is specific to @command{gawk}.
@menu
+* Global Namespace:: The global namespace in standard @command{awk}.
+* Qualified Names:: How to qualify names with a namespace.
+* Default Namespace:: The default namespace.
+* Changing The Namespace:: How to change the namespace.
+* Namespace Example:: An example of code using a namespace.
+* Namespace Misc:: Namespace notes for developers.
@end menu
@node Global Namespace
@@ -26643,7 +26657,7 @@ still a single namespace for the namespaces, but the
hope is that there
are much fewer namespaces in use by any given program, and thus much
less chance for collisions.)
-Starting with version @strong{FIXME} 5.0, @command{gawk} provides a
+Starting with @value{PVERSION} @strong{FIXME} 5.0, @command{gawk} provides a
mechanism to put functions and global variables into different
namespaces.
@@ -26675,6 +26689,8 @@ forces unqualified identifiers whose names are all
uppercase letters
to be in the @samp{awk} namespace. This makes it possible for you to easily
reference @command{gawk}'s global variables from different namespaces.
+It is a syntactic error to use qualified names for function parameter names.
+
@node Changing The Namespace
@section Changing The Namespace
@@ -26684,7 +26700,7 @@ at the top level of your program:
@example
@@namespace "passwd"
-BEGIN @{ @dot{} @}
+BEGIN @{ @dots{} @}
@dots{}
@end example
@@ -26703,14 +26719,13 @@ the distinction.
@end quotation
Each source file for @option{-i} and @option{-f} starts out with an implicit
address@hidden@namespace "awk"}.
address@hidden@@namespace "awk"}.
Similarly, each chunk of command-line code with @option{-e} has such an
implicit
statement.
-FIXME: The semantics of @option{-e} change to require it to be syntactic unit.
-
-FIXME: Update doc earlier in this book and change the corresponding code.
+The use of @samp{@@namespace} has no influence upon the order of execution
+of @code{BEGIN}, @code{BEGINFILE}, @code{END}, and @code{ENDFILE} rules.
@node Namespace Example
@section Namespace Example
@@ -26748,11 +26763,11 @@ function Init( oldfs, oldrs, olddol0, pwcat,
using_fw, using_fpat)
RS = "\n"
pwcat = _pw_awklib "pwcat"
- while ((pwcat | getline) > 0) {
+ while ((pwcat | getline) > 0) @{
Byname[$1] = $0
Byuid[$3] = $0
Bycount[++_pw_total] = $0
- }
+ @}
close(pwcat)
Count = 0
Inited = 1
@@ -26820,7 +26835,10 @@ function endpwent()
Other notes for reviewers:
address@hidden
address@hidden @asis
address@hidden @code{SYMTAB}, @code{FUNCTAB} and @code{PROCINFO["identifiers"]}
+The subscripts are all fully qualified names.
+
@item Profiler:
When profiling, we can add an @code{Op_Namespace} to the start of
each rule. If it has changed since the previous one, output an
@@ -26830,10 +26848,44 @@ For all @samp{awk.XXX} if @samp{XXX} is all
uppercase, strip
off the @samp{awk} part.
@item Debugger:
-Simply prints fully qualified names all the time. Maybe allow a
+Simply print fully qualified names all the time. Maybe allow a
@samp{namespace @var{xxx}} command in the debugger to set the
namespace and it will use that to create fully qualified names?
Have to be careful about all uppercase names though.
+
address@hidden How does this affect indirect calls?
+The current namespace is a parse time thing, not a dynamic
+thing, so for indirect calls to work, use something like:
+
address@hidden
+@@namespace "foo"
+
+function bar() @{ @dots{} @}
+
address@hidden
+ @dots{}
+ x = "foo.bar"
+ @dots{}
+ @@x()
address@hidden
address@hidden example
+
address@hidden
+This is particularly true if @code{x} is passed as a ``function pointer''
+to another function in another namespace for that function to call
+through it.
+
address@hidden How does this affect @code{@@include}?
+Basically @code{@@include} should push and pop the namespace. Each
@code{@@include}
+saves the current namespace and starts over with namespace @samp{awk} until
+an @code{@@namespace} is seen.
+
address@hidden Extension functions
+Revise the current macros to pass @code{"awk"} as the namespace
+argument and add new macros with @samp{_ns} or some such in the name that
+pass the namespace of the extension. This preserves backwards
+compatibility at the source level while providing access to namespaces
+as needed.
@end table
@node Advanced Features
diff --git a/test/ChangeLog b/test/ChangeLog
index 0d8978f..50d12e1 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-30 Arnold D. Robbins <address@hidden>
+
+ * sourceplit.ok: Revise to match changed code.
+
2017-05-24 Andrew J. Schorr <address@hidden>
* fwtest8.ok: Fix field number in error message, thanks to a bug
diff --git a/test/sourcesplit.ok b/test/sourcesplit.ok
index 7ed6ff8..c883f51 100644
--- a/test/sourcesplit.ok
+++ b/test/sourcesplit.ok
@@ -1 +1,3 @@
-5
+gawk: cmd. line:1: BEGIN { a = 5;
+gawk: cmd. line:1: ^ unexpected newline or end of string
+EXIT CODE: 1
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=4f5ceec8298ddaaf5f9140595a86560dde4d04ce
commit 4f5ceec8298ddaaf5f9140595a86560dde4d04ce
Author: Arnold D. Robbins <address@hidden>
Date: Tue May 30 10:58:37 2017 +0300
Initial doc on namespaces.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 0a20506..2efa50b 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,10 @@
2017-05-30 Arnold D. Robbins <address@hidden>
+ * gawktexi.in: Initial doc on namespaces. Serves as a design
+ right now.
+
+2017-05-30 Arnold D. Robbins <address@hidden>
+
* gawktexi.in: Document PROCINFO["argv"].
2017-05-29 Arnold D. Robbins <address@hidden>
diff --git a/doc/gawk.info b/doc/gawk.info
index 821660c..66998ed 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -17030,7 +17030,7 @@ File: gawk.info, Node: Library Exercises, Prev:
Library Functions Summary, Up
an intervening value in 'ARGV' is a variable assignment.
-File: gawk.info, Node: Sample Programs, Next: Advanced Features, Prev:
Library Functions, Up: Top
+File: gawk.info, Node: Sample Programs, Next: Namespaces, Prev: Library
Functions, Up: Top
11 Practical 'awk' Programs
***************************
@@ -19733,9 +19733,239 @@ File: gawk.info, Node: Programs Exercises, Prev:
Programs Summary, Up: Sample
machine' into Google.
-File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev:
Sample Programs, Up: Top
+File: gawk.info, Node: Namespaces, Next: Advanced Features, Prev: Sample
Programs, Up: Top
-12 Advanced Features of 'gawk'
+12 Namespaces in 'gawk'
+***********************
+
+This major node describes a feature that is specific to 'gawk'.
+
+* Menu:
+
+
+File: gawk.info, Node: Global Namespace, Next: Qualified Names, Up:
Namespaces
+
+12.1 Standard 'awk''s Single Namespace
+======================================
+
+In standard 'awk', there is a single, global, "namespace". This means
+that _all_ function names and global variable names must be unique. Two
+different 'awk' source files cannot both define a function named
+'sort()', for example.
+
+ This situation is okay when programs are small, say a few hundred
+lines, or even a few thousand, but it prevents the development of
+reusable libraries of 'awk' functions, and can inadvertently cause
+independently-developed library files to accidentally step on each
+other's "private" global variables (*note Library Names::).
+
+ Most other programming languages solve this issue by providing some
+kind of namespace control: a way to say "this function is in namespace
+X, and that function is in namespace Y." (Of course, there is then
+still a single namespace for the namespaces, but the hope is that there
+are much fewer namespaces in use by any given program, and thus much
+less chance for collisions.)
+
+ Starting with version *FIXME* 5.0, 'gawk' provides a mechanism to put
+functions and global variables into different namespaces.
+
+
+File: gawk.info, Node: Qualified Names, Next: Default Namespace, Prev:
Global Namespace, Up: Namespaces
+
+12.2 Qualified Names
+====================
+
+A "qualified name" is an identifier that includes a namespace name. For
+example, one might have a function named 'posix.getpid()'. Here, the
+namespace is 'posix' and the function name within the namespace is
+'getpid()'. The namespace and variable or function name are separated
+by a period. Only one period is allowed in a qualified name.
+
+ You must use fully qualified names from one namespace to access
+variables in another. This is especially important when using variable
+names to index the special 'SYMTAB' array.
+
+
+File: gawk.info, Node: Default Namespace, Next: Changing The Namespace,
Prev: Qualified Names, Up: Namespaces
+
+12.3 The Default Namespace
+==========================
+
+The default namespace, not surprisingly, is 'awk'. All of the
+predefined 'awk' and 'gawk' variables are in this namespace, and thus
+have qualified names like 'awk.ARGC', 'awk.NF', and so on.
+
+ Furthermore, even when you have changed the namespace for your
+current source file (*note Changing The Namespace::), 'gawk' forces
+unqualified identifiers whose names are all uppercase letters to be in
+the 'awk' namespace. This makes it possible for you to easily reference
+'gawk''s global variables from different namespaces.
+
+
+File: gawk.info, Node: Changing The Namespace, Next: Namespace Example,
Prev: Default Namespace, Up: Namespaces
+
+12.4 Changing The Namespace
+===========================
+
+In order to set the current namespace, use an '@namespace' directive at
+the top level of your program:
+
+ @namespace "passwd"
+
+ BEGIN { }
+ ...
+
+ After this directive, all simple non-uppercase identifiers are placed
+into the 'passwd' namespace.
+
+ You can change the namespace multiple times within a single source
+file, although this is likely to become confusing if you do it a lot.
+
+ NOTE: The namespace concept is one handled while your program is
+ being parsed by 'gawk'. There is no concept of a "current"
+ namespace during runtime. Be sure you understand the distinction.
+
+ Each source file for '-i' and '-f' starts out with an implicit '
+"awk"'.
+
+ Similarly, each chunk of command-line code with '-e' has such an
+implicit statement.
+
+ FIXME: The semantics of '-e' change to require it to be syntactic
+unit.
+
+ FIXME: Update doc earlier in this book and change the corresponding
+code.
+
+
+File: gawk.info, Node: Namespace Example, Next: Namespace Misc, Prev:
Changing The Namespace, Up: Namespaces
+
+12.5 Namespace Example
+======================
+
+ # FIXME: fix this up for real, dates etc
+ #
+ # passwd.awk --- access password file information
+ #
+ # Arnold Robbins, address@hidden, Public Domain
+ # May 1993
+ # Revised October 2000
+ # Revised December 2010
+ #
+ # Reworked for namespaces May 2017
+
+ @namespace "passwd"
+
+ BEGIN {
+ # tailor this to suit your system
+ Awklib = "/usr/local/libexec/awk/"
+ }
+
+ function Init( oldfs, oldrs, olddol0, pwcat, using_fw, using_fpat)
+ {
+ if (Inited)
+ return
+
+ oldfs = FS
+ oldrs = RS
+ olddol0 = $0
+ using_fw = (PROCINFO["FS"] == "FIELDWIDTHS")
+ using_fpat = (PROCINFO["FS"] == "FPAT")
+ FS = ":"
+ RS = "\n"
+
+ pwcat = _pw_awklib "pwcat"
+ while ((pwcat | getline) > 0)
+ Byname[$1] = $0
+ Byuid[$3] = $0
+ Bycount[++_pw_total] = $0
+
+ close(pwcat)
+ Count = 0
+ Inited = 1
+ FS = oldfs
+ if (using_fw)
+ FIELDWIDTHS = FIELDWIDTHS
+ else if (using_fpat)
+ FPAT = FPAT
+ RS = oldrs
+ $0 = olddol0
+ }
+
+ function Getpwnam(name)
+ {
+ Init()
+ return Byname[name]
+ }
+
+ function Getpwuid(uid)
+ {
+ Init()
+ return Byuid[uid]
+ }
+
+ function Getpwent()
+ {
+ Init()
+ if (Count < Total)
+ return Bycount[++Count]
+ return ""
+ }
+
+ function Endpwent()
+ {
+ Count = 0
+ }
+
+ # Compatibility:
+
+ @namespace "awk"
+
+ function getpwnam(name)
+ {
+ return passwd.Getpwnam(name)
+ }
+
+ function getpwuid(uid)
+ {
+ return passwd.Getpwuid(uid)
+ }
+
+ function getpwent()
+ {
+ return passwd.Getpwent()
+ }
+
+ function endpwent()
+ {
+ passwd.Endpwent()
+ }
+
+
+File: gawk.info, Node: Namespace Misc, Prev: Namespace Example, Up:
Namespaces
+
+12.6 Miscellaneous Notes
+========================
+
+Other notes for reviewers:
+
+Profiler:
+ When profiling, we can add an 'Op_Namespace' to the start of each
+ rule. If it has changed since the previous one, output an
+ '@namespace' statement. For each identifier, if it starts with the
+ current namespace, output only the simple part. For all 'awk.XXX'
+ if 'XXX' is all uppercase, strip off the 'awk' part.
+
+Debugger:
+ Simply prints fully qualified names all the time. Maybe allow a
+ 'namespace XXX' command in the debugger to set the namespace and it
+ will use that to create fully qualified names? Have to be careful
+ about all uppercase names though.
+
+
+File: gawk.info, Node: Advanced Features, Next: Internationalization, Prev:
Namespaces, Up: Top
+
+13 Advanced Features of 'gawk'
******************************
Write documentation as if whoever reads it is a violent psychopath
@@ -19781,7 +20011,7 @@ their own:
File: gawk.info, Node: Nondecimal Data, Next: Array Sorting, Up: Advanced
Features
-12.1 Allowing Nondecimal Input Data
+13.1 Allowing Nondecimal Input Data
===================================
If you run 'gawk' with the '--non-decimal-data' option, you can have
@@ -19824,7 +20054,7 @@ request it.
File: gawk.info, Node: Array Sorting, Next: Two-way I/O, Prev: Nondecimal
Data, Up: Advanced Features
-12.2 Controlling Array Traversal and Array Sorting
+13.2 Controlling Array Traversal and Array Sorting
==================================================
'gawk' lets you control the order in which a 'for (INDX in ARRAY)' loop
@@ -19843,7 +20073,7 @@ to order the elements during sorting.
File: gawk.info, Node: Controlling Array Traversal, Next: Array Sorting
Functions, Up: Array Sorting
-12.2.1 Controlling Array Traversal
+13.2.1 Controlling Array Traversal
----------------------------------
By default, the order in which a 'for (INDX in ARRAY)' loop scans an
@@ -20081,7 +20311,7 @@ character, which cannot be part of an identifier.
File: gawk.info, Node: Array Sorting Functions, Prev: Controlling Array
Traversal, Up: Array Sorting
-12.2.2 Sorting Array Values and Indices with 'gawk'
+13.2.2 Sorting Array Values and Indices with 'gawk'
---------------------------------------------------
In most 'awk' implementations, sorting an array requires writing a
@@ -20221,7 +20451,7 @@ POSIX-compatibility mode, and because 'asort()' and
'asorti()' are
File: gawk.info, Node: Two-way I/O, Next: TCP/IP Networking, Prev: Array
Sorting, Up: Advanced Features
-12.3 Two-Way Communications with Another Process
+13.3 Two-Way Communications with Another Process
================================================
It is often useful to be able to send data to a separate program for
@@ -20376,7 +20606,7 @@ in Bash.
File: gawk.info, Node: TCP/IP Networking, Next: Profiling, Prev: Two-way
I/O, Up: Advanced Features
-12.4 Using 'gawk' for Network Programming
+13.4 Using 'gawk' for Network Programming
=========================================
'EMRED':
@@ -20456,7 +20686,7 @@ complete introduction and discussion, as well as
extensive examples.
File: gawk.info, Node: Profiling, Next: Advanced Features Summary, Prev:
TCP/IP Networking, Up: Advanced Features
-12.5 Profiling Your 'awk' Programs
+13.5 Profiling Your 'awk' Programs
==================================
You may produce execution traces of your 'awk' programs. This is done
@@ -20715,7 +20945,7 @@ improve this in a subsequent release.
File: gawk.info, Node: Advanced Features Summary, Prev: Profiling, Up:
Advanced Features
-12.6 Summary
+13.6 Summary
============
* The '--non-decimal-data' option causes 'gawk' to treat octal- and
@@ -20756,7 +20986,7 @@ File: gawk.info, Node: Advanced Features Summary,
Prev: Profiling, Up: Advanc
File: gawk.info, Node: Internationalization, Next: Debugger, Prev: Advanced
Features, Up: Top
-13 Internationalization with 'gawk'
+14 Internationalization with 'gawk'
***********************************
Once upon a time, computer makers wrote software that worked only in
@@ -20788,7 +21018,7 @@ requirement.
File: gawk.info, Node: I18N and L10N, Next: Explaining gettext, Up:
Internationalization
-13.1 Internationalization and Localization
+14.1 Internationalization and Localization
==========================================
"Internationalization" means writing (or modifying) a program once, in
@@ -20803,7 +21033,7 @@ read.
File: gawk.info, Node: Explaining gettext, Next: Programmer i18n, Prev:
I18N and L10N, Up: Internationalization
-13.2 GNU 'gettext'
+14.2 GNU 'gettext'
==================
'gawk' uses GNU 'gettext' to provide its internationalization features.
@@ -20950,7 +21180,7 @@ the decimal point, while many Europeans do exactly the
opposite:
File: gawk.info, Node: Programmer i18n, Next: Translator i18n, Prev:
Explaining gettext, Up: Internationalization
-13.3 Internationalizing 'awk' Programs
+14.3 Internationalizing 'awk' Programs
======================================
'gawk' provides the following variables for internationalization:
@@ -21075,7 +21305,7 @@ create and use translations from 'awk'.
File: gawk.info, Node: Translator i18n, Next: I18N Example, Prev:
Programmer i18n, Up: Internationalization
-13.4 Translating 'awk' Programs
+14.4 Translating 'awk' Programs
===============================
Once a program's translatable strings have been marked, they must be
@@ -21096,7 +21326,7 @@ for 'printf' arguments at runtime is covered.
File: gawk.info, Node: String Extraction, Next: Printf Ordering, Up:
Translator i18n
-13.4.1 Extracting Marked Strings
+14.4.1 Extracting Marked Strings
--------------------------------
Once your 'awk' program is working, and all the strings have been marked
@@ -21125,7 +21355,7 @@ for 'guide'.
File: gawk.info, Node: Printf Ordering, Next: I18N Portability, Prev:
String Extraction, Up: Translator i18n
-13.4.2 Rearranging 'printf' Arguments
+14.4.2 Rearranging 'printf' Arguments
-------------------------------------
Format strings for 'printf' and 'sprintf()' (*note Printf::) present a
@@ -21202,7 +21432,7 @@ which the program is first written.
File: gawk.info, Node: I18N Portability, Prev: Printf Ordering, Up:
Translator i18n
-13.4.3 'awk' Portability Issues
+14.4.3 'awk' Portability Issues
-------------------------------
'gawk''s internationalization features were purposely chosen to have as
@@ -21267,7 +21497,7 @@ actually almost portable, requiring very little change:
File: gawk.info, Node: I18N Example, Next: Gawk I18N, Prev: Translator
i18n, Up: Internationalization
-13.5 A Simple Internationalization Example
+14.5 A Simple Internationalization Example
==========================================
Now let's look at a step-by-step example of how to internationalize and
@@ -21360,7 +21590,7 @@ and 'bindtextdomain()' (*note I18N Portability::) are
in a file named
File: gawk.info, Node: Gawk I18N, Next: I18N Summary, Prev: I18N Example,
Up: Internationalization
-13.6 'gawk' Can Speak Your Language
+14.6 'gawk' Can Speak Your Language
===================================
'gawk' itself has been internationalized using the GNU 'gettext'
@@ -21375,7 +21605,7 @@ usage messages, warnings, and fatal errors in the local
language.
File: gawk.info, Node: I18N Summary, Prev: Gawk I18N, Up:
Internationalization
-13.7 Summary
+14.7 Summary
============
* Internationalization means writing a program such that it can use
@@ -21407,7 +21637,7 @@ File: gawk.info, Node: I18N Summary, Prev: Gawk I18N,
Up: Internationalizatio
File: gawk.info, Node: Debugger, Next: Arbitrary Precision Arithmetic,
Prev: Internationalization, Up: Top
-14 Debugging 'awk' Programs
+15 Debugging 'awk' Programs
***************************
It would be nice if computer programs worked perfectly the first time
@@ -21432,7 +21662,7 @@ is easy.
File: gawk.info, Node: Debugging, Next: Sample Debugging Session, Up:
Debugger
-14.1 Introduction to the 'gawk' Debugger
+15.1 Introduction to the 'gawk' Debugger
========================================
This minor node introduces debugging in general and begins the
@@ -21447,7 +21677,7 @@ discussion of debugging in 'gawk'.
File: gawk.info, Node: Debugging Concepts, Next: Debugging Terms, Up:
Debugging
-14.1.1 Debugging in General
+15.1.1 Debugging in General
---------------------------
(If you have used debuggers in other languages, you may want to skip
@@ -21486,7 +21716,7 @@ functional program that you or someone else wrote).
File: gawk.info, Node: Debugging Terms, Next: Awk Debugging, Prev:
Debugging Concepts, Up: Debugging
-14.1.2 Debugging Concepts
+15.1.2 Debugging Concepts
-------------------------
Before diving in to the details, we need to introduce several important
@@ -21538,7 +21768,7 @@ defines terms used throughout the rest of this major
node:
File: gawk.info, Node: Awk Debugging, Prev: Debugging Terms, Up: Debugging
-14.1.3 'awk' Debugging
+15.1.3 'awk' Debugging
----------------------
Debugging an 'awk' program has some specific aspects that are not shared
@@ -21560,7 +21790,7 @@ commands.
File: gawk.info, Node: Sample Debugging Session, Next: List of Debugger
Commands, Prev: Debugging, Up: Debugger
-14.2 Sample 'gawk' Debugging Session
+15.2 Sample 'gawk' Debugging Session
====================================
In order to illustrate the use of 'gawk' as a debugger, let's look at a
@@ -21576,7 +21806,7 @@ example.
File: gawk.info, Node: Debugger Invocation, Next: Finding The Bug, Up:
Sample Debugging Session
-14.2.1 How to Start the Debugger
+15.2.1 How to Start the Debugger
--------------------------------
Starting the debugger is almost exactly like running 'gawk' normally,
@@ -21608,7 +21838,7 @@ code has been executed.
File: gawk.info, Node: Finding The Bug, Prev: Debugger Invocation, Up:
Sample Debugging Session
-14.2.2 Finding the Bug
+15.2.2 Finding the Bug
----------------------
Let's say that we are having a problem using (a faulty version of)
@@ -21802,7 +22032,7 @@ and problem solved!
File: gawk.info, Node: List of Debugger Commands, Next: Readline Support,
Prev: Sample Debugging Session, Up: Debugger
-14.3 Main Debugger Commands
+15.3 Main Debugger Commands
===========================
The 'gawk' debugger command set can be divided into the following
@@ -21841,7 +22071,7 @@ just by hitting 'Enter'. This works for the commands
'list', 'next',
File: gawk.info, Node: Breakpoint Control, Next: Debugger Execution Control,
Up: List of Debugger Commands
-14.3.1 Control of Breakpoints
+15.3.1 Control of Breakpoints
-----------------------------
As we saw earlier, the first thing you probably want to do in a
@@ -21936,7 +22166,7 @@ The commands for controlling breakpoints are:
File: gawk.info, Node: Debugger Execution Control, Next: Viewing And
Changing Data, Prev: Breakpoint Control, Up: List of Debugger Commands
-14.3.2 Control of Execution
+15.3.2 Control of Execution
---------------------------
Now that your breakpoints are ready, you can start running the program
@@ -22025,7 +22255,7 @@ execution of the program than we saw in our earlier
example:
File: gawk.info, Node: Viewing And Changing Data, Next: Execution Stack,
Prev: Debugger Execution Control, Up: List of Debugger Commands
-14.3.3 Viewing and Changing Data
+15.3.3 Viewing and Changing Data
--------------------------------
The commands for viewing and changing variables inside of 'gawk' are:
@@ -22112,7 +22342,7 @@ AWK STATEMENTS
File: gawk.info, Node: Execution Stack, Next: Debugger Info, Prev: Viewing
And Changing Data, Up: List of Debugger Commands
-14.3.4 Working with the Stack
+15.3.4 Working with the Stack
-----------------------------
Whenever you run a program that contains any function calls, 'gawk'
@@ -22152,7 +22382,7 @@ are:
File: gawk.info, Node: Debugger Info, Next: Miscellaneous Debugger Commands,
Prev: Execution Stack, Up: List of Debugger Commands
-14.3.5 Obtaining Information About the Program and the Debugger State
+15.3.5 Obtaining Information About the Program and the Debugger State
---------------------------------------------------------------------
Besides looking at the values of variables, there is often a need to get
@@ -22262,7 +22492,7 @@ from a file. The commands are:
File: gawk.info, Node: Miscellaneous Debugger Commands, Prev: Debugger Info,
Up: List of Debugger Commands
-14.3.6 Miscellaneous Commands
+15.3.6 Miscellaneous Commands
-----------------------------
There are a few more commands that do not fit into the previous
@@ -22381,7 +22611,7 @@ categories, as follows:
File: gawk.info, Node: Readline Support, Next: Limitations, Prev: List of
Debugger Commands, Up: Debugger
-14.4 Readline Support
+15.4 Readline Support
=====================
If 'gawk' is compiled with the GNU Readline library
@@ -22408,7 +22638,7 @@ Variable name completion
File: gawk.info, Node: Limitations, Next: Debugging Summary, Prev: Readline
Support, Up: Debugger
-14.5 Limitations
+15.5 Limitations
================
We hope you find the 'gawk' debugger useful and enjoyable to work with,
@@ -22451,7 +22681,7 @@ some limitations. A few that it's worth being aware of
are:
File: gawk.info, Node: Debugging Summary, Prev: Limitations, Up: Debugger
-14.6 Summary
+15.6 Summary
============
* Programs rarely work correctly the first time. Finding bugs is
@@ -22482,7 +22712,7 @@ File: gawk.info, Node: Debugging Summary, Prev:
Limitations, Up: Debugger
File: gawk.info, Node: Arbitrary Precision Arithmetic, Next: Dynamic
Extensions, Prev: Debugger, Up: Top
-15 Arithmetic and Arbitrary-Precision Arithmetic with 'gawk'
+16 Arithmetic and Arbitrary-Precision Arithmetic with 'gawk'
************************************************************
This major node introduces some basic concepts relating to how computers
@@ -22513,7 +22743,7 @@ are not quite in agreement.
File: gawk.info, Node: Computer Arithmetic, Next: Math Definitions, Up:
Arbitrary Precision Arithmetic
-15.1 A General Description of Computer Arithmetic
+16.1 A General Description of Computer Arithmetic
=================================================
Until now, we have worked with data as either numbers or strings.
@@ -22582,7 +22812,7 @@ ranges. Integer values are usually either 32 or 64
bits in size.
Single-precision floating-point values occupy 32 bits, whereas
double-precision floating-point values occupy 64 bits. Floating-point
values are always signed. The possible ranges of values are shown in
-*note Table 15.1: table-numeric-ranges.
+*note Table 16.1: table-numeric-ranges.
Numeric representation Minimum value Maximum value
---------------------------------------------------------------------------
@@ -22599,7 +22829,7 @@ Double-precision 2.225074e-308
1.797693e308
floating point
(approximate)
-Table 15.1: Value ranges for different numeric representations
+Table 16.1: Value ranges for different numeric representations
---------- Footnotes ----------
@@ -22608,7 +22838,7 @@ Table 15.1: Value ranges for different numeric
representations
File: gawk.info, Node: Math Definitions, Next: MPFR features, Prev:
Computer Arithmetic, Up: Arbitrary Precision Arithmetic
-15.2 Other Stuff to Know
+16.2 Other Stuff to Know
========================
The rest of this major node uses a number of terms. Here are some
@@ -22688,7 +22918,7 @@ IEEE 754 types are 32-bit single precision, 64-bit
double precision, and
precision formats to allow greater precisions and larger exponent
ranges. ('awk' uses only the 64-bit double-precision format.)
- *note Table 15.2: table-ieee-formats. lists the precision and
+ *note Table 16.2: table-ieee-formats. lists the precision and
exponent field values for the basic IEEE 754 binary formats.
Name Total bits Precision Minimum Maximum
@@ -22698,7 +22928,7 @@ Single 32 24 -126
+127
Double 64 53 -1022 +1023
Quadruple 128 113 -16382 +16383
-Table 15.2: Basic IEEE format values
+Table 16.2: Basic IEEE format values
NOTE: The precision numbers include the implied leading one that
gives them one extra bit of significand.
@@ -22711,7 +22941,7 @@ paraphrased, and for the examples.
File: gawk.info, Node: MPFR features, Next: FP Math Caution, Prev: Math
Definitions, Up: Arbitrary Precision Arithmetic
-15.3 Arbitrary-Precision Arithmetic Features in 'gawk'
+16.3 Arbitrary-Precision Arithmetic Features in 'gawk'
======================================================
By default, 'gawk' uses the double-precision floating-point values
@@ -22749,7 +22979,7 @@ information.
File: gawk.info, Node: FP Math Caution, Next: Arbitrary Precision Integers,
Prev: MPFR features, Up: Arbitrary Precision Arithmetic
-15.4 Floating-Point Arithmetic: Caveat Emptor!
+16.4 Floating-Point Arithmetic: Caveat Emptor!
==============================================
Math class is tough!
@@ -22783,7 +23013,7 @@ in computer science.
File: gawk.info, Node: Inexactness of computations, Next: Getting Accuracy,
Up: FP Math Caution
-15.4.1 Floating-Point Arithmetic Is Not Exact
+16.4.1 Floating-Point Arithmetic Is Not Exact
---------------------------------------------
Binary floating-point representations and arithmetic are inexact.
@@ -22804,7 +23034,7 @@ be sure of the number of significant decimal places in
the final result.
File: gawk.info, Node: Inexact representation, Next: Comparing FP Values,
Up: Inexactness of computations
-15.4.1.1 Many Numbers Cannot Be Represented Exactly
+16.4.1.1 Many Numbers Cannot Be Represented Exactly
...................................................
So, before you start to write any code, you should think about what you
@@ -22835,7 +23065,7 @@ previous example, produces an output identical to the
input.
File: gawk.info, Node: Comparing FP Values, Next: Errors accumulate, Prev:
Inexact representation, Up: Inexactness of computations
-15.4.1.2 Be Careful Comparing Values
+16.4.1.2 Be Careful Comparing Values
....................................
Because the underlying representation can be a little bit off from the
@@ -22864,7 +23094,7 @@ defined elsewhere in your program.)
File: gawk.info, Node: Errors accumulate, Prev: Comparing FP Values, Up:
Inexactness of computations
-15.4.1.3 Errors Accumulate
+16.4.1.3 Errors Accumulate
..........................
The loss of accuracy during a single computation with floating-point
@@ -22912,7 +23142,7 @@ representations yield an unexpected result:
File: gawk.info, Node: Getting Accuracy, Next: Try To Round, Prev:
Inexactness of computations, Up: FP Math Caution
-15.4.2 Getting the Accuracy You Need
+16.4.2 Getting the Accuracy You Need
------------------------------------
Can arbitrary-precision arithmetic give exact results? There are no
@@ -22973,7 +23203,7 @@ hand is often the correct approach in such situations.
File: gawk.info, Node: Try To Round, Next: Setting precision, Prev: Getting
Accuracy, Up: FP Math Caution
-15.4.3 Try a Few Extra Bits of Precision and Rounding
+16.4.3 Try a Few Extra Bits of Precision and Rounding
-----------------------------------------------------
Instead of arbitrary-precision floating-point arithmetic, often all you
@@ -23000,7 +23230,7 @@ iterations:
File: gawk.info, Node: Setting precision, Next: Setting the rounding mode,
Prev: Try To Round, Up: FP Math Caution
-15.4.4 Setting the Precision
+16.4.4 Setting the Precision
----------------------------
'gawk' uses a global working precision; it does not keep track of the
@@ -23009,7 +23239,7 @@ operation or calling a built-in function rounds the
result to the
current working precision. The default working precision is 53 bits,
which you can modify using the predefined variable 'PREC'. You can also
set the value to one of the predefined case-insensitive strings shown in
-*note Table 15.3: table-predefined-precision-strings, to emulate an IEEE
+*note Table 16.3: table-predefined-precision-strings, to emulate an IEEE
754 binary format.
'PREC' IEEE 754 binary format
@@ -23020,7 +23250,7 @@ set the value to one of the predefined case-insensitive
strings shown in
'"quad"' Basic 128-bit quadruple precision
'"oct"' 256-bit octuple precision
-Table 15.3: Predefined precision strings for 'PREC'
+Table 16.3: Predefined precision strings for 'PREC'
The following example illustrates the effects of changing precision
on arithmetic operations:
@@ -23057,12 +23287,12 @@ on arithmetic operations:
File: gawk.info, Node: Setting the rounding mode, Prev: Setting precision,
Up: FP Math Caution
-15.4.5 Setting the Rounding Mode
+16.4.5 Setting the Rounding Mode
--------------------------------
The 'ROUNDMODE' variable provides program-level control over the
rounding mode. The correspondence between 'ROUNDMODE' and the IEEE
-rounding modes is shown in *note Table 15.4: table-gawk-rounding-modes.
+rounding modes is shown in *note Table 16.4: table-gawk-rounding-modes.
Rounding mode IEEE name 'ROUNDMODE'
---------------------------------------------------------------------------
@@ -23073,10 +23303,10 @@ Round toward zero 'roundTowardZero'
'"Z"' or '"z"'
Round to nearest, ties away 'roundTiesToAway' '"A"' or '"a"'
from zero
-Table 15.4: 'gawk' rounding modes
+Table 16.4: 'gawk' rounding modes
'ROUNDMODE' has the default value '"N"', which selects the IEEE 754
-rounding mode 'roundTiesToEven'. In *note Table 15.4:
+rounding mode 'roundTiesToEven'. In *note Table 16.4:
table-gawk-rounding-modes, the value '"A"' selects 'roundTiesToAway'.
This is only available if your version of the MPFR library supports it;
otherwise, setting 'ROUNDMODE' to '"A"' has no effect.
@@ -23148,7 +23378,7 @@ round halfway cases for 'printf'.
File: gawk.info, Node: Arbitrary Precision Integers, Next: Checking for
MPFR, Prev: FP Math Caution, Up: Arbitrary Precision Arithmetic
-15.5 Arbitrary-Precision Integer Arithmetic with 'gawk'
+16.5 Arbitrary-Precision Integer Arithmetic with 'gawk'
=======================================================
When given the '-M' option, 'gawk' performs all integer arithmetic using
@@ -23278,7 +23508,7 @@ Wolfram Web Resource
File: gawk.info, Node: Checking for MPFR, Next: POSIX Floating Point
Problems, Prev: Arbitrary Precision Integers, Up: Arbitrary Precision
Arithmetic
-15.6 How To Check If MPFR Is Available
+16.6 How To Check If MPFR Is Available
======================================
Occasionally, you might like to be able to check if 'gawk' was invoked
@@ -23315,7 +23545,7 @@ arbitrary-precision arithmetic is available:
File: gawk.info, Node: POSIX Floating Point Problems, Next: Floating point
summary, Prev: Checking for MPFR, Up: Arbitrary Precision Arithmetic
-15.7 Standards Versus Existing Practice
+16.7 Standards Versus Existing Practice
=======================================
Historically, 'awk' has converted any nonnumeric-looking string to the
@@ -23402,7 +23632,7 @@ and infinity values. The solution implemented in
'gawk' is as follows:
File: gawk.info, Node: Floating point summary, Prev: POSIX Floating Point
Problems, Up: Arbitrary Precision Arithmetic
-15.8 Summary
+16.8 Summary
============
* Most computer arithmetic is done using either integers or
@@ -23455,7 +23685,7 @@ File: gawk.info, Node: Floating point summary, Prev:
POSIX Floating Point Prob
File: gawk.info, Node: Dynamic Extensions, Next: Language History, Prev:
Arbitrary Precision Arithmetic, Up: Top
-16 Writing Extensions for 'gawk'
+17 Writing Extensions for 'gawk'
********************************
It is possible to add new functions written in C or C++ to 'gawk' using
@@ -23489,7 +23719,7 @@ sample extensions are automatically built and installed
when 'gawk' is.
File: gawk.info, Node: Extension Intro, Next: Plugin License, Up: Dynamic
Extensions
-16.1 Introduction
+17.1 Introduction
=================
An "extension" (sometimes called a "plug-in") is a piece of external
@@ -23516,7 +23746,7 @@ and design.
File: gawk.info, Node: Plugin License, Next: Extension Mechanism Outline,
Prev: Extension Intro, Up: Dynamic Extensions
-16.2 Extension Licensing
+17.2 Extension Licensing
========================
Every dynamic extension must be distributed under a license that is
@@ -23536,12 +23766,12 @@ symbol exists in the global scope. Something like
this is enough:
File: gawk.info, Node: Extension Mechanism Outline, Next: Extension API
Description, Prev: Plugin License, Up: Dynamic Extensions
-16.3 How It Works at a High Level
+17.3 How It Works at a High Level
=================================
Communication between 'gawk' and an extension is two-way. First, when
an extension is loaded, 'gawk' passes it a pointer to a 'struct' whose
-fields are function pointers. This is shown in *note Figure 16.1:
+fields are function pointers. This is shown in *note Figure 17.1:
figure-load-extension.
[image src="api-figure1.png" alt="Loading the extension" text="
API
@@ -23569,12 +23799,12 @@ figure-load-extension.
gawk Main Program Address Space Extension"