summaryrefslogtreecommitdiff
path: root/src/logerr.c
blob: 6fddcb932a4de2e507620209bf322ddff45503bf (plain) (blame)
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
#include "config.h"

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>

#include "logerr.h"


void
vlogerr(
	const char *const file,
	const char *const function,
	const int lineno,
	FILE *restrict stream,
	const char *restrict format,
	...
) {
	(void)fprintf(stream, "%s:%s:%d: ", file, function, lineno);

	va_list args;
	va_start(args, format);
	(void)vfprintf(stream, format, args);
	va_end(args);

	return;
}