gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4744-g17887261


From: Arnold Robbins
Subject: [SCM] gawk branch, feature/pma2, updated. gawk-4.1.0-4744-g17887261
Date: Mon, 13 Jun 2022 06:41:35 -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/pma2 has been updated
       via  17887261a7537f2e25f6cca63e1d67a93f3a3e36 (commit)
      from  24184e361b734aff4c7c9e96b0090cfaaf351e2d (commit)

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

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

commit 17887261a7537f2e25f6cca63e1d67a93f3a3e36
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Mon Jun 13 13:41:19 2022 +0300

    Doc and code improvements.

diff --git a/ChangeLog b/ChangeLog
index ba73864e..0fc21389 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-06-13         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * main.c (main): If persistent memory not available and
+       GAWK_PERSIST_FILE supplied, issue a warnning. Similarly, don't
+       do mtrace if using persistent malloc.
+       (version): Include PMA version in the output.
+
 2022-06-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awk.h (using_persistent_malloc): Declare new variable
diff --git a/configure b/configure
index cb4954b9..1530879a 100755
--- a/configure
+++ b/configure
@@ -12539,8 +12539,13 @@ fi
 printf "%s\n" "#define USE_PERSISTENT_MALLOC 1" >>confdefs.h
 
        use_persistent_malloc=yes
-       LDFLAGS="${LDFLAGS} -no-pie"
-       export LDFLAGS
+       case $host_os in
+       linux-*)
+               LDFLAGS="${LDFLAGS} -no-pie"
+               export LDFLAGS
+               ;;
+       # Other OS's go here...
+       esac
   else
        use_persistent_malloc=no
   fi
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 8bfd132c..631704b6 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2022-06-13         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawktexi.in (Persistent  Memroy): New section.
+
 2022-06-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawk.1: Document GAWK_PERSIST_FILE.
diff --git a/doc/gawk.info b/doc/gawk.info
index 804caf15..9ee267c6 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -504,6 +504,7 @@ in (a) below.  A copy of the license is included in the 
section entitled
 * TCP/IP Networking::                   Using 'gawk' for network
                                         programming.
 * Profiling::                           Profiling your 'awk' programs.
+* Persistent Memory::                   Preserving data between runs.
 * Extension Philosophy::                What should be built-in and what
                                         should not.
 * Advanced Features Summary::           Summary of advanced features.
@@ -21051,8 +21052,11 @@ nondecimal numbers in input data, not just in 'awk' 
programs.  Then,
 'gawk''s special features for sorting arrays are presented.  Next,
 two-way I/O, discussed briefly in earlier parts of this Info file, is
 described in full detail, along with the basics of TCP/IP networking.
-Finally, we see how 'gawk' can "profile" an 'awk' program, making it
-possible to tune it for performance.
+We then see how 'gawk' can "profile" an 'awk' program, making it
+possible to tune it for performance.  Next, we present an experimental
+feature that allows you to preserve the values of 'awk' variables and
+arrays between runs of 'gawk'.  Finally, we discuss the philosophy
+behind 'gawk''s extension mechanism.
 
    Additional advanced features are discussed in separate major nodes of
 their own:
@@ -21079,6 +21083,7 @@ their own:
 * Two-way I/O::                 Two-way communications with another process.
 * TCP/IP Networking::           Using 'gawk' for network programming.
 * Profiling::                   Profiling your 'awk' programs.
+* Persistent Memory::           Preserving data between runs.
 * Extension Philosophy::        What should be built-in and what should not.
 * Advanced Features Summary::   Summary of advanced features.
 
@@ -21857,7 +21862,7 @@ well as extensive examples.
      this includes any web service whose URL starts with 'https://'.
 
 
-File: gawk.info,  Node: Profiling,  Next: Extension Philosophy,  Prev: TCP/IP 
Networking,  Up: Advanced Features
+File: gawk.info,  Node: Profiling,  Next: Persistent Memory,  Prev: TCP/IP 
Networking,  Up: Advanced Features
 
 12.6 Profiling Your 'awk' Programs
 ==================================
@@ -22119,9 +22124,68 @@ numeric constants; if you used an octal or hexadecimal 
value in your
 source code, it will appear that way in the output.
 
 
-File: gawk.info,  Node: Extension Philosophy,  Next: Advanced Features 
Summary,  Prev: Profiling,  Up: Advanced Features
+File: gawk.info,  Node: Persistent Memory,  Next: Extension Philosophy,  Prev: 
Profiling,  Up: Advanced Features
 
-12.7 Builtin Features versus Extensions
+12.7 Preserving Data Between Runs
+=================================
+
+Starting with version 5.2, 'gawk' supports a feature called "persistent
+memory."  This feature stores the values of all of 'gawk''s variables
+and arrays in a large, sparse file in the filesystem.  When this feature
+is not in use (the normal case), 'gawk''s data resides in ephemeral
+system memory.
+
+   Persistent memory is enabled on systems supporting the 'mmap()' and
+'munmap()' system calls.  'gawk' must be compiled as a non-PIE (Position
+Independent Executable) binary, since the persisten store ends up
+holding pointers to functions held within the 'gawk' executable.  This
+also means that to use the feature, you must use the same executable
+from run to run.
+
+   As of this writing, the feature has only been tested on GNU/Linux
+systems.  On others, your mileage may vary, and/or you may need to
+investigate how to make it work for you.
+
+   To use the feature, follow these steps:
+
+  1. Create a new, empty sparse file of the desired size.  For example,
+     four gigabytes.  On a GNU/Linux system, you can use the 'truncate'
+     command:
+
+          $ truncate -s 4G data.pma
+
+  2. Provide the path to the data file in the 'GAWK_PERSIST_FILE'
+     environment variable.  This is best done by placing the value in
+     the environment just for the run of 'gawk', like so:
+
+          $ GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN { print ++i }'
+          1
+
+  3. Use the same data file in subsequent runs to use the preserved data
+     values:
+
+          $ GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN { print ++i }'
+          2
+          $ GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN { print ++i }'
+          3
+
+     As shown, in subsequent runs using the same data file, the values
+     of 'gawk''s variables are preserved.
+
+   FIXME: Add links here and more verbiage.
+
+   As noted earlier, support for persistent memory is _experimental_.
+If it becomes burdensome,(1) then the feature will be removed.
+
+   ---------- Footnotes ----------
+
+   (1) Meaning, there are too many bug reports, or too many strange
+differences in behavior from when 'gawk' is run normally.
+
+
+File: gawk.info,  Node: Extension Philosophy,  Next: Advanced Features 
Summary,  Prev: Persistent Memory,  Up: Advanced Features
+
+12.8 Builtin Features versus Extensions
 =======================================
 
 As this and subsequent major nodes show, 'gawk' has a large number of
@@ -22157,7 +22221,7 @@ or need.
 
 File: gawk.info,  Node: Advanced Features Summary,  Prev: Extension 
Philosophy,  Up: Advanced Features
 
-12.8 Summary
+12.9 Summary
 ============
 
    * The '--non-decimal-data' option causes 'gawk' to treat octal- and
@@ -38855,615 +38919,617 @@ Index
 
 Tag Table:
 Node: Top1200
