diff options
Diffstat (limited to 'generic/tclPanic.c')
-rw-r--r-- | generic/tclPanic.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/generic/tclPanic.c b/generic/tclPanic.c index 87bc177..4e4b06c 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -2,8 +2,8 @@ * tclPanic.c -- * * Source code for the "Tcl_Panic" library procedure for Tcl; - * individual applications will probably override this with - * an application-specific panic procedure. + * individual applications will probably call Tcl_SetPanicProc() + * to set an application-specific panic procedure. * * Copyright (c) 1988-1993 The Regents of the University of California. * Copyright (c) 1994 Sun Microsystems, Inc. @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPanic.c,v 1.2 1999/03/04 01:01:59 stanton Exp $ + * RCS: @(#) $Id: tclPanic.c,v 1.3 2001/06/08 20:06:11 dgp Exp $ */ #include "tclInt.h" @@ -22,7 +22,8 @@ * specific panic procedure. */ -void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL; +static Tcl_PanicProc *panicProc = NULL; + /* *---------------------------------------------------------------------- @@ -42,7 +43,7 @@ void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL; void Tcl_SetPanicProc(proc) - void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format)); + Tcl_PanicProc *proc; { panicProc = proc; } @@ -65,7 +66,7 @@ Tcl_SetPanicProc(proc) void Tcl_PanicVA (format, argList) - char *format; /* Format string, suitable for passing to + CONST char *format; /* Format string, suitable for passing to * fprintf. */ va_list argList; /* Variable argument list. */ { @@ -97,7 +98,7 @@ Tcl_PanicVA (format, argList) /* *---------------------------------------------------------------------- * - * panic -- + * Tcl_Panic -- * * Print an error message and kill the process. * @@ -112,12 +113,12 @@ Tcl_PanicVA (format, argList) /* VARARGS ARGSUSED */ void -panic TCL_VARARGS_DEF(char *,arg1) +Tcl_Panic TCL_VARARGS_DEF(CONST char *,arg1) { va_list argList; - char *format; + CONST char *format; - format = TCL_VARARGS_START(char *,arg1,argList); + format = TCL_VARARGS_START(CONST char *,arg1,argList); Tcl_PanicVA(format, argList); va_end (argList); } |