blob: 824f81859fb04042a915c1be7e2a7aa3be5941be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <stdarg.h>
#include <stdio.h>
#include "print.h"
#define PRINT_ERROR_PREFIX "ERROR: "
#define PRINT_ERROR_SUFFIX "\n"
void
print_error(const char *const format, ...)
{
fprintf(stderr, PRINT_ERROR_PREFIX);
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
fprintf(stderr, PRINT_ERROR_SUFFIX);
}
|