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
ba517e57
Commit
ba517e57
authored
Feb 20, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winapi: Remove useless 'if (0)' statements.
parent
88619a80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
33 deletions
+11
-33
c_parser.pm
tools/winapi/c_parser.pm
+7
-21
make_parser.pm
tools/winapi/make_parser.pm
+3
-9
winapi_fixup_statements.pm
tools/winapi/winapi_fixup_statements.pm
+1
-3
No files found.
tools/winapi/c_parser.pm
View file @
ba517e57
...
...
@@ -604,9 +604,7 @@ sub parse_c_declaration($$$$$$$$$$$$) {
# Variable
my
$type
;
if
(
0
)
{
# Nothing
}
elsif
(
s/^WINE_(?:DEFAULT|DECLARE)_DEBUG_CHANNEL\s*\(\s*(\w+)\s*\)\s*//s
)
{
# FIXME: Wine specific kludge
if
(
s/^WINE_(?:DEFAULT|DECLARE)_DEBUG_CHANNEL\s*\(\s*(\w+)\s*\)\s*//s
)
{
# FIXME: Wine specific kludge
$self
->
_update_c_position
(
$&
,
\
$line
,
\
$column
);
}
elsif
(
s/^__ASM_GLOBAL_FUNC\(\s*(\w+)\s*,\s*//s
)
{
# FIXME: Wine specific kludge
$self
->
_update_c_position
(
$&
,
\
$line
,
\
$column
);
...
...
@@ -995,9 +993,7 @@ sub parse_c_file($$$$) {
}
if
(
0
)
{
# Nothing
}
elsif
(
$preprocessor
=~
/^\#\s*if/
)
{
if
(
$preprocessor
=~
/^\#\s*if/
)
{
if
(
$preprocessor
=~
/^\#\s*if\s*0/
)
{
$if0
++
;
}
elsif
(
$if0
>
0
)
{
...
...
@@ -1193,9 +1189,7 @@ sub parse_c_function($$$$$) {
my
$begin_line
=
$line
;
my
$begin_column
=
$column
+
1
;
if
(
0
)
{
# Nothing
}
elsif
(
$self
->
_parse_c
(
'__declspec\((?:dllexport|dllimport|naked)\)|INTERNETAPI|RPCRTAPI'
,
\
$_
,
\
$line
,
\
$column
))
{
if
(
$self
->
_parse_c
(
'__declspec\((?:dllexport|dllimport|naked)\)|INTERNETAPI|RPCRTAPI'
,
\
$_
,
\
$line
,
\
$column
))
{
# Nothing
}
...
...
@@ -1215,9 +1209,7 @@ sub parse_c_function($$$$$) {
}
}
if
(
0
)
{
# Nothing
}
elsif
(
$self
->
_parse_c
(
'DECL_GLOBAL_CONSTRUCTOR'
,
\
$_
,
\
$line
,
\
$column
,
\
$name
))
{
# FIXME: Wine specific kludge
if
(
$self
->
_parse_c
(
'DECL_GLOBAL_CONSTRUCTOR'
,
\
$_
,
\
$line
,
\
$column
,
\
$name
))
{
# FIXME: Wine specific kludge
# Nothing
}
elsif
(
$self
->
_parse_c
(
'WINE_EXCEPTION_FILTER\(\w+\)'
,
\
$_
,
\
$line
,
\
$column
,
\
$name
))
{
# FIXME: Wine specific kludge
# Nothing
...
...
@@ -1259,9 +1251,7 @@ sub parse_c_function($$$$$) {
}
if
(
0
)
{
# Nothing
}
elsif
(
$self
->
_parse_c
(
'__attribute__\s*\(\s*\(\s*(?:constructor|destructor)\s*\)\s*\)'
,
\
$_
,
\
$line
,
\
$column
))
{
if
(
$self
->
_parse_c
(
'__attribute__\s*\(\s*\(\s*(?:constructor|destructor)\s*\)\s*\)'
,
\
$_
,
\
$line
,
\
$column
))
{
# Nothing
}
...
...
@@ -1383,9 +1373,7 @@ sub parse_c_preprocessor($$$$) {
return
1
;
}
if
(
0
)
{
# Nothing
}
elsif
(
/^\#\s*define\s*(.*?)$/s
)
{
if
(
/^\#\s*define\s*(.*?)$/s
)
{
$self
->
_update_c_position
(
$_
,
\
$line
,
\
$column
);
}
elsif
(
/^\#\s*else/s
)
{
$self
->
_update_c_position
(
$_
,
\
$line
,
\
$column
);
...
...
@@ -1783,9 +1771,7 @@ sub parse_c_type($$$$$) {
$self
->
_parse_c
(
"(?:const|volatile)"
,
\
$_
,
\
$line
,
\
$column
);
if
(
0
)
{
# Nothing
}
elsif
(
$self
->
_parse_c
(
'ICOM_VTABLE\(.*?\)'
,
\
$_
,
\
$line
,
\
$column
,
\
$type
))
{
if
(
$self
->
_parse_c
(
'ICOM_VTABLE\(.*?\)'
,
\
$_
,
\
$line
,
\
$column
,
\
$type
))
{
# Nothing
}
elsif
(
$self
->
_parse_c
(
'(?:enum\s+|interface\s+|struct\s+|union\s+)?(?:(?:MSVCRT|WS)\(\s*\w+\s*\)|\w+)\s*(\*\s*)*'
,
\
$_
,
\
$line
,
\
$column
,
\
$type
))
...
...
tools/winapi/make_parser.pm
View file @
ba517e57
...
...
@@ -95,9 +95,7 @@ sub make_output($$) {
$file
=
""
;
$message
=
""
;
if
(
0
)
{
# Nothing
}
elsif
(
/^\*\*\* \[(.*?)\] Error (\d+)$/
)
{
if
(
/^\*\*\* \[(.*?)\] Error (\d+)$/
)
{
# Nothing
}
elsif
(
/^\*\*\* Error code (\d+)$/
)
{
# Nothing
...
...
@@ -294,9 +292,7 @@ sub gcc_output($$) {
if
(
s/^warning:\s+//
)
{
my
$suppress
=
0
;
if
(
0
)
{
# Nothing
}
elsif
(
/^((?:signed |unsigned )?(?:int|long)) format, (different type|\S+) arg \(arg (\d+)\)$/
)
{
if
(
/^((?:signed |unsigned )?(?:int|long)) format, (different type|\S+) arg \(arg (\d+)\)$/
)
{
my
$type
=
$2
;
if
(
$type
=~
/^
(?:
HACCEL
|
HACMDRIVER
|
HANDLE
|
HBITMAP
|
HBRUSH
|
HCALL
|
HCURSOR
|
HDC
|
HDRVR
|
HDESK
|
HDRAWDIB
...
...
@@ -451,9 +447,7 @@ sub ld_output($$) {
$file
=
shift
;
local
$_
=
shift
;
if
(
0
)
{
# Nothing
}
elsif
(
/^In function \`(.*?)\':$/
)
{
if
(
/^In function \`(.*?)\':$/
)
{
$function
=
$1
;
}
elsif
(
/^more undefined references to \`(.*?)\' follow$/
)
{
# Nothing
...
...
tools/winapi/winapi_fixup_statements.pm
View file @
ba517e57
...
...
@@ -114,9 +114,7 @@ sub fixup_user_message_2_windowsx($$) {
$lparam
=~
s/^\(LPARAM\)\s*//
;
my
@arguments
;
if
(
0
)
{
# Nothing
}
elsif
(
$msg
=~
/^WM_COMMAND$/
)
{
if
(
$msg
=~
/^WM_COMMAND$/
)
{
(
my
$id
,
my
$code_notify
)
=
_parse_makelong
(
$wparam
);
my
$hwndctl
=
$lparam
;
@arguments
=
(
$id
,
$hwndctl
,
$code_notify
);
...
...
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