Commit b93939a6 authored by Bruce Momjian's avatar Bruce Momjian

Adjust NR tests. More accurate.

parent 8c1f4e57
......@@ -1492,9 +1492,9 @@ do
line2 = line3;
}
END {
if (NR > 1 && skips <= 1)
if (NR >= 2 && skips <= 1)
print line1;
if (NR > 2 && skips <= 2)
if (NR >= 1 && skips <= 2)
print line2;
}' |
# remove blank line between opening brace and block comment
......@@ -1520,9 +1520,9 @@ do
line2 = line3;
}
END {
if (NR > 1 && skips <= 1)
if (NR >= 2 && skips <= 1)
print line1;
if (NR > 2 && skips <= 2)
if (NR >= 1 && skips <= 2)
print line2;
}' |
# remove blank line before #endif
......@@ -1544,7 +1544,7 @@ do
line1 = line2;
}
END {
if (NR > 1 && skips <= 1)
if (NR >= 1 && skips <= 1)
print line1;
}' |
# add blank line before #endif if it is the last line in the file
......@@ -1556,7 +1556,7 @@ do
line1 = line2;
}
END {
if (NR > 1 && line2 ~ "^#endif")
if (NR >= 1 && line2 ~ "^#endif")
printf "\n";
print line1;
}' |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment