Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
fee6076a
Commit
fee6076a
authored
Mar 01, 2008
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Mar 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Convert standard control classes names into ids also for UTF-8 resource files.
parent
088a3372
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
21 deletions
+50
-21
parser.y
tools/wrc/parser.y
+50
-21
No files found.
tools/wrc/parser.y
View file @
fee6076a
...
@@ -2079,34 +2079,63 @@ byebye:
...
@@ -2079,34 +2079,63 @@ byebye:
return
ctrl
;
return
ctrl
;
}
}
static
int
get_class_idW
(
const
WCHAR
*
cc
)
{
static
const
WCHAR
szBUTTON[]
=
{'B','U','T','T','O','N',0
}
;
static
const
WCHAR
szCOMBOBOX
[]
=
{
'C','O','M','B','O','B','O','X',0
}
;
static
const
WCHAR
szLISTBOX
[]
=
{
'L','I','S','T','B','O','X',0
}
;
static
const
WCHAR
szEDIT
[]
=
{
'E','D','I','T',0
}
;
static
const
WCHAR
szSTATIC
[]
=
{
'S','T','A','T','I','C',0
}
;
static
const
WCHAR
szSCROLLBAR
[]
=
{
'S','C','R','O','L','L','B','A','R',0
}
;
if
(!
strcmpiW
(
szBUTTON
,
cc
))
return
CT_BUTTON
;
if
(!
strcmpiW
(
szCOMBOBOX
,
cc
))
return
CT_COMBOBOX
;
if
(!
strcmpiW
(
szLISTBOX
,
cc
))
return
CT_LISTBOX
;
if
(!
strcmpiW
(
szEDIT
,
cc
))
return
CT_EDIT
;
if
(!
strcmpiW
(
szSTATIC
,
cc
))
return
CT_STATIC
;
if
(!
strcmpiW
(
szSCROLLBAR
,
cc
))
return
CT_SCROLLBAR
;
return
-1
;
}
static
int
get_class_idA
(
const
char
*
cc
)
{
if(!strcasecmp("BUTTON",
cc))
return
CT_BUTTON;
if(!strcasecmp("COMBOBOX",
cc))
return
CT_COMBOBOX;
if(!strcasecmp("LISTBOX",
cc))
return
CT_LISTBOX;
if(!strcasecmp("EDIT",
cc))
return
CT_EDIT;
if(!strcasecmp("STATIC",
cc))
return
CT_STATIC;
if(!strcasecmp("SCROLLBAR",
cc))
return
CT_SCROLLBAR;
return
-1;
}
static
name_id_t
*
convert_ctlclass
(
name_id_t
*
cls
)
static
name_id_t
*
convert_ctlclass
(
name_id_t
*
cls
)
{
{
char
*cc
=
NULL;
int
iclass;
int
iclass;
if(cls->type
==
name_ord)
if(cls->type
==
name_ord)
return
cls;
return
cls;
assert(cls->type
==
name_str);
assert(cls->type
==
name_str);
if(cls->type
==
str_unicode)
if(cls->name.s_name->type
==
str_unicode)
{
iclass
=
get_class_idW(cls->name.s_name->str.wstr);
yyerror("Don't
yet
support
unicode
class
comparison");
else
}
iclass
=
get_class_idA(cls->name.s_name->str.cstr);
else
cc
=
cls-
>
name
.s_name-
>
str
.cstr
;
if
(iclass
==
-1)
if
(!
strcasecmp
(
"BUTTON"
,
cc
))
iclass
=
CT_BUTTON
;
else
if
(!
strcasecmp
(
"COMBOBOX"
,
cc
))
iclass
=
CT_COMBOBOX
;
else
if
(!
strcasecmp
(
"LISTBOX"
,
cc
))
iclass
=
CT_LISTBOX
;
else
if
(!
strcasecmp
(
"EDIT"
,
cc
))
iclass
=
CT_EDIT
;
else
if
(!
strcasecmp
(
"STATIC"
,
cc
))
iclass
=
CT_STATIC
;
else
if
(!
strcasecmp
(
"SCROLLBAR"
,
cc
))
iclass
=
CT_SCROLLBAR
;
else
return
cls;
/* No default, return user controlclass */
return
cls;
/* No default, return user controlclass */
free(cls->name.s_name->str.cstr);
free(cls->name.s_name->str.cstr);
...
...
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