/*
 *
 *	$Header: /usr/u/wjr/src/panic/RCS/panic.c,v 1.4 1991/11/07 22:43:59 wjr Exp $
 *
 */
/*
 * Xerox may use this code without restriction.
 */

/*
 * This file contains the _panic function.
 */

static char rcsid[] = "@(#)$Header: /usr/u/wjr/src/panic/RCS/panic.c,v 1.4 1991/11/07 22:43:59 wjr Exp $";

#include <stdio.h>
#include "misc.h"

volatile void _panic(char *why, char *msg, char *rcs, int line, char *file,
                     void (*die)(int v), int exitval)
{
  /*
   * "Burma!"
   * "Why did you say 'Burma!'?"
   * "I panicked."
   */

  fprintf(stderr, "\n%s:   %s\n", why, msg);
  fprintf(stderr, "%*s    In line %d of %s\n", strlen(why), "", line, file);
  fprintf(stderr, "%*s    RCS: %s\n\n", strlen(why), "", rcs);

  if (die)     (*die)(exitval);
}












