[hackers] [ubase] clear, watch: use 0x1b instead of non-standard \e || Hiltjo Posthuma
commit b0576fc22bc5e63898a893e38490170cde220509
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Fri Feb 14 14:38:56 2014 +0100
clear, watch: use 0x1b instead of non-standard \e
Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
diff --git a/clear.c b/clear.c
index f6ca515..51a2143 100644
--- a/clear.c
+++ b/clear.c
_AT_@ -5,6 +5,6 @@
int
main(void)
{
- printf("\e[2J\e[H");
+ printf("\x1b[2J\x1b[H");
return EXIT_SUCCESS;
}
diff --git a/watch.c b/watch.c
index 59f6f5a..e83af95 100644
--- a/watch.c
+++ b/watch.c
_AT_@ -38,7 +38,7 @@ main(int argc, char *argv[])
}
for (;;) {
- printf("\e[2J\e[H");
+ printf("\x1b[2J\x1b[H"); /* clear */
fflush(NULL);
system(cmd);
sleep(interval);
Received on Fri Feb 14 2014 - 15:10:57 CET
This archive was generated by hypermail 2.3.0
: Fri Feb 14 2014 - 15:12:20 CET