8 #include <ccan/compiler/compiler.h>
11 * err - exit(eval) with message based on format and errno.
12 * @eval: the exit code
13 * @fmt: the printf-style format string
15 * The format string is printed to stderr like so:
16 * <executable name>: <format>: <strerror(errno)>\n
19 * char *p = strdup("hello");
21 * err(1, "Failed to strdup 'hello'");
23 void NORETURN err(int eval, const char *fmt, ...);
26 * errx - exit(eval) with message based on format.
27 * @eval: the exit code
28 * @fmt: the printf-style format string
30 * The format string is printed to stderr like so:
31 * <executable name>: <format>\n
35 * errx(1, "I don't expect any arguments");
37 void NORETURN errx(int eval, const char *fmt, ...);
40 * warn - print a message to stderr based on format and errno.
41 * @eval: the exit code
42 * @fmt: the printf-style format string
44 * The format string is printed to stderr like so:
45 * <executable name>: <format>: <strerror(errno)>\n
48 * char *p = strdup("hello");
50 * warn("Failed to strdup 'hello'");
52 void warn(const char *fmt, ...);
55 * warnx - print a message to stderr based on format.
56 * @eval: the exit code
57 * @fmt: the printf-style format string
59 * The format string is printed to stderr like so:
60 * <executable name>: <format>\n
64 * warnx("I don't expect any arguments (ignoring)");
66 void warnx(const char *fmt, ...);
69 #endif /* CCAN_ERR_H */