projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ad283
)
Sane-ify the screen clearing stuff.
author
Eric Andersen
<andersen@codepoet.org>
Tue, 17 Sep 2002 20:53:41 +0000
(20:53 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 17 Sep 2002 20:53:41 +0000
(20:53 -0000)
-Erik
coreutils/watch.c
patch
|
blob
|
history
diff --git
a/coreutils/watch.c
b/coreutils/watch.c
index 78ede4c1ce30f41ce9a91433250ddfaf424ed7a7..a4b1f64b60d563fc14a706d5dd5acaed3170a912 100644
(file)
--- a/
coreutils/watch.c
+++ b/
coreutils/watch.c
@@
-32,8
+32,6
@@
extern int watch_main(int argc, char **argv)
{
const char date_argv[2][10] = { "date", "" };
- const char clrscr[] =
- "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
const int header_len = 40;
char header[header_len + 1];
int period = 2;
@@
-79,7
+77,7
@@
extern int watch_main(int argc, char **argv)
old_stdout = dup(1);
while (1) {
- printf("
%s%s", clrscr
, header);
+ printf("
\033[H\033[J%s"
, header);
date_main(1, (char **) date_argv);
printf("\n");