]> thyrsus.com Git - cupl.git/commitdiff
Regularize the output code.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 7 Nov 1994 03:32:45 +0000 (03:32 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 7 Nov 1994 03:32:45 +0000 (03:32 +0000)
monitor.c

index 77274678d35026603863c635fe2089b0199c71b8..a419008479d10998742a31c9f1c48c12cb858492 100644 (file)
--- 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;
 }