summaryrefslogtreecommitdiffstats
path: root/win/winDumpExts.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-02-02 22:32:17 (GMT)
committerstanton <stanton>1999-02-02 22:32:17 (GMT)
commit8ee185f04ef85e7d1406f6c73d04f2a01658c2ca (patch)
treeb9756bf2f3503d578b48806479ac115ef1ab1ef8 /win/winDumpExts.c
parented912f84b4997a7189cea10f63ea22c419c9fff0 (diff)
downloadtcl-8ee185f04ef85e7d1406f6c73d04f2a01658c2ca.zip
tcl-8ee185f04ef85e7d1406f6c73d04f2a01658c2ca.tar.gz
tcl-8ee185f04ef85e7d1406f6c73d04f2a01658c2ca.tar.bz2
* win/winDumpExts.c: Patched to be picker about stripping
@'s. [Bug: 920]
Diffstat (limited to 'win/winDumpExts.c')
-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");
}