mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
Adjust NR tests. More accurate.
This commit is contained in:
parent
8c1f4e574b
commit
b93939a6a7
@ -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;
|
||||
}' |
|
||||
|
Loading…
Reference in New Issue
Block a user