summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclInt.decls5
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclIntPlatDecls.h9
-rw-r--r--generic/tclPanic.c14
-rw-r--r--generic/tclStubInit.c3
5 files changed, 19 insertions, 16 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 8835119..4894d2d 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tclInt.decls,v 1.27 2001/06/08 20:06:11 dgp Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.28 2001/06/17 03:48:19 dgp Exp $
library tcl
@@ -725,9 +725,6 @@ declare 23 mac {
declare 25 mac {
int TclMacChmod(char *path, int mode)
}
-declare 26 mac {
- void TclMacSetPanic(void)
-}
############################
# Windows specific internals
diff --git a/generic/tclInt.h b/generic/tclInt.h
index e0ded8b..7af3c65 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.55 2001/05/26 01:25:59 msofer Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.56 2001/06/17 03:48:19 dgp Exp $
*/
#ifndef _TCLINT
@@ -1835,6 +1835,8 @@ EXTERN int TclpMatchFiles _ANSI_ARGS_((Tcl_Interp *interp,
EXTERN Tcl_Channel TclpOpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
char *fileName, char *modeString,
int permissions));
+EXTERN void TclpPanic _ANSI_ARGS_(TCL_VARARGS(CONST char *,
+ format));
EXTERN char * TclpReadlink _ANSI_ARGS_((CONST char *fileName,
Tcl_DString *linkPtr));
EXTERN char * TclpRealloc _ANSI_ARGS_((char *ptr,
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index ce5e87c..8c690c8 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.10 2001/06/08 20:06:11 dgp Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.11 2001/06/17 03:48:19 dgp Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -194,8 +194,6 @@ EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path,
/* Slot 24 is reserved */
/* 25 */
EXTERN int TclMacChmod _ANSI_ARGS_((char * path, int mode));
-/* 26 */
-EXTERN void TclMacSetPanic _ANSI_ARGS_((void));
#endif /* MAC_TCL */
typedef struct TclIntPlatStubs {
@@ -270,7 +268,6 @@ typedef struct TclIntPlatStubs {
FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char * path, CONST char * mode)); /* 23 */
void *reserved24;
int (*tclMacChmod) _ANSI_ARGS_((char * path, int mode)); /* 25 */
- void (*tclMacSetPanic) _ANSI_ARGS_((void)); /* 26 */
#endif /* MAC_TCL */
} TclIntPlatStubs;
@@ -524,10 +521,6 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
#define TclMacChmod \
(tclIntPlatStubsPtr->tclMacChmod) /* 25 */
#endif
-#ifndef TclMacSetPanic
-#define TclMacSetPanic \
- (tclIntPlatStubsPtr->tclMacSetPanic) /* 26 */
-#endif
#endif /* MAC_TCL */
#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
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);
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index c20a13c..cf8b8b9 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubInit.c,v 1.51 2001/06/08 20:06:11 dgp Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.52 2001/06/17 03:48:19 dgp Exp $
*/
#include "tclInt.h"
@@ -315,7 +315,6 @@ TclIntPlatStubs tclIntPlatStubs = {
TclMacFOpenHack, /* 23 */
NULL, /* 24 */
TclMacChmod, /* 25 */
- TclMacSetPanic, /* 26 */
#endif /* MAC_TCL */
};