found some hard code string move them to En.rc
them new are STRING_CMD_INVALIDDRIVE, STRING_CMD_SHELLINFO,
STRING_VERSION_RUNVER
remove some #define strings that was not in use.
update ver so it output svn version number and update copyright note
it take the copyright and buildversion from <reactos/resource.h> and
<reactos/buildno.h>
so we only need change it on one place
Modified: trunk/reactos/subsys/system/cmd/En.rc
Modified: trunk/reactos/subsys/system/cmd/cmd.c
Modified: trunk/reactos/subsys/system/cmd/cmd.h
Modified: trunk/reactos/subsys/system/cmd/resource.h
Modified: trunk/reactos/subsys/system/cmd/start.c
Modified: trunk/reactos/subsys/system/cmd/ver.c
_____
Modified: trunk/reactos/subsys/system/cmd/En.rc
--- trunk/reactos/subsys/system/cmd/En.rc 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/En.rc 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -560,4 +560,9 @@
STRING_ERROR_DRIVER_NOT_READY, "Drive not ready"
STRING_PATH_ERROR, "CMD: Not in environment '%s'\n"
+
+
+STRING_CMD_INVALIDDRIVE, "ERROR: invalid drive"
+STRING_CMD_SHELLINFO, "\nReactOS Command Line Interpreter"
+STRING_VERSION_RUNVER " running on %s"
}
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/cmd.c 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -333,7 +333,7 @@
working = SetCurrentDirectory(str);
}
- if (!working) ConErrPuts (INVALIDDRIVE);
+ if (!working) ConErrResPuts (STRING_CMD_INVALIDDRIVE);
return;
}
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.h
--- trunk/reactos/subsys/system/cmd/cmd.h 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/cmd.h 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -48,18 +48,7 @@
#define BREAK_IGNORE 4
/* define some error messages */
-#define NOENVERR _T("ERROR: no environment")
-#define INVALIDDRIVE _T("ERROR: invalid drive")
-#define INVALIDFUNCTION _T("ERROR: invalid function")
-#define ACCESSDENIED _T("ERROR: access denied")
-#define BADENVIROMENT _T("ERROR: bad enviroment")
-#define BADFORMAT _T("ERROR: bad format")
-#define ERROR_E2BIG _T("ERROR: Argument list too long")
-#define ERROR_EINVAL _T("ERROR: Invalid argument")
-#define SHELLINFO "ReactOS Command Line Interpreter"
-
-
#define D_ON _T("on")
#define D_OFF _T("off")
_____
Modified: trunk/reactos/subsys/system/cmd/resource.h
--- trunk/reactos/subsys/system/cmd/resource.h 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/resource.h 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -1,3 +1,5 @@
+
+
#define RC_STRING_MAX_SIZE 3072
@@ -81,126 +83,131 @@
#define STRING_CMD_HELP5 612
#define STRING_CMD_HELP6 613
#define STRING_CMD_HELP7 614
-#define STRING_CMD_HELP8 615
-#define STRING_COLOR_HELP1 616
-#define STRING_COPY_HELP1 617
-#define STRING_COPY_HELP2 618
-#define STRING_DATE_HELP1 619
-#define STRING_DATE_HELP2 620
-#define STRING_DATE_HELP3 621
-#define STRING_DATE_HELP4 622
-#define STRING_DEL_HELP1 623
-#define STRING_DEL_HELP2 624
-#define STRING_DEL_HELP3 625
-#define STRING_DEL_HELP4 626
-#define STRING_DELAY_HELP 627
+#define STRING_CMD_HELP8 615
+#define STRING_CMD_INVALIDDRIVE 617
+#define STRING_CMD_SHELLINFO 624
-#define STRING_DIR_HELP1 628
-#define STRING_DIR_HELP2 629
-#define STRING_DIR_HELP3 630
-#define STRING_DIR_HELP4 631
-#define STRING_DIR_HELP5 632
-#define STRING_DIR_HELP6 633
-#define STRING_DIR_HELP7 634
-#define STRING_DIR_HELP8 635
+#define STRING_COLOR_HELP1 625
+#define STRING_COPY_HELP1 626
+#define STRING_COPY_HELP2 627
-#define STRING_DIRSTACK_HELP1 636
-#define STRING_DIRSTACK_HELP2 637
-#define STRING_DIRSTACK_HELP3 638
-#define STRING_DIRSTACK_HELP4 639
+#define STRING_DATE_HELP1 628
+#define STRING_DATE_HELP2 629
+#define STRING_DATE_HELP3 630
+#define STRING_DATE_HELP4 631
+#define STRING_DEL_HELP1 632
+#define STRING_DEL_HELP2 633
+#define STRING_DEL_HELP3 634
+#define STRING_DEL_HELP4 635
+#define STRING_DELAY_HELP 636
-#define STRING_ECHO_HELP1 640
-#define STRING_ECHO_HELP2 641
-#define STRING_ECHO_HELP3 642
-#define STRING_ECHO_HELP4 643
-#define STRING_ECHO_HELP5 644
+#define STRING_DIR_HELP1 637
+#define STRING_DIR_HELP2 638
+#define STRING_DIR_HELP3 639
+#define STRING_DIR_HELP4 640
+#define STRING_DIR_HELP5 641
+#define STRING_DIR_HELP6 642
+#define STRING_DIR_HELP7 643
+#define STRING_DIR_HELP8 644
-#define STRING_EXIT_HELP 645
+#define STRING_DIRSTACK_HELP1 645
+#define STRING_DIRSTACK_HELP2 646
+#define STRING_DIRSTACK_HELP3 647
+#define STRING_DIRSTACK_HELP4 648
-#define STRING_FOR_HELP1 646
+#define STRING_ECHO_HELP1 649
+#define STRING_ECHO_HELP2 650
+#define STRING_ECHO_HELP3 651
+#define STRING_ECHO_HELP4 652
+#define STRING_ECHO_HELP5 653
-#define STRING_FREE_HELP1 647
-#define STRING_FREE_HELP2 648
+#define STRING_EXIT_HELP 654
-#define STRING_IF_HELP1 650
+#define STRING_FOR_HELP1 655
-#define STRING_GOTO_HELP1 651
+#define STRING_FREE_HELP1 656
+#define STRING_FREE_HELP2 657
-#define STRING_LABEL_HELP1 652
-#define STRING_LABEL_HELP2 653
-#define STRING_LABEL_HELP3 654
-#define STRING_LABEL_HELP4 655
-#define STRING_LABEL_HELP5 656
+#define STRING_IF_HELP1 658
-#define STRING_LOCALE_HELP1 657
+#define STRING_GOTO_HELP1 659
-#define STRING_MKDIR_HELP 658
+#define STRING_LABEL_HELP1 660
+#define STRING_LABEL_HELP2 661
+#define STRING_LABEL_HELP3 662
+#define STRING_LABEL_HELP4 663
+#define STRING_LABEL_HELP5 664
-#define STRING_MEMMORY_HELP1 659
-#define STRING_MEMMORY_HELP2 660
+#define STRING_LOCALE_HELP1 665
-#define STRING_MISC_HELP1 661
+#define STRING_MKDIR_HELP 666
-#define STRING_MOVE_HELP1 662
-#define STRING_MOVE_HELP2 663
+#define STRING_MEMMORY_HELP1 667
+#define STRING_MEMMORY_HELP2 668
-#define STRING_MSGBOX_HELP 664
+#define STRING_MISC_HELP1 669
-#define STRING_PATH_HELP1 665
+#define STRING_MOVE_HELP1 670
+#define STRING_MOVE_HELP2 671
-#define STRING_PAUSE_HELP1 666
+#define STRING_MSGBOX_HELP 672
-#define STRING_PROMPT_HELP1 667
-#define STRING_PROMPT_HELP2 668
-#define STRING_PROMPT_HELP3 669
+#define STRING_PATH_HELP1 673
-#define STRING_REM_HELP 670
+#define STRING_PAUSE_HELP1 674
-#define STRING_REN_HELP1 671
-#define STRING_REN_HELP2 672
-#define STRING_REN_HELP3 673
+#define STRING_PROMPT_HELP1 675
+#define STRING_PROMPT_HELP2 676
+#define STRING_PROMPT_HELP3 677
-#define STRING_RMDIR_HELP 674
+#define STRING_REM_HELP 678
-#define STRING_SCREEN_HELP 675
+#define STRING_REN_HELP1 679
+#define STRING_REN_HELP2 680
+#define STRING_REN_HELP3 681
-#define STRING_SHIFT_HELP 676
+#define STRING_RMDIR_HELP 682
-#define STRING_SET_HELP 677
+#define STRING_SCREEN_HELP 683
-#define STRING_START_HELP1 678
+#define STRING_SHIFT_HELP 684
-#define STRING_TITLE_HELP 679
+#define STRING_SET_HELP 685
-#define STRING_TIME_HELP1 680
-#define STRING_TIME_HELP2 681
+#define STRING_START_HELP1 686
-#define STRING_TIMER_HELP1 682
-#define STRING_TIMER_HELP2 683
-#define STRING_TIMER_HELP3 684
+#define STRING_TITLE_HELP 687
-#define STRING_TYPE_HELP1 685
+#define STRING_TIME_HELP1 688
+#define STRING_TIME_HELP2 689
-#define STRING_VERIFY_HELP1 686
-#define STRING_VERIFY_HELP2 687
-#define STRING_VERIFY_HELP3 688
+#define STRING_TIMER_HELP1 690
+#define STRING_TIMER_HELP2 691
+#define STRING_TIMER_HELP3 692
-#define STRING_VERSION_HELP1 689
-#define STRING_VERSION_HELP2 690
-#define STRING_VERSION_HELP3 691
-#define STRING_VERSION_HELP4 692
-#define STRING_VERSION_HELP5 693
-#define STRING_VERSION_HELP6 694
-#define STRING_VERSION_HELP7 695
+#define STRING_TYPE_HELP1 693
-#define STRING_VOL_HELP1 696
-#define STRING_VOL_HELP2 697
-#define STRING_VOL_HELP3 698
-#define STRING_VOL_HELP4 699
+#define STRING_VERIFY_HELP1 694
+#define STRING_VERIFY_HELP2 695
+#define STRING_VERIFY_HELP3 696
-#define STRING_WINDOW_HELP1 700
-#define STRING_WINDOW_HELP2 701
+#define STRING_VERSION_HELP1 697
+#define STRING_VERSION_HELP2 698
+#define STRING_VERSION_HELP3 699
+#define STRING_VERSION_HELP4 700
+#define STRING_VERSION_HELP5 701
+#define STRING_VERSION_HELP6 702
+#define STRING_VERSION_HELP7 703
+#define STRING_VERSION_RUNVER 705
+#define STRING_VOL_HELP1 706
+#define STRING_VOL_HELP2 707
+#define STRING_VOL_HELP3 708
+#define STRING_VOL_HELP4 709
+
+#define STRING_WINDOW_HELP1 710
+#define STRING_WINDOW_HELP2 711
+
/* These strings are language independent (cmd.rc) */
#define STRING_FREEDOS_DEV 800
#define STRING_REACTOS_DEV 801
_____
Modified: trunk/reactos/subsys/system/cmd/start.c
--- trunk/reactos/subsys/system/cmd/start.c 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/start.c 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -39,7 +39,7 @@
SetCurrentDirectory (szPath);
GetCurrentDirectory (MAX_PATH, szPath);
if (szPath[0] != (TCHAR)_totupper (*first))
- ConErrPuts (INVALIDDRIVE);
+ ConErrResPuts (STRING_CMD_INVALIDDRIVE);
return 0;
}
_____
Modified: trunk/reactos/subsys/system/cmd/ver.c
--- trunk/reactos/subsys/system/cmd/ver.c 2005-05-08 14:39:46 UTC
(rev 15122)
+++ trunk/reactos/subsys/system/cmd/ver.c 2005-05-08 14:48:24 UTC
(rev 15123)
@@ -23,6 +23,7 @@
#include "precomp.h"
#include "resource.h"
+#include <reactos/resource.h>
VOID ShortVersion (VOID)
@@ -30,15 +31,13 @@
OSVERSIONINFO VersionInfo;
unsigned RosVersionLen;
LPTSTR RosVersion;
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
+
+ ConOutResPuts (STRING_CMD_SHELLINFO );
+ VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- ConOutPuts (_T("\n"
- SHELLINFO));
- VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-#ifdef _UNICODE
- ConOutPrintf(_T("%S"), SHELLVER);
-#else
- ConOutPrintf(_T("%s"), SHELLVER);
-#endif /* _UNICODE */
+ ConOutPrintf(_T("Version %s %s"), _T(KERNEL_RELEASE_STR),
_T(KERNEL_VERSION_BUILD_STR));
+
memset(VersionInfo.szCSDVersion, 0,
sizeof(VersionInfo.szCSDVersion));
if (GetVersionEx(&VersionInfo))
{
@@ -47,7 +46,8 @@
(RosVersion - VersionInfo.szCSDVersion);
if (7 <= RosVersionLen && 0 == _tcsnicmp(RosVersion,
_T("ReactOS"), 7))
{
- ConOutPrintf(_T(" running on %s"), RosVersion);
+ LoadString( GetModuleHandle(NULL),
STRING_VERSION_RUNVER, (LPTSTR) szMsg,sizeof(szMsg));
+ ConOutPrintf ((LPTSTR)szMsg, RosVersion);
}
}
ConOutPuts (_T("\n"));
@@ -73,12 +73,12 @@
ShortVersion();
ConOutPuts (_T("Copyright (C) 1994-1998 Tim Norman and
others."));
- ConOutPuts (_T("Copyright (C) 1998-2005 Eric Kohl and
others."));
+ ConOutPuts (_T(RES_STR_LEGAL_COPYRIGHT));
/* Basic copyright notice */
if (param[0] == _T('\0'))
{
- ConOutPuts(_T("\n"SHELLINFO));
+ ConOutResPuts (STRING_CMD_SHELLINFO );
ConOutResPuts(STRING_VERSION_HELP2);
}
else
Show replies by date