pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/help mk/help: remove extra empty line when listing ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e5b9efcc778d
branches: trunk
changeset: 330547:e5b9efcc778d
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Mar 03 16:47:58 2019 +0000
description:
mk/help: remove extra empty line when listing all help topics
diffstat:
mk/help/help.awk | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 50b97db2d61c -r e5b9efcc778d mk/help/help.awk
--- a/mk/help/help.awk Sun Mar 03 16:45:49 2019 +0000
+++ b/mk/help/help.awk Sun Mar 03 16:47:58 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.31 2018/07/22 06:45:31 rillig Exp $
+# $NetBSD: help.awk,v 1.32 2019/03/03 16:47:58 rillig Exp $
#
# This program extracts the inline documentation from *.mk files.
@@ -67,7 +67,8 @@
cleanup();
}
-function sorted_keys(array, separator, elem, list, listlen, i, j, tmp, joined) {
+# Returns the sorted keys of the array, each prefixed by the prefix.
+function sorted_keys(array, prefix, elem, list, listlen, i, j, tmp, result) {
listlen = 0;
for (elem in array)
list[listlen++] = elem;
@@ -82,11 +83,11 @@
}
}
- joined = "";
+ result = "";
for (i = 0; i < listlen; i++) {
- joined = joined separator list[i];
+ result = result prefix list[i];
}
- return joined;
+ return result;
}
function cleanup() {
@@ -219,7 +220,6 @@
end_of_topic();
if (print_index) {
print "Available help topics:";
- print "";
print sorted_keys(all_keywords, "\n");
} else if (!found_anything) {
appearances = sorted_keys(all_appearances, "\n");
Home |
Main Index |
Thread Index |
Old Index