mverify: use 0+x to force number

+x does not work in nawk/*BSD awk.
pull/72/head
Leah Neukirchen 7 years ago
parent 470d7f85a0
commit 8a9825596b

@ -8,9 +8,9 @@
mshow -t "$1" | awk -v "msg=$1" '
{ match($0, "^ *"); indent = RLENGTH }
$2 == "text/plain" { plain++ }
$2 == "multipart/signed" { signed = +$1; si = indent; next }
signed && !content && indent == si+2 { content = +$1; next }
signed && content && !signature && indent == si+2 { signature = +$1; type = $2 }
$2 == "multipart/signed" { signed = 0+$1; si = indent; next }
signed && !content && indent == si+2 { content = 0+$1; next }
signed && content && !signature && indent == si+2 { signature = 0+$1; type = $2 }
function q(a) { gsub("\\47", "\47\\\47\47", a); return "\47"a"\47" }
END {
if (type == "" && plain) { // guess plain text armored signature

Loading…
Cancel
Save