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
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
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
line1 = line2;
}
END {
- if (NR > 1 && line2 ~ "^#endif")
+ if (NR >= 1 && line2 ~ "^#endif")
printf "\n";
print line1;
}' |