mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 19:31:37 +00:00
[CRT] Sync undname.c with Wine Staging 1.9.16. CORE-11866
svn path=/trunk/; revision=72570
This commit is contained in:
parent
67e98141b8
commit
c15ef5b516
2 changed files with 16 additions and 16 deletions
|
@ -299,7 +299,7 @@ msvcrt -
|
|||
reactos/sdk/lib/crt/string/wcs.c # Synced at 20080611
|
||||
reactos/sdk/lib/crt/string/wctype.c # Synced at WineStaging-1.9.16
|
||||
reactos/sdk/lib/crt/wine/heap.c # Synced at 20080529
|
||||
reactos/sdk/lib/crt/wine/undname.c # Synced to WineStaging-1.7.55
|
||||
reactos/sdk/lib/crt/wine/undname.c # Synced to WineStaging-1.9.16
|
||||
reactos/sdk/lib/crt/process/thread.c # Synced to WineStaging-1.7.55
|
||||
|
||||
User32 -
|
||||
|
|
|
@ -184,7 +184,7 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr, int len,
|
|||
a->alloc *= 2;
|
||||
a->elts = new;
|
||||
}
|
||||
if (len == -1) len = (int)strlen(ptr);
|
||||
if (len == -1) len = strlen(ptr);
|
||||
a->elts[a->num] = und_alloc(sym, len + 1);
|
||||
assert(a->elts[a->num]);
|
||||
memcpy(a->elts[a->num], ptr, len);
|
||||
|
@ -197,10 +197,10 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr, int len,
|
|||
for (i = a->max - 1; i >= 0; i--)
|
||||
{
|
||||
c = '>';
|
||||
if ((unsigned)i < a->start) c = '-';
|
||||
else if ((unsigned)i >= a->num) c = '}';
|
||||
if (i < a->start) c = '-';
|
||||
else if (i >= a->num) c = '}';
|
||||
/* This check is as useless as the unused-but-set gcc warning that we want to silence here */
|
||||
if (c != 0) TRACE("%p\t%d%c %s\n", a, i, c, a->elts[i]);
|
||||
if (c != 0) TRACE("%p\t%d%c %s\n", a, i, c, debugstr_a(a->elts[i]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ static char* str_array_get_ref(struct array* cref, unsigned idx)
|
|||
return NULL;
|
||||
}
|
||||
TRACE("Returning %p[%d] => %s\n",
|
||||
cref, idx, cref->elts[cref->start + idx]);
|
||||
cref, idx, debugstr_a(cref->elts[cref->start + idx]));
|
||||
return cref->elts[cref->start + idx];
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
|
|||
{
|
||||
switch (format[++i])
|
||||
{
|
||||
case 's': t = va_arg(args, char*); if (t) len += (int)strlen(t); break;
|
||||
case 's': t = va_arg(args, char*); if (t) len += strlen(t); break;
|
||||
case 'c': (void)va_arg(args, int); len++; break;
|
||||
default: i--; /* fall through */
|
||||
case '%': len++; break;
|
||||
|
@ -267,7 +267,7 @@ static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
|
|||
t = va_arg(args, char*);
|
||||
if (t)
|
||||
{
|
||||
sz = (int)strlen(t);
|
||||
sz = strlen(t);
|
||||
memcpy(p, t, sz);
|
||||
p += sz;
|
||||
}
|
||||
|
@ -518,12 +518,12 @@ static char* get_literal_string(struct parsed_symbol* sym)
|
|||
(*sym->current >= 'a' && *sym->current <= 'z') ||
|
||||
(*sym->current >= '0' && *sym->current <= '9') ||
|
||||
*sym->current == '_' || *sym->current == '$')) {
|
||||
TRACE("Failed at '%c' in %s\n", *sym->current, ptr);
|
||||
TRACE("Failed at '%c' in %s\n", *sym->current, debugstr_a(ptr));
|
||||
return NULL;
|
||||
}
|
||||
} while (*++sym->current != '@');
|
||||
sym->current++;
|
||||
if (!str_array_push(sym, ptr, (int)(sym->current - 1 - ptr), &sym->names))
|
||||
if (!str_array_push(sym, ptr, sym->current - 1 - ptr, &sym->names))
|
||||
return NULL;
|
||||
|
||||
return str_array_get_ref(&sym->names, sym->names.num - sym->names.start - 1);
|
||||
|
@ -641,15 +641,15 @@ static char* get_class_string(struct parsed_symbol* sym, int start)
|
|||
char* ret;
|
||||
struct array *a = &sym->stack;
|
||||
|
||||
for (len = 0, i = start; i < (int)a->num; i++)
|
||||
for (len = 0, i = start; i < a->num; i++)
|
||||
{
|
||||
assert(a->elts[i]);
|
||||
len += 2 + (int)strlen(a->elts[i]);
|
||||
len += 2 + strlen(a->elts[i]);
|
||||
}
|
||||
if (!(ret = und_alloc(sym, len - 1))) return NULL;
|
||||
for (len = 0, i = a->num - 1; i >= start; i--)
|
||||
{
|
||||
sz = (int)strlen(a->elts[i]);
|
||||
sz = strlen(a->elts[i]);
|
||||
memcpy(ret + len, a->elts[i], sz);
|
||||
len += sz;
|
||||
if (i > start)
|
||||
|
@ -855,7 +855,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
|||
if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P', in_args)) goto done;
|
||||
break;
|
||||
case 'P': /* Pointer */
|
||||
if (isdigit((unsigned char)*sym->current))
|
||||
if (isdigit(*sym->current))
|
||||
{
|
||||
/* FIXME:
|
||||
* P6 = Function pointer
|
||||
|
@ -1572,7 +1572,7 @@ static BOOL symbol_demangle(struct parsed_symbol* sym)
|
|||
else ret = FALSE;
|
||||
done:
|
||||
if (ret) assert(sym->result);
|
||||
else WARN("Failed at %s\n", sym->current);
|
||||
else WARN("Failed at %s\n", debugstr_a(sym->current));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1603,7 +1603,7 @@ char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
|
|||
const char* result;
|
||||
|
||||
TRACE("(%p,%s,%d,%p,%p,%p,%x)\n",
|
||||
buffer, mangled, buflen, memget, memfree, unknown, flags);
|
||||
buffer, debugstr_a(mangled), buflen, memget, memfree, unknown, flags);
|
||||
|
||||
/* The flags details is not documented by MS. However, it looks exactly
|
||||
* like the UNDNAME_ manifest constants from imagehlp.h and dbghelp.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue