aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-05-29 22:15:20 +0300
committerArnold D. Robbins <arnold@skeeve.com>2013-05-29 22:15:20 +0300
commitacd80efad346d9d7dbed9aa3380d8f77eda0ed56 (patch)
tree394e62245eaf2387229622484689942c6af73a59
parentc974d36e7386c93f809be67cba108df71d267f45 (diff)
downloadegawk-acd80efad346d9d7dbed9aa3380d8f77eda0ed56.tar.gz
egawk-acd80efad346d9d7dbed9aa3380d8f77eda0ed56.tar.bz2
egawk-acd80efad346d9d7dbed9aa3380d8f77eda0ed56.zip
Additional fix in profile.c.
-rw-r--r--ChangeLog3
-rw-r--r--profile.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c7aa4514..223c798f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,8 @@
(is_binary): Change return type to bool.
(is_scalar): New function.
(pp_concat): New function to handle concatenation operator better.
- (pprint): Call it at case Op_concat.
+ (pprint): Call it at case Op_concat. Fix Op_K_delete if multiple
+ indexes to separate with "][".
General: Add leading comments as needed.
2013-05-28 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/profile.c b/profile.c
index 095de099..d3a93dbd 100644
--- a/profile.c
+++ b/profile.c
@@ -443,7 +443,7 @@ cleanup:
array = t1->pp_str;
if (pc->expr_count > 0) {
char *sub;
- sub = pp_list(pc->expr_count, NULL, ", ");
+ sub = pp_list(pc->expr_count, NULL, pc->expr_count > 1 ? "][" : ", ");
fprintf(prof_fp, "%s %s[%s]", op2str(Op_K_delete), array, sub);
efree(sub);
} else