summaryrefslogtreecommitdiff
path: root/lib/sbin/cpp.pl
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-16 13:37:40 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-16 13:37:40 +0000
commit5da20574fbef583b05c4e0bde51abb14cfd833e5 (patch)
tree145439424fb610bf9660ca6d5c8ebff688601e4a /lib/sbin/cpp.pl
parente3aa7f61f7347c99c97f3a14c89556cc62c75645 (diff)
Fixed regex which didn't match in perl 5.8.0.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3590 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/cpp.pl')
-rwxr-xr-xlib/sbin/cpp.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sbin/cpp.pl b/lib/sbin/cpp.pl
index ea704de6..7d479cbc 100755
--- a/lib/sbin/cpp.pl
+++ b/lib/sbin/cpp.pl
@@ -284,7 +284,7 @@ sub FindFile
}
}
- # Tidy up the path a bit
+ # Tidy up the path a bit
# Get rid of /./ in paths
$fullpath =~ s,/\./,/,g;
@@ -653,15 +653,15 @@ sub ProcessIf
print "if requested on $line\n";
}
- if($line =~ m/^def\s+([^\s]+)/)
+ if($line =~ m/^def\s+(\S+)/)
{
$retval = defined($defines{$1}) ? 1 : 0;
}
- elsif($line =~ m/^ndef\s+([^\s]+)/)
+ elsif($line =~ m/^ndef\s+(\S+)/)
{
$retval = defined($defines{$1}) ? 0 : 1;
}
- elsif($line =~ m/^\s+(defined\s+)?([^\s]+)\s*$/)
+ elsif($line =~ m/^\s+(defined\s+)?(\S+)\s*$/)
{
my $val = $2;
if($val =~ m/^\d+$/)
@@ -1019,7 +1019,7 @@ sub ParseAndExpand
print "The macro is '$token'\n";
}
my $arg = "";
- if(@{$defines{$token}{"ARGS"}} > 0 &&
+ if(@{$defines{$token}{"ARGS"}} > 0 &&
$pos+1 < @splitline)
{
# Eat up whitepace between token and arguments