diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | doc/ChangeLog | 6 | ||||
-rw-r--r-- | doc/awkcard.in | 8 | ||||
-rw-r--r-- | doc/gawk.1 | 11 |
5 files changed, 32 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2017-03-22 Andrew J. Schorr <aschorr@telemetry-investments.com> + * NEWS: Document new FIELDWIDTHS skip capability and API input parser + field parsing enhancement. + +2017-03-22 Andrew J. Schorr <aschorr@telemetry-investments.com> + * gawkapi.h (awk_input_buf_t): Update get_record comment regarding the new field_width argument. @@ -104,6 +104,13 @@ Changes from 4.1.x to 4.2.0 argument is present and is non-zero or non-null, the time will be converted from UTC instead of from the local timezone. +26. The FIELDWIDTHS parsing syntax has been enhanced to allow specifying + how many characters to skip before a field starts. + +27. An API input parser now has the ability to override the default field + parsing mechanism by specifying the locations of each field in the input + record. + Changes from 4.1.3 to 4.1.4 --------------------------- diff --git a/doc/ChangeLog b/doc/ChangeLog index 142f035e..898cfa40 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-22 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * awkcard.in: Document FIELDWIDTHS enhancement to support an optional + field skip prefix. + * gawk.1: Ditto. + 2017-03-17 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Improve the discussion of quoting on diff --git a/doc/awkcard.in b/doc/awkcard.in index 418cc8d9..86aeee2e 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -556,8 +556,10 @@ fails, or if \*(FCclose()\*(FR fails. T} \*(FCFIELDWIDTHS\fP T{ -Whitespace separated list of field widths. Used -to parse the input into fields of fixed width, +Whitespace-separated list of field widths. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. +Used to parse the input into fields of fixed width, instead of the value of \*(FCFS\fP.\*(CD T} \*(FCFILENAME\fP T{ @@ -1017,6 +1019,8 @@ also affects how fields are split when variable is set to a space-separated list of numbers, each field is expected to have a fixed width, and \*(GK splits up the record using the specified widths. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. The value of \*(FCFS\fP is ignored. Assigning a new value to \*(FCFS\fP or \*(FCFPAT\fP overrides the use of \*(FCFIELDWIDTHS\*(FR. @@ -805,10 +805,13 @@ is a regular expression. .PP If the .B FIELDWIDTHS -variable is set to a space separated list of numbers, each field is +variable is set to a space-separated list of numbers, each field is expected to have fixed width, and .I gawk -splits up the record using the specified widths. The value of +splits up the record using the specified widths. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. +The value of .B FS is ignored. Assigning a new value to @@ -959,12 +962,14 @@ For non-system errors, will be zero. .TP .B FIELDWIDTHS -A whitespace separated list of field widths. When set, +A whitespace-separated list of field widths. When set, .I gawk parses the input into fields of fixed width, instead of using the value of the .B FS variable as the field separator. +Each field width may optionally be preceded by a colon-separated +value specifying the number of characters to skip before the field starts. See .BR Fields , above. |