From 3c215ef28703a8fe418da59420df5d846d2759c8 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Tue, 5 Jul 2005 12:06:27 +0000 Subject: [PATCH] Brandon Turner turnerb7@msu.edu. Bug fix color now it working as ms cmd color. Please everyone that have done translate of cmd, update the language's file. some text have been modify and add in cmd en.rc svn path=/trunk/; revision=16424 --- reactos/subsys/system/cmd/En.rc | 4 ++-- reactos/subsys/system/cmd/color.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/reactos/subsys/system/cmd/En.rc b/reactos/subsys/system/cmd/En.rc index c2ecb83cea4..a9d626edd33 100644 --- a/reactos/subsys/system/cmd/En.rc +++ b/reactos/subsys/system/cmd/En.rc @@ -89,9 +89,9 @@ CMD [/[C|K] command][/P][/Q][/T:bf]\n\n\ /T:bf Sets the background/foreground color (see COLOR command)." STRING_COLOR_HELP1, "Sets the default foreground and background colors.\n\n\ -COLOR [attr [/F]] \n\n\ +COLOR [attr [/-F]] \n\n\ attr Specifies color attribute of console output\n\ - /F fill the console with color attribute\n\n\ + /-F Does not fill the console blank space with color attribute\n\n\ There are three ways to specify the colors:\n\ 1) [bright] name on [bright] name (only the first three letters are required)\n\ 2) decimal on decimal\n\ diff --git a/reactos/subsys/system/cmd/color.c b/reactos/subsys/system/cmd/color.c index c6761ccc102..9541c7cb64f 100644 --- a/reactos/subsys/system/cmd/color.c +++ b/reactos/subsys/system/cmd/color.c @@ -32,7 +32,7 @@ static VOID ColorHelp (VOID) } -VOID SetScreenColor (WORD wColor, BOOL bFill) +VOID SetScreenColor (WORD wColor, BOOL bNoFill) { DWORD dwWritten; CONSOLE_SCREEN_BUFFER_INFO csbi; @@ -45,7 +45,7 @@ VOID SetScreenColor (WORD wColor, BOOL bFill) } else { - if (bFill == TRUE) + if (bNoFill != TRUE) { GetConsoleScreenBufferInfo (hConsole, &csbi); @@ -81,7 +81,7 @@ INT CommandColor (LPTSTR first, LPTSTR rest) { /* set default color */ wColor = wDefColor; - SetScreenColor (wColor, TRUE); + SetScreenColor (wColor, FALSE); return 0; } @@ -125,7 +125,7 @@ INT CommandColor (LPTSTR first, LPTSTR rest) /* set color */ SetScreenColor(wColor, - (_tcsstr (rest,_T("/F")) || _tcsstr (rest,_T("/f")))); + (_tcsstr (rest,_T("/-F")) || _tcsstr (rest,_T("/-f")))); return 0; }