aboutsummaryrefslogtreecommitdiff
path: root/t/rt.c
diff options
context:
space:
mode:
Diffstat (limited to 't/rt.c')
-rw-r--r--t/rt.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/rt.c b/t/rt.c
index 12a3232..e5c1bbb 100644
--- a/t/rt.c
+++ b/t/rt.c
@@ -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)

Return to:

Send suggestions and report system problems to the System administrator.