[Top][All Lists]

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

[SCM] gawk branch, feature/bwk-csv, updated. gawk-4.1.0-4903-geadf8f84

From: Arnold Robbins
Subject: [SCM] gawk branch, feature/bwk-csv, updated. gawk-4.1.0-4903-geadf8f84
Date: Thu, 1 Sep 2022 03:33:45 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/bwk-csv has been updated
       via  eadf8f84c85092da8057d0b80a8baa9847214d82 (commit)
      from  b090f4f3880a3f94d4dc986e7ab8dd3b9043b60e (commit)

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

- Log -----------------------------------------------------------------

commit eadf8f84c85092da8057d0b80a8baa9847214d82
Author: Arnold D. Robbins <>
Date:   Thu Sep 1 10:33:20 2022 +0300

    Further updates for split() and CSV.

diff --git a/ChangeLog b/ChangeLog
index 261417df..2c736e3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-09-01         Arnold D. Robbins     <>
+       * field.c (do_split): Check for not do_posix if separator is comma.
 2022-08-31         Arnold D. Robbins     <>
        * field.c (do_split): Make "," as third arg do CSV parsing.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ae43f512..7ec93478 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2022-09-01         Arnold D. Robbins     <>
+       * Functions): Document "," as separator
+       for split().
 2022-08-31         Arnold D. Robbins     <>
        * Add a sentence on FS = "," to the reference card.
diff --git a/doc/ b/doc/
index c9144e48..b0e61999 100644
--- a/doc/
+++ b/doc/
@@ -13468,7 +13468,11 @@ Options::):
      'ARRAY[I+1]'.  If FIELDSEP is a single space, then any leading
      whitespace goes into 'SEPS[0]' and any trailing whitespace goes
      into 'SEPS[N]', where N is the return value of 'split()' (i.e., the
-     number of elements in ARRAY).
+     number of elements in ARRAY).  If FIELDSEP is a comma, and 'gawk'
+     is not in POSIX mode, then the string is split using the CSV
+     parsing rules, as for 'FS' (*note Comma Separated Fields::).  In
+     this case, the SEPS array is not filled in, since each element
+     would simply consist of a string containing a comma.
      The 'split()' function splits strings into pieces in the same way
      that input lines are split into fields.  For example:
@@ -35687,7 +35691,7 @@ Index
 * * (asterisk), *= operator <1>:         Precedence.          (line  94)
 * * (asterisk), **= operator <1>:        Precedence.          (line  94)
 * * (asterisk), * operator, null strings, matching: String Functions.
-                                                              (line 563)
+                                                              (line 567)
 * + (plus sign), regexp operator:        Regexp Operator Details.
                                                               (line 107)
 * + (plus sign), += operator:            Assignment Ops.      (line  81)
@@ -36128,7 +36132,7 @@ Index
 * asterisk (*), *= operator <1>:         Precedence.          (line  94)
 * asterisk (*), **= operator <1>:        Precedence.          (line  94)
 * asterisk (*), * operator, null strings, matching: String Functions.
-                                                              (line 563)
+                                                              (line 567)
 * at-sign (@), @include directive:       Include Files.       (line   8)
 * at-sign (@), @load directive:          Loading Shared Libraries.
                                                               (line   8)
@@ -36403,7 +36407,7 @@ Index
 * Brian Kernighan's awk <9>:             Continue Statement.  (line  44)
 * Brian Kernighan's awk <10>:            Nextfile Statement.  (line  47)
 * Brian Kernighan's awk <11>:            Delete.              (line  51)
-* Brian Kernighan's awk <12>:            String Functions.    (line 510)
+* Brian Kernighan's awk <12>:            String Functions.    (line 514)
 * Brian Kernighan's awk <13>:            Gory Details.        (line  19)
 * Brian Kernighan's awk <14>:            I/O Functions.       (line  43)
 * Brian Kernighan's awk, extensions:     BTL.                 (line   6)
@@ -36470,7 +36474,7 @@ Index
 * case sensitivity, string comparisons and: User-modified.    (line  79)
 * case sensitivity, regexps and <1>:     User-modified.       (line  79)
 * case sensitivity, array indices and:   Array Intro.         (line 100)
-* case sensitivity, converting case:     String Functions.    (line 540)
+* case sensitivity, converting case:     String Functions.    (line 544)
 * case sensitivity, example programs:    Library Functions.   (line  50)
 * CGI, awk scripts for:                  Options.             (line 146)
 * character sets (machine character encodings): Ordinal Functions.
@@ -36612,9 +36616,9 @@ Index
 * converting, numbers to strings:        Strings And Numbers. (line   6)
 * converting, integer array subscripts to strings: Numeric Array Subscripts.
                                                               (line  31)
-* converting, string to numbers <1>:     String Functions.    (line 408)
-* converting, string to lower case:      String Functions.    (line 541)
-* converting, string to upper case:      String Functions.    (line 547)
+* converting, string to numbers <1>:     String Functions.    (line 412)
+* converting, string to lower case:      String Functions.    (line 545)
+* converting, string to upper case:      String Functions.    (line 551)
 * converting, dates to timestamps:       Time Functions.      (line  77)
 * converting, string to numbers <2>:     Bitwise Functions.   (line 110)
 * converting, numbers to strings <1>:    Bitwise Functions.   (line 110)
@@ -36704,7 +36708,7 @@ Index
 * dark corner, regexp as second argument to index(): String Functions.
                                                               (line 178)
 * dark corner, length() function:        String Functions.    (line 200)
-* dark corner, split() function:         String Functions.    (line 379)
+* dark corner, split() function:         String Functions.    (line 383)
 * dark corner, parameter name restrictions: Definition Syntax.
                                                               (line  44)
 * dark corner <1>:                       Glossary.            (line 266)
