NAME
output.h - writing to stdout/stderr
SYNOPSIS
#include <limb/output.h> const char *PROG
DESCRIPTION
This header defines functions used to write messages/warnings to stdout or stderr.
Most of the following are implemented as macros to obuffer_putmsg(3), using either obuffer_1 or obuffer_2. Messages can also end up written to other output buffers if they were attached. For more, refer to obuffer.h(0).
Functions
The following functions/macros are defined :
Write given strings to stdout buffers with level OLVL_NORMAL or more
Write given strings to stderr buffers with level OLVL_NORMAL or more
Write given strings to stdout buffers with level OLVL_DEBUG or more, prefixing with function name, file name and line number, adding a LF and flushing the buffer afterwards
Same as dbg(3) but with OLVL_MAXIMUM
Same as dieusage(3) but adds the command's name and usage.
Same as diehelp(3) but adds the command's name, usage and show its help screen.
Same as diesys(3) but with an extra "fatal: "
Same as diefsys(3) but with an extra "unable to "
Write given usage string to stderr prefixed with "usage: PROG ", a blank line, then the help string; and end program execution using given exit code
Write given string to stderr prefixed with "usage: PROG " and end program execution using given exit code
Write a version and copyright message to stdout
Write given strings to stderr buffers with level OLVL_NORMAL or more, adding a LF and flushing the buffer afterwards
Same as diehelp(3) but does not end program execution.
Same as err(3) but with OLVL_VERBOSE
To list all matching element from a partial match in an array of strings.
To list all matching element from a partial match in an array.
Write given strings to stdout buffers with level OLVL_NORMAL or more, adding a LF and flushing the buffer afterwards
Same as sys(3) but with OLVL_VERBOSE
Write a warning to stderr buffers with level OLVL_NORMAL or more
Same as warn(3) but adding error description after the warning
Same as warnsys(3) but starting the warning with "unable to "
Macros
The following macros are defined :
Same as warnsys(3) then return the given value
Same as warnusys(3) then return the given value