summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-12-08 20:43:49 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-12-08 20:43:49 +0000
commitd2d976033cfa7edcad5823c19aa8ff1646eb21dd (patch)
tree00e57ffd104fec2c4ec77c23f394e6661904496e /v4l/scripts
parenta8f487472aae0b4b3af9d06f75b53f06f80d52d2 (diff)
downloadmediapointer-dvb-s2-d2d976033cfa7edcad5823c19aa8ff1646eb21dd.tar.gz
mediapointer-dvb-s2-d2d976033cfa7edcad5823c19aa8ff1646eb21dd.tar.bz2
fixes handling for #if 0/#if 1 with keep
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/gentree.pl13
1 files changed, 7 insertions, 6 deletions
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index 74db9f1ad..891459749 100644
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -81,19 +81,20 @@ sub filter_source ($$) {
$level++;
next;
}
- if ($line =~ /^#if 0/) {
+ if ($line =~ /^\s*#if 0\s.*[Kk][Ee][Ee][Pp].*/) {
+ print OUT "#if 0\n";
chomp($line);
- $state{$level} = "if";
+ $state{$level} = "ifother";
$if{$level} = 0;
- print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ print STDERR "/* BP #if 0 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
$level++;
next;
}
- if ($line =~ /^#if 0\s.*[Kk][Ee][Ee][Pp].*/) {
+ if ($line =~ /^#if 0/) {
chomp($line);
- $state{$level} = "ifother";
+ $state{$level} = "if";
$if{$level} = 0;
- print STDERR "/* BP #if 0 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
$level++;
next;
}