Remove all hardcode string to En.rc Modified: trunk/reactos/subsys/system/cmd/En.rc Modified: trunk/reactos/subsys/system/cmd/resource.h Modified: trunk/reactos/subsys/system/cmd/screen.c Modified: trunk/reactos/subsys/system/cmd/set.c Modified: trunk/reactos/subsys/system/cmd/shift.c Modified: trunk/reactos/subsys/system/cmd/title.c _____
Modified: trunk/reactos/subsys/system/cmd/En.rc --- trunk/reactos/subsys/system/cmd/En.rc 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/En.rc 2005-04-30 12:36:36 UTC (rev 14869) @@ -350,13 +350,29 @@
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." +
_____
Modified: trunk/reactos/subsys/system/cmd/resource.h --- trunk/reactos/subsys/system/cmd/resource.h 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/resource.h 2005-04-30 12:36:36 UTC (rev 14869) @@ -156,12 +156,20 @@
#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 + + +
_____
Modified: trunk/reactos/subsys/system/cmd/screen.c --- trunk/reactos/subsys/system/cmd/screen.c 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/screen.c 2005-04-30 12:36:36 UTC (rev 14869) @@ -6,10 +6,13 @@
* 30 Aug 1999 * started - Paolo Pantaleo paolopan@freemail.it * + * 30-Apr-2005 (Magnus Olsen) magnus@greatlord.com) + * Remove all hardcode string to En.rc * */
#include "precomp.h" +#include "resource.h"
#ifdef INCLUDE_CMD_SCREEN
@@ -18,16 +21,13 @@ { 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; }
_____
Modified: trunk/reactos/subsys/system/cmd/set.c --- trunk/reactos/subsys/system/cmd/set.c 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/set.c 2005-04-30 12:36:36 UTC (rev 14869) @@ -29,9 +29,13 @@
* * 25-Feb-1999 (Eric Kohl ekohl@abo.rhein-zeitung.de) * Fixed little bug. + * + * 30-Apr-2005 (Magnus Olsen) magnus@greatlord.com) + * 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; }
_____
Modified: trunk/reactos/subsys/system/cmd/shift.c --- trunk/reactos/subsys/system/cmd/shift.c 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/shift.c 2005-04-30 12:36:36 UTC (rev 14869) @@ -18,9 +18,13 @@
* * 20-Jan-1999 (Eric Kohl ekohl@abo.rhein-zeitung.de) * Unicode and redirection safe! + * + * 30-Apr-2005 (Magnus Olsen) magnus@greatlord.com) + * 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; }
_____
Modified: trunk/reactos/subsys/system/cmd/title.c --- trunk/reactos/subsys/system/cmd/title.c 2005-04-30 11:53:15 UTC (rev 14868) +++ trunk/reactos/subsys/system/cmd/title.c 2005-04-30 12:36:36 UTC (rev 14869) @@ -4,15 +4,21 @@
* * History: * 1999-02-11 Emanuele Aliberti + * + * 30-Apr-2005 (Magnus Olsen) magnus@greatlord.com) + * 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 @@ /* 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; }