-Node: Foreword345721
-Node: Foreword450163
-Node: Preface51695
-Ref: Preface-Footnote-154554
-Ref: Preface-Footnote-254663
-Ref: Preface-Footnote-354897
-Node: History55039
-Node: Names57391
-Ref: Names-Footnote-158495
-Node: This Manual58642
-Ref: This Manual-Footnote-165281
-Node: Conventions65381
-Node: Manual History67750
-Ref: Manual History-Footnote-170747
-Ref: Manual History-Footnote-270788
-Node: How To Contribute70862
-Node: Acknowledgments71784
-Node: Getting Started76721
-Node: Running gawk79160
-Node: One-shot80350
-Node: Read Terminal81613
-Node: Long83606
-Node: Executable Scripts85119
-Ref: Executable Scripts-Footnote-187752
-Node: Comments87855
-Node: Quoting90339
-Node: DOS Quoting95865
-Node: Sample Data Files97921
-Node: Very Simple100516
-Node: Two Rules106618
-Node: More Complex108503
-Node: Statements/Lines110835
-Ref: Statements/Lines-Footnote-1115319
-Node: Other Features115584
-Node: When116520
-Ref: When-Footnote-1118274
-Node: Intro Summary118339
-Node: Invoking Gawk119223
-Node: Command Line120737
-Node: Options121535
-Ref: Options-Footnote-1139719
-Ref: Options-Footnote-2139950
-Node: Other Arguments139975
-Node: Naming Standard Input143986
-Node: Environment Variables145196
-Node: AWKPATH Variable145754
-Ref: AWKPATH Variable-Footnote-1149166
-Ref: AWKPATH Variable-Footnote-2149200
-Node: AWKLIBPATH Variable149571
-Ref: AWKLIBPATH Variable-Footnote-1151268
-Node: Other Environment Variables151643
-Node: Exit Status155731
-Node: Include Files156408
-Node: Loading Shared Libraries160098
-Node: Obsolete161526
-Node: Undocumented162146
-Node: Invoking Summary162443
-Node: Regexp165284
-Node: Regexp Usage166738
-Node: Escape Sequences168775
-Node: Regexp Operators175017
-Node: Regexp Operator Details175502
-Ref: Regexp Operator Details-Footnote-1182866
-Node: Interval Expressions183013
-Ref: Interval Expressions-Footnote-1185188
-Node: Bracket Expressions185286
-Ref: table-char-classes187762
-Node: Leftmost Longest191089
-Node: Computed Regexps192392
-Node: GNU Regexp Operators195819
-Node: Case-sensitivity199497
-Ref: Case-sensitivity-Footnote-1202363
-Ref: Case-sensitivity-Footnote-2202598
-Node: Regexp Summary202706
-Node: Reading Files204172
-Node: Records206441
-Node: awk split records207516
-Node: gawk split records212216
-Ref: gawk split records-Footnote-1217290
-Node: Fields217327
-Node: Nonconstant Fields220068
-Ref: Nonconstant Fields-Footnote-1222304
-Node: Changing Fields222508
-Node: Field Separators228539
-Node: Default Field Splitting231237
-Node: Regexp Field Splitting232355
-Node: Single Character Fields236032
-Node: Command Line Field Separator237092
-Node: Full Line Fields240310
-Ref: Full Line Fields-Footnote-1241832
-Ref: Full Line Fields-Footnote-2241878
-Node: Field Splitting Summary241979
-Node: Constant Size244053
-Node: Fixed width data244785
-Node: Skipping intervening248252
-Node: Allowing trailing data249050
-Node: Fields with fixed data250087
-Node: Splitting By Content251605
-Ref: Splitting By Content-Footnote-1255441
-Node: More CSV255604
-Node: FS versus FPAT257219
-Node: Testing field creation258379
-Node: Multiple Line260004
-Node: Getline266281
-Node: Plain Getline268750
-Node: Getline/Variable271323
-Node: Getline/File272474
-Node: Getline/Variable/File273862
-Ref: Getline/Variable/File-Footnote-1275467
-Node: Getline/Pipe275555
-Node: Getline/Variable/Pipe278259
-Node: Getline/Coprocess279394
-Node: Getline/Variable/Coprocess280661
-Node: Getline Notes281403
-Node: Getline Summary284200
-Ref: table-getline-variants284624
-Node: Read Timeout285373
-Ref: Read Timeout-Footnote-1289289
-Node: Retrying Input289347
-Node: Command-line directories290546
-Node: Input Summary291452
-Node: Input Exercises294624
-Node: Printing295058
-Node: Print296892
-Node: Print Examples298349
-Node: Output Separators301129
-Node: OFMT303146
-Node: Printf304502
-Node: Basic Printf305287
-Node: Control Letters306861
-Node: Format Modifiers312023
-Node: Printf Examples318038
-Node: Redirection320524
-Node: Special FD327365
-Ref: Special FD-Footnote-1330533
-Node: Special Files330607
-Node: Other Inherited Files331224
-Node: Special Network332225
-Node: Special Caveats333085
-Node: Close Files And Pipes334034
-Ref: table-close-pipe-return-values340941
-Ref: Close Files And Pipes-Footnote-1341755
-Ref: Close Files And Pipes-Footnote-2341903
-Node: Nonfatal342055
-Node: Output Summary344393
-Node: Output Exercises345615
-Node: Expressions346294
-Node: Values347482
-Node: Constants348160
-Node: Scalar Constants348851
-Ref: Scalar Constants-Footnote-1351361
-Node: Nondecimal-numbers351611
-Node: Regexp Constants354612
-Node: Using Constant Regexps355138
-Node: Standard Regexp Constants355760
-Node: Strong Regexp Constants358948
-Node: Variables362663
-Node: Using Variables363320
-Node: Assignment Options365230
-Node: Conversion367701
-Node: Strings And Numbers368225
-Ref: Strings And Numbers-Footnote-1371288
-Node: Locale influences conversions371397
-Ref: table-locale-affects374155
-Node: All Operators374774
-Node: Arithmetic Ops375403
-Node: Concatenation378119
-Ref: Concatenation-Footnote-1380966
-Node: Assignment Ops381073
-Ref: table-assign-ops386064
-Node: Increment Ops387378
-Node: Truth Values and Conditions390838
-Node: Truth Values391912
-Node: Typing and Comparison392960
-Node: Variable Typing393780
-Ref: Variable Typing-Footnote-1400243
-Ref: Variable Typing-Footnote-2400315
-Node: Comparison Operators400392
-Ref: table-relational-ops400811
-Node: POSIX String Comparison404307
-Ref: POSIX String Comparison-Footnote-1406002
-Ref: POSIX String Comparison-Footnote-2406141
-Node: Boolean Ops406225
-Ref: Boolean Ops-Footnote-1410707
-Node: Conditional Exp410799
-Node: Function Calls412535
-Node: Precedence416412
-Node: Locales420071
-Node: Expressions Summary421703
-Node: Patterns and Actions424276
-Node: Pattern Overview425396
-Node: Regexp Patterns427073
-Node: Expression Patterns427615
-Node: Ranges431396
-Node: BEGIN/END434504
-Node: Using BEGIN/END435265
-Ref: Using BEGIN/END-Footnote-1438019
-Node: I/O And BEGIN/END438125
-Node: BEGINFILE/ENDFILE440438
-Node: Empty443669
-Node: Using Shell Variables443986
-Node: Action Overview446260
-Node: Statements448585
-Node: If Statement450433
-Node: While Statement451928
-Node: Do Statement453956
-Node: For Statement455104
-Node: Switch Statement458359
-Node: Break Statement460800
-Node: Continue Statement462892
-Node: Next Statement464719
-Node: Nextfile Statement467102
-Node: Exit Statement469791
-Node: Built-in Variables472194
-Node: User-modified473327
-Node: Auto-set481094
-Ref: Auto-set-Footnote-1497901
-Ref: Auto-set-Footnote-2498107
-Node: ARGC and ARGV498163
-Node: Pattern Action Summary502376
-Node: Arrays504806
-Node: Array Basics506135
-Node: Array Intro506979
-Ref: figure-array-elements508954
-Ref: Array Intro-Footnote-1511659
-Node: Reference to Elements511787
-Node: Assigning Elements514251
-Node: Array Example514742
-Node: Scanning an Array516696
-Node: Controlling Scanning519718
-Ref: Controlling Scanning-Footnote-1526174
-Node: Numeric Array Subscripts526490
-Node: Uninitialized Subscripts528674
-Node: Delete530293
-Ref: Delete-Footnote-1533045
-Node: Multidimensional533102
-Node: Multiscanning536197
-Node: Arrays of Arrays537788
-Node: Arrays Summary542556
-Node: Functions544649
-Node: Built-in545687
-Node: Calling Built-in546840
-Node: Boolean Functions548836
-Node: Numeric Functions549390
-Ref: Numeric Functions-Footnote-1553417
-Ref: Numeric Functions-Footnote-2554065
-Ref: Numeric Functions-Footnote-3554113
-Node: String Functions554385
-Ref: String Functions-Footnote-1579227
-Ref: String Functions-Footnote-2579355
-Ref: String Functions-Footnote-3579603
-Node: Gory Details579690
-Ref: table-sub-escapes581481
-Ref: table-sub-proposed583001
-Ref: table-posix-sub584365
-Ref: table-gensub-escapes585907
-Ref: Gory Details-Footnote-1586731
-Node: I/O Functions586885
-Ref: table-system-return-values593339
-Ref: I/O Functions-Footnote-1595420
-Ref: I/O Functions-Footnote-2595568
-Node: Time Functions595688
-Ref: Time Functions-Footnote-1606359
-Ref: Time Functions-Footnote-2606427
-Ref: Time Functions-Footnote-3606585
-Ref: Time Functions-Footnote-4606696
-Ref: Time Functions-Footnote-5606808
-Ref: Time Functions-Footnote-6607035
-Node: Bitwise Functions607301
-Ref: table-bitwise-ops607895
-Ref: Bitwise Functions-Footnote-1613959
-Ref: Bitwise Functions-Footnote-2614132
-Node: Type Functions614323
-Node: I18N Functions617743
-Node: User-defined619394
-Node: Definition Syntax620206
-Ref: Definition Syntax-Footnote-1625900
-Node: Function Example625971
-Ref: Function Example-Footnote-1628893
-Node: Function Calling628915
-Node: Calling A Function629503
-Node: Variable Scope630461
-Node: Pass By Value/Reference633455
-Node: Function Caveats636099
-Ref: Function Caveats-Footnote-1638146
-Node: Return Statement638266
-Node: Dynamic Typing641245
-Node: Indirect Calls642175
-Node: Functions Summary653102
-Node: Library Functions655807
-Ref: Library Functions-Footnote-1659414
-Ref: Library Functions-Footnote-2659557
-Node: Library Names659728
-Ref: Library Names-Footnote-1663395
-Ref: Library Names-Footnote-2663618
-Node: General Functions663704
-Node: Strtonum Function664886
-Node: Assert Function667908
-Node: Round Function671234
-Node: Cliff Random Function672774
-Node: Ordinal Functions673790
-Ref: Ordinal Functions-Footnote-1676853
-Ref: Ordinal Functions-Footnote-2677105
-Node: Join Function677315
-Ref: Join Function-Footnote-1679085
-Node: Getlocaltime Function679285
-Node: Readfile Function683027
-Node: Shell Quoting685004
-Node: Isnumeric Function686432
-Node: Data File Management687820
-Node: Filetrans Function688452
-Node: Rewind Function692548
-Node: File Checking694457
-Ref: File Checking-Footnote-1695791
-Node: Empty Files695992
-Node: Ignoring Assigns697971
-Node: Getopt Function699521
-Ref: Getopt Function-Footnote-1714818
-Node: Passwd Functions715018
-Ref: Passwd Functions-Footnote-1723857
-Node: Group Functions723945
-Ref: Group Functions-Footnote-1731843
-Node: Walking Arrays732050
-Node: Library Functions Summary735058
-Node: Library Exercises736464
-Node: Sample Programs736929
-Node: Running Examples737699
-Node: Clones738427
-Node: Cut Program739651
-Node: Egrep Program749791
-Node: Id Program758792
-Node: Split Program768727
-Ref: Split Program-Footnote-1778620
-Node: Tee Program778793
-Node: Uniq Program781583
-Node: Wc Program789171
-Node: Bytes vs. Characters789558
-Node: Using extensions791106
-Node: wc program791860
-Node: Miscellaneous Programs796725
-Node: Dupword Program797938
-Node: Alarm Program799968
-Node: Translate Program804823
-Ref: Translate Program-Footnote-1809388
-Node: Labels Program809658
-Ref: Labels Program-Footnote-1813009
-Node: Word Sorting813093
-Node: History Sorting817165
-Node: Extract Program819390
-Node: Simple Sed827403
-Node: Igawk Program830477
-Ref: Igawk Program-Footnote-1844808
-Ref: Igawk Program-Footnote-2845010
-Ref: Igawk Program-Footnote-3845132
-Node: Anagram Program845247
-Node: Signature Program848309
-Node: Programs Summary849556
-Node: Programs Exercises850770
-Ref: Programs Exercises-Footnote-1854900
-Node: Advanced Features854986
-Node: Nondecimal Data857117
-Node: Boolean Typed Values858715
-Node: Array Sorting860596
-Node: Controlling Array Traversal861301
-Ref: Controlling Array Traversal-Footnote-1869669
-Node: Array Sorting Functions869787
-Ref: Array Sorting Functions-Footnote-1875698
-Node: Two-way I/O875894
-Ref: Two-way I/O-Footnote-1883620
-Ref: Two-way I/O-Footnote-2883807
-Node: TCP/IP Networking883889
-Node: Profiling886965
-Node: Extension Philosophy896274
-Node: Advanced Features Summary897753
-Node: Internationalization899768
-Node: I18N and L10N901442
-Node: Explaining gettext902129
-Ref: Explaining gettext-Footnote-1908021
-Ref: Explaining gettext-Footnote-2908206
-Node: Programmer i18n908371
-Ref: Programmer i18n-Footnote-1913320
-Node: Translator i18n913369
-Node: String Extraction914163
-Ref: String Extraction-Footnote-1915295
-Node: Printf Ordering915381
-Ref: Printf Ordering-Footnote-1918167
-Node: I18N Portability918231
-Ref: I18N Portability-Footnote-1920687
-Node: I18N Example920750
-Ref: I18N Example-Footnote-1924025
-Ref: I18N Example-Footnote-2924098
-Node: Gawk I18N924207
-Node: I18N Summary924829
-Node: Debugger926170
-Node: Debugging927170
-Node: Debugging Concepts927611
-Node: Debugging Terms929420
-Node: Awk Debugging931995
-Ref: Awk Debugging-Footnote-1932940
-Node: Sample Debugging Session933072
-Node: Debugger Invocation933606
-Node: Finding The Bug934992
-Node: List of Debugger Commands941466
-Node: Breakpoint Control942799
-Node: Debugger Execution Control946493
-Node: Viewing And Changing Data949855
-Node: Execution Stack953396
-Node: Debugger Info955033
-Node: Miscellaneous Debugger Commands959104
-Node: Readline Support964166
-Node: Limitations965062
-Node: Debugging Summary967616
-Node: Namespaces968895
-Node: Global Namespace970006
-Node: Qualified Names971404
-Node: Default Namespace972403
-Node: Changing The Namespace973144
-Node: Naming Rules974758
-Node: Internal Name Management976606
-Node: Namespace Example977648
-Node: Namespace And Features980210
-Node: Namespace Summary981645
-Node: Arbitrary Precision Arithmetic983122
-Node: Computer Arithmetic984609
-Ref: table-numeric-ranges988375
-Ref: table-floating-point-ranges988869
-Ref: Computer Arithmetic-Footnote-1989528
-Node: Math Definitions989585
-Ref: table-ieee-formats992561
-Node: MPFR features993129
-Node: MPFR Deprecated993575
-Ref: MPFR Deprecated-Footnote-1994505
-Node: MPFR Intro994660
-Node: FP Math Caution996300
-Ref: FP Math Caution-Footnote-1997372
-Node: Inexactness of computations997741
-Node: Inexact representation998772
-Node: Comparing FP Values1000132
-Node: Errors accumulate1001373
-Node: Strange values1002829
-Ref: Strange values-Footnote-11005417
-Node: Getting Accuracy1005522
-Node: Try To Round1008232
-Node: Setting precision1009131
-Ref: table-predefined-precision-strings1009828
-Node: Setting the rounding mode1011659
-Ref: table-gawk-rounding-modes1012033
-Ref: Setting the rounding mode-Footnote-11015965
-Node: Arbitrary Precision Integers1016144
-Ref: Arbitrary Precision Integers-Footnote-11019319
-Node: Checking for MPFR1019468
-Node: POSIX Floating Point Problems1020942
-Ref: POSIX Floating Point Problems-Footnote-11025595
-Node: Floating point summary1025633
-Node: Dynamic Extensions1027823
-Node: Extension Intro1029376
-Node: Plugin License1030642
-Node: Extension Mechanism Outline1031439
-Ref: figure-load-extension1031878
-Ref: figure-register-new-function1033444
-Ref: figure-call-new-function1034537
-Node: Extension API Description1036600
-Node: Extension API Functions Introduction1038313
-Ref: table-api-std-headers1040149
-Node: General Data Types1044399
-Ref: General Data Types-Footnote-11053105
-Node: Memory Allocation Functions1053404
-Ref: Memory Allocation Functions-Footnote-11057905
-Node: Constructor Functions1058004
-Node: API Ownership of MPFR and GMP Values1061657
-Node: Registration Functions1063190
-Node: Extension Functions1063890
-Node: Exit Callback Functions1069212
-Node: Extension Version String1070462
-Node: Input Parsers1071125
-Node: Output Wrappers1083846
-Node: Two-way processors1088358
-Node: Printing Messages1090623
-Ref: Printing Messages-Footnote-11091794
-Node: Updating ERRNO1091947
-Node: Requesting Values1092686
-Ref: table-value-types-returned1093423
-Node: Accessing Parameters1094532
-Node: Symbol Table Access1095769
-Node: Symbol table by name1096281
-Ref: Symbol table by name-Footnote-11099306
-Node: Symbol table by cookie1099434
-Ref: Symbol table by cookie-Footnote-11103619
-Node: Cached values1103683
-Ref: Cached values-Footnote-11107219
-Node: Array Manipulation1107372
-Ref: Array Manipulation-Footnote-11108463
-Node: Array Data Types1108500
-Ref: Array Data Types-Footnote-11111158
-Node: Array Functions1111250
-Node: Flattening Arrays1116035
-Node: Creating Arrays1123011
-Node: Redirection API1127778
-Node: Extension API Variables1130611
-Node: Extension Versioning1131322
-Ref: gawk-api-version1131751
-Node: Extension GMP/MPFR Versioning1133483
-Node: Extension API Informational Variables1135111
-Node: Extension API Boilerplate1136184
-Node: Changes from API V11140158
-Node: Finding Extensions1141730
-Node: Extension Example1142289
-Node: Internal File Description1143087
-Node: Internal File Ops1147167
-Ref: Internal File Ops-Footnote-11158517
-Node: Using Internal File Ops1158657
-Ref: Using Internal File Ops-Footnote-11161040
-Node: Extension Samples1161314
-Node: Extension Sample File Functions1162843
-Node: Extension Sample Fnmatch1170492
-Node: Extension Sample Fork1171979
-Node: Extension Sample Inplace1173197
-Node: Extension Sample Ord1176823
-Node: Extension Sample Readdir1177659
-Ref: table-readdir-file-types1178548
-Node: Extension Sample Revout1179616
-Node: Extension Sample Rev2way1180205
-Node: Extension Sample Read write array1180945
-Node: Extension Sample Readfile1184110
-Node: Extension Sample Time1185205
-Node: Extension Sample API Tests1186957
-Node: gawkextlib1187449
-Node: Extension summary1190367
-Node: Extension Exercises1194069
-Node: Language History1195311
-Node: V7/SVR3.11196967
-Node: SVR41199119
-Node: POSIX1200553
-Node: BTL1201934
-Node: POSIX/GNU1202663
-Node: Feature History1208441
-Node: Common Extensions1225616
-Node: Ranges and Locales1226899
-Ref: Ranges and Locales-Footnote-11231515
-Ref: Ranges and Locales-Footnote-21231542
-Ref: Ranges and Locales-Footnote-31231777
-Node: Contributors1232000
-Node: History summary1237997
-Node: Installation1239377
-Node: Gawk Distribution1240321
-Node: Getting1240805
-Node: Extracting1241768
-Node: Distribution contents1243406
-Node: Unix Installation1250467
-Node: Quick Installation1251271
-Node: Compiling with MPFR1253691
-Node: Shell Startup Files1254381
-Node: Additional Configuration Options1255470
-Node: Configuration Philosophy1257785
-Node: Compiling from Git1260181
-Node: Building the Documentation1260736
-Node: Non-Unix Installation1262120
-Node: PC Installation1262580
-Node: PC Binary Installation1263418
-Node: PC Compiling1264291
-Node: PC Using1265408
-Node: Cygwin1268961
-Node: MSYS1270185
-Node: VMS Installation1270787
-Node: VMS Compilation1271506
-Ref: VMS Compilation-Footnote-11272735
-Node: VMS Dynamic Extensions1272793
-Node: VMS Installation Details1274478
-Node: VMS Running1276740
-Node: VMS GNV1281019
-Node: Bugs1281733
-Node: Bug definition1282645
-Node: Bug address1285581
-Node: Usenet1288769
-Node: Performance bugs1289958
-Node: Asking for help1292879
-Node: Maintainers1294846
-Node: Other Versions1296040
-Node: Installation summary1304310
-Node: Notes1305674
-Node: Compatibility Mode1306468
-Node: Additions1307250
-Node: Accessing The Source1308175
-Node: Adding Code1309612
-Node: New Ports1316427
-Node: Derived Files1320802
-Ref: Derived Files-Footnote-11326462
-Ref: Derived Files-Footnote-21326497
-Ref: Derived Files-Footnote-31327095
-Node: Future Extensions1327209
-Node: Implementation Limitations1327867
-Node: Extension Design1329077
-Node: Old Extension Problems1330221
-Ref: Old Extension Problems-Footnote-11331739
-Node: Extension New Mechanism Goals1331796
-Ref: Extension New Mechanism Goals-Footnote-11335160
-Node: Extension Other Design Decisions1335349
-Node: Extension Future Growth1337462
-Node: Notes summary1338068
-Node: Basic Concepts1339226
-Node: Basic High Level1339907
-Ref: figure-general-flow1340189
-Ref: figure-process-flow1340875
-Ref: Basic High Level-Footnote-11344177
-Node: Basic Data Typing1344362
-Node: Glossary1347690
-Node: Copying1379577
-Node: GNU Free Documentation License1417120
-Node: Index1442240
+Node: Foreword345791
+Node: Foreword450233
+Node: Preface51765
+Ref: Preface-Footnote-154624
+Ref: Preface-Footnote-254733
+Ref: Preface-Footnote-354967
+Node: History55109
+Node: Names57461
+Ref: Names-Footnote-158565
+Node: This Manual58712
+Ref: This Manual-Footnote-165351
+Node: Conventions65451
+Node: Manual History67820
+Ref: Manual History-Footnote-170817
+Ref: Manual History-Footnote-270858
+Node: How To Contribute70932
+Node: Acknowledgments71854
+Node: Getting Started76791
+Node: Running gawk79230
+Node: One-shot80420
+Node: Read Terminal81683
+Node: Long83676
+Node: Executable Scripts85189
+Ref: Executable Scripts-Footnote-187822
+Node: Comments87925
+Node: Quoting90409
+Node: DOS Quoting95935
+Node: Sample Data Files97991
+Node: Very Simple100586
+Node: Two Rules106688
+Node: More Complex108573
+Node: Statements/Lines110905
+Ref: Statements/Lines-Footnote-1115389
+Node: Other Features115654
+Node: When116590
+Ref: When-Footnote-1118344
+Node: Intro Summary118409
+Node: Invoking Gawk119293
+Node: Command Line120807
+Node: Options121605
+Ref: Options-Footnote-1139789
+Ref: Options-Footnote-2140020
+Node: Other Arguments140045
+Node: Naming Standard Input144056
+Node: Environment Variables145266
+Node: AWKPATH Variable145824
+Ref: AWKPATH Variable-Footnote-1149236
+Ref: AWKPATH Variable-Footnote-2149270
+Node: AWKLIBPATH Variable149641
+Ref: AWKLIBPATH Variable-Footnote-1151338
+Node: Other Environment Variables151713
+Node: Exit Status155801
+Node: Include Files156478
+Node: Loading Shared Libraries160168
+Node: Obsolete161596
+Node: Undocumented162216
+Node: Invoking Summary162513
+Node: Regexp165354
+Node: Regexp Usage166808
+Node: Escape Sequences168845
+Node: Regexp Operators175087
+Node: Regexp Operator Details175572
+Ref: Regexp Operator Details-Footnote-1182936
+Node: Interval Expressions183083
+Ref: Interval Expressions-Footnote-1185258
+Node: Bracket Expressions185356
+Ref: table-char-classes187832
+Node: Leftmost Longest191159
+Node: Computed Regexps192462
+Node: GNU Regexp Operators195889
+Node: Case-sensitivity199567
+Ref: Case-sensitivity-Footnote-1202433
+Ref: Case-sensitivity-Footnote-2202668
+Node: Regexp Summary202776
+Node: Reading Files204242
+Node: Records206511
+Node: awk split records207586
+Node: gawk split records212286
+Ref: gawk split records-Footnote-1217360
+Node: Fields217397
+Node: Nonconstant Fields220138
+Ref: Nonconstant Fields-Footnote-1222374
+Node: Changing Fields222578
+Node: Field Separators228609
+Node: Default Field Splitting231307
+Node: Regexp Field Splitting232425
+Node: Single Character Fields236102
+Node: Command Line Field Separator237162
+Node: Full Line Fields240380
+Ref: Full Line Fields-Footnote-1241902
+Ref: Full Line Fields-Footnote-2241948
+Node: Field Splitting Summary242049
+Node: Constant Size244123
+Node: Fixed width data244855
+Node: Skipping intervening248322
+Node: Allowing trailing data249120
+Node: Fields with fixed data250157
+Node: Splitting By Content251675
+Ref: Splitting By Content-Footnote-1255511
+Node: More CSV255674
+Node: FS versus FPAT257289
+Node: Testing field creation258449
+Node: Multiple Line260074
+Node: Getline266351
+Node: Plain Getline268820
+Node: Getline/Variable271393
+Node: Getline/File272544
+Node: Getline/Variable/File273932
+Ref: Getline/Variable/File-Footnote-1275537
+Node: Getline/Pipe275625
+Node: Getline/Variable/Pipe278329
+Node: Getline/Coprocess279464
+Node: Getline/Variable/Coprocess280731
+Node: Getline Notes281473
+Node: Getline Summary284270
+Ref: table-getline-variants284694
+Node: Read Timeout285443
+Ref: Read Timeout-Footnote-1289359
+Node: Retrying Input289417
+Node: Command-line directories290616
+Node: Input Summary291522
+Node: Input Exercises294694
+Node: Printing295128
+Node: Print296962
+Node: Print Examples298419
+Node: Output Separators301199
+Node: OFMT303216
+Node: Printf304572
+Node: Basic Printf305357
+Node: Control Letters306931
+Node: Format Modifiers312093
+Node: Printf Examples318108
+Node: Redirection320594
+Node: Special FD327435
+Ref: Special FD-Footnote-1330603
+Node: Special Files330677
+Node: Other Inherited Files331294
+Node: Special Network332295
+Node: Special Caveats333155
+Node: Close Files And Pipes334104
+Ref: table-close-pipe-return-values341011
+Ref: Close Files And Pipes-Footnote-1341825
+Ref: Close Files And Pipes-Footnote-2341973
+Node: Nonfatal342125
+Node: Output Summary344463
+Node: Output Exercises345685
+Node: Expressions346364
+Node: Values347552
+Node: Constants348230
+Node: Scalar Constants348921
+Ref: Scalar Constants-Footnote-1351431
+Node: Nondecimal-numbers351681
+Node: Regexp Constants354682
+Node: Using Constant Regexps355208
+Node: Standard Regexp Constants355830
+Node: Strong Regexp Constants359018
+Node: Variables362733
+Node: Using Variables363390
+Node: Assignment Options365300
+Node: Conversion367771
+Node: Strings And Numbers368295
+Ref: Strings And Numbers-Footnote-1371358
+Node: Locale influences conversions371467
+Ref: table-locale-affects374225
+Node: All Operators374844
+Node: Arithmetic Ops375473
+Node: Concatenation378189
+Ref: Concatenation-Footnote-1381036
+Node: Assignment Ops381143
+Ref: table-assign-ops386134
+Node: Increment Ops387448
+Node: Truth Values and Conditions390908
+Node: Truth Values391982
+Node: Typing and Comparison393030
+Node: Variable Typing393850
+Ref: Variable Typing-Footnote-1400313
+Ref: Variable Typing-Footnote-2400385
+Node: Comparison Operators400462
+Ref: table-relational-ops400881
+Node: POSIX String Comparison404377
+Ref: POSIX String Comparison-Footnote-1406072
+Ref: POSIX String Comparison-Footnote-2406211
+Node: Boolean Ops406295
+Ref: Boolean Ops-Footnote-1410777
+Node: Conditional Exp410869
+Node: Function Calls412605
+Node: Precedence416482
+Node: Locales420141
+Node: Expressions Summary421773
+Node: Patterns and Actions424346
+Node: Pattern Overview425466
+Node: Regexp Patterns427143
+Node: Expression Patterns427685
+Node: Ranges431466
+Node: BEGIN/END434574
+Node: Using BEGIN/END435335
+Ref: Using BEGIN/END-Footnote-1438089
+Node: I/O And BEGIN/END438195
+Node: BEGINFILE/ENDFILE440508
+Node: Empty443739
+Node: Using Shell Variables444056
+Node: Action Overview446330
+Node: Statements448655
+Node: If Statement450503
+Node: While Statement451998
+Node: Do Statement454026
+Node: For Statement455174
+Node: Switch Statement458429
+Node: Break Statement460870
+Node: Continue Statement462962
+Node: Next Statement464789
+Node: Nextfile Statement467172
+Node: Exit Statement469861
+Node: Built-in Variables472264
+Node: User-modified473397
+Node: Auto-set481164
+Ref: Auto-set-Footnote-1497971
+Ref: Auto-set-Footnote-2498177
+Node: ARGC and ARGV498233
+Node: Pattern Action Summary502446
+Node: Arrays504876
+Node: Array Basics506205
+Node: Array Intro507049
+Ref: figure-array-elements509024
+Ref: Array Intro-Footnote-1511729
+Node: Reference to Elements511857
+Node: Assigning Elements514321
+Node: Array Example514812
+Node: Scanning an Array516766
+Node: Controlling Scanning519788
+Ref: Controlling Scanning-Footnote-1526244
+Node: Numeric Array Subscripts526560
+Node: Uninitialized Subscripts528744
+Node: Delete530363
+Ref: Delete-Footnote-1533115
+Node: Multidimensional533172
+Node: Multiscanning536267
+Node: Arrays of Arrays537858
+Node: Arrays Summary542626
+Node: Functions544719
+Node: Built-in545757
+Node: Calling Built-in546910
+Node: Boolean Functions548906
+Node: Numeric Functions549460
+Ref: Numeric Functions-Footnote-1553487
+Ref: Numeric Functions-Footnote-2554135
+Ref: Numeric Functions-Footnote-3554183
+Node: String Functions554455
+Ref: String Functions-Footnote-1579297
+Ref: String Functions-Footnote-2579425
+Ref: String Functions-Footnote-3579673
+Node: Gory Details579760
+Ref: table-sub-escapes581551
+Ref: table-sub-proposed583071
+Ref: table-posix-sub584435
+Ref: table-gensub-escapes585977
+Ref: Gory Details-Footnote-1586801
+Node: I/O Functions586955
+Ref: table-system-return-values593409
+Ref: I/O Functions-Footnote-1595490
+Ref: I/O Functions-Footnote-2595638
+Node: Time Functions595758
+Ref: Time Functions-Footnote-1606429
+Ref: Time Functions-Footnote-2606497
+Ref: Time Functions-Footnote-3606655
+Ref: Time Functions-Footnote-4606766
+Ref: Time Functions-Footnote-5606878
+Ref: Time Functions-Footnote-6607105
+Node: Bitwise Functions607371
+Ref: table-bitwise-ops607965
+Ref: Bitwise Functions-Footnote-1614029
+Ref: Bitwise Functions-Footnote-2614202
+Node: Type Functions614393
+Node: I18N Functions617813
+Node: User-defined619464
+Node: Definition Syntax620276
+Ref: Definition Syntax-Footnote-1625970
+Node: Function Example626041
+Ref: Function Example-Footnote-1628963
+Node: Function Calling628985
+Node: Calling A Function629573
+Node: Variable Scope630531
+Node: Pass By Value/Reference633525
+Node: Function Caveats636169
+Ref: Function Caveats-Footnote-1638216
+Node: Return Statement638336
+Node: Dynamic Typing641315
+Node: Indirect Calls642245
+Node: Functions Summary653172
+Node: Library Functions655877
+Ref: Library Functions-Footnote-1659484
+Ref: Library Functions-Footnote-2659627
+Node: Library Names659798
+Ref: Library Names-Footnote-1663465
+Ref: Library Names-Footnote-2663688
+Node: General Functions663774
+Node: Strtonum Function664956
+Node: Assert Function667978
+Node: Round Function671304
+Node: Cliff Random Function672844
+Node: Ordinal Functions673860
+Ref: Ordinal Functions-Footnote-1676923
+Ref: Ordinal Functions-Footnote-2677175
+Node: Join Function677385
+Ref: Join Function-Footnote-1679155
+Node: Getlocaltime Function679355
+Node: Readfile Function683097
+Node: Shell Quoting685074
+Node: Isnumeric Function686502
+Node: Data File Management687890
+Node: Filetrans Function688522
+Node: Rewind Function692618
+Node: File Checking694527
+Ref: File Checking-Footnote-1695861
+Node: Empty Files696062
+Node: Ignoring Assigns698041
+Node: Getopt Function699591
+Ref: Getopt Function-Footnote-1714888
+Node: Passwd Functions715088
+Ref: Passwd Functions-Footnote-1723927
+Node: Group Functions724015
+Ref: Group Functions-Footnote-1731913
+Node: Walking Arrays732120
+Node: Library Functions Summary735128
+Node: Library Exercises736534
+Node: Sample Programs736999
+Node: Running Examples737769
+Node: Clones738497
+Node: Cut Program739721
+Node: Egrep Program749861
+Node: Id Program758862
+Node: Split Program768797
+Ref: Split Program-Footnote-1778690
+Node: Tee Program778863
+Node: Uniq Program781653
+Node: Wc Program789241
+Node: Bytes vs. Characters789628
+Node: Using extensions791176
+Node: wc program791930
+Node: Miscellaneous Programs796795
+Node: Dupword Program798008
+Node: Alarm Program800038
+Node: Translate Program804893
+Ref: Translate Program-Footnote-1809458
+Node: Labels Program809728
+Ref: Labels Program-Footnote-1813079
+Node: Word Sorting813163
+Node: History Sorting817235
+Node: Extract Program819460
+Node: Simple Sed827473
+Node: Igawk Program830547
+Ref: Igawk Program-Footnote-1844878
+Ref: Igawk Program-Footnote-2845080
+Ref: Igawk Program-Footnote-3845202
+Node: Anagram Program845317
+Node: Signature Program848379
+Node: Programs Summary849626
+Node: Programs Exercises850840
+Ref: Programs Exercises-Footnote-1854970
+Node: Advanced Features855056
+Node: Nondecimal Data857453
+Node: Boolean Typed Values859051
+Node: Array Sorting860932
+Node: Controlling Array Traversal861637
+Ref: Controlling Array Traversal-Footnote-1870005
+Node: Array Sorting Functions870123
+Ref: Array Sorting Functions-Footnote-1876034
+Node: Two-way I/O876230
+Ref: Two-way I/O-Footnote-1883956
+Ref: Two-way I/O-Footnote-2884143
+Node: TCP/IP Networking884225
+Node: Profiling887301
+Node: Persistent Memory896607
+Ref: Persistent Memory-Footnote-1898730
+Node: Extension Philosophy898857
+Node: Advanced Features Summary900344
+Node: Internationalization902359
+Node: I18N and L10N904033
+Node: Explaining gettext904720
+Ref: Explaining gettext-Footnote-1910612
+Ref: Explaining gettext-Footnote-2910797
+Node: Programmer i18n910962
+Ref: Programmer i18n-Footnote-1915911
+Node: Translator i18n915960
+Node: String Extraction916754
+Ref: String Extraction-Footnote-1917886
+Node: Printf Ordering917972
+Ref: Printf Ordering-Footnote-1920758
+Node: I18N Portability920822
+Ref: I18N Portability-Footnote-1923278
+Node: I18N Example923341
+Ref: I18N Example-Footnote-1926616
+Ref: I18N Example-Footnote-2926689
+Node: Gawk I18N926798
+Node: I18N Summary927420
+Node: Debugger928761
+Node: Debugging929761
+Node: Debugging Concepts930202
+Node: Debugging Terms932011
+Node: Awk Debugging934586
+Ref: Awk Debugging-Footnote-1935531
+Node: Sample Debugging Session935663
+Node: Debugger Invocation936197
+Node: Finding The Bug937583
+Node: List of Debugger Commands944057
+Node: Breakpoint Control945390
+Node: Debugger Execution Control949084
+Node: Viewing And Changing Data952446
+Node: Execution Stack955987
+Node: Debugger Info957624
+Node: Miscellaneous Debugger Commands961695
+Node: Readline Support966757
+Node: Limitations967653
+Node: Debugging Summary970207
+Node: Namespaces971486
+Node: Global Namespace972597
+Node: Qualified Names973995
+Node: Default Namespace974994
+Node: Changing The Namespace975735
+Node: Naming Rules977349
+Node: Internal Name Management979197
+Node: Namespace Example980239
+Node: Namespace And Features982801
+Node: Namespace Summary984236
+Node: Arbitrary Precision Arithmetic985713
+Node: Computer Arithmetic987200
+Ref: table-numeric-ranges990966
+Ref: table-floating-point-ranges991460
+Ref: Computer Arithmetic-Footnote-1992119
+Node: Math Definitions992176
+Ref: table-ieee-formats995152
+Node: MPFR features995720
+Node: MPFR Deprecated996166
+Ref: MPFR Deprecated-Footnote-1997096
+Node: MPFR Intro997251
+Node: FP Math Caution998891
+Ref: FP Math Caution-Footnote-1999963
+Node: Inexactness of computations1000332
+Node: Inexact representation1001363
+Node: Comparing FP Values1002723
+Node: Errors accumulate1003964
+Node: Strange values1005420
+Ref: Strange values-Footnote-11008008
+Node: Getting Accuracy1008113
+Node: Try To Round1010823
+Node: Setting precision1011722
+Ref: table-predefined-precision-strings1012419
+Node: Setting the rounding mode1014250
+Ref: table-gawk-rounding-modes1014624
+Ref: Setting the rounding mode-Footnote-11018556
+Node: Arbitrary Precision Integers1018735
+Ref: Arbitrary Precision Integers-Footnote-11021910
+Node: Checking for MPFR1022059
+Node: POSIX Floating Point Problems1023533
+Ref: POSIX Floating Point Problems-Footnote-11028186
+Node: Floating point summary1028224
+Node: Dynamic Extensions1030414
+Node: Extension Intro1031967
+Node: Plugin License1033233
+Node: Extension Mechanism Outline1034030
+Ref: figure-load-extension1034469
+Ref: figure-register-new-function1036035
+Ref: figure-call-new-function1037128
+Node: Extension API Description1039191
+Node: Extension API Functions Introduction1040904
+Ref: table-api-std-headers1042740
+Node: General Data Types1046990
+Ref: General Data Types-Footnote-11055696
+Node: Memory Allocation Functions1055995
+Ref: Memory Allocation Functions-Footnote-11060496
+Node: Constructor Functions1060595
+Node: API Ownership of MPFR and GMP Values1064248
+Node: Registration Functions1065781
+Node: Extension Functions1066481
+Node: Exit Callback Functions1071803
+Node: Extension Version String1073053
+Node: Input Parsers1073716
+Node: Output Wrappers1086437
+Node: Two-way processors1090949
+Node: Printing Messages1093214
+Ref: Printing Messages-Footnote-11094385
+Node: Updating ERRNO1094538
+Node: Requesting Values1095277
+Ref: table-value-types-returned1096014
+Node: Accessing Parameters1097123
+Node: Symbol Table Access1098360
+Node: Symbol table by name1098872
+Ref: Symbol table by name-Footnote-11101897
+Node: Symbol table by cookie1102025
+Ref: Symbol table by cookie-Footnote-11106210
+Node: Cached values1106274
+Ref: Cached values-Footnote-11109810
+Node: Array Manipulation1109963
+Ref: Array Manipulation-Footnote-11111054
+Node: Array Data Types1111091
+Ref: Array Data Types-Footnote-11113749
+Node: Array Functions1113841
+Node: Flattening Arrays1118626
+Node: Creating Arrays1125602
+Node: Redirection API1130369
+Node: Extension API Variables1133202
+Node: Extension Versioning1133913
+Ref: gawk-api-version1134342
+Node: Extension GMP/MPFR Versioning1136074
+Node: Extension API Informational Variables1137702
+Node: Extension API Boilerplate1138775
+Node: Changes from API V11142749
+Node: Finding Extensions1144321
+Node: Extension Example1144880
+Node: Internal File Description1145678
+Node: Internal File Ops1149758
+Ref: Internal File Ops-Footnote-11161108
+Node: Using Internal File Ops1161248
+Ref: Using Internal File Ops-Footnote-11163631
+Node: Extension Samples1163905
+Node: Extension Sample File Functions1165434
+Node: Extension Sample Fnmatch1173083
+Node: Extension Sample Fork1174570
+Node: Extension Sample Inplace1175788
+Node: Extension Sample Ord1179414
+Node: Extension Sample Readdir1180250
+Ref: table-readdir-file-types1181139
+Node: Extension Sample Revout1182207
+Node: Extension Sample Rev2way1182796
+Node: Extension Sample Read write array1183536
+Node: Extension Sample Readfile1186701
+Node: Extension Sample Time1187796
+Node: Extension Sample API Tests1189548
+Node: gawkextlib1190040
+Node: Extension summary1192958
+Node: Extension Exercises1196660
+Node: Language History1197902
+Node: V7/SVR3.11199558
+Node: SVR41201710
+Node: POSIX1203144
+Node: BTL1204525
+Node: POSIX/GNU1205254
+Node: Feature History1211032
+Node: Common Extensions1228207
+Node: Ranges and Locales1229490
+Ref: Ranges and Locales-Footnote-11234106
+Ref: Ranges and Locales-Footnote-21234133
+Ref: Ranges and Locales-Footnote-31234368
+Node: Contributors1234591
+Node: History summary1240588
+Node: Installation1241968
+Node: Gawk Distribution1242912
+Node: Getting1243396
+Node: Extracting1244359
+Node: Distribution contents1245997
+Node: Unix Installation1253058
+Node: Quick Installation1253862
+Node: Compiling with MPFR1256282
+Node: Shell Startup Files1256972
+Node: Additional Configuration Options1258061
+Node: Configuration Philosophy1260376
+Node: Compiling from Git1262772
+Node: Building the Documentation1263327
+Node: Non-Unix Installation1264711
+Node: PC Installation1265171
+Node: PC Binary Installation1266009
+Node: PC Compiling1266882
+Node: PC Using1267999
+Node: Cygwin1271552
+Node: MSYS1272776
+Node: VMS Installation1273378
+Node: VMS Compilation1274097
+Ref: VMS Compilation-Footnote-11275326
+Node: VMS Dynamic Extensions1275384
+Node: VMS Installation Details1277069
+Node: VMS Running1279331
+Node: VMS GNV1283610
+Node: Bugs1284324
+Node: Bug definition1285236
+Node: Bug address1288172
+Node: Usenet1291360
+Node: Performance bugs1292549
+Node: Asking for help1295470
+Node: Maintainers1297437
+Node: Other Versions1298631
+Node: Installation summary1306901
+Node: Notes1308265
+Node: Compatibility Mode1309059
+Node: Additions1309841
+Node: Accessing The Source1310766
+Node: Adding Code1312203
+Node: New Ports1319018
+Node: Derived Files1323393
+Ref: Derived Files-Footnote-11329053
+Ref: Derived Files-Footnote-21329088
+Ref: Derived Files-Footnote-31329686
+Node: Future Extensions1329800
+Node: Implementation Limitations1330458
+Node: Extension Design1331668
+Node: Old Extension Problems1332812
+Ref: Old Extension Problems-Footnote-11334330
+Node: Extension New Mechanism Goals1334387
+Ref: Extension New Mechanism Goals-Footnote-11337751
+Node: Extension Other Design Decisions1337940
+Node: Extension Future Growth1340053
+Node: Notes summary1340659
+Node: Basic Concepts1341817
+Node: Basic High Level1342498
+Ref: figure-general-flow1342780
+Ref: figure-process-flow1343466
+Ref: Basic High Level-Footnote-11346768
+Node: Basic Data Typing1346953
+Node: Glossary1350281
+Node: Copying1382168
+Node: GNU Free Documentation License1419711
+Node: Index1444831
 
 End Tag Table
 
