From d344ac54097cfa6e7d0c2221f6012173f367f729 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 12 May 2005 18:20:41 +0000 Subject: [PATCH] Add hex value to Color syntax so it working fine Color x x = a - f svn path=/trunk/; revision=15242 --- reactos/subsys/system/cmd/color.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/reactos/subsys/system/cmd/color.c b/reactos/subsys/system/cmd/color.c index ec65ff8b97e..c6761ccc102 100644 --- a/reactos/subsys/system/cmd/color.c +++ b/reactos/subsys/system/cmd/color.c @@ -91,7 +91,20 @@ INT CommandColor (LPTSTR first, LPTSTR rest) if ( (_tcscmp(&rest[0], _T("0")) >=0 ) && (_tcscmp(&rest[0], _T("9")) <=0 ) ) { SetConsoleTextAttribute (hConsole, (WORD)_ttoi(rest)); + return 0; } + else if ( (_tcscmp(&rest[0], _T("a")) >=0 ) && (_tcscmp(&rest[0], _T("f")) <=0 ) ) + { + SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10) - _T('a') ); + return 0; + } + else if ( (_tcscmp(&rest[0], _T("A")) >=0 ) && (_tcscmp(&rest[0], _T("F")) <=0 ) ) + { + SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10) - _T('A') ); + return 0; + } + ConErrResPuts(STRING_COLOR_ERROR2); + return 1; } if (StringToColor(&wColor, &rest) == FALSE)