Author: tkreuzer Date: Tue Nov 30 20:58:44 2010 New Revision: 49877
URL: http://svn.reactos.org/svn/reactos?rev=49877&view=rev Log: [SPEC2DEF] Handle stubs with stdcall decoration.
Modified: branches/cmake-bringup/tools/spec2def/spec2def.c
Modified: branches/cmake-bringup/tools/spec2def/spec2def.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/spec2def/spe... ============================================================================== --- branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] (original) +++ branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] Tue Nov 30 20:58:44 2010 @@ -538,6 +538,33 @@ } }
+ /* Handle special stub cases */ + if (exp.nCallingConvention == CC_STUB) + { + /* Check for c++ mangled name */ + if (pc[0] == '?') + { + printf("Found c++ mangled name...\n"); + // + } + else + { + /* Check for stdcall name */ + char *p = strchr(pc, '@'); + if (p && (p - pc < exp.nNameLength)) + { + int i; + exp.nNameLength = p - pc; + exp.nStackBytes = atoi(p + 1); + exp.nArgCount = exp.nStackBytes / 4; + exp.nCallingConvention = CC_STDCALL; + exp.uFlags |= FL_STUB; + for (i = 0; i < exp.nArgCount; i++) + exp.anArgs[i] = ARG_LONG; + } + } + } + /* Get optional redirection */ if ((pc = NextToken(pc))) {