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
9b28bd0a
Commit
9b28bd0a
authored
Jan 26, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winapi_check: Print the line number when an error or warning is found in the API files.
parent
6a45cd1b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
winapi.pm
tools/winapi/winapi.pm
+6
-4
No files found.
tools/winapi/winapi.pm
View file @
9b28bd0a
...
...
@@ -139,7 +139,9 @@ sub parse_api_file($$) {
open
(
IN
,
"< $winapi_dir/$file"
)
||
die
"$winapi_dir/$file: $!\n"
;
$/
=
"\n"
;
my
$linenum
=
0
;
while
(
<
IN
>
)
{
$linenum
++
;
s/^\s*?(.*?)\s*$/$1/
;
# remove whitespace at begin and end of line
s/^(.*?)\s*#.*$/$1/
;
# remove comments
/^$/
&&
next
;
# skip empty lines
...
...
@@ -193,12 +195,12 @@ sub parse_api_file($$) {
if
(
!
$forbidden
)
{
if
(
defined
(
$module
))
{
if
(
$$allowed_modules_unlimited
{
$type
})
{
$output
->
write
(
"$file: type ($type) already specified as an unlimited type\n"
);
$output
->
write
(
"$file:
$linenum:
type ($type) already specified as an unlimited type\n"
);
}
elsif
(
!
$$allowed_modules
{
$type
}{
$module
})
{
$$allowed_modules
{
$type
}{
$module
}
=
1
;
$$allowed_modules_limited
{
$type
}
=
1
;
}
else
{
$output
->
write
(
"$file: type ($type) already specified\n"
);
$output
->
write
(
"$file:
$linenum:
type ($type) already specified\n"
);
}
}
else
{
$$allowed_modules_unlimited
{
$type
}
=
1
;
...
...
@@ -207,14 +209,14 @@ sub parse_api_file($$) {
$$allowed_modules_limited
{
$type
}
=
1
;
}
if
(
defined
(
$$translate_argument
{
$type
})
&&
$$translate_argument
{
$type
}
ne
$kind
)
{
$output
->
write
(
"$file: type ($type) respecified as different kind ($kind != $$translate_argument{$type})\n"
);
$output
->
write
(
"$file:
$linenum:
type ($type) respecified as different kind ($kind != $$translate_argument{$type})\n"
);
}
else
{
$$translate_argument
{
$type
}
=
$kind
;
}
$$type_format
{
$module
}{
$type
}
=
$format
;
}
else
{
$output
->
write
(
"$file: file must begin with %<type> statement\n"
);
$output
->
write
(
"$file:
$linenum:
file must begin with %<type> statement\n"
);
exit
1
;
}
}
...
...
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