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
d9800f9f
Commit
d9800f9f
authored
Oct 25, 2004
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix string handling.
Enable perl warnings Add a proper --help option and usage.
parent
1d691d5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
12 deletions
+28
-12
function_grep.pl
tools/winedump/function_grep.pl
+28
-12
No files found.
tools/winedump/function_grep.pl
View file @
d9800f9f
#! /usr/bin/perl
#! /usr/bin/perl
-w
#
# Copyright 2000 Patrik Stridvall
#
...
...
@@ -19,23 +19,39 @@
use
strict
;
my
$name0
=
$0
;
$name0
=~
s%^.*/%%
;
my
$invert
=
0
;
my
$pattern
;
my
@files
=
();
my
$usage
;
while
(
defined
(
$_
=
shift
))
{
if
(
/^-/
)
{
if
(
/^-v$/
)
{
$invert
=
1
;
}
if
(
/^-v$/
)
{
$invert
=
1
;
}
elsif
(
/^--?(\?|h|help)$/
)
{
$usage
=
0
;
}
elsif
(
/^-/
)
{
print
STDERR
"$name0:error: unknown option '$_'\n"
;
$usage
=
2
;
last
;
}
elsif
(
!
defined
(
$pattern
))
{
$pattern
=
$_
;
}
else
{
if
(
!
defined
(
$pattern
))
{
$pattern
=
$_
;
}
else
{
push
@files
,
$_
;
}
push
@files
,
$_
;
}
}
if
(
defined
$usage
)
{
print
"Usage: $name0 [--help] [-v] pattern files...\n"
;
print
"where:\n"
;
print
"--help Prints this help message\n"
;
print
"-v Return functions that do not match pattern\n"
;
print
"pattern A regular expression for the function name\n"
;
print
"files... A list of files to search the function in\n"
;
exit
$usage
;
}
foreach
my
$file
(
@files
)
{
open
(
IN
,
"< $file"
);
...
...
@@ -266,9 +282,9 @@ foreach my $file (@files) {
}
}
}
}
elsif
(
/\'
[^\']
*\'/s
)
{
}
elsif
(
/\'
(?:[^\\\']*|\\.)
*\'/s
)
{
$_
=
$'
;
$again
=
1
;
}
elsif
(
/\"
[^\"]
*\"/s
)
{
}
elsif
(
/\"
(?:[^\\\"]*|\\.)
*\"/s
)
{
$_
=
$'
;
$again
=
1
;
}
elsif
(
/;/s
)
{
$_
=
$'
;
$again
=
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