From: Todd C. Miller Date: Fri, 20 Aug 2010 20:54:57 +0000 (-0400) Subject: Convert a remaining puts() and putchar() to use the output function. X-Git-Tag: SUDO_1_7_5~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84500c7ed7653cd7a81037acebf9a041c7ad069d;p=sudo Convert a remaining puts() and putchar() to use the output function. --HG-- branch : 1.7 --- diff --git a/lbuf.c b/lbuf.c index e64f76bdd..bd218da87 100644 --- a/lbuf.c +++ b/lbuf.c @@ -282,14 +282,15 @@ lbuf_print(lbuf) /* For very small widths just give up... */ if (lbuf->cols <= lbuf->indent + contlen + 20) { - puts(lbuf->buf); + lbuf->output(lbuf->buf); + lbuf->output("\n"); goto done; } /* Print each line in the buffer */ for (cp = lbuf->buf; cp != NULL && *cp != '\0'; ) { if (*cp == '\n') { - putchar('\n'); + lbuf->output("\n"); cp++; } else { ep = memchr(cp, '\n', lbuf->len - (cp - lbuf->buf));