home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tcl7.0b1 / panic.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-06  |  2.2 KB  |  66 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.4 93/02/06 16:20:43 ouster Exp $ SPRITE (Berkeley)";
  31. #endif
  32.  
  33. #include <stdio.h>
  34. #include <stdlib.h>
  35.  
  36. /*
  37.  *----------------------------------------------------------------------
  38.  *
  39.  * panic --
  40.  *
  41.  *    Print an error message and kill the process.
  42.  *
  43.  * Results:
  44.  *    None.
  45.  *
  46.  * Side effects:
  47.  *    The process dies, entering the debugger if possible.
  48.  *
  49.  *----------------------------------------------------------------------
  50.  */
  51.  
  52.     /* VARARGS ARGSUSED */
  53. void
  54. panic(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  55.     char *format;        /* Format string, suitable for passing to
  56.                  * fprintf. */
  57.     char *arg1, *arg2, *arg3;    /* Additional arguments (variable in number)
  58.                  * to pass to fprintf. */
  59.     char *arg4, *arg5, *arg6, *arg7, *arg8;
  60. {
  61.     (void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
  62.         arg7, arg8);
  63.     (void) fflush(stderr);
  64.     abort();
  65. }
  66.