view toys/clear.c @ 536:2c1cb0d35031

Add lib/portability.h description with explanation of SWAP() macros.
author Rob Landley <rob@landley.net>
date Fri, 09 Mar 2012 08:33:57 -0600
parents c5c11dff9308
children
line wrap: on
line source

/* vi: set sw=4 ts=4:
 *
 * clear.c - clear the screen
 *
 * Copyright 2012 Rob Landley <rob@landley.net>
 *
 * Not in SUSv4.

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);
}