summaryrefslogtreecommitdiffstats
path: root/generic/tclPanic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-06-17 03:48:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-06-17 03:48:18 (GMT)
commita7bfb25cf558c4f2ba054227660dfe3a31523219 (patch)
treedbee9a76f5b1da8d4edc5ce3870efb502431c376 /generic/tclPanic.c
parented0c34adaed8a98ee5dc98e08810561ef81aa41c (diff)
downloadtcl-a7bfb25cf558c4f2ba054227660dfe3a31523219.zip
tcl-a7bfb25cf558c4f2ba054227660dfe3a31523219.tar.gz
tcl-a7bfb25cf558c4f2ba054227660dfe3a31523219.tar.bz2
* generic/tclInt.decls:
* generic/tclInt.h: * generic/tclPanic.c (Tcl_PanicVA): * mac/tclMacAppInit.c (main): * mac/tclMacPanic.c (TclpPanic): * unix/tclUnixPort.h: * win/tclWinPort.h: Replaced TclMacSetPanic with TclpPanic for setting a platform-specific panic handler. TclpPanic is NULL on Unix and Windows. Fixes broken wish on Mac due to earlier patches. [Patch 415648] * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: `make gentubs` after above changes.
Diffstat (limited to 'generic/tclPanic.c')
-rw-r--r--generic/tclPanic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 4e4b06c..5b9125e 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -12,10 +12,11 @@
* 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.3 2001/06/08 20:06:11 dgp Exp $
+ * RCS: @(#) $Id: tclPanic.c,v 1.4 2001/06/17 03:48:19 dgp Exp $
*/
#include "tclInt.h"
+#include "tclPort.h"
/*
* The panicProc variable contains a pointer to an application
@@ -24,6 +25,14 @@
static Tcl_PanicProc *panicProc = NULL;
+/*
+ * The platformPanicProc variable contains a pointer to a platform
+ * specific panic procedure, if any. ( TclpPanic may be NULL via
+ * a macro. )
+ */
+
+static Tcl_PanicProc * CONST platformPanicProc = TclpPanic;
+
/*
*----------------------------------------------------------------------
@@ -86,6 +95,9 @@ Tcl_PanicVA (format, argList)
if (panicProc != NULL) {
(void) (*panicProc)(format, arg1, arg2, arg3, arg4,
arg5, arg6, arg7, arg8);
+ } else if (platformPanicProc != NULL) {
+ (void) (*platformPanicProc)(format, arg1, arg2, arg3, arg4,
+ arg5, arg6, arg7, arg8);
} else {
(void) fprintf(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6,
arg7, arg8);