diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-25 09:25:41 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-25 09:25:41 +0200 |
commit | c0e9f73728d1c38ebce5fdd45df508fff26e26c4 (patch) | |
tree | 06539ef93852af2efa547675985c7a4e35e44957 /profile.c | |
parent | 44611db36ba329fab248179e0350d44fcff5e3c2 (diff) | |
download | egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.gz egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.tar.bz2 egawk-c0e9f73728d1c38ebce5fdd45df508fff26e26c4.zip |
Small profiling improvements.
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -807,7 +807,11 @@ cleanup: if (is_binary(t1->type)) pp_parenthesize(t1); if (pc->source_line > 0) { /* don't print implicit 'return' at end of function */ - fprintf(prof_fp, "%s %s", op2str(pc->opcode), t1->pp_str); + // avoid final trailing space to keep whiny users happy + if (t1->pp_str[0] != '\0') + fprintf(prof_fp, "%s %s", op2str(pc->opcode), t1->pp_str); + else + fprintf(prof_fp, "%s", op2str(pc->opcode)); pc = end_line(pc); } pp_free(t1); |