Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/help mk/help: clean up code
details: https://anonhg.NetBSD.org/pkgsrc/rev/bb7842dbbc63
branches: trunk
changeset: 430688:bb7842dbbc63
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun May 03 10:57:06 2020 +0000
description:
mk/help: clean up code
diffstat:
mk/help/help.awk | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (36 lines):
diff -r 2c441f2efa15 -r bb7842dbbc63 mk/help/help.awk
--- a/mk/help/help.awk Sun May 03 10:51:06 2020 +0000
+++ b/mk/help/help.awk Sun May 03 10:57:06 2020 +0000
@@ -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 @@
# 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 @@
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