Move comparison to pattern. - tgtimes - The Gopher Times | |
git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 6eeb4cd1faa551f33e0662379c6104d9027ecbaf | |
parent bef5987b8456b7c83745e4561debe8264866d6fa | |
Author: Troels Henriksen <[email protected]> | |
Date: Sun, 27 Aug 2023 22:06:08 +0200 | |
Move comparison to pattern. | |
Signed-off-by: Christoph Lohmann <[email protected]> | |
Diffstat: | |
M filters/nudge.filter | 18 ++++++++---------- | |
1 file changed, 8 insertions(+), 10 deletions(-) | |
--- | |
diff --git a/filters/nudge.filter b/filters/nudge.filter | |
@@ -11,17 +11,15 @@ BEGIN { | |
incontent=1 | |
} | |
-/./ { | |
- if (incontent == 0) { | |
- spaces=LINES_PER_PAGE - line % LINES_PER_PAGE + 1; | |
- if (spaces < MAX_SPACING) { | |
- for (i = 0; i < spaces; i++) { | |
- print ""; | |
- line++; | |
- } | |
- } | |
- incontent = 1; | |
+/./ && incontent == 0 { | |
+ spaces=LINES_PER_PAGE - line % LINES_PER_PAGE + 1; | |
+ if (spaces < MAX_SPACING) { | |
+ for (i = 0; i < spaces; i++) { | |
+ print ""; | |
+ line++; | |
+ } | |
} | |
+ incontent = 1; | |
} | |
/`----/ { incontent = 0; } | |
{ print $0; line++; } |