summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/gentree.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index 891459749..c67489d2c 100644
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -164,7 +164,7 @@ print STDERR "/* BP orig: ($line) */\n" if $DEBUG;
$level++;
next;
}
- if ($line =~ /^#if/) {
+ if ($line =~ /^#if\s/) {
$state{$level} = "ifother";
$if{$level} = 1;
print STDERR "/* BP $line state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
@@ -178,6 +178,13 @@ print STDERR "/* BP orig: ($line) */\n" if $DEBUG;
$level++;
}
+ if ($line =~ /^#ifndef/) {
+ $state{$level} = "ifother";
+ $if{$level} = 1;
+ print STDERR "/* BP $line state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ $level++;
+ }
+
if ($level) {
if ($state{$level-1} eq "if" && $line =~ /^#else/) {
$state{$level-1} = "else";