diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-05 08:22:20 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-05 08:22:20 +0300 |
commit | 2f7402ec4b65a2546373403fa701a29d7482cf3f (patch) | |
tree | 1ac22c4c60414643fd0d31cdf59e36744b979b57 | |
parent | abce1669d0d0e571687b73db8810a9a3a3a3d8e5 (diff) | |
download | egawk-2f7402ec4b65a2546373403fa701a29d7482cf3f.tar.gz egawk-2f7402ec4b65a2546373403fa701a29d7482cf3f.tar.bz2 egawk-2f7402ec4b65a2546373403fa701a29d7482cf3f.zip |
Some more minor cleanups.
-rw-r--r-- | ChangeLog | 32 | ||||
-rw-r--r-- | awkgram.c | 5 | ||||
-rw-r--r-- | awkgram.y | 5 |
3 files changed, 31 insertions, 11 deletions
@@ -1,9 +1,19 @@ +2014-10-05 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (mk_program): Add a comment that we don't need to + clear the comment* variables. + 2014-10-04 Arnold D. Robbins <arnold@skeeve.com> * profile.c (pp_string_fp): Fix breaklines case to actually output the current letter. This broke at gawk 4.0.0. Sigh. Thanks to Bert Bos (bert@w3.org) for the report. +2014-10-03 Stephen Davies <sdavies@sdc.com.au> + + * awkgram.y (program_comment): Renamed from comment0. + (function_comment): Renamed from commentf. + 2014-10-02 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y, profile.c: Minor white space cleanups. @@ -106,13 +116,13 @@ - DO print the header comments - Do NOT print the program's original comments - * awkgram.y (comment0, commentf): New varibles that are pointers to program - and function comments. - (get_comment): New function that retrieves consecutive comment lines and empty - lines as a unit). - (split_comment): New function: iff first block in the program is a function and - it is predeeded by comments, take the last non-blank line as function comment - and any preceeding lines as program comment.) + * awkgram.y (comment0, commentf): New varibles that are pointers to + program and function comments. + (get_comment): New function that retrieves consecutive comment lines + and empty lines as a unit). + (split_comment): New function: iff first block in the program is a + function and it is predeeded by comments, take the last non-blank + line as function comment and any preceeding lines as program comment.) Following token rules were changed to handle comments: @@ -121,12 +131,12 @@ Following functions were changed to handle comments: - * awkgram.y (mk_program, mk_function, allow_newline and yylex): Update to - handle comments. (Also fixed typo in case '\\'.) + * awkgram.y (mk_program, mk_function, allow_newline and yylex): Update + to handle comments. (Also fixed typo in case '\\'.) * profile.c (print_comment): New function to format comment printing. - (indent, pprint, dump_prog, pp_func): Changed to handle comments and the - revised indentation rules. + (indent, pprint, dump_prog, pp_func): Changed to handle comments and + the revised indentation rules. 2014-09-07 Arnold D. Robbins <arnold@skeeve.com> @@ -4625,6 +4625,11 @@ mk_program() cp = end_block; else cp = list_merge(begin_block, end_block); + /* + * We don't need to clear the comment variables + * since they're not used anymore after this + * function is called. + */ if (comment != NULL) (void) list_append(cp, comment); (void) list_append(cp, ip_atexit); @@ -2287,6 +2287,11 @@ mk_program() cp = end_block; else cp = list_merge(begin_block, end_block); + /* + * We don't need to clear the comment variables + * since they're not used anymore after this + * function is called. + */ if (comment != NULL) (void) list_append(cp, comment); (void) list_append(cp, ip_atexit); |