aboutsummaryrefslogtreecommitdiff
path: root/toys/other/clear.c
blob: 842579f8b0eb2f41d36962fea197c3053bfa82db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* clear.c - clear the screen
 *
 * Copyright 2012 Rob Landley <rob@landley.net>

USE_CLEAR(NEWTOY(clear, NULL, TOYFLAG_USR|TOYFLAG_BIN))

config CLEAR
  bool "clear"
  default y
  help
    Clear the screen.
*/

#include "toys.h"

void clear_main(void)
{
  printf("\033[2J\033[H");
}