Commit 3de094e2 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Handle multiline output from grep and don't grep for empty strings.

parent 5a96cbfc
......@@ -761,27 +761,29 @@ sub process_comment
# FIXME: If we have no parameters, make sure we have a PARAMS: None. section
# Find header file
# FIXME: This sometimes gives the error "sh: <file>.h: Permission denied" - why?
my $h_file = "";
if ($comment->{COMMENT_NAME} ne "")
{
my $tmp = "grep -s -l $comment->{COMMENT_NAME} @opt_header_file_list 2>/dev/null";
$tmp = `$tmp`;
my $exit_value = $? >> 8;
if ($exit_value == 0)
{
$tmp =~ s/\n.*//;
$tmp =~ s/\n.*//g;
if ($tmp ne "")
{
$h_file = `basename $tmp`;
}
}
else
}
elsif ($comment->{ALT_NAME} ne "")
{
$tmp = "grep -s -l $comment->{ALT_NAME} @opt_header_file_list"." 2>/dev/null";
my $tmp = "grep -s -l $comment->{ALT_NAME} @opt_header_file_list"." 2>/dev/null";
$tmp = `$tmp`;
$exit_value = $? >> 8;
my $exit_value = $? >> 8;
if ($exit_value == 0)
{
$tmp =~ s/\n.*//;
$tmp =~ s/\n.*//g;
if ($tmp ne "")
{
$h_file = `basename $tmp`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment