Tcl Source Code

Artifact [b901dd9be8]
Login

Artifact b901dd9be8f69ac1402e76fd3974fc04d402e89c:

Attachment "patch.txt" to ticket [865264ffff] added by davygrvy 2003-12-24 09:01:39.
*** generic/tclAlloc.c	23 Apr 2002 17:03:34 -0000	1.16
--- generic/tclAlloc.c	24 Dec 2003 01:46:23 -0000
***************
*** 140,147 ****
  #endif
  
  #if defined(DEBUG) || defined(RCHECK)
! #define	ASSERT(p)   if (!(p)) panic(# p)
! #define RANGE_ASSERT(p) if (!(p)) panic(# p)
  #else
  #define	ASSERT(p)
  #define RANGE_ASSERT(p)
--- 140,147 ----
  #endif
  
  #if defined(DEBUG) || defined(RCHECK)
! #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)

*** generic/tclBasic.c	14 Nov 2003 20:44:44 -0000	1.93
--- generic/tclBasic.c	24 Dec 2003 01:46:28 -0000
***************
*** 293,299 ****
  
      if (sizeof(Tcl_CallFrame) != sizeof(CallFrame)) {
  	/*NOTREACHED*/
!         panic("Tcl_CallFrame and CallFrame are not the same size");
      }
  
      /*
--- 293,299 ----
  
      if (sizeof(Tcl_CallFrame) != sizeof(CallFrame)) {
  	/*NOTREACHED*/
!         Tcl_Panic("Tcl_CallFrame and CallFrame are not the same size");
      }
  
      /*
***************
*** 371,377 ****
      iPtr->globalNsPtr = (Namespace *) Tcl_CreateNamespace(interp, "",
  	    (ClientData) NULL, (Tcl_NamespaceDeleteProc *) NULL);
      if (iPtr->globalNsPtr == NULL) {
!         panic("Tcl_CreateInterp: can't create global namespace");
      }
  
      /*
--- 371,377 ----
      iPtr->globalNsPtr = (Namespace *) Tcl_CreateNamespace(interp, "",
  	    (ClientData) NULL, (Tcl_NamespaceDeleteProc *) NULL);
      if (iPtr->globalNsPtr == NULL) {
!         Tcl_Panic("Tcl_CreateInterp: can't create global namespace");
      }
  
      /*
***************
*** 445,451 ****
  	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");
  	}
  	
  	hPtr = Tcl_CreateHashEntry(&iPtr->globalNsPtr->cmdTable,
--- 445,451 ----
  	if ((cmdInfoPtr->proc == (Tcl_CmdProc *) NULL)
  	        && (cmdInfoPtr->objProc == (Tcl_ObjCmdProc *) NULL)
  	        && (cmdInfoPtr->compileProc == (CompileProc *) NULL)) {
! 	    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,499 ****
  	hPtr = Tcl_FindHashEntry(&iPtr->mathFuncTable,
  		builtinFuncPtr->name);
  	if (hPtr == NULL) {
! 	    panic("Tcl_CreateInterp: Tcl_CreateMathFunc incorrectly registered '%s'", builtinFuncPtr->name);
  	    return NULL;
  	}
  	mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
--- 493,499 ----
  	hPtr = Tcl_FindHashEntry(&iPtr->mathFuncTable,
  		builtinFuncPtr->name);
  	if (hPtr == NULL) {
! 	    Tcl_Panic("Tcl_CreateInterp: Tcl_CreateMathFunc incorrectly registered '%s'", builtinFuncPtr->name);
  	    return NULL;
  	}
  	mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
***************
*** 975,981 ****
       */
      
      if (iPtr->numLevels > 0) {
!         panic("DeleteInterpProc called with active evals");
      }
  
      /*
--- 975,981 ----
       */
      
      if (iPtr->numLevels > 0) {
!         Tcl_Panic("DeleteInterpProc called with active evals");
      }
  
      /*
***************
*** 984,990 ****
       */
  
      if (!(iPtr->flags & DELETED)) {
!         panic("DeleteInterpProc called on interpreter not marked deleted");
      }
  
      TclHandleFree(iPtr->handle);
--- 984,990 ----
       */
  
      if (!(iPtr->flags & DELETED)) {
!         Tcl_Panic("DeleteInterpProc called on interpreter not marked deleted");
      }
  
      TclHandleFree(iPtr->handle);
***************
*** 1364,1370 ****
      if ( cmdPtr->nsPtr != iPtr->globalNsPtr ) {
  	/* 
  	 * This case is theoritically impossible,
! 	 * we might rather panic() than 'nicely' erroring out ?
  	 */
          Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
                  "trying to expose a non global command name space command",
--- 1364,1370 ----
      if ( cmdPtr->nsPtr != iPtr->globalNsPtr ) {
  	/* 
  	 * This case is theoritically impossible,
! 	 * we might rather Tcl_Panic() than 'nicely' erroring out ?
  	 */
          Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
                  "trying to expose a non global command name space command",

*** generic/tclBinary.c	17 Dec 2003 18:40:07 -0000	1.15
--- generic/tclBinary.c	24 Dec 2003 01:46:31 -0000
***************
*** 265,271 ****
      ByteArray *byteArrayPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetByteArrayObj called with shared object");
      }
      typePtr = objPtr->typePtr;
      if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {
--- 265,271 ----
      ByteArray *byteArrayPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetByteArrayObj called with shared object");
      }
      typePtr = objPtr->typePtr;
      if ((typePtr != NULL) && (typePtr->freeIntRepProc != NULL)) {
***************
*** 347,353 ****
      ByteArray *byteArrayPtr, *newByteArrayPtr;
      
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetObjLength called with shared object");
      }
      if (objPtr->typePtr != &tclByteArrayType) {
  	SetByteArrayFromAny(NULL, objPtr);
--- 347,353 ----
      ByteArray *byteArrayPtr, *newByteArrayPtr;
      
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetObjLength called with shared object");
      }
      if (objPtr->typePtr != &tclByteArrayType) {
  	SetByteArrayFromAny(NULL, objPtr);

*** generic/tclCkalloc.c	19 Jan 2003 07:21:18 -0000	1.19
--- generic/tclCkalloc.c	24 Dec 2003 01:46:34 -0000
***************
*** 231,237 ****
          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");
      }
  
      hiPtr = (unsigned char *)memHeaderP->body + memHeaderP->length;
--- 231,237 ----
          fflush(stderr);  /* In case name pointer is bad. */
          fprintf(stderr, "%ld bytes allocated at (%s %d)\n", memHeaderP->length,
  		memHeaderP->file, memHeaderP->line);
!         Tcl_Panic("Memory validation failure");
      }
  
      hiPtr = (unsigned char *)memHeaderP->body + memHeaderP->length;
***************
*** 254,260 ****
          fprintf(stderr, "%ld bytes allocated at (%s %d)\n",
  		memHeaderP->length, memHeaderP->file,
  		memHeaderP->line);
!         panic("Memory validation failure");
      }
  
      if (nukeGuards) {
--- 254,260 ----
          fprintf(stderr, "%ld bytes allocated at (%s %d)\n",
  		memHeaderP->length, memHeaderP->file,
  		memHeaderP->line);
!         Tcl_Panic("Memory validation failure");
      }
  
      if (nukeGuards) {
***************
*** 378,384 ****
      if (result == NULL) {
          fflush(stdout);
          TclDumpMemoryInfo(stderr);
!         panic("unable to alloc %u bytes, %s line %d", size, file, line);
      }
  
      /*
--- 378,384 ----
      if (result == NULL) {
          fflush(stdout);
          TclDumpMemoryInfo(stderr);
!         Tcl_Panic("unable to alloc %u bytes, %s line %d", size, file, line);
      }
  
      /*
***************
*** 539,545 ****
   * Tcl_DbCkfree - debugging ckfree
   *
   *        Verify that the low and high guards are intact, and if so
!  *        then free the buffer else panic.
   *
   *        The guards are erased after being checked to catch duplicate
   *        frees.
--- 539,545 ----
   * Tcl_DbCkfree - debugging ckfree
   *
   *        Verify that the low and high guards are intact, and if so
!  *        then free the buffer else Tcl_Panic.
   *
   *        The guards are erased after being checked to catch duplicate
   *        frees.
***************
*** 1010,1016 ****
       * a special pointer on failure, but we only check for NULL
       */
      if ((result == NULL) && size) {
! 	panic("unable to alloc %u bytes", size);
      }
      return result;
  }
--- 1010,1016 ----
       * a special pointer on failure, but we only check for NULL
       */
      if ((result == NULL) && size) {
! 	Tcl_Panic("unable to alloc %u bytes", size);
      }
      return result;
  }
***************
*** 1027,1033 ****
  
      if ((result == NULL) && size) {
          fflush(stdout);
!         panic("unable to alloc %u bytes, %s line %d", size, file, line);
      }
      return result;
  }
--- 1027,1033 ----
  
      if ((result == NULL) && size) {
          fflush(stdout);
!         Tcl_Panic("unable to alloc %u bytes, %s line %d", size, file, line);
      }
      return result;
  }
***************
*** 1085,1091 ****
      result = TclpRealloc(ptr, size);
  
      if ((result == NULL) && size) {
! 	panic("unable to realloc %u bytes", size);
      }
      return result;
  }
--- 1085,1091 ----
      result = TclpRealloc(ptr, size);
  
      if ((result == NULL) && size) {
! 	Tcl_Panic("unable to realloc %u bytes", size);
      }
      return result;
  }
***************
*** 1103,1109 ****
  
      if ((result == NULL) && size) {
          fflush(stdout);
!         panic("unable to realloc %u bytes, %s line %d", size, file, line);
      }
      return result;
  }
--- 1103,1109 ----
  
      if ((result == NULL) && size) {
          fflush(stdout);
!         Tcl_Panic("unable to realloc %u bytes, %s line %d", size, file, line);
      }
      return result;
  }

*** generic/tclCmdAH.c	17 Dec 2003 17:47:28 -0000	1.38
--- generic/tclCmdAH.c	24 Dec 2003 01:46:37 -0000
***************
*** 1906,1917 ****
  	    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);
  	    }
  	    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);
  	    }
  	    
  	    for (v = 0;  v < varcList[i];  v++) {
--- 1906,1917 ----
  	    result = Tcl_ListObjGetElements(interp, argObjv[1+i*2],
  		    &varcList[i], &varvList[i]);
  	    if (result != TCL_OK) {
! 		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) {
! 		Tcl_Panic("Tcl_ForeachObjCmd: could not reconvert value list %d to a list object\n", i);
  	    }
  	    
  	    for (v = 0;  v < varcList[i];  v++) {

*** generic/tclCmdIL.c	3 Nov 2003 12:48:52 -0000	1.57
--- generic/tclCmdIL.c	24 Dec 2003 01:46:40 -0000
***************
*** 2693,2699 ****
       * 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...
       */
  
      if ((unsigned)elementCount > INT_MAX/sizeof(Tcl_Obj *)/objc) {
--- 2693,2699 ----
       * 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, Tcl_Panic() will happen just a few lines lower...
       */
  
      if ((unsigned)elementCount > INT_MAX/sizeof(Tcl_Obj *)/objc) {

*** generic/tclCmdMZ.c	14 Dec 2003 18:32:36 -0000	1.97
--- generic/tclCmdMZ.c	24 Dec 2003 01:46:44 -0000
***************
*** 2515,2521 ****
  		break;
  	    }
  	    default: {
! 		panic("Tcl_SubstObjCmd: bad option index to SubstOptions");
  	    }
  	}
      }
--- 2515,2521 ----
  		break;
  	    }
  	    default: {
! 		Tcl_Panic("Tcl_SubstObjCmd: bad option index to SubstOptions");
  	    }
  	}
      }
***************
*** 2868,2874 ****
  		 * 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");
  	    }
  	    if (strcmp(Tcl_GetString(objv[j]), "-") != 0) {
  		break;
--- 2868,2874 ----
  		 * This shouldn't happen since we've checked that the
  		 * last body is not a continuation...
  		 */
! 		Tcl_Panic("fall-out when searching for body to match pattern");
  	    }
  	    if (strcmp(Tcl_GetString(objv[j]), "-") != 0) {
  		break;

*** generic/tclCompCmds.c	30 Oct 2003 22:52:59 -0000	1.51
--- generic/tclCompCmds.c	24 Dec 2003 01:46:48 -0000
***************
*** 371,377 ****
       */
  
      if (TclFixupForwardJumpToHere(envPtr, &jumpFixup, 127)) {
! 	panic("TclCompileCatchCmd: bad jump distance %d\n",
  		(envPtr->codeNext - envPtr->codeStart) - jumpFixup.codeOffset);
      }
      TclEmitOpcode(INST_END_CATCH, envPtr);
--- 371,377 ----
       */
  
      if (TclFixupForwardJumpToHere(envPtr, &jumpFixup, 127)) {
! 	Tcl_Panic("TclCompileCatchCmd: bad jump distance %d\n",
  		(envPtr->codeNext - envPtr->codeStart) - jumpFixup.codeOffset);
      }
      TclEmitOpcode(INST_END_CATCH, envPtr);
***************
*** 1447,1453 ****
  		jumpFalseDist += 3;
  		TclStoreInt4AtPtr(jumpFalseDist, (ifFalsePc + 1));
  	    } else {
! 		panic("TclCompileIfCmd: unexpected opcode updating ifFalse jump");
  	    }
  	}
      }
--- 1447,1453 ----
  		jumpFalseDist += 3;
  		TclStoreInt4AtPtr(jumpFalseDist, (ifFalsePc + 1));
  	    } else {
! 		Tcl_Panic("TclCompileIfCmd: unexpected opcode updating ifFalse jump");
  	    }
  	}
      }
***************
*** 3061,3067 ****
  		TclEmitInstInt1(INST_STR_MATCH, /*nocase*/0, envPtr);
  		break;
  	    default:
! 		panic("unknown switch mode: %d",mode);
  	    }
  	    /*
  	     * Process fall-through clauses here...
--- 3061,3067 ----
  		TclEmitInstInt1(INST_STR_MATCH, /*nocase*/0, envPtr);
  		break;
  	    default:
