msvcrt: Fixed space in type with double indirection.

Spotted by James Hawkins.
This commit is contained in:
Eric Pouech 2008-04-28 21:18:32 +02:00 committed by Alexandre Julliard
parent 2e1775620a
commit f55da6db84
2 changed files with 7 additions and 7 deletions

View File

@ -984,7 +984,7 @@ static void test_demangle(void)
{"?$AAA@$DBAB@", "AAA<`template-parameter257'>"},
{"?$AAA@?C@", "AAA<`template-parameter-2'>"},
{"?$AAA@PAUBBB@@", "AAA<struct BBB *>"},
{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa **,class ee *)"},
{"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", "private: static class bar * __stdcall foo::bb::bar::ccccc<class aaa *>(class bar *,class ee *,unsigned int,class aaa * *,class ee *)"},
{"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"},
{"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"},
{"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"},

View File

@ -410,7 +410,7 @@ static BOOL get_modifier(char ch, const char** ret)
}
static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
struct array *pmt_ref, char modif)
struct array *pmt_ref, char modif, BOOL in_args)
{
const char* modifier;
const char* str_modif;
@ -465,7 +465,7 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
else
{
/* don't insert a space between duplicate '*' */
if (str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*')
if (!in_args && str_modif[0] && str_modif[1] == '*' && sub_ct.left[strlen(sub_ct.left)-1] == '*')
str_modif++;
ct->left = str_printf(sym, "%s%s", sub_ct.left, str_modif );
}
@ -793,17 +793,17 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
}
else
{
if (!get_modified_type(ct, sym, pmt_ref, '?')) goto done;
if (!get_modified_type(ct, sym, pmt_ref, '?', in_args)) goto done;
}
break;
case 'A': /* reference */
case 'B': /* volatile reference */
if (!get_modified_type(ct, sym, pmt_ref, dt)) goto done;
if (!get_modified_type(ct, sym, pmt_ref, dt, in_args)) goto done;
break;
case 'Q': /* const pointer */
case 'R': /* volatile pointer */
case 'S': /* const volatile pointer */
if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P')) goto done;
if (!get_modified_type(ct, sym, pmt_ref, in_args ? dt : 'P', in_args)) goto done;
break;
case 'P': /* Pointer */
if (isdigit(*sym->current))
@ -833,7 +833,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
}
else goto done;
}
else if (!get_modified_type(ct, sym, pmt_ref, 'P')) goto done;
else if (!get_modified_type(ct, sym, pmt_ref, 'P', in_args)) goto done;
break;
case 'W':
if (*sym->current == '4')