home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / panic.c < prev    next >
C/C++ Source or Header  |  1993-07-12  |  2KB  |  70 lines

  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 (c) 1988-1993 The Regents of the University of California.
  9.  * All rights reserved.
  10.  *
  11.  * Permission is hereby granted, without written agreement and without
  12.  * license or royalty fees, to use, copy, modify, and distribute this
  13.  * software and its documentation for any purpose, provided that the
  14.  * above copyright notice and the following two paragraphs appear in
  15.  * all copies of this software.
  16.  * 
  17.  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  18.  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  19.  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  20.  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21.  *
  22.  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  23.  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  24.  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  25.  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  26.  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  27.  */
  28.  
  29. #ifndef lint
  30. static char rcsid[] = "$Header: /user6/ouster/tcl/RCS/panic.c,v 1.5 93/07/12 14:01:35 ouster Exp $ SPRITE (Berkeley)";
  31. #endif
  32.  
  33. #include <stdio.h>
  34. #ifdef NO_STDLIB_H
  35. #   include "compat/stdlib.h"
  36. #else
  37. #   include <stdlib.h>
  38. #endif
  39.  
  40. /*
  41.  *----------------------------------------------------------------------
  42.  *
  43.  * panic --
  44.  *
  45.  *    Print an error message and kill the process.
  46.  *
  47.  * Results:
  48.  *    None.
  49.  *
  50.  * Side effects:
  51.  *    The process dies, entering the debugger if possible.
  52.  *
  53.  *----------------------------------------------------------------------
  54.  */
  55.  
  56.     /* VARARGS ARGSUSED */
  57. void
  58. panic(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  59.     char *format;        /* Format string, suitable for passing to
  60.                  * fprintf. */
  61.     char *arg1, *arg2, *arg3;    /* Additional arguments (variable in number)
  62.                  * to pass to fprintf. */
  63.     char *arg4, *arg5, *arg6, *arg7, *arg8;
  64. {
  65.     (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
  66.         arg7, arg8);
  67.     (void) fflush(stderr);
  68.     abort();
  69. }
  70.