-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.c
More file actions
38 lines (29 loc) · 774 Bytes
/
error.c
File metadata and controls
38 lines (29 loc) · 774 Bytes
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
32
33
34
35
36
37
38
/* error.c - functions to signal error conditions
*
* Copyright 1999 Jochen Voss */
static const char rcsid[] = "$Id: error.c,v 1.8 1999/07/21 10:43:21 voss Rel $";
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <unistd.h>
#include "moon-buggy.h"
void
fatal (const char *format, ...)
/* Signal a fatal error and quit immediately. The arguments have the
* same meaning, as in the function `printf'.
* The message should start with a capital letter. */
{
va_list ap;
prepare_for_exit ();
va_start (ap, format);
fflush (NULL);
fputs ("Fatal error: ", stderr);
vfprintf (stderr, format, ap);
fputc ('\n', stderr);
va_end (ap);
exit (EXIT_FAILURE);
}