diff --git a/doc/gawk.texi b/doc/gawk.texi
index d5d3651f..22949248 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -878,6 +878,7 @@ particular records in a file and perform operations upon 
them.
 * TCP/IP Networking::                   Using @command{gawk} for network
                                         programming.
 * Profiling::                           Profiling your @command{awk} programs.
+* Persistent Memory::                   Preserving data between runs.
 * Extension Philosophy::                What should be built-in and what
                                         should not.
 * Advanced Features Summary::           Summary of advanced features.
@@ -29583,9 +29584,13 @@ programs.
 Then, @command{gawk}'s special features for sorting arrays are presented.
 Next, two-way I/O, discussed briefly in earlier parts of this
 @value{DOCUMENT}, is described in full detail, along with the basics
-of TCP/IP networking.  Finally, we see how @command{gawk}
+of TCP/IP networking.  We then see how @command{gawk}
 can @dfn{profile} an @command{awk} program, making it possible to tune
 it for performance.
+Next, we present an experimental feature that allows you to preserve
+the values of @command{awk} variables and arrays between runs of 
@command{gawk}.
+Finally, we discuss the philosophy behind @command{gawk}'s extension
+mechanism.
 
 @c FULLXREF ON
 Additional advanced features are discussed in separate @value{CHAPTER}s of 
