Remove more hardcode string to En.rc
Modified: trunk/reactos/subsys/system/cmd/En.rc
Modified: trunk/reactos/subsys/system/cmd/alias.c
Modified: trunk/reactos/subsys/system/cmd/batch.c
Modified: trunk/reactos/subsys/system/cmd/beep.c
Modified: trunk/reactos/subsys/system/cmd/call.c
Modified: trunk/reactos/subsys/system/cmd/cls.c
Modified: trunk/reactos/subsys/system/cmd/resource.h

Modified: trunk/reactos/subsys/system/cmd/En.rc
--- trunk/reactos/subsys/system/cmd/En.rc	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/En.rc	2005-04-02 21:06:44 UTC (rev 14460)
@@ -20,6 +20,24 @@
   /D  Processes direcories as well\n\n \
 Type ATTRIB without a parameter to display the attributes of all files."
 
+STRING_ALIAS_HELP,  "Sets, removes or shows aliases.\n\n \
+ALIAS [alias=[command]]\n\n \
+  alias    Name for an alias.\n \
+  command  Text to be substituted for an alias.\n\n \
+To list all aliases:\n \
+  ALIAS\n\n \
+To set a new or replace an existing alias:\n \
+  ALIAS da=dir a:\n\n \
+To remove an alias from the alias list:\n \
+  ALIAS da="
+
+STRING_BEEP_HELP, "Beep the speaker.\n\nBEEP"
+
+STRING_CALL_HELP, "Calls one batch program from another.\n\n \
+CALL [drive:][path]filename [batch-parameter]\n\n \
+  batch-parameter  Specifies any command-line information required by the\n \
+                   batch program."
+
 STRING_CD_HELP,      "Changes the current directory or displays it's name\n\n \
 CHDIR [drive:][path]\n \
 CHDIR[..|-]\n \
@@ -39,6 +57,8 @@
   text          Prompt string to display.\n\n \
 ERRORLEVEL is set to offset of key user presses in choices."
 
+STRING_CLS_HELP, "Clears the screen.\n\nCLS"
+
 STRING_EXIT_HELP, "Exits the command line interpreter.\n\nEXIT"
 
 STRING_MKDIR_HELP,   "Creates a directory.\n\n \
@@ -51,6 +71,11 @@
 
 
 
+
+
+
+
+
 STRING_CHOICE_OPTION         "YN"
 
 
@@ -60,4 +85,10 @@
 STRING_CHOICE_ERROR_OPTION,  "Illegal Option: %s"
 STRING_PARAM_ERROR,          "Required parameter missing\n"
 
+
+STRING_ALIAS_ERROR,          "Command line too long after alias expansion!\n"
+
+STRING_BATCH_ERROR,          "Error opening batch file\n"
+
+
 }

Modified: trunk/reactos/subsys/system/cmd/alias.c
--- trunk/reactos/subsys/system/cmd/alias.c	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/alias.c	2005-04-02 21:06:44 UTC (rev 14460)
@@ -24,10 +24,14 @@
  *
  *    24-Jan-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Redirection safe!
+ *
+ *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ *        Remove all hardcode string to En.rc  
  */
 
 
 #include "precomp.h"
+#include "resource.h"
 
 #ifdef FEATURE_ALIASES
 
