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
c56ed505
Commit
c56ed505
authored
Apr 29, 2002
by
Patrik Stridvall
Committed by
Alexandre Julliard
Apr 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- API files update.
- Fixed parser to handle C/C++ comments in strings. - Report if C++ comments are used.
parent
4c692b9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
158 additions
and
23 deletions
+158
-23
winapi_check_options.pm
tools/winapi/winapi_check_options.pm
+11
-0
modules.dat
tools/winapi_check/modules.dat
+10
-0
comctl32.api
tools/winapi_check/win32/comctl32.api
+1
-0
crypt32.api
tools/winapi_check/win32/crypt32.api
+4
-0
gdi32.api
tools/winapi_check/win32/gdi32.api
+5
-0
msisys.api
tools/winapi_check/win32/msisys.api
+9
-0
urlmon.api
tools/winapi_check/win32/urlmon.api
+22
-2
ws2_32.api
tools/winapi_check/win32/ws2_32.api
+1
-0
winapi_check
tools/winapi_check/winapi_check
+65
-3
winapi_options.pm
tools/winapi_check/winapi_options.pm
+0
-0
winapi_parser.pm
tools/winapi_check/winapi_parser.pm
+30
-18
No files found.
tools/winapi/winapi_check_options.pm
View file @
c56ed505
...
...
@@ -85,6 +85,17 @@ my %options_long = (
},
"debug-messages"
=>
{
default
=>
0
,
parent
=>
"statements"
,
description
=>
"check for debug messages inconsistances"
},
"comments"
=>
{
default
=>
1
,
parent
=>
"local"
,
description
=>
"comments checking"
},
"comments-cplusplus"
=>
{
default
=>
1
,
parent
=>
"comments"
,
description
=>
"C++ comments checking"
},
"documentation"
=>
{
default
=>
1
,
parent
=>
"local"
,
...
...
tools/winapi_check/modules.dat
View file @
c56ed505
...
...
@@ -34,6 +34,8 @@ dlls/crtdll
% dlls/crypt32/crypt32.spec
dlls/crypt32
% dlls/dciman32/dciman32.spec
dlls/dciman32
...
...
@@ -140,6 +142,10 @@ dlls/mapi32
dlls/msimg32
% dlls/msisys/msisys.ocx.spec
dlls/msisys
% dlls/msrle32/msrle32.spec
dlls/msrle32
...
...
@@ -359,6 +365,10 @@ dlls/shdocvw
dlls/shlwapi
% dlls/snmpapi/snmpapi.spec
dlls/snmpapi
% dlls/tapi32/tapi32.spec
dlls/tapi32
...
...
tools/winapi_check/win32/comctl32.api
View file @
c56ed505
...
...
@@ -85,3 +85,4 @@ LPWSTR
%void
VOID
void
tools/winapi_check/win32/crypt32.api
0 → 100644
View file @
c56ed505
%long
BOOL
DWORD
tools/winapi_check/win32/gdi32.api
View file @
c56ed505
...
...
@@ -28,6 +28,9 @@ WORD
HDC16
HMETAFILE16
HPJOB16
INT16
int
%ptr
...
...
@@ -89,6 +92,7 @@ LPRGNDATA
LPSIZE
LPVOID
LPVOID *
LPWORD
LPXFORM
MAT2 *
METAFILEPICT *
...
...
@@ -105,6 +109,7 @@ RGBQUAD *
RGNDATA *
TEXTMETRICA *
TEXTMETRICW *
WORD *
XFORM *
void *
...
...
tools/winapi_check/win32/msisys.api
0 → 100644
View file @
c56ed505
%long
HRESULT
%ptr
CLSID *
IID *
void **
tools/winapi_check/win32/urlmon.api
View file @
c56ed505
...
...
@@ -3,27 +3,47 @@
BOOL
DWORD
HRESULT
UINT
long
%ptr
BINDINFO *
CLIPFORMAT *
CLSID *
DWORD *
FORMATETC *
HIT_LOGGING_INFO *
IBindCtx *
IBindCtx **
IBindStatusCallback *
IBindStatusCallback **
IEnumFORMATETC *
IEnumFORMATETC **
IID *
IMoniker *
IMoniker **
IStream **
IUnknown *
LPCSTR *
LPVOID
LPVOID *
REFCLSID
REFIID
LPWSTR *
SOFTDISTINFO *
ULONG *
void *
void **
%str
LPCSTR
LPSTR
%wstr
LPCWSTR
LPWSTR
%void
void
tools/winapi_check/win32/ws2_32.api
View file @
c56ed505
...
...
@@ -24,6 +24,7 @@ LPCONDITIONPROC
LPDWORD
LPGUID
LPINT
LPQOS
LPVOID
LPWPUPOSTMESSAGE
LPWSABUF
...
...
tools/winapi_check/winapi_check
View file @
c56ed505
...
...
@@ -150,6 +150,29 @@ if($options->headers) {
$progress_current
++
;
$output
->
progress
(
"$file: file $progress_current of $progress_max"
);
my
$found_c_comment
=
sub
{
my
$begin_line
=
shift
;
my
$end_line
=
shift
;
my
$comment
=
shift
;
if
(
0
)
{
if
(
$begin_line
==
$end_line
)
{
$output
->
write
(
"$file:$begin_line: $comment\n"
);
}
else
{
$output
->
write
(
"$file:$begin_line-$end_line: \\\n$comment\n"
);
}
}
};
my
$found_cplusplus_comment
=
sub
{
my
$line
=
shift
;
my
$comment
=
shift
;
if
(
$options
->
comments_cplusplus
)
{
$output
->
write
(
"$file:$line: C++ comments not allowed: $comment\n"
);
}
};
my
$create_function
=
sub
{
return
'winapi_function'
->
new
;
};
...
...
@@ -205,7 +228,15 @@ if($options->headers) {
my
$argument
=
shift
;
};
&
winapi_parser::
parse_c_file
(
$file
,
$create_function
,
$found_function
,
$create_type
,
$found_type
,
$found_preprocessor
);
&
winapi_parser::
parse_c_file
(
$file
,
{
c_comment_found
=>
$found_c_comment
,
cplusplus_comment_found
=>
$found_cplusplus_comment
,
function_create
=>
$create_function
,
function_found
=>
$found_function
,
type_create
=>
$create_type
,
type_found
=>
$found_type
,
preprocessor_found
=>
$found_preprocessor
});
}
}
...
...
@@ -229,6 +260,29 @@ foreach my $file (@c_files) {
$file_dir
=
"."
;
}
my
$found_c_comment
=
sub
{
my
$begin_line
=
shift
;
my
$end_line
=
shift
;
my
$comment
=
shift
;
if
(
0
)
{
if
(
$begin_line
==
$end_line
)
{
$output
->
write
(
"$file:$begin_line: $comment\n"
);
}
else
{
$output
->
write
(
"$file:$begin_line-$end_line: \\\n$comment\n"
);
}
}
};
my
$found_cplusplus_comment
=
sub
{
my
$line
=
shift
;
my
$comment
=
shift
;
if
(
$options
->
comments_cplusplus
)
{
$output
->
write
(
"$file:$line: C++ comments not allowed: $comment\n"
);
}
};
my
$create_function
=
sub
{
return
'winapi_function'
->
new
;
};
...
...
@@ -568,8 +622,16 @@ foreach my $file (@c_files) {
}
};
&
winapi_parser::
parse_c_file
(
$file
,
$create_function
,
$found_function
,
$create_type
,
$found_type
,
$found_preprocessor
);
&
winapi_parser::
parse_c_file
(
$file
,
{
c_comment_found
=>
$found_c_comment
,
cplusplus_comment_found
=>
$found_cplusplus_comment
,
function_create
=>
$create_function
,
function_found
=>
$found_function
,
type_create
=>
$create_type
,
type_found
=>
$found_type
,
preprocessor_found
=>
$found_preprocessor
});
if
(
$options
->
config_unnessary
)
{
if
(
$config
&&
$conditional
==
0
)
{
$output
->
write
(
"$file: include2info config.h but do not use any conditionals\n"
);
...
...
tools/winapi_check/winapi_options.pm
deleted
100644 → 0
View file @
4c692b9b
This diff is collapsed.
Click to expand it.
tools/winapi_check/winapi_parser.pm
View file @
c56ed505
...
...
@@ -25,11 +25,17 @@ use options qw($options);
sub
parse_c_file
{
my
$file
=
shift
;
my
$function_create_callback
=
shift
;
my
$function_found_callback
=
shift
;
my
$type_create_callback
=
shift
;
my
$type_found_callback
=
shift
;
my
$preprocessor_found_callback
=
shift
;
my
$callbacks
=
shift
;
my
$empty_callback
=
sub
{
};
my
$c_comment_found_callback
=
$$callbacks
{
c_comment_found
}
||
$empty_callback
;
my
$cplusplus_comment_found_callback
=
$$callbacks
{
cplusplus_comment_found
}
||
$empty_callback
;
my
$function_create_callback
=
$$callbacks
{
function_create
}
||
$empty_callback
;
my
$function_found_callback
=
$$callbacks
{
function_found
}
||
$empty_callback
;
my
$type_create_callback
=
$$callbacks
{
type_create
}
||
$empty_callback
;
my
$type_found_callback
=
$$callbacks
{
type_found
}
||
$empty_callback
;
my
$preprocessor_found_callback
=
$$callbacks
{
preprocessor_found
}
||
$empty_callback
;
# global
my
$debug_channels
=
[]
;
...
...
@@ -185,25 +191,31 @@ sub parse_c_file {
}
# remove C comments
if
(
/^(.*?)(\/\*(.*?)\*\/)(.*)$/s
)
{
my
@lines
=
split
(
/\n/
,
$2
);
push
@comment_lines
,
$.
;
push
@comments
,
$2
;
if
(
$#lines
<=
0
)
{
$_
=
"$1 $4"
;
if
(
s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(?=\/\*)//s
)
{
my
$prefix
=
$1
;
if
(
s/^(\/\*.*?\*\/)//s
)
{
my
@lines
=
split
(
/\n/
,
$1
);
push
@comment_lines
,
$.
;
push
@comments
,
$1
;
&
$c_comment_found_callback
(
$.
-
$#lines
,
$.
,
$1
);
if
(
$#lines
<=
0
)
{
$_
=
"$prefix $_"
;
}
else
{
$_
=
$prefix
.
(
"\n"
x
$#lines
)
.
$_
;
}
$again
=
1
;
}
else
{
$_
=
$1
.
(
"\n"
x
$#lines
)
.
$4
;
$_
=
"$prefix$_"
;
$lookahead
=
1
;
}
$again
=
1
;
next
;
}
if
(
/^(.*?)\/\*/s
)
{
$lookahead
=
1
;
next
;
}
# remove C++ comments
while
(
s/^(.*?)\/\/.*?$/$1/s
)
{
$again
=
1
}
while
(
s/^([^\"\/]*?(?:\"[^\"]*?\"[^\"]*?)*?)(\/\/.*?)$/$1/s
)
{
&
$cplusplus_comment_found_callback
(
$.
,
$2
);
$again
=
1
;
}
if
(
$again
)
{
next
;
}
# remove preprocessor directives
...
...
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