1 /* clear.c - clear the screen 2 * 3 * Copyright 2012 Rob Landley <rob@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 clear_main(void)16void clear_main(void) 17 { 18 printf("\033[2J\033[H"); 19 } 20