their
@@ -29620,6 +29625,7 @@ discusses the ability to dynamically add new built-in 
functions to
 * Two-way I/O::                 Two-way communications with another process.
 * TCP/IP Networking::           Using @command{gawk} for network programming.
 * Profiling::                   Profiling your @command{awk} programs.
+* Persistent Memory::           Preserving data between runs.
 * Extension Philosophy::        What should be built-in and what should not.
 * Advanced Features Summary::   Summary of advanced features.
 @end menu
@@ -30954,6 +30960,72 @@ Profiling and pretty-printing also preserve the 
original format of numeric
 constants; if you used an octal or hexadecimal value in your source
 code, it will appear that way in the output.
 
+@node Persistent Memory
+@section Preserving Data Between Runs
+
+Starting with @value{PVERSION} 5.2, @command{gawk} supports
+@dfn{persistent memory}.  This experimental feature stores the values of all 
of @command{gawk}'s
+variables and arrays in a large, sparse file in the filesystem.  When 
persistent memory
+is not in use (the normal case), @command{gawk}'s data resides in ephemeral 
system
+memory.
+
+Persistent memory is enabled on systems supporting the @code{mmap()} and 
@code{munmap()}
+system calls.  @command{gawk} must be compiled as a non-PIE (Position 
Independent Executable)
+binary, since the persistent store ends up holding pointers to functions held 
within
+the @command{gawk} executable.  This also means that to use the feature, you 
must use
+the same executable from run to run.
+
+As of this writing, persistent memory has only been tested on GNU/Linux 
systems. On others,
+your mileage may vary, and/or you may need to investigate how to make it work 
for you.
+
+To use persistent memory, follow these steps:
+
+@enumerate 1
+@item
+Create a new, empty sparse file of the desired size. For example, four 
gigabytes.
+On a GNU/Linux system, you can use the @command{truncate} command:
+
+@example
+$ @kbd{truncate -s 4G data.pma}
+@end example
+
+@item
+Provide the path to the data file in the @env{GAWK_PERSIST_FILE} environment 
variable.
+This is best done by placing the value in the environment just for the run of 
@command{gawk},
+like so:
+
+@example
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+1
+@end example
+
+@item
+Use the same data file in subsequent runs to use the preserved data values:
+
+@example
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+2
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+3
+@end example
+
+@noindent
+As shown, in subsequent runs using the same data file, the values of 
@command{gawk}'s
+variables are preserved.
+
+@end enumerate
+
+Interestingly, the program that you execute need not be the same from run to 
run;
+the persistent store only maintains the values of variables and arrays, not
+the totality of @command{gawk}'s internal state.
+
+FIXME: Add links here and more verbiage.
+
+As noted earlier, support for persistent memory is @emph{experimental}.  If it
+becomes burdensome,@footnote{Meaning, there are too many bug reports, or
+too many strange differences in behavior from when @command{gawk} is run
+normally.} then the feature will be removed.
+
 @node Extension Philosophy
 @section Builtin Features versus Extensions
 
