diff options
Diffstat (limited to 't/rt.c')
-rw-r--r-- | t/rt.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -91,9 +91,12 @@ static void linemon(const char *ptr, size_t len, void *data) { struct linemon_closure *clos = data; - - if (!clos->cont) - fprintf(stdout, "[%s]: ", clos->prefix); + + if (!clos->cont) { + printf("%s:", clos->prefix); + if (!(len == 1 && ptr[0] == '\n')) + putchar(' '); + } fwrite(ptr, len, 1, stdout); clos->cont = ptr[len-1] != '\n'; } @@ -116,7 +119,10 @@ nl(struct runcap *rc, int stream) n = 1; while ((res = runcap_getline(rc, stream, &buf, &size)) > 0) { buf[res-1] = 0; - printf("%*zu: %s\n", width, n, buf); + printf("%*zu:", width, n); + if (buf[0]) + printf(" %s", buf); + putchar('\n'); n++; } if (res) |