An optimization from Vladimir
authorEric Andersen <andersen@codepoet.org>
Fri, 6 Apr 2001 16:02:22 +0000 (16:02 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 6 Apr 2001 16:02:22 +0000 (16:02 -0000)
more.c
util-linux/more.c

diff --git a/more.c b/more.c
index 1d918cf5c11b54d41f9c2ab3c7cedab0f2fff699..732396f03341a918b974136b3911f1cb97b85c2b 100644 (file)
--- a/more.c
+++ b/more.c
@@ -154,12 +154,10 @@ extern int more_main(int argc, char **argv)
 
 #ifdef BB_FEATURE_USE_TERMIOS
                                /* Erase the "More" message */
+                               putc('\r', stdout);
                                while (--len >= 0)
-                                       putc('\b', stdout);
-                               while (++len <= terminal_width)
                                        putc(' ', stdout);
-                               while (--len >= 0)
-                                       putc('\b', stdout);
+                               putc('\r', stdout);
                                fflush(stdout);
 #endif
                                len=0;
index 1d918cf5c11b54d41f9c2ab3c7cedab0f2fff699..732396f03341a918b974136b3911f1cb97b85c2b 100644 (file)
@@ -154,12 +154,10 @@ extern int more_main(int argc, char **argv)
 
 #ifdef BB_FEATURE_USE_TERMIOS
                                /* Erase the "More" message */
+                               putc('\r', stdout);
                                while (--len >= 0)
-                                       putc('\b', stdout);
-                               while (++len <= terminal_width)
                                        putc(' ', stdout);
-                               while (--len >= 0)
-                                       putc('\b', stdout);
+                               putc('\r', stdout);
                                fflush(stdout);
 #endif
                                len=0;