@@ -31041,6 +31113,10 @@ you tune them more easily.  Sending the @code{USR1} 
signal while profiling cause
 @item
 You can also just ``pretty-print'' the program.
 
+@item
+Persistent memory allows you to preserve the values of variables and arrays
+between runs of @command{gawk}.  This feature is currently experimental.
+
 @item
 New features should be developed using the extension mechanism if possible;
 they should be added to the core interpreter only as a last resort.
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 198f3700..86562cef 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -873,6 +873,7 @@ particular records in a file and perform operations upon 
them.
 * TCP/IP Networking::                   Using @command{gawk} for network
                                         programming.
 * Profiling::                           Profiling your @command{awk} programs.
+* Persistent Memory::                   Preserving data between runs.
 * Extension Philosophy::                What should be built-in and what
                                         should not.
 * Advanced Features Summary::           Summary of advanced features.
@@ -28465,9 +28466,13 @@ programs.
 Then, @command{gawk}'s special features for sorting arrays are presented.
 Next, two-way I/O, discussed briefly in earlier parts of this
 @value{DOCUMENT}, is described in full detail, along with the basics
-of TCP/IP networking.  Finally, we see how @command{gawk}
+of TCP/IP networking.  We then see how @command{gawk}
 can @dfn{profile} an @command{awk} program, making it possible to tune
 it for performance.
