diff --git a/reactos/subsys/system/cmd/En.rc b/reactos/subsys/system/cmd/En.rc index d94b67b3d74..163eae5fbbf 100644 --- a/reactos/subsys/system/cmd/En.rc +++ b/reactos/subsys/system/cmd/En.rc @@ -350,12 +350,28 @@ STRING_PROMPT_HELP2, " $+ Displays the current depth of the directory stack" STRING_PROMPT_HELP3, "\nType PROMPT without parameters to reset the prompt to the default setting." +STRING_REM_HELP, "Starts a comment line in a batch file.\n\nREM [Comment]" STRING_RMDIR_HELP, "Removes a directory.\n\n \ RMDIR [drive:]path\nRD [drive:]path" -STRING_REM_HELP, "Starts a comment line in a batch file.\n\nREM [Comment]" +STRING_SHIFT_HELP, "Changes the position of replaceable parameters in a batch file.\n\n \ +SHIFT [DOWN]" +STRING_SCREEN_HELP, "move cursor and optionally print text\n\n \ +SCREEN row col [text]\n\n \ + row row to wich move the cursor\n \ + col column to wich move the cursor" + +STRING_SET_HELP, "Displays, sets, or removes environment variables.\n\n \ +SET [variable[=][string]]\n\n \ + variable Specifies the environment-variable name.\n \ + string Specifies a series of characters to assign to the variable.\n\n \ +Type SET without parameters to display the current environment variables.\n" + +STRING_TITLE_HELP, "Sets the window title for the command prompt window.\n\n \ +TITLE [string]\n\n \ +string Specifies the title for the command prompt window." diff --git a/reactos/subsys/system/cmd/resource.h b/reactos/subsys/system/cmd/resource.h index 90e12f2aabe..7244a2c3bbb 100644 --- a/reactos/subsys/system/cmd/resource.h +++ b/reactos/subsys/system/cmd/resource.h @@ -156,9 +156,17 @@ #define STRING_PROMPT_HELP2 668 #define STRING_PROMPT_HELP3 669 -#define STRING_RMDIR_HELP 670 +#define STRING_REM_HELP 670 -#define STRING_REM_HELP 671 +#define STRING_RMDIR_HELP 671 + +#define STRING_SCREEN_HELP 672 + +#define STRING_SHIFT_HELP 673 + +#define STRING_SET_HELP 674 + +#define STRING_TITLE_HELP 675 diff --git a/reactos/subsys/system/cmd/screen.c b/reactos/subsys/system/cmd/screen.c index 102b3440b42..c6ad30d0845 100644 --- a/reactos/subsys/system/cmd/screen.c +++ b/reactos/subsys/system/cmd/screen.c @@ -6,10 +6,13 @@ * 30 Aug 1999 * started - Paolo Pantaleo * + * 30-Apr-2005 (Magnus Olsen) ) + * Remove all hardcode string to En.rc * */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_SCREEN @@ -18,16 +21,13 @@ INT CommandScreen (LPTSTR cmd, LPTSTR param) { SHORT x,y; BOOL bSkipText = FALSE; + WCHAR szMsg[RC_STRING_MAX_SIZE]; if (_tcsncmp (param, _T("/?"), 2) == 0) { - ConOutPuts(_T( - "move cursor and optionally print text\n" - "\n" - "SCREEN row col [text]\n" - "\n" - " row row to wich move the cursor\n" - " col column to wich move the cursor")); + LoadString( GetModuleHandle(NULL), STRING_SCREEN_HELP, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts((LPTSTR)szMsg); + return 0; } diff --git a/reactos/subsys/system/cmd/set.c b/reactos/subsys/system/cmd/set.c index 6a77b383f2b..7714d5eed9b 100644 --- a/reactos/subsys/system/cmd/set.c +++ b/reactos/subsys/system/cmd/set.c @@ -29,9 +29,13 @@ * * 25-Feb-1999 (Eric Kohl ) * Fixed little bug. + * + * 30-Apr-2005 (Magnus Olsen) ) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_SET @@ -43,14 +47,13 @@ INT cmd_set (LPTSTR cmd, LPTSTR param) { LPTSTR p; + WCHAR szMsg[RC_STRING_MAX_SIZE]; if (!_tcsncmp (param, _T("/?"), 2)) { - ConOutPuts (_T("Displays, sets, or removes environment variables.\n\n" - "SET [variable[=][string]]\n\n" - " variable Specifies the environment-variable name.\n" - " string Specifies a series of characters to assign to the variable.\n\n" - "Type SET without parameters to display the current environment variables.\n")); + LoadString( GetModuleHandle(NULL), STRING_SET_HELP, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts ((LPTSTR)szMsg); + return 0; } diff --git a/reactos/subsys/system/cmd/shift.c b/reactos/subsys/system/cmd/shift.c index 7eae2e476bb..39f3968fa25 100644 --- a/reactos/subsys/system/cmd/shift.c +++ b/reactos/subsys/system/cmd/shift.c @@ -18,9 +18,13 @@ * * 20-Jan-1999 (Eric Kohl ) * Unicode and redirection safe! + * + * 30-Apr-2005 (Magnus Olsen) ) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" /* @@ -30,18 +34,22 @@ * * FREEDOS extension : optional parameter DOWN to allow shifting * parameters backwards. + * */ INT cmd_shift (LPTSTR cmd, LPTSTR param) { + WCHAR szMsg[RC_STRING_MAX_SIZE]; + #ifdef _DEBUG DebugPrintf (_T("cmd_shift: (\'%s\', \'%s\')\n"), cmd, param); #endif if (!_tcsncmp (param, _T("/?"), 2)) { - ConOutPuts (_T("Changes the position of replaceable parameters in a batch file.\n\n" - "SHIFT [DOWN]")); + LoadString( GetModuleHandle(NULL), STRING_SHIFT_HELP, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts((LPTSTR)szMsg); + return 0; } diff --git a/reactos/subsys/system/cmd/title.c b/reactos/subsys/system/cmd/title.c index 853919efd72..c8b038a50dc 100644 --- a/reactos/subsys/system/cmd/title.c +++ b/reactos/subsys/system/cmd/title.c @@ -4,15 +4,21 @@ * * History: * 1999-02-11 Emanuele Aliberti + * + * 30-Apr-2005 (Magnus Olsen) ) + * Remove all hardcode string to En.rc */ #include "precomp.h" +#include "resource.h" #ifdef INCLUDE_CMD_TITLE INT cmd_title (LPTSTR cmd, LPTSTR param) { + WCHAR szMsg[RC_STRING_MAX_SIZE]; + /* Do nothing if no args */ if (*param == _T('\0')) return 0; @@ -20,11 +26,8 @@ INT cmd_title (LPTSTR cmd, LPTSTR param) /* Asking help? */ if (!_tcsncmp(param, _T("/?"), 2)) { - ConOutPuts (_T("Sets the window title for the command prompt window.\n" - "\n" - "TITLE [string]\n" - "\n" - " string Specifies the title for the command prompt window.")); + LoadString( GetModuleHandle(NULL), STRING_TITLE_HELP, (LPTSTR) szMsg,sizeof(szMsg)); + ConOutPuts((LPTSTR)szMsg); return 0; }