summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-06-15 22:43:54 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-06-15 22:43:54 +0300
commit13792702809271ab92f67bb71cc3f10731f35047 (patch)
tree6cb791ecdfecac6cd501fdbe95d925e8a2c41cb1
parent13127e20909b2ef212f5e467c8f3bb447091e4ef (diff)
parent3d47e0edfe9dbac583f54cb265063efb9d37fa38 (diff)
downloadgawk-feature/regex-type.tar.gz
Merge branch 'master' into feature/regex-typefeature/regex-type
-rw-r--r--ChangeLog13
-rwxr-xr-xconfigure41
-rw-r--r--doc/ChangeLog6
-rw-r--r--doc/gawk.info521
-rw-r--r--doc/gawk.texi3
-rw-r--r--doc/gawktexi.in3
-rw-r--r--m4/ChangeLog4
-rw-r--r--m4/readline.m42
-rw-r--r--regcomp.c64
-rw-r--r--regex_internal.c6
-rw-r--r--regex_internal.h12
-rw-r--r--regexec.c6
12 files changed, 368 insertions, 313 deletions
diff --git a/ChangeLog b/ChangeLog
index 76ce8d9b..4fb5f07b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2015-06-14 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regcomp.c, regex_internal.h, regexec.c: Sync with GLIBC.
+
+ Unrelated:
+
+ * regex_internal.c, regexec.c: __attribute --> __attribute__.
+
+ Related:
+
+ * regex_internal.h: Clean up defines for non-GCC for attribute;
+ essentially sync it with GLIBC.
+
2015-06-12 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y: Finish converting "hard" regex to "typed" regex.
diff --git a/configure b/configure
index 829b0e76..38df7851 100755
--- a/configure
+++ b/configure
@@ -10798,7 +10798,46 @@ $as_echo "$_found_readline" >&6; }
if test $_found_readline = yes ; then
case $host_os in
- *bsd* ) _combo="$_combo -ltermcap"
+ *bsd* ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
+$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+if ${ac_cv_lib_termcap_tgetent+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltermcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_termcap_tgetent=yes
+else
+ ac_cv_lib_termcap_tgetent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
+$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
+ _combo="$_combo -ltermcap"
+fi
+
;;
esac
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f431b70a..a305dce6 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-13 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in: Comment out exercise 10.3, since the answer
+ is included in the text. Thanks to Antonio Colombo
+ for pointing this out.
+
2015-06-12 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Add another pithy quote from Chet Ramey. Currently
diff --git a/doc/gawk.info b/doc/gawk.info
index 99f29492..53e11012 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -16541,23 +16541,6 @@ File: gawk.info, Node: Library Exercises, Prev: Library Functions Summary, Up
2. As a related challenge, revise that code to handle the case where
an intervening value in 'ARGV' is a variable assignment.
- 3. *note Walking Arrays::, presented a function that walked a
- multidimensional array to print it out. However, walking an array
- and processing each element is a general-purpose operation.
- Generalize the 'walk_array()' function by adding an additional
- parameter named 'process'.
-
- Then, inside the loop, instead of printing the array element's
- index and value, use the indirect function call syntax (*note
- Indirect Calls::) on 'process', passing it the index and the value.
-
- When calling 'walk_array()', you would pass the name of a
- user-defined function that expects to receive an index and a value,
- and then processes the element.
-
- Test your new version by printing the array; you should end up with
- output identical to that of the original version.
-

File: gawk.info, Node: Sample Programs, Next: Advanced Features, Prev: Library Functions, Up: Top
@@ -35284,257 +35267,257 @@ Ref: Group Functions-Footnote-1680639
Node: Walking Arrays680846
Node: Library Functions Summary683856
Node: Library Exercises685262
-Node: Sample Programs686541
-Node: Running Examples687311
-Node: Clones688039
-Node: Cut Program689263
-Node: Egrep Program698984
-Ref: Egrep Program-Footnote-1706496
-Node: Id Program706606
-Node: Split Program710286
-Ref: Split Program-Footnote-1713745
-Node: Tee Program713874
-Node: Uniq Program716664
-Node: Wc Program724090
-Ref: Wc Program-Footnote-1728345
-Node: Miscellaneous Programs728439
-Node: Dupword Program729652
-Node: Alarm Program731682
-Node: Translate Program736537
-Ref: Translate Program-Footnote-1741102
-Node: Labels Program741372
-Ref: Labels Program-Footnote-1744723
-Node: Word Sorting744807
-Node: History Sorting748879
-Node: Extract Program750714
-Node: Simple Sed758245
-Node: Igawk Program761319
-Ref: Igawk Program-Footnote-1775650
-Ref: Igawk Program-Footnote-2775852
-Ref: Igawk Program-Footnote-3775974
-Node: Anagram Program776089
-Node: Signature Program779151
-Node: Programs Summary780398
-Node: Programs Exercises781613
-Ref: Programs Exercises-Footnote-1785742
-Node: Advanced Features785833
-Node: Nondecimal Data787823
-Node: Array Sorting789414
-Node: Controlling Array Traversal790114
-Ref: Controlling Array Traversal-Footnote-1798483
-Node: Array Sorting Functions798601
-Ref: Array Sorting Functions-Footnote-1802488
-Node: Two-way I/O802684
-Ref: Two-way I/O-Footnote-1807635
-Ref: Two-way I/O-Footnote-2807822
-Node: TCP/IP Networking807904
-Node: Profiling810811
-Node: Advanced Features Summary819082
-Node: Internationalization821018
-Node: I18N and L10N822498
-Node: Explaining gettext823185
-Ref: Explaining gettext-Footnote-1828208
-Ref: Explaining gettext-Footnote-2828393
-Node: Programmer i18n828558
-Ref: Programmer i18n-Footnote-1833414
-Node: Translator i18n833463
-Node: String Extraction834257
-Ref: String Extraction-Footnote-1835390
-Node: Printf Ordering835476
-Ref: Printf Ordering-Footnote-1838262
-Node: I18N Portability838326
-Ref: I18N Portability-Footnote-1840782
-Node: I18N Example840845
-Ref: I18N Example-Footnote-1843651
-Node: Gawk I18N843724
-Node: I18N Summary844369
-Node: Debugger845710
-Node: Debugging846732
-Node: Debugging Concepts847173
-Node: Debugging Terms848982
-Node: Awk Debugging851557
-Node: Sample Debugging Session852463
-Node: Debugger Invocation852997
-Node: Finding The Bug854383
-Node: List of Debugger Commands860861
-Node: Breakpoint Control862194
-Node: Debugger Execution Control865888
-Node: Viewing And Changing Data869250
-Node: Execution Stack872624
-Node: Debugger Info874261
-Node: Miscellaneous Debugger Commands878332
-Node: Readline Support883341
-Node: Limitations884237
-Node: Debugging Summary886346
-Node: Arbitrary Precision Arithmetic887519
-Node: Computer Arithmetic888935
-Ref: table-numeric-ranges892526
-Ref: Computer Arithmetic-Footnote-1893248
-Node: Math Definitions893305
-Ref: table-ieee-formats896619
-Ref: Math Definitions-Footnote-1897222
-Node: MPFR features897327
-Node: FP Math Caution899000
-Ref: FP Math Caution-Footnote-1900072
-Node: Inexactness of computations900441
-Node: Inexact representation901401
-Node: Comparing FP Values902761
-Node: Errors accumulate903843
-Node: Getting Accuracy905276
-Node: Try To Round907986
-Node: Setting precision908885
-Ref: table-predefined-precision-strings909582
-Node: Setting the rounding mode911412
-Ref: table-gawk-rounding-modes911786
-Ref: Setting the rounding mode-Footnote-1915194
-Node: Arbitrary Precision Integers915373
-Ref: Arbitrary Precision Integers-Footnote-1920290
-Node: POSIX Floating Point Problems920439
-Ref: POSIX Floating Point Problems-Footnote-1924321
-Node: Floating point summary924359
-Node: Dynamic Extensions926549
-Node: Extension Intro928102
-Node: Plugin License929368
-Node: Extension Mechanism Outline930165
-Ref: figure-load-extension930604
-Ref: figure-register-new-function932169
-Ref: figure-call-new-function933261
-Node: Extension API Description935324
-Node: Extension API Functions Introduction936858
-Node: General Data Types941717
-Ref: General Data Types-Footnote-1947672
-Node: Memory Allocation Functions947971
-Ref: Memory Allocation Functions-Footnote-1950816
-Node: Constructor Functions950915
-Node: Registration Functions952660
-Node: Extension Functions953345
-Node: Exit Callback Functions955644
-Node: Extension Version String956894
-Node: Input Parsers957557
-Node: Output Wrappers967442
-Node: Two-way processors971954
-Node: Printing Messages974218
-Ref: Printing Messages-Footnote-1975294
-Node: Updating 'ERRNO'975447
-Node: Requesting Values976188
-Ref: table-value-types-returned976927
-Node: Accessing Parameters977810
-Node: Symbol Table Access979046
-Node: Symbol table by name979558
-Node: Symbol table by cookie981579
-Ref: Symbol table by cookie-Footnote-1985728
-Node: Cached values985792
-Ref: Cached values-Footnote-1989293
-Node: Array Manipulation989384
-Ref: Array Manipulation-Footnote-1990475
-Node: Array Data Types990512
-Ref: Array Data Types-Footnote-1993170
-Node: Array Functions993262
-Node: Flattening Arrays997121
-Node: Creating Arrays1004029
-Node: Redirection API1008801
-Node: Extension API Variables1011632
-Node: Extension Versioning1012265
-Node: Extension API Informational Variables1014156
-Node: Extension API Boilerplate1015220
-Node: Finding Extensions1019034
-Node: Extension Example1019594
-Node: Internal File Description1020392
-Node: Internal File Ops1024472
-Ref: Internal File Ops-Footnote-11036234
-Node: Using Internal File Ops1036374
-Ref: Using Internal File Ops-Footnote-11038757
-Node: Extension Samples1039032
-Node: Extension Sample File Functions1040561
-Node: Extension Sample Fnmatch1048210
-Node: Extension Sample Fork1049697
-Node: Extension Sample Inplace1050915
-Node: Extension Sample Ord1053001
-Node: Extension Sample Readdir1053837
-Ref: table-readdir-file-types1054726
-Node: Extension Sample Revout1055531
-Node: Extension Sample Rev2way1056120
-Node: Extension Sample Read write array1056860
-Node: Extension Sample Readfile1058802
-Node: Extension Sample Time1059897
-Node: Extension Sample API Tests1061245
-Node: gawkextlib1061737
-Node: Extension summary1064184
-Node: Extension Exercises1067876
-Node: Language History1069373
-Node: V7/SVR3.11071029
-Node: SVR41073182
-Node: POSIX1074616
-Node: BTL1075996
-Node: POSIX/GNU1076726
-Node: Feature History1082565
-Node: Common Extensions1096884
-Node: Ranges and Locales1098167
-Ref: Ranges and Locales-Footnote-11102783
-Ref: Ranges and Locales-Footnote-21102810
-Ref: Ranges and Locales-Footnote-31103045
-Node: Contributors1103266
-Node: History summary1108835
-Node: Installation1110215
-Node: Gawk Distribution1111160
-Node: Getting1111644
-Node: Extracting1112467
-Node: Distribution contents1114105
-Node: Unix Installation1120201
-Node: Quick Installation1120883
-Node: Shell Startup Files1123297
-Node: Additional Configuration Options1124375
-Node: Configuration Philosophy1126180
-Node: Non-Unix Installation1128550
-Node: PC Installation1129008
-Node: PC Binary Installation1130328
-Node: PC Compiling1132180
-Ref: PC Compiling-Footnote-11135204
-Node: PC Testing1135313
-Node: PC Using1136493
-Node: Cygwin1140607
-Node: MSYS1141377
-Node: VMS Installation1141878
-Node: VMS Compilation1142669
-Ref: VMS Compilation-Footnote-11143899
-Node: VMS Dynamic Extensions1143957
-Node: VMS Installation Details1145642
-Node: VMS Running1147895
-Node: VMS GNV1150736
-Node: VMS Old Gawk1151471
-Node: Bugs1151942
-Node: Other Versions1156056
-Node: Installation summary1162530
-Node: Notes1163588
-Node: Compatibility Mode1164453
-Node: Additions1165235
-Node: Accessing The Source1166160
-Node: Adding Code1167596
-Node: New Ports1173751
-Node: Derived Files1178239
-Ref: Derived Files-Footnote-11183724
-Ref: Derived Files-Footnote-21183759
-Ref: Derived Files-Footnote-31184357
-Node: Future Extensions1184471
-Node: Implementation Limitations1185129
-Node: Extension Design1186312
-Node: Old Extension Problems1187466
-Ref: Old Extension Problems-Footnote-11188984
-Node: Extension New Mechanism Goals1189041
-Ref: Extension New Mechanism Goals-Footnote-11192405
-Node: Extension Other Design Decisions1192594
-Node: Extension Future Growth1194707
-Node: Old Extension Mechanism1195543
-Node: Notes summary1197306
-Node: Basic Concepts1198488
-Node: Basic High Level1199169
-Ref: figure-general-flow1199451
-Ref: figure-process-flow1200136
-Ref: Basic High Level-Footnote-11203437
-Node: Basic Data Typing1203622
-Node: Glossary1206950
-Node: Copying1238896
-Node: GNU Free Documentation License1276435
-Node: Index1301553
+Node: Sample Programs685727
+Node: Running Examples686497
+Node: Clones687225
+Node: Cut Program688449
+Node: Egrep Program698170
+Ref: Egrep Program-Footnote-1705682
+Node: Id Program705792
+Node: Split Program709472
+Ref: Split Program-Footnote-1712931
+Node: Tee Program713060
+Node: Uniq Program715850
+Node: Wc Program723276
+Ref: Wc Program-Footnote-1727531
+Node: Miscellaneous Programs727625
+Node: Dupword Program728838
+Node: Alarm Program730868
+Node: Translate Program735723
+Ref: Translate Program-Footnote-1740288
+Node: Labels Program740558
+Ref: Labels Program-Footnote-1743909
+Node: Word Sorting743993
+Node: History Sorting748065
+Node: Extract Program749900
+Node: Simple Sed757431
+Node: Igawk Program760505
+Ref: Igawk Program-Footnote-1774836
+Ref: Igawk Program-Footnote-2775038
+Ref: Igawk Program-Footnote-3775160
+Node: Anagram Program775275
+Node: Signature Program778337
+Node: Programs Summary779584
+Node: Programs Exercises780799
+Ref: Programs Exercises-Footnote-1784928
+Node: Advanced Features785019
+Node: Nondecimal Data787009
+Node: Array Sorting788600
+Node: Controlling Array Traversal789300
+Ref: Controlling Array Traversal-Footnote-1797669
+Node: Array Sorting Functions797787
+Ref: Array Sorting Functions-Footnote-1801674
+Node: Two-way I/O801870
+Ref: Two-way I/O-Footnote-1806821
+Ref: Two-way I/O-Footnote-2807008
+Node: TCP/IP Networking807090
+Node: Profiling809997
+Node: Advanced Features Summary818268
+Node: Internationalization820204
+Node: I18N and L10N821684
+Node: Explaining gettext822371
+Ref: Explaining gettext-Footnote-1827394
+Ref: Explaining gettext-Footnote-2827579
+Node: Programmer i18n827744
+Ref: Programmer i18n-Footnote-1832600
+Node: Translator i18n832649
+Node: String Extraction833443
+Ref: String Extraction-Footnote-1834576
+Node: Printf Ordering834662
+Ref: Printf Ordering-Footnote-1837448
+Node: I18N Portability837512
+Ref: I18N Portability-Footnote-1839968
+Node: I18N Example840031
+Ref: I18N Example-Footnote-1842837
+Node: Gawk I18N842910
+Node: I18N Summary843555
+Node: Debugger844896
+Node: Debugging845918
+Node: Debugging Concepts846359
+Node: Debugging Terms848168
+Node: Awk Debugging850743
+Node: Sample Debugging Session851649
+Node: Debugger Invocation852183
+Node: Finding The Bug853569
+Node: List of Debugger Commands860047
+Node: Breakpoint Control861380
+Node: Debugger Execution Control865074
+Node: Viewing And Changing Data868436
+Node: Execution Stack871810
+Node: Debugger Info873447
+Node: Miscellaneous Debugger Commands877518
+Node: Readline Support882527
+Node: Limitations883423
+Node: Debugging Summary885532
+Node: Arbitrary Precision Arithmetic886705
+Node: Computer Arithmetic888121
+Ref: table-numeric-ranges891712
+Ref: Computer Arithmetic-Footnote-1892434
+Node: Math Definitions892491
+Ref: table-ieee-formats895805
+Ref: Math Definitions-Footnote-1896408
+Node: MPFR features896513
+Node: FP Math Caution898186
+Ref: FP Math Caution-Footnote-1899258
+Node: Inexactness of computations899627
+Node: Inexact representation900587
+Node: Comparing FP Values901947
+Node: Errors accumulate903029
+Node: Getting Accuracy904462
+Node: Try To Round907172
+Node: Setting precision908071
+Ref: table-predefined-precision-strings908768
+Node: Setting the rounding mode910598
+Ref: table-gawk-rounding-modes910972
+Ref: Setting the rounding mode-Footnote-1914380
+Node: Arbitrary Precision Integers914559
+Ref: Arbitrary Precision Integers-Footnote-1919476
+Node: POSIX Floating Point Problems919625
+Ref: POSIX Floating Point Problems-Footnote-1923507
+Node: Floating point summary923545
+Node: Dynamic Extensions925735
+Node: Extension Intro927288
+Node: Plugin License928554
+Node: Extension Mechanism Outline929351
+Ref: figure-load-extension929790
+Ref: figure-register-new-function931355
+Ref: figure-call-new-function932447
+Node: Extension API Description934510
+Node: Extension API Functions Introduction936044
+Node: General Data Types940903
+Ref: General Data Types-Footnote-1946858
+Node: Memory Allocation Functions947157
+Ref: Memory Allocation Functions-Footnote-1950002
+Node: Constructor Functions950101
+Node: Registration Functions951846
+Node: Extension Functions952531
+Node: Exit Callback Functions954830
+Node: Extension Version String956080
+Node: Input Parsers956743
+Node: Output Wrappers966628
+Node: Two-way processors971140
+Node: Printing Messages973404
+Ref: Printing Messages-Footnote-1974480
+Node: Updating 'ERRNO'974633
+Node: Requesting Values975374
+Ref: table-value-types-returned976113
+Node: Accessing Parameters976996
+Node: Symbol Table Access978232
+Node: Symbol table by name978744
+Node: Symbol table by cookie980765
+Ref: Symbol table by cookie-Footnote-1984914
+Node: Cached values984978
+Ref: Cached values-Footnote-1988479
+Node: Array Manipulation988570
+Ref: Array Manipulation-Footnote-1989661
+Node: Array Data Types989698
+Ref: Array Data Types-Footnote-1992356
+Node: Array Functions992448
+Node: Flattening Arrays996307
+Node: Creating Arrays1003215
+Node: Redirection API1007987
+Node: Extension API Variables1010818
+Node: Extension Versioning1011451
+Node: Extension API Informational Variables1013342
+Node: Extension API Boilerplate1014406
+Node: Finding Extensions1018220
+Node: Extension Example1018780
+Node: Internal File Description1019578
+Node: Internal File Ops1023658
+Ref: Internal File Ops-Footnote-11035420
+Node: Using Internal File Ops1035560
+Ref: Using Internal File Ops-Footnote-11037943
+Node: Extension Samples1038218
+Node: Extension Sample File Functions1039747
+Node: Extension Sample Fnmatch1047396
+Node: Extension Sample Fork1048883
+Node: Extension Sample Inplace1050101
+Node: Extension Sample Ord1052187
+Node: Extension Sample Readdir1053023
+Ref: table-readdir-file-types1053912
+Node: Extension Sample Revout1054717
+Node: Extension Sample Rev2way1055306
+Node: Extension Sample Read write array1056046
+Node: Extension Sample Readfile1057988
+Node: Extension Sample Time1059083
+Node: Extension Sample API Tests1060431
+Node: gawkextlib1060923
+Node: Extension summary1063370
+Node: Extension Exercises1067062
+Node: Language History1068559
+Node: V7/SVR3.11070215
+Node: SVR41072368
+Node: POSIX1073802
+Node: BTL1075182
+Node: POSIX/GNU1075912
+Node: Feature History1081751
+Node: Common Extensions1096070
+Node: Ranges and Locales1097353
+Ref: Ranges and Locales-Footnote-11101969
+Ref: Ranges and Locales-Footnote-21101996
+Ref: Ranges and Locales-Footnote-31102231
+Node: Contributors1102452
+Node: History summary1108021
+Node: Installation1109401
+Node: Gawk Distribution1110346
+Node: Getting1110830
+Node: Extracting1111653
+Node: Distribution contents1113291
+Node: Unix Installation1119387
+Node: Quick Installation1120069
+Node: Shell Startup Files1122483
+Node: Additional Configuration Options1123561
+Node: Configuration Philosophy1125366
+Node: Non-Unix Installation1127736
+Node: PC Installation1128194
+Node: PC Binary Installation1129514
+Node: PC Compiling1131366
+Ref: PC Compiling-Footnote-11134390
+Node: PC Testing1134499
+Node: PC Using1135679
+Node: Cygwin1139793
+Node: MSYS1140563
+Node: VMS Installation1141064
+Node: VMS Compilation1141855
+Ref: VMS Compilation-Footnote-11143085
+Node: VMS Dynamic Extensions1143143
+Node: VMS Installation Details1144828
+Node: VMS Running1147081
+Node: VMS GNV1149922
+Node: VMS Old Gawk1150657
+Node: Bugs1151128
+Node: Other Versions1155242
+Node: Installation summary1161716
+Node: Notes1162774
+Node: Compatibility Mode1163639
+Node: Additions1164421
+Node: Accessing The Source1165346
+Node: Adding Code1166782
+Node: New Ports1172937
+Node: Derived Files1177425
+Ref: Derived Files-Footnote-11182910
+Ref: Derived Files-Footnote-21182945
+Ref: Derived Files-Footnote-31183543
+Node: Future Extensions1183657
+Node: Implementation Limitations1184315
+Node: Extension Design1185498
+Node: Old Extension Problems1186652
+Ref: Old Extension Problems-Footnote-11188170
+Node: Extension New Mechanism Goals1188227
+Ref: Extension New Mechanism Goals-Footnote-11191591
+Node: Extension Other Design Decisions1191780
+Node: Extension Future Growth1193893
+Node: Old Extension Mechanism1194729
+Node: Notes summary1196492
+Node: Basic Concepts1197674
+Node: Basic High Level1198355
+Ref: figure-general-flow1198637
+Ref: figure-process-flow1199322
+Ref: Basic High Level-Footnote-11202623
+Node: Basic Data Typing1202808
+Node: Glossary1206136
+Node: Copying1238082
+Node: GNU Free Documentation License1275621
+Node: Index1300739

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 328fc9a6..d440a618 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -23434,6 +23434,8 @@ END @{
As a related challenge, revise that code to handle the case where
an intervening value in @code{ARGV} is a variable assignment.
+@ignore
+@c June 13 2015: Antonio points out that this is answered in the text. Ooops.
@item
@DBREF{Walking Arrays} presented a function that walked a multidimensional
array to print it out. However, walking an array and processing
@@ -23451,6 +23453,7 @@ and then processes the element.
Test your new version by printing the array; you should end up with
output identical to that of the original version.
+@end ignore
@end enumerate
@c EXCLUDE END
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index bfee15b9..c95b777d 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -22525,6 +22525,8 @@ END @{
As a related challenge, revise that code to handle the case where
an intervening value in @code{ARGV} is a variable assignment.
+@ignore
+@c June 13 2015: Antonio points out that this is answered in the text. Ooops.
@item
@DBREF{Walking Arrays} presented a function that walked a multidimensional
array to print it out. However, walking an array and processing
@@ -22542,6 +22544,7 @@ and then processes the element.
Test your new version by printing the array; you should end up with
output identical to that of the original version.
+@end ignore
@end enumerate
@c EXCLUDE END
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 82e0dabe..f271d0ef 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-15 Yuta SATOH <nigoro@gentoo.gr.jp>
+
+ * readline.m4: Add check for libtermcap on Gentoo/FreeBSD.
+
2015-05-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.3: Release tar ball made.
diff --git a/m4/readline.m4 b/m4/readline.m4
index 740b9c7b..5c0bb1ea 100644
--- a/m4/readline.m4
+++ b/m4/readline.m4
@@ -92,7 +92,7 @@ dnl action if not found:
if test $_found_readline = yes ; then
case $host_os in
- *bsd* ) _combo="$_combo -ltermcap"
+ *bsd* ) AC_CHECK_LIB(termcap, tgetent, _combo="$_combo -ltermcap")
;;
esac
AC_DEFINE(HAVE_LIBREADLINE,1,
diff --git a/regcomp.c b/regcomp.c
index cdac1924..773af291 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -235,7 +235,7 @@ btowc (int c)
compiles PATTERN (of length LENGTH) and puts the result in BUFP.
Returns 0 if the pattern was valid, otherwise an error string.
- Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
are set in BUFP on entry. */
const char *
@@ -264,7 +264,7 @@ re_compile_pattern (pattern, length, bufp)
weak_alias (__re_compile_pattern, re_compile_pattern)
#endif
-/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+/* Set by 're_set_syntax' to the current regexp syntax to recognize. Can
also be assigned to arbitrarily: each pattern buffer stores its own
syntax, so it can be changed between regex compilations. */
/* This has no initializer because initialized variables in Emacs
@@ -315,8 +315,8 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
#endif
static inline void
-__attribute ((always_inline))
-re_set_fastmap (char *fastmap, int icase, int ch)
+__attribute__ ((always_inline))
+re_set_fastmap (char *fastmap, bool icase, int ch)
{
fastmap[ch] = 1;
if (icase)
@@ -462,15 +462,15 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
PREG is a regex_t *. We do not expect any fields to be initialized,
since POSIX says we shouldn't. Thus, we set
- `buffer' to the compiled pattern;
- `used' to the length of the compiled pattern;
- `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ 'buffer' to the compiled pattern;
+ 'used' to the length of the compiled pattern;
+ 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the
REG_EXTENDED bit in CFLAGS is set; otherwise, to
RE_SYNTAX_POSIX_BASIC;
- `newline_anchor' to REG_NEWLINE being set in CFLAGS;
- `fastmap' to an allocated space for the fastmap;
- `fastmap_accurate' to zero;
- `re_nsub' to the number of subexpressions in PATTERN.
+ 'newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ 'fastmap' to an allocated space for the fastmap;
+ 'fastmap_accurate' to zero;
+ 're_nsub' to the number of subexpressions in PATTERN.
PATTERN is the address of the pattern string.
@@ -730,7 +730,7 @@ re_comp (s)
+ __re_error_msgid_idx[(int) REG_ESPACE]);
}
- /* Since `re_exec' always passes NULL for the `regs' argument, we
+ /* Since 're_exec' always passes NULL for the 'regs' argument, we
don't need to initialize the pattern buffer fields which affect it. */
/* Match anchors at newlines. */
@@ -1558,7 +1558,7 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
destination. */
org_dest = dfa->edests[org_node].elems[0];
re_node_set_empty (dfa->edests + clone_node);
- /* If the node is root_node itself, it means the epsilon clsoure
+ /* If the node is root_node itself, it means the epsilon closure
has a loop. Then tie it to the destination of the root_node. */
if (org_node == root_node && clone_node != org_node)
{
@@ -1567,7 +1567,7 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
return REG_ESPACE;
break;
}
- /* In case of the node has another constraint, add it. */
+ /* In case the node has another constraint, append it. */
constraint |= dfa->nodes[org_node].constraint;
clone_dest = duplicate_node (dfa, org_dest, constraint);
if (BE (clone_dest == -1, 0))
@@ -1710,7 +1710,7 @@ calc_eclosure (re_dfa_t *dfa)
/* If we have already calculated, skip it. */
if (dfa->eclosures[node_idx].nelem != 0)
continue;
- /* Calculate epsilon closure of `node_idx'. */
+ /* Calculate epsilon closure of 'node_idx'. */
err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -1777,11 +1777,11 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
}
else
eclosure_elem = dfa->eclosures[edest];
- /* Merge the epsilon closure of `edest'. */
+ /* Merge the epsilon closure of 'edest'. */
err = re_node_set_merge (&eclosure, &eclosure_elem);
if (BE (err != REG_NOERROR, 0))
return err;
- /* If the epsilon closure of `edest' is incomplete,
+ /* If the epsilon closure of 'edest' is incomplete,
the epsilon closure of this node is also incomplete. */
if (dfa->eclosures[edest].nelem == 0)
{
@@ -2143,7 +2143,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
/* Entry point of the parser.
Parse the regular expression REGEXP and return the structure tree.
- If an error is occured, ERR is set by error code, and return NULL.
+ If an error occurs, ERR is set by error code, and return NULL.
This function build the following tree, from regular expression <reg_exp>:
CAT
/ \
@@ -2185,7 +2185,7 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
/ \
<branch1> <branch2>
- ALT means alternative, which represents the operator `|'. */
+ ALT means alternative, which represents the operator '|'. */
static bin_tree_t *
parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
@@ -2681,7 +2681,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
- mbcset->range_ends, is a pointer argument sinse we may
+ mbcset->range_ends, is a pointer argument since we may
update it. */
static reg_errcode_t
@@ -2855,13 +2855,13 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
const int32_t *symb_table;
const unsigned char *extra;
- /* Local function for parse_bracket_exp used in _LIBC environement.
- Seek the collating symbol entry correspondings to NAME.
+ /* Local function for parse_bracket_exp used in _LIBC environment.
+ Seek the collating symbol entry corresponding to NAME.
Return the index of the symbol in the SYMB_TABLE,
or -1 if not found. */
auto inline int32_t
- __attribute ((always_inline))
+ __attribute__ ((always_inline))
seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
{
int32_t elem;
@@ -2887,7 +2887,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
Return the value if succeeded, UINT_MAX otherwise. */
auto inline unsigned int
- __attribute ((always_inline))
+ __attribute__ ((always_inline))
lookup_collation_sequence_value (bracket_elem_t *br_elem)
{
if (br_elem->type == SB_CHAR)
@@ -2947,15 +2947,15 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return UINT_MAX;
}
- /* Local function for parse_bracket_exp used in _LIBC environement.
+ /* Local function for parse_bracket_exp used in _LIBC environment.
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
- mbcset->range_ends, is a pointer argument sinse we may
+ mbcset->range_ends, is a pointer argument since we may
update it. */
auto inline reg_errcode_t
- __attribute ((always_inline))
+ __attribute__ ((always_inline))
build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
bracket_elem_t *start_elem, bracket_elem_t *end_elem)
{
@@ -3028,14 +3028,14 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return REG_NOERROR;
}
- /* Local function for parse_bracket_exp used in _LIBC environement.
+ /* Local function for parse_bracket_exp used in _LIBC environment.
Build the collating element which is represented by NAME.
The result are written to MBCSET and SBCSET.
COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
- pointer argument sinse we may update it. */
+ pointer argument since we may update it. */
auto inline reg_errcode_t
- __attribute ((always_inline))
+ __attribute__ ((always_inline))
build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
int *coll_sym_alloc, const unsigned char *name)
{
@@ -3474,7 +3474,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
Build the equivalence class which is represented by NAME.
The result are written to MBCSET and SBCSET.
EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
- is a pointer argument sinse we may update it. */
+ is a pointer argument since we may update it. */
static reg_errcode_t
#ifdef RE_ENABLE_I18N
@@ -3568,7 +3568,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
Build the character class which is represented by NAME.
The result are written to MBCSET and SBCSET.
CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
- is a pointer argument sinse we may update it. */
+ is a pointer argument since we may update it. */
static reg_errcode_t
#ifdef RE_ENABLE_I18N
diff --git a/regex_internal.c b/regex_internal.c
index 5a5b9363..fcfa4ada 100644
--- a/regex_internal.c
+++ b/regex_internal.c
@@ -838,7 +838,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
}
static unsigned char
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_string_peek_byte_case (const re_string_t *pstr, int idx)
{
int ch, off;
@@ -1370,7 +1370,7 @@ re_node_set_insert_last (re_node_set *set, int elem)
return 1 if SET1 and SET2 are equivalent, return 0 otherwise. */
static int
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
{
int i;
@@ -1385,7 +1385,7 @@ re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
static int
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_node_set_contains (const re_node_set *set, int elem)
{
unsigned int idx, right, mid;
diff --git a/regex_internal.h b/regex_internal.h
index 327bd7e0..4d0028ff 100644
--- a/regex_internal.h
+++ b/regex_internal.h
@@ -148,11 +148,8 @@ is_blank (int c)
# define attribute_hidden
#endif /* not _LIBC */
-#ifdef __GNUC__
-# define __attribute(arg) __attribute__ (arg)
-#else
-# define __attribute(arg)
-# define __attribute__(arg) /* GAWK: They left this out. Duh. */
+#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
+# define __attribute__(arg)
#endif
#ifdef GAWK
@@ -803,6 +800,10 @@ re_string_wchar_at (const re_string_t *pstr, int idx)
}
# ifndef NOT_IN_libc
+# ifdef _LIBC
+# include <locale/weight.h>
+# endif
+
static int
internal_function __attribute__ ((pure, unused))
re_string_elem_size_at (const re_string_t *pstr, int idx)
@@ -810,7 +811,6 @@ re_string_elem_size_at (const re_string_t *pstr, int idx)
# ifdef _LIBC
const unsigned char *p, *extra;
const int32_t *table, *indirect;
-# include <locale/weight.h>
uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
if (nrules != 0)
diff --git a/regexec.c b/regexec.c
index 46a4d0ae..cff69bfc 100644
--- a/regexec.c
+++ b/regexec.c
@@ -17,6 +17,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif /* HAVE_STDINT_H */
+
static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
int n) internal_function;
static void match_ctx_clean (re_match_context_t *mctx) internal_function;
@@ -1055,7 +1059,7 @@ prune_impossible_nodes (mctx)
since initial states may have constraints like "\<", "^", etc.. */
static inline re_dfastate_t *
-__attribute ((always_inline)) internal_function
+__attribute__ ((always_inline)) internal_function
acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
int idx)
{