+Next, we present an experimental feature that allows you to preserve
+the values of @command{awk} variables and arrays between runs of 
@command{gawk}.
+Finally, we discuss the philosophy behind @command{gawk}'s extension
+mechanism.
 
 @c FULLXREF ON
 Additional advanced features are discussed in separate @value{CHAPTER}s of 
their
@@ -28502,6 +28507,7 @@ discusses the ability to dynamically add new built-in 
functions to
 * Two-way I/O::                 Two-way communications with another process.
 * TCP/IP Networking::           Using @command{gawk} for network programming.
 * Profiling::                   Profiling your @command{awk} programs.
+* Persistent Memory::           Preserving data between runs.
 * Extension Philosophy::        What should be built-in and what should not.
 * Advanced Features Summary::   Summary of advanced features.
 @end menu
@@ -29836,6 +29842,72 @@ Profiling and pretty-printing also preserve the 
original format of numeric
 constants; if you used an octal or hexadecimal value in your source
 code, it will appear that way in the output.
 
+@node Persistent Memory
+@section Preserving Data Between Runs
+
+Starting with @value{PVERSION} 5.2, @command{gawk} supports
+@dfn{persistent memory}.  This experimental feature stores the values of all 
of @command{gawk}'s
+variables and arrays in a large, sparse file in the filesystem.  When 
persistent memory
+is not in use (the normal case), @command{gawk}'s data resides in ephemeral 
system
+memory.
+
+Persistent memory is enabled on systems supporting the @code{mmap()} and 
@code{munmap()}
+system calls.  @command{gawk} must be compiled as a non-PIE (Position 
Independent Executable)
+binary, since the persistent store ends up holding pointers to functions held 
within
+the @command{gawk} executable.  This also means that to use the feature, you 
must use
+the same executable from run to run.
+
+As of this writing, persistent memory has only been tested on GNU/Linux 
systems. On others,
+your mileage may vary, and/or you may need to investigate how to make it work 
for you.
+
+To use persistent memory, follow these steps:
+
+@enumerate 1
+@item
+Create a new, empty sparse file of the desired size. For example, four 
gigabytes.
+On a GNU/Linux system, you can use the @command{truncate} command:
+
+@example
+$ @kbd{truncate -s 4G data.pma}
+@end example
+
+@item
+Provide the path to the data file in the @env{GAWK_PERSIST_FILE} environment 
variable.
+This is best done by placing the value in the environment just for the run of 
@command{gawk},
+like so:
+
+@example
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+1
+@end example
+
+@item
+Use the same data file in subsequent runs to use the preserved data values:
+
+@example
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+2
+$ @kbd{GAWK_PERSIST_FILE=data.pma ./gawk 'BEGIN @{ print ++i @}'}
+3
+@end example
+
+@noindent
+As shown, in subsequent runs using the same data file, the values of 
@command{gawk}'s
+variables are preserved.
+
+@end enumerate
+
+Interestingly, the program that you execute need not be the same from run to 
run;
+the persistent store only maintains the values of variables and arrays, not
+the totality of @command{gawk}'s internal state.
+
+FIXME: Add links here and more verbiage.
+
+As noted earlier, support for persistent memory is @emph{experimental}.  If it
+becomes burdensome,@footnote{Meaning, there are too many bug reports, or
+too many strange differences in behavior from when @command{gawk} is run
+normally.} then the feature will be removed.
+
 @node Extension Philosophy
 @section Builtin Features versus Extensions
 
