From 4988bd347722faf79049fa831b21b7711c6aa6b2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 7 Nov 1994 03:32:45 +0000 Subject: [PATCH] Regularize the output code. --- monitor.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 7727467..a419008 100644 --- a/monitor.c +++ b/monitor.c @@ -126,18 +126,15 @@ void cupl_reset_write() void cupl_eol_write(void) { - if (used != linewidth) - (void) putchar('\n'); + (void) putchar('\n'); + used = 0; } static void needspace(int w) /* emit a LF if there are not more than w spaces left on the line */ { if (used + w >= linewidth) - { - (void) putchar('\n'); - used = 0; - } + cupl_eol_write(); else used += w; } -- 2.43.0