mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
Add syntax Color x
x = 0 to 9 Now color are working as it should svn path=/trunk/; revision=15239
This commit is contained in:
@@ -84,9 +84,18 @@ INT CommandColor (LPTSTR first, LPTSTR rest)
|
||||
SetScreenColor (wColor, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if ( _tcslen(&rest[0])==1)
|
||||
{
|
||||
if ( (_tcscmp(&rest[0], _T("0")) >=0 ) && (_tcscmp(&rest[0], _T("9")) <=0 ) )
|
||||
{
|
||||
SetConsoleTextAttribute (hConsole, (WORD)_ttoi(rest));
|
||||
}
|
||||
}
|
||||
|
||||
if (StringToColor(&wColor, &rest) == FALSE)
|
||||
{
|
||||
{
|
||||
ConErrResPuts(STRING_COLOR_ERROR2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user