pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/help



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun May  3 10:57:06 UTC 2020

Modified Files:
        pkgsrc/mk/help: help.awk

Log Message:
mk/help: clean up code


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 pkgsrc/mk/help/help.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/help/help.awk
diff -u pkgsrc/mk/help/help.awk:1.40 pkgsrc/mk/help/help.awk:1.41
--- pkgsrc/mk/help/help.awk:1.40        Sun May  3 10:51:06 2020
+++ pkgsrc/mk/help/help.awk     Sun May  3 10:57:06 2020
@@ -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;
 }
 
 {



Home | Main Index | Thread Index | Old Index