! 		Tcl_Panic("unknown switch mode: %d",mode);
  	    }
  	    /*
  	     * Process fall-through clauses here...

*** generic/tclCompExpr.c	14 Oct 2003 15:44:52 -0000	1.16
--- generic/tclCompExpr.c	24 Dec 2003 01:46:50 -0000
***************
*** 351,357 ****
      char buffer[TCL_UTF_MAX];
  
      if (exprTokenPtr->type != TCL_TOKEN_SUB_EXPR) {
! 	panic("CompileSubExpr: token type %d not TCL_TOKEN_SUB_EXPR\n",
  	        exprTokenPtr->type);
      }
      code = TCL_OK;
--- 351,357 ----
      char buffer[TCL_UTF_MAX];
  
      if (exprTokenPtr->type != TCL_TOKEN_SUB_EXPR) {
! 	Tcl_Panic("CompileSubExpr: token type %d not TCL_TOKEN_SUB_EXPR\n",
  	        exprTokenPtr->type);
      }
      code = TCL_OK;
***************
*** 532,545 ****
  		    break;
  		    
  		default:
! 		    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",
  	            tokenPtr->type);
      }
  
--- 532,545 ----
  		    break;
  		    
  		default:
! 		    Tcl_Panic("CompileSubExpr: unexpected operator %d requiring special treatment\n",
  		        opIndex);
  	    } /* end switch on operator requiring special treatment */
  	    infoPtr->hasOperators = 1;
  	    break;
  
          default:
! 	    Tcl_Panic("CompileSubExpr: unexpected token type %d\n",
  	            tokenPtr->type);
      }
  
***************
*** 624,630 ****
      dist = (envPtr->codeNext - envPtr->codeStart) - lhsTrueFixup.codeOffset;
      if (TclFixupForwardJump(envPtr, &lhsTrueFixup, dist, 127)) {
          badDist:
! 	panic("CompileLandOrLorExpr: bad jump distance %d\n", dist);
      }
      envPtr->currStackDepth = savedStackDepth;
      TclEmitPush(TclRegisterNewLiteral(envPtr, "1", 1), envPtr);
--- 624,630 ----
      dist = (envPtr->codeNext - envPtr->codeStart) - lhsTrueFixup.codeOffset;
      if (TclFixupForwardJump(envPtr, &lhsTrueFixup, dist, 127)) {
          badDist:
! 	Tcl_Panic("CompileLandOrLorExpr: bad jump distance %d\n", dist);
      }
      envPtr->currStackDepth = savedStackDepth;
      TclEmitPush(TclRegisterNewLiteral(envPtr, "1", 1), envPtr);

*** generic/tclCompile.c	19 Nov 2003 22:04:39 -0000	1.54
--- generic/tclCompile.c	24 Dec 2003 01:46:54 -0000
***************
*** 372,378 ****
      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");
          }
          traceInitialized = 1;
      }
--- 372,378 ----
      if (!traceInitialized) {
          if (Tcl_LinkVar(interp, "tcl_traceCompile",
  	            (char *) &tclTraceCompile,  TCL_LINK_INT) != TCL_OK) {
!             Tcl_Panic("SetByteCodeFromAny: unable to create link for tcl_traceCompile variable");
          }
          traceInitialized = 1;
      }
***************
*** 1316,1322 ****
  		break;
  
  	    default:
! 		panic("Unexpected token type in TclCompileTokens");
  	}
      }
  
--- 1316,1322 ----
  		break;
  
  	    default:
! 		Tcl_Panic("Unexpected token type in TclCompileTokens");
  	}
      }
  
***************
*** 1621,1627 ****
      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);
      }
  #endif
      
--- 1621,1627 ----
      nextPtr = EncodeCmdLocMap(envPtr, codePtr, (unsigned char *) p);
  #ifdef TCL_COMPILE_DEBUG
      if (((size_t)(nextPtr - p)) != cmdLocBytes) {	
! 	Tcl_Panic("TclInitByteCodeObj: encoded cmd location bytes %d != expected size %d\n", (nextPtr - p), cmdLocBytes);
      }
  #endif
      
***************
*** 2015,2021 ****
      CmdLocation *cmdLocPtr;
      
      if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
! 	panic("EnterCmdStartData: bad command index %d\n", cmdIndex);
      }
      
      if (cmdIndex >= envPtr->cmdMapEnd) {
--- 2015,2021 ----
      CmdLocation *cmdLocPtr;
      
      if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
! 	Tcl_Panic("EnterCmdStartData: bad command index %d\n", cmdIndex);
      }
      
      if (cmdIndex >= envPtr->cmdMapEnd) {
***************
*** 2047,2053 ****
  
      if (cmdIndex > 0) {
  	if (codeOffset < envPtr->cmdMapPtr[cmdIndex-1].codeOffset) {
! 	    panic("EnterCmdStartData: cmd map not sorted by code offset");
  	}
      }
  
--- 2047,2053 ----
  
      if (cmdIndex > 0) {
  	if (codeOffset < envPtr->cmdMapPtr[cmdIndex-1].codeOffset) {
! 	    Tcl_Panic("EnterCmdStartData: cmd map not sorted by code offset");
  	}
      }
  
***************
*** 2092,2102 ****
      CmdLocation *cmdLocPtr;
  
      if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
! 	panic("EnterCmdExtentData: bad command index %d\n", cmdIndex);
      }
      
      if (cmdIndex > envPtr->cmdMapEnd) {
! 	panic("EnterCmdExtentData: missing start data for command %d\n",
  	        cmdIndex);
      }
  
--- 2092,2102 ----
      CmdLocation *cmdLocPtr;
  
      if ((cmdIndex < 0) || (cmdIndex >= envPtr->numCommands)) {
! 	Tcl_Panic("EnterCmdExtentData: bad command index %d\n", cmdIndex);
      }
      
      if (cmdIndex > envPtr->cmdMapEnd) {
! 	Tcl_Panic("EnterCmdExtentData: missing start data for command %d\n",
  	        cmdIndex);
      }
  
***************
*** 2529,2535 ****
  	    rangePtr->catchOffset += 3;
  	    break;
  	default:
! 	    panic("TclFixupForwardJump: bad ExceptionRange type %d\n",
  	            rangePtr->type);
  	}
      }
--- 2529,2535 ----
  	    rangePtr->catchOffset += 3;
  	    break;
  	default:
! 	    Tcl_Panic("TclFixupForwardJump: bad ExceptionRange type %d\n",
  	            rangePtr->type);
  	}
      }
