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
cff90583
Commit
cff90583
authored
Oct 15, 2002
by
Patrik Stridvall
Committed by
Alexandre Julliard
Oct 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed broken winapi_extract options --{pseudo-,}stub-statistics.
- Added new winapi_extract options --{pseudo-,}implemented.
parent
0bc4b565
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
12 deletions
+87
-12
winapi_extract
tools/winapi/winapi_extract
+70
-10
winapi_extract_options.pm
tools/winapi/winapi_extract_options.pm
+2
-0
modules.dat
tools/winapi_check/modules.dat
+2
-2
winapi_c_parser.pm
tools/winapi_check/winapi_c_parser.pm
+13
-0
No files found.
tools/winapi/winapi_extract
View file @
cff90583
#!/usr/bin/perl -w
# Copyright 200
1
Patrik Stridvall
# Copyright 200
2
Patrik Stridvall
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
...
...
@@ -45,7 +45,7 @@ use winapi_c_parser;
use
winapi_function
;
use
vars
qw($win16api $win32api @winapis)
;
if
(
$options
->
spec_files
||
$options
->
winetest
)
{
if
(
$options
->
spec_files
||
$options
->
implemented
||
$options
->
stub_statistics
||
$options
->
winetest
)
{
require
winapi
;
import
winapi
qw($win16api $win32api @winapis)
;
}
...
...
@@ -161,24 +161,29 @@ sub documentation_specifications {
my
%
module_pseudo_stub
;
sub
statements_stub
{
sub
statements_
pseudo_
stub
{
my
$function
=
shift
;
my
$pseudo_stub
=
0
;
my
$statements
=
$function
->
statements
;
if
(
defined
(
$statements
)
&&
$statements
=~
/FIXME[^;]*stub/s
)
{
if
(
$options
->
win16
)
{
my
$external_name16
=
$function
->
external_name16
;
foreach
my
$module16
(
$function
->
modules16
)
{
$module_pseudo_stub
{
$module16
}{
$external_name16
}
++
;
$pseudo_stub
=
1
;
}
}
if
(
$options
->
win32
)
{
my
$external_name32
=
$function
->
external_name32
;
foreach
my
$module32
(
$function
->
modules32
)
{
$module_pseudo_stub
{
$module32
}{
$external_name32
}
++
;
$pseudo_stub
=
1
;
}
}
}
return
$pseudo_stub
;
}
my
@h_files
=
();
...
...
@@ -189,7 +194,7 @@ if($options->headers) {
}
my
@c_files
=
();
if
(
1
||
$options
->
spec_files
||
$options
->
pseudo_stub_statistics
)
{
if
(
$options
->
spec_files
||
$options
->
pseudo_implemented
||
$options
->
pseudo_stub_statistics
)
{
@c_files
=
$options
->
c_files
;
@c_files
=
files_skip
(
@c_files
);
@c_files
=
files_filter
(
"winelib"
,
@c_files
);
...
...
@@ -267,13 +272,13 @@ foreach my $file (@h_files, @c_files) {
}
my
$old_function
;
if
(
$options
->
stub_statistics
)
{
if
(
$options
->
implemented
||
$options
->
stub_statistics
)
{
$old_function
=
'winapi_function'
->
new
;
}
else
{
$old_function
=
'function'
->
new
;
}
$
function
->
file
(
$
file
);
$
old_function
->
file
(
$function
->
file
);
$old_function
->
debug_channels
(
[]
);
# FIXME: Not complete
$old_function
->
documentation_line
(
0
);
# FIXME: Not complete
...
...
@@ -298,16 +303,36 @@ foreach my $file (@h_files, @c_files) {
documentation_specifications
(
$old_function
);
}
if
(
$options
->
stub_statistics
)
{
statements_stub
(
$old_function
);
}
if
(
$function
->
statements
)
{
$function
=
undef
;
&
$update_output
();
}
else
{
$function
=
undef
;
}
my
$pseudo_stub
=
0
;
if
(
$options
->
pseudo_implemented
||
$options
->
pseudo_stub_statistics
)
{
$pseudo_stub
=
statements_pseudo_stub
(
$old_function
);
}
my
$module
=
$old_function
->
module
;
my
$external_name
=
$old_function
->
external_name
;
my
$statements
=
$old_function
->
statements
;
if
(
$options
->
pseudo_implemented
&&
$module
&&
$external_name
&&
$statements
)
{
my
@external_names
=
split
(
/\s*&\s*/
,
$external_name
);
my
@modules
=
split
(
/\s*&\s*/
,
$module
);
my
@external_names2
;
while
(
defined
(
my
$external_name
=
shift
@external_names
)
&&
defined
(
my
$module
=
shift
@modules
))
{
if
(
$pseudo_stub
)
{
$output
->
write
(
"$module.$external_name: pseudo implemented\n"
);
}
else
{
$output
->
write
(
"$module.$external_name: implemented\n"
);
}
}
}
};
$parser
->
set_found_function_callback
(
$found_function
);
...
...
@@ -355,6 +380,41 @@ foreach my $file (@h_files, @c_files) {
$output
->
prefix
(
""
);
}
if
(
$options
->
implemented
&&
!
$options
->
pseudo_implemented
)
{
foreach
my
$winapi
(
@winapis
)
{
my
$type
=
$winapi
->
name
;
if
(
$type
eq
"win16"
&&
!
$options
->
win16
)
{
next
;
}
if
(
$type
eq
"win32"
&&
!
$options
->
win32
)
{
next
;
}
foreach
my
$module
(
$winapi
->
all_modules
)
{
foreach
my
$external_name
(
$winapi
->
all_functions_in_module
(
$module
))
{
my
$external_calling_convention
=
$winapi
->
function_external_calling_convention_in_module
(
$module
,
$external_name
);
if
(
$external_calling_convention
eq
"forward"
)
{
(
my
$forward_module
,
my
$forward_external_name
)
=
$winapi
->
function_forward_final_destination
(
$module
,
$external_name
);
my
$forward_external_calling_convention
=
$winapi
->
function_external_calling_convention_in_module
(
$forward_module
,
$forward_external_name
);
if
(
!
defined
(
$forward_external_calling_convention
))
{
next
;
}
$external_calling_convention
=
$forward_external_calling_convention
;
}
if
(
$external_calling_convention
ne
"stub"
)
{
$output
->
write
(
"*.spec: $module.$external_name: implemented\n"
);
}
}
}
}
}
sub
output_function
{
local
*
OUT
=
shift
;
my
$type
=
shift
;
...
...
tools/winapi/winapi_extract_options.pm
View file @
cff90583
...
...
@@ -43,6 +43,8 @@ my %options_long = (
"old"
=>
{
default
=>
0
,
description
=>
"use the old parser"
},
"headers"
=>
{
default
=>
0
,
description
=>
"parse the .h files as well"
},
"implemented"
=>
{
default
=>
0
,
parent
=>
"old"
,
description
=>
"implemented functions extraction"
},
"pseudo-implemented"
=>
{
default
=>
0
,
parent
=>
"implemented"
,
description
=>
"pseudo implemented functions extraction"
},
"struct"
=>
{
default
=>
0
,
parent
=>
"headers"
,
description
=>
"struct extraction"
},
"spec-files"
=>
{
default
=>
0
,
parent
=>
"old"
,
description
=>
"spec files extraction"
},
"stub-statistics"
=>
{
default
=>
0
,
parent
=>
"old"
,
description
=>
"stub statistics"
},
...
...
tools/winapi_check/modules.dat
View file @
cff90583
...
...
@@ -159,9 +159,9 @@ dlls/msimg32
dlls/msisys
% dlls/msrle32/msrle32.spec
% dlls/ms
video/ms
rle32/msrle32.spec
dlls/msrle32
dlls/ms
video/ms
rle32
% dlls/msvcrt/msvcrt.spec
...
...
tools/winapi_check/winapi_c_parser.pm
View file @
cff90583
...
...
@@ -208,6 +208,8 @@ sub parse_c_file {
my
$old_function
=
shift
;
my
$function
=
new
c_function
;
$function
->
file
(
$old_function
->
file
);
$function
->
begin_line
(
$old_function
->
function_line
);
$function
->
begin_column
(
0
);
...
...
@@ -219,6 +221,17 @@ sub parse_c_file {
$function
->
calling_convention
(
$old_function
->
calling_convention
);
$function
->
name
(
$old_function
->
internal_name
);
if
(
defined
(
$old_function
->
argument_types
))
{
$function
->
argument_types
([
@
{
$old_function
->
argument_types
}]);
}
if
(
defined
(
$old_function
->
argument_names
))
{
$function
->
argument_names
([
@
{
$old_function
->
argument_names
}]);
}
$function
->
statements_line
(
$old_function
->
statements_line
);
$function
->
statements_column
(
0
);
$function
->
statements
(
$old_function
->
statements
);
&
$$found_function
(
$function
);
};
...
...
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