annotate toys/clear.c @ 562:4d802d438983

Match uint64_t with PRIu64 to avoid warnings on 64 bit builds.
author Rob Landley <rob@landley.net>
date Sat, 14 Apr 2012 21:27:00 -0500
parents c5c11dff9308
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
523
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 /* vi: set sw=4 ts=4:
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
2 *
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 * clear.c - clear the screen
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 *
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 * Copyright 2012 Rob Landley <rob@landley.net>
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 *
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 * Not in SUSv4.
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN))
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
10
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 config CLEAR
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
12 bool "clear"
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 default y
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 help
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 Clear the screen.
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 */
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
17
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 #include "toys.h"
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
19
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 void clear_main(void)
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 {
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 write(1, "\e[2J\e[H", 7);
c5c11dff9308 Add clear.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 }