git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@353 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent ef999c8413
commit 41e66cbfa6
  1. 15
      jode/jcpp

@ -63,6 +63,21 @@ for (@files) {
$level = 0;
}
}
} elsif (/^\/\/\/\#ifndef (\S*)$/) {
my $label=$1;
# An ifndef directive, look if -D is defined, but only
# if we are not in a false branch. In a false branch
# we simply increase level.
if ($branch eq "false") {
$level++;
} else {
if (defined $defs{$label}) {
$branch = "false";
$level = 0;
} else {
$branch = "true";
}
}
} elsif (/^\/\/\/\#else/) {
# An else directive. We switch from true to false and
# if level is zero we switch from false to true

Loading…
Cancel
Save