aboutsummaryrefslogtreecommitdiff
path: root/bin/unf.awk
diff options
context:
space:
mode:
Diffstat (limited to 'bin/unf.awk')
-rw-r--r--bin/unf.awk4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/unf.awk b/bin/unf.awk
index a9837a8a..7acb09c2 100644
--- a/bin/unf.awk
+++ b/bin/unf.awk
@@ -1,5 +1,7 @@
# Unfold header lines in an internet message, don't touch the body
+BEGIN { buf = "" }
+
# Function to write and empty the buffer
function wrbuf() {
if (length(buf))
@@ -8,7 +10,7 @@ function wrbuf() {
}
# Flag to stop processing once we hit the first blank line
-!length {
+!length($0) {
wrbuf()
body = 1
}