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
a896531f
Commit
a896531f
authored
Nov 30, 2000
by
Patrik Stridvall
Committed by
Alexandre Julliard
Nov 30, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added new option --documentation-arguments
- Minor API files update
parent
1ed55775
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
17 deletions
+63
-17
modules.dat
tools/winapi_check/modules.dat
+0
-2
nativeapi.dat
tools/winapi_check/nativeapi.dat
+3
-1
toolhelp.api
tools/winapi_check/win16/toolhelp.api
+4
-0
crtdll.api
tools/winapi_check/win32/crtdll.api
+0
-1
winapi.pm
tools/winapi_check/winapi.pm
+5
-2
winapi_check
tools/winapi_check/winapi_check
+17
-1
winapi_local.pm
tools/winapi_check/winapi_local.pm
+1
-1
winapi_options.pm
tools/winapi_check/winapi_options.pm
+1
-0
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+32
-9
No files found.
tools/winapi_check/modules.dat
View file @
a896531f
...
...
@@ -354,7 +354,6 @@ dlls/version
% dlls/win32s/w32skrnl.spec
dlls/win32s
loader
% dlls/win32s/w32sys.spec
...
...
@@ -450,7 +449,6 @@ dlls/wsock32
% dlls/winspool/winspool.drv.spec
dlls/winspool
win32
% dlls/wow32/wow32.spec
...
...
tools/winapi_check/nativeapi.dat
View file @
a896531f
...
...
@@ -45,7 +45,7 @@ ctime
div
dup
dup2
e
nviron
e
cvt
errno
execlp
execvp
...
...
@@ -54,6 +54,7 @@ exp
fabs
fclose
fcntl
fcvt
fdopen
feof
fflush
...
...
@@ -79,6 +80,7 @@ fsync
ftell
ftruncate
fwrite
gcvt
getc
getcwd
getenv
...
...
tools/winapi_check/win16/toolhelp.api
View file @
a896531f
...
...
@@ -31,6 +31,10 @@ FARPROC16
LPCSTR
%void
void
%word
BOOL16
...
...
tools/winapi_check/win32/crtdll.api
View file @
a896531f
...
...
@@ -27,7 +27,6 @@ unsigned long
%longlong
LONGLONG
ULONGLONG
%ptr
...
...
tools/winapi_check/winapi.pm
View file @
a896531f
...
...
@@ -268,7 +268,10 @@ sub parse_spec_file {
}
my
$ordinal
;
if
(
/^(\d+|@)\s+(pascal|pascal16|stdcall|stdcall64|cdecl|register|interrupt|varargs)\s+(\S+)\s*\(\s*(.*?)\s*\)\s*(\S+)$/
)
{
if
(
/^
(
\
d
+|
@
)
\
s
+
(
pascal
|
pascal16
|
stdcall
|
cdecl
|
register
|
interrupt
|
varargs
)
(?:
\
s
+
(?:
-
noimport
|-
norelay
|-
i386
|-
ret64
))
*\
s
+
(
\
S
+
)
\
s
*\
(
\
s
*
(
.*
?)
\
s
*\
)
\
s
*
(
\
S
+
)
$
/
x
)
{
my
$calling_convention
=
$2
;
my
$external_name
=
$3
;
my
$arguments
=
$4
;
...
...
@@ -350,7 +353,7 @@ sub parse_spec_file {
my
$forward_name
=
$4
;
$$function_forward
{
$external_name
}
=
"$module:$forward_module.$forward_name"
;
}
elsif
(
/^(\d+|@)\s+(equate|
long|word|extern|forward
)/
)
{
}
elsif
(
/^(\d+|@)\s+(equate|
extern|variable
)/
)
{
# ignore
}
else
{
my
$next_line
=
<
IN
>
;
...
...
tools/winapi_check/winapi_check
View file @
a896531f
...
...
@@ -192,6 +192,8 @@ if($options->headers) {
my
@argument_types
=
@$refargument_types
;
my
$refargument_names
=
shift
;
my
@argument_names
=
@$refargument_names
;
my
$refargument_documentations
=
shift
;
my
@argument_documentations
=
@$refargument_documentations
;
my
$statements
=
shift
;
foreach
my
$winapi
(
@winapis
)
{
...
...
@@ -273,6 +275,8 @@ foreach my $file ($options->c_files) {
my
@argument_types
=
@$refargument_types
;
my
$refargument_names
=
shift
;
my
@argument_names
=
@$refargument_names
;
my
$refargument_documentations
=
shift
;
my
@argument_documentations
=
@$refargument_documentations
;
my
$statements
=
shift
;
my
$external_name16
=
$win16api
->
function_external_name
(
$internal_name
);
...
...
@@ -480,7 +484,7 @@ foreach my $file ($options->c_files) {
}
if
(
$documentation
!~
/\b($internal_name|$name1|$name2)\b/
)
{
$output
->
write
(
"\\\n$documentation\n"
);
$output
->
write
(
"
documentation:
\\\n$documentation\n"
);
}
if
(
$options
->
documentation_width
)
{
...
...
@@ -493,6 +497,18 @@ foreach my $file ($options->c_files) {
}
}
}
if
(
$options
->
documentation_arguments
)
{
my
$n
=
0
;
for
my
$argument_documentation
(
@argument_documentations
)
{
$n
++
;
if
(
$argument_documentation
ne
""
)
{
if
(
$argument_documentation
!~
/^\/\*\s+\[(?:in|out|in\/out)\].*?\*\/$/
)
{
$output
->
write
(
"argument $n documentation: \\\n$argument_documentation\n"
);
}
}
}
}
}
$output
->
prefix
(
""
);
}
...
...
tools/winapi_check/winapi_local.pm
View file @
a896531f
...
...
@@ -76,7 +76,7 @@ sub check_function {
$implemented_calling_convention
=
"varargs"
;
}
elsif
(
$calling_convention
=~
/^__stdcall|VFWAPI|WINAPI|CALLBACK$/
)
{
if
(
$implemented_return_kind
=~
/^longlong$/
)
{
$implemented_calling_convention
=
"stdcall
64"
;
$implemented_calling_convention
=
"stdcall
"
;
# FIXME: Check entry flags
}
else
{
$implemented_calling_convention
=
"stdcall"
;
}
...
...
tools/winapi_check/winapi_options.pm
View file @
a896531f
...
...
@@ -73,6 +73,7 @@ my %options = (
"debug-messages"
=>
{
default
=>
0
,
parent
=>
"statements"
,
description
=>
"check for debug messages inconsistances"
},
"documentation"
=>
{
default
=>
1
,
parent
=>
"local"
,
description
=>
"check for documentation inconsistances\n"
},
"documentation-width"
=>
{
default
=>
0
,
parent
=>
"documentation"
,
description
=>
"check for documentation width inconsistances\n"
},
"documentation-arguments"
=>
{
default
=>
0
,
parent
=>
"documentation"
,
description
=>
"check for arguments documentation inconsistances\n"
},
"prototype"
=>
{
default
=>
0
,
parent
=>
[
"local"
,
"headers"
],
description
=>
"prototype checking"
},
"global"
=>
{
default
=>
1
,
description
=>
"global checking"
},
...
...
tools/winapi_check/winapi_parser.pm
View file @
a896531f
...
...
@@ -16,6 +16,7 @@ sub parse_c_file {
my
$function
=
""
;
my
$argument_types
;
my
$argument_names
;
my
$argument_documentations
;
my
$statements
;
my
$function_begin
=
sub
{
...
...
@@ -26,18 +27,26 @@ sub parse_c_file {
$function
=
shift
;
$argument_types
=
shift
;
$argument_names
=
shift
;
$argument_documentations
=
shift
;
if
(
$#$argument_names
==
-
1
)
{
foreach
my
$n
(
0
..
$#$argument_types
)
{
push
@$argument_names
,
""
;
}
}
if
(
$#$argument_documentations
==
-
1
)
{
foreach
my
$n
(
0
..
$#$argument_documentations
)
{
push
@$argument_documentations
,
""
;
}
}
$statements
=
""
;
};
my
$function_end
=
sub
{
&
$function_found_callback
(
$documentation
,
$linkage
,
$return_type
,
$calling_convention
,
$function
,
$argument_types
,
$argument_names
,
$statements
);
&
$function_found_callback
(
$documentation
,
$linkage
,
$return_type
,
$calling_convention
,
$function
,
$argument_types
,
$argument_names
,
$argument_documentations
,
$statements
);
$function
=
""
;
};
...
...
@@ -113,12 +122,21 @@ sub parse_c_file {
next
;
}
my
$documentation
;
my
$documentation
;
my
@argument_documentations
;
{
my
$n
=
$#comments
;
while
(
$n
>=
0
&&
(
$comments
[
$n
]
!~
/^\/\*\*/
||
$comments
[
$n
]
=~
/^\/\*\*+\//
))
{
$n
--
}
while
(
$n
>=
0
&&
(
$comments
[
$n
]
!~
/^\/\*\*/
||
$comments
[
$n
]
=~
/^\/\*\*+\//
))
{
$n
--
;
}
if
(
defined
(
$comments
[
$n
])
&&
$n
>=
0
)
{
$documentation
=
$comments
[
$n
];
for
(
my
$m
=
$n
+
1
;
$m
<=
$#comments
;
$m
++
)
{
push
@argument_documentations
,
$comments
[
$m
];
}
}
else
{
$documentation
=
""
;
}
...
...
@@ -228,7 +246,7 @@ sub parse_c_file {
$arguments
=~
y
/\t\n/
/
;
$arguments
=~
s/^\s*(.*?)\s*$/$1/
;
if
(
$arguments
eq
""
)
{
$arguments
=
"void"
}
my
@argument_types
;
my
@argument_names
;
my
@arguments
=
split
(
/,/
,
$arguments
);
...
...
@@ -243,7 +261,12 @@ sub parse_c_file {
if
(
$argument
=~
/^\.\.\.$/
)
{
$argument_type
=
"..."
;
$argument_name
=
"..."
;
}
elsif
(
$argument
=~
/^((?:struct\s+|union\s+|enum\s+|(?:signed\s+|unsigned\s+)(?:short\s+(?=int)|long\s+(?=int))?)?\w+)\s*((?:const)?\s*(?:\*\s*?)*)\s*(?:WINE_UNUSED\s+)?(\w*)\s*(?:\[\]|\s+OPTIONAL)?/
)
{
}
elsif
(
$argument
=~
/^
((?:
struct
\
s
+|
union
\
s
+|
enum
\
s
+|
(?:
signed
\
s
+|
unsigned
\
s
+
)
(?:
short
\
s
+
(?
=
int
)
|
long
\
s
+
(?
=
int
))?)?
\
w
+
)
\
s
*
((?:
const
)?
\
s
*
(?:
\*\
s
*
?)
*
)
\
s
*
(?:
WINE_UNUSED
\
s
+
)?(
\
w
*
)
\
s
*
(?:
\
[
\
]
|\
s
+
OPTIONAL
)?
/
x
)
{
$argument_type
=
"$1"
;
if
(
$2
ne
""
)
{
$argument_type
.=
" $2"
;
...
...
@@ -269,8 +292,8 @@ sub parse_c_file {
if
(
$options
->
debug
)
{
print
"$file: $return_type $calling_convention $name("
.
join
(
","
,
@arguments
)
.
")\n"
;
}
&
$function_begin
(
$documentation
,
$linkage
,
$return_type
,
$calling_convention
,
$name
,
\
@argument_types
,
\
@argument_names
);
&
$function_begin
(
$documentation
,
$linkage
,
$return_type
,
$calling_convention
,
$name
,
\
@argument_types
,
\
@argument_names
,
\
@argument_documentations
);
if
(
$level
==
0
)
{
&
$function_end
;
}
...
...
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