summaryrefslogtreecommitdiff
path: root/reference/C/EXAMPLES/clrscr.c
blob: a002dd3672934d8e2b7b77343d558d94bb4742d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*************************************************************************
 *
 * Purpose: Clear the screen with VT100 escape codes. This can be done
 *          with conio.h on PCs - non standard code. Or curses.h, bit of 
 * 	    a fag...
 * Author:  M.J. Leslie
 * Date:    22-Jun-94
 *
 ************************************************************************/

void clrscr(void);

main()
{
    clrscr();
}

void clrscr(void)
{
    printf("\033[2J");		        /* Clear the entire screen.		*/
    printf("\033[0;0f");		/* Move cursor to the top left hand corner */
}