diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-03 10:57:06 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-03 10:57:06 +0000 |
commit | 731093448925d6bfc3b1d7ae5fa0533245022c5d (patch) | |
tree | f36f571bd24788d2b42e5529b4a17e072106d93c /mk | |
parent | 7cc945c5d31cfa2bae4183c96555364352326a04 (diff) | |
download | pkgsrc-731093448925d6bfc3b1d7ae5fa0533245022c5d.tar.gz |
mk/help: clean up code
Diffstat (limited to 'mk')
-rw-r--r-- | mk/help/help.awk | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk index d808d5c1c70..b4b2803744c 100644 --- a/mk/help/help.awk +++ b/mk/help/help.awk @@ -1,4 +1,4 @@ -# $NetBSD: help.awk,v 1.40 2020/05/03 10:51:06 rillig Exp $ +# $NetBSD: help.awk,v 1.41 2020/05/03 10:57:06 rillig Exp $ # # This program extracts the inline documentation from *.mk files. @@ -36,7 +36,7 @@ BEGIN { # end of a file or by the end of all files. When there have been enough # comment lines, the topic is considered worth printing. # -function end_of_topic( relevant, has_keywords, skip_reason) { +function end_of_topic( skip_reason, k, relevant, i) { skip_reason = \ array_is_empty(keywords) \ @@ -118,13 +118,10 @@ function dprint_skip(word, reason) { print(FILENAME ":" FNR ": \"" word "\" is no keyword because " reason); } -function array_is_empty(arr, i, empty) { - empty = yes; - for (i in arr) { - empty = no; - break; - } - return empty; +function array_is_empty(arr, i) { + for (i in arr) + return no; + return yes; } { |