@@ -36958,7 +36962,7 @@ Index
 * differences in awk and gawk, match() function: String Functions.
                                                               (line 276)
 * differences in awk and gawk, split() function: String Functions.
-                                                              (line 364)
+                                                              (line 368)
 * differences in awk and gawk, indirect function calls: Indirect Calls.
                                                               (line   6)
 * differences in awk and gawk, BINMODE variable <1>: PC Using.
@@ -37403,7 +37407,7 @@ Index
 * format time string:                    Time Functions.      (line  50)
 * formats, numeric output:               OFMT.                (line   6)
 * formatting, output:                    Printf.              (line   6)
-* formatting, strings:                   String Functions.    (line 401)
+* formatting, strings:                   String Functions.    (line 405)
 * forward slash (/), to enclose regular expressions: Regexp.  (line  10)
 * forward slash (/), /= operator:        Assignment Ops.      (line 129)
 * forward slash (/), /= operator, vs. /=.../ regexp constant: Assignment Ops.
@@ -37708,7 +37712,7 @@ Index
 * gsub:                                  Standard Regexp Constants.
                                                               (line  43)
 * gsub <1>:                              String Functions.    (line 153)
-* gsub() function, arguments of:         String Functions.    (line 480)
+* gsub() function, arguments of:         String Functions.    (line 484)
 * gsub() function, escape processing:    Gory Details.        (line   6)
 * Guerrero, Juan Manuel:                 Acknowledgments.     (line  60)
 * Guerrero, Juan Manuel <1>:             Contributors.        (line 150)
@@ -38018,7 +38022,7 @@ Index
 * matching, leftmost longest:            Multiple Line.       (line  26)
 * matching, expressions:                 Typing and Comparison.
                                                               (line   9)
-* matching, null strings:                String Functions.    (line 563)
+* matching, null strings:                String Functions.    (line 567)
 * mawk utility:                          Escape Sequences.    (line 120)
 * mawk utility <1>:                      Getline/Pipe.        (line  62)
 * mawk utility <2>:                      Concatenation.       (line  36)
@@ -38149,7 +38153,7 @@ Index
 * null strings, as array subscripts:     Uninitialized Subscripts.
                                                               (line  43)
 * null strings, deleting array elements and: Delete.          (line  27)
