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
d07a646f
Commit
d07a646f
authored
Jul 18, 2001
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jul 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Several additions and bug fixes.
parent
fcef0261
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
89 additions
and
187 deletions
+89
-187
config.pm
tools/winapi/config.pm
+14
-7
output.pm
tools/winapi/output.pm
+18
-0
setup.pm
tools/winapi/setup.pm
+1
-3
winapi_extract
tools/winapi/winapi_extract
+6
-4
modules.pm
tools/winapi_check/modules.pm
+4
-0
output.pm
tools/winapi_check/output.pm
+0
-114
msvcrt.api
tools/winapi_check/win32/msvcrt.api
+1
-5
ole32.api
tools/winapi_check/win32/ole32.api
+0
-1
shell32.api
tools/winapi_check/win32/shell32.api
+4
-0
winapi.pm
tools/winapi_check/winapi.pm
+10
-44
winapi_check
tools/winapi_check/winapi_check
+0
-0
winapi_function.pm
tools/winapi_check/winapi_function.pm
+14
-1
winapi_global.pm
tools/winapi_check/winapi_global.pm
+2
-1
winapi_options.pm
tools/winapi_check/winapi_options.pm
+11
-4
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+4
-3
No files found.
tools/winapi/config.pm
View file @
d07a646f
...
...
@@ -12,7 +12,7 @@ require Exporter;
&file_absolutize &file_normalize
&file_type &files_filter
&file_skip &files_skip
&get_spec_files
&get_
c_files &get_h_files &get_
spec_files
)
;
@EXPORT_OK
=
qw(
$current_dir $wine_dir $winapi_dir $winapi_check_dir
...
...
@@ -98,20 +98,27 @@ sub file_normalize {
return
$_
;
}
sub
get_spec_files
{
$output
->
progress
(
"$wine_dir: searching for *.spec"
);
sub
_get_files
{
my
$extension
=
shift
;
my
$type
=
shift
;
$output
->
progress
(
"$wine_dir: searching for *.$extension"
);
my
@
spec_
files
=
map
{
my
@files
=
map
{
s%^\./%%
;
s%^$wine_dir/%%
;
if
(
file_type
(
$_
)
eq
"winelib"
)
{
if
(
file_type
(
$_
)
eq
$type
)
{
$_
;
}
else
{
();
}
}
split
(
/\n/
,
`find $wine_dir -name \\*.
spec
`
);
}
split
(
/\n/
,
`find $wine_dir -name \\*.
$extension
`
);
return
@
spec_
files
;
return
@files
;
}
sub
get_c_files
{
return
_get_files
(
"c"
,
@_
);
}
sub
get_h_files
{
return
_get_files
(
"h"
,
@_
);
}
sub
get_spec_files
{
return
_get_files
(
"spec"
,
@_
);
}
1
;
tools/winapi/output.pm
View file @
d07a646f
...
...
@@ -34,11 +34,13 @@ sub new {
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_progress
=
\
$
{
$self
->
{
LAST_PROGRESS
}};
my
$last_time
=
\
$
{
$self
->
{
LAST_TIME
}};
my
$progress_count
=
\
$
{
$self
->
{
PROGRESS_COUNT
}};
my
$prefix
=
\
$
{
$self
->
{
PREFIX
}};
$$progress
=
""
;
$$last_progress
=
""
;
$$last_time
=
0
;
$$progress_count
=
0
;
$$prefix
=
""
;
...
...
@@ -107,10 +109,26 @@ sub update_progress {
sub
progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_time
=
\
$
{
$self
->
{
LAST_TIME
}};
$$progress
=
shift
;
$self
->
update_progress
;
$$last_time
=
0
;
}
sub
lazy_progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_time
=
\
$
{
$self
->
{
LAST_TIME
}};
$$progress
=
shift
;
my
$time
=
time
();
if
(
$time
-
$$last_time
>
0
)
{
$self
->
update_progress
;
$$last_time
=
$time
;
}
}
sub
prefix
{
...
...
tools/winapi/setup.pm
View file @
d07a646f
...
...
@@ -50,9 +50,7 @@ BEGIN {
exit
1
;
}
push
@INC
,
(
$winapi_check_dir
,
$winapi_dir
)
if
$tool
eq
"winapi_check"
;
push
@INC
,
(
$winapi_dir
,
$winapi_check_dir
)
if
$tool
eq
"winapi_extract"
;
push
@INC
,
(
$winapi_dir
,
$winapi_check_dir
)
if
$tool
eq
"winapi_fixup"
;
push
@INC
,
(
$winapi_dir
,
$winapi_check_dir
);
}
1
;
tools/winapi/winapi_extract
View file @
d07a646f
...
...
@@ -55,7 +55,7 @@ my %module2type;
{
local
$_
;
foreach
my
$spec_file
(
get_spec_files
)
{
foreach
my
$spec_file
(
get_spec_files
(
"winelib"
)
)
{
my
$module
;
my
$type
;
...
...
@@ -177,13 +177,15 @@ sub statements_stub {
}
}
my
@files
=
files_skip
(
$options
->
c_files
);
my
@c_files
=
$options
->
c_files
;
@c_files
=
files_skip
(
@c_files
);
@c_files
=
files_filter
(
"winelib"
,
@c_files
);
my
$progress_output
;
my
$progress_current
=
0
;
my
$progress_max
=
scalar
(
@files
);
my
$progress_max
=
scalar
(
@
c_
files
);
foreach
my
$file
(
@files
)
{
foreach
my
$file
(
@
c_
files
)
{
my
%
functions
;
$progress_current
++
;
...
...
tools/winapi_check/modules.pm
View file @
d07a646f
...
...
@@ -133,6 +133,10 @@ sub is_allowed_module_in_file {
my
$dir
=
$file
;
$dir
=~
s/\/[^\/]*$//
;
if
(
$dir
=~
m%^include%
)
{
return
1
;
}
foreach
my
$spec_file
(
sort
(
keys
(
%
{
$$dir2spec_file
{
$dir
}})))
{
if
(
$$spec_file2module
{
$spec_file
}
eq
$module
)
{
return
1
;
...
...
tools/winapi_check/output.pm
deleted
100644 → 0
View file @
fcef0261
package
output
;
use
strict
;
my
$stdout_isatty
=
-
t
STDOUT
;
my
$stderr_isatty
=
-
t
STDERR
;
sub
new
{
my
$proto
=
shift
;
my
$class
=
ref
(
$proto
)
||
$proto
;
my
$self
=
{};
bless
(
$self
,
$class
);
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_progress
=
\
$
{
$self
->
{
LAST_PROGRESS
}};
my
$progress_count
=
\
$
{
$self
->
{
PROGRESS_COUNT
}};
my
$prefix
=
\
$
{
$self
->
{
PREFIX
}};
$$progress
=
""
;
$$last_progress
=
""
;
$$progress_count
=
0
;
$$prefix
=
""
;
return
$self
;
}
sub
show_progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_progress
=
\
$
{
$self
->
{
LAST_PROGRESS
}};
my
$progress_count
=
\
$
{
$self
->
{
PROGRESS_COUNT
}};
$$progress_count
++
;
if
(
$$progress_count
>
0
&&
$$progress
&&
$stderr_isatty
)
{
print
STDERR
$$progress
;
$$last_progress
=
$$progress
;
}
}
sub
hide_progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_progress
=
\
$
{
$self
->
{
LAST_PROGRESS
}};
my
$progress_count
=
\
$
{
$self
->
{
PROGRESS_COUNT
}};
$$progress_count
--
;
if
(
$$last_progress
&&
$stderr_isatty
)
{
my
$message
;
for
(
1
..
length
(
$$last_progress
))
{
$message
.=
" "
;
}
print
STDERR
$message
;
undef
$$last_progress
;
}
}
sub
update_progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
my
$last_progress
=
\
$
{
$self
->
{
LAST_PROGRESS
}};
my
$prefix
=
""
;
my
$suffix
=
""
;
if
(
$$last_progress
)
{
for
(
1
..
length
(
$$last_progress
))
{
$prefix
.=
""
;
}
my
$diff
=
length
(
$$last_progress
)
-
length
(
$$progress
);
if
(
$diff
>
0
)
{
for
(
1
..
$diff
)
{
$suffix
.=
" "
;
}
for
(
1
..
$diff
)
{
$suffix
.=
""
;
}
}
}
print
STDERR
$prefix
.
$$progress
.
$suffix
;
$$last_progress
=
$$progress
;
}
sub
progress
{
my
$self
=
shift
;
my
$progress
=
\
$
{
$self
->
{
PROGRESS
}};
$$progress
=
shift
;
$self
->
update_progress
;
}
sub
prefix
{
my
$self
=
shift
;
my
$prefix
=
\
$
{
$self
->
{
PREFIX
}};
$$prefix
=
shift
;
}
sub
write
{
my
$self
=
shift
;
my
$message
=
shift
;
my
$prefix
=
\
$
{
$self
->
{
PREFIX
}};
$self
->
hide_progress
if
$stdout_isatty
;
print
$$prefix
.
$message
;
$self
->
show_progress
if
$stdout_isatty
;
}
1
;
tools/winapi_check/win32/msvcrt.api
View file @
d07a646f
...
...
@@ -14,8 +14,6 @@ MSVCRT_time_t
WCHAR
int
long
size_t
time_t
unsigned int
unsigned long
...
...
@@ -56,7 +54,6 @@ bad_typeid *
char *
char **
char ***
double *
exception *
int *
jmp_buf
...
...
@@ -66,13 +63,12 @@ struct _stat *
struct _timeb *
struct _utimbuf *
struct _wfinddata_t *
struct tm *
terminate_function
time_t *
type_info *
unexpected_function
unsigned char *
unsigned int *
unsigned long *
va_list
void *
...
...
tools/winapi_check/win32/ole32.api
View file @
d07a646f
...
...
@@ -84,7 +84,6 @@ REFGUID
REFIID
SNB
STGMEDIUM *
WCHAR *
WORD *
void *
void **
...
...
tools/winapi_check/win32/shell32.api
View file @
d07a646f
...
...
@@ -89,6 +89,10 @@ REFCLSID
REFIID
UINT *
%ptr # --forbidden
int *
%str
LPCSTR
...
...
tools/winapi_check/winapi.pm
View file @
d07a646f
...
...
@@ -26,6 +26,10 @@ sub new {
$$name
=
shift
;
my
$path
=
shift
;
if
(
$$options
->
progress
)
{
$$output
->
progress
(
"$path: searching for *.api"
);
}
my
@files
=
map
{
s%^\./%%
;
$_
;
...
...
@@ -33,6 +37,11 @@ sub new {
foreach
my
$file
(
@files
)
{
my
$module
=
$file
;
if
(
$$options
->
progress
)
{
$$output
->
lazy_progress
(
"$file"
);
}
$module
=~
s/.*?\/([^\/]*?)\.api$/$1/
;
$self
->
parse_api_file
(
$file
,
$module
);
}
...
...
@@ -289,7 +298,7 @@ sub parse_spec_file {
my
$module_file
;
if
(
$$options
->
progress
)
{
$$output
->
progress
(
"$file"
);
$$output
->
lazy_
progress
(
"$file"
);
}
open
(
IN
,
"< $file"
)
||
die
"$file: $!\n"
;
...
...
@@ -585,24 +594,6 @@ sub all_declared_types {
return
sort
(
keys
(
%
$translate_argument
));
}
sub
found_type
{
my
$self
=
shift
;
my
$type_found
=
\%
{
$self
->
{
TYPE_FOUND
}};
my
$name
=
shift
;
$$type_found
{
$name
}
++
;
}
sub
type_found
{
my
$self
=
shift
;
my
$type_found
=
\%
{
$self
->
{
TYPE_FOUND
}};
my
$name
=
shift
;
return
$$type_found
{
$name
};
}
sub
is_allowed_type_format
{
my
$self
=
shift
;
my
$type_format
=
\%
{
$self
->
{
TYPE_FORMAT
}};
...
...
@@ -734,13 +725,6 @@ sub all_functions_stub_in_module {
return
sort
(
keys
(
%
{
$$function_stub
{
$module
}}));
}
sub
all_internal_functions_found
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
return
sort
(
keys
(
%
$function_found
));
}
sub
function_internal_ordinal
{
my
$self
=
shift
;
my
$function_internal_ordinal
=
\%
{
$self
->
{
FUNCTION_INTERNAL_ORDINAL
}};
...
...
@@ -892,24 +876,6 @@ sub is_function_stub_in_module {
return
$$function_stub
{
$module
}{
$name
};
}
sub
found_internal_function
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
my
$name
=
shift
;
$$function_found
{
$name
}
++
;
}
sub
internal_function_found
{
my
$self
=
shift
;
my
$function_found
=
\%
{
$self
->
{
FUNCTION_FOUND
}};
my
$name
=
shift
;
return
$$function_found
{
$name
};
}
########################################################################
# class methods
#
...
...
tools/winapi_check/winapi_check
View file @
d07a646f
This diff is collapsed.
Click to expand it.
tools/winapi_check/winapi_function.pm
View file @
d07a646f
...
...
@@ -22,6 +22,13 @@ sub new {
}
########################################################################
# is_win
#
sub
is_win16
{
my
$self
=
shift
;
return
defined
(
$self
->
_module
(
$win16api
,
@_
));
}
sub
is_win32
{
my
$self
=
shift
;
return
defined
(
$self
->
_module
(
$win32api
,
@_
));
}
########################################################################
# external_name
#
...
...
@@ -190,6 +197,7 @@ sub prefix {
my
$module32
=
$self
->
module32
;
my
$file
=
$self
->
file
;
my
$function_line
=
$self
->
function_line
;
my
$return_type
=
$self
->
return_type
;
my
$internal_name
=
$self
->
internal_name
;
my
$calling_convention
=
$self
->
calling_convention
;
...
...
@@ -208,7 +216,12 @@ sub prefix {
push
@modules
,
$module
;
$used
{
$module
}
++
;
}
$prefix
.=
"$file: "
;
$prefix
.=
"$file:"
;
if
(
defined
(
$function_line
))
{
$prefix
.=
"$function_line: "
;
}
else
{
$prefix
.=
"<>: "
;
}
if
(
$#modules
>=
0
)
{
$prefix
.=
join
(
" & "
,
@modules
)
.
": "
;
}
else
{
...
...
tools/winapi_check/winapi_global.pm
View file @
d07a646f
...
...
@@ -7,12 +7,13 @@ sub check {
my
$output
=
shift
;
my
$winapi
=
shift
;
my
$nativeapi
=
shift
;
my
$type_found
=
shift
;
my
$winver
=
$winapi
->
name
;
if
(
$options
->
argument
)
{
foreach
my
$type
(
$winapi
->
all_declared_types
)
{
if
(
!
$
winapi
->
type_found
(
$type
)
&&
!
$winapi
->
is_limited_type
(
$type
)
&&
$type
ne
"CONTEXT86 *"
)
{
if
(
!
$
$type_found
{
$type
}
&&
!
$winapi
->
is_limited_type
(
$type
)
&&
$type
ne
"CONTEXT86 *"
)
{
$output
->
write
(
"*.c: $winver: "
);
$output
->
write
(
"type ($type) not used\n"
);
}
...
...
tools/winapi_check/winapi_options.pm
View file @
d07a646f
...
...
@@ -118,9 +118,12 @@ my %options = (
"implemented"
=>
{
default
=>
0
,
parent
=>
"local"
,
description
=>
"implemented checking"
},
"implemented-win32"
=>
{
default
=>
0
,
parent
=>
"implemented"
,
description
=>
"implemented as win32 checking"
},
"include"
=>
{
default
=>
1
,
parent
=>
"global"
,
description
=>
"include checking"
},
"headers"
=>
{
default
=>
0
,
parent
=>
"global"
,
description
=>
"headers checking"
},
"headers"
=>
{
default
=>
0
,
description
=>
"headers checking"
},
"headers-duplicated"
=>
{
default
=>
0
,
parent
=>
"headers"
,
description
=>
"duplicated function declarations checking"
},
"headers-misplaced"
=>
{
default
=>
0
,
parent
=>
"headers"
,
description
=>
"misplaced function declarations checking"
},
"headers-needed"
=>
{
default
=>
1
,
parent
=>
"headers"
,
description
=>
"headers needed checking"
},
"headers-unused"
=>
{
default
=>
0
,
parent
=>
"headers"
,
description
=>
"headers unused checking"
},
);
my
%
short_options
=
(
...
...
@@ -147,6 +150,7 @@ sub new {
my
$h_files
=
\
@
{
$self
->
{
H_FILES
}};
my
$module
=
\
$
{
$self
->
{
MODULE
}};
my
$global
=
\
$
{
$self
->
{
GLOBAL
}};
my
$headers
=
\
$
{
$self
->
{
HEADERS
}};
my
@files
;
...
...
@@ -285,11 +289,14 @@ sub new {
}
}
if
(
$#h_files
>=
0
)
{
$$headers
=
1
;
}
if
(
$#c_files
==
-
1
&&
$#h_files
==
-
1
&&
(
$#paths
==
-
1
||
(
$#paths
==
0
&&
$paths
[
0
]
eq
$wine_dir
)))
{
@paths
=
"."
;
push
@h_files
,
"$wine_dir/include"
;
}
else
{
$$global
=
0
;
}
...
...
@@ -308,8 +315,8 @@ sub new {
}
split
(
/\n/
,
`$c_command`
));
}
if
(
$#h_files
!=
-
1
)
{
my
$h_command
=
"find "
.
join
(
" "
,
@h_files
)
.
" -name \\*.h"
;
if
(
$#
paths
!=
-
1
||
$#
h_files
!=
-
1
)
{
my
$h_command
=
"find "
.
join
(
" "
,
@
paths
,
@
h_files
)
.
" -name \\*.h"
;
my
%
found
;
@$h_files
=
sort
(
map
{
...
...
tools/winapi_check/winapi_parser.pm
View file @
d07a646f
...
...
@@ -62,8 +62,9 @@ sub parse_c_file {
$function
->
file
(
$file
);
$function
->
debug_channels
([
@$debug_channels
]);
$function
->
documentation
(
$documentation
);
$function
->
documentation_line
(
$documentation_line
);
$function
->
documentation
(
$documentation
);
$function
->
function_line
(
$function_line
);
$function
->
linkage
(
$linkage
);
$function
->
return_type
(
$return_type
);
$function
->
calling_convention
(
$calling_convention
);
...
...
@@ -255,8 +256,8 @@ sub parse_c_file {
if
(
$internal_name
&&
$level
==
0
)
{
&
$function_end
;
}
next
;
}
elsif
(
/
(
extern
\
s
+|
static
\
s
+
)?((
struct
\
s
+|
union
\
s
+|
enum
\
s
+
)?
\
w
+
((
\
s
*\*
)
+\
s
*|\
s
+
))
next
;
}
elsif
(
/
(
extern
\
s
+|
static
\
s
+
)?((
struct
\
s
+|
union
\
s
+|
enum
\
s
+
|
signed
\
s
+|
unsigned
\
s
+
)?
\
w
+
((
\
s
*\*
)
+\
s
*|\
s
+
))
((
__cdecl
|
__stdcall
|
CDECL
|
VFWAPIV
|
VFWAPI
|
WINAPIV
|
WINAPI
|
CALLBACK
)
\
s
+
)?
(
\
w
+
(
\
(
\
w
+\
))?)
\
s
*\
(([
^\
)]
*
)
\
)
\
s
*
(
\
{
|\
;)
/
sx
)
{
...
...
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