Eric Pouech : dbghelp: Get rid of temporary module_get_type_by_nameA.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 22 05:56:46 CST 2007
Module: wine
Branch: master
Commit: 180127dd94e38cc7b7bd77ed13c67998d98a9aa0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=180127dd94e38cc7b7bd77ed13c67998d98a9aa0
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Wed Feb 21 21:55:51 2007 +0100
dbghelp: Get rid of temporary module_get_type_by_nameA.
---
dlls/dbghelp/dbghelp_private.h | 2 -
dlls/dbghelp/module.c | 43 ----------------------------------------
2 files changed, 0 insertions(+), 45 deletions(-)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index c17c8d3..e4bc029 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -456,8 +456,6 @@ extern struct module*
const struct module* inner);
extern enum module_type
module_get_type_by_name(const WCHAR* name);
-extern enum module_type
- module_get_type_by_nameA(const char* name);
extern void module_reset_debug_info(struct module* module);
extern BOOL module_remove(struct process* pcs,
struct module* module);
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 56fff82..da621d9 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -403,36 +403,6 @@ enum module_type module_get_type_by_name(const WCHAR* name)
return DMT_PE;
}
-/******************************************************************
- * module_get_type_by_nameA
- *
- * Guesses a filename type from its extension
- */
-enum module_type module_get_type_by_nameA(const char* name)
-{
- const char* ptr;
- int len = strlen(name);
-
- /* check for terminating .so or .so.[digit] */
- ptr = strrchr(name, '.');
- if (ptr)
- {
- if (!strcmp(ptr, ".so") ||
- (isdigit(ptr[1]) && !ptr[2] && ptr >= name + 3 && !memcmp(ptr - 3, ".so", 3)))
- return DMT_ELF;
- else if (!strcasecmp(ptr, ".pdb"))
- return DMT_PDB;
- }
- /* wine-[kp]thread is also an ELF module */
- else if (((len > 12 && name[len - 13] == '/') || len == 12) &&
- (!strcasecmp(name + len - 12, "wine-pthread") ||
- !strcasecmp(name + len - 12, "wine-kthread")))
- {
- return DMT_ELF;
- }
- return DMT_PE;
-}
-
/***********************************************************************
* SymLoadModule (DBGHELP.@)
*/
@@ -489,8 +459,6 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
{
struct process* pcs;
struct module* module = NULL;
- char ImageName[MAX_PATH], amodname[MAX_PATH], *ModuleName;
-
TRACE("(%p %p %s %s %s %08x %p %08x)\n",
hProcess, hFile, debugstr_w(wImageName), debugstr_w(wModuleName),
@@ -505,8 +473,6 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
if (Flags & SLMFLAG_VIRTUAL)
{
- WideCharToMultiByte(CP_ACP,0, wImageName, -1, ImageName, MAX_PATH,
- NULL, NULL);
module = module_new(pcs, wImageName, module_get_type_by_name(wImageName),
TRUE, (DWORD)BaseOfDll, SizeOfDll, 0, 0);
if (!module) return FALSE;
@@ -524,15 +490,6 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
/* this is a Wine extension to the API just to redo the synchronisation */
if (!wImageName && !hFile) return 0;
- WideCharToMultiByte(CP_ACP,0, wImageName, -1, ImageName, MAX_PATH,
- NULL, NULL);
-
- if (wModuleName)
- WideCharToMultiByte(CP_ACP,0, wModuleName, -1, ModuleName = amodname, MAX_PATH,
- NULL, NULL);
- else
- ModuleName = NULL;
-
if (module_is_elf_container_loaded(pcs, wImageName, wModuleName))
{
/* force the loading of DLL as builtin */
More information about the wine-cvs
mailing list