toaruos/apps/clear.c

21 lines
570 B
C
Raw Permalink Normal View History

/**
* @brief clear - Clear the terminal
2018-08-15 04:07:33 +03:00
*
* Sends an escape code to clear the screen. Ideally, this should
* come from a database of terminal escape codes (eg. terminfo),
* but we don't have one of those yet, so just send a code that
* makes sense for a lot of terminals.
*
* @copyright
* This file is part of ToaruOS and is released under the terms
* of the NCSA / University of Illinois License - see LICENSE.md
* Copyright (C) 2013 K. Lange
*/
#include <stdio.h>
int main(int argc, char ** argv) {
printf("\033[H\033[2J");
fflush(stdout);
return 0;
}