Mercurial > hg > toybox
annotate toys/clear.c @ 643:7bdebd2af1d6
Add signal handler to clean up tempfile.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 30 Jul 2012 01:01:33 -0500 |
parents | c5c11dff9308 |
children |
rev | line source |
---|---|
523 | 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 } |