Mercurial > hg > toybox
view toys/other/clear.c @ 665:0ed044e9e5ca
gethostname: Tighten up error messages slightly, switch to default "y".
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 09 Sep 2012 18:44:12 -0500 |
parents | 6df4ccc0acbe |
children | 786841fdb1e0 |
line wrap: on
line source
/* vi: set sw=4 ts=4: * * 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) { write(1, "\e[2J\e[H", 7); }