diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-04-09 18:53:50 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-04-09 18:53:50 -0400 |
commit | 215618921d2515040bd02fecc1a3438cd4949a5b (patch) | |
tree | a749a07aaddc36b8523a01a272d5311cb0535b39 | |
parent | 0d3bc6ff432fe62a6e46c543311d86c2781915c2 (diff) | |
download | egawk-215618921d2515040bd02fecc1a3438cd4949a5b.tar.gz egawk-215618921d2515040bd02fecc1a3438cd4949a5b.tar.bz2 egawk-215618921d2515040bd02fecc1a3438cd4949a5b.zip |
Fix comment in fw_parse_field and white space in gawkapi.h.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | field.c | 8 | ||||
-rw-r--r-- | gawkapi.h | 2 |
3 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2017-04-09 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * field.c (fw_parse_field): Edit comment about resetting shift state. + * gawkapi.h (awk_fieldwidth_info_t): Make white space more uniform. + 2017-03-27 Arnold D. Robbins <arnold@skeeve.com> * field.c (parse_field_func_t): New typedef. Used as needed. @@ -771,10 +771,10 @@ fw_parse_field(long up_to, /* parse only up to this field number */ return nf; if (gawk_mb_cur_max > 1 && fw->use_chars) { /* - * Reset the shift state for each field, since there might - * be who-knows-what kind of stuff in between fields, - * and we assume each field starts with a valid (possibly - * multibyte) character. + * Reset the shift state. Arguably, the shift state should + * be part of the file state and carried forward at all times, + * but nobody has complained so far, so this may not matter + * in practice. */ memset(&mbs, 0, sizeof(mbstate_t)); while (nf < up_to) { @@ -132,7 +132,7 @@ typedef struct { size_t nf; struct awk_field_info { size_t skip; /* amount to skip before field starts */ - size_t len; /* length of field */ + size_t len; /* length of field */ } fields[1]; /* actual dimension should be nf */ } awk_fieldwidth_info_t; |