some fixes for xml dumper / still buggy.
[libfirm] / ir / common / panic.c
1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 * All rights reserved.
3 *
4 * Authors: Martin Trapp, Christian Schaefer
5 *
6 */
7
8 /* $Id$ */
9
10 #ifdef HAVE_CONFIG_H
11 # include <config.h>
12 #endif
13
14 # include <stdlib.h>
15
16 # include "panic.h"
17 # include <stdio.h>
18 # include <stdarg.h>
19
20
21 void
22 panic (const char *fmt, ...)
23 {
24   va_list ap;
25
26   fputs ("(panic) ", stderr);
27   va_start (ap, fmt);
28   vfprintf (stderr, fmt, ap);
29   va_end (ap);
30   putc ('\n', stderr);
31   exit (1);
32 }