comparison toys/clear.c @ 523:c5c11dff9308

Add clear.
author Rob Landley <rob@landley.net>
date Sun, 04 Mar 2012 16:43:12 -0600
parents
children
comparison
equal deleted inserted replaced
522:33ce0407ea47 523:c5c11dff9308
1 /* vi: set sw=4 ts=4:
2 *
3 * clear.c - clear the screen
4 *
5 * Copyright 2012 Rob Landley <rob@landley.net>
6 *
7 * Not in SUSv4.
8
9 USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN))
10
11 config CLEAR
12 bool "clear"
13 default y
14 help
15 Clear the screen.
16 */
17
18 #include "toys.h"
19
20 void clear_main(void)
21 {
22 write(1, "\e[2J\e[H", 7);
23 }