NAME
warn, warnu, warnsys, warnusys - write a warning to standard error
SYNOPSIS
#include <limb/output.h> extern const char *PROG;
void warn(..) void warnu(...) void warnsys(...) void warnusys(...)
DESCRIPTION
All of those are implemented as macros and will write the specified strings as warning to stderr output buffers (with level OLVL_NORMAL or more), with a new line added at the end.
All of those are using output buffers obuffer_1 or obuffer_2 to write to stdout or stderr respectively. As such, data will also be written to any & all output buffers attached to the corresponding output buffer. See obuffer_attach(3) for more.
All warnings will be prefixed by the program's name (i.e. value of PROG
), the
word "warning " in between colon and a space.
warnu
() will add "unable to " after the prefix and before the given strings.
The warnsys
() and warnusys
() macros are similar, only the specified strings
will be followed by a colon, a space and the error description provided by
strerror(3) according to errno
.
Some special features are supported, to e.g. easily include a number or perform escaping of some strings. Refer to out(3), or directly buffer_putmsg(3), for more.