summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-04-28 23:25:09 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-04-28 23:25:09 +0300
commit20c0d1e7c5d9bd6b85bbe3dbb9d8c06005442e7e (patch)
treead142c54dd6a38b05b2c047d65ddaa92bfeac8ce
parentdb645f36b6e1c5ffa7760d4fd592fd0e32d7cc99 (diff)
parent50d92ff4fee27a6d4b644293422c6373ad90812d (diff)
downloadgawk-20c0d1e7c5d9bd6b85bbe3dbb9d8c06005442e7e.tar.gz
Merge branch 'gawk-5.1-stable'
-rw-r--r--ChangeLog13
-rw-r--r--doc/ChangeLog6
-rw-r--r--doc/gawk.info1094
-rw-r--r--doc/gawk.texi2
-rw-r--r--doc/gawktexi.in2
-rw-r--r--doc/wordlist1
-rw-r--r--interpret.h18
-rw-r--r--mpfr.c13
-rw-r--r--pc/ChangeLog8
-rw-r--r--pc/Makefile.tst19
-rw-r--r--support/ChangeLog5
-rw-r--r--support/regcomp.c30
-rw-r--r--test/ChangeLog18
-rw-r--r--test/Makefile.am10
-rw-r--r--test/Makefile.in25
-rw-r--r--test/Maketests15
-rw-r--r--test/mpfrnegzero2.awk3
-rw-r--r--test/mpfrnegzero2.ok1
-rw-r--r--test/regex3minus.awk3
-rw-r--r--test/regex3minus.ok1
-rw-r--r--test/symtab12.awk7
-rw-r--r--test/symtab12.ok32
22 files changed, 753 insertions, 573 deletions
diff --git a/ChangeLog b/ChangeLog
index 9380f203..734ba24a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2022-04-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ Disallow SYMTAB["x"]["y"]. Reported by Jason C. Kwan.
+
+ * interpret.h (r_interpret): Add checks at Op_sub_array case.
+
+ Unrelated. Fix MPFR mode unary minus applied to a variable with
+ a zero MPG value. Also reported by Jason C. Kwan.
+
+ * mpfr.c (mpg_interpret): Fix Op_unary_minus to create an
+ MPFR -0 value. MPG doesn't distinguish negative zero from
+ positive zero.
+
2022-04-21 Arnold D. Robbins <arnold@skeeve.com>
Fix some profiling issues related to comments in switch / case
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f29aa383..33a9c4c9 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2022-04-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Fix a typo. Thanks to Alan Welsh <alan.welsh@proton.me>
+ for the report.
+ * wordlist: Updated.
+
2022-04-20 Arnold D. Robbins <arnold@skeeve.com>
* texinfo.tex: Updated from GNULIB.
diff --git a/doc/gawk.info b/doc/gawk.info
index 46eaccc6..be86c7fa 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -3677,7 +3677,7 @@ sequences apply to both string constants and regexp constants:
'\xHH...'
The hexadecimal value HH, where HH stands for a sequence of
hexadecimal digits ('0'-'9', and either 'A'-'F' or 'a'-'f'). A
- maximum of two digts are allowed after the '\x'. Any further
+ maximum of two digits are allowed after the '\x'. Any further
hexadecimal digits are treated as simple letters or numbers.
(c.e.) (The '\x' escape sequence is not allowed in POSIX awk.)
@@ -38850,552 +38850,552 @@ Node: Invoking Summary161916
Node: Regexp164757
Node: Regexp Usage166211
Node: Escape Sequences168248
-Node: Regexp Operators174489
-Node: Regexp Operator Details174974
-Ref: Regexp Operator Details-Footnote-1182338
-Node: Interval Expressions182485
-Ref: Interval Expressions-Footnote-1184660
-Node: Bracket Expressions184758
-Ref: table-char-classes187234
-Node: Leftmost Longest190561
-Node: Computed Regexps191864
-Node: GNU Regexp Operators195291
-Node: Case-sensitivity198969
-Ref: Case-sensitivity-Footnote-1201835
-Ref: Case-sensitivity-Footnote-2202070
-Node: Regexp Summary202178
-Node: Reading Files203644
-Node: Records205913
-Node: awk split records206988
-Node: gawk split records211688
-Ref: gawk split records-Footnote-1216762
-Node: Fields216799
-Node: Nonconstant Fields219540
-Ref: Nonconstant Fields-Footnote-1221776
-Node: Changing Fields221980
-Node: Field Separators228011
-Node: Default Field Splitting230709
-Node: Regexp Field Splitting231827
-Node: Single Character Fields235504
-Node: Command Line Field Separator236564
-Node: Full Line Fields239782
-Ref: Full Line Fields-Footnote-1241304
-Ref: Full Line Fields-Footnote-2241350
-Node: Field Splitting Summary241451
-Node: Constant Size243525
-Node: Fixed width data244257
-Node: Skipping intervening247724
-Node: Allowing trailing data248522
-Node: Fields with fixed data249559
-Node: Splitting By Content251077
-Ref: Splitting By Content-Footnote-1254913
-Node: More CSV255076
-Node: FS versus FPAT256691
-Node: Testing field creation257851
-Node: Multiple Line259476
-Node: Getline265753
-Node: Plain Getline268222
-Node: Getline/Variable270795
-Node: Getline/File271946
-Node: Getline/Variable/File273334
-Ref: Getline/Variable/File-Footnote-1274939
-Node: Getline/Pipe275027
-Node: Getline/Variable/Pipe277731
-Node: Getline/Coprocess278866
-Node: Getline/Variable/Coprocess280133
-Node: Getline Notes280875
-Node: Getline Summary283672
-Ref: table-getline-variants284096
-Node: Read Timeout284845
-Ref: Read Timeout-Footnote-1288751
-Node: Retrying Input288809
-Node: Command-line directories290008
-Node: Input Summary290914
-Node: Input Exercises294086
-Node: Printing294520
-Node: Print296354
-Node: Print Examples297811
-Node: Output Separators300591
-Node: OFMT302608
-Node: Printf303964
-Node: Basic Printf304749
-Node: Control Letters306323
-Node: Format Modifiers311485
-Node: Printf Examples317500
-Node: Redirection319986
-Node: Special FD326827
-Ref: Special FD-Footnote-1329995
-Node: Special Files330069
-Node: Other Inherited Files330686
-Node: Special Network331687
-Node: Special Caveats332547
-Node: Close Files And Pipes333496
-Ref: table-close-pipe-return-values340403
-Ref: Close Files And Pipes-Footnote-1341217
-Ref: Close Files And Pipes-Footnote-2341365
-Node: Nonfatal341517
-Node: Output Summary343855
-Node: Output Exercises345077
-Node: Expressions345756
-Node: Values346944
-Node: Constants347622
-Node: Scalar Constants348313
-Ref: Scalar Constants-Footnote-1350823
-Node: Nondecimal-numbers351073
-Node: Regexp Constants354074
-Node: Using Constant Regexps354600
-Node: Standard Regexp Constants355222
-Node: Strong Regexp Constants358410
-Node: Variables362125
-Node: Using Variables362782
-Node: Assignment Options364692
-Node: Conversion367163
-Node: Strings And Numbers367687
-Ref: Strings And Numbers-Footnote-1370750
-Node: Locale influences conversions370859
-Ref: table-locale-affects373617
-Node: All Operators374236
-Node: Arithmetic Ops374865
-Node: Concatenation377581
-Ref: Concatenation-Footnote-1380428
-Node: Assignment Ops380535
-Ref: table-assign-ops385526
-Node: Increment Ops386840
-Node: Truth Values and Conditions390300
-Node: Truth Values391374
-Node: Typing and Comparison392422
-Node: Variable Typing393242
-Ref: Variable Typing-Footnote-1399705
-Ref: Variable Typing-Footnote-2399777
-Node: Comparison Operators399854
-Ref: table-relational-ops400273
-Node: POSIX String Comparison403769
-Ref: POSIX String Comparison-Footnote-1405464
-Ref: POSIX String Comparison-Footnote-2405603
-Node: Boolean Ops405687
-Ref: Boolean Ops-Footnote-1410169
-Node: Conditional Exp410261
-Node: Function Calls411997
-Node: Precedence415874
-Node: Locales419533
-Node: Expressions Summary421165
-Node: Patterns and Actions423738
-Node: Pattern Overview424858
-Node: Regexp Patterns426535
-Node: Expression Patterns427077
-Node: Ranges430858
-Node: BEGIN/END433966
-Node: Using BEGIN/END434727
-Ref: Using BEGIN/END-Footnote-1437481
-Node: I/O And BEGIN/END437587
-Node: BEGINFILE/ENDFILE439900
-Node: Empty443131
-Node: Using Shell Variables443448
-Node: Action Overview445722
-Node: Statements448047
-Node: If Statement449895
-Node: While Statement451390
-Node: Do Statement453418
-Node: For Statement454566
-Node: Switch Statement457821
-Node: Break Statement460262
-Node: Continue Statement462354
-Node: Next Statement464181
-Node: Nextfile Statement466564
-Node: Exit Statement469253
-Node: Built-in Variables471656
-Node: User-modified472789
-Node: Auto-set480556
-Ref: Auto-set-Footnote-1497363
-Ref: Auto-set-Footnote-2497569
-Node: ARGC and ARGV497625
-Node: Pattern Action Summary501838
-Node: Arrays504268
-Node: Array Basics505597
-Node: Array Intro506441
-Ref: figure-array-elements508416
-Ref: Array Intro-Footnote-1511121
-Node: Reference to Elements511249
-Node: Assigning Elements513713
-Node: Array Example514204
-Node: Scanning an Array515963
-Node: Controlling Scanning518985
-Ref: Controlling Scanning-Footnote-1525441
-Node: Numeric Array Subscripts525757
-Node: Uninitialized Subscripts527941
-Node: Delete529560
-Ref: Delete-Footnote-1532312
-Node: Multidimensional532369
-Node: Multiscanning535464
-Node: Arrays of Arrays537055
-Node: Arrays Summary541823
-Node: Functions543916
-Node: Built-in544954
-Node: Calling Built-in546107
-Node: Boolean Functions548103
-Node: Numeric Functions548657
-Ref: Numeric Functions-Footnote-1552684
-Ref: Numeric Functions-Footnote-2553332
-Ref: Numeric Functions-Footnote-3553380
-Node: String Functions553652
-Ref: String Functions-Footnote-1578494
-Ref: String Functions-Footnote-2578622
-Ref: String Functions-Footnote-3578870
-Node: Gory Details578957
-Ref: table-sub-escapes580748
-Ref: table-sub-proposed582268
-Ref: table-posix-sub583632
-Ref: table-gensub-escapes585174
-Ref: Gory Details-Footnote-1585998
-Node: I/O Functions586152
-Ref: table-system-return-values592606
-Ref: I/O Functions-Footnote-1594687
-Ref: I/O Functions-Footnote-2594835
-Node: Time Functions594955
-Ref: Time Functions-Footnote-1605626
-Ref: Time Functions-Footnote-2605694
-Ref: Time Functions-Footnote-3605852
-Ref: Time Functions-Footnote-4605963
-Ref: Time Functions-Footnote-5606075
-Ref: Time Functions-Footnote-6606302
-Node: Bitwise Functions606568
-Ref: table-bitwise-ops607162
-Ref: Bitwise Functions-Footnote-1613226
-Ref: Bitwise Functions-Footnote-2613399
-Node: Type Functions613590
-Node: I18N Functions617010
-Node: User-defined618661
-Node: Definition Syntax619473
-Ref: Definition Syntax-Footnote-1625167
-Node: Function Example625238
-Ref: Function Example-Footnote-1628160
-Node: Function Calling628182
-Node: Calling A Function628770
-Node: Variable Scope629728
-Node: Pass By Value/Reference632722
-Node: Function Caveats635366
-Ref: Function Caveats-Footnote-1637413
-Node: Return Statement637533
-Node: Dynamic Typing640512
-Node: Indirect Calls641442
-Node: Functions Summary652369
-Node: Library Functions655074
-Ref: Library Functions-Footnote-1658681
-Ref: Library Functions-Footnote-2658824
-Node: Library Names658995
-Ref: Library Names-Footnote-1662662
-Ref: Library Names-Footnote-2662885
-Node: General Functions662971
-Node: Strtonum Function664153
-Node: Assert Function667175
-Node: Round Function670501
-Node: Cliff Random Function672041
-Node: Ordinal Functions673057
-Ref: Ordinal Functions-Footnote-1676120
-Ref: Ordinal Functions-Footnote-2676372
-Node: Join Function676582
-Ref: Join Function-Footnote-1678352
-Node: Getlocaltime Function678552
-Node: Readfile Function682294
-Node: Shell Quoting684271
-Node: Isnumeric Function685699
-Node: Data File Management687087
-Node: Filetrans Function687719
-Node: Rewind Function691815
-Node: File Checking693724
-Ref: File Checking-Footnote-1695058
-Node: Empty Files695259
-Node: Ignoring Assigns697238
-Node: Getopt Function698788
-Ref: Getopt Function-Footnote-1714085
-Node: Passwd Functions714285
-Ref: Passwd Functions-Footnote-1723124
-Node: Group Functions723212
-Ref: Group Functions-Footnote-1731110
-Node: Walking Arrays731317
-Node: Library Functions Summary734325
-Node: Library Exercises735731
-Node: Sample Programs736196
-Node: Running Examples736966
-Node: Clones737694
-Node: Cut Program738918
-Node: Egrep Program749058
-Node: Id Program758059
-Node: Split Program767994
-Ref: Split Program-Footnote-1777887
-Node: Tee Program778060
-Node: Uniq Program780850
-Node: Wc Program788438
-Node: Bytes vs. Characters788825
-Node: Using extensions790373
-Node: wc program791127
-Node: Miscellaneous Programs795992
-Node: Dupword Program797205
-Node: Alarm Program799235
-Node: Translate Program804090
-Ref: Translate Program-Footnote-1808655
-Node: Labels Program808925
-Ref: Labels Program-Footnote-1812276
-Node: Word Sorting812360
-Node: History Sorting816432
-Node: Extract Program818657
-Node: Simple Sed826670
-Node: Igawk Program829744
-Ref: Igawk Program-Footnote-1844075
-Ref: Igawk Program-Footnote-2844277
-Ref: Igawk Program-Footnote-3844399
-Node: Anagram Program844514
-Node: Signature Program847576
-Node: Programs Summary848823
-Node: Programs Exercises850037
-Ref: Programs Exercises-Footnote-1854167
-Node: Advanced Features854253
-Node: Nondecimal Data856384
-Node: Boolean Typed Values857982
-Node: Array Sorting859863
-Node: Controlling Array Traversal860568
-Ref: Controlling Array Traversal-Footnote-1868936
-Node: Array Sorting Functions869054
-Ref: Array Sorting Functions-Footnote-1874965
-Node: Two-way I/O875161
-Ref: Two-way I/O-Footnote-1882887
-Ref: Two-way I/O-Footnote-2883074
-Node: TCP/IP Networking883156
-Node: Profiling886232
-Node: Extension Philosophy895541
-Node: Advanced Features Summary897020
-Node: Internationalization899035
-Node: I18N and L10N900709
-Node: Explaining gettext901396
-Ref: Explaining gettext-Footnote-1907288
-Ref: Explaining gettext-Footnote-2907473
-Node: Programmer i18n907638
-Ref: Programmer i18n-Footnote-1912587
-Node: Translator i18n912636
-Node: String Extraction913430
-Ref: String Extraction-Footnote-1914562
-Node: Printf Ordering914648
-Ref: Printf Ordering-Footnote-1917434
-Node: I18N Portability917498
-Ref: I18N Portability-Footnote-1919954
-Node: I18N Example920017
-Ref: I18N Example-Footnote-1923292
-Ref: I18N Example-Footnote-2923365
-Node: Gawk I18N923474
-Node: I18N Summary924096
-Node: Debugger925437
-Node: Debugging926437
-Node: Debugging Concepts926878
-Node: Debugging Terms928687
-Node: Awk Debugging931262
-Ref: Awk Debugging-Footnote-1932207
-Node: Sample Debugging Session932339
-Node: Debugger Invocation932873
-Node: Finding The Bug934259
-Node: List of Debugger Commands940733
-Node: Breakpoint Control942066
-Node: Debugger Execution Control945760
-Node: Viewing And Changing Data949122
-Node: Execution Stack952663
-Node: Debugger Info954300
-Node: Miscellaneous Debugger Commands958371
-Node: Readline Support963433
-Node: Limitations964329
-Node: Debugging Summary966883
-Node: Namespaces968162
-Node: Global Namespace969273
-Node: Qualified Names970671
-Node: Default Namespace971670
-Node: Changing The Namespace972411
-Node: Naming Rules974025
-Node: Internal Name Management975873
-Node: Namespace Example976915
-Node: Namespace And Features979477
-Node: Namespace Summary980912
-Node: Arbitrary Precision Arithmetic982389
-Node: Computer Arithmetic983876
-Ref: table-numeric-ranges987642
-Ref: table-floating-point-ranges988136
-Ref: Computer Arithmetic-Footnote-1988795
-Node: Math Definitions988852
-Ref: table-ieee-formats991828
-Node: MPFR features992396
-Node: FP Math Caution994114
-Ref: FP Math Caution-Footnote-1995186
-Node: Inexactness of computations995555
-Node: Inexact representation996586
-Node: Comparing FP Values997946
-Node: Errors accumulate999187
-Node: Strange values1000643
-Ref: Strange values-Footnote-11003231
-Node: Getting Accuracy1003336
-Node: Try To Round1006046
-Node: Setting precision1006945
-Ref: table-predefined-precision-strings1007642
-Node: Setting the rounding mode1009473
-Ref: table-gawk-rounding-modes1009847
-Ref: Setting the rounding mode-Footnote-11013779
-Node: Arbitrary Precision Integers1013958
-Ref: Arbitrary Precision Integers-Footnote-11017133
-Node: Checking for MPFR1017282
-Node: POSIX Floating Point Problems1018756
-Ref: POSIX Floating Point Problems-Footnote-11023409
-Node: Floating point summary1023447
-Node: Dynamic Extensions1025637
-Node: Extension Intro1027190
-Node: Plugin License1028456
-Node: Extension Mechanism Outline1029253
-Ref: figure-load-extension1029692
-Ref: figure-register-new-function1031258
-Ref: figure-call-new-function1032351
-Node: Extension API Description1034414
-Node: Extension API Functions Introduction1036127
-Ref: table-api-std-headers1037963
-Node: General Data Types1042213
-Ref: General Data Types-Footnote-11050919
-Node: Memory Allocation Functions1051218
-Ref: Memory Allocation Functions-Footnote-11055719
-Node: Constructor Functions1055818
-Node: API Ownership of MPFR and GMP Values1059471
-Node: Registration Functions1061004
-Node: Extension Functions1061704
-Node: Exit Callback Functions1067026
-Node: Extension Version String1068276
-Node: Input Parsers1068939
-Node: Output Wrappers1081660
-Node: Two-way processors1086172
-Node: Printing Messages1088437
-Ref: Printing Messages-Footnote-11089608
-Node: Updating ERRNO1089761
-Node: Requesting Values1090500
-Ref: table-value-types-returned1091237
-Node: Accessing Parameters1092346
-Node: Symbol Table Access1093583
-Node: Symbol table by name1094095
-Ref: Symbol table by name-Footnote-11097120
-Node: Symbol table by cookie1097248
-Ref: Symbol table by cookie-Footnote-11101433
-Node: Cached values1101497
-Ref: Cached values-Footnote-11105033
-Node: Array Manipulation1105186
-Ref: Array Manipulation-Footnote-11106277
-Node: Array Data Types1106314
-Ref: Array Data Types-Footnote-11108972
-Node: Array Functions1109064
-Node: Flattening Arrays1113562
-Node: Creating Arrays1120538
-Node: Redirection API1125305
-Node: Extension API Variables1128138
-Node: Extension Versioning1128849
-Ref: gawk-api-version1129278
-Node: Extension GMP/MPFR Versioning1131010
-Node: Extension API Informational Variables1132638
-Node: Extension API Boilerplate1133711
-Node: Changes from API V11137685
-Node: Finding Extensions1139257
-Node: Extension Example1139816
-Node: Internal File Description1140614
-Node: Internal File Ops1144694
-Ref: Internal File Ops-Footnote-11156044
-Node: Using Internal File Ops1156184
-Ref: Using Internal File Ops-Footnote-11158567
-Node: Extension Samples1158841
-Node: Extension Sample File Functions1160370
-Node: Extension Sample Fnmatch1168019
-Node: Extension Sample Fork1169506
-Node: Extension Sample Inplace1170724
-Node: Extension Sample Ord1174350
-Node: Extension Sample Readdir1175186
-Ref: table-readdir-file-types1176075
-Node: Extension Sample Revout1177143
-Node: Extension Sample Rev2way1177732
-Node: Extension Sample Read write array1178472
-Node: Extension Sample Readfile1181637
-Node: Extension Sample Time1182732
-Node: Extension Sample API Tests1184484
-Node: gawkextlib1184976
-Node: Extension summary1187894
-Node: Extension Exercises1191596
-Node: Language History1192838
-Node: V7/SVR3.11194494
-Node: SVR41196646
-Node: POSIX1198080
-Node: BTL1199461
-Node: POSIX/GNU1200190
-Node: Feature History1205968
-Node: Common Extensions1223143
-Node: Ranges and Locales1224426
-Ref: Ranges and Locales-Footnote-11229042
-Ref: Ranges and Locales-Footnote-21229069
-Ref: Ranges and Locales-Footnote-31229304
-Node: Contributors1229527
-Node: History summary1235524
-Node: Installation1236904
-Node: Gawk Distribution1237848
-Node: Getting1238332
-Node: Extracting1239295
-Node: Distribution contents1240933
-Node: Unix Installation1247994
-Node: Quick Installation1248798
-Node: Compiling with MPFR1251218
-Node: Shell Startup Files1251908
-Node: Additional Configuration Options1252997
-Node: Configuration Philosophy1255312
-Node: Compiling from Git1257708
-Node: Building the Documentation1258263
-Node: Non-Unix Installation1259647
-Node: PC Installation1260107
-Node: PC Binary Installation1260945
-Node: PC Compiling1261818
-Node: PC Using1262935
-Node: Cygwin1266488
-Node: MSYS1267712
-Node: VMS Installation1268314
-Node: VMS Compilation1269033
-Ref: VMS Compilation-Footnote-11270262
-Node: VMS Dynamic Extensions1270320
-Node: VMS Installation Details1272005
-Node: VMS Running1274267
-Node: VMS GNV1278546
-Node: Bugs1279260
-Node: Bug definition1280172
-Node: Bug address1283108
-Node: Usenet1286296
-Node: Performance bugs1287485
-Node: Asking for help1290406
-Node: Maintainers1292373
-Node: Other Versions1293567
-Node: Installation summary1301731
-Node: Notes1303095
-Node: Compatibility Mode1303889
-Node: Additions1304671
-Node: Accessing The Source1305596
-Node: Adding Code1307033
-Node: New Ports1313848
-Node: Derived Files1318223
-Ref: Derived Files-Footnote-11323883
-Ref: Derived Files-Footnote-21323918
-Ref: Derived Files-Footnote-31324516
-Node: Future Extensions1324630
-Node: Implementation Limitations1325288
-Node: Extension Design1326498
-Node: Old Extension Problems1327642
-Ref: Old Extension Problems-Footnote-11329160
-Node: Extension New Mechanism Goals1329217
-Ref: Extension New Mechanism Goals-Footnote-11332581
-Node: Extension Other Design Decisions1332770
-Node: Extension Future Growth1334883
-Node: Notes summary1335489
-Node: Basic Concepts1336647
-Node: Basic High Level1337328
-Ref: figure-general-flow1337610
-Ref: figure-process-flow1338296
-Ref: Basic High Level-Footnote-11341598
-Node: Basic Data Typing1341783
-Node: Glossary1345111
-Node: Copying1376998
-Node: GNU Free Documentation License1414541
-Node: Index1439661
+Node: Regexp Operators174490
+Node: Regexp Operator Details174975
+Ref: Regexp Operator Details-Footnote-1182339
+Node: Interval Expressions182486
+Ref: Interval Expressions-Footnote-1184661
+Node: Bracket Expressions184759
+Ref: table-char-classes187235
+Node: Leftmost Longest190562
+Node: Computed Regexps191865
+Node: GNU Regexp Operators195292
+Node: Case-sensitivity198970
+Ref: Case-sensitivity-Footnote-1201836
+Ref: Case-sensitivity-Footnote-2202071
+Node: Regexp Summary202179
+Node: Reading Files203645
+Node: Records205914
+Node: awk split records206989
+Node: gawk split records211689
+Ref: gawk split records-Footnote-1216763
+Node: Fields216800
+Node: Nonconstant Fields219541
+Ref: Nonconstant Fields-Footnote-1221777
+Node: Changing Fields221981
+Node: Field Separators228012
+Node: Default Field Splitting230710
+Node: Regexp Field Splitting231828
+Node: Single Character Fields235505
+Node: Command Line Field Separator236565
+Node: Full Line Fields239783
+Ref: Full Line Fields-Footnote-1241305
+Ref: Full Line Fields-Footnote-2241351
+Node: Field Splitting Summary241452
+Node: Constant Size243526
+Node: Fixed width data244258
+Node: Skipping intervening247725
+Node: Allowing trailing data248523
+Node: Fields with fixed data249560
+Node: Splitting By Content251078
+Ref: Splitting By Content-Footnote-1254914
+Node: More CSV255077
+Node: FS versus FPAT256692
+Node: Testing field creation257852
+Node: Multiple Line259477
+Node: Getline265754
+Node: Plain Getline268223
+Node: Getline/Variable270796
+Node: Getline/File271947
+Node: Getline/Variable/File273335
+Ref: Getline/Variable/File-Footnote-1274940
+Node: Getline/Pipe275028
+Node: Getline/Variable/Pipe277732
+Node: Getline/Coprocess278867
+Node: Getline/Variable/Coprocess280134
+Node: Getline Notes280876
+Node: Getline Summary283673
+Ref: table-getline-variants284097
+Node: Read Timeout284846
+Ref: Read Timeout-Footnote-1288752
+Node: Retrying Input288810
+Node: Command-line directories290009
+Node: Input Summary290915
+Node: Input Exercises294087
+Node: Printing294521
+Node: Print296355
+Node: Print Examples297812
+Node: Output Separators300592
+Node: OFMT302609
+Node: Printf303965
+Node: Basic Printf304750
+Node: Control Letters306324
+Node: Format Modifiers311486
+Node: Printf Examples317501
+Node: Redirection319987
+Node: Special FD326828
+Ref: Special FD-Footnote-1329996
+Node: Special Files330070
+Node: Other Inherited Files330687
+Node: Special Network331688
+Node: Special Caveats332548
+Node: Close Files And Pipes333497
+Ref: table-close-pipe-return-values340404
+Ref: Close Files And Pipes-Footnote-1341218
+Ref: Close Files And Pipes-Footnote-2341366
+Node: Nonfatal341518
+Node: Output Summary343856
+Node: Output Exercises345078
+Node: Expressions345757
+Node: Values346945
+Node: Constants347623
+Node: Scalar Constants348314
+Ref: Scalar Constants-Footnote-1350824
+Node: Nondecimal-numbers351074
+Node: Regexp Constants354075
+Node: Using Constant Regexps354601
+Node: Standard Regexp Constants355223
+Node: Strong Regexp Constants358411
+Node: Variables362126
+Node: Using Variables362783
+Node: Assignment Options364693
+Node: Conversion367164
+Node: Strings And Numbers367688
+Ref: Strings And Numbers-Footnote-1370751
+Node: Locale influences conversions370860
+Ref: table-locale-affects373618
+Node: All Operators374237
+Node: Arithmetic Ops374866
+Node: Concatenation377582
+Ref: Concatenation-Footnote-1380429
+Node: Assignment Ops380536
+Ref: table-assign-ops385527
+Node: Increment Ops386841
+Node: Truth Values and Conditions390301
+Node: Truth Values391375
+Node: Typing and Comparison392423
+Node: Variable Typing393243
+Ref: Variable Typing-Footnote-1399706
+Ref: Variable Typing-Footnote-2399778
+Node: Comparison Operators399855
+Ref: table-relational-ops400274
+Node: POSIX String Comparison403770
+Ref: POSIX String Comparison-Footnote-1405465
+Ref: POSIX String Comparison-Footnote-2405604
+Node: Boolean Ops405688
+Ref: Boolean Ops-Footnote-1410170
+Node: Conditional Exp410262
+Node: Function Calls411998
+Node: Precedence415875
+Node: Locales419534
+Node: Expressions Summary421166
+Node: Patterns and Actions423739
+Node: Pattern Overview424859
+Node: Regexp Patterns426536
+Node: Expression Patterns427078
+Node: Ranges430859
+Node: BEGIN/END433967
+Node: Using BEGIN/END434728
+Ref: Using BEGIN/END-Footnote-1437482
+Node: I/O And BEGIN/END437588
+Node: BEGINFILE/ENDFILE439901
+Node: Empty443132
+Node: Using Shell Variables443449
+Node: Action Overview445723
+Node: Statements448048
+Node: If Statement449896
+Node: While Statement451391
+Node: Do Statement453419
+Node: For Statement454567
+Node: Switch Statement457822
+Node: Break Statement460263
+Node: Continue Statement462355
+Node: Next Statement464182
+Node: Nextfile Statement466565
+Node: Exit Statement469254
+Node: Built-in Variables471657
+Node: User-modified472790
+Node: Auto-set480557
+Ref: Auto-set-Footnote-1497364
+Ref: Auto-set-Footnote-2497570
+Node: ARGC and ARGV497626
+Node: Pattern Action Summary501839
+Node: Arrays504269
+Node: Array Basics505598
+Node: Array Intro506442
+Ref: figure-array-elements508417
+Ref: Array Intro-Footnote-1511122
+Node: Reference to Elements511250
+Node: Assigning Elements513714
+Node: Array Example514205
+Node: Scanning an Array515964
+Node: Controlling Scanning518986
+Ref: Controlling Scanning-Footnote-1525442
+Node: Numeric Array Subscripts525758
+Node: Uninitialized Subscripts527942
+Node: Delete529561
+Ref: Delete-Footnote-1532313
+Node: Multidimensional532370
+Node: Multiscanning535465
+Node: Arrays of Arrays537056
+Node: Arrays Summary541824
+Node: Functions543917
+Node: Built-in544955
+Node: Calling Built-in546108
+Node: Boolean Functions548104
+Node: Numeric Functions548658
+Ref: Numeric Functions-Footnote-1552685
+Ref: Numeric Functions-Footnote-2553333
+Ref: Numeric Functions-Footnote-3553381
+Node: String Functions553653
+Ref: String Functions-Footnote-1578495
+Ref: String Functions-Footnote-2578623
+Ref: String Functions-Footnote-3578871
+Node: Gory Details578958
+Ref: table-sub-escapes580749
+Ref: table-sub-proposed582269
+Ref: table-posix-sub583633
+Ref: table-gensub-escapes585175
+Ref: Gory Details-Footnote-1585999
+Node: I/O Functions586153
+Ref: table-system-return-values592607
+Ref: I/O Functions-Footnote-1594688
+Ref: I/O Functions-Footnote-2594836
+Node: Time Functions594956
+Ref: Time Functions-Footnote-1605627
+Ref: Time Functions-Footnote-2605695
+Ref: Time Functions-Footnote-3605853
+Ref: Time Functions-Footnote-4605964
+Ref: Time Functions-Footnote-5606076
+Ref: Time Functions-Footnote-6606303
+Node: Bitwise Functions606569
+Ref: table-bitwise-ops607163
+Ref: Bitwise Functions-Footnote-1613227
+Ref: Bitwise Functions-Footnote-2613400
+Node: Type Functions613591
+Node: I18N Functions617011
+Node: User-defined618662
+Node: Definition Syntax619474
+Ref: Definition Syntax-Footnote-1625168
+Node: Function Example625239
+Ref: Function Example-Footnote-1628161
+Node: Function Calling628183
+Node: Calling A Function628771
+Node: Variable Scope629729
+Node: Pass By Value/Reference632723
+Node: Function Caveats635367
+Ref: Function Caveats-Footnote-1637414
+Node: Return Statement637534
+Node: Dynamic Typing640513
+Node: Indirect Calls641443
+Node: Functions Summary652370
+Node: Library Functions655075
+Ref: Library Functions-Footnote-1658682
+Ref: Library Functions-Footnote-2658825
+Node: Library Names658996
+Ref: Library Names-Footnote-1662663
+Ref: Library Names-Footnote-2662886
+Node: General Functions662972
+Node: Strtonum Function664154
+Node: Assert Function667176
+Node: Round Function670502
+Node: Cliff Random Function672042
+Node: Ordinal Functions673058
+Ref: Ordinal Functions-Footnote-1676121
+Ref: Ordinal Functions-Footnote-2676373
+Node: Join Function676583
+Ref: Join Function-Footnote-1678353
+Node: Getlocaltime Function678553
+Node: Readfile Function682295
+Node: Shell Quoting684272
+Node: Isnumeric Function685700
+Node: Data File Management687088
+Node: Filetrans Function687720
+Node: Rewind Function691816
+Node: File Checking693725
+Ref: File Checking-Footnote-1695059
+Node: Empty Files695260
+Node: Ignoring Assigns697239
+Node: Getopt Function698789
+Ref: Getopt Function-Footnote-1714086
+Node: Passwd Functions714286
+Ref: Passwd Functions-Footnote-1723125
+Node: Group Functions723213
+Ref: Group Functions-Footnote-1731111
+Node: Walking Arrays731318
+Node: Library Functions Summary734326
+Node: Library Exercises735732
+Node: Sample Programs736197
+Node: Running Examples736967
+Node: Clones737695
+Node: Cut Program738919
+Node: Egrep Program749059
+Node: Id Program758060
+Node: Split Program767995
+Ref: Split Program-Footnote-1777888
+Node: Tee Program778061
+Node: Uniq Program780851
+Node: Wc Program788439
+Node: Bytes vs. Characters788826
+Node: Using extensions790374
+Node: wc program791128
+Node: Miscellaneous Programs795993
+Node: Dupword Program797206
+Node: Alarm Program799236
+Node: Translate Program804091
+Ref: Translate Program-Footnote-1808656
+Node: Labels Program808926
+Ref: Labels Program-Footnote-1812277
+Node: Word Sorting812361
+Node: History Sorting816433
+Node: Extract Program818658
+Node: Simple Sed826671
+Node: Igawk Program829745
+Ref: Igawk Program-Footnote-1844076
+Ref: Igawk Program-Footnote-2844278
+Ref: Igawk Program-Footnote-3844400
+Node: Anagram Program844515
+Node: Signature Program847577
+Node: Programs Summary848824
+Node: Programs Exercises850038
+Ref: Programs Exercises-Footnote-1854168
+Node: Advanced Features854254
+Node: Nondecimal Data856385
+Node: Boolean Typed Values857983
+Node: Array Sorting859864
+Node: Controlling Array Traversal860569
+Ref: Controlling Array Traversal-Footnote-1868937
+Node: Array Sorting Functions869055
+Ref: Array Sorting Functions-Footnote-1874966
+Node: Two-way I/O875162
+Ref: Two-way I/O-Footnote-1882888
+Ref: Two-way I/O-Footnote-2883075
+Node: TCP/IP Networking883157
+Node: Profiling886233
+Node: Extension Philosophy895542
+Node: Advanced Features Summary897021
+Node: Internationalization899036
+Node: I18N and L10N900710
+Node: Explaining gettext901397
+Ref: Explaining gettext-Footnote-1907289
+Ref: Explaining gettext-Footnote-2907474
+Node: Programmer i18n907639
+Ref: Programmer i18n-Footnote-1912588
+Node: Translator i18n912637
+Node: String Extraction913431
+Ref: String Extraction-Footnote-1914563
+Node: Printf Ordering914649
+Ref: Printf Ordering-Footnote-1917435
+Node: I18N Portability917499
+Ref: I18N Portability-Footnote-1919955
+Node: I18N Example920018
+Ref: I18N Example-Footnote-1923293
+Ref: I18N Example-Footnote-2923366
+Node: Gawk I18N923475
+Node: I18N Summary924097
+Node: Debugger925438
+Node: Debugging926438
+Node: Debugging Concepts926879
+Node: Debugging Terms928688
+Node: Awk Debugging931263
+Ref: Awk Debugging-Footnote-1932208
+Node: Sample Debugging Session932340
+Node: Debugger Invocation932874
+Node: Finding The Bug934260
+Node: List of Debugger Commands940734
+Node: Breakpoint Control942067
+Node: Debugger Execution Control945761
+Node: Viewing And Changing Data949123
+Node: Execution Stack952664
+Node: Debugger Info954301
+Node: Miscellaneous Debugger Commands958372
+Node: Readline Support963434
+Node: Limitations964330
+Node: Debugging Summary966884
+Node: Namespaces968163
+Node: Global Namespace969274
+Node: Qualified Names970672
+Node: Default Namespace971671
+Node: Changing The Namespace972412
+Node: Naming Rules974026
+Node: Internal Name Management975874
+Node: Namespace Example976916
+Node: Namespace And Features979478
+Node: Namespace Summary980913
+Node: Arbitrary Precision Arithmetic982390
+Node: Computer Arithmetic983877
+Ref: table-numeric-ranges987643
+Ref: table-floating-point-ranges988137
+Ref: Computer Arithmetic-Footnote-1988796
+Node: Math Definitions988853
+Ref: table-ieee-formats991829
+Node: MPFR features992397
+Node: FP Math Caution994115
+Ref: FP Math Caution-Footnote-1995187
+Node: Inexactness of computations995556
+Node: Inexact representation996587
+Node: Comparing FP Values997947
+Node: Errors accumulate999188
+Node: Strange values1000644
+Ref: Strange values-Footnote-11003232
+Node: Getting Accuracy1003337
+Node: Try To Round1006047
+Node: Setting precision1006946
+Ref: table-predefined-precision-strings1007643
+Node: Setting the rounding mode1009474
+Ref: table-gawk-rounding-modes1009848
+Ref: Setting the rounding mode-Footnote-11013780
+Node: Arbitrary Precision Integers1013959
+Ref: Arbitrary Precision Integers-Footnote-11017134
+Node: Checking for MPFR1017283
+Node: POSIX Floating Point Problems1018757
+Ref: POSIX Floating Point Problems-Footnote-11023410
+Node: Floating point summary1023448
+Node: Dynamic Extensions1025638
+Node: Extension Intro1027191
+Node: Plugin License1028457
+Node: Extension Mechanism Outline1029254
+Ref: figure-load-extension1029693
+Ref: figure-register-new-function1031259
+Ref: figure-call-new-function1032352
+Node: Extension API Description1034415
+Node: Extension API Functions Introduction1036128
+Ref: table-api-std-headers1037964
+Node: General Data Types1042214
+Ref: General Data Types-Footnote-11050920
+Node: Memory Allocation Functions1051219
+Ref: Memory Allocation Functions-Footnote-11055720
+Node: Constructor Functions1055819
+Node: API Ownership of MPFR and GMP Values1059472
+Node: Registration Functions1061005
+Node: Extension Functions1061705
+Node: Exit Callback Functions1067027
+Node: Extension Version String1068277
+Node: Input Parsers1068940
+Node: Output Wrappers1081661
+Node: Two-way processors1086173
+Node: Printing Messages1088438
+Ref: Printing Messages-Footnote-11089609
+Node: Updating ERRNO1089762
+Node: Requesting Values1090501
+Ref: table-value-types-returned1091238
+Node: Accessing Parameters1092347
+Node: Symbol Table Access1093584
+Node: Symbol table by name1094096
+Ref: Symbol table by name-Footnote-11097121
+Node: Symbol table by cookie1097249
+Ref: Symbol table by cookie-Footnote-11101434
+Node: Cached values1101498
+Ref: Cached values-Footnote-11105034
+Node: Array Manipulation1105187
+Ref: Array Manipulation-Footnote-11106278
+Node: Array Data Types1106315
+Ref: Array Data Types-Footnote-11108973
+Node: Array Functions1109065
+Node: Flattening Arrays1113563
+Node: Creating Arrays1120539
+Node: Redirection API1125306
+Node: Extension API Variables1128139
+Node: Extension Versioning1128850
+Ref: gawk-api-version1129279
+Node: Extension GMP/MPFR Versioning1131011
+Node: Extension API Informational Variables1132639
+Node: Extension API Boilerplate1133712
+Node: Changes from API V11137686
+Node: Finding Extensions1139258
+Node: Extension Example1139817
+Node: Internal File Description1140615
+Node: Internal File Ops1144695
+Ref: Internal File Ops-Footnote-11156045
+Node: Using Internal File Ops1156185
+Ref: Using Internal File Ops-Footnote-11158568
+Node: Extension Samples1158842
+Node: Extension Sample File Functions1160371
+Node: Extension Sample Fnmatch1168020
+Node: Extension Sample Fork1169507
+Node: Extension Sample Inplace1170725
+Node: Extension Sample Ord1174351
+Node: Extension Sample Readdir1175187
+Ref: table-readdir-file-types1176076
+Node: Extension Sample Revout1177144
+Node: Extension Sample Rev2way1177733
+Node: Extension Sample Read write array1178473
+Node: Extension Sample Readfile1181638
+Node: Extension Sample Time1182733
+Node: Extension Sample API Tests1184485
+Node: gawkextlib1184977
+Node: Extension summary1187895
+Node: Extension Exercises1191597
+Node: Language History1192839
+Node: V7/SVR3.11194495
+Node: SVR41196647
+Node: POSIX1198081
+Node: BTL1199462
+Node: POSIX/GNU1200191
+Node: Feature History1205969
+Node: Common Extensions1223144
+Node: Ranges and Locales1224427
+Ref: Ranges and Locales-Footnote-11229043
+Ref: Ranges and Locales-Footnote-21229070
+Ref: Ranges and Locales-Footnote-31229305
+Node: Contributors1229528
+Node: History summary1235525
+Node: Installation1236905
+Node: Gawk Distribution1237849
+Node: Getting1238333
+Node: Extracting1239296
+Node: Distribution contents1240934
+Node: Unix Installation1247995
+Node: Quick Installation1248799
+Node: Compiling with MPFR1251219
+Node: Shell Startup Files1251909
+Node: Additional Configuration Options1252998
+Node: Configuration Philosophy1255313
+Node: Compiling from Git1257709
+Node: Building the Documentation1258264
+Node: Non-Unix Installation1259648
+Node: PC Installation1260108
+Node: PC Binary Installation1260946
+Node: PC Compiling1261819
+Node: PC Using1262936
+Node: Cygwin1266489
+Node: MSYS1267713
+Node: VMS Installation1268315
+Node: VMS Compilation1269034
+Ref: VMS Compilation-Footnote-11270263
+Node: VMS Dynamic Extensions1270321
+Node: VMS Installation Details1272006
+Node: VMS Running1274268
+Node: VMS GNV1278547
+Node: Bugs1279261
+Node: Bug definition1280173
+Node: Bug address1283109
+Node: Usenet1286297
+Node: Performance bugs1287486
+Node: Asking for help1290407
+Node: Maintainers1292374
+Node: Other Versions1293568
+Node: Installation summary1301732
+Node: Notes1303096
+Node: Compatibility Mode1303890
+Node: Additions1304672
+Node: Accessing The Source1305597
+Node: Adding Code1307034
+Node: New Ports1313849
+Node: Derived Files1318224
+Ref: Derived Files-Footnote-11323884
+Ref: Derived Files-Footnote-21323919
+Ref: Derived Files-Footnote-31324517
+Node: Future Extensions1324631
+Node: Implementation Limitations1325289
+Node: Extension Design1326499
+Node: Old Extension Problems1327643
+Ref: Old Extension Problems-Footnote-11329161
+Node: Extension New Mechanism Goals1329218
+Ref: Extension New Mechanism Goals-Footnote-11332582
+Node: Extension Other Design Decisions1332771
+Node: Extension Future Growth1334884
+Node: Notes summary1335490
+Node: Basic Concepts1336648
+Node: Basic High Level1337329
+Ref: figure-general-flow1337611
+Ref: figure-process-flow1338297
+Ref: Basic High Level-Footnote-11341599
+Node: Basic Data Typing1341784
+Node: Glossary1345112
+Node: Copying1376999
+Node: GNU Free Documentation License1414542
+Node: Index1439662

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 31d1af3f..af97e678 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -5547,7 +5547,7 @@ between @samp{0} and @samp{7}. For example, the code for the ASCII ESC
@item \x@var{hh}@dots{}
The hexadecimal value @var{hh}, where @var{hh} stands for a sequence
of hexadecimal digits (@samp{0}--@samp{9}, and either @samp{A}--@samp{F}
-or @samp{a}--@samp{f}). A maximum of two digts are allowed after
+or @samp{a}--@samp{f}). A maximum of two digits are allowed after
the @samp{\x}. Any further hexadecimal digits are treated as simple
letters or numbers. @value{COMMONEXT}
(The @samp{\x} escape sequence is not allowed in POSIX awk.)
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 77bc349f..e5378563 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -5413,7 +5413,7 @@ between @samp{0} and @samp{7}. For example, the code for the ASCII ESC
@item \x@var{hh}@dots{}
The hexadecimal value @var{hh}, where @var{hh} stands for a sequence
of hexadecimal digits (@samp{0}--@samp{9}, and either @samp{A}--@samp{F}
-or @samp{a}--@samp{f}). A maximum of two digts are allowed after
+or @samp{a}--@samp{f}). A maximum of two digits are allowed after
the @samp{\x}. Any further hexadecimal digits are treated as simple
letters or numbers. @value{COMMONEXT}
(The @samp{\x} escape sequence is not allowed in POSIX awk.)
diff --git a/doc/wordlist b/doc/wordlist
index 722ac71a..eac95215 100644
--- a/doc/wordlist
+++ b/doc/wordlist
@@ -842,7 +842,6 @@ dgawk
dict
diff
diffs
-digts
dir
dircategory
direntry
diff --git a/interpret.h b/interpret.h
index ca67e966..bed2dfe8 100644
--- a/interpret.h
+++ b/interpret.h
@@ -329,6 +329,24 @@ uninitialized_scalar:
t2 = mk_sub(pc->sub_count);
t1 = POP_ARRAY(false);
r = in_array(t1, t2);
+
+ if (r == NULL) {
+ t2 = force_string(t2);
+
+ if (t1 == func_table) {
+ fatal(_("reference to uninitialized element `%s[\"%.*s\"] is not allowed'"),
+ "FUNCTAB", (int) t2->stlen, t2->stptr);
+ } else if (t1 == symbol_table) {
+ fatal(_("reference to uninitialized element `%s[\"%.*s\"] is not allowed'"),
+ "SYMTAB", (int) t2->stlen, t2->stptr);
+ } else if (do_lint) {
+ lintwarn(_("reference to uninitialized element `%s[\"%.*s\"]'"),
+ array_vname(t1), (int) t2->stlen, t2->stptr);
+ if (t2->stlen == 0)
+ lintwarn(_("subscript of array `%s' is null string"), array_vname(t1));
+ }
+ }
+
if (r == NULL) {
r = make_array();
r->parent_array = t1;
diff --git a/mpfr.c b/mpfr.c
index ff4fde0b..7f61b692 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1842,8 +1842,17 @@ mod:
tval = mpfr_neg(r->mpg_numbr, t1->mpg_numbr, ROUND_MODE);
IEEE_FMT(r->mpg_numbr, tval);
} else {
- r = mpg_integer();
- mpz_neg(r->mpg_i, t1->mpg_i);
+ if (! is_zero(t1)) {
+ r = mpg_integer();
+ mpz_neg(r->mpg_i, t1->mpg_i);
+ } else {
+ // have to convert to MPFR for -0.0. sigh
+ r = mpg_float();
+ tval = mpfr_set_d(r->mpg_numbr, 0.0, ROUND_MODE);
+ IEEE_FMT(r->mpg_numbr, tval);
+ tval = mpfr_neg(r->mpg_numbr, r->mpg_numbr, ROUND_MODE);
+ IEEE_FMT(r->mpg_numbr, tval);
+ }
}
DEREF(t1);
REPLACE(r);
diff --git a/pc/ChangeLog b/pc/ChangeLog
index c686a872..8bf18232 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,11 @@
+2022-04-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
+2022-04-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
2022-04-21 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 8ccab06d..dc3b6d55 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -169,6 +169,7 @@ BASIC_TESTS = \
posix2008sub prdupval prec printf0 printf1 printfchar prmarscl \
prmreuse prt1eval prtoeval rand randtest range1 range2 readbuf \
rebrackloc rebt8b1 rebuild redfilnm regeq regexpbrack regexpbrack2 \
+ regex3minus \
regexprange regrange reindops reparse resplit rri1 rs rscompat \
rsnul1nl rsnulbig rsnulbig2 rsnullre rsnulw rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin setrec0 \
@@ -217,6 +218,7 @@ GAWK_EXT_TESTS = \
strftime strtonum strtonum1 stupid1 stupid2 stupid3 stupid4 stupid5 \
switch2 symtab1 symtab10 symtab11 symtab2 symtab3 symtab4 symtab5 \
symtab6 symtab7 symtab8 symtab9 timeout typedregex1 typedregex2 \
+ symtab12 \
typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \
typeof3 typeof4 typeof5 typeof6 watchpoint1
@@ -260,7 +262,7 @@ NEED_MPFR = \
mpfrbigint mpfrbigint2 mpfrcase mpfrcase2 mpfrexprange mpfrfield \
mpfrieee mpfrmemok1 mpfrnegzero mpfrnonum mpfrnr mpfrrem mpfrrnd \
mpfrrndeval mpfrsort mpfrsqrt mpfrstrtonum mpgforcenum mpfruplus \
- mpfranswer42
+ mpfranswer42 mpfrnegzero2
# List of tests that need --non-decimal-data
@@ -2183,6 +2185,11 @@ regexpbrack2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+regex3minus:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
regexprange:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -3395,6 +3402,11 @@ typedregex2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab12:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typedregex3:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -3688,6 +3700,11 @@ mpgforcenum:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfrnegzero2:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# end of file Maketests
# Targets generated for other tests:
diff --git a/support/ChangeLog b/support/ChangeLog
index 3f88b819..459a7e13 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regcomp.c (peek_token_bracket): Sync to version from GNULIB
+ that fixes the "---" issue.
+
2022-04-21 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c (peek_token_bracket): Allow "---" to be a range
diff --git a/support/regcomp.c b/support/regcomp.c
index adfe28e2..122c3de5 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -2038,29 +2038,25 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
}
switch (c)
{
- case '-':
- // Special case. V7 Unix grep and Unix awk and mawk allow
- // [...---...] (3 minus signs in a bracket expression) to represent
- // a single minus sign. Let's try to support that without breaking
- // anything else.
- if (re_string_peek_byte (input, 1) == '-' && re_string_peek_byte (input, 2) == '-')
- {
- // advance past the minus signs
- (void) re_string_fetch_byte (input);
- (void) re_string_fetch_byte (input);
-
- token->type = CHARACTER;
- token->opr.c = '-';
- }
- else
- token->type = OP_CHARSET_RANGE;
- break;
case ']':
token->type = OP_CLOSE_BRACKET;
break;
case '^':
token->type = OP_NON_MATCH_LIST;
break;
+ case '-':
+ /* In V7 Unix grep and Unix awk and mawk, [...---...]
+ (3 adjacent minus signs) stands for a single minus sign.
+ Support that without breaking anything else. */
+ if (! (re_string_cur_idx (input) + 2 < re_string_length (input)
+ && re_string_peek_byte (input, 1) == '-'
+ && re_string_peek_byte (input, 2) == '-'))
+ {
+ token->type = OP_CHARSET_RANGE;
+ break;
+ }
+ re_string_skip_bytes (input, 2);
+ FALLTHROUGH;
default:
token->type = CHARACTER;
}
diff --git a/test/ChangeLog b/test/ChangeLog
index b51152a9..c57a0d50 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,19 @@
+2022-04-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): symtab12, new test.
+ * symtab12.awk, symtab12.ok: New files.
+
+ Unrelated:
+
+ * Makefile.am (EXTRA_DIST): mpfrnegzero2, new test.
+ (NEED_MPFR): Ditto.
+ * mpfrnegzero2.awk, mpfrnegzero2.ok: New files.
+
+2022-04-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): regex3minus, new test.
+ * regex3minus.awk, regex3minus.ok: New files.
+
2022-04-21 Arnold D. Robbins <arnold@skeeve.com>
* profile5.ok, profile10.ok, profile11.ok: Updated after code changes.
@@ -535,7 +551,7 @@
2019-05-07 Arnold D. Robbins <arnold@skeeve.com>
- * Gentests: Finish handlinig NEED_SANDBOX.
+ * Gentests: Finish handling NEED_SANDBOX.
2019-05-06 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 58accb27..c7937405 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -748,6 +748,8 @@ EXTRA_DIST = \
mpfrmemok1.ok \
mpfrnegzero.awk \
mpfrnegzero.ok \
+ mpfrnegzero2.awk \
+ mpfrnegzero2.ok \
mpfrnonum.awk \
mpfrnonum.in \
mpfrnonum.ok \
@@ -1070,6 +1072,8 @@ EXTRA_DIST = \
regeq.awk \
regeq.in \
regeq.ok \
+ regex3minus.awk \
+ regex3minus.ok \
regexpbrack.awk \
regexpbrack.in \
regexpbrack.ok \
@@ -1303,6 +1307,8 @@ EXTRA_DIST = \
symtab10.ok \
symtab11.awk \
symtab11.ok \
+ symtab12.awk \
+ symtab12.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -1435,6 +1441,7 @@ BASIC_TESTS = \
posix2008sub prdupval prec printf0 printf1 printfchar prmarscl \
prmreuse prt1eval prtoeval rand randtest range1 range2 readbuf \
rebrackloc rebt8b1 rebuild redfilnm regeq regexpbrack regexpbrack2 \
+ regex3minus \
regexprange regrange reindops reparse resplit rri1 rs rscompat \
rsnul1nl rsnulbig rsnulbig2 rsnullre rsnulw rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin setrec0 \
@@ -1483,6 +1490,7 @@ GAWK_EXT_TESTS = \
strftime strtonum strtonum1 stupid1 stupid2 stupid3 stupid4 stupid5 \
switch2 symtab1 symtab10 symtab11 symtab2 symtab3 symtab4 symtab5 \
symtab6 symtab7 symtab8 symtab9 timeout typedregex1 typedregex2 \
+ symtab12 \
typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \
typeof3 typeof4 typeof5 typeof6 watchpoint1
@@ -1528,7 +1536,7 @@ NEED_MPFR = \
mpfrbigint mpfrbigint2 mpfrcase mpfrcase2 mpfrexprange mpfrfield \
mpfrieee mpfrmemok1 mpfrnegzero mpfrnonum mpfrnr mpfrrem mpfrrnd \
mpfrrndeval mpfrsort mpfrsqrt mpfrstrtonum mpgforcenum mpfruplus \
- mpfranswer42
+ mpfranswer42 mpfrnegzero2
# List of tests that need --non-decimal-data
NEED_NONDEC = mpfrbigint2 nondec2 intarray forcenum
diff --git a/test/Makefile.in b/test/Makefile.in
index 82cc0d5c..f1c1423b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1014,6 +1014,8 @@ EXTRA_DIST = \
mpfrmemok1.ok \
mpfrnegzero.awk \
mpfrnegzero.ok \
+ mpfrnegzero2.awk \
+ mpfrnegzero2.ok \
mpfrnonum.awk \
mpfrnonum.in \
mpfrnonum.ok \
@@ -1336,6 +1338,8 @@ EXTRA_DIST = \
regeq.awk \
regeq.in \
regeq.ok \
+ regex3minus.awk \
+ regex3minus.ok \
regexpbrack.awk \
regexpbrack.in \
regexpbrack.ok \
@@ -1569,6 +1573,8 @@ EXTRA_DIST = \
symtab10.ok \
symtab11.awk \
symtab11.ok \
+ symtab12.awk \
+ symtab12.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -1701,6 +1707,7 @@ BASIC_TESTS = \
posix2008sub prdupval prec printf0 printf1 printfchar prmarscl \
prmreuse prt1eval prtoeval rand randtest range1 range2 readbuf \
rebrackloc rebt8b1 rebuild redfilnm regeq regexpbrack regexpbrack2 \
+ regex3minus \
regexprange regrange reindops reparse resplit rri1 rs rscompat \
rsnul1nl rsnulbig rsnulbig2 rsnullre rsnulw rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin setrec0 \
@@ -1749,6 +1756,7 @@ GAWK_EXT_TESTS = \
strftime strtonum strtonum1 stupid1 stupid2 stupid3 stupid4 stupid5 \
switch2 symtab1 symtab10 symtab11 symtab2 symtab3 symtab4 symtab5 \
symtab6 symtab7 symtab8 symtab9 timeout typedregex1 typedregex2 \
+ symtab12 \
typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \
typeof3 typeof4 typeof5 typeof6 watchpoint1
@@ -1792,7 +1800,7 @@ NEED_MPFR = \
mpfrbigint mpfrbigint2 mpfrcase mpfrcase2 mpfrexprange mpfrfield \
mpfrieee mpfrmemok1 mpfrnegzero mpfrnonum mpfrnr mpfrrem mpfrrnd \
mpfrrndeval mpfrsort mpfrsqrt mpfrstrtonum mpgforcenum mpfruplus \
- mpfranswer42
+ mpfranswer42 mpfrnegzero2
# List of tests that need --non-decimal-data
@@ -3896,6 +3904,11 @@ regexpbrack2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+regex3minus:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
regexprange:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -5084,6 +5097,11 @@ typedregex2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab12:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typedregex3:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -5368,6 +5386,11 @@ mpgforcenum:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfrnegzero2:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# end of file Maketests
# Targets generated for other tests:
diff --git a/test/Maketests b/test/Maketests
index 5e4080e2..7bf4f61a 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -924,6 +924,11 @@ regexpbrack2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+regex3minus:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
regexprange:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2112,6 +2117,11 @@ typedregex2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab12:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typedregex3:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2396,4 +2406,9 @@ mpgforcenum:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+mpfrnegzero2:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# end of file Maketests
diff --git a/test/mpfrnegzero2.awk b/test/mpfrnegzero2.awk
new file mode 100644
index 00000000..b1e6b8ee
--- /dev/null
+++ b/test/mpfrnegzero2.awk
@@ -0,0 +1,3 @@
+BEGIN {
+ printf("%f\n", -a)
+}
diff --git a/test/mpfrnegzero2.ok b/test/mpfrnegzero2.ok
new file mode 100644
index 00000000..c8713d7c
--- /dev/null
+++ b/test/mpfrnegzero2.ok
@@ -0,0 +1 @@
+-0.000000
diff --git a/test/regex3minus.awk b/test/regex3minus.awk
new file mode 100644
index 00000000..bb23cad8
--- /dev/null
+++ b/test/regex3minus.awk
@@ -0,0 +1,3 @@
+BEGIN {
+ print match("abc-def", /[qrs---tuv]/)
+}
diff --git a/test/regex3minus.ok b/test/regex3minus.ok
new file mode 100644
index 00000000..b8626c4c
--- /dev/null
+++ b/test/regex3minus.ok
@@ -0,0 +1 @@
+4
diff --git a/test/symtab12.awk b/test/symtab12.awk
new file mode 100644
index 00000000..cc3d19dd
--- /dev/null
+++ b/test/symtab12.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ for (i in SYMTAB)
+ print i | "sort"
+ close("sort")
+ print "----"
+ SYMTAB["foofoo"]["q"] = "q"
+}
diff --git a/test/symtab12.ok b/test/symtab12.ok
new file mode 100644
index 00000000..b0b7b0ea
--- /dev/null
+++ b/test/symtab12.ok
@@ -0,0 +1,32 @@
+ARGC
+ARGIND
+ARGV
+BINMODE
+CONVFMT
+ENVIRON
+ERRNO
+FIELDWIDTHS
+FILENAME
+FNR
+FPAT
+FS
+IGNORECASE
+LINT
+NF
+NR
+OFMT
+OFS
+ORS
+PREC
+PROCINFO
+RLENGTH
+ROUNDMODE
+RS
+RSTART
+RT
+SUBSEP
+TEXTDOMAIN
+i
+----
+gawk: symtab12.awk:6: fatal: reference to uninitialized element `SYMTAB["foofoo"] is not allowed'
+EXIT CODE: 2