diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-12-21 17:41:59 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-27 15:06:51 +0100 |
commit | 0805c1add0e3fc951d16c27d3837bc5123842303 (patch) | |
tree | bdce2e6e246f0f693552423c9b554092ce47a689 /scripts | |
parent | e22743070ff1f3d4cc83177c4669476fd2526844 (diff) | |
download | mupdf-0805c1add0e3fc951d16c27d3837bc5123842303.tar.xz |
Strip extraneous blank lines.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/find-blanks.awk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/find-blanks.awk b/scripts/find-blanks.awk new file mode 100644 index 00000000..1d00609f --- /dev/null +++ b/scripts/find-blanks.awk @@ -0,0 +1,6 @@ +BEGIN { last_char = "x"; } +/^$/ { if (last_char == "{") print(FILENAME, FNR); last_char = " "; next; } +/^\s*{$/ { last_char = "{"; next; } +/ {$/ { last_char = "{"; next; } +/^\s*}$/ { if (last_char == " ") print(FILENAME, FNR); last_char = "}"; next; } + { last_char = "x"; } |