summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2003-12-24 04:18:18 (GMT)
committerdavygrvy <davygrvy@pobox.com>2003-12-24 04:18:18 (GMT)
commit5d224fb11538aa654ba2028f75e5ffa06df2c579 (patch)
treeeff546c6e792fecd4310f81379419c1d68d63c28
parentbdb55bff6176c625c664d4ea5a4ec5187839d7a8 (diff)
downloadtcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.zip
tcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.tar.gz
tcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.tar.bz2
All uses of 'panic' (the macro) changed
to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
-rw-r--r--generic/tclAlloc.c6
-rw-r--r--generic/tclBasic.c16
-rw-r--r--generic/tclBinary.c6
-rw-r--r--generic/tclCkalloc.c18
-rw-r--r--generic/tclCmdAH.c6
-rw-r--r--generic/tclCmdIL.c4
-rw-r--r--generic/tclCmdMZ.c6
-rw-r--r--generic/tclCompCmds.c8
-rw-r--r--generic/tclCompExpr.c10
-rw-r--r--generic/tclCompile.c36
-rw-r--r--generic/tclConfig.c4
-rw-r--r--generic/tclDictObj.c20
-rw-r--r--generic/tclEncoding.c4
-rw-r--r--generic/tclEvent.c8
-rw-r--r--generic/tclExecute.c28
-rw-r--r--generic/tclHash.c12
-rw-r--r--generic/tclIO.c24
-rw-r--r--generic/tclIOCmd.c8
-rw-r--r--generic/tclIOUtil.c8
-rw-r--r--generic/tclInterp.c8
-rw-r--r--generic/tclListObj.c22
-rw-r--r--generic/tclLiteral.c30
-rw-r--r--generic/tclNamesp.c12
-rw-r--r--generic/tclObj.c38
-rw-r--r--generic/tclParse.c4
-rw-r--r--generic/tclPathObj.c4
-rw-r--r--generic/tclPkg.c4
-rw-r--r--generic/tclPreserve.c18
-rw-r--r--generic/tclProc.c20
-rw-r--r--generic/tclStringObj.c14
-rw-r--r--generic/tclTest.c6
-rwxr-xr-xgeneric/tclThreadAlloc.c8
-rw-r--r--generic/tclTimer.c4
-rw-r--r--generic/tclTrace.c8
-rw-r--r--generic/tclVar.c6
-rw-r--r--mac/tclMacChan.c14
-rw-r--r--mac/tclMacOSA.c8
-rw-r--r--mac/tclMacResource.c16
-rw-r--r--mac/tclMacSock.c8
-rw-r--r--mac/tclMacThrd.c4
-rw-r--r--unix/tclUnixChan.c13
-rw-r--r--unix/tclUnixNotfy.c16
-rw-r--r--unix/tclUnixThrd.c2
-rw-r--r--unix/tclXtNotify.c4
-rw-r--r--win/tclWin32Dll.c10
-rw-r--r--win/tclWinChan.c18
-rw-r--r--win/tclWinFCmd.c14
-rw-r--r--win/tclWinNotify.c4
-rw-r--r--win/tclWinPipe.c16
-rw-r--r--win/tclWinSock.c4
-rw-r--r--win/tclWinThrd.c26
51 files changed, 309 insertions, 306 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index fe64c97..b99b188 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclAlloc.c,v 1.16 2002/04/23 17:03:34 hobbs Exp $
+ * RCS: @(#) $Id: tclAlloc.c,v 1.17 2003/12/24 04:18:18 davygrvy Exp $
*/
/*
@@ -140,8 +140,8 @@ static unsigned int nmalloc[NBUCKETS+1];
#endif
#if defined(DEBUG) || defined(RCHECK)
-#define ASSERT(p) if (!(p)) panic(# p)
-#define RANGE_ASSERT(p) if (!(p)) panic(# p)
+#define ASSERT(p) if (!(p)) Tcl_Panic(# p)
+#define RANGE_ASSERT(p) if (!(p)) Tcl_Panic(# p)
#else
#define ASSERT(p)
#define RANGE_ASSERT(p)
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index ec4bb19..d601396 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.93 2003/11/14 20:44:44 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.94 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -293,7 +293,7 @@ Tcl_CreateInterp()
if (sizeof(Tcl_CallFrame) != sizeof(CallFrame)) {
/*NOTREACHED*/
- panic("Tcl_CallFrame and CallFrame are not the same size");
+ Tcl_Panic("Tcl_CallFrame and CallFrame are not the same size");
}
/*
@@ -371,7 +371,7 @@ Tcl_CreateInterp()
iPtr->globalNsPtr = (Namespace *) Tcl_CreateNamespace(interp, "",
(ClientData) NULL, (Tcl_NamespaceDeleteProc *) NULL);
if (iPtr->globalNsPtr == NULL) {
- panic("Tcl_CreateInterp: can't create global namespace");
+ Tcl_Panic("Tcl_CreateInterp: can't create global namespace");
}
/*
@@ -445,7 +445,7 @@ Tcl_CreateInterp()
if ((cmdInfoPtr->proc == (Tcl_CmdProc *) NULL)
&& (cmdInfoPtr->objProc == (Tcl_ObjCmdProc *) NULL)
&& (cmdInfoPtr->compileProc == (CompileProc *) NULL)) {
- panic("Tcl_CreateInterp: builtin command with NULL string and object command procs and a NULL compile proc\n");
+ Tcl_Panic("Tcl_CreateInterp: builtin command with NULL string and object command procs and a NULL compile proc\n");
}
hPtr = Tcl_CreateHashEntry(&iPtr->globalNsPtr->cmdTable,
@@ -493,7 +493,7 @@ Tcl_CreateInterp()
hPtr = Tcl_FindHashEntry(&iPtr->mathFuncTable,
builtinFuncPtr->name);
if (hPtr == NULL) {
- panic("Tcl_CreateInterp: Tcl_CreateMathFunc incorrectly registered '%s'", builtinFuncPtr->name);
+ Tcl_Panic("Tcl_CreateInterp: Tcl_CreateMathFunc incorrectly registered '%s'", builtinFuncPtr->name);
return NULL;
}
mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
@@ -975,7 +975,7 @@ DeleteInterpProc(interp)
*/
if (iPtr->numLevels > 0) {
- panic("DeleteInterpProc called with active evals");
+ Tcl_Panic("DeleteInterpProc called with active evals");
}
/*
@@ -984,7 +984,7 @@ DeleteInterpProc(interp)
*/
if (!(iPtr->flags & DELETED)) {
- panic("DeleteInterpProc called on interpreter not marked deleted");
+ Tcl_Panic("DeleteInterpProc called on interpreter not marked deleted");
}
TclHandleFree(iPtr->handle);
@@ -1364,7 +1364,7 @@ Tcl_ExposeCommand(interp, hiddenCmdToken, cmdName)
if ( cmdPtr->nsPtr != iPtr->globalNsPtr ) {
/*
* This case is theoritically impossible,
- * we might rather panic() than 'nicely' erroring out ?
+ * we might rather Tcl_Panic() than 'nicely' erroring out ?
*/
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"trying to expose a non global command name space command",
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 048dc1e..9d352c0 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -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: tclBinary.c,v 1.15 2003/12/17 18:40:07 das Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.16 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -265,7 +265,7 @@ Tcl_SetByteArrayObj(objPtr, bytes, length)
ByteArray *byteArrayPtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetByteArrayObj called with shared object");
+ Tcl_Panic("Tcl_SetByteArrayObj called with shared object");
}
typePtr = objPtr->typePtr;
if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {
@@ -347,7 +347,7 @@ Tcl_SetByteArrayLength(objPtr, length)
ByteArray *byteArrayPtr, *newByteArrayPtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetObjLength called with shared object");
+ Tcl_Panic("Tcl_SetObjLength called with shared object");
}
if (objPtr->typePtr != &tclByteArrayType) {
SetByteArrayFromAny(NULL, objPtr);
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 98e8c5b..aada301 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -13,7 +13,7 @@
*
* This code contributed by Karl Lehenbauer and Mark Diekhans
*
- * RCS: @(#) $Id: tclCkalloc.c,v 1.19 2003/01/19 07:21:18 hobbs Exp $
+ * RCS: @(#) $Id: tclCkalloc.c,v 1.20 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -231,7 +231,7 @@ ValidateMemory(memHeaderP, file, line, nukeGuards)
fflush(stderr); /* In case name pointer is bad. */
fprintf(stderr, "%ld bytes allocated at (%s %d)\n", memHeaderP->length,
memHeaderP->file, memHeaderP->line);
- panic ("Memory validation failure");
+ Tcl_Panic("Memory validation failure");
}
hiPtr = (unsigned char *)memHeaderP->body + memHeaderP->length;
@@ -254,7 +254,7 @@ ValidateMemory(memHeaderP, file, line, nukeGuards)
fprintf(stderr, "%ld bytes allocated at (%s %d)\n",
memHeaderP->length, memHeaderP->file,
memHeaderP->line);
- panic("Memory validation failure");
+ Tcl_Panic("Memory validation failure");
}
if (nukeGuards) {
@@ -378,7 +378,7 @@ Tcl_DbCkalloc(size, file, line)
if (result == NULL) {
fflush(stdout);
TclDumpMemoryInfo(stderr);
- panic("unable to alloc %u bytes, %s line %d", size, file, line);
+ Tcl_Panic("unable to alloc %u bytes, %s line %d", size, file, line);
}
/*
@@ -539,7 +539,7 @@ Tcl_AttemptDbCkalloc(size, file, line)
* Tcl_DbCkfree - debugging ckfree
*
* Verify that the low and high guards are intact, and if so
- * then free the buffer else panic.
+ * then free the buffer else Tcl_Panic.
*
* The guards are erased after being checked to catch duplicate
* frees.
@@ -1010,7 +1010,7 @@ Tcl_Alloc (size)
* a special pointer on failure, but we only check for NULL
*/
if ((result == NULL) && size) {
- panic("unable to alloc %u bytes", size);
+ Tcl_Panic("unable to alloc %u bytes", size);
}
return result;
}
@@ -1027,7 +1027,7 @@ Tcl_DbCkalloc(size, file, line)
if ((result == NULL) && size) {
fflush(stdout);
- panic("unable to alloc %u bytes, %s line %d", size, file, line);
+ Tcl_Panic("unable to alloc %u bytes, %s line %d", size, file, line);
}
return result;
}
@@ -1085,7 +1085,7 @@ Tcl_Realloc(ptr, size)
result = TclpRealloc(ptr, size);
if ((result == NULL) && size) {
- panic("unable to realloc %u bytes", size);
+ Tcl_Panic("unable to realloc %u bytes", size);
}
return result;
}
@@ -1103,7 +1103,7 @@ Tcl_DbCkrealloc(ptr, size, file, line)
if ((result == NULL) && size) {
fflush(stdout);
- panic("unable to realloc %u bytes, %s line %d", size, file, line);
+ Tcl_Panic("unable to realloc %u bytes, %s line %d", size, file, line);
}
return result;
}
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 41c9873..48d3101 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -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: tclCmdAH.c,v 1.38 2003/12/17 17:47:28 vincentdarley Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.39 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -1906,12 +1906,12 @@ Tcl_ForeachObjCmd(dummy, interp, objc, objv)
result = Tcl_ListObjGetElements(interp, argObjv[1+i*2],
&varcList[i], &varvList[i]);
if (result != TCL_OK) {
- panic("Tcl_ForeachObjCmd: could not reconvert variable list %d to a list object\n", i);
+ Tcl_Panic("Tcl_ForeachObjCmd: could not reconvert variable list %d to a list object\n", i);
}
result = Tcl_ListObjGetElements(interp, argObjv[2+i*2],
&argcList[i], &argvList[i]);
if (result != TCL_OK) {
- panic("Tcl_ForeachObjCmd: could not reconvert value list %d to a list object\n", i);
+ Tcl_Panic("Tcl_ForeachObjCmd: could not reconvert value list %d to a list object\n", i);
}
for (v = 0; v < varcList[i]; v++) {
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index cb53798..0b8de0d 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.57 2003/11/03 12:48:52 vincentdarley Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.58 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -2693,7 +2693,7 @@ Tcl_LrepeatObjCmd(dummy, interp, objc, objv)
* We allocate using attemptckalloc() because if we ask for
* something big but can't get it, we've still got a high chance
* of having a proper failover strategy. If *that* fails to get
- * memory, panic() will happen just a few lines lower...
+ * memory, Tcl_Panic() will happen just a few lines lower...
*/
if ((unsigned)elementCount > INT_MAX/sizeof(Tcl_Obj *)/objc) {
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index d1961b7..1077418 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.97 2003/12/14 18:32:36 dkf Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.98 2003/12/24 04:18:18 davygrvy Exp $
*/
#include "tclInt.h"
@@ -2515,7 +2515,7 @@ Tcl_SubstObjCmd(dummy, interp, objc, objv)
break;
}
default: {
- panic("Tcl_SubstObjCmd: bad option index to SubstOptions");
+ Tcl_Panic("Tcl_SubstObjCmd: bad option index to SubstOptions");
}
}
}
@@ -2868,7 +2868,7 @@ Tcl_SwitchObjCmd(dummy, interp, objc, objv)
* This shouldn't happen since we've checked that the
* last body is not a continuation...
*/
- panic("fall-out when searching for body to match pattern");
+ Tcl_Panic("fall-out when searching for body to match pattern");
}
if (strcmp(Tcl_GetString(objv[j]), "-") != 0) {
break;
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 53a1efd..e3e9eb3 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -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: tclCompCmds.c,v 1.51 2003/10/30 22:52:59 dkf Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.52 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -371,7 +371,7 @@ TclCompileCatchCmd(interp, parsePtr, envPtr)
*/
if (TclFixupForwardJumpToHere(envPtr, &jumpFixup, 127)) {
- panic("TclCompileCatchCmd: bad jump distance %d\n",
+ Tcl_Panic("TclCompileCatchCmd: bad jump distance %d\n",
(envPtr->codeNext - envPtr->codeStart) - jumpFixup.codeOffset);
}
TclEmitOpcode(INST_END_CATCH, envPtr);
@@ -1447,7 +1447,7 @@ TclCompileIfCmd(interp, parsePtr, envPtr)
jumpFalseDist += 3;
TclStoreInt4AtPtr(jumpFalseDist, (ifFalsePc + 1));
} else {
- panic("TclCompileIfCmd: unexpected opcode updating ifFalse jump");
+ Tcl_Panic("TclCompileIfCmd: unexpected opcode updating ifFalse jump");
}
}
}
@@ -3061,7 +3061,7 @@ TclCompileSwitchCmd(interp, parsePtr, envPtr)
TclEmitInstInt1(INST_STR_MATCH, /*nocase*/0, envPtr);
break;
default:
- panic("unknown switch mode: %d",mode);
+ Tcl_Panic("unknown switch mode: %d",mode);
}
/*
* Process fall-through clauses here...
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index c7e6213..d44a528 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompExpr.c,v 1.16 2003/10/14 15:44:52 dgp Exp $
+ * RCS: @(#) $Id: tclCompExpr.c,v 1.17 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -351,7 +351,7 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr)
char buffer[TCL_UTF_MAX];
if (exprTokenPtr->type != TCL_TOKEN_SUB_EXPR) {
- panic("CompileSubExpr: token type %d not TCL_TOKEN_SUB_EXPR\n",
+ Tcl_Panic("CompileSubExpr: token type %d not TCL_TOKEN_SUB_EXPR\n",
exprTokenPtr->type);
}
code = TCL_OK;
@@ -532,14 +532,14 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr)
break;
default:
- panic("CompileSubExpr: unexpected operator %d requiring special treatment\n",
+ Tcl_Panic("CompileSubExpr: unexpected operator %d requiring special treatment\n",
opIndex);
} /* end switch on operator requiring special treatment */
infoPtr->hasOperators = 1;
break;
default:
- panic("CompileSubExpr: unexpected token type %d\n",
+ Tcl_Panic("CompileSubExpr: unexpected token type %d\n",
tokenPtr->type);
}
@@ -624,7 +624,7 @@ CompileLandOrLorExpr(exprTokenPtr, opIndex, infoPtr, envPtr, endPtrPtr)
dist = (envPtr->codeNext - envPtr->codeStart) - lhsTrueFixup.codeOffset;
if (TclFixupForwardJump(envPtr, &lhsTrueFixup, dist, 127)) {
badDist:
- panic("CompileLandOrLorExpr: bad jump distance %d\n", dist);
+ Tcl_Panic("CompileLandOrLorExpr: bad jump distance %d\n", dist);
}
envPtr->currStackDepth = savedStackDepth;
TclEmitPush(TclRegisterNewLiteral(envPtr, "1", 1), envPtr);
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 0514838..4946ec2 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -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: tclCompile.c,v 1.54 2003/11/19 22:04:39 dkf Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.55 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -372,7 +372,7 @@ TclSetByteCodeFromAny(interp, objPtr, hookProc, clientData)
if (!traceInitialized) {
if (Tcl_LinkVar(interp, "tcl_traceCompile",
(char *) &tclTraceCompile, TCL_LINK_INT) != TCL_OK) {
- panic("SetByteCodeFromAny: unable to create link for tcl_traceCompile variable");
+ Tcl_Panic("SetByteCodeFromAny: unable to create link for tcl_traceCompile variable");
}
traceInitialized = 1;
}
@@ -1316,7 +1316,7 @@ TclCompileTokens(interp, tokenPtr, count, envPtr)
break;
default:
- panic("Unexpected token type in TclCompileTokens");
+ Tcl_Panic("Unexpected token type in TclCompileTokens");
}
}
@@ -1621,7 +1621,7 @@ TclInitByteCodeObj(objPtr, envPtr)
nextPtr = EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p);
#ifdef TCL_COMPILE_DEBUG
if (((size_t)(nextPtr - p)) != cmdLocBytes) {
- panic("TclInitByteCodeObj: encoded cmd location bytes %d != expected size %d\n", (nextPtr - p), cmdLocBytes);
+ Tcl_Panic("TclInitByteCodeObj: encoded cmd location bytes %d != expected size %d\n", (nextPtr - p), cmdLocBytes);
}
#endif
@@ -2015,7 +2015,7 @@ EnterCmdStartData(envPtr, cmdIndex, srcOffset, codeOffset)
CmdLocation *cmdLocPtr;
if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
- panic("EnterCmdStartData: bad command index %d\n", cmdIndex);
+ Tcl_Panic("EnterCmdStartData: bad command index %d\n", cmdIndex);
}
if (cmdIndex >= envPtr->cmdMapEnd) {
@@ -2047,7 +2047,7 @@ EnterCmdStartData(envPtr, cmdIndex, srcOffset, codeOffset)
if (cmdIndex > 0) {
if (codeOffset < envPtr->cmdMapPtr[cmdIndex-1].codeOffset) {
- panic("EnterCmdStartData: cmd map not sorted by code offset");
+ Tcl_Panic("EnterCmdStartData: cmd map not sorted by code offset");
}
}
@@ -2092,11 +2092,11 @@ EnterCmdExtentData(envPtr, cmdIndex, numSrcBytes, numCodeBytes)
CmdLocation *cmdLocPtr;
if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
- panic("EnterCmdExtentData: bad command index %d\n", cmdIndex);
+ Tcl_Panic("EnterCmdExtentData: bad command index %d\n", cmdIndex);
}
if (cmdIndex > envPtr->cmdMapEnd) {
- panic("EnterCmdExtentData: missing start data for command %d\n",
+ Tcl_Panic("EnterCmdExtentData: missing start data for command %d\n",
cmdIndex);
}
@@ -2529,7 +2529,7 @@ TclFixupForwardJump(envPtr, jumpFixupPtr, jumpDist, distThreshold)
rangePtr->catchOffset += 3;
break;
default:
- panic("TclFixupForwardJump: bad ExceptionRange type %d\n",
+ Tcl_Panic("TclFixupForwardJump: bad ExceptionRange type %d\n",
rangePtr->type);
}
}
@@ -2755,7 +2755,7 @@ GetCmdLocEncodingSize(envPtr)
for (i = 0; i < numCmds; i++) {
codeDelta = (mapPtr[i].codeOffset - prevCodeOffset);
if (codeDelta < 0) {
- panic("GetCmdLocEncodingSize: bad code offset");
+ Tcl_Panic("GetCmdLocEncodingSize: bad code offset");
} else if (codeDelta <= 127) {
codeDeltaNext++;
} else {
@@ -2765,7 +2765,7 @@ GetCmdLocEncodingSize(envPtr)
codeLen = mapPtr[i].numCodeBytes;
if (codeLen < 0) {
- panic("GetCmdLocEncodingSize: bad code length");
+ Tcl_Panic("GetCmdLocEncodingSize: bad code length");
} else if (codeLen <= 127) {
codeLengthNext++;
} else {
@@ -2782,7 +2782,7 @@ GetCmdLocEncodingSize(envPtr)
srcLen = mapPtr[i].numSrcBytes;
if (srcLen < 0) {
- panic("GetCmdLocEncodingSize: bad source length");
+ Tcl_Panic("GetCmdLocEncodingSize: bad source length");
} else if (srcLen <= 127) {
srcLengthNext++;
} else {
@@ -2840,7 +2840,7 @@ EncodeCmdLocMap(envPtr, codePtr, startPtr)
for (i = 0; i < numCmds; i++) {
codeDelta = (mapPtr[i].codeOffset - prevOffset);
if (codeDelta < 0) {
- panic("EncodeCmdLocMap: bad code offset");
+ Tcl_Panic("EncodeCmdLocMap: bad code offset");
} else if (codeDelta <= 127) {
TclStoreInt1AtPtr(codeDelta, p);
p++;
@@ -2861,7 +2861,7 @@ EncodeCmdLocMap(envPtr, codePtr, startPtr)
for (i = 0; i < numCmds; i++) {
codeLen = mapPtr[i].numCodeBytes;
if (codeLen < 0) {
- panic("EncodeCmdLocMap: bad code length");
+ Tcl_Panic("EncodeCmdLocMap: bad code length");
} else if (codeLen <= 127) {
TclStoreInt1AtPtr(codeLen, p);
p++;
@@ -2901,7 +2901,7 @@ EncodeCmdLocMap(envPtr, codePtr, startPtr)
for (i = 0; i < numCmds; i++) {
srcLen = mapPtr[i].numSrcBytes;
if (srcLen < 0) {
- panic("EncodeCmdLocMap: bad source length");
+ Tcl_Panic("EncodeCmdLocMap: bad source length");
} else if (srcLen <= 127) {
TclStoreInt1AtPtr(srcLen, p);
p++;
@@ -3044,7 +3044,7 @@ TclPrintByteCodeObj(interp, objPtr)
fprintf(stdout, "catch %d\n", rangePtr->catchOffset);
break;
default:
- panic("TclPrintByteCodeObj: bad ExceptionRange type %d\n",
+ Tcl_Panic("TclPrintByteCodeObj: bad ExceptionRange type %d\n",
rangePtr->type);
}
}
@@ -3255,7 +3255,7 @@ TclPrintInstruction(codePtr, pc)
int localCt = procPtr->numCompiledLocals;
CompiledLocal *localPtr = procPtr->firstLocalPtr;
if (opnd >= localCt) {
- panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
+ Tcl_Panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
(unsigned int) opnd, localCt);
}
for (j = 0; j < opnd; j++) {
@@ -3284,7 +3284,7 @@ TclPrintInstruction(codePtr, pc)
int localCt = procPtr->numCompiledLocals;
CompiledLocal *localPtr = procPtr->firstLocalPtr;
if (opnd >= localCt) {
- panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
+ Tcl_Panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
(unsigned int) opnd, localCt);
}
for (j = 0; j < opnd; j++) {
diff --git a/generic/tclConfig.c b/generic/tclConfig.c
index e1336f2..3cd5813 100644
--- a/generic/tclConfig.c
+++ b/generic/tclConfig.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclConfig.c,v 1.4 2003/11/01 01:20:34 dkf Exp $
+ * RCS: @(#) $Id: tclConfig.c,v 1.5 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -220,7 +220,7 @@ QueryConfigObjCmd(clientData, interp, objc, objv)
pDB = GetConfigDict(interp);
res = Tcl_DictObjGet(interp, pDB, pkgName, &pkgDict);
if (res!=TCL_OK || pkgDict==NULL) {
- /* Maybe a panic is better, because the package data has to be present */
+ /* Maybe a Tcl_Panic is better, because the package data has to be present */
Tcl_SetObjResult(interp, Tcl_NewStringObj("package not known", -1));
return TCL_ERROR;
}
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 364ffcd..5fbedd8 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.11 2003/09/04 16:44:12 dgp Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.12 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -654,7 +654,7 @@ Tcl_DictObjPut(interp, dictPtr, keyPtr, valuePtr)
int isNew;
if (Tcl_IsShared(dictPtr)) {
- panic("Tcl_DictObjPut called with shared object");
+ Tcl_Panic("Tcl_DictObjPut called with shared object");
}
if (dictPtr->typePtr != &tclDictType) {
@@ -752,7 +752,7 @@ Tcl_DictObjRemove(interp, dictPtr, keyPtr)
Tcl_HashEntry *hPtr;
if (Tcl_IsShared(dictPtr)) {
- panic("Tcl_DictObjRemove called with shared object");
+ Tcl_Panic("Tcl_DictObjRemove called with shared object");
}
if (dictPtr->typePtr != &tclDictType) {
@@ -929,7 +929,7 @@ Tcl_DictObjNext(searchPtr, keyPtrPtr, valuePtrPtr, donePtr)
* or removed. This *shouldn't* happen, but...
*/
if (((Dict *)searchPtr->dictionaryPtr)->epoch != searchPtr->epoch) {
- panic("concurrent dictionary modification and search");
+ Tcl_Panic("concurrent dictionary modification and search");
}
hPtr = Tcl_NextHashEntry(&searchPtr->search);
@@ -1016,10 +1016,10 @@ Tcl_DictObjPutKeyList(interp, dictPtr, keyc, keyv, valuePtr)
int isNew;
if (Tcl_IsShared(dictPtr)) {
- panic("Tcl_DictObjPutKeyList called with shared object");
+ Tcl_Panic("Tcl_DictObjPutKeyList called with shared object");
}
if (keyc < 1) {
- panic("Tcl_DictObjPutKeyList called with empty key list");
+ Tcl_Panic("Tcl_DictObjPutKeyList called with empty key list");
}
dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
@@ -1072,10 +1072,10 @@ Tcl_DictObjRemoveKeyList(interp, dictPtr, keyc, keyv)
Tcl_HashEntry *hPtr;
if (Tcl_IsShared(dictPtr)) {
- panic("Tcl_DictObjRemoveKeyList called with shared object");
+ Tcl_Panic("Tcl_DictObjRemoveKeyList called with shared object");
}
if (keyc < 1) {
- panic("Tcl_DictObjRemoveKeyList called with empty key list");
+ Tcl_Panic("Tcl_DictObjRemoveKeyList called with empty key list");
}
dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
@@ -2492,7 +2492,7 @@ DictFilterCmd(interp, objc, objv)
}
return result;
}
- panic("unexpected fallthrough");
+ Tcl_Panic("unexpected fallthrough");
/* Control never reaches this point. */
return TCL_ERROR;
@@ -2571,7 +2571,7 @@ Tcl_DictObjCmd(/*ignored*/ clientData, interp, objc, objv)
case DICT_UNSET: return DictUnsetCmd(interp, objc, objv);
case DICT_VALUES: return DictValuesCmd(interp, objc, objv);
}
- panic("unexpected fallthrough!");
+ Tcl_Panic("unexpected fallthrough!");
/*
* Next line is NOT REACHED - stops compliler complaint though...
*/
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 576a479..a0b7b7f 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.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: tclEncoding.c,v 1.16 2003/02/21 02:40:58 hobbs Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.17 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -2764,7 +2764,7 @@ GetTableEncoding(dataPtr, state)
encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, subTablePtr->name);
if ((encodingPtr == NULL)
|| (encodingPtr->toUtfProc != TableToUtfProc)) {
- panic("EscapeToUtfProc: invalid sub table");
+ Tcl_Panic("EscapeToUtfProc: invalid sub table");
}
subTablePtr->encodingPtr = encodingPtr;
}
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 3449db1..0466db3 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -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: tclEvent.c,v 1.30 2003/09/29 21:38:49 dkf Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.31 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -617,7 +617,7 @@ Tcl_Exit(status)
/*
* Warning: this code SHOULD NOT return, as there is code that
* depends on Tcl_Exit never returning. In fact, we will
- * panic if anyone returns, so critical is this dependcy.
+ * Tcl_Panic if anyone returns, so critical is this dependcy.
*/
currentAppExitPtr((ClientData) status);
Tcl_Panic("AppExitProc returned unexpectedly");
@@ -742,7 +742,7 @@ TclInitSubsystems(argv0)
ThreadSpecificData *tsdPtr;
if (inFinalize != 0) {
- panic("TclInitSubsystems called while finalizing");
+ Tcl_Panic("TclInitSubsystems called while finalizing");
}
/*
@@ -1180,7 +1180,7 @@ Tcl_UpdateObjCmd(clientData, interp, objc, objv)
break;
}
default: {
- panic("Tcl_UpdateObjCmd: bad option index to UpdateOptions");
+ Tcl_Panic("Tcl_UpdateObjCmd: bad option index to UpdateOptions");
}
}
} else {
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 071ac25..f12452b 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -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: tclExecute.c,v 1.117 2003/11/16 02:12:56 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.118 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -174,14 +174,14 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS] = { 0, 0, 0, 0, 0 };
switch (nCleanup) {\
case 1: goto cleanup1_pushObjResultPtr;\
case 2: goto cleanup2_pushObjResultPtr;\
- default: panic("ERROR: bad usage of macro NEXT_INST_F");\
+ default: Tcl_Panic("ERROR: bad usage of macro NEXT_INST_F");\
}\
} else {\
pc += (pcAdjustment);\
switch (nCleanup) {\
case 1: goto cleanup1;\
case 2: goto cleanup2;\
- default: panic("ERROR: bad usage of macro NEXT_INST_F");\
+ default: Tcl_Panic("ERROR: bad usage of macro NEXT_INST_F");\
}\
}
@@ -465,7 +465,7 @@ InitByteCodeExecution(interp)
#ifdef TCL_COMPILE_DEBUG
if (Tcl_LinkVar(interp, "tcl_traceExec", (char *) &tclTraceExec,
TCL_LINK_INT) != TCL_OK) {
- panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
+ Tcl_Panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
}
#endif
#ifdef TCL_COMPILE_STATS
@@ -563,7 +563,7 @@ TclDeleteExecEnv(eePtr)
if (eePtr->stackPtr[-1] == (Tcl_Obj *) ((char *) 1)) {
ckfree((char *) (eePtr->stackPtr-1));
} else {
- panic("ERROR: freeing an execEnv whose stack is still in use.\n");
+ Tcl_Panic("ERROR: freeing an execEnv whose stack is still in use.\n");
}
TclDecrRefCount(eePtr->errorInfo);
TclDecrRefCount(eePtr->errorCode);
@@ -756,7 +756,7 @@ Tcl_ExprObj(interp, objPtr, resultPtrPtr)
|| (codePtr->compileEpoch != iPtr->compileEpoch)) {
if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
if ((Interp *) *codePtr->interpHandle != iPtr) {
- panic("Tcl_ExprObj: compiled expression jumped interps");
+ Tcl_Panic("Tcl_ExprObj: compiled expression jumped interps");
}
codePtr->compileEpoch = iPtr->compileEpoch;
} else {
@@ -971,7 +971,7 @@ TclCompEvalObj(interp, objPtr)
|| (codePtr->nsEpoch != namespacePtr->resolverEpoch)) {
if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
if ((Interp *) *codePtr->interpHandle != iPtr) {
- panic("Tcl_EvalObj: compiled script jumped interps");
+ Tcl_Panic("Tcl_EvalObj: compiled script jumped interps");
}
codePtr->compileEpoch = iPtr->compileEpoch;
} else {
@@ -3864,7 +3864,7 @@ TclExecuteByteCode(interp, codePtr)
if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) {
TRACE(("UNRECOGNIZED BUILTIN FUNC CODE %d\n", opnd));
- panic("TclExecuteByteCode: unrecognized builtin function code %d", opnd);
+ Tcl_Panic("TclExecuteByteCode: unrecognized builtin function code %d", opnd);
}
mathFuncPtr = &(tclBuiltinFuncTable[opnd]);
DECACHE_STACK_INFO();
@@ -4246,7 +4246,7 @@ TclExecuteByteCode(interp, codePtr)
NEXT_INST_F(1, 0, 1);
default:
- panic("TclExecuteByteCode: unrecognized opCode %u", *pc);
+ Tcl_Panic("TclExecuteByteCode: unrecognized opCode %u", *pc);
} /* end of switch on opCode */
/*
@@ -4444,7 +4444,7 @@ TclExecuteByteCode(interp, codePtr)
(unsigned int)(pc - codePtr->codeStart),
(unsigned int) (tosPtr - eePtr->stackPtr),
(unsigned int) initStackTop);
- panic("TclExecuteByteCode execution failure: end stack top < start stack top");
+ Tcl_Panic("TclExecuteByteCode execution failure: end stack top < start stack top");
}
eePtr->tosPtr = initTosPtr - codePtr->maxExceptDepth;
}
@@ -4557,12 +4557,12 @@ ValidatePcAndStackTop(codePtr, pc, stackTop, stackLowerBound)
if (((unsigned int) pc < codeStart) || ((unsigned int) pc > codeEnd)) {
fprintf(stderr, "\nBad instruction pc 0x%x in TclExecuteByteCode\n",
(unsigned int) pc);
- panic("TclExecuteByteCode execution failure: bad pc");
+ Tcl_Panic("TclExecuteByteCode execution failure: bad pc");
}
if ((unsigned int) opCode > LAST_INST_OPCODE) {
fprintf(stderr, "\nBad opcode %d at pc %u in TclExecuteByteCode\n",
(unsigned int) opCode, relativePc);
- panic("TclExecuteByteCode execution failure: bad opcode");
+ Tcl_Panic("TclExecuteByteCode execution failure: bad opcode");
}
if ((stackTop < stackLowerBound) || (stackTop > stackUpperBound)) {
int numChars;
@@ -4579,7 +4579,7 @@ ValidatePcAndStackTop(codePtr, pc, stackTop, stackLowerBound)
} else {
fprintf(stderr, "\n");
}
- panic("TclExecuteByteCode execution failure: bad stack top");
+ Tcl_Panic("TclExecuteByteCode execution failure: bad stack top");
}
}
#endif /* TCL_COMPILE_DEBUG */
@@ -5773,7 +5773,7 @@ ExprCallMathFunc(interp, eePtr, objc, objv)
}
mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
if (mathFuncPtr->numArgs != (objc-1)) {
- panic("ExprCallMathFunc: expected number of args %d != actual number %d",
+ Tcl_Panic("ExprCallMathFunc: expected number of args %d != actual number %d",
mathFuncPtr->numArgs, objc);
result = TCL_ERROR;
goto done;
diff --git a/generic/tclHash.c b/generic/tclHash.c
index aeb04f9..3d8fd00 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -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: tclHash.c,v 1.15 2003/11/15 23:35:16 dkf Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.16 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -193,7 +193,7 @@ Tcl_InitCustomHashTable(tablePtr, keyType, typePtr)
* the behaviour of this table. */
{
#if (TCL_SMALL_HASH_TABLE != 4)
- panic("Tcl_InitCustomHashTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
+ Tcl_Panic("Tcl_InitCustomHashTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
TCL_SMALL_HASH_TABLE);
#endif
@@ -548,7 +548,7 @@ Tcl_DeleteHashEntry(entryPtr)
} else {
for (prevPtr = *bucketPtr; ; prevPtr = prevPtr->nextPtr) {
if (prevPtr == NULL) {
- panic("malformed bucket chain in Tcl_DeleteHashEntry");
+ Tcl_Panic("malformed bucket chain in Tcl_DeleteHashEntry");
}
if (prevPtr->nextPtr == entryPtr) {
prevPtr->nextPtr = entryPtr->nextPtr;
@@ -1068,7 +1068,7 @@ HashStringKey(tablePtr, keyPtr)
* on a table that has been deleted.
*
* Results:
- * If panic returns (which it shouldn't) this procedure returns
+ * If Tcl_Panic returns (which it shouldn't) this procedure returns
* NULL.
*
* Side effects:
@@ -1083,7 +1083,7 @@ BogusFind(tablePtr, key)
Tcl_HashTable *tablePtr; /* Table in which to lookup entry. */
CONST char *key; /* Key to use to find matching entry. */
{
- panic("called Tcl_FindHashEntry on deleted table");
+ Tcl_Panic("called Tcl_FindHashEntry on deleted table");
return NULL;
}
@@ -1114,7 +1114,7 @@ BogusCreate(tablePtr, key, newPtr)
int *newPtr; /* Store info here telling whether a new
* entry was created. */
{
- panic("called Tcl_CreateHashEntry on deleted table");
+ Tcl_Panic("called Tcl_CreateHashEntry on deleted table");
return NULL;
}
#endif
diff --git a/generic/tclIO.c b/generic/tclIO.c
index adf6e83..527d697 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -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: tclIO.c,v 1.68 2003/04/22 23:20:41 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.69 2003/12/24 04:18:19 davygrvy Exp $
*/
#include "tclInt.h"
@@ -758,7 +758,7 @@ Tcl_RegisterChannel(interp, chan)
statePtr = chanPtr->state;
if (statePtr->channelName == (CONST char *) NULL) {
- panic("Tcl_RegisterChannel: channel without name");
+ Tcl_Panic("Tcl_RegisterChannel: channel without name");
}
if (interp != (Tcl_Interp *) NULL) {
hTblPtr = GetChannelTable(interp);
@@ -768,7 +768,7 @@ Tcl_RegisterChannel(interp, chan)
return;
}
- panic("Tcl_RegisterChannel: duplicate channel names");
+ Tcl_Panic("Tcl_RegisterChannel: duplicate channel names");
}
Tcl_SetHashValue(hPtr, (ClientData) chanPtr);
}
@@ -1126,7 +1126,7 @@ Tcl_CreateChannel(typePtr, chanName, instanceData, mask)
statePtr->channelName = tmp;
strcpy(tmp, chanName);
} else {
- panic("Tcl_CreateChannel: NULL channel name");
+ Tcl_Panic("Tcl_CreateChannel: NULL channel name");
}
statePtr->flags = mask;
@@ -2245,7 +2245,7 @@ CloseChannel(interp, chanPtr, errorCode)
*/
if (statePtr->outQueueHead != (ChannelBuffer *) NULL) {
- panic("TclFlush, closed channel: queued output left");
+ Tcl_Panic("TclFlush, closed channel: queued output left");
}
/*
@@ -2403,7 +2403,7 @@ Tcl_CutChannel(chan)
/* Empty loop body. */
}
if (prevCSPtr == (ChannelState *) NULL) {
- panic("FlushChannel: damaged channel list");
+ Tcl_Panic("FlushChannel: damaged channel list");
}
prevCSPtr->nextCSPtr = statePtr->nextCSPtr;
}
@@ -2450,7 +2450,7 @@ Tcl_SpliceChannel(chan)
ChannelState *statePtr = ((Channel *) chan)->state;
if (statePtr->nextCSPtr != (ChannelState *) NULL) {
- panic("Tcl_SpliceChannel: trying to add channel used in different list");
+ Tcl_Panic("Tcl_SpliceChannel: trying to add channel used in different list");
}
statePtr->nextCSPtr = tsdPtr->firstCSPtr;
@@ -2527,7 +2527,7 @@ Tcl_Close(interp, chan)
chanPtr = statePtr->topChanPtr;
if (statePtr->refCount > 0) {
- panic("called Tcl_Close on channel with refCount > 0");
+ Tcl_Panic("called Tcl_Close on channel with refCount > 0");
}
/*
@@ -6066,7 +6066,7 @@ Tcl_BadChannelOption(interp, optionName, optionList)
}
if (Tcl_SplitList(interp, Tcl_DStringValue(&ds),
&argc, &argv) != TCL_OK) {
- panic("malformed option list in channel driver");
+ Tcl_Panic("malformed option list in channel driver");
}
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "bad option \"", optionName,
@@ -8083,7 +8083,7 @@ CopyAndTranslateBuffer(statePtr, result, space)
break;
}
default: {
- panic("unknown eol translation mode");
+ Tcl_Panic("unknown eol translation mode");
}
}
@@ -8334,9 +8334,9 @@ DoWrite(chanPtr, src, srcLen)
}
break;
case TCL_TRANSLATE_AUTO:
- panic("Tcl_Write: AUTO output translation mode not supported");
+ Tcl_Panic("Tcl_Write: AUTO output translation mode not supported");
default:
- panic("Tcl_Write: unknown output translation mode");
+ Tcl_Panic("Tcl_Write: unknown output translation mode");
}
/*
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index bb2b567..2f9e764 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.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: tclIOCmd.c,v 1.15 2002/02/15 14:28:49 dkf Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.16 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -997,7 +997,7 @@ Tcl_OpenObjCmd(notUsed, interp, objc, objv)
flags |= (TCL_STDIN | TCL_STDOUT);
break;
default:
- panic("Tcl_OpenCmd: invalid mode value");
+ Tcl_Panic("Tcl_OpenCmd: invalid mode value");
break;
}
chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
@@ -1103,7 +1103,7 @@ RegisterTcpServerInterpCleanup(interp, acceptCallbackPtr)
}
hPtr = Tcl_CreateHashEntry(hTblPtr, (char *) acceptCallbackPtr, &new);
if (!new) {
- panic("RegisterTcpServerCleanup: damaged accept record table");
+ Tcl_Panic("RegisterTcpServerCleanup: damaged accept record table");
}
Tcl_SetHashValue(hPtr, (ClientData) acceptCallbackPtr);
}
@@ -1386,7 +1386,7 @@ Tcl_SocketObjCmd(notUsed, interp, objc, objv)
break;
}
default: {
- panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
+ Tcl_Panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
}
}
}
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index fb5448e..8d2b3ba 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.90 2003/12/17 09:24:43 vasiljevic Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.91 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -3294,7 +3294,7 @@ TclGetPathType(pathObjPtr, filesystemPtrPtr, driveNameLengthPtr, driveNameRef)
* return with the current value of 'type'.
*
* It would be better if we could signal an error
- * here (but panic seems a bit excessive).
+ * here (but Tcl_Panic seems a bit excessive).
*/
numVolumes = -1;
}
@@ -3697,7 +3697,7 @@ Tcl_FSGetFileSystemForPath(pathObjPtr)
Tcl_Filesystem* retVal = NULL;
if (pathObjPtr == NULL) {
- panic("Tcl_FSGetFileSystemForPath called with NULL object");
+ Tcl_Panic("Tcl_FSGetFileSystemForPath called with NULL object");
return NULL;
}
@@ -3709,7 +3709,7 @@ Tcl_FSGetFileSystemForPath(pathObjPtr)
*/
if (pathObjPtr->refCount == 0) {
- panic("Tcl_FSGetFileSystemForPath called with object with refCount == 0");
+ Tcl_Panic("Tcl_FSGetFileSystemForPath called with object with refCount == 0");
return NULL;
}
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 2333907..1cf52ea 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.24 2003/09/29 22:11:11 dkf Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.25 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -285,7 +285,7 @@ InterpInfoDeleteProc(clientData, interp)
masterPtr = &interpInfoPtr->master;
if (masterPtr->slaveTable.numEntries != 0) {
- panic("InterpInfoDeleteProc: still exist commands");
+ Tcl_Panic("InterpInfoDeleteProc: still exist commands");
}
Tcl_DeleteHashTable(&masterPtr->slaveTable);
@@ -323,7 +323,7 @@ InterpInfoDeleteProc(clientData, interp)
*/
if (slavePtr->aliasTable.numEntries != 0) {
- panic("InterpInfoDeleteProc: still exist aliases");
+ Tcl_Panic("InterpInfoDeleteProc: still exist aliases");
}
Tcl_DeleteHashTable(&slavePtr->aliasTable);
@@ -1887,7 +1887,7 @@ SlaveObjCmd(clientData, interp, objc, objv)
slaveInterp = (Tcl_Interp *) clientData;
if (slaveInterp == NULL) {
- panic("SlaveObjCmd: interpreter has been deleted");
+ Tcl_Panic("SlaveObjCmd: interpreter has been deleted");
}
if (objc < 2) {
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 64c4182..c990045 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -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: tclListObj.c,v 1.17 2003/11/01 01:28:04 dkf Exp $
+ * RCS: @(#) $Id: tclListObj.c,v 1.18 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -355,7 +355,7 @@ Tcl_SetListObj(objPtr, objc, objv)
int i;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetListObj called with shared object");
+ Tcl_Panic("Tcl_SetListObj called with shared object");
}
/*
@@ -487,7 +487,7 @@ Tcl_ListObjAppendList(interp, listPtr, elemListPtr)
Tcl_Obj **objv;
if (Tcl_IsShared(listPtr)) {
- panic("Tcl_ListObjAppendList called with shared object");
+ Tcl_Panic("Tcl_ListObjAppendList called with shared object");
}
if (listPtr->typePtr != &tclListType) {
result = SetListFromAny(interp, listPtr);
@@ -549,7 +549,7 @@ Tcl_ListObjAppendElement(interp, listPtr, objPtr)
int numElems, numRequired;
if (Tcl_IsShared(listPtr)) {
- panic("Tcl_ListObjAppendElement called with shared object");
+ Tcl_Panic("Tcl_ListObjAppendElement called with shared object");
}
if (listPtr->typePtr != &tclListType) {
int result = SetListFromAny(interp, listPtr);
@@ -749,7 +749,7 @@ Tcl_ListObjReplace(interp, listPtr, first, count, objc, objv)
int start, shift, newMax, i, j, result;
if (Tcl_IsShared(listPtr)) {
- panic("Tcl_ListObjReplace called with shared object");
+ Tcl_Panic("Tcl_ListObjReplace called with shared object");
}
if (listPtr->typePtr != &tclListType) {
result = SetListFromAny(interp, listPtr);
@@ -1368,10 +1368,10 @@ TclLsetFlat(interp, listPtr, indexCount, indexArray, valuePtr)
*
* Side effects:
*
- * Panics if listPtr designates a shared object. Otherwise, attempts
- * to convert it to a list. Decrements the ref count of the object
- * at the specified index within the list, replaces with the
- * object designated by valuePtr, and increments the ref count
+ * Tcl_Panic if listPtr designates a shared object. Otherwise,
+ * attempts to convert it to a list. Decrements the ref count of
+ * the object at the specified index within the list, replaces with
+ * the object designated by valuePtr, and increments the ref count
* of the replacement object.
*
* It is the caller's responsibility to invalidate the string
@@ -1399,7 +1399,7 @@ TclListObjSetElement(interp, listPtr, index, valuePtr)
/* Ensure that the listPtr parameter designates an unshared list */
if (Tcl_IsShared(listPtr)) {
- panic("Tcl_ListObjSetElement called with shared object");
+ Tcl_Panic("Tcl_ListObjSetElement called with shared object");
}
if (listPtr->typePtr != &tclListType) {
result = SetListFromAny(interp, listPtr);
@@ -1618,7 +1618,7 @@ SetListFromAny(interp, objPtr)
break;
}
if (i > estCount) {
- panic("SetListFromAny: bad size estimate for list");
+ Tcl_Panic("SetListFromAny: bad size estimate for list");
}
/*
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 4814002..d5d354f 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -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: tclLiteral.c,v 1.11 2001/10/11 22:28:01 msofer Exp $
+ * RCS: @(#) $Id: tclLiteral.c,v 1.12 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -63,7 +63,7 @@ TclInitLiteralTable(tablePtr)
* is supplied by the caller. */
{
#if (TCL_SMALL_HASH_TABLE != 4)
- panic("TclInitLiteralTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
+ Tcl_Panic("TclInitLiteralTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
TCL_SMALL_HASH_TABLE);
#endif
@@ -242,7 +242,7 @@ TclRegisterLiteral(envPtr, bytes, length, onHeap)
objIndex = AddLocalLiteralEntry(envPtr, globalPtr, localHash);
#ifdef TCL_COMPILE_DEBUG
if (globalPtr->refCount < 1) {
- panic("TclRegisterLiteral: global literal \"%.*s\" had bad refCount %d",
+ Tcl_Panic("TclRegisterLiteral: global literal \"%.*s\" had bad refCount %d",
(length>60? 60 : length), bytes,
globalPtr->refCount);
}
@@ -282,7 +282,7 @@ TclRegisterLiteral(envPtr, bytes, length, onHeap)
#ifdef TCL_COMPILE_DEBUG
if (TclLookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) {
- panic("TclRegisterLiteral: literal \"%.*s\" found globally but shouldn't be",
+ Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" found globally but shouldn't be",
(length>60? 60 : length), bytes);
}
#endif
@@ -321,7 +321,7 @@ TclRegisterLiteral(envPtr, bytes, length, onHeap)
}
}
if (!found) {
- panic("TclRegisterLiteral: literal \"%.*s\" wasn't global",
+ Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" wasn't global",
(length>60? 60 : length), bytes);
}
}
@@ -563,7 +563,7 @@ AddLocalLiteralEntry(envPtr, globalPtr, localHash)
}
if (!found) {
bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
- panic("AddLocalLiteralEntry: literal \"%.*s\" wasn't found locally",
+ Tcl_Panic("AddLocalLiteralEntry: literal \"%.*s\" wasn't found locally",
(length>60? 60 : length), bytes);
}
}
@@ -959,7 +959,7 @@ TclLiteralStats(tablePtr)
* None.
*
* Side effects:
- * Panics if problems are found.
+ * Tcl_Panic if problems are found.
*
*----------------------------------------------------------------------
*/
@@ -982,23 +982,23 @@ TclVerifyLocalLiteralTable(envPtr)
count++;
if (localPtr->refCount != -1) {
bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length);
- panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" had bad refCount %d",
+ Tcl_Panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" had bad refCount %d",
(length>60? 60 : length), bytes,
localPtr->refCount);
}
if (TclLookupLiteralEntry((Tcl_Interp *) envPtr->iPtr,
localPtr->objPtr) == NULL) {
bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length);
- panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" is not global",
+ Tcl_Panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" is not global",
(length>60? 60 : length), bytes);
}
if (localPtr->objPtr->bytes == NULL) {
- panic("TclVerifyLocalLiteralTable: literal has NULL string rep");
+ Tcl_Panic("TclVerifyLocalLiteralTable: literal has NULL string rep");
}
}
}
if (count != localTablePtr->numEntries) {
- panic("TclVerifyLocalLiteralTable: local literal table had %d entries, should be %d",
+ Tcl_Panic("TclVerifyLocalLiteralTable: local literal table had %d entries, should be %d",
count, localTablePtr->numEntries);
}
}
@@ -1014,7 +1014,7 @@ TclVerifyLocalLiteralTable(envPtr)
* None.
*
* Side effects:
- * Panics if problems are found.
+ * Tcl_Panic if problems are found.
*
*----------------------------------------------------------------------
*/
@@ -1037,17 +1037,17 @@ TclVerifyGlobalLiteralTable(iPtr)
count++;
if (globalPtr->refCount < 1) {
bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
- panic("TclVerifyGlobalLiteralTable: global literal \"%.*s\" had bad refCount %d",
+ Tcl_Panic("TclVerifyGlobalLiteralTable: global literal \"%.*s\" had bad refCount %d",
(length>60? 60 : length), bytes,
globalPtr->refCount);
}
if (globalPtr->objPtr->bytes == NULL) {
- panic("TclVerifyGlobalLiteralTable: literal has NULL string rep");
+ Tcl_Panic("TclVerifyGlobalLiteralTable: literal has NULL string rep");
}
}
}
if (count != globalTablePtr->numEntries) {
- panic("TclVerifyGlobalLiteralTable: global literal table had %d entries, should be %d",
+ Tcl_Panic("TclVerifyGlobalLiteralTable: global literal table had %d entries, should be %d",
count, globalTablePtr->numEntries);
}
}
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index a463e7f..e596e70 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -21,7 +21,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.34 2003/10/14 15:44:52 dgp Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.35 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -424,7 +424,7 @@ Tcl_PushCallFrame(interp, callFramePtr, namespacePtr, isProcCallFrame)
} else {
nsPtr = (Namespace *) namespacePtr;
if (nsPtr->flags & NS_DEAD) {
- panic("Trying to push call frame for dead namespace");
+ Tcl_Panic("Trying to push call frame for dead namespace");
/*NOTREACHED*/
}
}
@@ -1691,7 +1691,7 @@ DeleteImportedCmd(clientData)
prevPtr = refPtr;
}
- panic("DeleteImportedCmd: did not find cmd in real cmd's list of import references");
+ Tcl_Panic("DeleteImportedCmd: did not find cmd in real cmd's list of import references");
}
/*
@@ -1955,7 +1955,7 @@ TclGetNamespaceForQualName(interp, qualName, cxtNsPtr, flags,
Tcl_PopCallFrame(interp);
if (nsPtr == NULL) {
- panic("Could not create namespace '%s'", nsName);
+ Tcl_Panic("Could not create namespace '%s'", nsName);
}
} else { /* namespace not found and wasn't created */
nsPtr = NULL;
@@ -4731,7 +4731,7 @@ NamespaceEnsembleCmd(dummy, interp, objc, objv)
}
default:
- panic("unexpected ensemble command");
+ Tcl_Panic("unexpected ensemble command");
}
return TCL_OK;
}
@@ -4894,7 +4894,7 @@ NsEnsembleImplementationCmd(clientData, interp, objc, objv)
}
hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, fullName);
if (hPtr == NULL) {
- panic("full name %s not found in supposedly synchronized hash",
+ Tcl_Panic("full name %s not found in supposedly synchronized hash",
fullName);
}
prefixObj = (Tcl_Obj *) Tcl_GetHashValue(hPtr);
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 683d41d..1390958 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -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: tclObj.c,v 1.52 2003/10/14 15:44:53 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.53 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -539,7 +539,7 @@ void TclDbInitNewObj(objPtr)
tablePtr = tsdPtr->objThreadMap;
hPtr = Tcl_CreateHashEntry(tablePtr, (char *) objPtr, &new);
if (!new) {
- panic("expected to create new entry for object map");
+ Tcl_Panic("expected to create new entry for object map");
}
Tcl_SetHashValue(hPtr, NULL);
}
@@ -743,7 +743,7 @@ TclFreeObj(objPtr)
#ifdef TCL_MEM_DEBUG
if ((objPtr)->refCount < -1) {
- panic("Reference count for %lx was negative", objPtr);
+ Tcl_Panic("Reference count for %lx was negative", objPtr);
}
#endif /* TCL_MEM_DEBUG */
@@ -862,7 +862,7 @@ Tcl_GetString(objPtr)
}
if (objPtr->typePtr->updateStringProc == NULL) {
- panic("UpdateStringProc should not be invoked for type %s",
+ Tcl_Panic("UpdateStringProc should not be invoked for type %s",
objPtr->typePtr->name);
}
(*objPtr->typePtr->updateStringProc)(objPtr);
@@ -902,7 +902,7 @@ Tcl_GetStringFromObj(objPtr, lengthPtr)
{
if (objPtr->bytes == NULL) {
if (objPtr->typePtr->updateStringProc == NULL) {
- panic("UpdateStringProc should not be invoked for type %s",
+ Tcl_Panic("UpdateStringProc should not be invoked for type %s",
objPtr->typePtr->name);
}
(*objPtr->typePtr->updateStringProc)(objPtr);
@@ -1081,7 +1081,7 @@ Tcl_SetBooleanObj(objPtr, boolValue)
register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetBooleanObj called with shared object");
+ Tcl_Panic("Tcl_SetBooleanObj called with shared object");
}
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
@@ -1497,7 +1497,7 @@ Tcl_SetDoubleObj(objPtr, dblValue)
register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetDoubleObj called with shared object");
+ Tcl_Panic("Tcl_SetDoubleObj called with shared object");
}
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
@@ -1760,7 +1760,7 @@ Tcl_SetIntObj(objPtr, intValue)
register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetIntObj called with shared object");
+ Tcl_Panic("Tcl_SetIntObj called with shared object");
}
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
@@ -2124,7 +2124,7 @@ Tcl_SetLongObj(objPtr, longValue)
register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetLongObj called with shared object");
+ Tcl_Panic("Tcl_SetLongObj called with shared object");
}
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
@@ -2487,7 +2487,7 @@ Tcl_SetWideIntObj(objPtr, wideValue)
register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetWideIntObj called with shared object");
+ Tcl_Panic("Tcl_SetWideIntObj called with shared object");
}
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
@@ -2573,7 +2573,7 @@ Tcl_DbIncrRefCount(objPtr, file, line)
if (objPtr->refCount == 0x61616161) {
fprintf(stderr, "file = %s, line = %d\n", file, line);
fflush(stderr);
- panic("Trying to increment refCount of previously disposed object.");
+ Tcl_Panic("Trying to increment refCount of previously disposed object.");
}
# ifdef TCL_THREADS
/*
@@ -2589,11 +2589,11 @@ Tcl_DbIncrRefCount(objPtr, file, line)
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
- panic("object table not initialized");
+ Tcl_Panic("object table not initialized");
}
hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
if (!hPtr) {
- panic("%s%s",
+ Tcl_Panic("%s%s",
"Trying to incr ref count of",
"Tcl_Obj allocated in another thread");
}
@@ -2637,7 +2637,7 @@ Tcl_DbDecrRefCount(objPtr, file, line)
if (objPtr->refCount == 0x61616161) {
fprintf(stderr, "file = %s, line = %d\n", file, line);
fflush(stderr);
- panic("Trying to decrement refCount of previously disposed object.");
+ Tcl_Panic("Trying to decrement refCount of previously disposed object.");
}
# ifdef TCL_THREADS
/*
@@ -2653,11 +2653,11 @@ Tcl_DbDecrRefCount(objPtr, file, line)
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
- panic("object table not initialized");
+ Tcl_Panic("object table not initialized");
}
hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
if (!hPtr) {
- panic("%s%s",
+ Tcl_Panic("%s%s",
"Trying to decr ref count of",
"Tcl_Obj allocated in another thread");
}
@@ -2707,7 +2707,7 @@ Tcl_DbIsShared(objPtr, file, line)
if (objPtr->refCount == 0x61616161) {
fprintf(stderr, "file = %s, line = %d\n", file, line);
fflush(stderr);
- panic("Trying to check whether previously disposed object is shared.");
+ Tcl_Panic("Trying to check whether previously disposed object is shared.");
}
# ifdef TCL_THREADS
/*
@@ -2723,11 +2723,11 @@ Tcl_DbIsShared(objPtr, file, line)
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
- panic("object table not initialized");
+ Tcl_Panic("object table not initialized");
}
hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
if (!hPtr) {
- panic("%s%s",
+ Tcl_Panic("%s%s",
"Trying to check shared status of",
"Tcl_Obj allocated in another thread");
}
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 2923642..ab5306a 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.31 2003/11/24 19:06:08 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.32 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -1002,7 +1002,7 @@ ParseTokens(src, numBytes, mask, flags, parsePtr)
parsePtr->numTokens++;
src++; numBytes--;
} else {
- panic("ParseTokens encountered unknown character");
+ Tcl_Panic("ParseTokens encountered unknown character");
}
}
if (parsePtr->numTokens == originalTokens) {
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index ae089bc..30bffcc 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -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: tclPathObj.c,v 1.18 2003/12/17 09:55:11 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.19 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -2013,7 +2013,7 @@ UpdateStringOfFsPath(objPtr)
Tcl_Obj *copy;
if (PATHFLAGS(objPtr) == 0 || fsPathPtr->cwdPtr == NULL) {
- panic("Called UpdateStringOfFsPath with invalid object");
+ Tcl_Panic("Called UpdateStringOfFsPath with invalid object");
}
copy = Tcl_DuplicateObj(fsPathPtr->cwdPtr);
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 43d859b..913b5ad 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkg.c,v 1.9 2002/02/22 22:36:09 dgp Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.10 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -794,7 +794,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
break;
}
default: {
- panic("Tcl_PackageObjCmd: bad option index to pkgOptions");
+ Tcl_Panic("Tcl_PackageObjCmd: bad option index to pkgOptions");
}
}
return TCL_OK;
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 150e384..624675e 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -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: tclPreserve.c,v 1.4 2003/07/16 21:24:12 hobbs Exp $
+ * RCS: @(#) $Id: tclPreserve.c,v 1.5 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -251,7 +251,7 @@ Tcl_Release(clientData)
* Reference not found. This is a bug in the caller.
*/
- panic("Tcl_Release couldn't find reference for 0x%x", clientData);
+ Tcl_Panic("Tcl_Release couldn't find reference for 0x%x", clientData);
}
/*
@@ -292,7 +292,7 @@ Tcl_EventuallyFree(clientData, freeProc)
continue;
}
if (refPtr->mustFree) {
- panic("Tcl_EventuallyFree called twice for 0x%x\n", clientData);
+ Tcl_Panic("Tcl_EventuallyFree called twice for 0x%x\n", clientData);
}
refPtr->mustFree = 1;
refPtr->freeProc = freeProc;
@@ -387,10 +387,10 @@ TclHandleFree(handle)
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
}
if (handlePtr->ptr2 != handlePtr->ptr) {
- panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
@@ -430,11 +430,11 @@ TclHandlePreserve(handle)
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
}
if ((handlePtr->ptr != NULL)
&& (handlePtr->ptr != handlePtr->ptr2)) {
- panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
@@ -472,11 +472,11 @@ TclHandleRelease(handle)
handlePtr = (HandleStruct *) handle;
#ifdef TCL_MEM_DEBUG
if (handlePtr->refCount == 0x61616161) {
- panic("using previously disposed TclHandle %x", handlePtr);
+ Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
}
if ((handlePtr->ptr != NULL)
&& (handlePtr->ptr != handlePtr->ptr2)) {
- panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
+ Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
diff --git a/generic/tclProc.c b/generic/tclProc.c
index bec3ed9..79c2695 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -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: tclProc.c,v 1.48 2003/10/21 20:42:05 dgp Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.49 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -994,12 +994,12 @@ TclObjInterpProc(clientData, interp, objc, objv)
argCt = objc;
for (i = 1, argCt -= 1; i <= numArgs; i++, argCt--) {
if (!TclIsVarArgument(localPtr)) {
- panic("TclObjInterpProc: local variable %s is not argument but should be",
+ Tcl_Panic("TclObjInterpProc: local variable %s is not argument but should be",
localPtr->name);
return TCL_ERROR;
}
if (TclIsVarTemporary(localPtr)) {
- panic("TclObjInterpProc: local variable %d is temporary but should be an argument", i);
+ Tcl_Panic("TclObjInterpProc: local variable %d is temporary but should be an argument", i);
return TCL_ERROR;
}
@@ -1623,14 +1623,14 @@ ProcBodyFree(objPtr)
* ProcBodySetFromAny --
*
* Tcl_ObjType's SetFromAny function for the proc body object.
- * Calls panic.
+ * Calls Tcl_Panic.
*
* Results:
* Theoretically returns a TCL result code.
*
* Side effects:
- * Calls panic, since we can't set the value of the object from a string
- * representation (or any other internal ones).
+ * Calls Tcl_Panic, since we can't set the value of the object from a
+ * string representation (or any other internal ones).
*
*----------------------------------------------------------------------
*/
@@ -1640,7 +1640,7 @@ ProcBodySetFromAny(interp, objPtr)
Tcl_Interp *interp; /* current interpreter */
Tcl_Obj *objPtr; /* object pointer */
{
- panic("called ProcBodySetFromAny");
+ Tcl_Panic("called ProcBodySetFromAny");
/*
* this to keep compilers happy.
@@ -1655,13 +1655,13 @@ ProcBodySetFromAny(interp, objPtr)
* ProcBodyUpdateString --
*
* Tcl_ObjType's UpdateString function for the proc body object.
- * Calls panic.
+ * Calls Tcl_Panic.
*
* Results:
* None.
*
* Side effects:
- * Calls panic, since we this type has no string representation.
+ * Calls Tcl_Panic, since we this type has no string representation.
*
*----------------------------------------------------------------------
*/
@@ -1670,7 +1670,7 @@ static void
ProcBodyUpdateString(objPtr)
Tcl_Obj *objPtr; /* the object to update */
{
- panic("called ProcBodyUpdateString");
+ Tcl_Panic("called ProcBodyUpdateString");
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index ed2dba7..106e3c4 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -33,7 +33,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStringObj.c,v 1.33 2003/10/14 15:44:53 dgp Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.34 2003/12/24 04:18:20 davygrvy Exp $ */
#include "tclInt.h"
@@ -707,7 +707,7 @@ Tcl_SetStringObj(objPtr, bytes, length)
*/
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetStringObj called with shared object");
+ Tcl_Panic("Tcl_SetStringObj called with shared object");
}
/*
@@ -761,7 +761,7 @@ Tcl_SetObjLength(objPtr, length)
String *stringPtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_SetObjLength called with shared object");
+ Tcl_Panic("Tcl_SetObjLength called with shared object");
}
SetStringFromAny(NULL, objPtr);
@@ -856,7 +856,7 @@ Tcl_AttemptSetObjLength(objPtr, length)
String *stringPtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_AttemptSetObjLength called with shared object");
+ Tcl_Panic("Tcl_AttemptSetObjLength called with shared object");
}
SetStringFromAny(NULL, objPtr);
@@ -1024,7 +1024,7 @@ TclAppendLimitedToObj(objPtr, bytes, length, limit, ellipsis)
int toCopy = 0;
if (Tcl_IsShared(objPtr)) {
- panic("TclAppendLimitedToObj called with shared object");
+ Tcl_Panic("TclAppendLimitedToObj called with shared object");
}
SetStringFromAny(NULL, objPtr);
@@ -1127,7 +1127,7 @@ Tcl_AppendUnicodeToObj(objPtr, unicode, length)
String *stringPtr;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_AppendUnicodeToObj called with shared object");
+ Tcl_Panic("Tcl_AppendUnicodeToObj called with shared object");
}
if (length == 0) {
@@ -1504,7 +1504,7 @@ Tcl_AppendStringsToObjVA (objPtr, argList)
int nargs, i;
if (Tcl_IsShared(objPtr)) {
- panic("Tcl_AppendStringsToObj called with shared object");
+ Tcl_Panic("Tcl_AppendStringsToObj called with shared object");
}
SetStringFromAny(NULL, objPtr);
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 69ead5b..71c08a5 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.73 2003/11/16 00:49:20 dkf Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.74 2003/12/24 04:18:20 davygrvy Exp $
*/
#define TCL_TEST
@@ -4010,7 +4010,7 @@ TestpanicCmd(dummy, interp, argc, argv)
*/
argString = Tcl_Merge(argc-1, argv+1);
- panic(argString);
+ Tcl_Panic(argString);
ckfree((char *)argString);
return TCL_OK;
@@ -5767,7 +5767,7 @@ TestChannelEventCmd(dummy, interp, argc, argv)
/* Empty loop body. */
}
if (prevEsPtr == (EventScriptRecord *) NULL) {
- panic("TestChannelEventCmd: damaged event script list");
+ Tcl_Panic("TestChannelEventCmd: damaged event script list");
}
prevEsPtr->nextPtr = esPtr->nextPtr;
}
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index f818495..1cb7a25 100755
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -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: tclThreadAlloc.c,v 1.7 2003/12/16 11:34:45 dkf Exp $
+ * RCS: @(#) $Id: tclThreadAlloc.c,v 1.8 2003/12/24 04:18:20 davygrvy Exp $
*/
#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
@@ -209,7 +209,7 @@ GetCache(void)
if (cachePtr == NULL) {
cachePtr = calloc(1, sizeof(Cache));
if (cachePtr == NULL) {
- panic("alloc: could not allocate new cache");
+ Tcl_Panic("alloc: could not allocate new cache");
}
Tcl_MutexLock(listLockPtr);
cachePtr->nextPtr = firstCachePtr;
@@ -535,7 +535,7 @@ TclThreadAllocObj(void)
cachePtr->nobjs = nmove = NOBJALLOC;
newObjsPtr = malloc(sizeof(Tcl_Obj) * nmove);
if (newObjsPtr == NULL) {
- panic("alloc: could not allocate %d new objects", nmove);
+ Tcl_Panic("alloc: could not allocate %d new objects", nmove);
}
while (--nmove >= 0) {
objPtr = &newObjsPtr[nmove];
@@ -742,7 +742,7 @@ Ptr2Block(char *ptr)
|| ((unsigned char *) ptr)[blockPtr->b_reqsize] != MAGIC
#endif
|| blockPtr->b_magic2 != MAGIC) {
- panic("alloc: invalid block: %p: %x %x %x\n",
+ Tcl_Panic("alloc: invalid block: %p: %x %x %x\n",
blockPtr, blockPtr->b_magic1, blockPtr->b_magic2,
((unsigned char *) ptr)[blockPtr->b_reqsize]);
}
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index 25ff9b2..6d44081 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTimer.c,v 1.6 2002/03/01 06:22:31 hobbs Exp $
+ * RCS: @(#) $Id: tclTimer.c,v 1.7 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -936,7 +936,7 @@ processInteger:
break;
}
default: {
- panic("Tcl_AfterObjCmd: bad subcommand index to afterSubCmds");
+ Tcl_Panic("Tcl_AfterObjCmd: bad subcommand index to afterSubCmds");
}
}
return TCL_OK;
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index df04703..021cb18 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -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: tclTrace.c,v 1.6 2003/10/03 20:42:06 dgp Exp $
+ * RCS: @(#) $Id: tclTrace.c,v 1.7 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -1810,7 +1810,7 @@ TraceExecutionProc(ClientData clientData, Tcl_Interp *interp,
Tcl_DStringAppendElement(&cmd, "leavestep");
}
} else {
- panic("TraceExecutionProc: bad flag combination");
+ Tcl_Panic("TraceExecutionProc: bad flag combination");
}
/*
@@ -2985,11 +2985,11 @@ Tcl_TraceVar2(interp, part1, part2, flags, proc, clientData)
/*
* Check for a nonsense flag combination. Note that this is a
- * panic() because there should be no code path that ever sets
+ * Tcl_Panic() because there should be no code path that ever sets
* both flags.
*/
if ((flags&TCL_TRACE_RESULT_DYNAMIC) && (flags&TCL_TRACE_RESULT_OBJECT)) {
- panic("bad result flag combination");
+ Tcl_Panic("bad result flag combination");
}
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 5b11f97..e44cd0e 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.76 2003/11/20 18:37:55 msofer Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.77 2003/12/24 04:18:20 davygrvy Exp $
*/
#include "tclInt.h"
@@ -3345,7 +3345,7 @@ ObjMakeUpvar(interp, framePtr, otherP1Ptr, otherP2, otherFlags, myName, myFlags,
if (index >= 0) {
if (!varFramePtr->isProcCallFrame) {
- panic("ObjMakeUpvar called with an index outside from a proc.\n");
+ Tcl_Panic("ObjMakeUpvar called with an index outside from a proc.\n");
}
varPtr = &(varFramePtr->compiledLocals[index]);
} else {
@@ -4686,7 +4686,7 @@ UpdateParsedVarName(objPtr)
* This is a parsed scalar name: what is it
* doing here?
*/
- panic("ERROR: scalar parsedVarName without a string rep.\n");
+ Tcl_Panic("ERROR: scalar parsedVarName without a string rep.\n");
}
part1 = Tcl_GetStringFromObj(arrayPtr, &len1);
len2 = strlen(part2);
diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c
index 555e333..8986e6c 100644
--- a/mac/tclMacChan.c
+++ b/mac/tclMacChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacChan.c,v 1.21 2003/03/03 20:22:42 das Exp $
+ * RCS: @(#) $Id: tclMacChan.c,v 1.22 2003/12/24 04:18:21 davygrvy Exp $
*/
#include "tclInt.h"
@@ -434,7 +434,7 @@ StdIOClose(
} else if (fd == 2) {
tsdPtr->stderrChannel = NULL;
} else {
- panic("recieved invalid std file");
+ Tcl_Panic("recieved invalid std file");
}
if (close(fd) < 0) {
@@ -696,7 +696,7 @@ TclpGetDefaultStdChannel(
bufMode = "none";
break;
default:
- panic("TclGetDefaultStdChannel: Unexpected channel type");
+ Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
break;
}
@@ -987,7 +987,7 @@ FileClose(
FlushVol(NULL, fileState->volumeRef);
if (err != noErr) {
errorCode = errno = TclMacOSErrorToPosixError(err);
- panic("error during file close");
+ Tcl_Panic("error during file close");
}
ckfree((char *) fileState);
@@ -1258,9 +1258,9 @@ TclpCutFileChannel(chan)
* local data in each thread.
*/
- if (!removed)
- panic("file info ptr not on thread channel list");
-
+ if (!removed) {
+ Tcl_Panic("file info ptr not on thread channel list");
+ }
}
/*
diff --git a/mac/tclMacOSA.c b/mac/tclMacOSA.c
index 0a38396..fdcd56e 100644
--- a/mac/tclMacOSA.c
+++ b/mac/tclMacOSA.c
@@ -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: tclMacOSA.c,v 1.10 2002/10/09 11:54:30 das Exp $
+ * RCS: @(#) $Id: tclMacOSA.c,v 1.11 2003/12/24 04:18:21 davygrvy Exp $
*/
#define MAC_TCL
@@ -222,7 +222,7 @@ Tclapplescript_Init(
LanguagesTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
if (LanguagesTable == NULL) {
- panic("Memory Error Allocating Languages Hash Table");
+ Tcl_Panic("Memory Error Allocating Languages Hash Table");
}
Tcl_SetAssocData(interp, "OSAScript_LangTable", NULL, LanguagesTable);
@@ -300,7 +300,7 @@ Tclapplescript_Init(
ComponentTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
if (ComponentTable == NULL) {
- panic("Memory Error Allocating Hash Table");
+ Tcl_Panic("Memory Error Allocating Hash Table");
}
Tcl_SetAssocData(interp, "OSAScript_CompTable", NULL, ComponentTable);
@@ -1860,7 +1860,7 @@ tclOSAClose(
"OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
if (ComponentTable == NULL) {
- panic("Error, could not get the Component Table from the Associated data.");
+ Tcl_Panic("Error, could not get the Component Table from the Associated data.");
}
hashEntry = Tcl_FindHashEntry(ComponentTable, theComponent->theName);
diff --git a/mac/tclMacResource.c b/mac/tclMacResource.c
index aff6bed..3d228d2 100644
--- a/mac/tclMacResource.c
+++ b/mac/tclMacResource.c
@@ -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: tclMacResource.c,v 1.19 2003/10/23 10:07:09 vincentdarley Exp $
+ * RCS: @(#) $Id: tclMacResource.c,v 1.20 2003/12/24 04:18:21 davygrvy Exp $
*/
#include <Errors.h>
@@ -547,7 +547,7 @@ resourceRef? resourceType");
macPermision = fsRdWrShPerm;
break;
default:
- panic("Tcl_ResourceObjCmd: invalid mode value");
+ Tcl_Panic("Tcl_ResourceObjCmd: invalid mode value");
break;
}
} else {
@@ -791,7 +791,7 @@ resourceRef? resourceType");
if (resource == NULL) {
resource = NewHandleSys(length);
if (resource == NULL) {
- panic("could not allocate memory to write resource");
+ Tcl_Panic("could not allocate memory to write resource");
}
}
HLock(resource);
@@ -862,7 +862,7 @@ resourceRef? resourceType");
SetHandleSize(resource, length);
if ( MemError() != noErr ) {
- panic("could not allocate memory to write resource");
+ Tcl_Panic("could not allocate memory to write resource");
}
HLock(resource);
@@ -916,7 +916,7 @@ resourceRef? resourceType");
return result;
default:
- panic("Tcl_GetIndexFromObj returned unrecognized option");
+ Tcl_Panic("Tcl_GetIndexFromObj returned unrecognized option");
return TCL_ERROR; /* Should never be reached. */
}
}
@@ -2042,7 +2042,7 @@ TclMacRegisterResourceFork(
nameHashPtr = Tcl_CreateHashEntry(&nameTable, resourceId, &new);
if (!new) {
- panic("resource id has repeated itself");
+ Tcl_Panic("resource id has repeated itself");
}
resourceRef = (OpenResourceFork *) ckalloc(sizeof(OpenResourceFork));
@@ -2145,7 +2145,7 @@ TclMacUnRegisterResourceFork(
}
}
if (!match) {
- panic("the resource Fork List is out of synch!");
+ Tcl_Panic("the resource Fork List is out of synch!");
}
Tcl_ListObjReplace(NULL, resourceForkList, index, 1, 0, NULL);
@@ -2153,7 +2153,7 @@ TclMacUnRegisterResourceFork(
resourceHashPtr = Tcl_FindHashEntry(&resourceTable, (char *) fileRef);
if (resourceHashPtr == NULL) {
- panic("Resource & Name tables are out of synch in resource command.");
+ Tcl_Panic("Resource & Name tables are out of synch in resource command.");
}
ckfree(Tcl_GetHashValue(resourceHashPtr));
Tcl_DeleteHashEntry(resourceHashPtr);
diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c
index 32df000..4321ea3 100644
--- a/mac/tclMacSock.c
+++ b/mac/tclMacSock.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: tclMacSock.c,v 1.15 2003/04/22 23:20:43 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclMacSock.c,v 1.16 2003/12/24 04:18:21 davygrvy Exp $
*/
#include "tclInt.h"
@@ -737,7 +737,7 @@ TcpClose(
if (err != noErr) {
Debugger();
goto afterRelease;
- /* panic("error closing server socket"); */
+ /* Tcl_Panic("error closing server socket"); */
}
statePtr->flags |= TCP_RELEASE;
@@ -750,7 +750,7 @@ TcpClose(
statePtr->pb.tcpStream = statePtr->tcpStream;
err = PBControlSync((ParmBlkPtr) &statePtr->pb);
if (err != noErr) {
- panic("error releasing server socket");
+ Tcl_Panic("error releasing server socket");
}
/*
@@ -2839,7 +2839,7 @@ TclpCutSockChannel(chan)
*/
if (!removed)
- panic("file info ptr not on thread channel list");
+ Tcl_Panic("file info ptr not on thread channel list");
return;
}
diff --git a/mac/tclMacThrd.c b/mac/tclMacThrd.c
index dec4842..4d98d9c 100644
--- a/mac/tclMacThrd.c
+++ b/mac/tclMacThrd.c
@@ -710,7 +710,7 @@ GetThreadDataStruct(keyVal)
if ((int) keyVal <= 0) {
return NULL;
} else if ((int) keyVal > keyCounter) {
- panic("illegal data key value");
+ Tcl_Panic("illegal data key value");
}
GetCurrentThread(&curThread);
@@ -755,7 +755,7 @@ RemoveThreadDataStruct(keyVal)
if ((int) keyVal <= 0) {
return NULL;
} else if ((int) keyVal > keyCounter) {
- panic("illegal data key value");
+ Tcl_Panic("illegal data key value");
}
GetCurrentThread(&curThread);
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 57a9e5d..3542ca8 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -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: tclUnixChan.c,v 1.44 2003/11/18 23:13:33 davygrvy Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.45 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -1777,7 +1777,7 @@ TclpOpenFileChannel(interp, pathPtr, mode, permissions)
/*
* This may occurr if modeString was "", for example.
*/
- panic("TclpOpenFileChannel: invalid mode value");
+ Tcl_Panic("TclpOpenFileChannel: invalid mode value");
return NULL;
}
@@ -3002,7 +3002,7 @@ TclpGetDefaultStdChannel(type)
bufMode = "none";
break;
default:
- panic("TclGetDefaultStdChannel: Unexpected channel type");
+ Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
break;
}
@@ -3194,7 +3194,7 @@ TclUnixWaitForFile(fd, mask, timeout)
*/
if (fd >= FD_SETSIZE) {
- panic("TclWaitForFile can't handle file id %d", fd);
+ Tcl_Panic("TclWaitForFile can't handle file id %d", fd);
}
memset((VOID *) readyMasks, 0, 3*MASK_SIZE*sizeof(fd_mask));
index = fd/(NBBY*sizeof(fd_mask));
@@ -3323,8 +3323,9 @@ TclpCutFileChannel(chan)
* local data in each thread.
*/
- if (!removed)
- panic("file info ptr not on thread channel list");
+ if (!removed) {
+ Tcl_Panic("file info ptr not on thread channel list");
+ }
#endif /* DEPRECATED */
}
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 719442d..4e8bfb2 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -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: tclUnixNotfy.c,v 1.13 2003/07/16 22:10:37 hobbs Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.14 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclInt.h"
@@ -210,7 +210,7 @@ Tcl_InitNotifier()
if (notifierCount == 0) {
if (Tcl_CreateThread(&notifierThread, NotifierThreadProc, NULL,
TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) {
- panic("Tcl_InitNotifier: unable to start notifier thread");
+ Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread");
}
}
notifierCount++;
@@ -263,7 +263,7 @@ Tcl_FinalizeNotifier(clientData)
if (notifierCount == 0) {
if (triggerPipe < 0) {
- panic("Tcl_FinalizeNotifier: notifier pipe not initialized");
+ Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized");
}
/*
@@ -869,7 +869,7 @@ NotifierThreadProc(clientData)
char buf[2];
if (pipe(fds) != 0) {
- panic("NotifierThreadProc: could not create trigger pipe.");
+ Tcl_Panic("NotifierThreadProc: could not create trigger pipe.");
}
receivePipe = fds[0];
@@ -878,19 +878,19 @@ NotifierThreadProc(clientData)
status = fcntl(receivePipe, F_GETFL);
status |= O_NONBLOCK;
if (fcntl(receivePipe, F_SETFL, status) < 0) {
- panic("NotifierThreadProc: could not make receive pipe non blocking.");
+ Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking.");
}
status = fcntl(fds[1], F_GETFL);
status |= O_NONBLOCK;
if (fcntl(fds[1], F_SETFL, status) < 0) {
- panic("NotifierThreadProc: could not make trigger pipe non blocking.");
+ Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking.");
}
#else
if (ioctl(receivePipe, (int) FIONBIO, &status) < 0) {
- panic("NotifierThreadProc: could not make receive pipe non blocking.");
+ Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking.");
}
if (ioctl(fds[1], (int) FIONBIO, &status) < 0) {
- panic("NotifierThreadProc: could not make trigger pipe non blocking.");
+ Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking.");
}
#endif
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 515ef4f..98d1edc 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -916,7 +916,7 @@ TclpNewAllocMutex(void)
lockPtr = malloc(sizeof(struct lock));
if (lockPtr == NULL) {
- panic("could not allocate lock");
+ Tcl_Panic("could not allocate lock");
}
lockPtr->tlock = (Tcl_Mutex) &lockPtr->plock;
pthread_mutex_init(&lockPtr->plock, NULL);
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index 31157ff..5b186bd 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclXtNotify.c,v 1.4 1999/07/02 06:05:34 welch Exp $
+ * RCS: @(#) $Id: tclXtNotify.c,v 1.5 2003/12/24 04:18:22 davygrvy Exp $
*/
#include <X11/Intrinsic.h>
@@ -135,7 +135,7 @@ TclSetAppContext(appContext)
* after initialization, so we panic.
*/
- panic("TclSetAppContext: multiple application contexts");
+ Tcl_Panic("TclSetAppContext: multiple application contexts");
}
} else {
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index b6e1c06..579cf55 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWin32Dll.c,v 1.29 2003/12/21 21:58:43 davygrvy Exp $
+ * RCS: @(#) $Id: tclWin32Dll.c,v 1.30 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -325,7 +325,7 @@ TclWinInit(hInst)
*/
if (platformId == VER_PLATFORM_WIN32s) {
- panic("Win32s is not a supported platform");
+ Tcl_Panic("Win32s is not a supported platform");
}
tclWinProcs = &asciiProcs;
@@ -473,11 +473,11 @@ TclpCheckStackSpace()
"=r"(RESTORED_HANDLER) );
if (INITIAL_ESP != RESTORED_ESP)
- panic("ESP restored incorrectly");
+ Tcl_Panic("ESP restored incorrectly");
if (INITIAL_EBP != RESTORED_EBP)
- panic("EBP restored incorrectly");
+ Tcl_Panic("EBP restored incorrectly");
if (INITIAL_HANDLER != RESTORED_HANDLER)
- panic("HANDLER restored incorrectly");
+ Tcl_Panic("HANDLER restored incorrectly");
# endif /* TCL_MEM_DEBUG */
#else
} __except (EXCEPTION_EXECUTE_HANDLER) {}
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 0ab586d..6c5edb2 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinChan.c,v 1.32 2003/12/13 03:11:02 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.33 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -779,7 +779,7 @@ TclpOpenFileChannel(interp, pathPtr, mode, permissions)
channelPermissions = (TCL_READABLE | TCL_WRITABLE);
break;
default:
- panic("TclpOpenFileChannel: invalid mode value");
+ Tcl_Panic("TclpOpenFileChannel: invalid mode value");
break;
}
@@ -1093,11 +1093,11 @@ Tcl_MakeFileChannel(rawHandle, mode)
"=r"(RESTORED_HANDLER) );
if (INITIAL_ESP != RESTORED_ESP)
- panic("ESP restored incorrectly");
+ Tcl_Panic("ESP restored incorrectly");
if (INITIAL_EBP != RESTORED_EBP)
- panic("EBP restored incorrectly");
+ Tcl_Panic("EBP restored incorrectly");
if (INITIAL_HANDLER != RESTORED_HANDLER)
- panic("HANDLER restored incorrectly");
+ Tcl_Panic("HANDLER restored incorrectly");
# endif /* TCL_MEM_DEBUG */
if (result)
@@ -1189,7 +1189,7 @@ TclpGetDefaultStdChannel(type)
bufMode = "none";
break;
default:
- panic("TclGetDefaultStdChannel: Unexpected channel type");
+ Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
break;
}
@@ -1388,9 +1388,9 @@ TclpCutFileChannel(chan)
* local data in each thread.
*/
- if (!removed)
- panic("file info ptr not on thread channel list");
-
+ if (!removed) {
+ Tcl_Panic("file info ptr not on thread channel list");
+ }
}
/*
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index c565d33..1062a3f 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFCmd.c,v 1.38 2003/12/17 17:47:28 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.39 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -238,11 +238,11 @@ DoRenameFile(
"=r"(RESTORED_HANDLER) );
if (INITIAL_ESP != RESTORED_ESP)
- panic("ESP restored incorrectly");
+ Tcl_Panic("ESP restored incorrectly");
if (INITIAL_EBP != RESTORED_EBP)
- panic("EBP restored incorrectly");
+ Tcl_Panic("EBP restored incorrectly");
if (INITIAL_HANDLER != RESTORED_HANDLER)
- panic("HANDLER restored incorrectly");
+ Tcl_Panic("HANDLER restored incorrectly");
# endif /* TCL_MEM_DEBUG */
#else
} __except (EXCEPTION_EXECUTE_HANDLER) {}
@@ -600,11 +600,11 @@ DoCopyFile(
"=r"(RESTORED_HANDLER) );
if (INITIAL_ESP != RESTORED_ESP)
- panic("ESP restored incorrectly");
+ Tcl_Panic("ESP restored incorrectly");
if (INITIAL_EBP != RESTORED_EBP)
- panic("EBP restored incorrectly");
+ Tcl_Panic("EBP restored incorrectly");
if (INITIAL_HANDLER != RESTORED_HANDLER)
- panic("HANDLER restored incorrectly");
+ Tcl_Panic("HANDLER restored incorrectly");
# endif /* TCL_MEM_DEBUG */
#else
} __except (EXCEPTION_EXECUTE_HANDLER) {}
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 8cf4c4c..65faf8e 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -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: tclWinNotify.c,v 1.12 2003/03/21 03:23:24 dgp Exp $
+ * RCS: @(#) $Id: tclWinNotify.c,v 1.13 2003/12/24 04:18:22 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -107,7 +107,7 @@ Tcl_InitNotifier()
class.hCursor = NULL;
if (!RegisterClassA(&class)) {
- panic("Unable to register TclNotifier window class");
+ Tcl_Panic("Unable to register TclNotifier window class");
}
}
notifierCount++;
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index acba180..4edf214 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPipe.c,v 1.38 2003/10/21 23:25:47 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.39 2003/12/24 04:18:23 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -874,7 +874,7 @@ TclpCloseFile(
break;
default:
- panic("TclpCloseFile: unexpected file type");
+ Tcl_Panic("TclpCloseFile: unexpected file type");
}
ckfree((char *) filePtr);
@@ -1215,17 +1215,19 @@ TclpCreateProcess(
if (*end == '/')
break;
}
- if (*end != '/')
- panic("no / in executable path name");
+ if (*end != '/') {
+ Tcl_Panic("no / in executable path name");
+ }
i = (end - start) + 1;
pipeDllPtr = Tcl_NewStringObj(start, i);
Tcl_AppendToObj(pipeDllPtr, Tcl_DStringValue(&pipeDll), -1);
Tcl_IncrRefCount(pipeDllPtr);
- if (Tcl_FSConvertToPathType(interp, pipeDllPtr) != TCL_OK)
- panic("Tcl_FSConvertToPathType failed");
+ if (Tcl_FSConvertToPathType(interp, pipeDllPtr) != TCL_OK) {
+ Tcl_Panic("Tcl_FSConvertToPathType failed");
+ }
fileExists = (Tcl_FSAccess(pipeDllPtr, F_OK) == 0);
if (!fileExists) {
- panic("Tcl pipe dll \"%s\" not found",
+ Tcl_Panic("Tcl pipe dll \"%s\" not found",
Tcl_DStringValue(&pipeDll));
}
Tcl_DStringAppend(&cmdLine, Tcl_DStringValue(&pipeDll), -1);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 91236cb..a790b31 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.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: tclWinSock.c,v 1.40 2003/12/12 00:59:09 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.41 2003/12/24 04:18:23 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -2726,7 +2726,7 @@ TclpCutSockChannel(chan)
*/
if (!removed) {
- panic("file info ptr not on thread channel list");
+ Tcl_Panic("file info ptr not on thread channel list");
}
/*
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index b6f7a89..026a55e 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.26 2003/05/13 10:16:17 mistachkin Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.27 2003/12/24 04:18:23 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -548,7 +548,7 @@ TclpThreadDataKeyInit(keyPtr)
if (newKey != TLS_OUT_OF_INDEXES) {
*indexPtr = newKey;
} else {
- panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */
+ Tcl_Panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */
}
*keyPtr = (Tcl_ThreadDataKey)indexPtr;
TclRememberDataKey(keyPtr);
@@ -585,7 +585,7 @@ TclpThreadDataKeyGet(keyPtr)
} else {
result = TlsGetValue(*indexPtr);
if ((result == NULL) && (GetLastError() != NO_ERROR)) {
- panic("TlsGetValue failed from TclpThreadDataKeyGet!");
+ Tcl_Panic("TlsGetValue failed from TclpThreadDataKeyGet!");
}
return result;
}
@@ -618,7 +618,7 @@ TclpThreadDataKeySet(keyPtr, data)
BOOL success;
success = TlsSetValue(*indexPtr, (void *)data);
if (!success) {
- panic("TlsSetValue failed from TclpThreadDataKeySet!");
+ Tcl_Panic("TlsSetValue failed from TclpThreadDataKeySet!");
}
}
@@ -657,11 +657,11 @@ TclpFinalizeThreadData(keyPtr)
ckfree((char *)result);
success = TlsSetValue(*indexPtr, (void *)NULL);
if (!success) {
- panic("TlsSetValue failed from TclpFinalizeThreadData!");
+ Tcl_Panic("TlsSetValue failed from TclpFinalizeThreadData!");
}
} else {
if (GetLastError() != NO_ERROR) {
- panic("TlsGetValue failed from TclpFinalizeThreadData!");
+ Tcl_Panic("TlsGetValue failed from TclpFinalizeThreadData!");
}
}
}
@@ -697,7 +697,7 @@ TclpFinalizeThreadDataKey(keyPtr)
indexPtr = *(DWORD **)keyPtr;
success = TlsFree(*indexPtr);
if (!success) {
- panic("TlsFree failed from TclpFinalizeThreadDataKey!");
+ Tcl_Panic("TlsFree failed from TclpFinalizeThreadDataKey!");
}
ckfree((char *)indexPtr);
*keyPtr = NULL;
@@ -1017,7 +1017,7 @@ TclpNewAllocMutex(void)
lockPtr = malloc(sizeof(struct lock));
if (lockPtr == NULL) {
- panic("could not allocate lock");
+ Tcl_Panic("could not allocate lock");
}
lockPtr->tlock = (Tcl_Mutex) &lockPtr->wlock;
InitializeCriticalSection(&lockPtr->wlock);
@@ -1039,13 +1039,13 @@ TclpGetAllocCache(void)
key = TlsAlloc();
once = 1;
if (key == TLS_OUT_OF_INDEXES) {
- panic("could not allocate thread local storage");
+ Tcl_Panic("could not allocate thread local storage");
}
}
result = TlsGetValue(key);
if ((result == NULL) && (GetLastError() != NO_ERROR)) {
- panic("TlsGetValue failed from TclpGetAllocCache!");
+ Tcl_Panic("TlsGetValue failed from TclpGetAllocCache!");
}
return result;
}
@@ -1056,7 +1056,7 @@ TclpSetAllocCache(void *ptr)
BOOL success;
success = TlsSetValue(key, ptr);
if (!success) {
- panic("TlsSetValue failed from TclpSetAllocCache!");
+ Tcl_Panic("TlsSetValue failed from TclpSetAllocCache!");
}
}
@@ -1070,12 +1070,12 @@ TclWinFreeAllocCache(void)
if (ptr != NULL) {
success = TlsSetValue(key, NULL);
if (!success) {
- panic("TlsSetValue failed from TclWinFreeAllocCache!");
+ Tcl_Panic("TlsSetValue failed from TclWinFreeAllocCache!");
}
TclFreeAllocCache(ptr);
} else {
if (GetLastError() != NO_ERROR) {
- panic("TlsGetValue failed from TclWinFreeAllocCache!");
+ Tcl_Panic("TlsGetValue failed from TclWinFreeAllocCache!");
}
}
}