[PATCH 34/34] more: use variable lenght printf field width to print blanks

Sami Kerola
2013-07-07T19:56:44Z

This makes program to run a little faster.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
text-utils/more.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/text-utils/more.c b/text-utils/more.c
index 62de6ad..1137ea7 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -1059,8 +1059,7 @@ void erasep(register int col)
if (!dumb && eraseln)
my_putstring(eraseln);
else
- for (col = promptlen - col; col > 0; col--)
- putchar(' ');
+ printf("%*s", promptlen - col, "");
}
promptlen = 0;
}
--
1.8.3.2