From fbeb0ec2cdad1a5ffa4dace39cbb80dac81eb40c Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 12 May 2005 17:30:52 +0000 Subject: [PATCH] Add syntax Color x x = 0 to 9 Now color are working as it should svn path=/trunk/; revision=15239 --- reactos/subsys/system/cmd/color.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/system/cmd/color.c b/reactos/subsys/system/cmd/color.c index 28189ea3bc5..ec65ff8b97e 100644 --- a/reactos/subsys/system/cmd/color.c +++ b/reactos/subsys/system/cmd/color.c @@ -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; }