summaryrefslogtreecommitdiff
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-10-10 19:27:10 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-10-10 19:27:10 +0300
commit44e10d37e08fa5f846e9d459dca9e1498be65156 (patch)
tree1388e9abcb16dc297887db2a6acb0f2b19610d2e /profile.c
parent8e09dc452d7d365e13db28d1c6ca2b392f6df6ce (diff)
downloadgawk-44e10d37e08fa5f846e9d459dca9e1498be65156.tar.gz
Improve handling of braced statements and comments in if/else.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 52379cf8..f80e4baa 100644
--- a/profile.c
+++ b/profile.c
@@ -942,6 +942,8 @@ cleanup:
fprintf(prof_fp, " # %ld", ip1->exec_count);
ip1 = end_line(ip1);
indent_in();
+ if (pc->comment != NULL)
+ print_comment(pc->comment, indent_level);
pprint(ip1->nexti, pc->branch_else, NO_PPRINT_FLAGS);
indent_out();
pc = pc->branch_else;
@@ -985,6 +987,8 @@ cleanup:
end_line(pc);
skip_comment = true;
indent_in();
+ if (pc->comment != NULL)
+ print_comment(pc->comment, indent_level);
pprint(pc->nexti, pc->branch_end, NO_PPRINT_FLAGS);
indent_out();
indent(SPACEOVER);