blob: e8cf4af8b14375a43293bb74795fb0745a31ba63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// SVN: $Revision: 56 $
#include <errno.h>
#include <stdarg.h>
#include <string.h>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
void error_exit(const char *format, ...)
{
va_list ap;
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
fprintf(stderr, "\nerrno at that time: %s (%d)\n", strerror(errno), errno);
exit(EXIT_FAILURE);
}
|