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
35a723b5
Commit
35a723b5
authored
Jun 20, 2001
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jun 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several bug fixes and additions.
parent
a9d0209c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
127 additions
and
83 deletions
+127
-83
config.pm
tools/winapi/config.pm
+37
-21
winapi_fixup
tools/winapi/winapi_fixup
+0
-0
modules.pm
tools/winapi_check/modules.pm
+1
-1
setupx.api
tools/winapi_check/win16/setupx.api
+1
-0
winmm.api
tools/winapi_check/win32/winmm.api
+4
-0
winapi.pm
tools/winapi_check/winapi.pm
+28
-19
winapi_check
tools/winapi_check/winapi_check
+35
-19
winapi_documentation.pm
tools/winapi_check/winapi_documentation.pm
+21
-23
No files found.
tools/winapi/config.pm
View file @
35a723b5
...
...
@@ -9,9 +9,9 @@ require Exporter;
@ISA
=
qw(Exporter)
;
@EXPORT
=
qw(
&file_type
&file_type
&files_filter
&file_skip &files_skip
&file_normalize
&file_
absolutize &file_
normalize
&get_spec_files
&translate_calling_convention16 &translate_calling_convention32
)
;
...
...
@@ -22,32 +22,35 @@ require Exporter;
use
vars
qw($current_dir $wine_dir $winapi_dir $winapi_check_dir)
;
sub
file_type
{
my
$file
=
shift
;
local
$_
=
shift
;
my
$file_dir
=
$file
;
if
(
!
(
$file_dir
=~
s/^(.*?)\/[^\/]*$/$1/
))
{
$file_dir
=
"."
;
}
$_
=
file_absolutize
(
$_
);
$file_dir
=~
s/^$wine_dir\///
;
m%^(?:libtest|rc|server|tests|tools)/%
&&
return
""
;
m%^(?:programs|debugger|miscemu)/%
&&
return
"wineapp"
;
m%^(?:library|tsx11|unicode)/%
&&
return
"library"
;
m%^windows/x11drv/wineclipsrv.c%
&&
return
"application"
;
if
(
$file_dir
=~
/^(libtest|programs|rc|server|tests|tools)/
||
$file
=~
/dbgmain\.c$/
||
$file
=~
/wineclipsrv\.c$/
)
# FIXME: Kludge
{
return
"application"
;
}
elsif
(
$file_dir
=~
/^(debugger|miscemu)/
)
{
return
"emulator"
;
}
else
{
return
"library"
;
return
"winelib"
;
}
sub
files_filter
{
my
$type
=
shift
;
my
@files
;
foreach
my
$file
(
@_
)
{
if
(
file_type
(
$file
)
eq
$type
)
{
push
@files
,
$file
;
}
}
return
@files
;
}
sub
file_skip
{
local
$_
=
shift
;
$_
=
"$current_dir/$_"
;
s%^\./%%
;
$_
=
file_absolutize
(
$_
);
m%^(?:libtest|programs|rc|server|tests|tools)/%
&&
return
1
;
m%^(?:debugger|miscemu|tsx11|server|unicode)/%
&&
return
1
;
...
...
@@ -69,6 +72,18 @@ sub files_skip {
return
@files
;
}
sub
file_absolutize
{
local
$_
=
shift
;
$_
=
file_normalize
(
$_
);
if
(
!
s%^$wine_dir/%%
)
{
$_
=
"$current_dir/$_"
;
}
s%^\./%%
;
return
$_
;
}
sub
file_normalize
{
local
$_
=
shift
;
...
...
@@ -86,8 +101,9 @@ sub get_spec_files {
output
->
progress
(
"$wine_dir: searching for *.spec"
);
my
@spec_files
=
map
{
s/^$wine_dir\/(.*)$/$1/
;
if
(
file_type
(
$_
)
eq
"library"
)
{
s%^\./%%
;
s%^$wine_dir/%%
;
if
(
file_type
(
$_
)
eq
"winelib"
)
{
$_
;
}
else
{
();
...
...
tools/winapi/winapi_fixup
View file @
35a723b5
This diff is collapsed.
Click to expand it.
tools/winapi_check/modules.pm
View file @
35a723b5
...
...
@@ -24,7 +24,7 @@ sub new {
my
@all_spec_files
=
map
{
s/^.\/(.*)$/$1/
;
if
(
&
$file_type
(
$_
)
eq
"
library
"
)
{
if
(
&
$file_type
(
$_
)
eq
"
winelib
"
)
{
$_
;
}
else
{
();
...
...
tools/winapi_check/win16/setupx.api
View file @
35a723b5
...
...
@@ -13,6 +13,7 @@ LPEXPANDVTBL
LPHKEY
LPLOGDISKDESC
LPLPDEVICE_INFO16
LPVIRTNODE
LPVOID
VIFPROC
...
...
tools/winapi_check/win32/winmm.api
View file @
35a723b5
...
...
@@ -79,6 +79,10 @@ UINT *
WORD *
YIELDPROC
%ptr --forbidden
LPMMIOPROC16
%str
LPCSTR
...
...
tools/winapi_check/winapi.pm
View file @
35a723b5
...
...
@@ -18,7 +18,7 @@ sub new {
my
$path
=
shift
;
my
@files
=
map
{
s
/^.\/(.*)$/$1/
;
s
%^\./%%
;
$_
;
}
split
(
/\n/
,
`find $path -name \\*.api`
);
...
...
@@ -212,8 +212,8 @@ sub read_all_spec_files {
my
$win32api
=
shift
;
my
@files
=
map
{
s
/^$wine_dir\/(.*)$/$1/
;
if
(
&
$file_type
(
$_
)
eq
"
library
"
)
{
s
%^\./%%
;
if
(
&
$file_type
(
$_
)
eq
"
winelib
"
)
{
$_
;
}
else
{
();
...
...
@@ -244,6 +244,7 @@ sub parse_spec_file {
my
$module_files
=
\%
{
$self
->
{
MODULE_FILES
}};
my
$file
=
shift
;
$file
=~
s%^\./%%
;
my
%
ordinals
;
my
$type
;
...
...
@@ -289,26 +290,26 @@ sub parse_spec_file {
$$function_external_name
{
$internal_name
}
=
$external_name
;
$$function_internal_arguments
{
$internal_name
}
=
$arguments
;
$$function_external_arguments
{
$external_name
}
=
$arguments
;
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
if
(
!
$$function_internal_ordinal
{
$internal_name
})
{
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
}
else
{
$$function_internal_ordinal
{
$internal_name
}
.=
" & $ordinal"
;
}
if
(
!
$$function_external_ordinal
{
$external_name
})
{
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
}
else
{
$$function_external_ordinal
{
$external_name
}
.=
" & $ordinal"
;
}
$$function_internal_calling_convention
{
$internal_name
}
=
$calling_convention
;
$$function_external_calling_convention
{
$external_name
}
=
$calling_convention
;
if
(
!
$$function_internal_module
{
$internal_name
})
{
$$function_internal_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_internal_module
{
$internal_name
}
!~
/$module/
)
{
if
(
0
)
{
$$output
->
write
(
"$file: $external_name: the internal function ($internal_name) "
.
"already belongs to a module ($$function_internal_module{$internal_name})\n"
);
}
}
else
{
# if($$function_internal_module{$internal_name} !~ /$module/) {
$$function_internal_module
{
$internal_name
}
.=
" & $module"
;
}
if
(
!
$$function_external_module
{
$external_name
})
{
$$function_external_module
{
$external_name
}
=
"$module"
;
}
elsif
(
$$function_external_module
{
$external_name
}
!~
/$module/
)
{
if
(
0
)
{
$$output
->
write
(
"$file: $internal_name: the external function ($external_name) "
.
"already belongs to a module ($$function_external_module{$external_name})\n"
);
}
}
else
{
# if($$function_external_module{$external_name} !~ /$module/) {
$$function_external_module
{
$external_name
}
.=
" & $module"
;
}
...
...
@@ -361,16 +362,24 @@ sub parse_spec_file {
# FIXME: Internal name existing more than once not handled properly
$$function_stub
{
$internal_name
}
=
1
;
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
if
(
!
$$function_internal_ordinal
{
$internal_name
})
{
$$function_internal_ordinal
{
$internal_name
}
=
$ordinal
;
}
else
{
$$function_internal_ordinal
{
$internal_name
}
.=
" & $ordinal"
;
}
if
(
!
$$function_external_ordinal
{
$external_name
})
{
$$function_external_ordinal
{
$external_name
}
=
$ordinal
;
}
else
{
$$function_external_ordinal
{
$external_name
}
.=
" & $ordinal"
;
}
if
(
!
$$function_internal_module
{
$internal_name
})
{
$$function_internal_module
{
$internal_name
}
=
"$module"
;
}
elsif
(
$$function_internal_module
{
$internal_name
}
!~
/$module/
)
{
}
els
e
{
#
if($$function_internal_module{$internal_name} !~ /$module/) {
$$function_internal_module
{
$internal_name
}
.=
" & $module"
;
}
if
(
!
$$function_external_module
{
$external_name
})
{
$$function_external_module
{
$external_name
}
=
"$module"
;
}
elsif
(
$$function_external_module
{
$external_name
}
!~
/$module/
)
{
}
els
e
{
#
if($$function_external_module{$external_name} !~ /$module/) {
$$function_external_module
{
$external_name
}
.=
" & $module"
;
}
}
elsif
(
/^(\d+|@)\s+forward(?:\s+(?:-noimport|-norelay|-i386|-ret64))?\s+(\S+)\s+(\S+)\.(\S+)$/
)
{
...
...
tools/winapi_check/winapi_check
View file @
35a723b5
...
...
@@ -92,32 +92,48 @@ if(!defined($options)) {
exit
;
}
sub
file_
typ
e
{
my
$file
=
shift
;
sub
file_
absolutiz
e
{
local
$_
=
shift
;
my
$file_dir
=
$file
;
if
(
!
(
$file_dir
=~
s/^(.*?)\/[^\/]*$/$1/
)
)
{
$
file_dir
=
".
"
;
$_
=
file_normalize
(
$_
)
;
if
(
!
s%^$wine_dir/%%
)
{
$
_
=
"$current_dir/$_
"
;
}
$file_dir
=~
s/^$wine_dir\///
;
s%^\./%%
;
if
(
$file_dir
=~
/^(libtest|programs|rc|server|tests|tools)/
||
$file
=~
/dbgmain\.c$/
||
$file
=~
/wineclipsrv\.c$/
)
# FIXME: Kludge
{
return
"application"
;
}
elsif
(
$file_dir
=~
/^(debugger|miscemu)/
)
{
return
"emulator"
;
}
else
{
return
"library"
;
return
$_
;
}
sub
file_normalize
{
local
$_
=
shift
;
foreach
my
$dir
(
split
(
m%/%
,
$current_dir
))
{
s%^(\.\./)*\.\./$dir/%%
;
if
(
defined
(
$1
))
{
$_
=
"$1$_"
;
}
}
return
$_
;
}
sub
file_type
{
local
$_
=
shift
;
$_
=
file_absolutize
(
$_
);
m%^(?:libtest|rc|server|tests|tools)/%
&&
return
""
;
m%^(?:programs|debugger|miscemu)/%
&&
return
"wineapp"
;
m%^(?:library|tsx11|unicode)/%
&&
return
"library"
;
m%^windows/x11drv/wineclipsrv.c%
&&
return
"application"
;
return
"winelib"
;
}
sub
file_skip
{
local
$_
=
shift
;
s%^\./%%
;
$_
=
file_absolutize
(
$_
)
;
m%^(?:libtest|programs|rc|server|tests|tools)/%
&&
return
1
;
m%^(?:debugger|miscemu|tsx11|unicode)/%
&&
return
1
;
...
...
@@ -344,8 +360,8 @@ foreach my $file (@c_files) {
$win16api
->
found_internal_function
(
$internal_name
)
if
$options
->
win16
;
$win32api
->
found_internal_function
(
$internal_name
)
if
$options
->
win32
;
}
if
(
$file_type
ne
"application
"
)
{
if
(
$file_type
eq
"winelib
"
)
{
my
$module16
=
$win16api
->
function_internal_module
(
$internal_name
);
my
$module32
=
$win32api
->
function_internal_module
(
$internal_name
);
...
...
tools/winapi_check/winapi_documentation.pm
View file @
35a723b5
...
...
@@ -95,39 +95,37 @@ sub check_documentation {
if
(
$options
->
documentation_ordinal
)
{
if
(
defined
(
$module16
))
{
my
$ordinal16
=
$win16api
->
function_internal_ordinal
(
$internal_name
);
if
(
!
defined
(
$ordinal16
))
{
$output
->
write
(
"function have no ordinal\n"
);
}
else
{
my
@uc_modules16
=
split
(
/\s*\&\s*/
,
uc
(
$module16
));
foreach
my
$uc_module16
(
@uc_modules16
)
{
if
(
$documentation
!~
/\b$uc_module16\.\Q$ordinal16\E/
)
{
$output
->
write
(
"documentation: wrong or missing ordinal "
.
"expected ($uc_module16.$ordinal16) \\\n$documentation\n"
);
}
my
@modules16
=
split
(
/\s*\&\s*/
,
$module16
);
my
@ordinals16
=
split
(
/\s*\&\s*/
,
$win16api
->
function_internal_ordinal
(
$internal_name
));
my
$module16
;
my
$ordinal16
;
while
(
defined
(
$module16
=
shift
@modules16
)
&&
defined
(
$ordinal16
=
shift
@ordinals16
))
{
if
(
$documentation
!~
/\b\U$module16\E\.\Q$ordinal16\E/
)
{
$output
->
write
(
"documentation: wrong or missing ordinal "
.
"expected (\U$module16\E.$ordinal16) \\\n$documentation\n"
);
}
}
}
if
(
defined
(
$module32
))
{
my
$ordinal32
=
$win32api
->
function_internal_ordinal
(
$internal_name
);
if
(
!
defined
(
$ordinal32
))
{
$output
->
write
(
"function have no ordinal\n"
);
}
else
{
my
@uc_modules32
=
split
(
/\s*\&\s*/
,
uc
(
$module32
));
foreach
my
$uc_module32
(
@uc_modules32
)
{
if
(
$documentation
!~
/\b$uc_module32\.\Q$ordinal32\E/
)
{
$output
->
write
(
"documentation: wrong or missing ordinal "
.
"expected ($uc_module32.$ordinal32) \\\n$documentation\n"
);
}
my
@modules32
=
split
(
/\s*\&\s*/
,
$module32
);
my
@ordinals32
=
split
(
/\s*\&\s*/
,
$win32api
->
function_internal_ordinal
(
$internal_name
));
my
$module32
;
my
$ordinal32
;
while
(
defined
(
$module32
=
shift
@modules32
)
&&
defined
(
$ordinal32
=
shift
@ordinals32
))
{
if
(
$documentation
!~
/\b\U$module32\E\.\Q$ordinal32\E/
)
{
$output
->
write
(
"documentation: wrong or missing ordinal "
.
"expected (\U$module32\E.$ordinal32) \\\n$documentation\n"
);
}
}
}
}
# FIXME: Not correct
if
(
$options
->
documentation_pedantic
)
{
my
$ordinal
=
$win16api
->
function_internal_ordinal
(
$internal_name
)
;
my
$ordinal
=
(
split
(
/\s*\&\s*/
,
$win16api
->
function_internal_ordinal
(
$internal_name
)))[
0
]
;
if
(
defined
(
$ordinal
)
&&
$documentation
!~
/^ \*\s+(?:\@|\w+)(?:\s+[\(\[]\w+\.(?:\@|\d+)[\)\]])+/m
)
{
$output
->
write
(
"documentation: pedantic check failed \\\n$documentation\n"
);
}
...
...
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