mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
0f6d4310ad
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this by grafting.
23 lines
408 B
Awk
23 lines
408 B
Awk
#!/bin/awk -f
|
|
BEGIN {
|
|
iflevel = 0;
|
|
}
|
|
|
|
{
|
|
if (!iflevel) {
|
|
if ($1 == "#ifdef" && $2 == "HAVE_SSL") iflevel = 1;
|
|
else print $0;
|
|
} else {
|
|
if (iflevel == 1 && ($1 == "#else" || $1 == "#elif")) {
|
|
iflevel = 0;
|
|
if ($1 == "#else") print "#if 1";
|
|
else {
|
|
print "#if 0";
|
|
print $0;
|
|
}
|
|
}
|
|
if ($1 == "#if" || $1 == "#ifdef" || $1 == "#ifndef") iflevel++;
|
|
if ($1 == "#endif") iflevel--;
|
|
}
|
|
}
|