***************
*** 2755,2761 ****
      for (i = 0;  i < numCmds;  i++) {
  	codeDelta = (mapPtr[i].codeOffset - prevCodeOffset);
  	if (codeDelta < 0) {
! 	    panic("GetCmdLocEncodingSize: bad code offset");
  	} else if (codeDelta <= 127) {
  	    codeDeltaNext++;
  	} else {
--- 2755,2761 ----
      for (i = 0;  i < numCmds;  i++) {
  	codeDelta = (mapPtr[i].codeOffset - prevCodeOffset);
  	if (codeDelta < 0) {
! 	    Tcl_Panic("GetCmdLocEncodingSize: bad code offset");
  	} else if (codeDelta <= 127) {
  	    codeDeltaNext++;
  	} else {
***************
*** 2765,2771 ****
  
  	codeLen = mapPtr[i].numCodeBytes;
  	if (codeLen < 0) {
! 	    panic("GetCmdLocEncodingSize: bad code length");
  	} else if (codeLen <= 127) {
  	    codeLengthNext++;
  	} else {
--- 2765,2771 ----
  
  	codeLen = mapPtr[i].numCodeBytes;
  	if (codeLen < 0) {
! 	    Tcl_Panic("GetCmdLocEncodingSize: bad code length");
  	} else if (codeLen <= 127) {
  	    codeLengthNext++;
  	} else {
***************
*** 2782,2788 ****
  
  	srcLen = mapPtr[i].numSrcBytes;
  	if (srcLen < 0) {
! 	    panic("GetCmdLocEncodingSize: bad source length");
  	} else if (srcLen <= 127) {
  	    srcLengthNext++;
  	} else {
--- 2782,2788 ----
  
  	srcLen = mapPtr[i].numSrcBytes;
  	if (srcLen < 0) {
! 	    Tcl_Panic("GetCmdLocEncodingSize: bad source length");
  	} else if (srcLen <= 127) {
  	    srcLengthNext++;
  	} else {
***************
*** 2840,2846 ****
      for (i = 0;  i < numCmds;  i++) {
  	codeDelta = (mapPtr[i].codeOffset - prevOffset);
  	if (codeDelta < 0) {
! 	    panic("EncodeCmdLocMap: bad code offset");
  	} else if (codeDelta <= 127) {
  	    TclStoreInt1AtPtr(codeDelta, p);
  	    p++;
--- 2840,2846 ----
      for (i = 0;  i < numCmds;  i++) {
  	codeDelta = (mapPtr[i].codeOffset - prevOffset);
  	if (codeDelta < 0) {
! 	    Tcl_Panic("EncodeCmdLocMap: bad code offset");
  	} else if (codeDelta <= 127) {
  	    TclStoreInt1AtPtr(codeDelta, p);
  	    p++;
***************
*** 2861,2867 ****
      for (i = 0;  i < numCmds;  i++) {
  	codeLen = mapPtr[i].numCodeBytes;
  	if (codeLen < 0) {
! 	    panic("EncodeCmdLocMap: bad code length");
  	} else if (codeLen <= 127) {
  	    TclStoreInt1AtPtr(codeLen, p);
  	    p++;
--- 2861,2867 ----
      for (i = 0;  i < numCmds;  i++) {
  	codeLen = mapPtr[i].numCodeBytes;
  	if (codeLen < 0) {
! 	    Tcl_Panic("EncodeCmdLocMap: bad code length");
  	} else if (codeLen <= 127) {
  	    TclStoreInt1AtPtr(codeLen, p);
  	    p++;
***************
*** 2901,2907 ****
      for (i = 0;  i < numCmds;  i++) {
  	srcLen = mapPtr[i].numSrcBytes;
  	if (srcLen < 0) {
! 	    panic("EncodeCmdLocMap: bad source length");
  	} else if (srcLen <= 127) {
  	    TclStoreInt1AtPtr(srcLen, p);
  	    p++;
--- 2901,2907 ----
      for (i = 0;  i < numCmds;  i++) {
  	srcLen = mapPtr[i].numSrcBytes;
  	if (srcLen < 0) {
! 	    Tcl_Panic("EncodeCmdLocMap: bad source length");
  	} else if (srcLen <= 127) {
  	    TclStoreInt1AtPtr(srcLen, p);
  	    p++;
***************
*** 3044,3050 ****
  		fprintf(stdout,	"catch %d\n", rangePtr->catchOffset);
  		break;
  	    default:
! 		panic("TclPrintByteCodeObj: bad ExceptionRange type %d\n",
  		        rangePtr->type);
  	    }
  	}
--- 3044,3050 ----
  		fprintf(stdout,	"catch %d\n", rangePtr->catchOffset);
  		break;
  	    default:
! 		Tcl_Panic("TclPrintByteCodeObj: bad ExceptionRange type %d\n",
  		        rangePtr->type);
  	    }
  	}
***************
*** 3255,3261 ****
  		int localCt = procPtr->numCompiledLocals;
  		CompiledLocal *localPtr = procPtr->firstLocalPtr;
  		if (opnd >= localCt) {
! 		    panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
  			     (unsigned int) opnd, localCt);
  		}
  		for (j = 0;  j < opnd;  j++) {
--- 3255,3261 ----
  		int localCt = procPtr->numCompiledLocals;
  		CompiledLocal *localPtr = procPtr->firstLocalPtr;
  		if (opnd >= localCt) {
! 		    Tcl_Panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
  			     (unsigned int) opnd, localCt);
  		}
  		for (j = 0;  j < opnd;  j++) {
***************
*** 3284,3290 ****
  		int localCt = procPtr->numCompiledLocals;
  		CompiledLocal *localPtr = procPtr->firstLocalPtr;
  		if (opnd >= localCt) {
! 		    panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
  			     (unsigned int) opnd, localCt);
  		}
  		for (j = 0;  j < opnd;  j++) {
--- 3284,3290 ----
  		int localCt = procPtr->numCompiledLocals;
  		CompiledLocal *localPtr = procPtr->firstLocalPtr;
  		if (opnd >= localCt) {
! 		    Tcl_Panic("TclPrintInstruction: bad local var index %u (%u locals)\n",
  			     (unsigned int) opnd, localCt);
  		}
  		for (j = 0;  j < opnd;  j++) {

*** generic/tclConfig.c	1 Nov 2003 01:20:34 -0000	1.4
--- generic/tclConfig.c	24 Dec 2003 01:46:56 -0000
***************
*** 220,226 ****
      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 */
          Tcl_SetObjResult(interp, Tcl_NewStringObj("package not known", -1));
  	return TCL_ERROR;
      }
--- 220,226 ----
      pDB = GetConfigDict(interp);
      res = Tcl_DictObjGet(interp, pDB, pkgName, &pkgDict);
      if (res!=TCL_OK || pkgDict==NULL) {
!         /* 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;
      }

*** generic/tclDictObj.c	4 Sep 2003 16:44:12 -0000	1.11
--- generic/tclDictObj.c	24 Dec 2003 01:46:59 -0000
***************
*** 654,660 ****
      int isNew;
  
      if (Tcl_IsShared(dictPtr)) {
! 	panic("Tcl_DictObjPut called with shared object");
      }
  
      if (dictPtr->typePtr != &tclDictType) {
--- 654,660 ----
      int isNew;
  
      if (Tcl_IsShared(dictPtr)) {
! 	Tcl_Panic("Tcl_DictObjPut called with shared object");
      }
  
      if (dictPtr->typePtr != &tclDictType) {
***************
*** 752,758 ****
      Tcl_HashEntry *hPtr;
  
      if (Tcl_IsShared(dictPtr)) {
! 	panic("Tcl_DictObjRemove called with shared object");
      }
  
      if (dictPtr->typePtr != &tclDictType) {
--- 752,758 ----
      Tcl_HashEntry *hPtr;
  
      if (Tcl_IsShared(dictPtr)) {
! 	Tcl_Panic("Tcl_DictObjRemove called with shared object");
      }
  
      if (dictPtr->typePtr != &tclDictType) {
***************
*** 929,935 ****
       * or removed.  This *shouldn't* happen, but...
       */
      if (((Dict *)searchPtr->dictionaryPtr)->epoch != searchPtr->epoch) {
! 	panic("concurrent dictionary modification and search");
      }
  
      hPtr = Tcl_NextHashEntry(&searchPtr->search);
--- 929,935 ----
       * or removed.  This *shouldn't* happen, but...
       */
      if (((Dict *)searchPtr->dictionaryPtr)->epoch != searchPtr->epoch) {
! 	Tcl_Panic("concurrent dictionary modification and search");
      }
  
      hPtr = Tcl_NextHashEntry(&searchPtr->search);
***************
*** 1016,1025 ****
      int isNew;
  
      if (Tcl_IsShared(dictPtr)) {
! 	panic("Tcl_DictObjPutKeyList called with shared object");
      }
      if (keyc < 1) {
! 	panic("Tcl_DictObjPutKeyList called with empty key list");
      }
  
      dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
--- 1016,1025 ----
      int isNew;
  
      if (Tcl_IsShared(dictPtr)) {
! 	Tcl_Panic("Tcl_DictObjPutKeyList called with shared object");
      }
      if (keyc < 1) {
! 	Tcl_Panic("Tcl_DictObjPutKeyList called with empty key list");
      }
  
      dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
***************
*** 1072,1081 ****
      Tcl_HashEntry *hPtr;
  
      if (Tcl_IsShared(dictPtr)) {
! 	panic("Tcl_DictObjRemoveKeyList called with shared object");
      }
      if (keyc < 1) {
! 	panic("Tcl_DictObjRemoveKeyList called with empty key list");
      }
  
      dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
--- 1072,1081 ----
      Tcl_HashEntry *hPtr;
  
      if (Tcl_IsShared(dictPtr)) {
! 	Tcl_Panic("Tcl_DictObjRemoveKeyList called with shared object");
      }
      if (keyc < 1) {
! 	Tcl_Panic("Tcl_DictObjRemoveKeyList called with empty key list");
      }
  
      dictPtr = TraceDictPath(interp, dictPtr, keyc-1, keyv, /*willUpdate*/ 1);
***************
*** 2492,2498 ****
  	}
  	return result;
      }
!     panic("unexpected fallthrough");
      /* Control never reaches this point. */
      return TCL_ERROR;
  
--- 2492,2498 ----
  	}
  	return result;
      }
!     Tcl_Panic("unexpected fallthrough");
      /* Control never reaches this point. */
      return TCL_ERROR;
  
***************
*** 2571,2577 ****
      case DICT_UNSET:	return DictUnsetCmd(interp, objc, objv);
      case DICT_VALUES:	return DictValuesCmd(interp, objc, objv);
      }
!     panic("unexpected fallthrough!");
      /*
       * Next line is NOT REACHED - stops compliler complaint though...
       */
--- 2571,2577 ----
      case DICT_UNSET:	return DictUnsetCmd(interp, objc, objv);
      case DICT_VALUES:	return DictValuesCmd(interp, objc, objv);
      }
!     Tcl_Panic("unexpected fallthrough!");
      /*
       * Next line is NOT REACHED - stops compliler complaint though...
       */

*** generic/tclEncoding.c	21 Feb 2003 02:40:58 -0000	1.16
--- generic/tclEncoding.c	24 Dec 2003 01:47:02 -0000
***************
*** 2764,2770 ****
  	encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, subTablePtr->name);
  	if ((encodingPtr == NULL) 
  		|| (encodingPtr->toUtfProc != TableToUtfProc)) {
! 	    panic("EscapeToUtfProc: invalid sub table");
  	}
  	subTablePtr->encodingPtr = encodingPtr;
      }
--- 2764,2770 ----
  	encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, subTablePtr->name);
  	if ((encodingPtr == NULL) 
  		|| (encodingPtr->toUtfProc != TableToUtfProc)) {
! 	    Tcl_Panic("EscapeToUtfProc: invalid sub table");
  	}
  	subTablePtr->encodingPtr = encodingPtr;
      }

*** generic/tclEvent.c	29 Sep 2003 21:38:49 -0000	1.30
--- generic/tclEvent.c	24 Dec 2003 01:47:04 -0000
***************
*** 617,623 ****
  	/*
  	 * 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.
  	 */
  	currentAppExitPtr((ClientData) status);
  	Tcl_Panic("AppExitProc returned unexpectedly");
--- 617,623 ----
  	/*
  	 * Warning: this code SHOULD NOT return, as there is code that
  	 * depends on Tcl_Exit never returning.  In fact, we will
! 	 * Tcl_Panic if anyone returns, so critical is this dependcy.
  	 */
  	currentAppExitPtr((ClientData) status);
  	Tcl_Panic("AppExitProc returned unexpectedly");
***************
*** 742,748 ****
      ThreadSpecificData *tsdPtr;
  
      if (inFinalize != 0) {
! 	panic("TclInitSubsystems called while finalizing");
      }
  
      /*
--- 742,748 ----
      ThreadSpecificData *tsdPtr;
  
      if (inFinalize != 0) {
! 	Tcl_Panic("TclInitSubsystems called while finalizing");
      }
  
      /*
***************
*** 1180,1186 ****
  		break;
  	    }
  	    default: {
! 		panic("Tcl_UpdateObjCmd: bad option index to UpdateOptions");
  	    }
  	}
      } else {
--- 1180,1186 ----
  		break;
  	    }
  	    default: {
! 		Tcl_Panic("Tcl_UpdateObjCmd: bad option index to UpdateOptions");
  	    }
  	}
      } else {

*** generic/tclExecute.c	16 Nov 2003 02:12:56 -0000	1.117
--- generic/tclExecute.c	24 Dec 2003 01:47:10 -0000
***************
*** 174,187 ****
  	 switch (nCleanup) {\
  	     case 1: goto cleanup1_pushObjResultPtr;\
  	     case 2: goto cleanup2_pushObjResultPtr;\
! 	     default: 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");\
  	 }\
       }
  
--- 174,187 ----
  	 switch (nCleanup) {\
  	     case 1: goto cleanup1_pushObjResultPtr;\
  	     case 2: goto cleanup2_pushObjResultPtr;\
! 	     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: Tcl_Panic("ERROR: bad usage of macro NEXT_INST_F");\
  	 }\
       }
  
***************
*** 465,471 ****
  #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");
      }
  #endif
  #ifdef TCL_COMPILE_STATS    
--- 465,471 ----
  #ifdef TCL_COMPILE_DEBUG
      if (Tcl_LinkVar(interp, "tcl_traceExec", (char *) &tclTraceExec,
  		    TCL_LINK_INT) != TCL_OK) {
! 	Tcl_Panic("InitByteCodeExecution: can't create link for tcl_traceExec variable");
      }
  #endif
  #ifdef TCL_COMPILE_STATS    
***************
*** 563,569 ****
      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");
      }
      TclDecrRefCount(eePtr->errorInfo);
      TclDecrRefCount(eePtr->errorCode);
--- 563,569 ----
      if (eePtr->stackPtr[-1] == (Tcl_Obj *) ((char *) 1)) {
  	ckfree((char *) (eePtr->stackPtr-1));
      } else {
! 	Tcl_Panic("ERROR: freeing an execEnv whose stack is still in use.\n");
      }
      TclDecrRefCount(eePtr->errorInfo);
      TclDecrRefCount(eePtr->errorCode);
***************
*** 756,762 ****
  	        || (codePtr->compileEpoch != iPtr->compileEpoch)) {
              if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
                  if ((Interp *) *codePtr->interpHandle != iPtr) {
!                     panic("Tcl_ExprObj: compiled expression jumped interps");
                  }
  	        codePtr->compileEpoch = iPtr->compileEpoch;
              } else {
--- 756,762 ----
  	        || (codePtr->compileEpoch != iPtr->compileEpoch)) {
              if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
                  if ((Interp *) *codePtr->interpHandle != iPtr) {
!                     Tcl_Panic("Tcl_ExprObj: compiled expression jumped interps");
                  }
  	        codePtr->compileEpoch = iPtr->compileEpoch;
              } else {
***************
*** 971,977 ****
  	        || (codePtr->nsEpoch != namespacePtr->resolverEpoch)) {
              if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
                  if ((Interp *) *codePtr->interpHandle != iPtr) {
!                     panic("Tcl_EvalObj: compiled script jumped interps");
                  }
  	        codePtr->compileEpoch = iPtr->compileEpoch;
              } else {
--- 971,977 ----
  	        || (codePtr->nsEpoch != namespacePtr->resolverEpoch)) {
              if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
                  if ((Interp *) *codePtr->interpHandle != iPtr) {
!                     Tcl_Panic("Tcl_EvalObj: compiled script jumped interps");
                  }
  	        codePtr->compileEpoch = iPtr->compileEpoch;
              } else {
***************
*** 3864,3870 ****
  
  	    if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) {
  		TRACE(("UNRECOGNIZED BUILTIN FUNC CODE %d\n", opnd));
! 		panic("TclExecuteByteCode: unrecognized builtin function code %d", opnd);
  	    }
  	    mathFuncPtr = &(tclBuiltinFuncTable[opnd]);
  	    DECACHE_STACK_INFO();
--- 3864,3870 ----
  
  	    if ((opnd < 0) || (opnd > LAST_BUILTIN_FUNC)) {
  		TRACE(("UNRECOGNIZED BUILTIN FUNC CODE %d\n", opnd));
! 		Tcl_Panic("TclExecuteByteCode: unrecognized builtin function code %d", opnd);
  	    }
  	    mathFuncPtr = &(tclBuiltinFuncTable[opnd]);
  	    DECACHE_STACK_INFO();
***************
*** 4246,4252 ****
  	NEXT_INST_F(1, 0, 1);
  
      default:
! 	panic("TclExecuteByteCode: unrecognized opCode %u", *pc);
      } /* end of switch on opCode */
  
      /*
--- 4246,4252 ----
  	NEXT_INST_F(1, 0, 1);
  
      default:
! 	Tcl_Panic("TclExecuteByteCode: unrecognized opCode %u", *pc);
      } /* end of switch on opCode */
  
      /*
***************
*** 4444,4450 ****
  		    (unsigned int)(pc - codePtr->codeStart),
  		    (unsigned int) (tosPtr - eePtr->stackPtr),
  		    (unsigned int) initStackTop);
! 	    panic("TclExecuteByteCode execution failure: end stack top < start stack top");
  	}
  	eePtr->tosPtr = initTosPtr - codePtr->maxExceptDepth;
      }
--- 4444,4450 ----
  		    (unsigned int)(pc - codePtr->codeStart),
  		    (unsigned int) (tosPtr - eePtr->stackPtr),
  		    (unsigned int) initStackTop);
! 	    Tcl_Panic("TclExecuteByteCode execution failure: end stack top < start stack top");
  	}
  	eePtr->tosPtr = initTosPtr - codePtr->maxExceptDepth;
      }
***************
*** 4557,4568 ****
      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");
      }
      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");
      }
      if ((stackTop < stackLowerBound) || (stackTop > stackUpperBound)) {
  	int numChars;
--- 4557,4568 ----
      if (((unsigned int) pc < codeStart) || ((unsigned int) pc > codeEnd)) {
  	fprintf(stderr, "\nBad instruction pc 0x%x in TclExecuteByteCode\n",
  		(unsigned int) 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);
!         Tcl_Panic("TclExecuteByteCode execution failure: bad opcode");
      }
      if ((stackTop < stackLowerBound) || (stackTop > stackUpperBound)) {
  	int numChars;
***************
*** 4579,4585 ****
  	} else {
  	    fprintf(stderr, "\n");
  	}
! 	panic("TclExecuteByteCode execution failure: bad stack top");
      }
  }
  #endif /* TCL_COMPILE_DEBUG */
--- 4579,4585 ----
  	} else {
  	    fprintf(stderr, "\n");
  	}
! 	Tcl_Panic("TclExecuteByteCode execution failure: bad stack top");
      }
  }
  #endif /* TCL_COMPILE_DEBUG */
***************
*** 5773,5779 ****
      }
      mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
      if (mathFuncPtr->numArgs != (objc-1)) {
! 	panic("ExprCallMathFunc: expected number of args %d != actual number %d",
  	        mathFuncPtr->numArgs, objc);
  	result = TCL_ERROR;
  	goto done;
--- 5773,5779 ----
      }
      mathFuncPtr = (MathFunc *) Tcl_GetHashValue(hPtr);
      if (mathFuncPtr->numArgs != (objc-1)) {
! 	Tcl_Panic("ExprCallMathFunc: expected number of args %d != actual number %d",
  	        mathFuncPtr->numArgs, objc);
  	result = TCL_ERROR;
  	goto done;

*** generic/tclHash.c	15 Nov 2003 23:35:16 -0000	1.15
--- generic/tclHash.c	24 Dec 2003 01:47:12 -0000
***************
*** 193,199 ****
  					 * the behaviour of this table. */
  {
  #if (TCL_SMALL_HASH_TABLE != 4) 
!     panic("Tcl_InitCustomHashTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
  	    TCL_SMALL_HASH_TABLE);
  #endif
      
--- 193,199 ----
  					 * the behaviour of this table. */
  {
  #if (TCL_SMALL_HASH_TABLE != 4) 
!     Tcl_Panic("Tcl_InitCustomHashTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
  	    TCL_SMALL_HASH_TABLE);
  #endif
      
***************
*** 548,554 ****
      } else {
  	for (prevPtr = *bucketPtr; ; prevPtr = prevPtr->nextPtr) {
  	    if (prevPtr == NULL) {
! 		panic("malformed bucket chain in Tcl_DeleteHashEntry");
  	    }
  	    if (prevPtr->nextPtr == entryPtr) {
  		prevPtr->nextPtr = entryPtr->nextPtr;
--- 548,554 ----
      } else {
  	for (prevPtr = *bucketPtr; ; prevPtr = prevPtr->nextPtr) {
  	    if (prevPtr == NULL) {
! 		Tcl_Panic("malformed bucket chain in Tcl_DeleteHashEntry");
  	    }
  	    if (prevPtr->nextPtr == entryPtr) {
  		prevPtr->nextPtr = entryPtr->nextPtr;
***************
*** 1068,1074 ****
   *	on a table that has been deleted.
   *
   * Results:
!  *	If panic returns (which it shouldn't) this procedure returns
   *	NULL.
   *
   * Side effects:
--- 1068,1074 ----
   *	on a table that has been deleted.
   *
   * Results:
!  *	If Tcl_Panic returns (which it shouldn't) this procedure returns
   *	NULL.
   *
   * Side effects:
***************
*** 1083,1089 ****
      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");
      return NULL;
  }
  
--- 1083,1089 ----
      Tcl_HashTable *tablePtr;	/* Table in which to lookup entry. */
      CONST char *key;		/* Key to use to find matching entry. */
  {
!     Tcl_Panic("called Tcl_FindHashEntry on deleted table");
      return NULL;
  }
  
***************
*** 1114,1120 ****
      int *newPtr;		/* Store info here telling whether a new
  				 * entry was created. */
  {
!     panic("called Tcl_CreateHashEntry on deleted table");
      return NULL;
  }
  #endif
--- 1114,1120 ----
      int *newPtr;		/* Store info here telling whether a new
  				 * entry was created. */
  {
!     Tcl_Panic("called Tcl_CreateHashEntry on deleted table");
      return NULL;
  }
  #endif

*** generic/tclInterp.c	29 Sep 2003 22:11:11 -0000	1.24
--- generic/tclInterp.c	24 Dec 2003 01:47:15 -0000
***************
*** 285,291 ****
  
      masterPtr = &interpInfoPtr->master;
      if (masterPtr->slaveTable.numEntries != 0) {
! 	panic("InterpInfoDeleteProc: still exist commands");
      }
      Tcl_DeleteHashTable(&masterPtr->slaveTable);
  
--- 285,291 ----
  
      masterPtr = &interpInfoPtr->master;
      if (masterPtr->slaveTable.numEntries != 0) {
! 	Tcl_Panic("InterpInfoDeleteProc: still exist commands");
      }
      Tcl_DeleteHashTable(&masterPtr->slaveTable);
  
***************
*** 323,329 ****
       */
  
      if (slavePtr->aliasTable.numEntries != 0) {
! 	panic("InterpInfoDeleteProc: still exist aliases");
      }
      Tcl_DeleteHashTable(&slavePtr->aliasTable);
  
--- 323,329 ----
       */
  
      if (slavePtr->aliasTable.numEntries != 0) {
! 	Tcl_Panic("InterpInfoDeleteProc: still exist aliases");
      }
      Tcl_DeleteHashTable(&slavePtr->aliasTable);
  
***************
*** 1887,1893 ****
      
      slaveInterp = (Tcl_Interp *) clientData;
      if (slaveInterp == NULL) {
! 	panic("SlaveObjCmd: interpreter has been deleted");
      }
  
      if (objc < 2) {
--- 1887,1893 ----
      
      slaveInterp = (Tcl_Interp *) clientData;
      if (slaveInterp == NULL) {
! 	Tcl_Panic("SlaveObjCmd: interpreter has been deleted");
      }
  
      if (objc < 2) {

*** generic/tclIO.c	22 Apr 2003 23:20:41 -0000	1.68
--- generic/tclIO.c	24 Dec 2003 01:47:22 -0000
***************
*** 758,764 ****
      statePtr = chanPtr->state;
  
      if (statePtr->channelName == (CONST char *) NULL) {
!         panic("Tcl_RegisterChannel: channel without name");
      }
      if (interp != (Tcl_Interp *) NULL) {
          hTblPtr = GetChannelTable(interp);
--- 758,764 ----
      statePtr = chanPtr->state;
  
      if (statePtr->channelName == (CONST char *) NULL) {
!         Tcl_Panic("Tcl_RegisterChannel: channel without name");
      }
      if (interp != (Tcl_Interp *) NULL) {
          hTblPtr = GetChannelTable(interp);
***************
*** 768,774 ****
                  return;
              }
  
! 	    panic("Tcl_RegisterChannel: duplicate channel names");
          }
          Tcl_SetHashValue(hPtr, (ClientData) chanPtr);
      }
--- 768,774 ----
                  return;
              }
  
! 	    Tcl_Panic("Tcl_RegisterChannel: duplicate channel names");
          }
          Tcl_SetHashValue(hPtr, (ClientData) chanPtr);
      }
***************
*** 1126,1132 ****
          statePtr->channelName = tmp;
          strcpy(tmp, chanName);
      } else {
!         panic("Tcl_CreateChannel: NULL channel name");
      }
  
      statePtr->flags		= mask;
--- 1126,1132 ----
          statePtr->channelName = tmp;
          strcpy(tmp, chanName);
      } else {
!         Tcl_Panic("Tcl_CreateChannel: NULL channel name");
      }
  
      statePtr->flags		= mask;
***************
*** 2245,2251 ****
       */
  
      if (statePtr->outQueueHead != (ChannelBuffer *) NULL) {
!         panic("TclFlush, closed channel: queued output left");
      }
  
      /*
--- 2245,2251 ----
       */
  
      if (statePtr->outQueueHead != (ChannelBuffer *) NULL) {
!         Tcl_Panic("TclFlush, closed channel: queued output left");
      }
  
      /*
***************
*** 2403,2409 ****
              /* Empty loop body. */
          }
          if (prevCSPtr == (ChannelState *) NULL) {
!             panic("FlushChannel: damaged channel list");
          }
          prevCSPtr->nextCSPtr = statePtr->nextCSPtr;
      }
--- 2403,2409 ----
              /* Empty loop body. */
          }
          if (prevCSPtr == (ChannelState *) NULL) {
!             Tcl_Panic("FlushChannel: damaged channel list");
          }
          prevCSPtr->nextCSPtr = statePtr->nextCSPtr;
      }
***************
*** 2450,2456 ****
      ChannelState	*statePtr = ((Channel *) chan)->state;
  
      if (statePtr->nextCSPtr != (ChannelState *) NULL) {
!         panic("Tcl_SpliceChannel: trying to add channel used in different list");
      }
  
      statePtr->nextCSPtr	= tsdPtr->firstCSPtr;
--- 2450,2456 ----
      ChannelState	*statePtr = ((Channel *) chan)->state;
  
      if (statePtr->nextCSPtr != (ChannelState *) NULL) {
!         Tcl_Panic("Tcl_SpliceChannel: trying to add channel used in different list");
      }
  
      statePtr->nextCSPtr	= tsdPtr->firstCSPtr;
***************
*** 2527,2533 ****
      chanPtr	= statePtr->topChanPtr;
  
      if (statePtr->refCount > 0) {
!         panic("called Tcl_Close on channel with refCount > 0");
      }
  
      /*
--- 2527,2533 ----
      chanPtr	= statePtr->topChanPtr;
  
      if (statePtr->refCount > 0) {
!         Tcl_Panic("called Tcl_Close on channel with refCount > 0");
      }
  
      /*
***************
*** 6066,6072 ****
  	}
  	if (Tcl_SplitList(interp, Tcl_DStringValue(&ds), 
  		&argc, &argv) != TCL_OK) {
! 	    panic("malformed option list in channel driver");
  	}
  	Tcl_ResetResult(interp);
  	Tcl_AppendResult(interp, "bad option \"", optionName, 
--- 6066,6072 ----
  	}
  	if (Tcl_SplitList(interp, Tcl_DStringValue(&ds), 
  		&argc, &argv) != TCL_OK) {
! 	    Tcl_Panic("malformed option list in channel driver");
  	}
  	Tcl_ResetResult(interp);
  	Tcl_AppendResult(interp, "bad option \"", optionName, 
***************
*** 8083,8089 ****
              break;
  	}
          default: {
!             panic("unknown eol translation mode");
  	}
      }
  
--- 8083,8089 ----
              break;
  	}
          default: {
!             Tcl_Panic("unknown eol translation mode");
  	}
      }
  
***************
*** 8334,8342 ****
                  }
                  break;
              case TCL_TRANSLATE_AUTO:
!                 panic("Tcl_Write: AUTO output translation mode not supported");
              default:
!                 panic("Tcl_Write: unknown output translation mode");
          }
  
          /*
--- 8334,8342 ----
                  }
                  break;
              case TCL_TRANSLATE_AUTO:
!                 Tcl_Panic("Tcl_Write: AUTO output translation mode not supported");
              default:
!                 Tcl_Panic("Tcl_Write: unknown output translation mode");
          }
  
          /*

*** generic/tclIOCmd.c	15 Feb 2002 14:28:49 -0000	1.15
--- generic/tclIOCmd.c	24 Dec 2003 01:47:25 -0000
***************
*** 997,1003 ****
  		    flags |= (TCL_STDIN | TCL_STDOUT);
  		    break;
  		default:
! 		    panic("Tcl_OpenCmd: invalid mode value");
  		    break;
  	    }
  	    chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
--- 997,1003 ----
  		    flags |= (TCL_STDIN | TCL_STDOUT);
  		    break;
  		default:
! 		    Tcl_Panic("Tcl_OpenCmd: invalid mode value");
  		    break;
  	    }
  	    chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags);
***************
*** 1103,1109 ****
      }
      hPtr = Tcl_CreateHashEntry(hTblPtr, (char *) acceptCallbackPtr, &new);
      if (!new) {
!         panic("RegisterTcpServerCleanup: damaged accept record table");
      }
      Tcl_SetHashValue(hPtr, (ClientData) acceptCallbackPtr);
  }
--- 1103,1109 ----
      }
      hPtr = Tcl_CreateHashEntry(hTblPtr, (char *) acceptCallbackPtr, &new);
      if (!new) {
!         Tcl_Panic("RegisterTcpServerCleanup: damaged accept record table");
      }
      Tcl_SetHashValue(hPtr, (ClientData) acceptCallbackPtr);
  }
***************
*** 1386,1392 ****
  		break;
  	    }
  	    default: {
! 		panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
  	    }
  	}
      }
--- 1386,1392 ----
  		break;
  	    }
  	    default: {
! 		Tcl_Panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
  	    }
  	}
      }

*** generic/tclIOUtil.c	17 Dec 2003 09:24:43 -0000	1.90
--- generic/tclIOUtil.c	24 Dec 2003 01:47:30 -0000
***************
*** 3294,3300 ****
  		     * return with the current value of 'type'.
  		     * 
  		     * It would be better if we could signal an error
! 		     * here (but panic seems a bit excessive).
  		     */
  		    numVolumes = -1;
  		}
--- 3294,3300 ----
  		     * return with the current value of 'type'.
  		     * 
  		     * It would be better if we could signal an error
! 		     * here (but Tcl_Panic seems a bit excessive).
  		     */
  		    numVolumes = -1;
  		}
***************
*** 3697,3703 ****
      Tcl_Filesystem* retVal = NULL;
      
      if (pathObjPtr == NULL) {
! 	panic("Tcl_FSGetFileSystemForPath called with NULL object");
  	return NULL;
      }
      
--- 3697,3703 ----
      Tcl_Filesystem* retVal = NULL;
      
      if (pathObjPtr == NULL) {
! 	Tcl_Panic("Tcl_FSGetFileSystemForPath called with NULL object");
  	return NULL;
      }
      
***************
*** 3709,3715 ****
       */
      
      if (pathObjPtr->refCount == 0) {
! 	panic("Tcl_FSGetFileSystemForPath called with object with refCount == 0");
  	return NULL;
      }
      
--- 3709,3715 ----
       */
      
      if (pathObjPtr->refCount == 0) {
! 	Tcl_Panic("Tcl_FSGetFileSystemForPath called with object with refCount == 0");
  	return NULL;
      }
      

*** generic/tclListObj.c	1 Nov 2003 01:28:04 -0000	1.17
--- generic/tclListObj.c	24 Dec 2003 01:47:33 -0000
***************
*** 355,361 ****
      int i;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetListObj called with shared object");
      }
  
      /*
--- 355,361 ----
      int i;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetListObj called with shared object");
      }
  
      /*
***************
*** 487,493 ****
      Tcl_Obj **objv;
  
      if (Tcl_IsShared(listPtr)) {
! 	panic("Tcl_ListObjAppendList called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
--- 487,493 ----
      Tcl_Obj **objv;
  
      if (Tcl_IsShared(listPtr)) {
! 	Tcl_Panic("Tcl_ListObjAppendList called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
***************
*** 549,555 ****
      int numElems, numRequired;
  
      if (Tcl_IsShared(listPtr)) {
! 	panic("Tcl_ListObjAppendElement called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	int result = SetListFromAny(interp, listPtr);
--- 549,555 ----
      int numElems, numRequired;
  
      if (Tcl_IsShared(listPtr)) {
! 	Tcl_Panic("Tcl_ListObjAppendElement called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	int result = SetListFromAny(interp, listPtr);
***************
*** 749,755 ****
      int start, shift, newMax, i, j, result;
  
      if (Tcl_IsShared(listPtr)) {
! 	panic("Tcl_ListObjReplace called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
--- 749,755 ----
      int start, shift, newMax, i, j, result;
  
      if (Tcl_IsShared(listPtr)) {
! 	Tcl_Panic("Tcl_ListObjReplace called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
***************
*** 1368,1377 ****
   *
   * 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
   *	of the replacement object.  
   *
   * It is the caller's responsibility to invalidate the string
--- 1368,1377 ----
   *
   * Side effects:
   *
!  *	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,1405 ****
      /* Ensure that the listPtr parameter designates an unshared list */
  
      if (Tcl_IsShared(listPtr)) {
! 	panic("Tcl_ListObjSetElement called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
--- 1399,1405 ----
      /* Ensure that the listPtr parameter designates an unshared list */
  
      if (Tcl_IsShared(listPtr)) {
! 	Tcl_Panic("Tcl_ListObjSetElement called with shared object");
      }
      if (listPtr->typePtr != &tclListType) {
  	result = SetListFromAny(interp, listPtr);
***************
*** 1618,1624 ****
  	    break;
  	}
  	if (i > estCount) {
! 	    panic("SetListFromAny: bad size estimate for list");
  	}
  
  	/*
--- 1618,1624 ----
  	    break;
  	}
  	if (i > estCount) {
! 	    Tcl_Panic("SetListFromAny: bad size estimate for list");
  	}
  
  	/*

*** generic/tclLiteral.c	11 Oct 2001 22:28:01 -0000	1.11
--- generic/tclLiteral.c	24 Dec 2003 01:47:35 -0000
***************
*** 63,69 ****
  				      * is supplied by the caller. */
  {
  #if (TCL_SMALL_HASH_TABLE != 4) 
!     panic("TclInitLiteralTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
  	    TCL_SMALL_HASH_TABLE);
  #endif
      
--- 63,69 ----
  				      * is supplied by the caller. */
  {
  #if (TCL_SMALL_HASH_TABLE != 4) 
!     Tcl_Panic("TclInitLiteralTable: TCL_SMALL_HASH_TABLE is %d, not 4\n",
  	    TCL_SMALL_HASH_TABLE);
  #endif
      
***************
*** 242,248 ****
  	    objIndex = AddLocalLiteralEntry(envPtr, globalPtr, localHash);
  #ifdef TCL_COMPILE_DEBUG
  	    if (globalPtr->refCount < 1) {
! 		panic("TclRegisterLiteral: global literal \"%.*s\" had bad refCount %d",
  			(length>60? 60 : length), bytes,
  			globalPtr->refCount);
  	    }
--- 242,248 ----
  	    objIndex = AddLocalLiteralEntry(envPtr, globalPtr, localHash);
  #ifdef TCL_COMPILE_DEBUG
  	    if (globalPtr->refCount < 1) {
! 		Tcl_Panic("TclRegisterLiteral: global literal \"%.*s\" had bad refCount %d",
  			(length>60? 60 : length), bytes,
  			globalPtr->refCount);
  	    }
***************
*** 282,288 ****
      
  #ifdef TCL_COMPILE_DEBUG
      if (TclLookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) {
! 	panic("TclRegisterLiteral: literal \"%.*s\" found globally but shouldn't be",
  	        (length>60? 60 : length), bytes);
      }
  #endif
--- 282,288 ----
      
  #ifdef TCL_COMPILE_DEBUG
      if (TclLookupLiteralEntry((Tcl_Interp *) iPtr, objPtr) != NULL) {
! 	Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" found globally but shouldn't be",
  	        (length>60? 60 : length), bytes);
      }
  #endif
***************
*** 321,327 ****
  	    }
  	}
  	if (!found) {
! 	    panic("TclRegisterLiteral: literal \"%.*s\" wasn't global",
  	            (length>60? 60 : length), bytes);
  	}
      }
