Re: Another problem wih Charlie's Angels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
attached you find a patch which imporves the compiled-in loadorder detection a little bit.
It adds a "win16" flag which states whether the module under scrutiny is a reserved name under Win16, only.
Surely some more of the names in the default_loadorder should be marked alike. I am not sure which ones should be changed here. Who can help ?


Dominik

ChangeLog:
Dominik Strasser: add a flag to distinguish reserved names between Win16 and Win32 in default loadorder



Index: loader/loadorder.c
===================================================================
RCS file: /home/wine/wine/loader/loadorder.c,v
retrieving revision 1.63
diff -u -3 -p -u -r1.63 loadorder.c
--- loader/loadorder.c	27 Apr 2003 00:40:23 -0000	1.63
+++ loader/loadorder.c	16 Aug 2003 08:38:04 -0000
@@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(module);
 typedef struct module_loadorder
 {
     const char         *modulename;
+	int					win16_flag;
     enum loadorder_type loadorder[LOADORDER_NTYPES];
 } module_loadorder_t;
 
@@ -55,36 +56,36 @@ struct loadorder_list
 /* the list must remain sorted by dll name */
 static module_loadorder_t default_order_list[] =
 {
-    { "display",      { LOADORDER_BI, 0, 0 } },
-    { "gdi.exe",      { LOADORDER_BI, 0, 0 } },
-    { "gdi32",        { LOADORDER_BI, 0, 0 } },
-    { "icmp",         { LOADORDER_BI, 0, 0 } },
-    { "kernel",       { LOADORDER_BI, 0, 0 } },
-    { "kernel32",     { LOADORDER_BI, 0, 0 } },
-    { "keyboard",     { LOADORDER_BI, 0, 0 } },
-    { "krnl386.exe",  { LOADORDER_BI, 0, 0 } },
-    { "mmsystem",     { LOADORDER_BI, 0, 0 } },
-    { "mouse",        { LOADORDER_BI, 0, 0 } },
-    { "ntdll",        { LOADORDER_BI, 0, 0 } },
-    { "odbc32",       { LOADORDER_BI, 0, 0 } },
-    { "system",       { LOADORDER_BI, 0, 0 } },
-    { "toolhelp",     { LOADORDER_BI, 0, 0 } },
-    { "ttydrv",       { LOADORDER_BI, 0, 0 } },
-    { "user.exe",     { LOADORDER_BI, 0, 0 } },
-    { "user32",       { LOADORDER_BI, 0, 0 } },
-    { "w32skrnl",     { LOADORDER_BI, 0, 0 } },
-    { "winaspi",      { LOADORDER_BI, 0, 0 } },
-    { "winedos",      { LOADORDER_BI, 0, 0 } },
-    { "wineps",       { LOADORDER_BI, 0, 0 } },
-    { "wing",         { LOADORDER_BI, 0, 0 } },
-    { "winmm",        { LOADORDER_BI, 0, 0 } },
-    { "winsock",      { LOADORDER_BI, 0, 0 } },
-    { "wnaspi32",     { LOADORDER_BI, 0, 0 } },
-    { "wow32",        { LOADORDER_BI, 0, 0 } },
-    { "wprocs",       { LOADORDER_BI, 0, 0 } },
-    { "ws2_32",       { LOADORDER_BI, 0, 0 } },
-    { "wsock32",      { LOADORDER_BI, 0, 0 } },
-    { "x11drv",       { LOADORDER_BI, 0, 0 } }
+    { "display",      0, { LOADORDER_BI, 0, 0 } },
+    { "gdi.exe",      0, { LOADORDER_BI, 0, 0 } },
+    { "gdi32",        0, { LOADORDER_BI, 0, 0 } },
+    { "icmp",         0, { LOADORDER_BI, 0, 0 } },
+    { "kernel",       0, { LOADORDER_BI, 0, 0 } },
+    { "kernel32",     0, { LOADORDER_BI, 0, 0 } },
+    { "keyboard",     0, { LOADORDER_BI, 0, 0 } },
+    { "krnl386.exe",  0, { LOADORDER_BI, 0, 0 } },
+    { "mmsystem",     0, { LOADORDER_BI, 0, 0 } },
+    { "mouse",        0, { LOADORDER_BI, 0, 0 } },
+    { "ntdll",        0, { LOADORDER_BI, 0, 0 } },
+    { "odbc32",       0, { LOADORDER_BI, 0, 0 } },
+    { "system",       1, { LOADORDER_BI, 0, 0 } },
+    { "toolhelp",     0, { LOADORDER_BI, 0, 0 } },
+    { "ttydrv",       0, { LOADORDER_BI, 0, 0 } },
+    { "user.exe",     0, { LOADORDER_BI, 0, 0 } },
+    { "user32",       0, { LOADORDER_BI, 0, 0 } },
+    { "w32skrnl",     0, { LOADORDER_BI, 0, 0 } },
+    { "winaspi",      0, { LOADORDER_BI, 0, 0 } },
+    { "winedos",      0, { LOADORDER_BI, 0, 0 } },
+    { "wineps",       0, { LOADORDER_BI, 0, 0 } },
+    { "wing",         0, { LOADORDER_BI, 0, 0 } },
+    { "winmm",        0, { LOADORDER_BI, 0, 0 } },
+    { "winsock",      0, { LOADORDER_BI, 0, 0 } },
+    { "wnaspi32",     0, { LOADORDER_BI, 0, 0 } },
+    { "wow32",        0, { LOADORDER_BI, 0, 0 } },
+    { "wprocs",       0, { LOADORDER_BI, 0, 0 } },
+    { "ws2_32",       0, { LOADORDER_BI, 0, 0 } },
+    { "wsock32",      0, { LOADORDER_BI, 0, 0 } },
+    { "x11drv",       0, { LOADORDER_BI, 0, 0 } }
 };
 
 static const struct loadorder_list default_list =
