From 6d8f6ad10dd078042d578c030fc76acda8d54525 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 4 Jun 2017 18:04:13 +1200 Subject: Playing a little more golf --- bin/mi5.awk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/mi5.awk b/bin/mi5.awk index 14f2ff2b..6042a46c 100644 --- a/bin/mi5.awk +++ b/bin/mi5.awk @@ -60,8 +60,7 @@ bmac && NF { if (iquo) { # Look for end of comment and tip flag accordingly - if (substr(src, i, length(unquote)) == unquote) - iquo = 0 + iquo = (substr(src, i, length(unquote)) != unquote) } # Inline macro expansion @@ -81,8 +80,7 @@ bmac && NF { } # Look for start of comment and tip flag accordingly - if (substr(src, i, length(quote)) == quote) - iquo = 1 + iquo = (substr(src, i, length(quote)) == quote) } # Plain text mode -- cgit v1.2.3