projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bc: unbreak FEATURE_CLEAN_UP build
[oweals/busybox.git]
/
procps
/
watch.c
diff --git
a/procps/watch.c
b/procps/watch.c
index 6fc9f7db7794b1e0b9aec6d6b90ffc02b6ce67d1..420e6d3d145cb6b9e8b31f989b59d1ab24b3a50c 100644
(file)
--- a/
procps/watch.c
+++ b/
procps/watch.c
@@
-7,10
+7,6
@@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
-/* BB_AUDIT SUSv3 N/A */
-/* BB_AUDIT GNU defects -- only option -n is supported. */
-
//config:config WATCH
//config: bool "watch (4.1 kb)"
//config: default y
//config:config WATCH
//config: bool "watch (4.1 kb)"
//config: default y
@@
-35,8
+31,13
@@
//usage: "Mon Dec 17 10:31:42 GMT 2000\n"
//usage: "Mon Dec 17 10:31:44 GMT 2000"
//usage: "Mon Dec 17 10:31:42 GMT 2000\n"
//usage: "Mon Dec 17 10:31:44 GMT 2000"
+/* BB_AUDIT SUSv3 N/A */
+/* BB_AUDIT GNU defects -- only option -n is supported. */
+
#include "libbb.h"
#include "libbb.h"
+#define ESC "\033"
+
// procps 2.0.18:
// watch [-d] [-n seconds]
// [--differences[=cumulative]] [--interval=seconds] command
// procps 2.0.18:
// watch [-d] [-n seconds]
// [--differences[=cumulative]] [--interval=seconds] command
@@
-77,7
+78,7
@@
int watch_main(int argc UNUSED_PARAM, char **argv)
header = NULL;
while (1) {
/* home; clear to the end of screen */
header = NULL;
while (1) {
/* home; clear to the end of screen */
- printf(
"\033[H""\033
[J");
+ printf(
ESC"[H" ESC"
[J");
if (!(opt & 0x2)) { // no -t
const unsigned time_len = sizeof("1234-67-90 23:56:89");
if (!(opt & 0x2)) { // no -t
const unsigned time_len = sizeof("1234-67-90 23:56:89");