summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-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
35 files changed, 219 insertions, 219 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);