--- 321,327 ----
  	    }
  	}
  	if (!found) {
! 	    Tcl_Panic("TclRegisterLiteral: literal \"%.*s\" wasn't global",
  	            (length>60? 60 : length), bytes);
  	}
      }
***************
*** 563,569 ****
  	}
  	if (!found) {
  	    bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
! 	    panic("AddLocalLiteralEntry: literal \"%.*s\" wasn't found locally",
  	            (length>60? 60 : length), bytes);
  	}
      }
--- 563,569 ----
  	}
  	if (!found) {
  	    bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
! 	    Tcl_Panic("AddLocalLiteralEntry: literal \"%.*s\" wasn't found locally",
  	            (length>60? 60 : length), bytes);
  	}
      }
***************
*** 959,965 ****
   *	None.
   *
   * Side effects:
!  *	Panics if problems are found.
   *
   *----------------------------------------------------------------------
   */
--- 959,965 ----
   *	None.
   *
   * Side effects:
!  *	Tcl_Panic if problems are found.
   *
   *----------------------------------------------------------------------
   */
***************
*** 982,1004 ****
  	    count++;
  	    if (localPtr->refCount != -1) {
  		bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length);
! 		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",
  		         (length>60? 60 : length), bytes);
  	    }
  	    if (localPtr->objPtr->bytes == NULL) {
! 		panic("TclVerifyLocalLiteralTable: literal has NULL string rep");
  	    }
  	}
      }
      if (count != localTablePtr->numEntries) {
! 	panic("TclVerifyLocalLiteralTable: local literal table had %d entries, should be %d",
  	      count, localTablePtr->numEntries);
      }
  }
