From 68165d728dc07adfcf364d738cd5aaddc6a6c6da Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 26 Dec 2005 18:19:22 +0000 Subject: Fixed some errors at gentree parsing. Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/gentree.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'v4l/scripts') 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"; -- cgit v1.2.3