summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-tools/clear.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/console-tools/clear.c b/console-tools/clear.c
index dcb9bfb02..da5e381b8 100644
--- a/console-tools/clear.c
+++ b/console-tools/clear.c
@@ -12,5 +12,14 @@ int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
12int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 12int clear_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
13{ 13{
14 /* home; clear to the end of screen */ 14 /* home; clear to the end of screen */
15#if !ENABLE_PLATFORM_MINGW32
15 return full_write1_str("\033[H""\033[J") != 6; 16 return full_write1_str("\033[H""\033[J") != 6;
17#else
18 int ret;
19
20 ret = printf("\033[H\033[J");
21 fflush(stdout);
22
23 return ret != 6;
24#endif
16} 25}