Module: wine Branch: master Commit: f55da6db848e27472cd4d0ade1c61c171e7866cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=f55da6db848e27472cd4d0ade1...
Author: Eric Pouech eric.pouech@orange.fr Date: Mon Apr 28 21:18:32 2008 +0200
msvcrt: Fixed space in type with double indirection.
Spotted by James Hawkins.
---
dlls/msvcrt/tests/cpp.c | 2 +- dlls/msvcrt/undname.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 2b815b7..ef80cac 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -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])"}, diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 9bc0970..1d9fae7 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -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')