Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
56b973cd
Commit
56b973cd
authored
Nov 21, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Rename modifier into qualifier.
That's how they are defined in C/C++ standard. Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
parent
854eb999
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
53 deletions
+53
-53
undname.c
dlls/msvcrt/undname.c
+53
-53
No files found.
dlls/msvcrt/undname.c
View file @
56b973cd
...
...
@@ -33,8 +33,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
* - back-port this new code into tools/winedump/msmangle.c
*/
/* How data types
mod
ifiers are stored:
* M (in the following definitions) is defined for
/* How data types
qual
ifiers are stored:
* M (in the following definitions) is defined for
* 'A', 'B', 'C' and 'D' as follows
* {<A>}: ""
* {<B>}: "const "
...
...
@@ -407,7 +407,7 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t
return
args_str
;
}
static
void
append_extended_
mod
ifier
(
struct
parsed_symbol
*
sym
,
const
char
**
where
,
const
char
*
str
)
static
void
append_extended_
qual
ifier
(
struct
parsed_symbol
*
sym
,
const
char
**
where
,
const
char
*
str
)
{
if
(
!
(
sym
->
flags
&
UNDNAME_NO_MS_KEYWORDS
))
{
...
...
@@ -417,7 +417,7 @@ static void append_extended_modifier(struct parsed_symbol *sym, const char **whe
}
}
static
void
get_extended_
mod
ifier
(
struct
parsed_symbol
*
sym
,
struct
datatype_t
*
xdt
)
static
void
get_extended_
qual
ifier
(
struct
parsed_symbol
*
sym
,
struct
datatype_t
*
xdt
)
{
xdt
->
left
=
xdt
->
right
=
NULL
;
xdt
->
flags
=
0
;
...
...
@@ -425,9 +425,9 @@ static void get_extended_modifier(struct parsed_symbol *sym, struct datatype_t *
{
switch
(
*
sym
->
current
)
{
case
'E'
:
append_extended_
mod
ifier
(
sym
,
&
xdt
->
right
,
"__ptr64"
);
break
;
case
'F'
:
append_extended_
mod
ifier
(
sym
,
&
xdt
->
left
,
"__unaligned"
);
break
;
case
'I'
:
append_extended_
mod
ifier
(
sym
,
&
xdt
->
right
,
"__restrict"
);
break
;
case
'E'
:
append_extended_
qual
ifier
(
sym
,
&
xdt
->
right
,
"__ptr64"
);
break
;
case
'F'
:
append_extended_
qual
ifier
(
sym
,
&
xdt
->
left
,
"__unaligned"
);
break
;
case
'I'
:
append_extended_
qual
ifier
(
sym
,
&
xdt
->
right
,
"__restrict"
);
break
;
default:
return
;
}
sym
->
current
++
;
...
...
@@ -435,29 +435,29 @@ static void get_extended_modifier(struct parsed_symbol *sym, struct datatype_t *
}
/******************************************************************
* get_
mod
ifier
* Parses the type
mod
ifier. Always returns static strings.
* get_
qual
ifier
* Parses the type
qual
ifier. Always returns static strings.
*/
static
BOOL
get_
mod
ifier
(
struct
parsed_symbol
*
sym
,
struct
datatype_t
*
xdt
,
const
char
**
pclass
)
static
BOOL
get_
qual
ifier
(
struct
parsed_symbol
*
sym
,
struct
datatype_t
*
xdt
,
const
char
**
pclass
)
{
char
ch
;
const
char
*
mod
;
const
char
*
qualif
;
get_extended_
mod
ifier
(
sym
,
xdt
);
get_extended_
qual
ifier
(
sym
,
xdt
);
switch
(
ch
=
*
sym
->
current
++
)
{
case
'A'
:
mod
=
NULL
;
break
;
case
'B'
:
mod
=
"const"
;
break
;
case
'C'
:
mod
=
"volatile"
;
break
;
case
'D'
:
mod
=
"const volatile"
;
break
;
case
'Q'
:
mod
=
NULL
;
break
;
case
'R'
:
mod
=
"const"
;
break
;
case
'S'
:
mod
=
"volatile"
;
break
;
case
'T'
:
mod
=
"const volatile"
;
break
;
case
'A'
:
qualif
=
NULL
;
break
;
case
'B'
:
qualif
=
"const"
;
break
;
case
'C'
:
qualif
=
"volatile"
;
break
;
case
'D'
:
qualif
=
"const volatile"
;
break
;
case
'Q'
:
qualif
=
NULL
;
break
;
case
'R'
:
qualif
=
"const"
;
break
;
case
'S'
:
qualif
=
"volatile"
;
break
;
case
'T'
:
qualif
=
"const volatile"
;
break
;
default:
return
FALSE
;
}
if
(
mod
)
xdt
->
left
=
xdt
->
left
?
str_printf
(
sym
,
"%s %s"
,
mod
,
xdt
->
left
)
:
mod
;
if
(
qualif
)
xdt
->
left
=
xdt
->
left
?
str_printf
(
sym
,
"%s %s"
,
qualif
,
xdt
->
left
)
:
qualif
;
if
(
ch
>=
'Q'
&&
ch
<=
'T'
)
/* pointer to member, fetch class */
{
const
char
*
class
=
get_class_name
(
sym
);
...
...
@@ -473,48 +473,48 @@ static BOOL get_modifier(struct parsed_symbol *sym, struct datatype_t *xdt, cons
return
TRUE
;
}
static
BOOL
get_
mod
ified_type
(
struct
datatype_t
*
ct
,
struct
parsed_symbol
*
sym
,
struct
array
*
pmt_ref
,
char
mod
if
,
enum
datatype_flags
flags
)
static
BOOL
get_
qual
ified_type
(
struct
datatype_t
*
ct
,
struct
parsed_symbol
*
sym
,
struct
array
*
pmt_ref
,
char
qual
if
,
enum
datatype_flags
flags
)
{
struct
datatype_t
xdt1
;
struct
datatype_t
xdt2
;
const
char
*
ref
;
const
char
*
str_
mod
if
;
const
char
*
str_
qual
if
;
const
char
*
class
;
get_extended_
mod
ifier
(
sym
,
&
xdt1
);
get_extended_
qual
ifier
(
sym
,
&
xdt1
);
switch
(
mod
if
)
switch
(
qual
if
)
{
case
'A'
:
ref
=
" &"
;
str_
mod
if
=
NULL
;
break
;
case
'B'
:
ref
=
" &"
;
str_
mod
if
=
" volatile"
;
break
;
case
'P'
:
ref
=
" *"
;
str_
mod
if
=
NULL
;
break
;
case
'Q'
:
ref
=
" *"
;
str_
mod
if
=
" const"
;
break
;
case
'R'
:
ref
=
" *"
;
str_
mod
if
=
" volatile"
;
break
;
case
'S'
:
ref
=
" *"
;
str_
mod
if
=
" const volatile"
;
break
;
case
'?'
:
ref
=
NULL
;
str_
mod
if
=
NULL
;
break
;
case
'$'
:
ref
=
" &&"
;
str_
mod
if
=
NULL
;
break
;
case
'A'
:
ref
=
" &"
;
str_
qual
if
=
NULL
;
break
;
case
'B'
:
ref
=
" &"
;
str_
qual
if
=
" volatile"
;
break
;
case
'P'
:
ref
=
" *"
;
str_
qual
if
=
NULL
;
break
;
case
'Q'
:
ref
=
" *"
;
str_
qual
if
=
" const"
;
break
;
case
'R'
:
ref
=
" *"
;
str_
qual
if
=
" volatile"
;
break
;
case
'S'
:
ref
=
" *"
;
str_
qual
if
=
" const volatile"
;
break
;
case
'?'
:
ref
=
NULL
;
str_
qual
if
=
NULL
;
break
;
case
'$'
:
ref
=
" &&"
;
str_
qual
if
=
NULL
;
break
;
default:
return
FALSE
;
}
ct
->
right
=
NULL
;
ct
->
flags
=
0
;
if
(
get_
mod
ifier
(
sym
,
&
xdt2
,
&
class
))
if
(
get_
qual
ifier
(
sym
,
&
xdt2
,
&
class
))
{
unsigned
mark
=
sym
->
stack
.
num
;
struct
datatype_t
sub_ct
;
if
(
ref
||
str_
mod
if
||
xdt1
.
left
||
xdt1
.
right
)
if
(
ref
||
str_
qual
if
||
xdt1
.
left
||
xdt1
.
right
)
{
if
(
class
)
ct
->
left
=
str_printf
(
sym
,
"%s%s%s%s::%s%s%s"
,
xdt1
.
left
?
" "
:
NULL
,
xdt1
.
left
,
class
?
" "
:
NULL
,
class
,
ref
?
ref
+
1
:
NULL
,
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
mod
if
);
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
qual
if
);
else
ct
->
left
=
str_printf
(
sym
,
"%s%s%s%s%s%s"
,
xdt1
.
left
?
" "
:
NULL
,
xdt1
.
left
,
ref
,
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
mod
if
);
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
qual
if
);
}
else
ct
->
left
=
NULL
;
...
...
@@ -543,14 +543,14 @@ static BOOL get_modified_type(struct datatype_t *ct, struct parsed_symbol* sym,
ct
->
left
++
;
ct
->
left
=
str_printf
(
sym
,
"%s%s%s%s%s"
,
sub_ct
.
left
,
xdt2
.
left
?
" "
:
NULL
,
xdt2
.
left
,
ct
->
left
,
((
xdt2
.
left
||
str_
mod
if
)
&&
(
flags
&
WS_AFTER_QUAL_IF
))
?
" "
:
NULL
);
((
xdt2
.
left
||
str_
qual
if
)
&&
(
flags
&
WS_AFTER_QUAL_IF
))
?
" "
:
NULL
);
if
(
sub_ct
.
right
)
ct
->
right
=
str_printf
(
sym
,
"%s%s"
,
ct
->
right
,
sub_ct
.
right
);
sym
->
stack
.
num
=
mark
;
}
else
if
(
ref
||
str_
mod
if
||
xdt1
.
left
||
xdt1
.
right
)
else
if
(
ref
||
str_
qual
if
||
xdt1
.
left
||
xdt1
.
right
)
ct
->
left
=
str_printf
(
sym
,
"%s%s%s%s%s%s"
,
xdt1
.
left
?
" "
:
NULL
,
xdt1
.
left
,
ref
,
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
mod
if
);
xdt1
.
right
?
" "
:
NULL
,
xdt1
.
right
,
str_
qual
if
);
else
ct
->
left
=
NULL
;
return
TRUE
;
...
...
@@ -926,17 +926,17 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
}
else
{
if
(
!
get_
mod
ified_type
(
ct
,
sym
,
pmt_ref
,
'?'
,
flags
))
goto
done
;
if
(
!
get_
qual
ified_type
(
ct
,
sym
,
pmt_ref
,
'?'
,
flags
))
goto
done
;
}
break
;
case
'A'
:
/* reference */
case
'B'
:
/* volatile reference */
if
(
!
get_
mod
ified_type
(
ct
,
sym
,
pmt_ref
,
dt
,
flags
))
goto
done
;
if
(
!
get_
qual
ified_type
(
ct
,
sym
,
pmt_ref
,
dt
,
flags
))
goto
done
;
break
;
case
'Q'
:
/* const pointer */
case
'R'
:
/* volatile pointer */
case
'S'
:
/* const volatile pointer */
if
(
!
get_
mod
ified_type
(
ct
,
sym
,
pmt_ref
,
(
flags
&
IN_ARGS
)
?
dt
:
'P'
,
flags
))
goto
done
;
if
(
!
get_
qual
ified_type
(
ct
,
sym
,
pmt_ref
,
(
flags
&
IN_ARGS
)
?
dt
:
'P'
,
flags
))
goto
done
;
break
;
case
'P'
:
/* Pointer */
if
(
isdigit
(
*
sym
->
current
))
...
...
@@ -955,7 +955,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
if
(
!
(
class
=
get_class_name
(
sym
)))
goto
done
;
if
(
!
get_
mod
ifier
(
sym
,
&
xdt
,
NULL
))
if
(
!
get_
qual
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
!
get_function_signature
(
sym
,
pmt_ref
,
&
fs
))
goto
done
;
...
...
@@ -984,7 +984,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
}
else
goto
done
;
}
else
if
(
!
get_
mod
ified_type
(
ct
,
sym
,
pmt_ref
,
'P'
,
flags
))
goto
done
;
else
if
(
!
get_
qual
ified_type
(
ct
,
sym
,
pmt_ref
,
'P'
,
flags
))
goto
done
;
break
;
case
'W'
:
if
(
*
sym
->
current
==
'4'
)
...
...
@@ -1101,14 +1101,14 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
struct
datatype_t
xdt
;
sym
->
current
++
;
if
(
!
get_
mod
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
!
get_
qual
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
!
demangle_datatype
(
sym
,
ct
,
pmt_ref
,
flags
))
goto
done
;
ct
->
left
=
str_printf
(
sym
,
"%s %s"
,
ct
->
left
,
xdt
.
left
);
}
else
if
(
*
sym
->
current
==
'Q'
)
{
sym
->
current
++
;
if
(
!
get_
mod
ified_type
(
ct
,
sym
,
pmt_ref
,
'$'
,
flags
))
goto
done
;
if
(
!
get_
qual
ified_type
(
ct
,
sym
,
pmt_ref
,
'$'
,
flags
))
goto
done
;
}
break
;
}
...
...
@@ -1184,7 +1184,7 @@ static BOOL handle_data(struct parsed_symbol* sym)
str_array_init
(
&
pmt
);
if
(
!
demangle_datatype
(
sym
,
&
ct
,
&
pmt
,
0
))
goto
done
;
if
(
!
get_
mod
ifier
(
sym
,
&
xdt
,
&
class
))
goto
done
;
/* class doesn't seem to be displayed */
if
(
!
get_
qual
ifier
(
sym
,
&
xdt
,
&
class
))
goto
done
;
/* class doesn't seem to be displayed */
if
(
xdt
.
left
&&
xdt
.
right
)
xdt
.
left
=
str_printf
(
sym
,
"%s %s"
,
xdt
.
left
,
xdt
.
right
);
else
if
(
!
xdt
.
left
)
xdt
.
left
=
xdt
.
right
;
sym
->
stack
.
num
=
mark
;
...
...
@@ -1193,7 +1193,7 @@ static BOOL handle_data(struct parsed_symbol* sym)
case
'6'
:
/* compiler generated static */
case
'7'
:
/* compiler generated static */
ct
.
left
=
ct
.
right
=
NULL
;
if
(
!
get_
mod
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
!
get_
qual
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
*
sym
->
current
!=
'@'
)
{
char
*
cls
=
NULL
;
...
...
@@ -1362,8 +1362,8 @@ static BOOL handle_method(struct parsed_symbol* sym, BOOL cast_op)
(
accmem
<=
'X'
&&
(
accmem
-
'A'
)
%
8
!=
2
&&
(
accmem
-
'A'
)
%
8
!=
3
)))
{
/* Implicit 'this' pointer */
/* If there is an implicit this pointer, const
mod
ifier follows */
if
(
!
get_
mod
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
/* If there is an implicit this pointer, const
qual
ifier follows */
if
(
!
get_
qual
ifier
(
sym
,
&
xdt
,
NULL
))
goto
done
;
if
(
xdt
.
left
||
xdt
.
right
)
xdt
.
left
=
str_printf
(
sym
,
"%s %s"
,
xdt
.
left
,
xdt
.
right
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment