projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fda4b22
)
[SPEC2DEF]
author
Timo Kreuzer
<timo.kreuzer@reactos.org>
Sat, 10 May 2014 14:12:20 +0000
(14:12 +0000)
committer
Timo Kreuzer
<timo.kreuzer@reactos.org>
Sat, 10 May 2014 14:12:20 +0000
(14:12 +0000)
Improve the previous fix.
svn path=/trunk/; revision=63218
reactos/tools/spec2def/spec2def.c
patch
|
blob
|
history
diff --git
a/reactos/tools/spec2def/spec2def.c
b/reactos/tools/spec2def/spec2def.c
index
de427f0
..
5a5b5fc
100644
(file)
--- a/
reactos/tools/spec2def/spec2def.c
+++ b/
reactos/tools/spec2def/spec2def.c
@@
-325,7
+325,22
@@
PrintName(FILE *fileDest, EXPORT *pexp, PSTRING pstr, int fDeco)
int nNameLength = pstr->len;
const char* pcDot, *pcAt;
int nNameLength = pstr->len;
const char* pcDot, *pcAt;
- if ((giArch == ARCH_X86) && fDeco &&
+ /* Check for non-x86 first */
+ if (giArch != ARCH_X86)
+ {
+ /* Does the string already have stdcall decoration? */
+ pcAt = ScanToken(pcName, '@');
+ if ((pcAt < (pcName + nNameLength)) && (pcName[0] == '_'))
+ {
+ /* Skip leading underscore and remove trailing decoration */
+ pcName++;
+ nNameLength = pcAt - pcName;
+ }
+
+ /* Print the undecorated function name */
+ fprintf(fileDest, "%.*s", nNameLength, pcName);
+ }
+ else if (fDeco &&
((pexp->nCallingConvention == CC_STDCALL) ||
(pexp->nCallingConvention == CC_FASTCALL)))
{
((pexp->nCallingConvention == CC_STDCALL) ||
(pexp->nCallingConvention == CC_FASTCALL)))
{
@@
-370,15
+385,6
@@
PrintName(FILE *fileDest, EXPORT *pexp, PSTRING pstr, int fDeco)
}
else
{
}
else
{
- /* Does the string already have stdcall decoration? */
- pcAt = ScanToken(pcName, '@');
- if (pcAt && (pcAt < (pcName + nNameLength)) && pcName[0] == '_')
- {
- /* Skip leading underscore and remove trailing decoration */
- pcName++;
- nNameLength = pcAt - pcName;
- }
-
/* Print the undecorated function name */
fprintf(fileDest, "%.*s", nNameLength, pcName);
}
/* Print the undecorated function name */
fprintf(fileDest, "%.*s", nNameLength, pcName);
}