@@ -29923,6 +29995,10 @@ you tune them more easily.  Sending the @code{USR1} 
signal while profiling cause
 @item
 You can also just ``pretty-print'' the program.
 
+@item
+Persistent memory allows you to preserve the values of variables and arrays
+between runs of @command{gawk}.  This feature is currently experimental.
+
 @item
 New features should be developed using the extension mechanism if possible;
 they should be added to the core interpreter only as a last resort.
diff --git a/m4/ChangeLog b/m4/ChangeLog
index dde3beec..b9a5f7b2 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2022-06-13         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * pma.m4: Put -no-pie inside check for Linux.
+
 2022-06-10         Arnold D. Robbins     <arnold@skeeve.com>
 
        * pma.m4: Add -no-pie to LDFLAGS for persistent malloc.
diff --git a/m4/pma.m4 b/m4/pma.m4
index bf25d9a1..ed9eb7dd 100644
--- a/m4/pma.m4
+++ b/m4/pma.m4
@@ -13,8 +13,13 @@ AC_DEFUN([GAWK_USE_PERSISTENT_MALLOC],
   then
        AC_DEFINE(USE_PERSISTENT_MALLOC, 1, [Define to 1 if we can use the pma 
allocator])
        use_persistent_malloc=yes
-       LDFLAGS="${LDFLAGS} -no-pie"
-       export LDFLAGS
+       case $host_os in
+       linux-*)
+               LDFLAGS="${LDFLAGS} -no-pie"
+               export LDFLAGS
+               ;;
+       # Other OS's go here...
+       esac
   else
        use_persistent_malloc=no
   fi
