2 * CLS.C - clear screen internal command.
7 * 07/27/1998 (John P. Price)
10 * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>)
11 * added config.h include
13 * 04-Dec-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
14 * Changed to Win32 console app.
16 * 08-Dec-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
17 * Added help text ("/?").
19 * 14-Jan-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
22 * 20-Jan-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
28 #ifdef INCLUDE_CMD_CLS
37 INT cmd_cls (LPTSTR cmd, LPTSTR param)
40 CONSOLE_SCREEN_BUFFER_INFO csbi;
43 if (!_tcsncmp (param, _T("/?"), 2))
45 ConOutPuts (_T("Clears the screen.\n\nCLS"));
49 GetConsoleScreenBufferInfo (hConsole, &csbi);
53 FillConsoleOutputAttribute (hConsole, wColor,
54 (csbi.dwSize.X)*(csbi.dwSize.Y),
56 FillConsoleOutputCharacter (hConsole, _T(' '),
57 (csbi.dwSize.X)*(csbi.dwSize.Y),
59 SetConsoleCursorPosition (hConsole, coPos);