@@ -300,7 +301,7 @@ static BOOL AddLoadOrder(module_loadorde
  */
 static BOOL AddLoadOrderSet(char *key, char *order)
 {
-	module_loadorder_t ldo;
+	module_loadorder_t ldo = { 0 };
 	char *cptr;
 
 	/* Parse the loadorder before the rest because strtok is not reentrant */
@@ -362,7 +363,7 @@ void MODULE_AddLoadOrderOption( const ch
  * default lists.
  */
 static BOOL get_list_load_order( const char *module, const struct loadorder_list *list,
-                                 enum loadorder_type lo[] )
+                                 enum loadorder_type lo[], int win32_flag )
 {
     module_loadorder_t tmp, *res = NULL;
 
@@ -370,7 +371,7 @@ static BOOL get_list_load_order( const c
     /* some bsearch implementations (Solaris) are buggy when the number of items is 0 */
     if (list->count && (res = bsearch(&tmp, list->order, list->count, sizeof(list->order[0]), cmp_sort_func)))
         memcpy( lo, res->loadorder, sizeof(res->loadorder) );
-    return (res != NULL);
+    return (res != NULL) && !(win32_flag && res->win16_flag);
 }
 
 
@@ -591,7 +592,7 @@ void MODULE_GetLoadOrder( enum loadorder
     }
 
     /* check command-line first */
-    if (get_list_load_order( module+1, &cmdline_list, loadorder ))
+    if (get_list_load_order( module+1, &cmdline_list, loadorder, 0 ))
     {
         TRACE( "got cmdline %s for %s\n",
                debugstr_loadorder(loadorder), debugstr_a(path) );
@@ -650,7 +651,7 @@ void MODULE_GetLoadOrder( enum loadorder
     }
 
     /* then base name matching compiled-in defaults */
-    if (get_list_load_order( basename, &default_list, loadorder ))
+    if (get_list_load_order( basename, &default_list, loadorder, win32 ))
     {
         TRACE( "got compiled-in default %s for %s\n",
                debugstr_loadorder(loadorder), debugstr_a(path) );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux