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)
14 * Changed to Win32 console app.
16 * 08-Dec-1998 (Eric Kohl)
17 * Added help text ("/?").
19 * 14-Jan-1998 (Eric Kohl)
22 * 20-Jan-1998 (Eric Kohl)
25 * 02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
26 * Remove all hardcode string to En.rc
31 #ifdef INCLUDE_CMD_CLS
33 INT
cmd_cls (LPTSTR param
)
35 HANDLE hOutput
= GetStdHandle(STD_OUTPUT_HANDLE
);
36 CONSOLE_SCREEN_BUFFER_INFO csbi
;
40 if (!_tcsncmp (param
, _T("/?"), 2))
42 ConOutResPaging(TRUE
,STRING_CLS_HELP
);
46 if (GetConsoleScreenBufferInfo(hOutput
, &csbi
))
50 FillConsoleOutputAttribute(hOutput
, csbi
.wAttributes
,
51 csbi
.dwSize
.X
* csbi
.dwSize
.Y
,
53 FillConsoleOutputCharacter(hOutput
, _T(' '),
54 csbi
.dwSize
.X
* csbi
.dwSize
.Y
,
56 SetConsoleCursorPosition(hOutput
, coPos
);