aboutsummaryrefslogtreecommitdiff
path: root/print.c
blob: 311276b24b34e9a74bd561da47f9fd8d6856d828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <stdarg.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);
}