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
afe3b0cd
Commit
afe3b0cd
authored
Sep 29, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
Sep 29, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Adapted to changes in Wine.
- Minor improvements.
parent
d6d994f1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
203 deletions
+57
-203
parser.pm
tools/winapi_check/parser.pm
+0
-184
win16api.dat
tools/winapi_check/win16api.dat
+2
-0
win32api.dat
tools/winapi_check/win32api.dat
+5
-0
winapi.pm
tools/winapi_check/winapi.pm
+2
-1
winapi_check
tools/winapi_check/winapi_check
+25
-10
winapi_options.pm
tools/winapi_check/winapi_options.pm
+11
-7
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+12
-1
No files found.
tools/winapi_check/parser.pm
deleted
100644 → 0
View file @
d6d994f1
package
parser
;
BEGIN
{
use
Exporter
();
use
vars
qw(@ISA @EXPORT)
;
@ISA
=
qw(Exporter)
;
@EXPORT
=
qw(&init
&transact &commit &rollback &token
&dump_state
&either &filter &many &many1 &separate &separate1 &sequence)
;
}
my
@stack
;
my
$current
;
my
$next
;
sub
init
{
@stack
=
();
$current
=
[]
;
$next
=
shift
;
@$next
=
grep
{
$_
->
{
type
}
!~
/^comment|preprocessor$/
;
}
@$next
;
}
sub
dump_state
{
print
"stack: [\n"
;
for
my
$tokens
(
@stack
)
{
print
" [\n"
;
for
my
$token
(
@$tokens
)
{
print
" "
.
$token
->
{
type
}
.
": "
.
$token
->
{
data
}
.
"\n"
;
}
print
" ]\n"
;
}
print
"]\n"
;
print
"current: [\n"
;
for
my
$token
(
@$current
)
{
print
" "
.
$token
->
{
type
}
.
": "
.
$token
->
{
data
}
.
"\n"
;
}
print
"]\n"
;
print
"next: [\n"
;
for
my
$token
(
@$next
)
{
print
" "
.
$token
->
{
type
}
.
": "
.
$token
->
{
data
}
.
"\n"
;
}
print
"]\n"
;
}
sub
token
{
my
$token
=
shift
@$next
;
push
@$current
,
$token
;
return
$token
;
};
sub
transact
{
push
@stack
,
$current
;
$current
=
[]
;
}
sub
commit
{
my
$oldcurrent
=
$current
;
$current
=
pop
@stack
;
push
@$current
,
@$oldcurrent
;
}
sub
rollback
{
unshift
@$next
,
@$current
;
$current
=
pop
@stack
;
}
sub
filter
{
my
$parser
=
shift
;
my
$filter
=
shift
;
transact
;
my
$r1
=
&
$parser
;
if
(
defined
(
$r1
))
{
my
$r2
=
&
$filter
(
$r1
);
if
(
$r2
)
{
commit
;
return
$r1
;
}
else
{
rollback
;
return
undef
;
}
}
else
{
rollback
;
return
undef
;
}
}
sub
either
{
for
my
$parser
(
@_
)
{
transact
;
my
$r
=
&
$parser
;
if
(
defined
(
$r
))
{
commit
;
return
$r
;
}
else
{
rollback
;
}
}
return
undef
;
}
sub
sequence
{
transact
;
my
$rs
=
[]
;
for
my
$parser
(
@_
)
{
my
$r
=
&
$parser
;
if
(
defined
(
$r
))
{
push
@$rs
,
$r
;
}
else
{
rollback
;
return
undef
;
}
}
commit
;
return
$rs
;
}
sub
separate
{
my
$parser
=
shift
;
my
$separator
=
shift
;
my
$rs
=
[]
;
while
(
1
)
{
my
$r
=
&
$parser
;
if
(
defined
(
$r
))
{
push
@$rs
,
$r
;
}
else
{
last
;
}
my
$s
=
&
$separator
;
if
(
!
defined
(
$r
))
{
last
;
}
}
return
$rs
;
}
sub
separate1
{
my
$parser
=
shift
;
my
$separator
=
shift
;
transact
;
my
$rs
=
separate
(
$parser
,
$separator
);
if
(
$#$rs
!=
-
1
)
{
commit
;
return
$rs
;
}
else
{
rollback
;
return
undef
;
}
}
sub
many
{
my
$parser
=
shift
;
my
$rs
=
[]
;
while
(
1
)
{
my
$r
=
&
$parser
;
if
(
defined
(
$r
))
{
push
@$rs
,
$r
;
}
else
{
last
;
}
}
return
$rs
;
}
sub
many1
{
my
$parser
=
shift
;
transact
;
my
$rs
=
many
(
$parser
);
if
(
$#$rs
!=
-
1
)
{
commit
;
return
$rs
;
}
else
{
rollback
;
return
undef
;
}
}
1
;
tools/winapi_check/win16api.dat
View file @
afe3b0cd
...
...
@@ -123,6 +123,7 @@ LPICONINFO16
LPINT16
LPJOYCAPS16
LPJOYINFO16
LPJOYINFOEX
LPKERNINGPAIR16
LPLOGFONT16
LPMALLOC16 *
...
...
@@ -172,6 +173,7 @@ LPVOID
LPVOID *
LPWAVEFILTER
LPWAVEFORMATEX
LPWAVEHDR
LPWAVEINCAPS16
LPWAVEOUTCAPS16
LPWIN32SINFO
...
...
tools/winapi_check/win32api.dat
View file @
afe3b0cd
...
...
@@ -341,6 +341,8 @@ LPDIRECTPLAYLOBBYA *
LPDIRECTSOUND *
LPDISCDLGSTRUCTA
LPDISCDLGSTRUCTW
LPDISPLAY_DEVICEA
LPDISPLAY_DEVICEW
LPDPENUMDPCALLBACKA
LPDPENUMDPCALLBACKW
LPDRAWITEMSTRUCT
...
...
@@ -547,6 +549,7 @@ LPVARSTRING
LPVOID
LPVOID *
LPWAVEFORMATEX
LPWAVEHDR
LPWAVEINCAPSA
LPWAVEINCAPSW
LPWAVEOUTCAPSA
...
...
@@ -641,6 +644,8 @@ PLUID
PNOTIFYICONDATAA
POBJECT_ATTRIBUTES
POINT *
PPOLYTEXTA
PPOLYTEXTW
PPRIVILEGE_SET
PREAD_PROCESS_MEMORY_ROUTINE
PRTL_HEAP_DEFINITION
...
...
tools/winapi_check/winapi.pm
View file @
afe3b0cd
...
...
@@ -84,10 +84,11 @@ sub read_spec_files {
my
$proto
=
shift
;
my
$class
=
ref
(
$proto
)
||
$proto
;
my
$path
=
shift
;
my
$win16api
=
shift
;
my
$win32api
=
shift
;
foreach
my
$file
(
split
(
/\n/
,
`find
.
-name \\*.spec`
))
{
foreach
my
$file
(
split
(
/\n/
,
`find
$path
-name \\*.spec`
))
{
my
$type
=
'winapi'
->
get_spec_file_type
(
$file
);
if
(
$type
eq
"win16"
)
{
$win16api
->
parse_spec_file
(
$file
);
...
...
tools/winapi_check/winapi_check
View file @
afe3b0cd
...
...
@@ -4,13 +4,28 @@
use
strict
;
my
$wine_dir
;
my
$winapi_check_dir
;
BEGIN
{
require
"tools/winapi_check/winapi.pm"
;
require
"tools/winapi_check/nativeapi.pm"
;
require
"tools/winapi_check/winapi_local.pm"
;
require
"tools/winapi_check/winapi_global.pm"
;
require
"tools/winapi_check/winapi_options.pm"
;
require
"tools/winapi_check/winapi_parser.pm"
;
if
(
$0
=~
/^((.*?)\/?tools\/winapi_check)\/winapi_check$/
)
{
$winapi_check_dir
=
$1
;
if
(
$2
ne
""
)
{
$wine_dir
=
$2
;
}
else
{
$wine_dir
=
"."
;
}
}
@INC
=
(
$winapi_check_dir
);
require
"winapi.pm"
;
require
"nativeapi.pm"
;
require
"winapi_local.pm"
;
require
"winapi_global.pm"
;
require
"winapi_options.pm"
;
require
"winapi_parser.pm"
;
import
winapi
;
import
nativeapi
;
...
...
@@ -26,11 +41,11 @@ if($options->help) {
exit
;
}
my
$win16api
=
'winapi'
->
new
(
"win16"
,
"
tools/winapi_check
/win16api.dat"
);
my
$win32api
=
'winapi'
->
new
(
"win32"
,
"
tools/winapi_check
/win32api.dat"
);
'winapi'
->
read_spec_files
(
$win16api
,
$win32api
);
my
$win16api
=
'winapi'
->
new
(
"win16"
,
"
$winapi_check_dir
/win16api.dat"
);
my
$win32api
=
'winapi'
->
new
(
"win32"
,
"
$winapi_check_dir
/win32api.dat"
);
'winapi'
->
read_spec_files
(
$win
e_dir
,
$win
16api
,
$win32api
);
my
$nativeapi
=
'nativeapi'
->
new
(
"
tools/winapi_check
/nativeapi.dat"
);
my
$nativeapi
=
'nativeapi'
->
new
(
"
$winapi_check_dir
/nativeapi.dat"
);
for
my
$name
(
$win32api
->
all_functions
)
{
my
$module16
=
$win16api
->
function_module
(
$name
);
...
...
tools/winapi_check/winapi_options.pm
View file @
afe3b0cd
...
...
@@ -2,7 +2,6 @@ package winapi_options;
use
strict
;
sub
parser_comma_list
{
my
$prefix
=
shift
;
my
$value
=
shift
;
...
...
@@ -89,6 +88,7 @@ sub new {
my
$module
=
\
$
{
$self
->
{
MODULE
}};
my
$global
=
\
$
{
$self
->
{
GLOBAL
}};
$$global
=
0
;
while
(
defined
(
$_
=
shift
@ARGV
))
{
if
(
/^-([^=]*)(=(.*))?$/
)
{
my
$name
;
...
...
@@ -157,15 +157,19 @@ sub new {
}
}
my
$paths
;
if
(
$#$files
==
-
1
)
{
@$files
=
map
{
s/^.\/(.*)$/$1/
;
$_
;
}
split
(
/\n/
,
`find . -name \\*.c`
);
$paths
=
"."
;
$$global
=
1
;
}
else
{
$
$global
=
0
$
paths
=
join
(
" "
,
@$files
);
}
@$files
=
map
{
s/^.\/(.*)$/$1/
;
$_
;
}
split
(
/\n/
,
`find $paths -name \\*.c`
);
return
$self
;
}
...
...
tools/winapi_check/winapi_parser.pm
View file @
afe3b0cd
...
...
@@ -129,9 +129,20 @@ sub parse_c_file {
my
@arguments32
=
(
"HDC"
,
"INT"
);
&
$function_found_callback
(
"INT16"
,
"WINAPI"
,
$2
.
"16"
,
\
@arguments16
);
&
$function_found_callback
(
"INT"
,
"WINAPI"
,
$2
,
\
@arguments32
);
}
elsif
(
/WAVEIN_SHORTCUT_0\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/s
)
{
$_
=
$'
;
$again
=
1
;
my
@arguments16
=
(
"HWAVEIN16"
);
my
@arguments32
=
(
"HWAVEIN"
);
&
$function_found_callback
(
"UINT16"
,
"WINAPI"
,
"waveIn"
.
$1
.
"16"
,
\
@arguments16
);
&
$function_found_callback
(
"UINT"
,
"WINAPI"
,
"waveIn"
.
$1
,
\
@arguments32
);
}
elsif
(
/WAVEOUT_SHORTCUT_0\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/s
)
{
$_
=
$'
;
$again
=
1
;
my
@arguments16
=
(
"HWAVEOUT16"
);
my
@arguments32
=
(
"HWAVEOUT"
);
&
$function_found_callback
(
"UINT16"
,
"WINAPI"
,
"waveOut"
.
$1
.
"16"
,
\
@arguments16
);
&
$function_found_callback
(
"UINT"
,
"WINAPI"
,
"waveOut"
.
$1
,
\
@arguments32
);
}
elsif
(
/WAVEOUT_SHORTCUT_(1|2)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s
)
{
$_
=
$'
;
$again
=
1
;
print
"$_"
;
if
(
$1
eq
"1"
)
{
my
@arguments16
=
(
"HWAVEOUT16"
,
$4
);
my
@arguments32
=
(
"HWAVEOUT"
,
$4
);
...
...
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