--- 982,1004 ----
  	    count++;
  	    if (localPtr->refCount != -1) {
  		bytes = Tcl_GetStringFromObj(localPtr->objPtr, &length);
! 		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);
! 		Tcl_Panic("TclVerifyLocalLiteralTable: local literal \"%.*s\" is not global",
  		         (length>60? 60 : length), bytes);
  	    }
  	    if (localPtr->objPtr->bytes == NULL) {
! 		Tcl_Panic("TclVerifyLocalLiteralTable: literal has NULL string rep");
  	    }
  	}
      }
      if (count != localTablePtr->numEntries) {
! 	Tcl_Panic("TclVerifyLocalLiteralTable: local literal table had %d entries, should be %d",
  	      count, localTablePtr->numEntries);
      }
  }
***************
*** 1014,1020 ****
   *	None.
   *
   * Side effects:
!  *	Panics if problems are found.
   *
   *----------------------------------------------------------------------
   */
--- 1014,1020 ----
   *	None.
   *
   * Side effects:
!  *	Tcl_Panic if problems are found.
   *
   *----------------------------------------------------------------------
   */
***************
*** 1037,1053 ****
  	    count++;
  	    if (globalPtr->refCount < 1) {
  		bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
! 		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");
  	    }
  	}
      }
      if (count != globalTablePtr->numEntries) {
! 	panic("TclVerifyGlobalLiteralTable: global literal table had %d entries, should be %d",
  	      count, globalTablePtr->numEntries);
      }
  }
--- 1037,1053 ----
  	    count++;
  	    if (globalPtr->refCount < 1) {
  		bytes = Tcl_GetStringFromObj(globalPtr->objPtr, &length);
! 		Tcl_Panic("TclVerifyGlobalLiteralTable: global literal \"%.*s\" had bad refCount %d",
  		        (length>60? 60 : length), bytes,
  		        globalPtr->refCount);
  	    }
  	    if (globalPtr->objPtr->bytes == NULL) {
! 		Tcl_Panic("TclVerifyGlobalLiteralTable: literal has NULL string rep");
  	    }
  	}
      }
      if (count != globalTablePtr->numEntries) {
! 	Tcl_Panic("TclVerifyGlobalLiteralTable: global literal table had %d entries, should be %d",
  	      count, globalTablePtr->numEntries);
      }
  }

*** generic/tclNamesp.c	14 Oct 2003 15:44:52 -0000	1.34
--- generic/tclNamesp.c	24 Dec 2003 01:47:40 -0000
***************
*** 424,430 ****
      } else {
          nsPtr = (Namespace *) namespacePtr;
          if (nsPtr->flags & NS_DEAD) {
! 	    panic("Trying to push call frame for dead namespace");
  	    /*NOTREACHED*/
          }
      }
--- 424,430 ----
      } else {
          nsPtr = (Namespace *) namespacePtr;
          if (nsPtr->flags & NS_DEAD) {
! 	    Tcl_Panic("Trying to push call frame for dead namespace");
  	    /*NOTREACHED*/
          }
      }
***************
*** 1691,1697 ****
  	prevPtr = refPtr;
      }
  	
!     panic("DeleteImportedCmd: did not find cmd in real cmd's list of import references");
  }
  
  /*
--- 1691,1697 ----
  	prevPtr = refPtr;
      }
  	
!     Tcl_Panic("DeleteImportedCmd: did not find cmd in real cmd's list of import references");
  }
  
  /*
***************
*** 1955,1961 ****
                  Tcl_PopCallFrame(interp);
  
                  if (nsPtr == NULL) {
!                     panic("Could not create namespace '%s'", nsName);
                  }
              } else {		/* namespace not found and wasn't created */
                  nsPtr = NULL;
--- 1955,1961 ----
                  Tcl_PopCallFrame(interp);
  
                  if (nsPtr == NULL) {
!                     Tcl_Panic("Could not create namespace '%s'", nsName);
                  }
              } else {		/* namespace not found and wasn't created */
                  nsPtr = NULL;
***************
*** 4731,4737 ****
      }
  
      default:
! 	panic("unexpected ensemble command");
      }
      return TCL_OK;
  }
--- 4731,4737 ----
      }
  
      default:
! 	Tcl_Panic("unexpected ensemble command");
      }
      return TCL_OK;
  }
***************
*** 4894,4900 ****
  	}
  	hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, fullName);
  	if (hPtr == NULL) {
! 	    panic("full name %s not found in supposedly synchronized hash",
  		    fullName);
  	}
  	prefixObj = (Tcl_Obj *) Tcl_GetHashValue(hPtr);
--- 4894,4900 ----
  	}
  	hPtr = Tcl_FindHashEntry(&ensemblePtr->subcommandTable, fullName);
  	if (hPtr == NULL) {
! 	    Tcl_Panic("full name %s not found in supposedly synchronized hash",
  		    fullName);
  	}
  	prefixObj = (Tcl_Obj *) Tcl_GetHashValue(hPtr);

*** generic/tclObj.c	14 Oct 2003 15:44:53 -0000	1.52
--- generic/tclObj.c	24 Dec 2003 01:47:45 -0000
***************
*** 539,545 ****
          tablePtr = tsdPtr->objThreadMap;
          hPtr = Tcl_CreateHashEntry(tablePtr, (char *) objPtr, &new);
          if (!new) {
!             panic("expected to create new entry for object map");
          }
          Tcl_SetHashValue(hPtr, NULL);
      }
--- 539,545 ----
          tablePtr = tsdPtr->objThreadMap;
          hPtr = Tcl_CreateHashEntry(tablePtr, (char *) objPtr, &new);
          if (!new) {
!             Tcl_Panic("expected to create new entry for object map");
          }
          Tcl_SetHashValue(hPtr, NULL);
      }
***************
*** 743,749 ****
      
  #ifdef TCL_MEM_DEBUG
      if ((objPtr)->refCount < -1) {
! 	panic("Reference count for %lx was negative", objPtr);
      }
  #endif /* TCL_MEM_DEBUG */
  
--- 743,749 ----
      
  #ifdef TCL_MEM_DEBUG
      if ((objPtr)->refCount < -1) {
! 	Tcl_Panic("Reference count for %lx was negative", objPtr);
      }
  #endif /* TCL_MEM_DEBUG */
  
***************
*** 862,868 ****
      }
  
      if (objPtr->typePtr->updateStringProc == NULL) {
! 	panic("UpdateStringProc should not be invoked for type %s",
  		objPtr->typePtr->name);
      }
      (*objPtr->typePtr->updateStringProc)(objPtr);
--- 862,868 ----
      }
  
      if (objPtr->typePtr->updateStringProc == NULL) {
! 	Tcl_Panic("UpdateStringProc should not be invoked for type %s",
  		objPtr->typePtr->name);
      }
      (*objPtr->typePtr->updateStringProc)(objPtr);
***************
*** 902,908 ****
  {
      if (objPtr->bytes == NULL) {
  	if (objPtr->typePtr->updateStringProc == NULL) {
! 	    panic("UpdateStringProc should not be invoked for type %s",
  		    objPtr->typePtr->name);
  	}
  	(*objPtr->typePtr->updateStringProc)(objPtr);
--- 902,908 ----
  {
      if (objPtr->bytes == NULL) {
  	if (objPtr->typePtr->updateStringProc == NULL) {
! 	    Tcl_Panic("UpdateStringProc should not be invoked for type %s",
  		    objPtr->typePtr->name);
  	}
  	(*objPtr->typePtr->updateStringProc)(objPtr);
***************
*** 1081,1087 ****
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetBooleanObj called with shared object");
      }
      
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
--- 1081,1087 ----
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetBooleanObj called with shared object");
      }
      
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
***************
*** 1497,1503 ****
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetDoubleObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
--- 1497,1503 ----
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetDoubleObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
***************
*** 1760,1766 ****
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetIntObj called with shared object");
      }
      
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
--- 1760,1766 ----
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetIntObj called with shared object");
      }
      
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
***************
*** 2124,2130 ****
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetLongObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
--- 2124,2130 ----
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetLongObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
***************
*** 2487,2493 ****
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetWideIntObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
--- 2487,2493 ----
      register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetWideIntObj called with shared object");
      }
  
      if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
