summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/winDumpExts.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/win/winDumpExts.c b/win/winDumpExts.c
index 96b7067..80f7c87 100644
--- a/win/winDumpExts.c
+++ b/win/winDumpExts.c
@@ -19,7 +19,7 @@
* compiler other than Visual C++.
*----------------------------------------------------------------------
*
- * RCS: @(#) $Id: winDumpExts.c,v 1.2 1998/09/14 18:40:21 stanton Exp $
+ * RCS: @(#) $Id: winDumpExts.c,v 1.3 1999/02/02 22:32:17 stanton Exp $
*/
#include <windows.h>
@@ -236,8 +236,14 @@ DumpExternals(PIMAGE_SYMBOL pSymbolTable, FILE *fout, unsigned cSymbols)
strcpy(symbol, s);
}
s = symbol;
- f = strchr(s, '@');
- if (f) {
+
+ /*
+ * Skip to the last @ and ensure it is followed by digits,
+ * otherwise it is probably part of a C++ mangled name.
+ */
+
+ f = strrchr(s, '@');
+ if (f && f[1] >= '0' && f[1] <= '9') {
*f = 0;
}
#if defined(_MSC_VER) && defined(_X86_)
@@ -468,10 +474,6 @@ main(int argc, char **argv)
if (arg == argc) {
goto Usage;
}
- fprintf(fout, "LIBRARY %s\n", dllname);
- fprintf(fout, "EXETYPE WINDOWS\n");
- fprintf(fout, "CODE PRELOAD MOVEABLE DISCARDABLE\n");
- fprintf(fout, "DATA PRELOAD MOVEABLE MULTIPLE\n\n");
fprintf(fout, "EXPORTS\n");
}