aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-03-05 17:05:36 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-03-05 17:05:36 -0500
commit62fe07b69e522c909aad303b31443cc3c9bdf6c0 (patch)
treed4e720b2c250f3ddab01576e86c079b66c3a132b /io.c
parent50a83f464b8c573bf8053dbb503041f4640b68d2 (diff)
downloadegawk-62fe07b69e522c909aad303b31443cc3c9bdf6c0.tar.gz
egawk-62fe07b69e522c909aad303b31443cc3c9bdf6c0.tar.bz2
egawk-62fe07b69e522c909aad303b31443cc3c9bdf6c0.zip
Enable an API input parser to supply an array of field widths to override the default gawk field parsing mechanism.
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index cced126e..040b485c 100644
--- a/io.c
+++ b/io.c
@@ -604,7 +604,7 @@ inrec(IOBUF *iop, int *errcode)
} else {
INCREMENT_REC(NR);
INCREMENT_REC(FNR);
- set_record(begin, cnt);
+ set_record(begin, cnt, iop->public.field_width);
if (*errcode > 0)
retval = false;
}
@@ -2668,7 +2668,7 @@ do_getline_redir(int into_variable, enum redirval redirtype)
}
if (lhs == NULL) /* no optional var. */
- set_record(s, cnt);
+ set_record(s, cnt, iop->public.field_width);
else { /* assignment to variable */
unref(*lhs);
*lhs = make_string(s, cnt);
@@ -2709,7 +2709,7 @@ do_getline(int into_variable, IOBUF *iop)
INCREMENT_REC(FNR);
if (! into_variable) /* no optional var. */
- set_record(s, cnt);
+ set_record(s, cnt, iop->public.field_width);
else { /* assignment to variable */
NODE **lhs;
lhs = POP_ADDRESS();