@@ -233,6 +237,7 @@
 /* specified routines */
 VOID ExpandAlias (LPTSTR cmd, INT maxlen)
 {
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
 	unsigned n = 0,
 		m,
 		i,
@@ -276,7 +281,8 @@
 				m = _tcslen (ptr->lpSubst);
 				if ((int)(_tcslen (cmd) - len + m - n) > maxlen)
 				{
-					ConErrPrintf (_T("Command line too long after alias expansion!\n"));
+					LoadString( GetModuleHandle(NULL), STRING_ALIAS_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
+                    ConErrPrintf (_T((LPTSTR)szMsg));					
 					/* the parser won't cause any problems with an empty line */
 					cmd[0] = _T('\0');
 				}
@@ -300,25 +306,12 @@
 INT CommandAlias (LPTSTR cmd, LPTSTR param)
 {
 	LPTSTR ptr;
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
 
 	if (!_tcsncmp (param, _T("/?"), 2))
 	{
-		ConOutPuts (_T("Sets, removes or shows aliases.\n"
-		               "\n"
-		               "ALIAS [alias=[command]]\n"
-		               "\n"
-		               "  alias    Name for an alias.\n"
-		               "  command  Text to be substituted for an alias.\n"
-		               "\n"
-//					   "For example:\n"
-					   "To list all aliases:\n"
-					   "  ALIAS\n\n"
-					   "To set a new or replace an existing alias:\n"
-					   "  ALIAS da=dir a:\n\n"
-					   "To remove an alias from the alias list:\n"
-					   "  ALIAS da="
-//					   "Type ALIAS without a parameter to display the alias list.\n"
-					   ));
+		LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
+        ConOutPuts (_T((LPTSTR)szMsg));
 		return 0;
 	}
 

Modified: trunk/reactos/subsys/system/cmd/batch.c
--- trunk/reactos/subsys/system/cmd/batch.c	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/batch.c	2005-04-02 21:06:44 UTC (rev 14460)
@@ -54,9 +54,13 @@
  *    
  *    23-Feb-2001 (Carl Nettelblad <cnettel@hem.passagen.es>)
  *        Fixes made to get "for" working.
+ *
+ *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ *        Remove all hardcode string to En.rc  
  */
 
 #include "precomp.h"
+#include "resource.h"
 
 
 /* The stack of current batch contexts.
@@ -215,6 +219,7 @@
 BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
 {
 	HANDLE hFile;
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
 
 	hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_READ, NULL,
 						OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL |
@@ -227,7 +232,8 @@
 
 	if (hFile == INVALID_HANDLE_VALUE)
 	{
-		ConErrPrintf (_T("Error opening batch file\n"));
+		LoadString( GetModuleHandle(NULL), STRING_BATCH_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
+        ConErrPrintf (_T((LPTSTR)szMsg));
 		return FALSE;
 	}
 

Modified: trunk/reactos/subsys/system/cmd/beep.c
--- trunk/reactos/subsys/system/cmd/beep.c	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/beep.c	2005-04-02 21:06:44 UTC (rev 14460)
@@ -19,18 +19,25 @@
  *
  *    20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Redirection ready!
+ *
+ *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ *        Remove all hardcode string to En.rc  
  */
 
 #include "precomp.h"
+#include "resource.h"
 
 #ifdef INCLUDE_CMD_BEEP
 
 
 INT cmd_beep (LPTSTR cmd, LPTSTR param)
 {
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
+
 	if (_tcsncmp (param, _T("/?"), 2) == 0)
 	{
-		ConOutPuts (_T("Beep the speaker.\n\nBEEP"));
+		LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
+        ConOutPuts (_T((LPTSTR)szMsg));
 		return 0;
 	}
 

Modified: trunk/reactos/subsys/system/cmd/call.c
--- trunk/reactos/subsys/system/cmd/call.c	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/call.c	2005-04-02 21:06:44 UTC (rev 14460)
@@ -24,9 +24,13 @@
  *
  *    20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Unicode and redirection safe!
+ *
+ *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ *        Remove all hardcode string to En.rc  
  */
 
 #include "precomp.h"
+#include "resource.h"
 
 
 /*
@@ -41,16 +45,16 @@
 INT cmd_call (LPTSTR cmd, LPTSTR param)
 {
 	LPBATCH_CONTEXT n = NULL;
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
 
 #ifdef _DEBUG
 	DebugPrintf (_T("cmd_call: (\'%s\',\'%s\')\n"), cmd, param);
 #endif
 	if (!_tcsncmp (param, _T("/?"), 2))
 	{
-		ConOutPuts (_T("Calls one batch program from another.\n\n"
-					   "CALL [drive:][path]filename [batch-parameter]\n\n"
-					   "  batch-parameter  Specifies any command-line information required by the\n"
-					   "                   batch program."));
+		LoadString( GetModuleHandle(NULL), STRING_CALL_HELP, (LPTSTR) szMsg,sizeof(szMsg));
+        ConOutPuts (_T((LPTSTR)szMsg));
+
 		return 0;
 	}
 

Modified: trunk/reactos/subsys/system/cmd/cls.c
--- trunk/reactos/subsys/system/cmd/cls.c	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/cls.c	2005-04-02 21:06:44 UTC (rev 14460)
@@ -21,9 +21,13 @@
  *
  *    20-Jan-1998 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
  *        Redirection ready!
+ *
+ *    02-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ *        Remove all hardcode string to En.rc  
  */
 
 #include "precomp.h"
+#include "resource.h"
 
 #ifdef INCLUDE_CMD_CLS
 
@@ -32,10 +36,12 @@
 	DWORD dwWritten;
 	CONSOLE_SCREEN_BUFFER_INFO csbi;
 	COORD coPos;
+	WCHAR szMsg[RC_STRING_MAX_SIZE];
 
 	if (!_tcsncmp (param, _T("/?"), 2))
 	{
-		ConOutPuts (_T("Clears the screen.\n\nCLS"));
+		LoadString( GetModuleHandle(NULL), STRING_CLS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
+        ConOutPuts (_T((LPTSTR)szMsg));
 		return 0;
 	}
 

Modified: trunk/reactos/subsys/system/cmd/resource.h
--- trunk/reactos/subsys/system/cmd/resource.h	2005-04-02 21:02:31 UTC (rev 14459)
+++ trunk/reactos/subsys/system/cmd/resource.h	2005-04-02 21:06:44 UTC (rev 14460)
@@ -2,21 +2,30 @@
 
 #define STRING_CHOICE_OPTION               200
 
-#define STRING_PARAM_ERROR                 300
-#define STRING_CHOICE_ERROR                301
-#define STRING_CHOICE_ERROR_TXT            302
-#define STRING_CHOICE_ERROR_OPTION         303
 
+#define STRING_ALIAS_ERROR                 300
+#define STRING_BATCH_ERROR                 301
+#define STRING_CHOICE_ERROR                302
+#define STRING_CHOICE_ERROR_TXT            303
+#define STRING_CHOICE_ERROR_OPTION         304
+#define STRING_PARAM_ERROR                 305
 
-
 #define STRING_ATTRIB_HELP                 400
-#define STRING_CD_HELP                     401
-#define STRING_CHOICE_HELP                 402
-#define STRING_EXIT_HELP                   403
-#define STRING_MKDIR_HELP                  404
-#define STRING_RMDIR_HELP                  405
-#define STRING_REM_HELP                    406
+#define STRING_ALIAS_HELP                  401
+#define STRING_BEEP_HELP                   402
+#define STRING_CALL_HELP                   403
+#define STRING_CD_HELP                     404
+#define STRING_CHOICE_HELP                 405
+#define STRING_CLS_HELP                    406
+#define STRING_EXIT_HELP                   407
+#define STRING_MKDIR_HELP                  408
+#define STRING_RMDIR_HELP                  409
+#define STRING_REM_HELP                    410
 
 
 
+  
 
+
+
+