Mercurial > hg > toybox
comparison toys/other/clear.c @ 694:786841fdb1e0
Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 13 Nov 2012 17:14:08 -0600 |
parents | 6df4ccc0acbe |
children | e85e5f3b87c2 |
comparison
equal
deleted
inserted
replaced
693:4a5a250e0633 | 694:786841fdb1e0 |
---|---|
1 /* vi: set sw=4 ts=4: | 1 /* clear.c - clear the screen |
2 * | |
3 * clear.c - clear the screen | |
4 * | 2 * |
5 * Copyright 2012 Rob Landley <rob@landley.net> | 3 * Copyright 2012 Rob Landley <rob@landley.net> |
6 | 4 |
7 USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN)) | 5 USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN)) |
8 | 6 |
9 config CLEAR | 7 config CLEAR |
10 bool "clear" | 8 bool "clear" |
11 default y | 9 default y |
12 help | 10 help |
13 Clear the screen. | 11 Clear the screen. |
14 */ | 12 */ |
15 | 13 |
16 #include "toys.h" | 14 #include "toys.h" |
17 | 15 |
18 void clear_main(void) | 16 void clear_main(void) |
19 { | 17 { |
20 write(1, "\e[2J\e[H", 7); | 18 write(1, "\e[2J\e[H", 7); |
21 } | 19 } |