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
cff332fb
Commit
cff332fb
authored
Apr 08, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Add support for Unicode accelerator strings.
parent
18828f41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
parser.y
tools/wrc/parser.y
+22
-3
No files found.
tools/wrc/parser.y
View file @
cff332fb
...
...
@@ -2279,9 +2279,8 @@ static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev
int
keycode
=
0;
event_t
*ev
=
new_event();
if(key->type
!=
str_char)
yyerror("Key
code
must
be
an
ascii
string");
if(key->type
==
str_char)
{
if((flags
&
WRC_AF_VIRTKEY)
&&
(!isupper(key->str.cstr[0]
&
0xff)
&&
!isdigit(key->str.cstr[0]
&
0xff)))
yyerror("VIRTKEY
code
is
not
equal
to
ascii
value");
...
...
@@ -2297,6 +2296,26 @@ static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev
}
else
keycode
=
key-
>
str
.cstr
[
0
];
}
else
{
if((flags
&
WRC_AF_VIRTKEY)
&&
!isupperW(key->str.wstr[0])
&&
!isdigitW(key->str.wstr[0]))
yyerror("VIRTKEY
code
is
not
equal
to
ascii
value");
if(key->str.wstr[0]
==
'^'
&&
(flags
&
WRC_AF_CONTROL)
!=
0)
{
yyerror("Cannot
use
both
'^'
and
CONTROL
modifier");
}
else
if
(
key-
>
str
.wstr
[
0
]
==
'^'
)
{
keycode
=
toupperW(key->str.wstr[1])
-
'@';
if(keycode
>=
'
')
yyerror("Control-code
out
of
range");
}
else
keycode
=
key-
>
str
.wstr
[
0
];
}
ev-
>
key
=
keycode
;
ev-
>
id
=
id
;
ev-
>
flags
=
flags
&
~
WRC_AF_ASCII
;
...
...
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