***************
*** 2573,2579 ****
      if (objPtr->refCount == 0x61616161) {
  	fprintf(stderr, "file = %s, line = %d\n", file, line);
  	fflush(stderr);
! 	panic("Trying to increment refCount of previously disposed object.");
      }
  # ifdef TCL_THREADS
      /*
--- 2573,2579 ----
      if (objPtr->refCount == 0x61616161) {
  	fprintf(stderr, "file = %s, line = %d\n", file, line);
  	fflush(stderr);
! 	Tcl_Panic("Trying to increment refCount of previously disposed object.");
      }
  # ifdef TCL_THREADS
      /*
***************
*** 2589,2599 ****
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             panic("%s%s",
                      "Trying to incr ref count of",
                      "Tcl_Obj allocated in another thread");
          }
--- 2589,2599 ----
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             Tcl_Panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             Tcl_Panic("%s%s",
                      "Trying to incr ref count of",
                      "Tcl_Obj allocated in another thread");
          }
***************
*** 2637,2643 ****
      if (objPtr->refCount == 0x61616161) {
  	fprintf(stderr, "file = %s, line = %d\n", file, line);
  	fflush(stderr);
! 	panic("Trying to decrement refCount of previously disposed object.");
      }
  # ifdef TCL_THREADS
      /*
--- 2637,2643 ----
      if (objPtr->refCount == 0x61616161) {
  	fprintf(stderr, "file = %s, line = %d\n", file, line);
  	fflush(stderr);
! 	Tcl_Panic("Trying to decrement refCount of previously disposed object.");
      }
  # ifdef TCL_THREADS
      /*
***************
*** 2653,2663 ****
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             panic("%s%s",
                      "Trying to decr ref count of",
                      "Tcl_Obj allocated in another thread");
          }
--- 2653,2663 ----
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             Tcl_Panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             Tcl_Panic("%s%s",
                      "Trying to decr ref count of",
                      "Tcl_Obj allocated in another thread");
          }
***************
*** 2707,2713 ****
      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.");
      }
  # ifdef TCL_THREADS
      /*
--- 2707,2713 ----
      if (objPtr->refCount == 0x61616161) {
  	fprintf(stderr, "file = %s, line = %d\n", file, line);
  	fflush(stderr);
! 	Tcl_Panic("Trying to check whether previously disposed object is shared.");
      }
  # ifdef TCL_THREADS
      /*
***************
*** 2723,2733 ****
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             panic("%s%s",
                      "Trying to check shared status of",
                      "Tcl_Obj allocated in another thread");
          }
--- 2723,2733 ----
          ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
          tablePtr = tsdPtr->objThreadMap;
          if (!tablePtr) {
!             Tcl_Panic("object table not initialized");
          }
          hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
          if (!hPtr) {
!             Tcl_Panic("%s%s",
                      "Trying to check shared status of",
                      "Tcl_Obj allocated in another thread");
          }

*** generic/tclParse.c	24 Nov 2003 19:06:08 -0000	1.31
--- generic/tclParse.c	24 Dec 2003 01:47:48 -0000
***************
*** 1002,1008 ****
  	    parsePtr->numTokens++;
  	    src++; numBytes--;
  	} else {
! 	    panic("ParseTokens encountered unknown character");
  	}
      }
      if (parsePtr->numTokens == originalTokens) {
--- 1002,1008 ----
  	    parsePtr->numTokens++;
  	    src++; numBytes--;
  	} else {
! 	    Tcl_Panic("ParseTokens encountered unknown character");
  	}
      }
      if (parsePtr->numTokens == originalTokens) {

*** generic/tclPathObj.c	17 Dec 2003 09:55:11 -0000	1.18
--- generic/tclPathObj.c	24 Dec 2003 01:47:51 -0000
***************
*** 2013,2019 ****
      Tcl_Obj *copy;
      
      if (PATHFLAGS(objPtr) == 0 || fsPathPtr->cwdPtr == NULL) {
! 	panic("Called UpdateStringOfFsPath with invalid object");
      }
      
      copy = Tcl_DuplicateObj(fsPathPtr->cwdPtr);
--- 2013,2019 ----
      Tcl_Obj *copy;
      
      if (PATHFLAGS(objPtr) == 0 || fsPathPtr->cwdPtr == NULL) {
! 	Tcl_Panic("Called UpdateStringOfFsPath with invalid object");
      }
      
      copy = Tcl_DuplicateObj(fsPathPtr->cwdPtr);

*** generic/tclPkg.c	22 Feb 2002 22:36:09 -0000	1.9
--- generic/tclPkg.c	24 Dec 2003 01:47:53 -0000
***************
*** 794,800 ****
  	    break;
  	}
  	default: {
! 	    panic("Tcl_PackageObjCmd: bad option index to pkgOptions");
  	}
      }
      return TCL_OK;
--- 794,800 ----
  	    break;
  	}
  	default: {
! 	    Tcl_Panic("Tcl_PackageObjCmd: bad option index to pkgOptions");
  	}
      }
      return TCL_OK;

*** generic/tclPreserve.c	16 Jul 2003 21:24:12 -0000	1.4
--- generic/tclPreserve.c	24 Dec 2003 01:47:55 -0000
***************
*** 251,257 ****
       * Reference not found.  This is a bug in the caller.
       */
  
!     panic("Tcl_Release couldn't find reference for 0x%x", clientData);
  }
  
  /*
--- 251,257 ----
       * Reference not found.  This is a bug in the caller.
       */
  
!     Tcl_Panic("Tcl_Release couldn't find reference for 0x%x", clientData);
  }
  
  /*
***************
*** 292,298 ****
  	    continue;
  	}
  	if (refPtr->mustFree) {
! 	    panic("Tcl_EventuallyFree called twice for 0x%x\n", clientData);
          }
          refPtr->mustFree = 1;
  	refPtr->freeProc = freeProc;
--- 292,298 ----
  	    continue;
  	}
  	if (refPtr->mustFree) {
! 	    Tcl_Panic("Tcl_EventuallyFree called twice for 0x%x\n", clientData);
          }
          refPtr->mustFree = 1;
  	refPtr->freeProc = freeProc;
***************
*** 387,396 ****
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	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",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif
--- 387,396 ----
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
      }
      if (handlePtr->ptr2 != handlePtr->ptr) {
! 	Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif
***************
*** 430,440 ****
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	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",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif
--- 430,440 ----
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
      }
      if ((handlePtr->ptr != NULL)
  	    && (handlePtr->ptr != handlePtr->ptr2)) {
! 	Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif
***************
*** 472,482 ****
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	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",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif
--- 472,482 ----
      handlePtr = (HandleStruct *) handle;
  #ifdef TCL_MEM_DEBUG
      if (handlePtr->refCount == 0x61616161) {
! 	Tcl_Panic("using previously disposed TclHandle %x", handlePtr);
      }
      if ((handlePtr->ptr != NULL)
  	    && (handlePtr->ptr != handlePtr->ptr2)) {
! 	Tcl_Panic("someone has changed the block referenced by the handle %x\nfrom %x to %x",
  		handlePtr, handlePtr->ptr2, handlePtr->ptr);
      }
  #endif

*** generic/tclProc.c	21 Oct 2003 20:42:05 -0000	1.48
--- generic/tclProc.c	24 Dec 2003 01:47:58 -0000
***************
*** 994,1005 ****
      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",
  		  localPtr->name);
  	    return TCL_ERROR;
  	}
  	if (TclIsVarTemporary(localPtr)) {
! 	    panic("TclObjInterpProc: local variable %d is temporary but should be an argument", i);
  	    return TCL_ERROR;
  	}
  
--- 994,1005 ----
      argCt = objc;
      for (i = 1, argCt -= 1;  i <= numArgs;  i++, argCt--) {
  	if (!TclIsVarArgument(localPtr)) {
! 	    Tcl_Panic("TclObjInterpProc: local variable %s is not argument but should be",
  		  localPtr->name);
  	    return TCL_ERROR;
  	}
  	if (TclIsVarTemporary(localPtr)) {
! 	    Tcl_Panic("TclObjInterpProc: local variable %d is temporary but should be an argument", i);
  	    return TCL_ERROR;
  	}
  
***************
*** 1623,1636 ****
   * ProcBodySetFromAny --
   *
   *  Tcl_ObjType's SetFromAny function for the proc body object.
!  *  Calls 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).
   *
   *----------------------------------------------------------------------
   */
--- 1623,1636 ----
   * ProcBodySetFromAny --
   *
   *  Tcl_ObjType's SetFromAny function for the proc body object.
!  *  Calls Tcl_Panic.
   *
   * Results:
   *  Theoretically returns a TCL result code.
   *
   * Side effects:
!  *  Calls Tcl_Panic, since we can't set the value of the object from a
!  *  string representation (or any other internal ones).
   *
   *----------------------------------------------------------------------
   */
***************
*** 1640,1646 ****
      Tcl_Interp *interp;			/* current interpreter */
      Tcl_Obj *objPtr;			/* object pointer */
  {
!     panic("called ProcBodySetFromAny");
  
      /*
       * this to keep compilers happy.
--- 1640,1646 ----
      Tcl_Interp *interp;			/* current interpreter */
      Tcl_Obj *objPtr;			/* object pointer */
  {
!     Tcl_Panic("called ProcBodySetFromAny");
  
      /*
       * this to keep compilers happy.
***************
*** 1655,1667 ****
   * ProcBodyUpdateString --
   *
   *  Tcl_ObjType's UpdateString function for the proc body object.
!  *  Calls panic.
   *
   * Results:
   *  None.
   *
   * Side effects:
!  *  Calls panic, since we this type has no string representation.
   *
   *----------------------------------------------------------------------
   */
--- 1655,1667 ----
   * ProcBodyUpdateString --
   *
   *  Tcl_ObjType's UpdateString function for the proc body object.
!  *  Calls Tcl_Panic.
   *
   * Results:
   *  None.
   *
   * Side effects:
!  *  Calls Tcl_Panic, since we this type has no string representation.
   *
   *----------------------------------------------------------------------
   */
***************
*** 1670,1676 ****
  ProcBodyUpdateString(objPtr)
      Tcl_Obj *objPtr;		/* the object to update */
  {
!     panic("called ProcBodyUpdateString");
  }
  
  
--- 1670,1676 ----
  ProcBodyUpdateString(objPtr)
      Tcl_Obj *objPtr;		/* the object to update */
  {
!     Tcl_Panic("called ProcBodyUpdateString");
  }
  
  

*** generic/tclStringObj.c	14 Oct 2003 15:44:53 -0000	1.33
--- generic/tclStringObj.c	24 Dec 2003 01:48:00 -0000
***************
*** 707,713 ****
       */
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetStringObj called with shared object");
      }
  
      /*
--- 707,713 ----
       */
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetStringObj called with shared object");
      }
  
      /*
***************
*** 761,767 ****
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_SetObjLength called with shared object");
      }
      SetStringFromAny(NULL, objPtr);
      
--- 761,767 ----
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_SetObjLength called with shared object");
      }
      SetStringFromAny(NULL, objPtr);
      
***************
*** 856,862 ****
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_AttemptSetObjLength called with shared object");
      }
      SetStringFromAny(NULL, objPtr);
          
--- 856,862 ----
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_AttemptSetObjLength called with shared object");
      }
      SetStringFromAny(NULL, objPtr);
          
***************
*** 1024,1030 ****
      int toCopy = 0;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("TclAppendLimitedToObj called with shared object");
      }
  
      SetStringFromAny(NULL, objPtr);
--- 1024,1030 ----
      int toCopy = 0;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("TclAppendLimitedToObj called with shared object");
      }
  
      SetStringFromAny(NULL, objPtr);
***************
*** 1127,1133 ****
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_AppendUnicodeToObj called with shared object");
      }
  
      if (length == 0) {
--- 1127,1133 ----
      String *stringPtr;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_AppendUnicodeToObj called with shared object");
      }
  
      if (length == 0) {
***************
*** 1504,1510 ****
      int nargs, i;
  
      if (Tcl_IsShared(objPtr)) {
! 	panic("Tcl_AppendStringsToObj called with shared object");
      }
  
      SetStringFromAny(NULL, objPtr);
--- 1504,1510 ----
      int nargs, i;
  
      if (Tcl_IsShared(objPtr)) {
! 	Tcl_Panic("Tcl_AppendStringsToObj called with shared object");
      }
  
      SetStringFromAny(NULL, objPtr);

*** generic/tclTest.c	16 Nov 2003 00:49:20 -0000	1.73
--- generic/tclTest.c	24 Dec 2003 01:48:05 -0000
***************
*** 4010,4016 ****
       */
  
      argString = Tcl_Merge(argc-1, argv+1);
!     panic(argString);
      ckfree((char *)argString);
   
      return TCL_OK;
--- 4010,4016 ----
       */
  
      argString = Tcl_Merge(argc-1, argv+1);
!     Tcl_Panic(argString);
      ckfree((char *)argString);
   
      return TCL_OK;
***************
*** 5767,5773 ****
                  /* Empty loop body. */
              }
              if (prevEsPtr == (EventScriptRecord *) NULL) {
!                 panic("TestChannelEventCmd: damaged event script list");
              }
              prevEsPtr->nextPtr = esPtr->nextPtr;
          }
--- 5767,5773 ----
                  /* Empty loop body. */
              }
              if (prevEsPtr == (EventScriptRecord *) NULL) {
!                 Tcl_Panic("TestChannelEventCmd: damaged event script list");
              }
              prevEsPtr->nextPtr = esPtr->nextPtr;
          }

*** generic/tclThreadAlloc.c	16 Dec 2003 11:34:45 -0000	1.7
--- generic/tclThreadAlloc.c	24 Dec 2003 01:48:08 -0000
***************
*** 209,215 ****
      if (cachePtr == NULL) {
      	cachePtr = calloc(1, sizeof(Cache));
      	if (cachePtr == NULL) {
! 	    panic("alloc: could not allocate new cache");
      	}
      	Tcl_MutexLock(listLockPtr);
      	cachePtr->nextPtr = firstCachePtr;
--- 209,215 ----
      if (cachePtr == NULL) {
      	cachePtr = calloc(1, sizeof(Cache));
      	if (cachePtr == NULL) {
! 	    Tcl_Panic("alloc: could not allocate new cache");
      	}
      	Tcl_MutexLock(listLockPtr);
      	cachePtr->nextPtr = firstCachePtr;
***************
*** 535,541 ****
  	    cachePtr->nobjs = nmove = NOBJALLOC;
  	    newObjsPtr = malloc(sizeof(Tcl_Obj) * nmove);
  	    if (newObjsPtr == NULL) {
! 		panic("alloc: could not allocate %d new objects", nmove);
  	    }
  	    while (--nmove >= 0) {
  		objPtr = &newObjsPtr[nmove];
--- 535,541 ----
  	    cachePtr->nobjs = nmove = NOBJALLOC;
  	    newObjsPtr = malloc(sizeof(Tcl_Obj) * nmove);
  	    if (newObjsPtr == NULL) {
! 		Tcl_Panic("alloc: could not allocate %d new objects", nmove);
  	    }
  	    while (--nmove >= 0) {
  		objPtr = &newObjsPtr[nmove];
***************
*** 742,748 ****
  	|| ((unsigned char *) ptr)[blockPtr->b_reqsize] != MAGIC
  #endif
  	|| blockPtr->b_magic2 != MAGIC) {
! 	panic("alloc: invalid block: %p: %x %x %x\n",
  	    blockPtr, blockPtr->b_magic1, blockPtr->b_magic2,
  	    ((unsigned char *) ptr)[blockPtr->b_reqsize]);
      }
--- 742,748 ----
  	|| ((unsigned char *) ptr)[blockPtr->b_reqsize] != MAGIC
  #endif
  	|| blockPtr->b_magic2 != MAGIC) {
! 	Tcl_Panic("alloc: invalid block: %p: %x %x %x\n",
  	    blockPtr, blockPtr->b_magic1, blockPtr->b_magic2,
  	    ((unsigned char *) ptr)[blockPtr->b_reqsize]);
      }

*** generic/tclTimer.c	1 Mar 2002 06:22:31 -0000	1.6
--- generic/tclTimer.c	24 Dec 2003 01:48:10 -0000
***************
*** 936,942 ****
  	    break;
  	}
  	default: {
! 	    panic("Tcl_AfterObjCmd: bad subcommand index to afterSubCmds");
  	}
      }
      return TCL_OK;
--- 936,942 ----
  	    break;
  	}
  	default: {
! 	    Tcl_Panic("Tcl_AfterObjCmd: bad subcommand index to afterSubCmds");
  	}
      }
      return TCL_OK;