diff --git a/main.c b/main.c
index 3c136bfa..1abac2a7 100644
--- a/main.c
+++ b/main.c
@@ -237,6 +237,10 @@ for PMA */
        }
 
        using_persistent_malloc = (persist_file != NULL);
+#ifndef USE_PERSISTENT_MALLOC
+       if (using_persistent_malloc)
+               warning(_("persistent memory is not supported"));
+#endif
 
        /* do these checks early */
        if (getenv("TIDYMEM") != NULL)
@@ -244,7 +248,7 @@ for PMA */
 
 #ifdef HAVE_MCHECK_H
 #ifdef HAVE_MTRACE
-       if (do_tidy_mem)
+       if (! using_persistent_malloc && do_tidy_mem)
                mtrace();
 #endif /* HAVE_MTRACE */
 #endif /* HAVE_MCHECK_H */
@@ -1362,8 +1366,11 @@ version()
 #ifdef DYNAMIC
        printf(", API: %d.%d", GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION);
 #endif
+#ifdef USE_PERSISTENT_MALLOC
+       printf(", PMA: %s", pma_version);
+#endif
 #ifdef HAVE_MPFR
-       printf(" (GNU MPFR %s, GNU MP %s)", mpfr_get_version(), gmp_version);
+       printf(", (GNU MPFR %s, GNU MP %s)", mpfr_get_version(), gmp_version);
 #endif
        printf("\n");
        print_ext_versions();

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

Summary of changes:
 ChangeLog       |    7 +
 configure       |    9 +-
 doc/ChangeLog   |    4 +
 doc/gawk.info   | 1296 +++++++++++++++++++++++++++++--------------------------
 doc/gawk.texi   |   78 +++-
 doc/gawktexi.in |   78 +++-
 m4/ChangeLog    |    4 +
 m4/pma.m4       |    9 +-
 main.c          |   11 +-
 9 files changed, 873 insertions(+), 623 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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