--- trunk/reactos/subsys/system/cmd/En.rc 2005-04-28 21:56:36 UTC (rev 14851)
+++ trunk/reactos/subsys/system/cmd/En.rc 2005-04-28 22:05:26 UTC (rev 14852)
@@ -278,6 +278,17 @@
STRING_MKDIR_HELP, "Creates a directory.\n\n \
MKDIR [drive:]path\nMD [drive:]path"
+STRING_MEMMORY_HELP1, "Displays the amount of system memory.\n\nMEMORY"
+
+STRING_MEMMORY_HELP2, "\n %12s%% memory load.\n\n \
+ %13s bytes total physical RAM.\n \
+ %13s bytes available physical RAM.\n\n \
+ %13s bytes total page file.\n \
+ %13s bytes available page file.\n\n \
+ %13s bytes total virtual memory.\n \
+ %13s bytes available virtual memory.\n"
+
+
STRING_RMDIR_HELP, "Removes a directory.\n\n \
RMDIR [drive:]path\nRD [drive:]path"
--- trunk/reactos/subsys/system/cmd/memory.c 2005-04-28 21:56:36 UTC (rev 14851)
+++ trunk/reactos/subsys/system/cmd/memory.c 2005-04-28 22:05:26 UTC (rev 14852)
@@ -6,9 +6,13 @@
*
* 01-Sep-1999 (Eric Kohl)
* Started.
+ *
+ * 28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
+ * Remove all hardcode string to En.rc
*/
#include "precomp.h"
+#include "resource.h"
#ifdef INCLUDE_CMD_MEMORY
@@ -60,12 +64,12 @@
TCHAR szAvailPageFile[20];
TCHAR szTotalVirtual[20];
TCHAR szAvailVirtual[20];
+ WCHAR szMsg[RC_STRING_MAX_SIZE];
if (!_tcsncmp (param, _T("/?"), 2))
{
- ConOutPuts (_T("Displays the amount of system memory.\n"
- "\n"
- "MEMORY"));
+ LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
+ ConOutPuts ((LPTSTR)szMsg);
return 0;
}
@@ -81,17 +85,8 @@
ConvertDWord (ms.dwTotalVirtual, szTotalVirtual, 20, TRUE);
ConvertDWord (ms.dwAvailVirtual, szAvailVirtual, 20, TRUE);
- ConOutPrintf (_T("\n"
- " %12s%% memory load.\n"
- "\n"
- " %13s bytes total physical RAM.\n"
- " %13s bytes available physical RAM.\n"
- "\n"
- " %13s bytes total page file.\n"
- " %13s bytes available page file.\n"
- "\n"
- " %13s bytes total virtual memory.\n"
- " %13s bytes available virtual memory.\n"),
+ LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
+ ConOutPrintf ((LPTSTR)szMsg,
szMemoryLoad, szTotalPhys, szAvailPhys, szTotalPageFile,
szAvailPageFile, szTotalVirtual, szAvailVirtual);
--- trunk/reactos/subsys/system/cmd/resource.h 2005-04-28 21:56:36 UTC (rev 14851)
+++ trunk/reactos/subsys/system/cmd/resource.h 2005-04-28 22:05:26 UTC (rev 14852)
@@ -132,12 +132,15 @@
#define STRING_MKDIR_HELP 657
-#define STRING_RMDIR_HELP 658
+#define STRING_MEMMORY_HELP1 658
+#define STRING_MEMMORY_HELP2 659
-#define STRING_REM_HELP 659
+#define STRING_RMDIR_HELP 660
+#define STRING_REM_HELP 661
+