Line |
Branch |
Exec |
Source |
1 |
|
|
#include <stdarg.h> |
2 |
|
|
#include "exitcode.h" |
3 |
|
|
|
4 |
|
4 |
ExitCode ec_usage_error(const char *restrict fmt, ...) |
5 |
|
|
{ |
6 |
|
4 |
(void)!fputs("Error: ", stderr); |
7 |
|
4 |
va_list v; |
8 |
|
4 |
va_start(v, fmt); |
9 |
|
4 |
(void)!vfprintf(stderr, fmt, v); |
10 |
|
4 |
va_end(v); |
11 |
|
4 |
(void)!fputc('\n', stderr); |
12 |
|
4 |
return EC_USAGE_ERROR; |
13 |
|
|
} |
14 |
|
|
|
15 |
|
2 |
ExitCode ec_printf_ok(const char *restrict fmt, ...) |
16 |
|
|
{ |
17 |
|
2 |
va_list v; |
18 |
|
2 |
va_start(v, fmt); |
19 |
|
2 |
(void)!vfprintf(stdout, fmt, v); |
20 |
|
2 |
va_end(v); |
21 |
|
2 |
return EC_OK; |
22 |
|
|
} |
23 |
|
|
|