summaryrefslogtreecommitdiffstats
path: root/generic/tclPanic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-06-08 20:06:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-06-08 20:06:11 (GMT)
commit4f211efb0420a08b1bde5ecf7512c41ffbaac25a (patch)
treed894a8872011af91b11ec3c0353d3469de8e7c27 /generic/tclPanic.c
parentea19d9dca7dada8b52673be131ea55726584ff5c (diff)
downloadtcl-4f211efb0420a08b1bde5ecf7512c41ffbaac25a.zip
tcl-4f211efb0420a08b1bde5ecf7512c41ffbaac25a.tar.gz
tcl-4f211efb0420a08b1bde5ecf7512c41ffbaac25a.tar.bz2
* generic/tcl.h:
* generic/tcl.decls: * generic/tclPanic.c: Added CONST to Tcl_*Panic* public interfaces. [Patch 415648, TIP 27] * generic/tclInt.decls: * mac/tclMacAppInit.c (main): * mac/tclMacBOAAppInit.c (main): * mac/tclMacPanic.c: Modified special Mac implementations of Tcl_*Panic* to be exact copies of the generic implementations. Added TclMacSetPanic. The generic implementations should be used directly, rather than copies, but that requires further changes by someone familiar with the Mac build systems. [Patch 415648] * generic/tclDecls.h: * generic/tclIntPlatDecls.h: *`generic/tclStubInit.c: `make gentubs` after above changes. * doc/Panic.3: * unix/mkLinks: New file documenting Tcl_*Panic* public interfaces, followed by `make mklinks`. [Patch 415648, Bug 219170, Bug 414936]
Diffstat (limited to 'generic/tclPanic.c')
-rw-r--r--generic/tclPanic.c21
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);
}