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
bebac0a4
Commit
bebac0a4
authored
Oct 30, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter the functions declaration order or predeclare them so perl can
check the prototypes.
parent
f7478816
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
114 deletions
+131
-114
c2man.pl
tools/c2man.pl
+17
-0
modules.pm
tools/winapi_check/modules.pm
+38
-38
winapi_local.pm
tools/winapi_check/winapi_local.pm
+37
-37
winemaker
tools/winemaker
+39
-39
No files found.
tools/c2man.pl
View file @
bebac0a4
...
...
@@ -66,6 +66,23 @@ my $year = $datetime[5] + 1900;
my
$date
=
"$months[$datetime[4]] $year"
;
sub
output_api_comment
($);
sub
output_api_footer
($);
sub
output_api_header
($);
sub
output_api_name
($);
sub
output_api_synopsis
($);
sub
output_close_api_file
();
sub
output_comment
($);
sub
output_html_index_files
();
sub
output_html_stylesheet
();
sub
output_open_api_file
($);
sub
output_sgml_dll_file
($);
sub
output_sgml_master_file
($);
sub
output_spec
($);
sub
process_comment
($);
sub
process_extra_comment
($);
# Generate the list of exported entries for the dll
sub
process_spec_file
($)
{
...
...
tools/winapi_check/modules.pm
View file @
bebac0a4
...
...
@@ -186,44 +186,6 @@ sub all_modules($) {
return
sort
(
keys
(
%
$module2spec_file
));
}
sub
complete_modules
($$)
{
my
$self
=
shift
;
my
$c_files
=
shift
;
my
%
dirs
;
foreach
my
$file
(
@$c_files
)
{
my
$dir
=
file_directory
(
"$current_dir/$file"
);
$dirs
{
$dir
}
++
;
}
my
@c_files
=
get_c_files
(
"winelib"
);
@c_files
=
files_skip
(
@c_files
);
foreach
my
$file
(
@c_files
)
{
my
$dir
=
file_directory
(
$file
);
if
(
exists
(
$dirs
{
$dir
}))
{
$dirs
{
$dir
}
--
;
}
}
my
@complete_modules
=
();
foreach
my
$module
(
$self
->
all_modules
)
{
my
$index
=
-
1
;
my
@dirs
=
$self
->
allowed_dirs_for_module
(
$module
);
foreach
my
$dir
(
@dirs
)
{
if
(
exists
(
$dirs
{
$dir
})
&&
$dirs
{
$dir
}
==
0
)
{
$index
++
;
}
}
if
(
$index
==
$#dirs
)
{
push
@complete_modules
,
$module
;
}
}
return
@complete_modules
;
}
sub
is_allowed_module
($$)
{
my
$self
=
shift
;
...
...
@@ -326,6 +288,44 @@ sub found_module_in_dir($$$) {
$$used_module_dirs
{
$module
}{
$dir
}
++
;
}
sub
complete_modules
($$)
{
my
$self
=
shift
;
my
$c_files
=
shift
;
my
%
dirs
;
foreach
my
$file
(
@$c_files
)
{
my
$dir
=
file_directory
(
"$current_dir/$file"
);
$dirs
{
$dir
}
++
;
}
my
@c_files
=
get_c_files
(
"winelib"
);
@c_files
=
files_skip
(
@c_files
);
foreach
my
$file
(
@c_files
)
{
my
$dir
=
file_directory
(
$file
);
if
(
exists
(
$dirs
{
$dir
}))
{
$dirs
{
$dir
}
--
;
}
}
my
@complete_modules
=
();
foreach
my
$module
(
$self
->
all_modules
)
{
my
$index
=
-
1
;
my
@dirs
=
$self
->
allowed_dirs_for_module
(
$module
);
foreach
my
$dir
(
@dirs
)
{
if
(
exists
(
$dirs
{
$dir
})
&&
$dirs
{
$dir
}
==
0
)
{
$index
++
;
}
}
if
(
$index
==
$#dirs
)
{
push
@complete_modules
,
$module
;
}
}
return
@complete_modules
;
}
sub
global_report
($)
{
my
$self
=
shift
;
...
...
tools/winapi_check/winapi_local.pm
View file @
bebac0a4
...
...
@@ -25,39 +25,6 @@ use options qw($options);
use
output
qw($output)
;
use
winapi
qw($win16api $win32api @winapis)
;
sub
check_function
($)
{
my
$function
=
shift
;
my
$return_type
=
$function
->
return_type
;
my
$calling_convention
=
$function
->
calling_convention
;
my
$calling_convention16
=
$function
->
calling_convention16
;
my
$calling_convention32
=
$function
->
calling_convention32
;
my
$internal_name
=
$function
->
internal_name
;
my
$external_name16
=
$function
->
external_name16
;
my
$external_name32
=
$function
->
external_name32
;
my
$module16
=
$function
->
module16
;
my
$module32
=
$function
->
module32
;
my
$refargument_types
=
$function
->
argument_types
;
if
(
!
defined
(
$refargument_types
))
{
return
;
}
if
(
$options
->
win16
&&
$options
->
report_module
(
$module16
))
{
_check_function
(
$return_type
,
$calling_convention
,
$external_name16
,
$internal_name
,
$refargument_types
,
$win16api
);
}
if
(
$options
->
win32
&&
$options
->
report_module
(
$module32
))
{
_check_function
(
$return_type
,
$calling_convention
,
$external_name32
,
$internal_name
,
$refargument_types
,
$win32api
);
}
}
sub
_check_function
($$$$$$)
{
my
$return_type
=
shift
;
my
$calling_convention
=
shift
;
...
...
@@ -303,19 +270,36 @@ sub _check_function($$$$$$) {
}
}
sub
check_statements
($$)
{
my
$functions
=
shift
;
sub
check_function
($)
{
my
$function
=
shift
;
my
$return_type
=
$function
->
return_type
;
my
$calling_convention
=
$function
->
calling_convention
;
my
$calling_convention16
=
$function
->
calling_convention16
;
my
$calling_convention32
=
$function
->
calling_convention32
;
my
$internal_name
=
$function
->
internal_name
;
my
$external_name16
=
$function
->
external_name16
;
my
$external_name32
=
$function
->
external_name32
;
my
$module16
=
$function
->
module16
;
my
$module32
=
$function
->
module32
;
my
$refargument_types
=
$function
->
argument_types
;
if
(
!
defined
(
$refargument_types
))
{
return
;
}
if
(
$options
->
win16
&&
$options
->
report_module
(
$module16
))
{
_check_statements
(
$win16api
,
$functions
,
$function
);
_check_function
(
$return_type
,
$calling_convention
,
$external_name16
,
$internal_name
,
$refargument_types
,
$win16api
);
}
if
(
$options
->
win32
&&
$options
->
report_module
(
$module32
))
{
_check_statements
(
$win16api
,
$functions
,
$function
);
_check_function
(
$return_type
,
$calling_convention
,
$external_name32
,
$internal_name
,
$refargument_types
,
$win32api
);
}
}
...
...
@@ -398,6 +382,22 @@ sub _check_statements($$$) {
}
}
sub
check_statements
($$)
{
my
$functions
=
shift
;
my
$function
=
shift
;
my
$module16
=
$function
->
module16
;
my
$module32
=
$function
->
module32
;
if
(
$options
->
win16
&&
$options
->
report_module
(
$module16
))
{
_check_statements
(
$win16api
,
$functions
,
$function
);
}
if
(
$options
->
win32
&&
$options
->
report_module
(
$module32
))
{
_check_statements
(
$win16api
,
$functions
,
$function
);
}
}
sub
check_file
($$)
{
my
$file
=
shift
;
my
$functions
=
shift
;
...
...
tools/winemaker
View file @
bebac0a4
...
...
@@ -403,6 +403,45 @@ sub bsearch($$)
}
}
##
# Retrieves the contents of the specified directory.
# We either get it from the directories hashtable which acts as a
# cache, or use opendir, readdir, closedir and store the result
# in the hashtable.
sub
get_directory_contents
($)
{
my
$dirname
=
$_
[
0
];
my
$directory
;
#print "getting the contents of $dirname\n";
# check for a cached version
$dirname
=~
s
+/
$+
+
;
if
(
$dirname
eq
""
)
{
$dirname
=
cwd
;
}
$directory
=
$directories
{
$dirname
};
if
(
defined
$directory
)
{
#print "->@$directory\n";
return
$directory
;
}
# Read this directory
if
(
opendir
(
DIRECTORY
,
"$dirname"
))
{
my
@files
=
readdir
DIRECTORY
;
closedir
(
DIRECTORY
);
$directory
=\
@files
;
}
else
{
# Return an empty list
#print "error: cannot open $dirname\n";
my
@files
;
$directory
=\
@files
;
}
#print "->@$directory\n";
$directories
{
$dirname
}
=
$directory
;
return
$directory
;
}
#####
...
...
@@ -1024,45 +1063,6 @@ sub fix_file_and_directory_names($)
my
%
directories
;
##
# Retrieves the contents of the specified directory.
# We either get it from the directories hashtable which acts as a
# cache, or use opendir, readdir, closedir and store the result
# in the hashtable.
sub
get_directory_contents
($)
{
my
$dirname
=
$_
[
0
];
my
$directory
;
#print "getting the contents of $dirname\n";
# check for a cached version
$dirname
=~
s
+/
$+
+
;
if
(
$dirname
eq
""
)
{
$dirname
=
cwd
;
}
$directory
=
$directories
{
$dirname
};
if
(
defined
$directory
)
{
#print "->@$directory\n";
return
$directory
;
}
# Read this directory
if
(
opendir
(
DIRECTORY
,
"$dirname"
))
{
my
@files
=
readdir
DIRECTORY
;
closedir
(
DIRECTORY
);
$directory
=\
@files
;
}
else
{
# Return an empty list
#print "error: cannot open $dirname\n";
my
@files
;
$directory
=\
@files
;
}
#print "->@$directory\n";
$directories
{
$dirname
}
=
$directory
;
return
$directory
;
}
##
# Try to find a file for the specified filename. The attempt is
# case-insensitive which is why it's not trivial. If a match is
# found then we return the pathname with the correct case.
...
...
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