*** generic/tclTrace.c	3 Oct 2003 20:42:06 -0000	1.6
--- generic/tclTrace.c	24 Dec 2003 01:48:14 -0000
***************
*** 1810,1816 ****
  		    Tcl_DStringAppendElement(&cmd, "leavestep");
  		}
  	    } else {
! 		panic("TraceExecutionProc: bad flag combination");
  	    }
  	    
  	    /*
--- 1810,1816 ----
  		    Tcl_DStringAppendElement(&cmd, "leavestep");
  		}
  	    } else {
! 		Tcl_Panic("TraceExecutionProc: bad flag combination");
  	    }
  	    
  	    /*
***************
*** 2985,2995 ****
  
      /*
       * Check for a nonsense flag combination.  Note that this is a
!      * 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");
      }
  
      /*
--- 2985,2995 ----
  
      /*
       * Check for a nonsense flag combination.  Note that this is a
!      * 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)) {
! 	Tcl_Panic("bad result flag combination");
      }
  
      /*

*** generic/tclVar.c	20 Nov 2003 18:37:55 -0000	1.76
--- generic/tclVar.c	24 Dec 2003 01:48:19 -0000
***************
*** 3345,3351 ****
  
      if (index >= 0) {
  	if (!varFramePtr->isProcCallFrame) {
! 	    panic("ObjMakeUpvar called with an index outside from a proc.\n");
  	}
  	varPtr = &(varFramePtr->compiledLocals[index]);
      } else {
--- 3345,3351 ----
  
      if (index >= 0) {
  	if (!varFramePtr->isProcCallFrame) {
! 	    Tcl_Panic("ObjMakeUpvar called with an index outside from a proc.\n");
  	}
  	varPtr = &(varFramePtr->compiledLocals[index]);
      } else {
***************
*** 4686,4692 ****
  	 * This is a parsed scalar name: what is it
  	 * doing here?
  	 */
! 	panic("ERROR: scalar parsedVarName without a string rep.\n");
      }
      part1 = Tcl_GetStringFromObj(arrayPtr, &len1);
      len2 = strlen(part2);
--- 4686,4692 ----
  	 * This is a parsed scalar name: what is it
  	 * doing here?
  	 */
! 	Tcl_Panic("ERROR: scalar parsedVarName without a string rep.\n");
      }
      part1 = Tcl_GetStringFromObj(arrayPtr, &len1);
      len2 = strlen(part2);

*** mac/tclMacChan.c	3 Mar 2003 20:22:42 -0000	1.21
--- mac/tclMacChan.c	24 Dec 2003 01:48:22 -0000
***************
*** 434,440 ****
  	} else if (fd == 2) {
  	    tsdPtr->stderrChannel = NULL;
  	} else {
! 	    panic("recieved invalid std file");
  	}
      
  	if (close(fd) < 0) {
--- 434,440 ----
  	} else if (fd == 2) {
  	    tsdPtr->stderrChannel = NULL;
  	} else {
! 	    Tcl_Panic("recieved invalid std file");
  	}
      
  	if (close(fd) < 0) {
***************
*** 696,702 ****
  	    bufMode = "none";
  	    break;
  	default:
! 	    panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
--- 696,702 ----
  	    bufMode = "none";
  	    break;
  	default:
! 	    Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
***************
*** 987,993 ****
      FlushVol(NULL, fileState->volumeRef);
      if (err != noErr) {
  	errorCode = errno = TclMacOSErrorToPosixError(err);
! 	panic("error during file close");
      }
  
      ckfree((char *) fileState);
--- 987,993 ----
      FlushVol(NULL, fileState->volumeRef);
      if (err != noErr) {
  	errorCode = errno = TclMacOSErrorToPosixError(err);
! 	Tcl_Panic("error during file close");
      }
  
      ckfree((char *) fileState);
***************
*** 1258,1266 ****
       * local data in each thread.
       */
  
!     if (!removed)
!         panic("file info ptr not on thread channel list");
! 
  }
  
  /*
--- 1258,1266 ----
       * local data in each thread.
       */
  
!     if (!removed) {
!         Tcl_Panic("file info ptr not on thread channel list");
!     }
  }
  
  /*

*** mac/tclMacOSA.c	9 Oct 2002 11:54:30 -0000	1.10
--- mac/tclMacOSA.c	24 Dec 2003 01:48:25 -0000
***************
*** 222,228 ****
      LanguagesTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
  	
      if (LanguagesTable == NULL) {
! 	panic("Memory Error Allocating Languages Hash Table");
      }
  	
      Tcl_SetAssocData(interp, "OSAScript_LangTable", NULL, LanguagesTable);
--- 222,228 ----
      LanguagesTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
  	
      if (LanguagesTable == NULL) {
! 	Tcl_Panic("Memory Error Allocating Languages Hash Table");
      }
  	
      Tcl_SetAssocData(interp, "OSAScript_LangTable", NULL, LanguagesTable);
***************
*** 300,306 ****
      ComponentTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
  	
      if (ComponentTable == NULL) {
! 	panic("Memory Error Allocating Hash Table");
      }
  	
      Tcl_SetAssocData(interp, "OSAScript_CompTable", NULL, ComponentTable);
--- 300,306 ----
      ComponentTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
  	
      if (ComponentTable == NULL) {
! 	Tcl_Panic("Memory Error Allocating Hash Table");
      }
  	
      Tcl_SetAssocData(interp, "OSAScript_CompTable", NULL, ComponentTable);
***************
*** 1860,1866 ****
  		"OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
  	
      if (ComponentTable == NULL) {
! 	panic("Error, could not get the Component Table from the Associated data.");
      }
  	
      hashEntry = Tcl_FindHashEntry(ComponentTable, theComponent->theName);
--- 1860,1866 ----
  		"OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
  	
      if (ComponentTable == NULL) {
! 	Tcl_Panic("Error, could not get the Component Table from the Associated data.");
      }
  	
      hashEntry = Tcl_FindHashEntry(ComponentTable, theComponent->theName);

*** mac/tclMacResource.c	23 Oct 2003 10:07:09 -0000	1.19
--- mac/tclMacResource.c	24 Dec 2003 01:48:28 -0000
***************
*** 547,553 ****
  			macPermision = fsRdWrShPerm;
  			break;
  		    default:
! 			panic("Tcl_ResourceObjCmd: invalid mode value");
  		    break;
  		}
  	    } else {
--- 547,553 ----
  			macPermision = fsRdWrShPerm;
  			break;
  		    default:
! 			Tcl_Panic("Tcl_ResourceObjCmd: invalid mode value");
  		    break;
  		}
  	    } else {
***************
*** 791,797 ****
  	        if (resource == NULL) {
  	            resource = NewHandleSys(length);
  	            if (resource == NULL) {
! 	                panic("could not allocate memory to write resource");
  	            }
  	        }
  	        HLock(resource);
--- 791,797 ----
  	        if (resource == NULL) {
  	            resource = NewHandleSys(length);
  	            if (resource == NULL) {
! 	                Tcl_Panic("could not allocate memory to write resource");
  	            }
  	        }
  	        HLock(resource);
***************
*** 862,868 ****
                       
                      SetHandleSize(resource, length);
                      if ( MemError() != noErr ) {
!                         panic("could not allocate memory to write resource");
                      }
  
                      HLock(resource);
--- 862,868 ----
                       
                      SetHandleSize(resource, length);
                      if ( MemError() != noErr ) {
!                         Tcl_Panic("could not allocate memory to write resource");
                      }
  
                      HLock(resource);
***************
*** 916,922 ****
  
  	    return result;
  	default:
! 	    panic("Tcl_GetIndexFromObj returned unrecognized option");
  	    return TCL_ERROR;	/* Should never be reached. */
      }
  }
--- 916,922 ----
  
  	    return result;
  	default:
! 	    Tcl_Panic("Tcl_GetIndexFromObj returned unrecognized option");
  	    return TCL_ERROR;	/* Should never be reached. */
      }
  }
***************
*** 2042,2048 ****
  
      nameHashPtr = Tcl_CreateHashEntry(&nameTable, resourceId, &new);
      if (!new) {
! 	panic("resource id has repeated itself");
      }
      
      resourceRef = (OpenResourceFork *) ckalloc(sizeof(OpenResourceFork));
--- 2042,2048 ----
  
      nameHashPtr = Tcl_CreateHashEntry(&nameTable, resourceId, &new);
      if (!new) {
! 	Tcl_Panic("resource id has repeated itself");
      }
      
      resourceRef = (OpenResourceFork *) ckalloc(sizeof(OpenResourceFork));
***************
*** 2145,2151 ****
  	}
      }
      if (!match) {
!         panic("the resource Fork List is out of synch!");
      }
      
      Tcl_ListObjReplace(NULL, resourceForkList, index, 1, 0, NULL);
--- 2145,2151 ----
  	}
      }
      if (!match) {
! 	Tcl_Panic("the resource Fork List is out of synch!");
      }
      
      Tcl_ListObjReplace(NULL, resourceForkList, index, 1, 0, NULL);
***************
*** 2153,2159 ****
      resourceHashPtr = Tcl_FindHashEntry(&resourceTable, (char *) fileRef);
      
      if (resourceHashPtr == NULL) {
! 	panic("Resource & Name tables are out of synch in resource command.");
      }
      ckfree(Tcl_GetHashValue(resourceHashPtr));
      Tcl_DeleteHashEntry(resourceHashPtr);
--- 2153,2159 ----
      resourceHashPtr = Tcl_FindHashEntry(&resourceTable, (char *) fileRef);
      
      if (resourceHashPtr == NULL) {
! 	Tcl_Panic("Resource & Name tables are out of synch in resource command.");
      }
      ckfree(Tcl_GetHashValue(resourceHashPtr));
      Tcl_DeleteHashEntry(resourceHashPtr);

*** mac/tclMacSock.c	22 Apr 2003 23:20:43 -0000	1.15
--- mac/tclMacSock.c	24 Dec 2003 01:48:31 -0000
***************
*** 737,743 ****
      	if (err != noErr) {
      	    Debugger();
      	    goto afterRelease;
!             /* panic("error closing server socket"); */
      	}
  	statePtr->flags |= TCP_RELEASE;
  
--- 737,743 ----
      	if (err != noErr) {
      	    Debugger();
      	    goto afterRelease;
!             /* Tcl_Panic("error closing server socket"); */
      	}
  	statePtr->flags |= TCP_RELEASE;
  
***************
*** 750,756 ****
  	statePtr->pb.tcpStream = statePtr->tcpStream;
  	err = PBControlSync((ParmBlkPtr) &statePtr->pb);
  	if (err != noErr) {
!             panic("error releasing server socket");
  	}
  
  	/*
--- 750,756 ----
  	statePtr->pb.tcpStream = statePtr->tcpStream;
  	err = PBControlSync((ParmBlkPtr) &statePtr->pb);
  	if (err != noErr) {
!             Tcl_Panic("error releasing server socket");
  	}
  
  	/*
***************
*** 2839,2845 ****
       */
  
      if (!removed)
!         panic("file info ptr not on thread channel list");
      return;
  }
  
--- 2839,2845 ----
       */
  
      if (!removed)
!         Tcl_Panic("file info ptr not on thread channel list");
      return;
  }
  

*** mac/tclMacThrd.c	13 May 2003 10:16:17 -0000	1.7
--- mac/tclMacThrd.c	24 Dec 2003 01:48:33 -0000
***************
*** 710,716 ****
      if ((int) keyVal <= 0)  {
          return NULL;
      } else if ((int) keyVal > keyCounter) {
!         panic("illegal data key value");
      }
      
      GetCurrentThread(&curThread);
--- 710,716 ----
      if ((int) keyVal <= 0)  {
          return NULL;
      } else if ((int) keyVal > keyCounter) {
!         Tcl_Panic("illegal data key value");
      }
      
      GetCurrentThread(&curThread);
***************
*** 755,761 ****
      if ((int) keyVal <= 0)  {
          return NULL;
      } else if ((int) keyVal > keyCounter) {
!         panic("illegal data key value");
      }
      
      GetCurrentThread(&curThread);
--- 755,761 ----
      if ((int) keyVal <= 0)  {
          return NULL;
      } else if ((int) keyVal > keyCounter) {
!         Tcl_Panic("illegal data key value");
      }
      
      GetCurrentThread(&curThread);

*** unix/tclUnixChan.c	18 Nov 2003 23:13:33 -0000	1.44
--- unix/tclUnixChan.c	24 Dec 2003 01:48:37 -0000
***************
*** 1777,1783 ****
  	    /*
  	     * This may occurr if modeString was "", for example.
  	     */
! 	    panic("TclpOpenFileChannel: invalid mode value");
  	    return NULL;
      }
  
--- 1777,1783 ----
  	    /*
  	     * This may occurr if modeString was "", for example.
  	     */
! 	    Tcl_Panic("TclpOpenFileChannel: invalid mode value");
  	    return NULL;
      }
  
***************
*** 3002,3008 ****
  	    bufMode = "none";
  	    break;
  	default:
! 	    panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
--- 3002,3008 ----
  	    bufMode = "none";
  	    break;
  	default:
! 	    Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
***************
*** 3194,3200 ****
       */
  
      if (fd >= FD_SETSIZE) {
! 	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));
--- 3194,3200 ----
       */
  
      if (fd >= FD_SETSIZE) {
! 	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,3330 ****
       * local data in each thread.
       */
  
!     if (!removed)
!         panic("file info ptr not on thread channel list");
  
  #endif /* DEPRECATED */
  }
--- 3323,3331 ----
       * local data in each thread.
       */
  
!     if (!removed) {
!         Tcl_Panic("file info ptr not on thread channel list");
!     }
  
  #endif /* DEPRECATED */
  }

*** unix/tclUnixNotfy.c	16 Jul 2003 22:10:37 -0000	1.13
--- unix/tclUnixNotfy.c	24 Dec 2003 01:48:39 -0000
***************
*** 210,216 ****
      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");
  	}
      }
      notifierCount++;
