1 /* reset.c - reset the terminal. 2 * 3 * Copyright 2015 Rob Landley <rob@landley.net> 4 * 5 * No standard. 6 7 USE_RESET(NEWTOY(reset, 0, TOYFLAG_USR|TOYFLAG_BIN)) 8 9 config RESET 10 bool "reset" 11 default y 12 help 13 usage: reset 14 15 reset the terminal 16 */ 17 #include "toys.h" 18 reset_main(void)19void reset_main(void) 20 { 21 // man 4 console codes: reset terminal is ESC (no left bracket) c 22 xwrite(xgettty(), "\033c", 2); 23 } 24