Commit 98f94544 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Implemented __unDName and __unDNameEx functions.

parent d1e44d07
......@@ -32,6 +32,7 @@ C_SRCS = \
string.c \
thread.c \
time.c \
undname.c \
wcs.c
SUBDIRS = tests
......
......@@ -118,63 +118,3 @@ void MSVCRT_I10_OUTPUT(void)
{
/* FIXME: This is probably data, not a function */
}
/*********************************************************************
* __unDNameEx (MSVCRT.@)
*
* Demangle a C++ identifier.
*
* PARAMS
* OutStr [O] If not NULL, the place to put the demangled string
* mangled [I] Mangled name of the function
* OutStrLen[I] Length of OutStr
* memget [I] Function to allocate memory with
* memfree [I] Function to free memory with
* unknown [?] Unknown, possibly a call back
* flags [I] Flags determining demangled format
*
* RETURNS
* Success: A string pointing to the unmangled name, allocated with memget.
* Failure: NULL.
*/
char* __unDNameEx(char * OutStr, const char* mangled, int OutStrLen,
malloc_func_t memget, free_func_t memfree,
void * unknown, unsigned short int flags)
{
FIXME("(%p,%s,%d,%p,%p,%p,%x) stub!\n",
OutStr, mangled, OutStrLen, memget, memfree, unknown, flags);
/* FIXME: The code in tools/winebuild/msmangle.c is pretty complete and
* could be used here.
*/
/* Experimentation reveals the following flag meanings when set:
* 0x0001 - Don't show __ in calling convention
* 0x0002 - Don't show calling convention at all
* 0x0004 - Don't show function/method return value
* 0x0010 - Same as 0x1
* 0x0080 - Don't show access specifier (public/protected/private)
* 0x0200 - Don't show static specifier
* 0x0800 - Unknown, passed by type_info::name()
* 0x1000 - Only report the variable/class name
* 0x2000 - Unknown, passed by type_info::name()
*/
/* Duplicate the mangled name; for comparisons it doesn't matter anyway */
if( OutStr == NULL) {
OutStrLen = strlen(mangled) + 1;
OutStr = memget( OutStrLen);
}
strncpy( OutStr, mangled, OutStrLen);
return OutStr;
}
/*********************************************************************
* __unDName (MSVCRT.@)
*/
char* __unDName(char * OutStr, const char* mangled, int OutStrLen,
malloc_func_t memget, free_func_t memfree,
unsigned short int flags)
{
return __unDNameEx( OutStr, mangled, OutStrLen, memget, memfree, 0, flags);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment