diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-03-06 14:16:51 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2017-03-06 14:16:51 -0500 |
commit | 54efcb6f4ce81ed0ad2f90e27252f1d8532dd0b5 (patch) | |
tree | 3c5ab5bd7f0b5b7470baded2ec2b6d875d514f2d /field.c | |
parent | d6406b66add5652130385942a7e05ebc9ea799ce (diff) | |
download | egawk-54efcb6f4ce81ed0ad2f90e27252f1d8532dd0b5.tar.gz egawk-54efcb6f4ce81ed0ad2f90e27252f1d8532dd0b5.tar.bz2 egawk-54efcb6f4ce81ed0ad2f90e27252f1d8532dd0b5.zip |
Rename variable in field.c and added a comment for improved clarity.
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -40,7 +40,12 @@ typedef void (* Setfunc)(long, char *, long, NODE *); static long (*parse_field)(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); -static long (*save_parse_field)(long, char **, int, NODE *, +/* + * N.B. The normal_parse_field function pointer contains the parse_field value + * that should be used except when API field parsing is overriding the default + * field parsing mechanism. + */ +static long (*normal_parse_field)(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); static long re_parse_field(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); @@ -319,8 +324,8 @@ set_record(const char *buf, int cnt, const int *fw) } } else { - if (parse_field != save_parse_field) { - parse_field = save_parse_field; + if (parse_field != normal_parse_field) { + parse_field = normal_parse_field; update_PROCINFO_str("FS", current_field_sep_str()); } } @@ -1124,7 +1129,7 @@ do_patsplit(int nargs) static void set_parser(long (*func)(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool)) { - save_parse_field = func; + normal_parse_field = func; if (parse_field != api_parse_field && parse_field != func) { parse_field = func; update_PROCINFO_str("FS", current_field_sep_str()); |