summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-03-22 20:26:03 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-03-22 20:26:03 -0400
commit19bebf51939d4c24d261c5720b3e54333d441fa6 (patch)
tree00da0a8711b1a008be31ef6de6444cddf6570389
parent1a417d68f71b18525c572b903086f451ed75902b (diff)
downloadgawk-19bebf51939d4c24d261c5720b3e54333d441fa6.tar.gz
Start to document new FIELDWIDTHS and API input parser capabilities.
-rw-r--r--ChangeLog5
-rw-r--r--NEWS7
-rw-r--r--doc/ChangeLog6
-rw-r--r--doc/awkcard.in8
-rw-r--r--doc/gawk.111
5 files changed, 32 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 54b76636..7c10c12f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index 3ddc96e9..9905a706 100644
--- a/NEWS
+++ b/NEWS
@@ -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.
diff --git a/doc/gawk.1 b/doc/gawk.1
index 2460a686..f135e955 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -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.