limb 0.2.0

2024-01-09

warn(3)
limb manual
warn(3)

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.

output buffers

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.

Hint

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.

SEE ALSO

out(3), buffer_putmsg(3)

limb 0.1.0
2023-07-24
warn(3)