From 384900fcfabcb2ec2a24390494fa0de937b3744f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 24 May 2015 18:54:39 -0600 Subject: libremessages: add some newlines in comments, reflow them. Mostly so that when I compulsivly hit M-q, it doesn't screw up. --- src/lib/libremessages | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'src/lib/libremessages') diff --git a/src/lib/libremessages b/src/lib/libremessages index 93e6b86..78f9107 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -41,6 +41,7 @@ ################################################################################ # Usage: panic +# # For programming errors, bails immediately with little fanfare. panic() { echo "$(_l _ 'panic: malformed call to internal function')" >&2 @@ -48,6 +49,7 @@ panic() { } # Usage: print MESG [ARGS...] +# # Like printf, but gettext-aware, and prints a trailing newline print() { [[ $# -ge 1 ]] || panic @@ -56,8 +58,10 @@ print() { printf -- "$mesg\n" "$@" } -# Do HTML-style whitespace collapsing on standard IO. -# It considers newline, tab, and space to be whitespace. +# Usage: _libremessages_html_whitespace_collapse <<' 'Use this file instead of pacman.conf' -# The description is fed through gettext, the flag is not, so if part of the -# flag needs to be translated, you must do that yourself: +# +# The description is fed through gettext, the flag is not, so if part +# of the flag needs to be translated, you must do that yourself: +# # ex: flag "-C <$(_ FILE)>" 'Use this file instead of pacman.conf' +# # If you want to line-break the description in the source, so it isn't -# crazy-long, feel free, it is reflowed/wrapped the same way as prose and -# bullet. +# crazy-long, feel free, it is reflowed/wrapped the same way as prose +# and bullet. flag() { [[ $# == 2 ]] || panic local flag=$1 @@ -123,7 +133,8 @@ flag() { } # Usage: term_title MESG [ARGS...] -# Sets the terminal title +# +# Sets the terminal title. term_title() { [[ $# -ge 1 ]] || panic local fmt='' @@ -135,8 +146,9 @@ term_title() { } # Usage: setup_traps [handler] -# Sets up traps on TERM, HUP, QUIT and INT signals, as well as the ERR event, -# similar to makepkg. +# +# Sets up traps on TERM, HUP, QUIT and INT signals, as well as the ERR +# event, similar to makepkg. # # If `handler` is specified, instead of using the default handler # (which is good for most purposes), it will call the command handler -- cgit v1.2.2