Fix roken-h-process.pl

This commit is contained in:
James Le Cuirot
2014-02-01 21:19:38 +00:00
parent cc1faff15f
commit 97f1e2efb5
2 changed files with 5 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ EXTRA_DIST = \
autogen.sh \
krb5.conf \
cf/make-proto.pl \
cf/roken-h-process.pl \
cf/install-catman.sh \
cf/ChangeLog \
cf/c-function.m4 \

View File

@@ -145,15 +145,15 @@ sub parse_if
if (m/^\s*$/) {
print "end $_\n" if ($debug);
return 1;
} elsif (m/^\(([^&]+)\&\&(.*)\)\s*\|\|\s*\(([^&]+)\&\&(.*)\)$/) {
print "($1 and $2) or ($3 and $4)\n" if ($debug);
return ((parse_if($1) and parse_if($2)) or (parse_if($3) and parse_if($4)));
} elsif (m/^([^&]+)\&\&(.*)$/) {
print "$1 and $2\n" if ($debug);
return parse_if($1) and parse_if($2);
} elsif (m/^\(([^&]+)\&\&(.*)$/) {
print "$1 and $2\n" if ($debug);
return parse_if($1) and parse_if($2);
} elsif (m/^([^\|]+)\|\|(.*)$/) {
print "$1 or $2\n" if ($debug);
return parse_if($1) or parse_if($2);
return (parse_if($1) or parse_if($2));
} elsif (m/^\s*(\!)?\s*defined\((\w+)\)/) {
($neg, $var) = ($1, $2);
print "def: ${neg}-defined(${var})\n" if ($debug);