|
|
1.1 root 1: /*
2: * panic.c --
3: *
4: * Source code for the "panic" library procedure for Tcl;
5: * individual applications will probably override this with
6: * an application-specific panic procedure.
7: *
8: * Copyright 1988-1991 Regents of the University of California
9: * Permission to use, copy, modify, and distribute this
10: * software and its documentation for any purpose and without
11: * fee is hereby granted, provided that the above copyright
12: * notice appears in all copies. The University of California
13: * makes no representations about the suitability of this
14: * software for any purpose. It is provided "as is" without
15: * express or implied warranty.
16: */
17:
18: #ifndef lint
19: static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/panic.c,v 1.3 91/10/10 11:25:51 ouster Exp $ SPRITE (Berkeley)";
20: #endif
21:
22: #include <stdio.h>
23: #include <stdlib.h>
24:
25: /*
26: *----------------------------------------------------------------------
27: *
28: * panic --
29: *
30: * Print an error message and kill the process.
31: *
32: * Results:
33: * None.
34: *
35: * Side effects:
36: * The process dies, entering the debugger if possible.
37: *
38: *----------------------------------------------------------------------
39: */
40:
41: /* VARARGS ARGSUSED */
42: void
43: panic(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
44: char *format; /* Format string, suitable for passing to
45: * fprintf. */
46: char *arg1, *arg2, *arg3; /* Additional arguments (variable in number)
47: * to pass to fprintf. */
48: char *arg4, *arg5, *arg6, *arg7, *arg8;
49: {
50: (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
51: arg7, arg8);
52: (void) fflush(stderr);
53: abort();
54: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.