aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/gawk.info1040
-rw-r--r--doc/gawk.texi9
-rw-r--r--doc/gawktexi.in9
-rw-r--r--regcomp.c32
-rw-r--r--regex.c2
-rw-r--r--regex.h2
-rw-r--r--regex_internal.c18
-rw-r--r--regex_internal.h6
-rw-r--r--regexec.c90
11 files changed, 610 insertions, 608 deletions
diff --git a/ChangeLog b/ChangeLog
index 778d1e4f..0b0a01eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
+ regexec.c: Sync with GLIBC, mostly prototype changes.
+
2016-02-18 Arnold D. Robbins <arnold@skeeve.com>
Fix profile / pretty-printing to chain else-ifs.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 6017ee44..a8c33d4d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-20 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexilin (Bracket Expressions): Add a small note about
+ Unicode in bracket expressions.
+
2016-02-18 Arnold D. Robbins <arnold@skeeve.com>
* gawktexi.in: Fixes in wc.awk and in cut.awk. Thanks to David Ward,
diff --git a/doc/gawk.info b/doc/gawk.info
index 35484814..cf6a1356 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -3732,6 +3732,14 @@ character set. For example, '[0-9]' is equivalent to '[0123456789]'.
standard and 'gawk' have changed over time. This is mainly of
historical interest.)
+ With the increasing popularity of the Unicode character standard
+(http://www.unicode.org), there is an additional wrinkle to consider.
+Octal and hexadecimal escape sequences inside bracket expressions are
+taken to represent only single-byte characters (characters whose values
+fit within the range 0-256). To match a range of characters where the
+endpoints of the range are larger than 256, enter the multibyte
+encodings of the characters directly.
+
To include one of the characters '\', ']', '-', or '^' in a bracket
expression, put a '\' in front of it. For example:
@@ -32138,7 +32146,7 @@ Index
* - (hyphen), -= operator: Assignment Ops. (line 129)
* - (hyphen), -= operator <1>: Precedence. (line 94)
* - (hyphen), filenames beginning with: Options. (line 60)
-* - (hyphen), in bracket expressions: Bracket Expressions. (line 17)
+* - (hyphen), in bracket expressions: Bracket Expressions. (line 25)
* --assign option: Options. (line 32)
* --bignum option: Options. (line 203)
* --characters-as-bytes option: Options. (line 69)
@@ -32293,7 +32301,7 @@ Index
(line 43)
* \ (backslash), gsub()/gensub()/sub() functions and: Gory Details.
(line 6)
-* \ (backslash), in bracket expressions: Bracket Expressions. (line 17)
+* \ (backslash), in bracket expressions: Bracket Expressions. (line 25)
* \ (backslash), in escape sequences: Escape Sequences. (line 6)
* \ (backslash), in escape sequences <1>: Escape Sequences. (line 103)
* \ (backslash), in escape sequences, POSIX and: Escape Sequences.
@@ -32332,7 +32340,7 @@ Index
(line 41)
* \ (backslash), \` operator (gawk): GNU Regexp Operators.
(line 57)
-* ^ (caret), in bracket expressions: Bracket Expressions. (line 17)
+* ^ (caret), in bracket expressions: Bracket Expressions. (line 25)
* ^ (caret), in FS: Regexp Field Splitting.
(line 59)
* ^ (caret), regexp operator: Regexp Operators. (line 22)
@@ -32590,7 +32598,7 @@ Index
(line 43)
* backslash (\), gsub()/gensub()/sub() functions and: Gory Details.
(line 6)
-* backslash (\), in bracket expressions: Bracket Expressions. (line 17)
+* backslash (\), in bracket expressions: Bracket Expressions. (line 25)
* backslash (\), in escape sequences: Escape Sequences. (line 6)
* backslash (\), in escape sequences <1>: Escape Sequences. (line 103)
* backslash (\), in escape sequences, POSIX and: Escape Sequences.
@@ -32691,15 +32699,15 @@ Index
* bracket expressions: Regexp Operators. (line 56)
* bracket expressions <1>: Bracket Expressions. (line 6)
* bracket expressions, character classes: Bracket Expressions.
- (line 32)
+ (line 40)
* bracket expressions, collating elements: Bracket Expressions.
- (line 78)
+ (line 86)
* bracket expressions, collating symbols: Bracket Expressions.
- (line 85)
+ (line 93)
* bracket expressions, complemented: Regexp Operators. (line 64)
* bracket expressions, equivalence classes: Bracket Expressions.
- (line 91)
-* bracket expressions, non-ASCII: Bracket Expressions. (line 78)
+ (line 99)
+* bracket expressions, non-ASCII: Bracket Expressions. (line 86)
* bracket expressions, range expressions: Bracket Expressions.
(line 6)
* break debugger command: Breakpoint Control. (line 11)
@@ -32764,7 +32772,7 @@ Index
* call by value: Pass By Value/Reference.
(line 15)
* call stack, display in debugger: Execution Stack. (line 13)
-* caret (^), in bracket expressions: Bracket Expressions. (line 17)
+* caret (^), in bracket expressions: Bracket Expressions. (line 25)
* caret (^), regexp operator: Regexp Operators. (line 22)
* caret (^), regexp operator <1>: GNU Regexp Operators.
(line 62)
@@ -32816,8 +32824,8 @@ Index
* Close, Diane: Manual History. (line 34)
* Close, Diane <1>: Contributors. (line 21)
* Collado, Manuel: Acknowledgments. (line 60)
-* collating elements: Bracket Expressions. (line 78)
-* collating symbols: Bracket Expressions. (line 85)
+* collating elements: Bracket Expressions. (line 86)
+* collating symbols: Bracket Expressions. (line 93)
* Colombo, Antonio: Acknowledgments. (line 60)
* Colombo, Antonio <1>: Contributors. (line 141)
* columns, aligning: Print Examples. (line 69)
@@ -33248,7 +33256,7 @@ Index
* EBCDIC: Ordinal Functions. (line 45)
* effective group ID of gawk user: Auto-set. (line 153)
* effective user ID of gawk user: Auto-set. (line 161)
-* egrep utility: Bracket Expressions. (line 26)
+* egrep utility: Bracket Expressions. (line 34)
* egrep utility <1>: Egrep Program. (line 6)
* egrep.awk program: Egrep Program. (line 53)
* elements in arrays, assigning values: Assigning Elements. (line 6)
@@ -33300,7 +33308,7 @@ Index
* equals sign (=), == operator: Comparison Operators.
(line 11)
* equals sign (=), == operator <1>: Precedence. (line 64)
-* EREs (Extended Regular Expressions): Bracket Expressions. (line 26)
+* EREs (Extended Regular Expressions): Bracket Expressions. (line 34)
* ERRNO variable: Auto-set. (line 87)
* ERRNO variable <1>: TCP/IP Networking. (line 54)
* ERRNO variable, with BEGINFILE pattern: BEGINFILE/ENDFILE. (line 26)
@@ -33361,7 +33369,7 @@ Index
* expressions, matching, See comparison expressions: Typing and Comparison.
(line 9)
* expressions, selecting: Conditional Exp. (line 6)
-* Extended Regular Expressions (EREs): Bracket Expressions. (line 26)
+* Extended Regular Expressions (EREs): Bracket Expressions. (line 34)
* extension API: Extension API Description.
(line 6)
* extension API informational variables: Extension API Informational Variables.
@@ -33630,7 +33638,7 @@ Index
* gawk, awk and <1>: This Manual. (line 14)
* gawk, bitwise operations in: Bitwise Functions. (line 40)
* gawk, break statement in: Break Statement. (line 51)
-* gawk, character classes and: Bracket Expressions. (line 100)
+* gawk, character classes and: Bracket Expressions. (line 108)
* gawk, coding style in: Adding Code. (line 37)
* gawk, command-line options, and regular expressions: GNU Regexp Operators.
(line 73)
@@ -33834,7 +33842,7 @@ Index
* hyphen (-), -= operator: Assignment Ops. (line 129)
* hyphen (-), -= operator <1>: Precedence. (line 94)
* hyphen (-), filenames beginning with: Options. (line 60)
-* hyphen (-), in bracket expressions: Bracket Expressions. (line 17)
+* hyphen (-), in bracket expressions: Bracket Expressions. (line 25)
* i debugger command (alias for info): Debugger Info. (line 13)
* id utility: Id Program. (line 6)
* id.awk program: Id Program. (line 31)
@@ -33923,7 +33931,7 @@ Index
* internationalization, localization <1>: Internationalization.
(line 13)
* internationalization, localization, character classes: Bracket Expressions.
- (line 100)
+ (line 108)
* internationalization, localization, gawk and: Internationalization.
(line 13)
* internationalization, localization, locale categories: Explaining gettext.
@@ -34386,11 +34394,11 @@ Index
* POSIX awk, backslashes in string constants: Escape Sequences.
(line 108)
* POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 15)
-* POSIX awk, bracket expressions and: Bracket Expressions. (line 26)
+* POSIX awk, bracket expressions and: Bracket Expressions. (line 34)
* POSIX awk, bracket expressions and, character classes: Bracket Expressions.
- (line 32)
+ (line 40)
* POSIX awk, bracket expressions and, character classes <1>: Bracket Expressions.
- (line 100)
+ (line 108)
* POSIX awk, break statement and: Break Statement. (line 51)
* POSIX awk, changes in awk versions: POSIX. (line 6)
* POSIX awk, continue statement and: Continue Statement. (line 44)
@@ -35254,500 +35262,500 @@ Node: Regexp Operators164120
Ref: Regexp Operators-Footnote-1171536
Ref: Regexp Operators-Footnote-2171683
Node: Bracket Expressions171781
-Ref: table-char-classes173803
-Node: Leftmost Longest176940
-Node: Computed Regexps178243
-Node: GNU Regexp Operators181670
-Node: Case-sensitivity185349
-Ref: Case-sensitivity-Footnote-1188245
-Ref: Case-sensitivity-Footnote-2188480
-Node: Strong Regexp Constants188588
-Node: Regexp Summary191530
-Node: Reading Files193136
-Node: Records195299
-Node: awk split records196032
-Node: gawk split records200963
-Ref: gawk split records-Footnote-1205503
-Node: Fields205540
-Node: Nonconstant Fields208281
-Ref: Nonconstant Fields-Footnote-1210517
-Node: Changing Fields210721
-Node: Field Separators216649
-Node: Default Field Splitting219347
-Node: Regexp Field Splitting220465
-Node: Single Character Fields223818
-Node: Command Line Field Separator224878
-Node: Full Line Fields228096
-Ref: Full Line Fields-Footnote-1229618
-Ref: Full Line Fields-Footnote-2229664
-Node: Field Splitting Summary229765
-Node: Constant Size231839
-Node: Splitting By Content236417
-Ref: Splitting By Content-Footnote-1240388
-Node: Multiple Line240551
-Ref: Multiple Line-Footnote-1246433
-Node: Getline246612
-Node: Plain Getline249078
-Node: Getline/Variable251717
-Node: Getline/File252866
-Node: Getline/Variable/File254252
-Ref: Getline/Variable/File-Footnote-1255855
-Node: Getline/Pipe255943
-Node: Getline/Variable/Pipe258648
-Node: Getline/Coprocess259781
-Node: Getline/Variable/Coprocess261046
-Node: Getline Notes261786
-Node: Getline Summary264581
-Ref: table-getline-variants265003
-Node: Read Timeout265751
-Ref: Read Timeout-Footnote-1269657
-Node: Retrying Input269715
-Node: Command-line directories270914
-Node: Input Summary271820
-Node: Input Exercises274992
-Node: Printing275720
-Node: Print277554
-Node: Print Examples279011
-Node: Output Separators281791
-Node: OFMT283808
-Node: Printf285164
-Node: Basic Printf285949
-Node: Control Letters287523
-Node: Format Modifiers291511
-Node: Printf Examples297526
-Node: Redirection300012
-Node: Special FD306853
-Ref: Special FD-Footnote-1310021
-Node: Special Files310095
-Node: Other Inherited Files310712
-Node: Special Network311713
-Node: Special Caveats312573
-Node: Close Files And Pipes313522
-Ref: Close Files And Pipes-Footnote-1320709
-Ref: Close Files And Pipes-Footnote-2320857
-Node: Nonfatal321008
-Node: Output Summary323333
-Node: Output Exercises324555
-Node: Expressions325234
-Node: Values326422
-Node: Constants327100
-Node: Scalar Constants327791
-Ref: Scalar Constants-Footnote-1328655
-Node: Nondecimal-numbers328905
-Node: Regexp Constants331918
-Node: Using Constant Regexps332444
-Node: Variables335607
-Node: Using Variables336264
-Node: Assignment Options338174
-Node: Conversion340047
-Node: Strings And Numbers340571
-Ref: Strings And Numbers-Footnote-1343634
-Node: Locale influences conversions343743
-Ref: table-locale-affects346501
-Node: All Operators347119
-Node: Arithmetic Ops347748
-Node: Concatenation350254
-Ref: Concatenation-Footnote-1353101
-Node: Assignment Ops353208
-Ref: table-assign-ops358199
-Node: Increment Ops359512
-Node: Truth Values and Conditions362972
-Node: Truth Values364046
-Node: Typing and Comparison365094
-Node: Variable Typing365914
-Node: Comparison Operators369538
-Ref: table-relational-ops369957
-Node: POSIX String Comparison373452
-Ref: POSIX String Comparison-Footnote-1374526
-Node: Boolean Ops374665
-Ref: Boolean Ops-Footnote-1379147
-Node: Conditional Exp379239
-Node: Function Calls380975
-Node: Precedence384852
-Node: Locales388511
-Node: Expressions Summary390143
-Node: Patterns and Actions392716
-Node: Pattern Overview393836
-Node: Regexp Patterns395513
-Node: Expression Patterns396055
-Node: Ranges399836
-Node: BEGIN/END402944
-Node: Using BEGIN/END403705
-Ref: Using BEGIN/END-Footnote-1406441
-Node: I/O And BEGIN/END406547
-Node: BEGINFILE/ENDFILE408861
-Node: Empty411768
-Node: Using Shell Variables412085
-Node: Action Overview414359
-Node: Statements416684
-Node: If Statement418532
-Node: While Statement420027
-Node: Do Statement422055
-Node: For Statement423203
-Node: Switch Statement426361
-Node: Break Statement428747
-Node: Continue Statement430839
-Node: Next Statement432666
-Node: Nextfile Statement435049
-Node: Exit Statement437701
-Node: Built-in Variables440104
-Node: User-modified441237
-Node: Auto-set448823
-Ref: Auto-set-Footnote-1463210
-Ref: Auto-set-Footnote-2463416
-Node: ARGC and ARGV463472
-Node: Pattern Action Summary467685
-Node: Arrays470115
-Node: Array Basics471444
-Node: Array Intro472288
-Ref: figure-array-elements474263
-Ref: Array Intro-Footnote-1476967
-Node: Reference to Elements477095
-Node: Assigning Elements479559
-Node: Array Example480050
-Node: Scanning an Array481809
-Node: Controlling Scanning484831
-Ref: Controlling Scanning-Footnote-1490230
-Node: Numeric Array Subscripts490546
-Node: Uninitialized Subscripts492730
-Node: Delete494349
-Ref: Delete-Footnote-1497101
-Node: Multidimensional497158
-Node: Multiscanning500253
-Node: Arrays of Arrays501844
-Node: Arrays Summary506611
-Node: Functions508704
-Node: Built-in509742
-Node: Calling Built-in510820
-Node: Numeric Functions512816
-Ref: Numeric Functions-Footnote-1517649
-Ref: Numeric Functions-Footnote-2518006
-Ref: Numeric Functions-Footnote-3518054
-Node: String Functions518326
-Ref: String Functions-Footnote-1541830
-Ref: String Functions-Footnote-2541958
-Ref: String Functions-Footnote-3542206
-Node: Gory Details542293
-Ref: table-sub-escapes544084
-Ref: table-sub-proposed545603
-Ref: table-posix-sub546966
-Ref: table-gensub-escapes548507
-Ref: Gory Details-Footnote-1549330
-Node: I/O Functions549481
-Ref: I/O Functions-Footnote-1556701
-Node: Time Functions556849
-Ref: Time Functions-Footnote-1567354
-Ref: Time Functions-Footnote-2567422
-Ref: Time Functions-Footnote-3567580
-Ref: Time Functions-Footnote-4567691
-Ref: Time Functions-Footnote-5567803
-Ref: Time Functions-Footnote-6568030
-Node: Bitwise Functions568296
-Ref: table-bitwise-ops568890
-Ref: Bitwise Functions-Footnote-1573228
-Node: Type Functions573401
-Node: I18N Functions576062
-Node: User-defined577713
-Node: Definition Syntax578518
-Ref: Definition Syntax-Footnote-1584205
-Node: Function Example584276
-Ref: Function Example-Footnote-1587198
-Node: Function Caveats587220
-Node: Calling A Function587738
-Node: Variable Scope588696
-Node: Pass By Value/Reference591690
-Node: Return Statement595189
-Node: Dynamic Typing598168
-Node: Indirect Calls599098
-Ref: Indirect Calls-Footnote-1609349
-Node: Functions Summary609477
-Node: Library Functions612182
-Ref: Library Functions-Footnote-1615789
-Ref: Library Functions-Footnote-2615932
-Node: Library Names616103
-Ref: Library Names-Footnote-1619563
-Ref: Library Names-Footnote-2619786
-Node: General Functions619872
-Node: Strtonum Function620975
-Node: Assert Function623997
-Node: Round Function627323
-Node: Cliff Random Function628864
-Node: Ordinal Functions629880
-Ref: Ordinal Functions-Footnote-1632943
-Ref: Ordinal Functions-Footnote-2633195
-Node: Join Function633405
-Ref: Join Function-Footnote-1635175
-Node: Getlocaltime Function635375
-Node: Readfile Function639117
-Node: Shell Quoting641089
-Node: Data File Management642490
-Node: Filetrans Function643122
-Node: Rewind Function647218
-Node: File Checking649123
-Ref: File Checking-Footnote-1650457
-Node: Empty Files650658
-Node: Ignoring Assigns652637
-Node: Getopt Function654187
-Ref: Getopt Function-Footnote-1665656
-Node: Passwd Functions665856
-Ref: Passwd Functions-Footnote-1674695
-Node: Group Functions674783
-Ref: Group Functions-Footnote-1682680
-Node: Walking Arrays682887
-Node: Library Functions Summary685895
-Node: Library Exercises687301
-Node: Sample Programs687766
-Node: Running Examples688536
-Node: Clones689264
-Node: Cut Program690488
-Node: Egrep Program700417
-Ref: Egrep Program-Footnote-1707929
-Node: Id Program708039
-Node: Split Program711719
-Ref: Split Program-Footnote-1715178
-Node: Tee Program715307
-Node: Uniq Program718097
-Node: Wc Program725523
-Ref: Wc Program-Footnote-1729778
-Node: Miscellaneous Programs729872
-Node: Dupword Program731085
-Node: Alarm Program733115
-Node: Translate Program737970
-Ref: Translate Program-Footnote-1742535
-Node: Labels Program742805
-Ref: Labels Program-Footnote-1746156
-Node: Word Sorting746240
-Node: History Sorting750312
-Node: Extract Program752147
-Node: Simple Sed759676
-Node: Igawk Program762750
-Ref: Igawk Program-Footnote-1777081
-Ref: Igawk Program-Footnote-2777283
-Ref: Igawk Program-Footnote-3777405
-Node: Anagram Program777520
-Node: Signature Program780582
-Node: Programs Summary781829
-Node: Programs Exercises783043
-Ref: Programs Exercises-Footnote-1787172
-Node: Advanced Features787263
-Node: Nondecimal Data789253
-Node: Array Sorting790844
-Node: Controlling Array Traversal791544
-Ref: Controlling Array Traversal-Footnote-1799911
-Node: Array Sorting Functions800029
-Ref: Array Sorting Functions-Footnote-1805120
-Node: Two-way I/O805316
-Ref: Two-way I/O-Footnote-1811136
-Ref: Two-way I/O-Footnote-2811323
-Node: TCP/IP Networking811405
-Node: Profiling814523
-Node: Advanced Features Summary822977
-Node: Internationalization824821
-Node: I18N and L10N826301
-Node: Explaining gettext826988
-Ref: Explaining gettext-Footnote-1832011
-Ref: Explaining gettext-Footnote-2832196
-Node: Programmer i18n832361
-Ref: Programmer i18n-Footnote-1837216
-Node: Translator i18n837265
-Node: String Extraction838059
-Ref: String Extraction-Footnote-1839191
-Node: Printf Ordering839277
-Ref: Printf Ordering-Footnote-1842063
-Node: I18N Portability842127
-Ref: I18N Portability-Footnote-1844583
-Node: I18N Example844646
-Ref: I18N Example-Footnote-1847452
-Node: Gawk I18N847525
-Node: I18N Summary848170
-Node: Debugger849511
-Node: Debugging850533
-Node: Debugging Concepts850974
-Node: Debugging Terms852783
-Node: Awk Debugging855358
-Node: Sample Debugging Session856264
-Node: Debugger Invocation856798
-Node: Finding The Bug858184
-Node: List of Debugger Commands864662
-Node: Breakpoint Control865995
-Node: Debugger Execution Control869689
-Node: Viewing And Changing Data873051
-Node: Execution Stack876425
-Node: Debugger Info878062
-Node: Miscellaneous Debugger Commands882133
-Node: Readline Support887221
-Node: Limitations888117
-Ref: Limitations-Footnote-1892348
-Node: Debugging Summary892399
-Node: Arbitrary Precision Arithmetic893678
-Node: Computer Arithmetic895094
-Ref: table-numeric-ranges898685
-Ref: Computer Arithmetic-Footnote-1899407
-Node: Math Definitions899464
-Ref: table-ieee-formats902778
-Ref: Math Definitions-Footnote-1903381
-Node: MPFR features903486
-Node: FP Math Caution905203
-Ref: FP Math Caution-Footnote-1906275
-Node: Inexactness of computations906644
-Node: Inexact representation907604
-Node: Comparing FP Values908964
-Node: Errors accumulate910046
-Node: Getting Accuracy911479
-Node: Try To Round914189
-Node: Setting precision915088
-Ref: table-predefined-precision-strings915785
-Node: Setting the rounding mode917615
-Ref: table-gawk-rounding-modes917989
-Ref: Setting the rounding mode-Footnote-1921397
-Node: Arbitrary Precision Integers921576
-Ref: Arbitrary Precision Integers-Footnote-1926493
-Node: POSIX Floating Point Problems926642
-Ref: POSIX Floating Point Problems-Footnote-1930524
-Node: Floating point summary930562
-Node: Dynamic Extensions932752
-Node: Extension Intro934305
-Node: Plugin License935571
-Node: Extension Mechanism Outline936368
-Ref: figure-load-extension936807
-Ref: figure-register-new-function938372
-Ref: figure-call-new-function939464
-Node: Extension API Description941526
-Node: Extension API Functions Introduction943058
-Node: General Data Types947917
-Ref: General Data Types-Footnote-1953872
-Node: Memory Allocation Functions954171
-Ref: Memory Allocation Functions-Footnote-1957016
-Node: Constructor Functions957115
-Node: Registration Functions958860
-Node: Extension Functions959545
-Node: Exit Callback Functions961844
-Node: Extension Version String963094
-Node: Input Parsers963757
-Node: Output Wrappers973642
-Node: Two-way processors978154
-Node: Printing Messages980418
-Ref: Printing Messages-Footnote-1981492
-Node: Updating ERRNO981645
-Node: Requesting Values982384
-Ref: table-value-types-returned983121
-Node: Accessing Parameters984004
-Node: Symbol Table Access985239
-Node: Symbol table by name985751
-Node: Symbol table by cookie987772
-Ref: Symbol table by cookie-Footnote-1991921
-Node: Cached values991985
-Ref: Cached values-Footnote-1995486
-Node: Array Manipulation995577
-Ref: Array Manipulation-Footnote-1996668
-Node: Array Data Types996705
-Ref: Array Data Types-Footnote-1999363
-Node: Array Functions999455
-Node: Flattening Arrays1003313
-Node: Creating Arrays1010221
-Node: Redirection API1014992
-Node: Extension API Variables1017823
-Node: Extension Versioning1018456
-Node: Extension API Informational Variables1020347
-Node: Extension API Boilerplate1021411
-Node: Finding Extensions1025225
-Node: Extension Example1025784
-Node: Internal File Description1026582
-Node: Internal File Ops1030662
-Ref: Internal File Ops-Footnote-11042424
-Node: Using Internal File Ops1042564
-Ref: Using Internal File Ops-Footnote-11044947
-Node: Extension Samples1045221
-Node: Extension Sample File Functions1046750
-Node: Extension Sample Fnmatch1054399
-Node: Extension Sample Fork1055886
-Node: Extension Sample Inplace1057104
-Node: Extension Sample Ord1060314
-Node: Extension Sample Readdir1061150
-Ref: table-readdir-file-types1062039
-Node: Extension Sample Revout1062844
-Node: Extension Sample Rev2way1063433
-Node: Extension Sample Read write array1064173
-Node: Extension Sample Readfile1066115
-Node: Extension Sample Time1067210
-Node: Extension Sample API Tests1068558
-Node: gawkextlib1069050
-Node: Extension summary1071497
-Node: Extension Exercises1075189
-Node: Language History1076686
-Node: V7/SVR3.11078342
-Node: SVR41080494
-Node: POSIX1081928
-Node: BTL1083307
-Node: POSIX/GNU1084036
-Node: Feature History1089898
-Node: Common Extensions1104268
-Node: Ranges and Locales1105551
-Ref: Ranges and Locales-Footnote-11110167
-Ref: Ranges and Locales-Footnote-21110194
-Ref: Ranges and Locales-Footnote-31110429
-Node: Contributors1110650
-Node: History summary1116219
-Node: Installation1117599
-Node: Gawk Distribution1118543
-Node: Getting1119027
-Node: Extracting1119988
-Node: Distribution contents1121626
-Node: Unix Installation1127720
-Node: Quick Installation1128402
-Node: Shell Startup Files1130816
-Node: Additional Configuration Options1131894
-Node: Configuration Philosophy1133699
-Node: Non-Unix Installation1136068
-Node: PC Installation1136526
-Node: PC Binary Installation1137846
-Node: PC Compiling1139698
-Ref: PC Compiling-Footnote-11142722
-Node: PC Testing1142831
-Node: PC Using1144011
-Node: Cygwin1148125
-Node: MSYS1148895
-Node: VMS Installation1149396
-Node: VMS Compilation1150187
-Ref: VMS Compilation-Footnote-11151416
-Node: VMS Dynamic Extensions1151474
-Node: VMS Installation Details1153159
-Node: VMS Running1155412
-Node: VMS GNV1159691
-Node: VMS Old Gawk1160426
-Node: Bugs1160897
-Node: Other Versions1165094
-Node: Installation summary1171678
-Node: Notes1172736
-Node: Compatibility Mode1173601
-Node: Additions1174383
-Node: Accessing The Source1175308
-Node: Adding Code1176743
-Node: New Ports1182962
-Node: Derived Files1187450
-Ref: Derived Files-Footnote-11192935
-Ref: Derived Files-Footnote-21192970
-Ref: Derived Files-Footnote-31193568
-Node: Future Extensions1193682
-Node: Implementation Limitations1194340
-Node: Extension Design1195523
-Node: Old Extension Problems1196677
-Ref: Old Extension Problems-Footnote-11198195
-Node: Extension New Mechanism Goals1198252
-Ref: Extension New Mechanism Goals-Footnote-11201616
-Node: Extension Other Design Decisions1201805
-Node: Extension Future Growth1203918
-Node: Old Extension Mechanism1204754
-Node: Notes summary1206517
-Node: Basic Concepts1207699
-Node: Basic High Level1208380
-Ref: figure-general-flow1208662
-Ref: figure-process-flow1209347
-Ref: Basic High Level-Footnote-11212648
-Node: Basic Data Typing1212833
-Node: Glossary1216161
-Node: Copying1248107
-Node: GNU Free Documentation License1285646
-Node: Index1310764
+Ref: table-char-classes174257
+Node: Leftmost Longest177394
+Node: Computed Regexps178697
+Node: GNU Regexp Operators182124
+Node: Case-sensitivity185803
+Ref: Case-sensitivity-Footnote-1188699
+Ref: Case-sensitivity-Footnote-2188934
+Node: Strong Regexp Constants189042
+Node: Regexp Summary191984
+Node: Reading Files193590
+Node: Records195753
+Node: awk split records196486
+Node: gawk split records201417
+Ref: gawk split records-Footnote-1205957
+Node: Fields205994
+Node: Nonconstant Fields208735
+Ref: Nonconstant Fields-Footnote-1210971
+Node: Changing Fields211175
+Node: Field Separators217103
+Node: Default Field Splitting219801
+Node: Regexp Field Splitting220919
+Node: Single Character Fields224272
+Node: Command Line Field Separator225332
+Node: Full Line Fields228550
+Ref: Full Line Fields-Footnote-1230072
+Ref: Full Line Fields-Footnote-2230118
+Node: Field Splitting Summary230219
+Node: Constant Size232293
+Node: Splitting By Content236871
+Ref: Splitting By Content-Footnote-1240842
+Node: Multiple Line241005
+Ref: Multiple Line-Footnote-1246887
+Node: Getline247066
+Node: Plain Getline249532
+Node: Getline/Variable252171
+Node: Getline/File253320
+Node: Getline/Variable/File254706
+Ref: Getline/Variable/File-Footnote-1256309
+Node: Getline/Pipe256397
+Node: Getline/Variable/Pipe259102
+Node: Getline/Coprocess260235
+Node: Getline/Variable/Coprocess261500
+Node: Getline Notes262240
+Node: Getline Summary265035
+Ref: table-getline-variants265457
+Node: Read Timeout266205
+Ref: Read Timeout-Footnote-1270111
+Node: Retrying Input270169
+Node: Command-line directories271368
+Node: Input Summary272274
+Node: Input Exercises275446
+Node: Printing276174
+Node: Print278008
+Node: Print Examples279465
+Node: Output Separators282245
+Node: OFMT284262
+Node: Printf285618
+Node: Basic Printf286403
+Node: Control Letters287977
+Node: Format Modifiers291965
+Node: Printf Examples297980
+Node: Redirection300466
+Node: Special FD307307
+Ref: Special FD-Footnote-1310475
+Node: Special Files310549
+Node: Other Inherited Files311166
+Node: Special Network312167
+Node: Special Caveats313027
+Node: Close Files And Pipes313976
+Ref: Close Files And Pipes-Footnote-1321163
+Ref: Close Files And Pipes-Footnote-2321311
+Node: Nonfatal321462
+Node: Output Summary323787
+Node: Output Exercises325009
+Node: Expressions325688
+Node: Values326876
+Node: Constants327554
+Node: Scalar Constants328245
+Ref: Scalar Constants-Footnote-1329109
+Node: Nondecimal-numbers329359
+Node: Regexp Constants332372
+Node: Using Constant Regexps332898
+Node: Variables336061
+Node: Using Variables336718
+Node: Assignment Options338628
+Node: Conversion340501
+Node: Strings And Numbers341025
+Ref: Strings And Numbers-Footnote-1344088
+Node: Locale influences conversions344197
+Ref: table-locale-affects346955
+Node: All Operators347573
+Node: Arithmetic Ops348202
+Node: Concatenation350708
+Ref: Concatenation-Footnote-1353555
+Node: Assignment Ops353662
+Ref: table-assign-ops358653
+Node: Increment Ops359966
+Node: Truth Values and Conditions363426
+Node: Truth Values364500
+Node: Typing and Comparison365548
+Node: Variable Typing366368
+Node: Comparison Operators369992
+Ref: table-relational-ops370411
+Node: POSIX String Comparison373906
+Ref: POSIX String Comparison-Footnote-1374980
+Node: Boolean Ops375119
+Ref: Boolean Ops-Footnote-1379601
+Node: Conditional Exp379693
+Node: Function Calls381429
+Node: Precedence385306
+Node: Locales388965
+Node: Expressions Summary390597
+Node: Patterns and Actions393170
+Node: Pattern Overview394290
+Node: Regexp Patterns395967
+Node: Expression Patterns396509
+Node: Ranges400290
+Node: BEGIN/END403398
+Node: Using BEGIN/END404159
+Ref: Using BEGIN/END-Footnote-1406895
+Node: I/O And BEGIN/END407001
+Node: BEGINFILE/ENDFILE409315
+Node: Empty412222
+Node: Using Shell Variables412539
+Node: Action Overview414813
+Node: Statements417138
+Node: If Statement418986
+Node: While Statement420481
+Node: Do Statement422509
+Node: For Statement423657
+Node: Switch Statement426815
+Node: Break Statement429201
+Node: Continue Statement431293
+Node: Next Statement433120
+Node: Nextfile Statement435503
+Node: Exit Statement438155
+Node: Built-in Variables440558
+Node: User-modified441691
+Node: Auto-set449277
+Ref: Auto-set-Footnote-1463664
+Ref: Auto-set-Footnote-2463870
+Node: ARGC and ARGV463926
+Node: Pattern Action Summary468139
+Node: Arrays470569
+Node: Array Basics471898
+Node: Array Intro472742
+Ref: figure-array-elements474717
+Ref: Array Intro-Footnote-1477421
+Node: Reference to Elements477549
+Node: Assigning Elements480013
+Node: Array Example480504
+Node: Scanning an Array482263
+Node: Controlling Scanning485285
+Ref: Controlling Scanning-Footnote-1490684
+Node: Numeric Array Subscripts491000
+Node: Uninitialized Subscripts493184
+Node: Delete494803
+Ref: Delete-Footnote-1497555
+Node: Multidimensional497612
+Node: Multiscanning500707
+Node: Arrays of Arrays502298
+Node: Arrays Summary507065
+Node: Functions509158
+Node: Built-in510196
+Node: Calling Built-in511274
+Node: Numeric Functions513270
+Ref: Numeric Functions-Footnote-1518103
+Ref: Numeric Functions-Footnote-2518460
+Ref: Numeric Functions-Footnote-3518508
+Node: String Functions518780
+Ref: String Functions-Footnote-1542284
+Ref: String Functions-Footnote-2542412
+Ref: String Functions-Footnote-3542660
+Node: Gory Details542747
+Ref: table-sub-escapes544538
+Ref: table-sub-proposed546057
+Ref: table-posix-sub547420
+Ref: table-gensub-escapes548961
+Ref: Gory Details-Footnote-1549784
+Node: I/O Functions549935
+Ref: I/O Functions-Footnote-1557155
+Node: Time Functions557303
+Ref: Time Functions-Footnote-1567808
+Ref: Time Functions-Footnote-2567876
+Ref: Time Functions-Footnote-3568034
+Ref: Time Functions-Footnote-4568145
+Ref: Time Functions-Footnote-5568257
+Ref: Time Functions-Footnote-6568484
+Node: Bitwise Functions568750
+Ref: table-bitwise-ops569344
+Ref: Bitwise Functions-Footnote-1573682
+Node: Type Functions573855
+Node: I18N Functions576516
+Node: User-defined578167
+Node: Definition Syntax578972
+Ref: Definition Syntax-Footnote-1584659
+Node: Function Example584730
+Ref: Function Example-Footnote-1587652
+Node: Function Caveats587674
+Node: Calling A Function588192
+Node: Variable Scope589150
+Node: Pass By Value/Reference592144
+Node: Return Statement595643
+Node: Dynamic Typing598622
+Node: Indirect Calls599552
+Ref: Indirect Calls-Footnote-1609803
+Node: Functions Summary609931
+Node: Library Functions612636
+Ref: Library Functions-Footnote-1616243
+Ref: Library Functions-Footnote-2616386
+Node: Library Names616557
+Ref: Library Names-Footnote-1620017
+Ref: Library Names-Footnote-2620240
+Node: General Functions620326
+Node: Strtonum Function621429
+Node: Assert Function624451
+Node: Round Function627777
+Node: Cliff Random Function629318
+Node: Ordinal Functions630334
+Ref: Ordinal Functions-Footnote-1633397
+Ref: Ordinal Functions-Footnote-2633649
+Node: Join Function633859
+Ref: Join Function-Footnote-1635629
+Node: Getlocaltime Function635829
+Node: Readfile Function639571
+Node: Shell Quoting641543
+Node: Data File Management642944
+Node: Filetrans Function643576
+Node: Rewind Function647672
+Node: File Checking649577
+Ref: File Checking-Footnote-1650911
+Node: Empty Files651112
+Node: Ignoring Assigns653091
+Node: Getopt Function654641
+Ref: Getopt Function-Footnote-1666110
+Node: Passwd Functions666310
+Ref: Passwd Functions-Footnote-1675149
+Node: Group Functions675237
+Ref: Group Functions-Footnote-1683134
+Node: Walking Arrays683341
+Node: Library Functions Summary686349
+Node: Library Exercises687755
+Node: Sample Programs688220
+Node: Running Examples688990
+Node: Clones689718
+Node: Cut Program690942
+Node: Egrep Program700871
+Ref: Egrep Program-Footnote-1708383
+Node: Id Program708493
+Node: Split Program712173
+Ref: Split Program-Footnote-1715632
+Node: Tee Program715761
+Node: Uniq Program718551
+Node: Wc Program725977
+Ref: Wc Program-Footnote-1730232
+Node: Miscellaneous Programs730326
+Node: Dupword Program731539
+Node: Alarm Program733569
+Node: Translate Program738424
+Ref: Translate Program-Footnote-1742989
+Node: Labels Program743259
+Ref: Labels Program-Footnote-1746610
+Node: Word Sorting746694
+Node: History Sorting750766
+Node: Extract Program752601
+Node: Simple Sed760130
+Node: Igawk Program763204
+Ref: Igawk Program-Footnote-1777535
+Ref: Igawk Program-Footnote-2777737
+Ref: Igawk Program-Footnote-3777859
+Node: Anagram Program777974
+Node: Signature Program781036
+Node: Programs Summary782283
+Node: Programs Exercises783497
+Ref: Programs Exercises-Footnote-1787626
+Node: Advanced Features787717
+Node: Nondecimal Data789707
+Node: Array Sorting791298
+Node: Controlling Array Traversal791998
+Ref: Controlling Array Traversal-Footnote-1800365
+Node: Array Sorting Functions800483
+Ref: Array Sorting Functions-Footnote-1805574
+Node: Two-way I/O805770
+Ref: Two-way I/O-Footnote-1811590
+Ref: Two-way I/O-Footnote-2811777
+Node: TCP/IP Networking811859
+Node: Profiling814977
+Node: Advanced Features Summary823431
+Node: Internationalization825275
+Node: I18N and L10N826755
+Node: Explaining gettext827442
+Ref: Explaining gettext-Footnote-1832465
+Ref: Explaining gettext-Footnote-2832650
+Node: Programmer i18n832815
+Ref: Programmer i18n-Footnote-1837670
+Node: Translator i18n837719
+Node: String Extraction838513
+Ref: String Extraction-Footnote-1839645
+Node: Printf Ordering839731
+Ref: Printf Ordering-Footnote-1842517
+Node: I18N Portability842581
+Ref: I18N Portability-Footnote-1845037
+Node: I18N Example845100
+Ref: I18N Example-Footnote-1847906
+Node: Gawk I18N847979
+Node: I18N Summary848624
+Node: Debugger849965
+Node: Debugging850987
+Node: Debugging Concepts851428
+Node: Debugging Terms853237
+Node: Awk Debugging855812
+Node: Sample Debugging Session856718
+Node: Debugger Invocation857252
+Node: Finding The Bug858638
+Node: List of Debugger Commands865116
+Node: Breakpoint Control866449
+Node: Debugger Execution Control870143
+Node: Viewing And Changing Data873505
+Node: Execution Stack876879
+Node: Debugger Info878516
+Node: Miscellaneous Debugger Commands882587
+Node: Readline Support887675
+Node: Limitations888571
+Ref: Limitations-Footnote-1892802
+Node: Debugging Summary892853
+Node: Arbitrary Precision Arithmetic894132
+Node: Computer Arithmetic895548
+Ref: table-numeric-ranges899139
+Ref: Computer Arithmetic-Footnote-1899861
+Node: Math Definitions899918
+Ref: table-ieee-formats903232
+Ref: Math Definitions-Footnote-1903835
+Node: MPFR features903940
+Node: FP Math Caution905657
+Ref: FP Math Caution-Footnote-1906729
+Node: Inexactness of computations907098
+Node: Inexact representation908058
+Node: Comparing FP Values909418
+Node: Errors accumulate910500
+Node: Getting Accuracy911933
+Node: Try To Round914643
+Node: Setting precision915542
+Ref: table-predefined-precision-strings916239
+Node: Setting the rounding mode918069
+Ref: table-gawk-rounding-modes918443
+Ref: Setting the rounding mode-Footnote-1921851
+Node: Arbitrary Precision Integers922030
+Ref: Arbitrary Precision Integers-Footnote-1926947
+Node: POSIX Floating Point Problems927096
+Ref: POSIX Floating Point Problems-Footnote-1930978
+Node: Floating point summary931016
+Node: Dynamic Extensions933206
+Node: Extension Intro934759
+Node: Plugin License936025
+Node: Extension Mechanism Outline936822
+Ref: figure-load-extension937261
+Ref: figure-register-new-function938826
+Ref: figure-call-new-function939918
+Node: Extension API Description941980
+Node: Extension API Functions Introduction943512
+Node: General Data Types948371
+Ref: General Data Types-Footnote-1954326
+Node: Memory Allocation Functions954625
+Ref: Memory Allocation Functions-Footnote-1957470
+Node: Constructor Functions957569
+Node: Registration Functions959314
+Node: Extension Functions959999
+Node: Exit Callback Functions962298
+Node: Extension Version String963548
+Node: Input Parsers964211
+Node: Output Wrappers974096
+Node: Two-way processors978608
+Node: Printing Messages980872
+Ref: Printing Messages-Footnote-1981946
+Node: Updating ERRNO982099
+Node: Requesting Values982838
+Ref: table-value-types-returned983575
+Node: Accessing Parameters984458
+Node: Symbol Table Access985693
+Node: Symbol table by name986205
+Node: Symbol table by cookie988226
+Ref: Symbol table by cookie-Footnote-1992375
+Node: Cached values992439
+Ref: Cached values-Footnote-1995940
+Node: Array Manipulation996031
+Ref: Array Manipulation-Footnote-1997122
+Node: Array Data Types997159
+Ref: Array Data Types-Footnote-1999817
+Node: Array Functions999909
+Node: Flattening Arrays1003767
+Node: Creating Arrays1010675
+Node: Redirection API1015446
+Node: Extension API Variables1018277
+Node: Extension Versioning1018910
+Node: Extension API Informational Variables1020801
+Node: Extension API Boilerplate1021865
+Node: Finding Extensions1025679
+Node: Extension Example1026238
+Node: Internal File Description1027036
+Node: Internal File Ops1031116
+Ref: Internal File Ops-Footnote-11042878
+Node: Using Internal File Ops1043018
+Ref: Using Internal File Ops-Footnote-11045401
+Node: Extension Samples1045675
+Node: Extension Sample File Functions1047204
+Node: Extension Sample Fnmatch1054853
+Node: Extension Sample Fork1056340
+Node: Extension Sample Inplace1057558
+Node: Extension Sample Ord1060768
+Node: Extension Sample Readdir1061604
+Ref: table-readdir-file-types1062493
+Node: Extension Sample Revout1063298
+Node: Extension Sample Rev2way1063887
+Node: Extension Sample Read write array1064627
+Node: Extension Sample Readfile1066569
+Node: Extension Sample Time1067664
+Node: Extension Sample API Tests1069012
+Node: gawkextlib1069504
+Node: Extension summary1071951
+Node: Extension Exercises1075643
+Node: Language History1077140
+Node: V7/SVR3.11078796
+Node: SVR41080948
+Node: POSIX1082382
+Node: BTL1083761
+Node: POSIX/GNU1084490
+Node: Feature History1090352
+Node: Common Extensions1104722
+Node: Ranges and Locales1106005
+Ref: Ranges and Locales-Footnote-11110621
+Ref: Ranges and Locales-Footnote-21110648
+Ref: Ranges and Locales-Footnote-31110883
+Node: Contributors1111104
+Node: History summary1116673
+Node: Installation1118053
+Node: Gawk Distribution1118997
+Node: Getting1119481
+Node: Extracting1120442
+Node: Distribution contents1122080
+Node: Unix Installation1128174
+Node: Quick Installation1128856
+Node: Shell Startup Files1131270
+Node: Additional Configuration Options1132348
+Node: Configuration Philosophy1134153
+Node: Non-Unix Installation1136522
+Node: PC Installation1136980
+Node: PC Binary Installation1138300
+Node: PC Compiling1140152
+Ref: PC Compiling-Footnote-11143176
+Node: PC Testing1143285
+Node: PC Using1144465
+Node: Cygwin1148579
+Node: MSYS1149349
+Node: VMS Installation1149850
+Node: VMS Compilation1150641
+Ref: VMS Compilation-Footnote-11151870
+Node: VMS Dynamic Extensions1151928
+Node: VMS Installation Details1153613
+Node: VMS Running1155866
+Node: VMS GNV1160145
+Node: VMS Old Gawk1160880
+Node: Bugs1161351
+Node: Other Versions1165548
+Node: Installation summary1172132
+Node: Notes1173190
+Node: Compatibility Mode1174055
+Node: Additions1174837
+Node: Accessing The Source1175762
+Node: Adding Code1177197
+Node: New Ports1183416
+Node: Derived Files1187904
+Ref: Derived Files-Footnote-11193389
+Ref: Derived Files-Footnote-21193424
+Ref: Derived Files-Footnote-31194022
+Node: Future Extensions1194136
+Node: Implementation Limitations1194794
+Node: Extension Design1195977
+Node: Old Extension Problems1197131
+Ref: Old Extension Problems-Footnote-11198649
+Node: Extension New Mechanism Goals1198706
+Ref: Extension New Mechanism Goals-Footnote-11202070
+Node: Extension Other Design Decisions1202259
+Node: Extension Future Growth1204372
+Node: Old Extension Mechanism1205208
+Node: Notes summary1206971
+Node: Basic Concepts1208153
+Node: Basic High Level1208834
+Ref: figure-general-flow1209116
+Ref: figure-process-flow1209801
+Ref: Basic High Level-Footnote-11213102
+Node: Basic Data Typing1213287
+Node: Glossary1216615
+Node: Copying1248561
+Node: GNU Free Documentation License1286100
+Node: Index1311218

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 33a823bc..002953eb 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -5662,6 +5662,15 @@ set. For example, @samp{[0-9]} is equivalent to @samp{[0123456789]}.
standard and @command{gawk} have changed over time. This is mainly
of historical interest.)
+With the increasing popularity of the
+@uref{http://www.unicode.org, Unicode character standard},
+there is an additional wrinkle to consider. Octal and hexadecimal
+escape sequences inside bracket expressions are taken to represent
+only single-byte characters (characters whose values fit within
+the range 0--256). To match a range of characters where the endpoints
+of the range are larger than 256, enter the multibyte encodings of
+the characters directly.
+
@cindex @code{\} (backslash), in bracket expressions
@cindex backslash (@code{\}), in bracket expressions
@cindex @code{^} (caret), in bracket expressions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 7c9d473e..37bffc32 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -5490,6 +5490,15 @@ set. For example, @samp{[0-9]} is equivalent to @samp{[0123456789]}.
standard and @command{gawk} have changed over time. This is mainly
of historical interest.)
+With the increasing popularity of the
+@uref{http://www.unicode.org, Unicode character standard},
+there is an additional wrinkle to consider. Octal and hexadecimal
+escape sequences inside bracket expressions are taken to represent
+only single-byte characters (characters whose values fit within
+the range 0--256). To match a range of characters where the endpoints
+of the range are larger than 256, enter the multibyte encodings of
+the characters directly.
+
@cindex @code{\} (backslash), in bracket expressions
@cindex backslash (@code{\}), in bracket expressions
@cindex @code{^} (caret), in bracket expressions
diff --git a/regcomp.c b/regcomp.c
index 67069268..83fae67a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -240,10 +240,8 @@ btowc (int c)
are set in BUFP on entry. */
const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
{
reg_errcode_t ret;
@@ -281,8 +279,7 @@ reg_syntax_t re_syntax_options;
defined in regex.h. We return the old syntax. */
reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
{
reg_syntax_t ret = re_syntax_options;
@@ -294,8 +291,7 @@ weak_alias (__re_set_syntax, re_set_syntax)
#endif
int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
{
re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
char *fastmap = bufp->fastmap;
@@ -494,10 +490,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
the return codes and their meanings.) */
int
-regcomp (preg, pattern, cflags)
- regex_t *__restrict preg;
- const char *__restrict pattern;
- int cflags;
+regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -556,11 +549,8 @@ weak_alias (__regcomp, regcomp)
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *__restrict preg;
- char *__restrict errbuf;
- size_t errbuf_size;
+regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
+ size_t errbuf_size)
{
const char *msg;
size_t msg_size;
@@ -667,8 +657,7 @@ free_dfa_content (re_dfa_t *dfa)
/* Free dynamically allocated space used by PREG. */
void
-regfree (preg)
- regex_t *preg;
+regfree (regex_t *preg)
{
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
if (BE (dfa != NULL, 1))
@@ -701,8 +690,7 @@ char *
regcomp/regexec above without link errors. */
weak_function
# endif
-re_comp (s)
- const char *s;
+re_comp (const char *s)
{
reg_errcode_t ret;
char *fastmap;
diff --git a/regex.c b/regex.c
index ed6a4f5d..9f133fab 100644
--- a/regex.c
+++ b/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/regex.h b/regex.h
index ad6ad02d..143b3afa 100644
--- a/regex.h
+++ b/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2015 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/regex_internal.c b/regex_internal.c
index 2d170932..759c7c81 100644
--- a/regex_internal.c
+++ b/regex_internal.c
@@ -320,12 +320,13 @@ build_wcs_upper_buffer (re_string_t *pstr)
+ byte_idx), remain_len, &pstr->cur_state);
if (BE (mbclen + 2 > 2, 1))
{
- wchar_t wcu = towupper (wc);
- if (wcu != wc)
+ wchar_t wcu = wc;
+ if (iswlower (wc))
{
size_t mbcdlen;
- mbcdlen = wcrtomb (buf, wcu, &prev_st);
+ wcu = towupper (wc);
+ mbcdlen = __wcrtomb (buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else
@@ -389,11 +390,12 @@ build_wcs_upper_buffer (re_string_t *pstr)
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen + 2 > 2, 1))
{
- wchar_t wcu = towupper (wc);
- if (wcu != wc)
+ wchar_t wcu = wc;
+ if (iswlower (wc))
{
size_t mbcdlen;
+ wcu = towupper (wc);
mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
@@ -838,7 +840,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 +1372,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 +1387,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 28b4239e..09f17b25 100644
--- a/regex_internal.h
+++ b/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -45,7 +45,7 @@
# include <stdint.h>
#endif /* HAVE_STDINT_H || _LIBC */
#if defined _LIBC
-# include <bits/libc-lock.h>
+# include <libc-lock.h>
#else
# define __libc_lock_define(CLASS,NAME)
# define __libc_lock_init(NAME) do { } while (0)
@@ -770,7 +770,7 @@ bitset_mask (bitset_t dest, const bitset_t src)
}
#ifdef RE_ENABLE_I18N
-/* Functions for re_string. */
+/* Inline functions for re_string. */
static int
internal_function __attribute__ ((pure, unused))
re_string_char_size_at (const re_string_t *pstr, int idx)
diff --git a/regexec.c b/regexec.c
index 74f1a5b7..84264bb2 100644
--- a/regexec.c
+++ b/regexec.c
@@ -229,12 +229,8 @@ MIN(size_t a, size_t b)
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *__restrict preg;
- const char *__restrict string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
+regexec (const regex_t *__restrict preg, const char *__restrict string,
+ size_t nmatch, regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
int start, length;
@@ -314,11 +310,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
match was found and -2 indicates an internal error. */
int
-re_match (bufp, string, length, start, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
}
@@ -327,11 +320,8 @@ weak_alias (__re_match, re_match)
#endif
int
-re_search (bufp, string, length, start, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start, range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, int range, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, range, length, regs, 0);
}
@@ -340,11 +330,9 @@ weak_alias (__re_search, re_search)
#endif
int
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, stop;
- struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int length1,
+ const char *string2, int length2, int start,
+ struct re_registers *regs, int stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, 0, regs, stop, 1);
@@ -354,11 +342,9 @@ weak_alias (__re_match_2, re_match_2)
#endif
int
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, range, stop;
- struct re_registers *regs;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int length1,
+ const char *string2, int length2, int start, int range,
+ struct re_registers *regs, int stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, range, regs, stop, 0);
@@ -368,12 +354,11 @@ weak_alias (__re_search_2, re_search_2)
#endif
static int
-re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
- stop, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, range, stop, ret_len;
- struct re_registers *regs;
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
+ int length1, const char *string2, int length2, int start,
+ int range, struct re_registers *regs,
+ int stop, int ret_len)
{
const char *str;
int rval;
@@ -415,11 +400,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
otherwise the position of the match is returned. */
static int
-re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start, range, stop, ret_len;
- struct re_registers *regs;
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp, const char *string, int length,
+ int start, int range, int stop, struct re_registers *regs,
+ int ret_len)
{
reg_errcode_t result;
regmatch_t *pmatch;
@@ -503,10 +487,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
}
static unsigned
-re_copy_regs (regs, pmatch, nregs, regs_allocated)
- struct re_registers *regs;
- regmatch_t *pmatch;
- int nregs, regs_allocated;
+internal_function
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, int nregs,
+ int regs_allocated)
{
int rval = REGS_REALLOCATE;
int i;
@@ -583,11 +566,8 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
@@ -615,8 +595,7 @@ int
# ifdef _LIBC
weak_function
# endif
-re_exec (s)
- const char *s;
+re_exec (const char *s)
{
return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
}
@@ -634,14 +613,10 @@ re_exec (s)
(START + RANGE >= 0 && START + RANGE <= LENGTH) */
static reg_errcode_t
-__attribute_warn_unused_result__
-re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
- eflags)
- const regex_t *preg;
- const char *string;
- int length, start, range, stop, eflags;
- size_t nmatch;
- regmatch_t pmatch[];
+__attribute_warn_unused_result__ internal_function
+re_search_internal (const regex_t *preg, const char *string, int length,
+ int start, int range, int stop, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
@@ -962,6 +937,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
}
static reg_errcode_t
+internal_function __attribute_warn_unused_result__
prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -1057,7 +1033,7 @@ prune_impossible_nodes (re_match_context_t *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)
{