summaryrefslogtreecommitdiff
path: root/util.c
blob: 7bd0b02280f13b52a8f760fe7eece431785544f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "util.h"

#include <stdarg.h>	/* For the va_* stuff */
#include <stdlib.h>	/* For EXIT_FAILURE */
#include "../werror.h"

void log_bug(const char *format, ... ) {
	va_list args;
	  
	va_start(args, format);
	werror(format, args);
	va_end(args);
}

void log_error(const char *format, ... ) {
	va_list args;
	  
	va_start(args, format);
	werror(format, args);
	va_end(args);
}

void log_fatal(const char *format, ... ) {
	va_list args;
	  
	va_start(args, format);
	log_error(format, args);
	va_end(args);
	
	exit(EXIT_FAILURE);
}