From df6fdceab0e120c6512ced21d0e07bcc48999368 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 27 Jun 2014 19:38:45 -0400 Subject: libremessages: add some comments --- src/lib/libremessages | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libremessages b/src/lib/libremessages index b89e2bc..188affd 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -40,6 +40,8 @@ # Own functions # ################################################################################ +# Usage: panic +# For programming errors, bails immediately with little fanfare. panic() { echo "$(_l _ 'panic: malformed call to internal function')" >&2 exit 1 @@ -54,8 +56,8 @@ print() { printf -- "$mesg\n" "$@" } -# Do HTML-style whitespace collapsing on standard IO. It considers newline, -# tab, and space to be whitespace. +# Do HTML-style whitespace collapsing on standard IO. +# It considers newline, tab, and space to be whitespace. _html_whitespace_collapse() { [[ $# == 0 ]] || panic tr '\n' ' ' | sed -r -e 's/\t/ /g' -e 's/ +/ /g' -- cgit v1.2.2