commit:     de7a2ae7c416efe0fa75443f9174b05b1c6bbc5b
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Feb 18 06:11:53 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 16:14:06 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=de7a2ae7

Explain the composition and naming conventions of gentoo-functions.sh

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/functions.sh b/functions.sh
index 2918558..3b56b1d 100644
--- a/functions.sh
+++ b/functions.sh
@@ -2,8 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 # shellcheck shell=sh disable=3043
 
+# This file contains a series of function declarations followed by some
+# initialization code. Functions intended for internal use shall be prefixed
+# with an <underscore> and shall not be considered as being a part of the 
public
+# API. With the exception of those declared by the local builtin, all variables
+# intended for internal use shall be prefixed with "genfun_" to indicate so,
+# and to reduce the probability of name space conflicts.
+
 #
-#    This is a private function, called by ebegin, eerrorn, einfon, and ewarnn.
+#    Called by ebegin, eerrorn, einfon, and ewarnn.
 #
 _eprint() {
        local color
@@ -23,7 +30,6 @@ _eprint() {
 #
 #    hard set the indent used for e-commands.
 #    num defaults to 0
-# This is a private function.
 #
 _esetdent()
 {
@@ -201,9 +207,6 @@ ebegin()
 #    indicate the completion of process, called from eend/ewend
 #    if error, show errstr via efunc
 #
-#    This function is private to functions.sh.  Do not call it from a
-#    script.
-#
 _eend()
 {
        local cols efunc is_tty msg retval
@@ -462,8 +465,7 @@ is_int() {
 }
 
 #
-#   Determine whether the first operand contains any visible characters. This
-#   is intended to be a private function.
+#   Determine whether the first operand contains any visible characters.
 #
 _is_visible() {
        ! case $1 in *[[:graph:]]*) false ;; esac

Reply via email to