Source:NetHack 3.0.0/panic.c

Below is the full text to panic.c from the source code of NetHack 3.0.0. To link to a particular line, write [[NetHack 3.0.0/panic.c#line123 ]], for example.

Warning! This is the source code from an old release. For the latest release, see Source code

1.   /*	SCCS Id: @(#)panic.c	3.0	88/05/03 2.    * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. 3.    *  4.     *	This code was adapted from the code in end.c to run in a standalone 5.    *	mode for the makedefs / drg code. 6.    */  7.    /* NetHack may be freely redistributed. See license for details. */ 8.     9.    #include	"config.h"  10. 11.  #ifdef MSDOS 12.  #undef exit 13.  extern void exit P((int)); 14.  #endif 15.    16.   /*VARARGS1*/ 17.  boolean panicking; 18.   19.   void 20.  panic(str,a1,a2,a3,a4,a5,a6) 21.  char *str; 22.  {  23.   	if(panicking++) 24.  #ifdef SYSV 25.  	    (void) 26.  #endif 27.  		abort;    /* avoid loops - this should never happen*/ 28.   29.   	(void) fputs(" ERROR:  ", stderr); 30.  	Printf(str,a1,a2,a3,a4,a5,a6); 31.  	(void) fflush(stderr); 32.  #ifdef UNIX 33.  # ifdef SYSV 34.  		(void) 35.  # endif 36.  		    abort;	/* generate core dump */ 37.  #endif 38.  	exit(1);		/* redundant */ 39.  	return; 40.  }  41.