[ros-diffs] [cfinck] 31297: Get rid of make_internal_name() and only use the name or export name now, also for stub functions. This is already done this way when creating the SPEC files, but wasn't done when creating the C files with the stubs.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Tue Dec 18 00:22:36 CET 2007


Author: cfinck
Date: Tue Dec 18 02:22:34 2007
New Revision: 31297

URL: http://svn.reactos.org/svn/reactos?rev=31297&view=rev
Log:
Get rid of make_internal_name() and only use the name or export name now, also for stub functions.
This is already done this way when creating the SPEC files, but wasn't done when creating the C files with the stubs.

Modified:
    trunk/reactos/tools/winebuild/spec32.c

Modified: trunk/reactos/tools/winebuild/spec32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/spec32.c?rev=31297&r1=31296&r2=31297&view=diff
==============================================================================
--- trunk/reactos/tools/winebuild/spec32.c (original)
+++ trunk/reactos/tools/winebuild/spec32.c Tue Dec 18 02:22:34 2007
@@ -61,28 +61,6 @@
     }
     return 0;
 }
-
-/*******************************************************************
- *         make_internal_name
- *
- * Generate an internal name for an entry point. Used for stubs etc.
- */
-static const char *make_internal_name( const ORDDEF *odp, DLLSPEC *spec, const char *prefix )
-{
-    static char buffer[256];
-    if (odp->name || odp->export_name)
-    {
-        char *p;
-        sprintf( buffer, "__wine_%s_%s_%s", prefix, spec->file_name,
-                 odp->name ? odp->name : odp->export_name );
-        /* make sure name is a legal C identifier */
-        for (p = buffer; *p; p++) if (!isalnum(*p) && *p != '_') break;
-        if (!*p) return buffer;
-    }
-    sprintf( buffer, "__wine_%s_%s_%d", prefix, make_c_identifier(spec->file_name), odp->ordinal );
-    return buffer;
-}
-
 
 /*******************************************************************
  *         output_relay_debug
@@ -353,7 +331,7 @@
     {
         const ORDDEF *odp = &spec->entry_points[i];
         if (odp->type != TYPE_STUB) continue;
-        output( "void %s(void) ", make_internal_name( odp, spec, "stub" ) );
+        output( "void %s(void) ", (odp->name ? odp->name : odp->export_name) );
         if (odp->name)
             output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%s\"); }\n", odp->name );
         else if (odp->export_name)
@@ -624,7 +602,7 @@
             }
             if (NULL != odp->name)
             {
-                output("=%s", make_internal_name( odp, spec, "stub" ));
+                output("=%s", odp->name);
             }
             break;
         }




More information about the Ros-diffs mailing list