ul: use string printing function

Use of for loop and printing a string character by character is slower
than to print whole string with single function.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2013-07-07 20:54:47 +01:00 committed by Karel Zak
parent aa971f7d58
commit 67519cdd8f
1 changed files with 2 additions and 4 deletions

View File

@ -447,8 +447,7 @@ static void overstrike(void)
putwchar('\r');
for (*cp = ' '; *cp == ' '; cp--)
*cp = 0;
for (cp = lbuf; *cp; cp++)
putwchar(*cp);
fputws(lbuf, stdout);
if (hadbold) {
putwchar('\r');
for (cp = lbuf; *cp; cp++)
@ -481,8 +480,7 @@ static void iattr(void)
}
for (*cp = ' '; *cp == ' '; cp--)
*cp = 0;
for (cp = lbuf; *cp; cp++)
putwchar(*cp);
fputws(lbuf, stdout);
putwchar('\n');
}