Home | History | Annotate | Download | only in other
      1 /* clear.c - clear the screen
      2  *
      3  * Copyright 2012 Rob Landley <rob (at) landley.net>
      4 
      5 USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN))
      6 
      7 config CLEAR
      8   bool "clear"
      9   default y
     10   help
     11     Clear the screen.
     12 */
     13 
     14 #include "toys.h"
     15 
     16 void clear_main(void)
     17 {
     18   xwrite(1, "\e[2J\e[H", 7);
     19 }
     20