-* null strings, matching:                String Functions.    (line 563)
+* null strings, matching:                String Functions.    (line 567)
 * null strings <3>:                      Basic Data Typing.   (line  26)
 * number of array elements:              String Functions.    (line 214)
 * number sign (#), #! (executable scripts): Executable Scripts.
@@ -38328,7 +38332,7 @@ Index
 * portability, operators, not in POSIX awk: Precedence.       (line  97)
 * portability, deleting array elements:  Delete.              (line  56)
 * portability, length() function:        String Functions.    (line 193)
-* portability, substr() function:        String Functions.    (line 530)
+* portability, substr() function:        String Functions.    (line 534)
 * portability, functions, defining:      Definition Syntax.   (line 114)
 * portability, next statement in user-defined functions: Function Caveats.
                                                               (line  26)
@@ -38403,7 +38407,7 @@ Index
                                                               (line  12)
 * POSIX mode <9>:                        POSIX String Comparison.
                                                               (line  34)
-* POSIX mode <10>:                       String Functions.    (line 397)
+* POSIX mode <10>:                       String Functions.    (line 401)
 * POSIX mode <11>:                       Controlling Array Traversal.
                                                               (line 226)
 * POSIX mode <12>:                       POSIX Floating Point Problems.
@@ -38630,7 +38634,7 @@ Index
 * regular expressions, as patterns <1>:  Regexp Patterns.     (line   6)
 * regular expressions, case sensitivity <1>: User-modified.   (line  79)
 * regular expressions, searching for:    Egrep Program.       (line   6)
-* replace in string:                     String Functions.    (line 426)
+* replace in string:                     String Functions.    (line 430)
 * retrying input:                        Retrying Input.      (line   6)
 * return debugger command:               Debugger Execution Control.
                                                               (line  54)
@@ -38795,8 +38799,8 @@ Index
 * side effects, array indexing:          Reference to Elements.
                                                               (line  43)
 * side effects, match() function:        String Functions.    (line 241)
-* side effects, sub() function:          String Functions.    (line 480)
-* side effects, gsub() function:         String Functions.    (line 480)
+* side effects, sub() function:          String Functions.    (line 484)
+* side effects, gsub() function:         String Functions.    (line 484)
 * side effects, asort() function:        Array Sorting Functions.
                                                               (line  24)
 * side effects, asorti() function:       Array Sorting Functions.
@@ -38832,7 +38836,7 @@ Index
                                                               (line 148)
 * sidebar, Operator Evaluation Order:    Increment Ops.       (line  58)
 * sidebar, Changing NR and FNR:          Auto-set.            (line 402)
-* sidebar, Matching the Null String:     String Functions.    (line 561)
+* sidebar, Matching the Null String:     String Functions.    (line 565)
 * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions.
                                                               (line  73)
 * sidebar, Controlling Output Buffering with system(): I/O Functions.
@@ -38910,7 +38914,7 @@ Index
 * split() function, array elements, deleting: Delete.         (line  61)
 * split.awk program:                     Split Program.       (line  51)
 * sprintf:                               OFMT.                (line  15)
-* sprintf <1>:                           String Functions.    (line 401)
+* sprintf <1>:                           String Functions.    (line 405)
 * sprintf() function, print/printf statements and: Round Function.
                                                               (line   6)
 * sqrt:                                  Numeric Functions.   (line  77)
@@ -38961,21 +38965,21 @@ Index
 * strings, numeric:                      Variable Typing.     (line  67)
 * strings, converting, numbers to:       User-modified.       (line  30)
 * strings, converting, numbers to <1>:   User-modified.       (line 107)
-* strings, splitting, example:           String Functions.    (line 350)
-* strings, converting letter case:       String Functions.    (line 540)
+* strings, splitting, example:           String Functions.    (line 354)
+* strings, converting letter case:       String Functions.    (line 544)
 * strings, converting <1>:               Bitwise Functions.   (line 110)
 * strings, merging arrays into:          Join Function.       (line   6)
 * strings, for localization:             Programmer i18n.     (line  13)
 * strings, extracting:                   String Extraction.   (line   6)
-* strtonum:                              String Functions.    (line 408)
+* strtonum:                              String Functions.    (line 412)
 * strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data.
                                                               (line  35)
 * STR_CHAIN_MAX environment variable:    Other Environment Variables.
                                                               (line  91)
 * sub:                                   Standard Regexp Constants.
                                                               (line  43)
-* sub <1>:                               String Functions.    (line 426)
-* sub() function, arguments of:          String Functions.    (line 480)
+* sub <1>:                               String Functions.    (line 430)
+* sub() function, arguments of:          String Functions.    (line 484)
 * sub() function, escape processing:     Gory Details.        (line   6)
 * subscript separators:                  User-modified.       (line 148)
 * subscripts in arrays, numbers as:      Numeric Array Subscripts.
@@ -38989,8 +38993,8 @@ Index
 * SUBSEP variable, multidimensional arrays and: Multidimensional.
                                                               (line  16)
 * substitute in string:                  String Functions.    (line  98)
-* substr:                                String Functions.    (line 499)
-* substring:                             String Functions.    (line 499)
+* substr:                                String Functions.    (line 503)
+* substring:                             String Functions.    (line 503)
 * Sumner, Andrew:                        Other Versions.      (line  64)
 * supplementary groups of gawk process:  Auto-set.            (line 287)
 * switch statement:                      Switch Statement.    (line   6)
@@ -39053,8 +39057,8 @@ Index
 * timestamps, converting dates to:       Time Functions.      (line  77)
 * timestamps, formatted:                 Getlocaltime Function.
                                                               (line   6)
-* tolower:                               String Functions.    (line 541)
-* toupper:                               String Functions.    (line 547)
+* tolower:                               String Functions.    (line 545)
+* toupper:                               String Functions.    (line 551)
 * tr utility:                            Translate Program.   (line   6)
 * trace debugger command:                Miscellaneous Debugger Commands.
                                                               (line 108)
@@ -39087,8 +39091,8 @@ Index
 * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in.
                                                               (line  16)
 * troubleshooting, match() function:     String Functions.    (line 305)
-* troubleshooting, gsub()/sub() functions: String Functions.  (line 490)
-* troubleshooting, substr() function:    String Functions.    (line 517)
+* troubleshooting, gsub()/sub() functions: String Functions.  (line 494)
+* troubleshooting, substr() function:    String Functions.    (line 521)
 * troubleshooting, fflush() function:    I/O Functions.       (line  62)
 * troubleshooting, system() function:    I/O Functions.       (line 127)
 * troubleshooting, readable data files:  File Checking.       (line   6)
@@ -39540,370 +39544,370 @@ Ref: Numeric Functions-Footnote-1555593
 Ref: Numeric Functions-Footnote-2556241
 Ref: Numeric Functions-Footnote-3556289
 Node: String Functions556561
-Ref: String Functions-Footnote-1581403
-Ref: String Functions-Footnote-2581531
-Ref: String Functions-Footnote-3581779
-Node: Gory Details581866
-Ref: table-sub-escapes583657
-Ref: table-sub-proposed585177
-Ref: table-posix-sub586541
-Ref: table-gensub-escapes588083
-Ref: Gory Details-Footnote-1588907
-Node: I/O Functions589061
-Ref: table-system-return-values595515
-Ref: I/O Functions-Footnote-1597596
-Ref: I/O Functions-Footnote-2597744
-Node: Time Functions597864
-Ref: Time Functions-Footnote-1608535
-Ref: Time Functions-Footnote-2608603
-Ref: Time Functions-Footnote-3608761
-Ref: Time Functions-Footnote-4608872
-Ref: Time Functions-Footnote-5608984
-Ref: Time Functions-Footnote-6609211
-Node: Bitwise Functions609477
-Ref: table-bitwise-ops610071
-Ref: Bitwise Functions-Footnote-1616135
-Ref: Bitwise Functions-Footnote-2616308
-Node: Type Functions616499
-Node: I18N Functions620020
-Node: User-defined621671
-Node: Definition Syntax622483
-Ref: Definition Syntax-Footnote-1628177
-Node: Function Example628248
-Ref: Function Example-Footnote-1631170
-Node: Function Calling631192
-Node: Calling A Function631780
-Node: Variable Scope632738
-Node: Pass By Value/Reference635732
-Node: Function Caveats638376
-Ref: Function Caveats-Footnote-1640423
-Node: Return Statement640543
-Node: Dynamic Typing643522
-Node: Indirect Calls644452
-Node: Functions Summary655379
-Node: Library Functions658084
-Ref: Library Functions-Footnote-1661568
-Ref: Library Functions-Footnote-2661711
-Node: Library Names661882
-Ref: Library Names-Footnote-1665549
-Ref: Library Names-Footnote-2665772
-Node: General Functions665858
-Node: Strtonum Function667040
-Node: Assert Function670062
-Node: Round Function673388
-Node: Cliff Random Function674928
-Node: Ordinal Functions675944
-Ref: Ordinal Functions-Footnote-1679007
-Ref: Ordinal Functions-Footnote-2679259
-Node: Join Function679469
-Ref: Join Function-Footnote-1681239
-Node: Getlocaltime Function681439
-Node: Readfile Function685181
-Node: Shell Quoting687158
-Node: Isnumeric Function688586
-Node: Data File Management689974
-Node: Filetrans Function690606
-Node: Rewind Function694702
-Node: File Checking696611
-Ref: File Checking-Footnote-1697945
-Node: Empty Files698146
-Node: Ignoring Assigns700125
-Node: Getopt Function701675
-Ref: Getopt Function-Footnote-1716972
-Node: Passwd Functions717172
-Ref: Passwd Functions-Footnote-1726011
-Node: Group Functions726099
-Ref: Group Functions-Footnote-1733997
-Node: Walking Arrays734204
-Node: Library Functions Summary737212
-Node: Library Exercises738618
-Node: Sample Programs739083
-Node: Running Examples739853
-Node: Clones740581
-Node: Cut Program741805
-Node: Egrep Program751945
-Node: Id Program760946
-Node: Split Program770881
-Ref: Split Program-Footnote-1780774
-Node: Tee Program780947
-Node: Uniq Program783737
-Node: Wc Program791325
-Node: Bytes vs. Characters791712
-Node: Using extensions793260
-Node: wc program794014
-Node: Miscellaneous Programs798879
-Node: Dupword Program800092
-Node: Alarm Program802122
-Node: Translate Program806977
-Ref: Translate Program-Footnote-1811542
-Node: Labels Program811812
-Ref: Labels Program-Footnote-1815163
-Node: Word Sorting815247
-Node: History Sorting819319
-Node: Extract Program821544
-Node: Simple Sed829557
-Node: Igawk Program832631
-Ref: Igawk Program-Footnote-1847260
-Ref: Igawk Program-Footnote-2847462
-Ref: Igawk Program-Footnote-3847584
-Node: Anagram Program847699
-Node: Signature Program850761
-Node: Programs Summary852008
-Node: Programs Exercises853222
-Ref: Programs Exercises-Footnote-1857352
-Node: Advanced Features857438
-Node: Nondecimal Data859835
-Node: Boolean Typed Values861433
-Node: Array Sorting863314
-Node: Controlling Array Traversal864019
-Ref: Controlling Array Traversal-Footnote-1872387
-Node: Array Sorting Functions872505
-Ref: Array Sorting Functions-Footnote-1878416
-Node: Two-way I/O878612
-Ref: Two-way I/O-Footnote-1886338
-Ref: Two-way I/O-Footnote-2886525
-Node: TCP/IP Networking886607
-Node: Profiling889683
-Node: Persistent Memory898989
-Ref: Persistent Memory-Footnote-1906910
-Node: Extension Philosophy907037
-Node: Advanced Features Summary908524
-Node: Internationalization910696
-Node: I18N and L10N912370
-Node: Explaining gettext913057
-Ref: Explaining gettext-Footnote-1918949
-Ref: Explaining gettext-Footnote-2919134
-Node: Programmer i18n919299
-Ref: Programmer i18n-Footnote-1924248
-Node: Translator i18n924297
-Node: String Extraction925091
-Ref: String Extraction-Footnote-1926223
-Node: Printf Ordering926309
-Ref: Printf Ordering-Footnote-1929095
-Node: I18N Portability929159
-Ref: I18N Portability-Footnote-1931615
-Node: I18N Example931678
-Ref: I18N Example-Footnote-1934953
-Ref: I18N Example-Footnote-2935026
-Node: Gawk I18N935135
-Node: I18N Summary935757
-Node: Debugger937098
-Node: Debugging938098
-Node: Debugging Concepts938539
-Node: Debugging Terms940348
-Node: Awk Debugging942923
-Ref: Awk Debugging-Footnote-1943868
-Node: Sample Debugging Session944000
-Node: Debugger Invocation944534
-Node: Finding The Bug945920
-Node: List of Debugger Commands952394
-Node: Breakpoint Control953727
-Node: Debugger Execution Control957421
-Node: Viewing And Changing Data960783
-Node: Execution Stack964324
-Node: Debugger Info965961
-Node: Miscellaneous Debugger Commands970032
-Node: Readline Support975094
-Node: Limitations975990
-Node: Debugging Summary978544
-Node: Namespaces979823
-Node: Global Namespace980934
-Node: Qualified Names982332
-Node: Default Namespace983331
-Node: Changing The Namespace984072
-Node: Naming Rules985686
-Node: Internal Name Management987534
-Node: Namespace Example988576
-Node: Namespace And Features991138
-Node: Namespace Summary992573
-Node: Arbitrary Precision Arithmetic994050
-Node: Computer Arithmetic995537
-Ref: table-numeric-ranges999303
-Ref: table-floating-point-ranges999797
-Ref: Computer Arithmetic-Footnote-11000456
-Node: Math Definitions1000513
-Ref: table-ieee-formats1003489
-Node: MPFR features1004057
-Node: MPFR On Parole1004502
-Ref: MPFR On Parole-Footnote-11005331
-Node: MPFR Intro1005486
-Node: FP Math Caution1007137
-Ref: FP Math Caution-Footnote-11008209
-Node: Inexactness of computations1008578
-Node: Inexact representation1009609
-Node: Comparing FP Values1010969
-Node: Errors accumulate1012210
-Node: Strange values1013666
-Ref: Strange values-Footnote-11016254
-Node: Getting Accuracy1016359
-Node: Try To Round1019069
-Node: Setting precision1019968
-Ref: table-predefined-precision-strings1020665
-Node: Setting the rounding mode1022496
-Ref: table-gawk-rounding-modes1022870
-Ref: Setting the rounding mode-Footnote-11026802
-Node: Arbitrary Precision Integers1026981
-Ref: Arbitrary Precision Integers-Footnote-11030156
-Node: Checking for MPFR1030305
-Node: POSIX Floating Point Problems1031779
-Ref: POSIX Floating Point Problems-Footnote-11036432
-Node: Floating point summary1036470
-Node: Dynamic Extensions1038660
-Node: Extension Intro1040213
-Node: Plugin License1041479
-Node: Extension Mechanism Outline1042276
-Ref: figure-load-extension1042715
-Ref: figure-register-new-function1044281
-Ref: figure-call-new-function1045374
-Node: Extension API Description1047437
-Node: Extension API Functions Introduction1049150
-Ref: table-api-std-headers1050986
-Node: General Data Types1055236
-Ref: General Data Types-Footnote-11063942
-Node: Memory Allocation Functions1064241
-Ref: Memory Allocation Functions-Footnote-11068742
-Node: Constructor Functions1068841
-Node: API Ownership of MPFR and GMP Values1072494
-Node: Registration Functions1074027
-Node: Extension Functions1074727
-Node: Exit Callback Functions1080049
-Node: Extension Version String1081299
-Node: Input Parsers1081962
-Node: Output Wrappers1094683
-Node: Two-way processors1099195
-Node: Printing Messages1101460
-Ref: Printing Messages-Footnote-11102631
-Node: Updating ERRNO1102784
-Node: Requesting Values1103523
-Ref: table-value-types-returned1104260
-Node: Accessing Parameters1105369
-Node: Symbol Table Access1106606
-Node: Symbol table by name1107118
-Ref: Symbol table by name-Footnote-11110143
-Node: Symbol table by cookie1110271
-Ref: Symbol table by cookie-Footnote-11114456
-Node: Cached values1114520
-Ref: Cached values-Footnote-11118056
-Node: Array Manipulation1118209
-Ref: Array Manipulation-Footnote-11119300
-Node: Array Data Types1119337
-Ref: Array Data Types-Footnote-11121995
-Node: Array Functions1122087
-Node: Flattening Arrays1126872
-Node: Creating Arrays1133848
-Node: Redirection API1138615
-Node: Extension API Variables1141448
-Node: Extension Versioning1142159
-Ref: gawk-api-version1142588
-Node: Extension GMP/MPFR Versioning1144320
-Node: Extension API Informational Variables1145948
-Node: Extension API Boilerplate1147021
-Node: Changes from API V11150995
-Node: Finding Extensions1152567
-Node: Extension Example1153126
-Node: Internal File Description1153924
-Node: Internal File Ops1158004
-Ref: Internal File Ops-Footnote-11169354
-Node: Using Internal File Ops1169494
-Ref: Using Internal File Ops-Footnote-11171877
-Node: Extension Samples1172151
-Node: Extension Sample File Functions1173680
-Node: Extension Sample Fnmatch1181329
-Node: Extension Sample Fork1182816
-Node: Extension Sample Inplace1184034
-Node: Extension Sample Ord1187660
-Node: Extension Sample Readdir1188496
-Ref: table-readdir-file-types1189385
-Node: Extension Sample Revout1190453
-Node: Extension Sample Rev2way1191042
-Node: Extension Sample Read write array1191782
-Node: Extension Sample Readfile1194947
-Node: Extension Sample Time1196042
-Node: Extension Sample API Tests1197794
-Node: gawkextlib1198286
-Node: Extension summary1201204
-Node: Extension Exercises1204906
-Node: Language History1206148
-Node: V7/SVR3.11207804
-Node: SVR41209956
-Node: POSIX1211390
-Node: BTL1212771
-Node: POSIX/GNU1213500
-Node: Feature History1219425
-Node: Common Extensions1237164
-Node: Ranges and Locales1238447
-Ref: Ranges and Locales-Footnote-11243063
-Ref: Ranges and Locales-Footnote-21243090
-Ref: Ranges and Locales-Footnote-31243325
-Node: Contributors1243548
-Node: History summary1249545
-Node: Installation1250925
-Node: Gawk Distribution1251869
-Node: Getting1252353
-Node: Extracting1253316
-Node: Distribution contents1254954
-Node: Unix Installation1262460
-Node: Quick Installation1263264
-Node: Compiling with MPFR1265684
-Node: Shell Startup Files1266374
-Node: Additional Configuration Options1267463
-Node: Configuration Philosophy1269778
-Node: Compiling from Git1272174
-Node: Building the Documentation1272729
-Node: Non-Unix Installation1274113
-Node: PC Installation1274573
-Node: PC Binary Installation1275414
-Node: PC Compiling1276287
-Node: PC Using1277393
-Node: Cygwin1280889
-Node: MSYS1282113
-Node: VMS Installation1282715
-Node: VMS Compilation1283434
-Ref: VMS Compilation-Footnote-11284841
-Node: VMS Dynamic Extensions1284899
-Ref: VMS Dynamic Extensions-Footnote-11286623
-Node: VMS Installation Details1286713
-Node: VMS Running1288975
-Node: VMS GNV1293254
-Node: Bugs1293968
-Node: Bug definition1294880
-Node: Bug address1298382
-Node: Usenet1301901
-Node: Performance bugs1303090
-Node: Asking for help1306011
-Node: Maintainers1307978
-Node: Other Versions1308985
-Node: Installation summary1317255
-Node: Notes1318612
-Node: Compatibility Mode1319406
-Node: Additions1320188
-Node: Accessing The Source1321113
-Node: Adding Code1322550
-Node: New Ports1329365
-Node: Derived Files1333740
-Ref: Derived Files-Footnote-11339400
-Ref: Derived Files-Footnote-21339435
-Ref: Derived Files-Footnote-31340033
-Node: Future Extensions1340147
-Node: Implementation Limitations1340805
-Node: Extension Design1342015
-Node: Old Extension Problems1343159
-Ref: Old Extension Problems-Footnote-11344677
-Node: Extension New Mechanism Goals1344734
-Ref: Extension New Mechanism Goals-Footnote-11348098
-Node: Extension Other Design Decisions1348287
-Node: Extension Future Growth1350400
-Node: Notes summary1351006
-Node: Basic Concepts1352164
-Node: Basic High Level1352845
-Ref: figure-general-flow1353127
-Ref: figure-process-flow1353813
-Ref: Basic High Level-Footnote-11357115
-Node: Basic Data Typing1357300
-Node: Glossary1360628
-Node: Copying1392515
-Node: GNU Free Documentation License1430058
-Node: Index1455178
+Ref: String Functions-Footnote-1581701
+Ref: String Functions-Footnote-2581829
+Ref: String Functions-Footnote-3582077
+Node: Gory Details582164
+Ref: table-sub-escapes583955
+Ref: table-sub-proposed585475
+Ref: table-posix-sub586839
+Ref: table-gensub-escapes588381
+Ref: Gory Details-Footnote-1589205
+Node: I/O Functions589359
+Ref: table-system-return-values595813
+Ref: I/O Functions-Footnote-1597894
+Ref: I/O Functions-Footnote-2598042
+Node: Time Functions598162
+Ref: Time Functions-Footnote-1608833
+Ref: Time Functions-Footnote-2608901
+Ref: Time Functions-Footnote-3609059
+Ref: Time Functions-Footnote-4609170
+Ref: Time Functions-Footnote-5609282
+Ref: Time Functions-Footnote-6609509
+Node: Bitwise Functions609775
+Ref: table-bitwise-ops610369
+Ref: Bitwise Functions-Footnote-1616433
+Ref: Bitwise Functions-Footnote-2616606
+Node: Type Functions616797
+Node: I18N Functions620318
+Node: User-defined621969
+Node: Definition Syntax622781
+Ref: Definition Syntax-Footnote-1628475
+Node: Function Example628546
+Ref: Function Example-Footnote-1631468
+Node: Function Calling631490
+Node: Calling A Function632078
+Node: Variable Scope633036
+Node: Pass By Value/Reference636030
+Node: Function Caveats638674
+Ref: Function Caveats-Footnote-1640721
+Node: Return Statement640841
+Node: Dynamic Typing643820
+Node: Indirect Calls644750
+Node: Functions Summary655677
+Node: Library Functions658382
+Ref: Library Functions-Footnote-1661866
+Ref: Library Functions-Footnote-2662009
+Node: Library Names662180
+Ref: Library Names-Footnote-1665847
+Ref: Library Names-Footnote-2666070
+Node: General Functions666156
+Node: Strtonum Function667338
+Node: Assert Function670360
+Node: Round Function673686
+Node: Cliff Random Function675226
+Node: Ordinal Functions676242
+Ref: Ordinal Functions-Footnote-1679305
+Ref: Ordinal Functions-Footnote-2679557
+Node: Join Function679767
+Ref: Join Function-Footnote-1681537
+Node: Getlocaltime Function681737
+Node: Readfile Function685479
+Node: Shell Quoting687456
+Node: Isnumeric Function688884
+Node: Data File Management690272
+Node: Filetrans Function690904
+Node: Rewind Function695000
+Node: File Checking696909
+Ref: File Checking-Footnote-1698243
+Node: Empty Files698444
+Node: Ignoring Assigns700423
+Node: Getopt Function701973
+Ref: Getopt Function-Footnote-1717270
+Node: Passwd Functions717470
+Ref: Passwd Functions-Footnote-1726309
+Node: Group Functions726397
+Ref: Group Functions-Footnote-1734295
+Node: Walking Arrays734502
+Node: Library Functions Summary737510
+Node: Library Exercises738916
+Node: Sample Programs739381
+Node: Running Examples740151
+Node: Clones740879
+Node: Cut Program742103
+Node: Egrep Program752243
+Node: Id Program761244
+Node: Split Program771179
+Ref: Split Program-Footnote-1781072
+Node: Tee Program781245
+Node: Uniq Program784035
+Node: Wc Program791623
+Node: Bytes vs. Characters792010
+Node: Using extensions793558
+Node: wc program794312
+Node: Miscellaneous Programs799177
+Node: Dupword Program800390
+Node: Alarm Program802420
+Node: Translate Program807275
+Ref: Translate Program-Footnote-1811840
+Node: Labels Program812110
+Ref: Labels Program-Footnote-1815461
+Node: Word Sorting815545
+Node: History Sorting819617
+Node: Extract Program821842
+Node: Simple Sed829855
+Node: Igawk Program832929
+Ref: Igawk Program-Footnote-1847558
+Ref: Igawk Program-Footnote-2847760
+Ref: Igawk Program-Footnote-3847882
+Node: Anagram Program847997
+Node: Signature Program851059
+Node: Programs Summary852306
+Node: Programs Exercises853520
+Ref: Programs Exercises-Footnote-1857650
+Node: Advanced Features857736
+Node: Nondecimal Data860133
+Node: Boolean Typed Values861731
+Node: Array Sorting863612
+Node: Controlling Array Traversal864317
+Ref: Controlling Array Traversal-Footnote-1872685
+Node: Array Sorting Functions872803
+Ref: Array Sorting Functions-Footnote-1878714
+Node: Two-way I/O878910
+Ref: Two-way I/O-Footnote-1886636
+Ref: Two-way I/O-Footnote-2886823
+Node: TCP/IP Networking886905
+Node: Profiling889981
+Node: Persistent Memory899287
+Ref: Persistent Memory-Footnote-1907208
+Node: Extension Philosophy907335
+Node: Advanced Features Summary908822
+Node: Internationalization910994
+Node: I18N and L10N912668
+Node: Explaining gettext913355
+Ref: Explaining gettext-Footnote-1919247
+Ref: Explaining gettext-Footnote-2919432
+Node: Programmer i18n919597
+Ref: Programmer i18n-Footnote-1924546
+Node: Translator i18n924595
+Node: String Extraction925389
+Ref: String Extraction-Footnote-1926521
+Node: Printf Ordering926607
+Ref: Printf Ordering-Footnote-1929393
+Node: I18N Portability929457
+Ref: I18N Portability-Footnote-1931913
+Node: I18N Example931976
+Ref: I18N Example-Footnote-1935251
+Ref: I18N Example-Footnote-2935324
+Node: Gawk I18N935433
+Node: I18N Summary936055
+Node: Debugger937396
+Node: Debugging938396
+Node: Debugging Concepts938837
+Node: Debugging Terms940646
+Node: Awk Debugging943221
+Ref: Awk Debugging-Footnote-1944166
+Node: Sample Debugging Session944298
+Node: Debugger Invocation944832
+Node: Finding The Bug946218
+Node: List of Debugger Commands952692
+Node: Breakpoint Control954025
+Node: Debugger Execution Control957719
+Node: Viewing And Changing Data961081
+Node: Execution Stack964622
+Node: Debugger Info966259
+Node: Miscellaneous Debugger Commands970330
+Node: Readline Support975392
+Node: Limitations976288
+Node: Debugging Summary978842
+Node: Namespaces980121
+Node: Global Namespace981232
+Node: Qualified Names982630
+Node: Default Namespace983629
+Node: Changing The Namespace984370
+Node: Naming Rules985984
+Node: Internal Name Management987832
+Node: Namespace Example988874
+Node: Namespace And Features991436
+Node: Namespace Summary992871
+Node: Arbitrary Precision Arithmetic994348
+Node: Computer Arithmetic995835
+Ref: table-numeric-ranges999601
+Ref: table-floating-point-ranges1000095
+Ref: Computer Arithmetic-Footnote-11000754
+Node: Math Definitions1000811
+Ref: table-ieee-formats1003787
+Node: MPFR features1004355
+Node: MPFR On Parole1004800
+Ref: MPFR On Parole-Footnote-11005629
+Node: MPFR Intro1005784
+Node: FP Math Caution1007435
+Ref: FP Math Caution-Footnote-11008507
+Node: Inexactness of computations1008876
+Node: Inexact representation1009907
+Node: Comparing FP Values1011267
+Node: Errors accumulate1012508
+Node: Strange values1013964
+Ref: Strange values-Footnote-11016552
+Node: Getting Accuracy1016657
+Node: Try To Round1019367
+Node: Setting precision1020266
+Ref: table-predefined-precision-strings1020963
+Node: Setting the rounding mode1022794
+Ref: table-gawk-rounding-modes1023168
+Ref: Setting the rounding mode-Footnote-11027100
+Node: Arbitrary Precision Integers1027279
+Ref: Arbitrary Precision Integers-Footnote-11030454
+Node: Checking for MPFR1030603
+Node: POSIX Floating Point Problems1032077
+Ref: POSIX Floating Point Problems-Footnote-11036730
+Node: Floating point summary1036768
+Node: Dynamic Extensions1038958
+Node: Extension Intro1040511
+Node: Plugin License1041777
+Node: Extension Mechanism Outline1042574
+Ref: figure-load-extension1043013
+Ref: figure-register-new-function1044579
+Ref: figure-call-new-function1045672
+Node: Extension API Description1047735
+Node: Extension API Functions Introduction1049448
+Ref: table-api-std-headers1051284
+Node: General Data Types1055534
+Ref: General Data Types-Footnote-11064240
+Node: Memory Allocation Functions1064539
+Ref: Memory Allocation Functions-Footnote-11069040
+Node: Constructor Functions1069139
+Node: API Ownership of MPFR and GMP Values1072792
+Node: Registration Functions1074325
+Node: Extension Functions1075025
+Node: Exit Callback Functions1080347
+Node: Extension Version String1081597
+Node: Input Parsers1082260
+Node: Output Wrappers1094981
+Node: Two-way processors1099493
+Node: Printing Messages1101758
+Ref: Printing Messages-Footnote-11102929
+Node: Updating ERRNO1103082
+Node: Requesting Values1103821
+Ref: table-value-types-returned1104558
+Node: Accessing Parameters1105667
+Node: Symbol Table Access1106904
+Node: Symbol table by name1107416
+Ref: Symbol table by name-Footnote-11110441
+Node: Symbol table by cookie1110569
+Ref: Symbol table by cookie-Footnote-11114754
+Node: Cached values1114818
+Ref: Cached values-Footnote-11118354
+Node: Array Manipulation1118507
+Ref: Array Manipulation-Footnote-11119598
+Node: Array Data Types1119635
+Ref: Array Data Types-Footnote-11122293
+Node: Array Functions1122385
+Node: Flattening Arrays1127170
+Node: Creating Arrays1134146
+Node: Redirection API1138913
+Node: Extension API Variables1141746
+Node: Extension Versioning1142457
+Ref: gawk-api-version1142886
+Node: Extension GMP/MPFR Versioning1144618
+Node: Extension API Informational Variables1146246
+Node: Extension API Boilerplate1147319
+Node: Changes from API V11151293
+Node: Finding Extensions1152865
+Node: Extension Example1153424
+Node: Internal File Description1154222
+Node: Internal File Ops1158302
+Ref: Internal File Ops-Footnote-11169652
+Node: Using Internal File Ops1169792
+Ref: Using Internal File Ops-Footnote-11172175
+Node: Extension Samples1172449
+Node: Extension Sample File Functions1173978
+Node: Extension Sample Fnmatch1181627
+Node: Extension Sample Fork1183114
+Node: Extension Sample Inplace1184332
+Node: Extension Sample Ord1187958
+Node: Extension Sample Readdir1188794
+Ref: table-readdir-file-types1189683
+Node: Extension Sample Revout1190751
+Node: Extension Sample Rev2way1191340
+Node: Extension Sample Read write array1192080
+Node: Extension Sample Readfile1195245
+Node: Extension Sample Time1196340
+Node: Extension Sample API Tests1198092
+Node: gawkextlib1198584
+Node: Extension summary1201502
+Node: Extension Exercises1205204
+Node: Language History1206446
+Node: V7/SVR3.11208102
+Node: SVR41210254
+Node: POSIX1211688
+Node: BTL1213069
+Node: POSIX/GNU1213798
+Node: Feature History1219723
+Node: Common Extensions1237462
+Node: Ranges and Locales1238745
+Ref: Ranges and Locales-Footnote-11243361
+Ref: Ranges and Locales-Footnote-21243388
+Ref: Ranges and Locales-Footnote-31243623
+Node: Contributors1243846
+Node: History summary1249843
+Node: Installation1251223
+Node: Gawk Distribution1252167
+Node: Getting1252651
+Node: Extracting1253614
+Node: Distribution contents1255252
+Node: Unix Installation1262758
+Node: Quick Installation1263562
+Node: Compiling with MPFR1265982
+Node: Shell Startup Files1266672
+Node: Additional Configuration Options1267761
+Node: Configuration Philosophy1270076
+Node: Compiling from Git1272472
+Node: Building the Documentation1273027
+Node: Non-Unix Installation1274411
+Node: PC Installation1274871
+Node: PC Binary Installation1275712
+Node: PC Compiling1276585
+Node: PC Using1277691
+Node: Cygwin1281187
+Node: MSYS1282411
+Node: VMS Installation1283013
+Node: VMS Compilation1283732
+Ref: VMS Compilation-Footnote-11285139
+Node: VMS Dynamic Extensions1285197
+Ref: VMS Dynamic Extensions-Footnote-11286921
+Node: VMS Installation Details1287011
+Node: VMS Running1289273
+Node: VMS GNV1293552
+Node: Bugs1294266
+Node: Bug definition1295178
+Node: Bug address1298680
+Node: Usenet1302199
+Node: Performance bugs1303388
+Node: Asking for help1306309
+Node: Maintainers1308276
+Node: Other Versions1309283
+Node: Installation summary1317553
+Node: Notes1318910
+Node: Compatibility Mode1319704
+Node: Additions1320486
+Node: Accessing The Source1321411
+Node: Adding Code1322848
+Node: New Ports1329663
+Node: Derived Files1334038
+Ref: Derived Files-Footnote-11339698
+Ref: Derived Files-Footnote-21339733
+Ref: Derived Files-Footnote-31340331
+Node: Future Extensions1340445
+Node: Implementation Limitations1341103
+Node: Extension Design1342313
+Node: Old Extension Problems1343457
+Ref: Old Extension Problems-Footnote-11344975
+Node: Extension New Mechanism Goals1345032
+Ref: Extension New Mechanism Goals-Footnote-11348396
+Node: Extension Other Design Decisions1348585
+Node: Extension Future Growth1350698
+Node: Notes summary1351304
+Node: Basic Concepts1352462
+Node: Basic High Level1353143
+Ref: figure-general-flow1353425
+Ref: figure-process-flow1354111
+Ref: Basic High Level-Footnote-11357413
+Node: Basic Data Typing1357598
+Node: Glossary1360926
+Node: Copying1392813
+Node: GNU Free Documentation License1430356
+Node: Index1455476
 End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 7b37f89a..c553f3e6 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -19268,6 +19268,11 @@ any trailing
 whitespace goes into @code{@var{seps}[@var{n}]}, where @var{n} is the
 return value of
 @code{split()} (i.e., the number of elements in @var{array}).
+If @var{fieldsep} is a comma, and @command{gawk} is not in POSIX mode,
+then the string is split using the CSV parsing rules, as for @code{FS}
+(@pxref{Comma Separated Fields}). In this case, the @var{seps}
+array is not filled in, since each element would simply consist of
+a string containing a comma.
 The @code{split()} function splits strings into pieces in the same way
 that input lines are split into fields.  For example:
diff --git a/doc/ b/doc/
index 4d14f6dc..bf093bb6 100644
--- a/doc/
+++ b/doc/
@@ -18409,6 +18409,11 @@ any trailing
 whitespace goes into @code{@var{seps}[@var{n}]}, where @var{n} is the
 return value of
 @code{split()} (i.e., the number of elements in @var{array}).
+If @var{fieldsep} is a comma, and @command{gawk} is not in POSIX mode,
+then the string is split using the CSV parsing rules, as for @code{FS}
+(@pxref{Comma Separated Fields}). In this case, the @var{seps}
+array is not filled in, since each element would simply consist of
+a string containing a comma.
 The @code{split()} function splits strings into pieces in the same way
 that input lines are split into fields.  For example:
diff --git a/field.c b/field.c
index c64fbace..7712819b 100644
--- a/field.c
+++ b/field.c
@@ -1184,7 +1184,7 @@ do_split(int nargs)
                } else if (fs->stlen == 1 && (sep->re_flags & CONSTANT) == 0) {
                        if (fs->stptr[0] == ' ') {
                                parseit = def_parse_field;
-                       } else if (fs->stptr[0] == ',') {
+                       } else if (fs->stptr[0] == ',' && ! do_posix) {
                                static bool warned = false;
                                parseit = comma_parse_field;


Summary of changes:
 ChangeLog       |   4 +
 doc/ChangeLog   |   5 +
 doc/   | 796 ++++++++++++++++++++++++++++----------------------------
 doc/gawk.texi   |   5 +
 doc/ |   5 +
 field.c         |   2 +-
 6 files changed, 420 insertions(+), 397 deletions(-)


reply via email to

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