--- 210,216 ----
      if (notifierCount == 0) {
  	if (Tcl_CreateThread(&notifierThread, NotifierThreadProc, NULL,
  		     TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) {
! 	    Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread");
  	}
      }
      notifierCount++;
***************
*** 263,269 ****
  
      if (notifierCount == 0) {
  	if (triggerPipe < 0) {
! 	    panic("Tcl_FinalizeNotifier: notifier pipe not initialized");
  	}
  
          /*
--- 263,269 ----
  
      if (notifierCount == 0) {
  	if (triggerPipe < 0) {
! 	    Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized");
  	}
  
          /*
***************
*** 869,875 ****
      char buf[2];
  
      if (pipe(fds) != 0) {
! 	panic("NotifierThreadProc: could not create trigger pipe.");
      }
  
      receivePipe = fds[0];
--- 869,875 ----
      char buf[2];
  
      if (pipe(fds) != 0) {
! 	Tcl_Panic("NotifierThreadProc: could not create trigger pipe.");
      }
  
      receivePipe = fds[0];
***************
*** 878,896 ****
      status = fcntl(receivePipe, F_GETFL);
      status |= O_NONBLOCK;
      if (fcntl(receivePipe, F_SETFL, status) < 0) {
! 	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.");
      }
  #else
      if (ioctl(receivePipe, (int) FIONBIO, &status) < 0) {
! 	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.");
      }
  #endif
  
--- 878,896 ----
      status = fcntl(receivePipe, F_GETFL);
      status |= O_NONBLOCK;
      if (fcntl(receivePipe, F_SETFL, status) < 0) {
! 	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) {
! 	Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking.");
      }
  #else
      if (ioctl(receivePipe, (int) FIONBIO, &status) < 0) {
! 	Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking.");
      }
      if (ioctl(fds[1], (int) FIONBIO, &status) < 0) {
! 	Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking.");
      }
  #endif
  

*** unix/tclUnixThrd.c	13 May 2003 10:16:17 -0000	1.25
--- unix/tclUnixThrd.c	24 Dec 2003 01:48:42 -0000
***************
*** 916,922 ****
  
      lockPtr = malloc(sizeof(struct lock));
      if (lockPtr == NULL) {
! 	panic("could not allocate lock");
      }
      lockPtr->tlock = (Tcl_Mutex) &lockPtr->plock;
      pthread_mutex_init(&lockPtr->plock, NULL);
--- 916,922 ----
  
      lockPtr = malloc(sizeof(struct lock));
      if (lockPtr == NULL) {
! 	Tcl_Panic("could not allocate lock");
      }
      lockPtr->tlock = (Tcl_Mutex) &lockPtr->plock;
      pthread_mutex_init(&lockPtr->plock, NULL);

*** unix/tclXtNotify.c	2 Jul 1999 06:05:34 -0000	1.4
--- unix/tclXtNotify.c	24 Dec 2003 01:48:44 -0000
***************
*** 135,141 ****
               * after initialization, so we panic.
               */
          
!             panic("TclSetAppContext:  multiple application contexts");
  
          }
      } else {
--- 135,141 ----
               * after initialization, so we panic.
               */
          
!             Tcl_Panic("TclSetAppContext:  multiple application contexts");
  
          }
      } else {

*** win/tclWin32Dll.c	21 Dec 2003 21:58:43 -0000	1.29
--- win/tclWin32Dll.c	24 Dec 2003 01:48:46 -0000
***************
*** 325,331 ****
       */
  
      if (platformId == VER_PLATFORM_WIN32s) {
! 	panic("Win32s is not a supported platform");	
      }
  
      tclWinProcs = &asciiProcs;
--- 325,331 ----
       */
  
      if (platformId == VER_PLATFORM_WIN32s) {
! 	Tcl_Panic("Win32s is not a supported platform");	
      }
  
      tclWinProcs = &asciiProcs;
***************
*** 473,483 ****
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}
--- 473,483 ----
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         Tcl_Panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         Tcl_Panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         Tcl_Panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}

*** win/tclWinChan.c	13 Dec 2003 03:11:02 -0000	1.32
--- win/tclWinChan.c	24 Dec 2003 01:48:49 -0000
***************
*** 779,785 ****
  	    channelPermissions = (TCL_READABLE | TCL_WRITABLE);
  	    break;
  	default:
! 	    panic("TclpOpenFileChannel: invalid mode value");
  	    break;
      }
  
--- 779,785 ----
  	    channelPermissions = (TCL_READABLE | TCL_WRITABLE);
  	    break;
  	default:
! 	    Tcl_Panic("TclpOpenFileChannel: invalid mode value");
  	    break;
      }
  
***************
*** 1093,1103 ****
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  
          if (result)
--- 1093,1103 ----
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         Tcl_Panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         Tcl_Panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         Tcl_Panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  
          if (result)
***************
*** 1189,1195 ****
  	    bufMode = "none";
  	    break;
  	default:
! 	    panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
--- 1189,1195 ----
  	    bufMode = "none";
  	    break;
  	default:
! 	    Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type");
  	    break;
      }
  
***************
*** 1388,1396 ****
       * local data in each thread.
       */
  
!     if (!removed)
!         panic("file info ptr not on thread channel list");
! 
  }
  
  /*
--- 1388,1396 ----
       * local data in each thread.
       */
  
!     if (!removed) {
!         Tcl_Panic("file info ptr not on thread channel list");
!     }
  }
  
  /*

*** win/tclWinFCmd.c	17 Dec 2003 17:47:28 -0000	1.38
--- win/tclWinFCmd.c	24 Dec 2003 01:48:52 -0000
***************
*** 238,248 ****
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}
--- 238,248 ----
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         Tcl_Panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         Tcl_Panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         Tcl_Panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}
***************
*** 600,610 ****
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}
--- 600,610 ----
                "=r"(RESTORED_HANDLER) );
  
      if (INITIAL_ESP != RESTORED_ESP)
!         Tcl_Panic("ESP restored incorrectly");
      if (INITIAL_EBP != RESTORED_EBP)
!         Tcl_Panic("EBP restored incorrectly");
      if (INITIAL_HANDLER != RESTORED_HANDLER)
!         Tcl_Panic("HANDLER restored incorrectly");
  # endif /* TCL_MEM_DEBUG */
  #else
      } __except (EXCEPTION_EXECUTE_HANDLER) {}

*** win/tclWinNotify.c	21 Mar 2003 03:23:24 -0000	1.12
--- win/tclWinNotify.c	24 Dec 2003 01:48:54 -0000
***************
*** 107,113 ****
  	class.hCursor = NULL;
  
  	if (!RegisterClassA(&class)) {
! 	    panic("Unable to register TclNotifier window class");
  	}
      }
      notifierCount++;
--- 107,113 ----
  	class.hCursor = NULL;
  
  	if (!RegisterClassA(&class)) {
! 	    Tcl_Panic("Unable to register TclNotifier window class");
  	}
      }
      notifierCount++;

*** win/tclWinPipe.c	21 Oct 2003 23:25:47 -0000	1.38
--- win/tclWinPipe.c	24 Dec 2003 01:48:57 -0000
***************
*** 874,880 ****
  	    break;
  
  	default:
! 	    panic("TclpCloseFile: unexpected file type");
      }
  
      ckfree((char *) filePtr);
--- 874,880 ----
  	    break;
  
  	default:
! 	    Tcl_Panic("TclpCloseFile: unexpected file type");
      }
  
      ckfree((char *) filePtr);
***************
*** 1215,1231 ****
  		    if (*end == '/')
  		        break;
  		}
! 		if (*end != '/')
! 		    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");
  		fileExists = (Tcl_FSAccess(pipeDllPtr, F_OK) == 0);
  		if (!fileExists) {
! 		    panic("Tcl pipe dll \"%s\" not found",
  		        Tcl_DStringValue(&pipeDll));
  		}
  		Tcl_DStringAppend(&cmdLine, Tcl_DStringValue(&pipeDll), -1);
--- 1215,1233 ----
  		    if (*end == '/')
  		        break;
  		}
! 		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) {
! 		    Tcl_Panic("Tcl_FSConvertToPathType failed");
! 		}
  		fileExists = (Tcl_FSAccess(pipeDllPtr, F_OK) == 0);
  		if (!fileExists) {
! 		    Tcl_Panic("Tcl pipe dll \"%s\" not found",
  		        Tcl_DStringValue(&pipeDll));
  		}
  		Tcl_DStringAppend(&cmdLine, Tcl_DStringValue(&pipeDll), -1);

*** win/tclWinSock.c	12 Dec 2003 00:59:09 -0000	1.40
--- win/tclWinSock.c	24 Dec 2003 01:49:00 -0000
***************
*** 2726,2732 ****
       */
  
      if (!removed) {
!         panic("file info ptr not on thread channel list");
      }
  
      /*
--- 2726,2732 ----
       */
  
      if (!removed) {
!         Tcl_Panic("file info ptr not on thread channel list");
      }
  
      /*

*** win/tclWinThrd.c	13 May 2003 10:16:17 -0000	1.26
--- win/tclWinThrd.c	24 Dec 2003 01:49:03 -0000
***************
*** 548,554 ****
          if (newKey != TLS_OUT_OF_INDEXES) {
              *indexPtr = newKey;
          } else {
!             panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */
          }
  	*keyPtr = (Tcl_ThreadDataKey)indexPtr;
  	TclRememberDataKey(keyPtr);
--- 548,554 ----
          if (newKey != TLS_OUT_OF_INDEXES) {
              *indexPtr = newKey;
          } else {
!             Tcl_Panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */
          }
  	*keyPtr = (Tcl_ThreadDataKey)indexPtr;
  	TclRememberDataKey(keyPtr);
***************
*** 585,591 ****
      } else {
          result = TlsGetValue(*indexPtr);
          if ((result == NULL) && (GetLastError() != NO_ERROR)) {
!             panic("TlsGetValue failed from TclpThreadDataKeyGet!");
          }
  	return result;
      }
--- 585,591 ----
      } else {
          result = TlsGetValue(*indexPtr);
          if ((result == NULL) && (GetLastError() != NO_ERROR)) {
!             Tcl_Panic("TlsGetValue failed from TclpThreadDataKeyGet!");
          }
  	return result;
      }
***************
*** 618,624 ****
      BOOL success;
      success = TlsSetValue(*indexPtr, (void *)data);
      if (!success) {
!         panic("TlsSetValue failed from TclpThreadDataKeySet!");
      }
  }
  
--- 618,624 ----
      BOOL success;
      success = TlsSetValue(*indexPtr, (void *)data);
      if (!success) {
!         Tcl_Panic("TlsSetValue failed from TclpThreadDataKeySet!");
      }
  }
  
***************
*** 657,667 ****
  	    ckfree((char *)result);
  	    success = TlsSetValue(*indexPtr, (void *)NULL);
              if (!success) {
!                 panic("TlsSetValue failed from TclpFinalizeThreadData!");
              }
  	} else {
              if (GetLastError() != NO_ERROR) {
!                 panic("TlsGetValue failed from TclpFinalizeThreadData!");
              }
  	}
      }
--- 657,667 ----
  	    ckfree((char *)result);
  	    success = TlsSetValue(*indexPtr, (void *)NULL);
              if (!success) {
!                 Tcl_Panic("TlsSetValue failed from TclpFinalizeThreadData!");
              }
  	} else {
              if (GetLastError() != NO_ERROR) {
!                 Tcl_Panic("TlsGetValue failed from TclpFinalizeThreadData!");
              }
  	}
      }
***************
*** 697,703 ****
  	indexPtr = *(DWORD **)keyPtr;
  	success = TlsFree(*indexPtr);
          if (!success) {
!             panic("TlsFree failed from TclpFinalizeThreadDataKey!");
          }
  	ckfree((char *)indexPtr);
  	*keyPtr = NULL;
--- 697,703 ----
  	indexPtr = *(DWORD **)keyPtr;
  	success = TlsFree(*indexPtr);
          if (!success) {
!             Tcl_Panic("TlsFree failed from TclpFinalizeThreadDataKey!");
          }
  	ckfree((char *)indexPtr);
  	*keyPtr = NULL;
***************
*** 1017,1023 ****
  
      lockPtr = malloc(sizeof(struct lock));
      if (lockPtr == NULL) {
! 	panic("could not allocate lock");
      }
      lockPtr->tlock = (Tcl_Mutex) &lockPtr->wlock;
      InitializeCriticalSection(&lockPtr->wlock);
--- 1017,1023 ----
  
      lockPtr = malloc(sizeof(struct lock));
      if (lockPtr == NULL) {
! 	Tcl_Panic("could not allocate lock");
      }
      lockPtr->tlock = (Tcl_Mutex) &lockPtr->wlock;
      InitializeCriticalSection(&lockPtr->wlock);
***************
*** 1039,1051 ****
      	key = TlsAlloc();
  	once = 1;
  	if (key == TLS_OUT_OF_INDEXES) {
! 	    panic("could not allocate thread local storage");
  	}
      }
  
      result = TlsGetValue(key);
      if ((result == NULL) && (GetLastError() != NO_ERROR)) {
!         panic("TlsGetValue failed from TclpGetAllocCache!");
      }
      return result;
  }
--- 1039,1051 ----
      	key = TlsAlloc();
  	once = 1;
  	if (key == TLS_OUT_OF_INDEXES) {
! 	    Tcl_Panic("could not allocate thread local storage");
  	}
      }
  
      result = TlsGetValue(key);
      if ((result == NULL) && (GetLastError() != NO_ERROR)) {
!         Tcl_Panic("TlsGetValue failed from TclpGetAllocCache!");
      }
      return result;
  }
***************
*** 1056,1062 ****
      BOOL success;
      success = TlsSetValue(key, ptr);
      if (!success) {
!         panic("TlsSetValue failed from TclpSetAllocCache!");
      }
  }
  
--- 1056,1062 ----
      BOOL success;
      success = TlsSetValue(key, ptr);
      if (!success) {
!         Tcl_Panic("TlsSetValue failed from TclpSetAllocCache!");
      }
  }
  
***************
*** 1070,1081 ****
      if (ptr != NULL) {
  	success = TlsSetValue(key, NULL);
          if (!success) {
!             panic("TlsSetValue failed from TclWinFreeAllocCache!");
          }
  	TclFreeAllocCache(ptr);
      } else {
        if (GetLastError() != NO_ERROR) {
!           panic("TlsGetValue failed from TclWinFreeAllocCache!");
        }
      }
  }
--- 1070,1081 ----
      if (ptr != NULL) {
  	success = TlsSetValue(key, NULL);
          if (!success) {
!             Tcl_Panic("TlsSetValue failed from TclWinFreeAllocCache!");
          }
  	TclFreeAllocCache(ptr);
      } else {
        if (GetLastError() != NO_ERROR) {
!           Tcl_Panic("TlsGetValue failed from TclWinFreeAllocCache!");
        }
      }
  }