projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed GNUC constructs
[libfirm]
/
tools
/
remove_cpp_comands.perl
diff --git
a/tools/remove_cpp_comands.perl
b/tools/remove_cpp_comands.perl
index
56a8c2a
..
7597720
100644
(file)
--- a/
tools/remove_cpp_comands.perl
+++ b/
tools/remove_cpp_comands.perl
@@
-62,6
+62,7
@@
$scndlastline = "";
$lastline = "";
$eat = 0;
$lastline = "";
$eat = 0;
+$multiline = 0;
foreach $line (@lines) {
foreach $line (@lines) {
@@
-71,10
+72,22
@@
foreach $line (@lines) {
$eat = 2;
} elsif ($eat > 0) {
$eat = $eat -1;
$eat = 2;
} elsif ($eat > 0) {
$eat = $eat -1;
- } elsif (($line =~ /^\#/) ) {
+ } elsif ($multiline > 0) {
+ # this line connects a previous one, kill it
+ if ($line =~ /\\$/) {
+ $multiline = 1;
+ } else {
+ $multiline = 0;
+ }
+ } elsif ($line =~ /^\#/) {
# eat the line
$scndlastline = $lastline;
$lastline = $line;
# eat the line
$scndlastline = $lastline;
$lastline = $line;
+ if ($line =~ /\\$/) {
+ $multiline = 1;
+ } else {
+ $multiline = 0;
+ }
} elsif ($openbracket == 1) {
print TDF "$line";
if ((index($line, "}") > -1)) {
} elsif ($openbracket == 1) {
print TDF "$line";
if ((index($line, "}") > -1)) {