commit e03fd2f8067bfbd2082472ac0f8b9ea9d3eb7e51 from: Omar Polo date: Mon Jan 09 09:44:42 2023 UTC diffstat: spacing for output commit - c94e7f289328189790c896deaaf1db6e363a9398 commit + e03fd2f8067bfbd2082472ac0f8b9ea9d3eb7e51 blob - 408659818f7f88b673134e0bf49b2f5a5dd90f6c blob + 4c7b713ba8b4b02eb217da507993c390f6489b82 --- bin/diffstat.lp +++ bin/diffstat.lp @@ -33,7 +33,7 @@ per-file counters. function switchfile(newfile) { if (file != "") { - summary = sprintf("%s+%d -%d\t%s\n", + summary = sprintf("%s%4d+ %4d-\t%s\n", summary, add, rem, file) } @@ -140,7 +140,7 @@ printing to stderr other than using the pseudo-device. switchfile("") printf("%s", summary) > "/dev/stderr" - printf("+%d -%d\ttotal\n", totadd, totrem) > "/dev/stderr" + printf("%4d+ %4d-\ttotal\n", totadd, totrem) > "/dev/stderr" } some example usages: