Christian Costa : cmd: Move externals list at the same place as the builtins one so it' s easier to known how a command is implemented.

Alexandre Julliard julliard at winehq.org
Mon Sep 12 11:42:58 CDT 2011


Module: wine
Branch: master
Commit: faa23d2a1639c3b2d1ffa4e8f679047e47580b72
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=faa23d2a1639c3b2d1ffa4e8f679047e47580b72

Author: Christian Costa <titan.costa at wanadoo.fr>
Date:   Mon Sep 12 09:24:25 2011 +0200

cmd: Move externals list at the same place as the builtins one so it's easier to known how a command is implemented.

---

 programs/cmd/builtins.c |    7 +------
 programs/cmd/wcmd.h     |    3 +++
 programs/cmd/wcmdmain.c |    5 +++++
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index dcbc73e..716db4b 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -67,11 +67,6 @@ static const WCHAR parmY[] = {'/','Y','\0'};
 static const WCHAR parmNoY[] = {'/','-','Y','\0'};
 static const WCHAR nullW[] = {'\0'};
 
-const WCHAR externals[][10] = {
-        {'A','T','T','R','I','B','\0'},
-        {'X','C','O','P','Y','\0'}
-};
-
 /**************************************************************************
  * WCMD_ask_confirm
  *
@@ -1335,7 +1330,7 @@ void WCMD_give_help (const WCHAR *command) {
     WCMD_output_asis (WCMD_LoadMessage(WCMD_ALLHELP));
   }
   else {
-    /* Display help message for builtin command */
+    /* Display help message for builtin commands */
     for (i=0; i<=WCMD_EXIT; i++) {
       if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
 	  command, -1, inbuilt[i], -1) == CSTR_EQUAL) {
diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
index c8a7e6d..b7bc175 100644
--- a/programs/cmd/wcmd.h
+++ b/programs/cmd/wcmd.h
@@ -211,6 +211,9 @@ typedef struct _DIRECTORY_STACK
 /* Must be last in list */
 #define WCMD_EXIT     44
 
+#define NUM_EXTERNALS 2
+extern const WCHAR externals[NUM_EXTERNALS][10];
+
 /* Some standard messages */
 extern const WCHAR newline[];
 extern WCHAR anykey[];
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 108d411..840c5da 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -79,6 +79,11 @@ const WCHAR inbuilt[][10] = {
         {'E','X','I','T','\0'}
 };
 
+const WCHAR externals[NUM_EXTERNALS][10] = {
+        {'A','T','T','R','I','B','\0'},
+        {'X','C','O','P','Y','\0'}
+};
+
 HINSTANCE hinst;
 DWORD errorlevel;
 int echo_mode = 1, verify_mode = 0, defaultColor = 7;




More information about the wine-cvs mailing list