From 475a691cd4526144149fa20e18994e84959a7361 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Tue, 13 Jan 2004 02:05:59 +0000 Subject: * generic/tk3d.c: All uses of 'panic' (the macro) changed * generic/tkBind.c: to 'Tcl_Panic' (the function). The #define * generic/tkBitmap.c: of panic in tcl.h clearly states it is * generic/tkCanvArc.c: deprecated in the comments. * generic/tkCanvBmap.c: [Tcl Patch 865264] * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvText.c: * generic/tkCanvWind.c: * generic/tkColor.c: * generic/tkConfig.c: * generic/tkCursor.c: * generic/tkError.c: * generic/tkEvent.c: * generic/tkFocus.c: * generic/tkFont.c: * generic/tkFrame.c: * generic/tkGC.c: * generic/tkGrid.c: * generic/tkImgBmap.c: * generic/tkImgPhoto.c: * generic/tkImgUtil.c: * generic/tkMenu.c: * generic/tkObj.c: * generic/tkPack.c: * generic/tkPlace.c: * generic/tkRectOval.c: * generic/tkSelect.c: * generic/tkText.c: * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkTextMark.c: * generic/tkTextWind.c: * generic/tkVisual.c: * generic/tkWindow.c: * mac/tkMacAppInit.c: * mac/tkMacAppearanceStubs.c: * mac/tkMacButton.c: * mac/tkMacDraw.c: * mac/tkMacEmbed.c: * mac/tkMacFont.c: * mac/tkMacInit.c: * mac/tkMacMenus.c: * mac/tkMacPort.h: * mac/tkMacSubwindows.c: * mac/tkMacWm.c: * mac/tkMacXStubs.c: * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXPort.h: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnix3d.c: * unix/tkUnixColor.c: * unix/tkUnixEmbed.c: * unix/tkUnixEvent.c: * unix/tkUnixFocus.c: * unix/tkUnixFont.c: * unix/tkUnixSelect.c: * unix/tkUnixSend.c: * unix/tkUnixWm.c: * win/tkWin3d.c: * win/tkWinButton.c: * win/tkWinColor.c: * win/tkWinDialog.c: * win/tkWinDraw.c: * win/tkWinEmbed.c: * win/tkWinFont.c: * win/tkWinPixmap.c: * win/tkWinPointer.c: * win/tkWinScrlbr.c: * win/tkWinWm.c: * win/tkWinX.c: --- ChangeLog | 94 +++++++++++++++++++++++++++++++++++++++++++++ generic/tk3d.c | 8 ++-- generic/tkBind.c | 20 +++++----- generic/tkBitmap.c | 18 ++++----- generic/tkCanvArc.c | 4 +- generic/tkCanvBmap.c | 4 +- generic/tkCanvImg.c | 4 +- generic/tkCanvLine.c | 6 +-- generic/tkCanvPoly.c | 4 +- generic/tkCanvText.c | 4 +- generic/tkCanvWind.c | 4 +- generic/tkColor.c | 10 ++--- generic/tkConfig.c | 8 ++-- generic/tkCursor.c | 14 +++---- generic/tkError.c | 4 +- generic/tkEvent.c | 12 +++--- generic/tkFocus.c | 4 +- generic/tkFont.c | 8 ++-- generic/tkFrame.c | 4 +- generic/tkGC.c | 10 ++--- generic/tkGrid.c | 4 +- generic/tkImgBmap.c | 6 +-- generic/tkImgPhoto.c | 30 +++++++-------- generic/tkImgUtil.c | 4 +- generic/tkMenu.c | 6 +-- generic/tkObj.c | 4 +- generic/tkPack.c | 8 ++-- generic/tkPlace.c | 4 +- generic/tkRectOval.c | 4 +- generic/tkSelect.c | 6 +-- generic/tkText.c | 8 ++-- generic/tkTextBTree.c | 94 ++++++++++++++++++++++----------------------- generic/tkTextDisp.c | 18 +++++---- generic/tkTextImage.c | 10 ++--- generic/tkTextIndex.c | 10 ++--- generic/tkTextMark.c | 6 +-- generic/tkTextWind.c | 8 ++-- generic/tkVisual.c | 6 +-- generic/tkWindow.c | 14 +++---- mac/tkMacAppInit.c | 8 ++-- mac/tkMacAppearanceStubs.c | 18 ++++----- mac/tkMacButton.c | 6 +-- mac/tkMacDraw.c | 4 +- mac/tkMacEmbed.c | 8 ++-- mac/tkMacFont.c | 8 ++-- mac/tkMacInit.c | 4 +- mac/tkMacMenus.c | 16 ++++---- mac/tkMacPort.h | 5 +-- mac/tkMacSubwindows.c | 36 ++++++++--------- mac/tkMacWm.c | 30 +++++++-------- mac/tkMacXStubs.c | 6 +-- macosx/tkMacOSXEmbed.c | 8 ++-- macosx/tkMacOSXFont.c | 8 ++-- macosx/tkMacOSXMenus.c | 16 ++++---- macosx/tkMacOSXNotify.c | 16 ++++---- macosx/tkMacOSXPort.h | 5 +-- macosx/tkMacOSXSubwindows.c | 8 ++-- macosx/tkMacOSXWm.c | 36 ++++++++--------- macosx/tkMacOSXXStubs.c | 6 +-- unix/tkUnix3d.c | 4 +- unix/tkUnixColor.c | 6 +-- unix/tkUnixEmbed.c | 12 +++--- unix/tkUnixEvent.c | 4 +- unix/tkUnixFocus.c | 4 +- unix/tkUnixFont.c | 4 +- unix/tkUnixSelect.c | 8 ++-- unix/tkUnixSend.c | 8 ++-- unix/tkUnixWm.c | 18 ++++----- win/tkWin3d.c | 4 +- win/tkWinButton.c | 4 +- win/tkWinColor.c | 8 ++-- win/tkWinDialog.c | 8 +++- win/tkWinDraw.c | 10 ++--- win/tkWinEmbed.c | 8 ++-- win/tkWinFont.c | 4 +- win/tkWinPixmap.c | 10 ++--- win/tkWinPointer.c | 4 +- win/tkWinScrlbr.c | 4 +- win/tkWinWm.c | 24 ++++++------ win/tkWinX.c | 12 ++++-- 80 files changed, 508 insertions(+), 406 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8324f4..87db84e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,97 @@ +2004-01-12 David Gravereaux + + * generic/tk3d.c: All uses of 'panic' (the macro) changed + * generic/tkBind.c: to 'Tcl_Panic' (the function). The #define + * generic/tkBitmap.c: of panic in tcl.h clearly states it is + * generic/tkCanvArc.c: deprecated in the comments. + * generic/tkCanvBmap.c: [Tcl Patch 865264] + * generic/tkCanvImg.c: + * generic/tkCanvLine.c: + * generic/tkCanvPoly.c: + * generic/tkCanvText.c: + * generic/tkCanvWind.c: + * generic/tkColor.c: + * generic/tkConfig.c: + * generic/tkCursor.c: + * generic/tkError.c: + * generic/tkEvent.c: + * generic/tkFocus.c: + * generic/tkFont.c: + * generic/tkFrame.c: + * generic/tkGC.c: + * generic/tkGrid.c: + * generic/tkImgBmap.c: + * generic/tkImgPhoto.c: + * generic/tkImgUtil.c: + * generic/tkMenu.c: + * generic/tkObj.c: + * generic/tkPack.c: + * generic/tkPlace.c: + * generic/tkRectOval.c: + * generic/tkSelect.c: + * generic/tkText.c: + * generic/tkTextBTree.c: + * generic/tkTextDisp.c: + * generic/tkTextImage.c: + * generic/tkTextIndex.c: + * generic/tkTextMark.c: + * generic/tkTextWind.c: + * generic/tkVisual.c: + * generic/tkWindow.c: + * mac/tkMacAppInit.c: + * mac/tkMacAppearanceStubs.c: + * mac/tkMacButton.c: + * mac/tkMacDraw.c: + * mac/tkMacEmbed.c: + * mac/tkMacFont.c: + * mac/tkMacInit.c: + * mac/tkMacMenus.c: + * mac/tkMacPort.h: + * mac/tkMacSubwindows.c: + * mac/tkMacWm.c: + * mac/tkMacXStubs.c: + * macosx/tkMacOSXEmbed.c: + * macosx/tkMacOSXFont.c: + * macosx/tkMacOSXMenus.c: + * macosx/tkMacOSXNotify.c: + * macosx/tkMacOSXPort.h: + * macosx/tkMacOSXSubwindows.c: + * macosx/tkMacOSXWm.c: + * macosx/tkMacOSXXStubs.c: + * unix/tkUnix3d.c: + * unix/tkUnixColor.c: + * unix/tkUnixEmbed.c: + * unix/tkUnixEvent.c: + * unix/tkUnixFocus.c: + * unix/tkUnixFont.c: + * unix/tkUnixSelect.c: + * unix/tkUnixSend.c: + * unix/tkUnixWm.c: + * win/tkWin3d.c: + * win/tkWinButton.c: + * win/tkWinColor.c: + * win/tkWinDialog.c: + * win/tkWinDraw.c: + * win/tkWinEmbed.c: + * win/tkWinFont.c: + * win/tkWinPixmap.c: + * win/tkWinPointer.c: + * win/tkWinScrlbr.c: + * win/tkWinWm.c: + * win/tkWinX.c: + + * win/rc/tk.rc: + * win/rc/tk_base.rc: + * win/rc/wish.rc: + * win/makefile.vc: Refreshed how the resource files are built. + Should be a bit easier for people linking with a static Tk library. + + * win/lamp.bmp (deleted): + * win/rc/lamp.bmp (new): Moved. + + * win/rules.vc: Sync'd to Tcl, respects the CHECKS=nodep + commandline macro and was used to verify the Tcl_Panic change above. + 2004-01-09 Peter Spjuth * doc/grid.n: * tests/grid.test: diff --git a/generic/tk3d.c b/generic/tk3d.c index 3c6492e..dc69662 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk3d.c,v 1.13 2002/08/05 04:30:38 dgp Exp $ + * RCS: @(#) $Id: tk3d.c,v 1.14 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tk3d.h" @@ -392,7 +392,7 @@ Tk_3DBorderGC(tkwin, border, which) } else if (which == TK_3D_DARK_GC){ return borderPtr->darkGC; } - panic("bogus \"which\" value in Tk_3DBorderGC"); + Tcl_Panic("bogus \"which\" value in Tk_3DBorderGC"); /* * The code below will never be executed, but it's needed to @@ -1314,7 +1314,7 @@ Tk_Get3DBorderFromObj(tkwin, objPtr) } error: - panic("Tk_Get3DBorderFromObj called with non-existent border!"); + Tcl_Panic("Tk_Get3DBorderFromObj called with non-existent border!"); /* * The following code isn't reached; it's just there to please compilers. */ @@ -1395,7 +1395,7 @@ TkDebugBorder(tkwin, name) if (hashPtr != NULL) { borderPtr = (TkBorder *) Tcl_GetHashValue(hashPtr); if (borderPtr == NULL) { - panic("TkDebugBorder found empty hash table entry"); + Tcl_Panic("TkDebugBorder found empty hash table entry"); } for ( ; (borderPtr != NULL); borderPtr = borderPtr->nextPtr) { objPtr = Tcl_NewObj(); diff --git a/generic/tkBind.c b/generic/tkBind.c index 7f6fc04..5fef710 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.29 2003/04/14 23:34:41 mdejong Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.30 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -746,7 +746,7 @@ TkBindInit(mainPtr) BindInfo *bindInfoPtr; if (sizeof(XEvent) < sizeof(XVirtualEvent)) { - panic("TkBindInit: virtual events can't be supported"); + Tcl_Panic("TkBindInit: virtual events can't be supported"); } /* @@ -1177,7 +1177,7 @@ Tk_DeleteBinding(interp, bindingTable, object, eventString) hPtr = Tcl_FindHashEntry(&bindPtr->objectTable, (char *) object); if (hPtr == NULL) { - panic("Tk_DeleteBinding couldn't find object table entry"); + Tcl_Panic("Tk_DeleteBinding couldn't find object table entry"); } prevPtr = (PatSeq *) Tcl_GetHashValue(hPtr); if (prevPtr == psPtr) { @@ -1185,7 +1185,7 @@ Tk_DeleteBinding(interp, bindingTable, object, eventString) } else { for ( ; ; prevPtr = prevPtr->nextObjPtr) { if (prevPtr == NULL) { - panic("Tk_DeleteBinding couldn't find on object list"); + Tcl_Panic("Tk_DeleteBinding couldn't find on object list"); } if (prevPtr->nextObjPtr == psPtr) { prevPtr->nextObjPtr = psPtr->nextObjPtr; @@ -1203,7 +1203,7 @@ Tk_DeleteBinding(interp, bindingTable, object, eventString) } else { for ( ; ; prevPtr = prevPtr->nextSeqPtr) { if (prevPtr == NULL) { - panic("Tk_DeleteBinding couldn't find on hash chain"); + Tcl_Panic("Tk_DeleteBinding couldn't find on hash chain"); } if (prevPtr->nextSeqPtr == psPtr) { prevPtr->nextSeqPtr = psPtr->nextSeqPtr; @@ -1375,7 +1375,7 @@ Tk_DeleteAllBindings(bindingTable, object) } else { for ( ; ; prevPtr = prevPtr->nextSeqPtr) { if (prevPtr == NULL) { - panic("Tk_DeleteAllBindings couldn't find on hash chain"); + Tcl_Panic("Tk_DeleteAllBindings couldn't find on hash chain"); } if (prevPtr->nextSeqPtr == psPtr) { prevPtr->nextSeqPtr = psPtr->nextSeqPtr; @@ -1664,7 +1664,7 @@ Tk_BindEvent(bindingTable, eventPtr, tkwin, numObjects, objectPtr) if (matchPtr != NULL) { if (sourcePtr->eventProc == NULL) { - panic("Tk_BindEvent: missing command"); + Tcl_Panic("Tk_BindEvent: missing command"); } if (sourcePtr->eventProc == EvalTclBinding) { ExpandPercents(winPtr, (char *) sourcePtr->clientData, @@ -2200,7 +2200,7 @@ MatchPatterns(dispPtr, bindPtr, psPtr, bestPtr, objectPtr, sourcePtrPtr) virtMatchPtr = (PatSeq *) Tcl_GetHashValue(hPtr); if ((virtMatchPtr->numPats != 1) || (virtMatchPtr->nextSeqPtr != NULL)) { - panic("MatchPattern: badly constructed virtual event"); + Tcl_Panic("MatchPattern: badly constructed virtual event"); } sourcePtr = virtMatchPtr; goto match; @@ -3101,7 +3101,7 @@ DeleteVirtualEvent(interp, vetPtr, virtString, eventString) } } if (iVirt == voPtr->numOwners) { - panic("DeleteVirtualEvent: couldn't find owner"); + Tcl_Panic("DeleteVirtualEvent: couldn't find owner"); } voPtr->numOwners--; if (voPtr->numOwners == 0) { @@ -3120,7 +3120,7 @@ DeleteVirtualEvent(interp, vetPtr, virtString, eventString) } else { for ( ; ; prevPtr = prevPtr->nextSeqPtr) { if (prevPtr == NULL) { - panic("DeleteVirtualEvent couldn't find on hash chain"); + Tcl_Panic("DeleteVirtualEvent couldn't find on hash chain"); } if (prevPtr->nextSeqPtr == psPtr) { prevPtr->nextSeqPtr = psPtr->nextSeqPtr; diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 3f9e2e6..dd971f6 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBitmap.c,v 1.10 2002/08/05 04:30:38 dgp Exp $ + * RCS: @(#) $Id: tkBitmap.c,v 1.11 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -402,7 +402,7 @@ GetBitmap(interp, tkwin, string) bitmap = TkpCreateNativeBitmap(Tk_Display(tkwin), predefPtr->source); if (bitmap == None) { - panic("native bitmap creation failed"); + Tcl_Panic("native bitmap creation failed"); } } else { bitmap = XCreateBitmapFromData(Tk_Display(tkwin), @@ -429,7 +429,7 @@ GetBitmap(interp, tkwin, string) bitmapPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap, &new); if (!new) { - panic("bitmap already registered in Tk_GetBitmap"); + Tcl_Panic("bitmap already registered in Tk_GetBitmap"); } bitmapPtr->nextPtr = existingBitmapPtr; Tcl_SetHashValue(nameHashPtr, bitmapPtr); @@ -535,7 +535,7 @@ Tk_NameOfBitmap(display, bitmap) if (dispPtr == NULL || !dispPtr->bitmapInit) { unknown: - panic("Tk_NameOfBitmap received unknown bitmap argument"); + Tcl_Panic("Tk_NameOfBitmap received unknown bitmap argument"); } idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap); @@ -579,7 +579,7 @@ Tk_SizeOfBitmap(display, bitmap, widthPtr, heightPtr) if (!dispPtr->bitmapInit) { unknownBitmap: - panic("Tk_SizeOfBitmap received unknown bitmap argument"); + Tcl_Panic("Tk_SizeOfBitmap received unknown bitmap argument"); } idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap); @@ -669,12 +669,12 @@ Tk_FreeBitmap(display, bitmap) TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->bitmapInit) { - panic("Tk_FreeBitmap called before Tk_GetBitmap"); + Tcl_Panic("Tk_FreeBitmap called before Tk_GetBitmap"); } idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap); if (idHashPtr == NULL) { - panic("Tk_FreeBitmap received unknown bitmap argument"); + Tcl_Panic("Tk_FreeBitmap received unknown bitmap argument"); } FreeBitmap((TkBitmap *) Tcl_GetHashValue(idHashPtr)); } @@ -935,7 +935,7 @@ GetBitmapFromObj(tkwin, objPtr) } error: - panic("GetBitmapFromObj called with non-existent bitmap!"); + Tcl_Panic("GetBitmapFromObj called with non-existent bitmap!"); /* * The following code isn't reached; it's just there to please compilers. */ @@ -1146,7 +1146,7 @@ TkDebugBitmap(tkwin, name) if (hashPtr != NULL) { bitmapPtr = (TkBitmap *) Tcl_GetHashValue(hashPtr); if (bitmapPtr == NULL) { - panic("TkDebugBitmap found empty hash table entry"); + Tcl_Panic("TkDebugBitmap found empty hash table entry"); } for ( ; (bitmapPtr != NULL); bitmapPtr = bitmapPtr->nextPtr) { objPtr = Tcl_NewObj(); diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 096e23b..276a49a 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvArc.c,v 1.11 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvArc.c,v 1.12 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -298,7 +298,7 @@ CreateArc(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index f47f380..887c554 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvBmap.c,v 1.8 2003/04/18 21:54:27 hobbs Exp $ + * RCS: @(#) $Id: tkCanvBmap.c,v 1.9 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -180,7 +180,7 @@ TkcCreateBitmap(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 5aa036b..d0f6122 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvImg.c,v 1.6 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvImg.c,v 1.7 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -172,7 +172,7 @@ CreateImage(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index d8be008..a10ff55 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvLine.c,v 1.13 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvLine.c,v 1.14 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -303,7 +303,7 @@ CreateLine(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* @@ -1876,7 +1876,7 @@ ParseArrowShape(clientData, interp, tkwin, value, recordPtr, offset) CONST char **argv = NULL; if (offset != Tk_Offset(LineItem, arrowShapeA)) { - panic("ParseArrowShape received bogus offset"); + Tcl_Panic("ParseArrowShape received bogus offset"); } if (Tcl_SplitList(interp, (char *) value, &argc, &argv) != TCL_OK) { diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index 124c8d1..3291300 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvPoly.c,v 1.11 2003/05/11 00:52:41 hobbs Exp $ + * RCS: @(#) $Id: tkCanvPoly.c,v 1.12 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -267,7 +267,7 @@ CreatePolygon(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 7adb737..ee3ad22 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvText.c,v 1.15 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvText.c,v 1.16 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -238,7 +238,7 @@ CreateText(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index a820163..bc4d1fe 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvWind.c,v 1.9 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkCanvWind.c,v 1.10 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -187,7 +187,7 @@ CreateWinItem(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkColor.c b/generic/tkColor.c index b3cc9bb..4aa82bb 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkColor.c,v 1.9 2002/08/05 04:30:38 dgp Exp $ + * RCS: @(#) $Id: tkColor.c,v 1.10 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkColor.h" @@ -420,7 +420,7 @@ Tk_GCForColor(colorPtr, drawable) */ if (tkColPtr->magic != COLOR_MAGIC) { - panic("Tk_GCForColor called with bogus color"); + Tcl_Panic("Tk_GCForColor called with bogus color"); } if (tkColPtr->gc == None) { @@ -466,7 +466,7 @@ Tk_FreeColor(colorPtr) */ if (tkColPtr->magic != COLOR_MAGIC) { - panic("Tk_FreeColor called with bogus color"); + Tcl_Panic("Tk_FreeColor called with bogus color"); } tkColPtr->resourceRefCount--; @@ -690,7 +690,7 @@ Tk_GetColorFromObj(tkwin, objPtr) } error: - panic(" Tk_GetColorFromObj called with non-existent color!"); + Tcl_Panic(" Tk_GetColorFromObj called with non-existent color!"); /* * The following code isn't reached; it's just there to please compilers. */ @@ -798,7 +798,7 @@ TkDebugColor(tkwin, name) if (hashPtr != NULL) { tkColPtr = (TkColor *) Tcl_GetHashValue(hashPtr); if (tkColPtr == NULL) { - panic("TkDebugColor found empty hash table entry"); + Tcl_Panic("TkDebugColor found empty hash table entry"); } for ( ; (tkColPtr != NULL); tkColPtr = tkColPtr->nextPtr) { objPtr = Tcl_NewObj(); diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 643ef81..3cef314 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkConfig.c,v 1.18 2002/08/05 04:30:38 dgp Exp $ + * RCS: @(#) $Id: tkConfig.c,v 1.19 2004/01/13 02:06:00 davygrvy Exp $ */ /* @@ -254,7 +254,7 @@ Tk_CreateOptionTable(interp, templatePtr) for (specPtr2 = templatePtr, i = 0; ; specPtr2++, i++) { if (specPtr2->type == TK_OPTION_END) { - panic("Tk_CreateOptionTable couldn't find synonym"); + Tcl_Panic("Tk_CreateOptionTable couldn't find synonym"); } if (strcmp(specPtr2->optionName, (char *) specPtr->clientData) == 0) { @@ -1554,7 +1554,7 @@ Tk_RestoreSavedOptions(savePtr) break; } default: { - panic("bad option type in Tk_RestoreSavedOptions"); + Tcl_Panic("bad option type in Tk_RestoreSavedOptions"); } } } @@ -2076,7 +2076,7 @@ GetObjectForOption(recordPtr, optionPtr, tkwin) break; } default: { - panic("bad option type in GetObjectForOption"); + Tcl_Panic("bad option type in GetObjectForOption"); } } if (objPtr == NULL) { diff --git a/generic/tkCursor.c b/generic/tkCursor.c index fc0cd96..13a707a 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCursor.c,v 1.10 2003/04/18 21:54:14 hobbs Exp $ + * RCS: @(#) $Id: tkCursor.c,v 1.11 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -280,7 +280,7 @@ TkcGetCursor(interp, tkwin, string) cursorPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorIdTable, (char *) cursorPtr->cursor, &new); if (!new) { - panic("cursor already registered in Tk_GetCursor"); + Tcl_Panic("cursor already registered in Tk_GetCursor"); } Tcl_SetHashValue(nameHashPtr, cursorPtr); Tcl_SetHashValue(cursorPtr->idHashPtr, cursorPtr); @@ -386,7 +386,7 @@ Tk_GetCursorFromData(interp, tkwin, source, mask, width, height, cursorPtr->nextPtr = NULL; if (!new) { - panic("cursor already registered in Tk_GetCursorFromData"); + Tcl_Panic("cursor already registered in Tk_GetCursorFromData"); } Tcl_SetHashValue(dataHashPtr, cursorPtr); Tcl_SetHashValue(cursorPtr->idHashPtr, cursorPtr); @@ -524,12 +524,12 @@ Tk_FreeCursor(display, cursor) TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->cursorInit) { - panic("Tk_FreeCursor called before Tk_GetCursor"); + Tcl_Panic("Tk_FreeCursor called before Tk_GetCursor"); } idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, (char *) cursor); if (idHashPtr == NULL) { - panic("Tk_FreeCursor received unknown cursor argument"); + Tcl_Panic("Tk_FreeCursor received unknown cursor argument"); } FreeCursor((TkCursor *) Tcl_GetHashValue(idHashPtr)); } @@ -730,7 +730,7 @@ GetCursorFromObj(tkwin, objPtr) } error: - panic("GetCursorFromObj called with non-existent cursor!"); + Tcl_Panic("GetCursorFromObj called with non-existent cursor!"); /* * The following code isn't reached; it's just there to please compilers. */ @@ -853,7 +853,7 @@ TkDebugCursor(tkwin, name) if (hashPtr != NULL) { cursorPtr = (TkCursor *) Tcl_GetHashValue(hashPtr); if (cursorPtr == NULL) { - panic("TkDebugCursor found empty hash table entry"); + Tcl_Panic("TkDebugCursor found empty hash table entry"); } for ( ; (cursorPtr != NULL); cursorPtr = cursorPtr->nextPtr) { objPtr = Tcl_NewObj(); diff --git a/generic/tkError.c b/generic/tkError.c index a601720..648d440 100644 --- a/generic/tkError.c +++ b/generic/tkError.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkError.c,v 1.2 1998/09/14 18:23:09 stanton Exp $ + * RCS: @(#) $Id: tkError.c,v 1.3 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -105,7 +105,7 @@ Tk_CreateErrorHandler(display, error, request, minorCode, errorProc, clientData) dispPtr = TkGetDisplay(display); if (dispPtr == NULL) { - panic("Unknown display passed to Tk_CreateErrorHandler"); + Tcl_Panic("Unknown display passed to Tk_CreateErrorHandler"); } /* diff --git a/generic/tkEvent.c b/generic/tkEvent.c index f6bf9d4..3045eb4 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkEvent.c,v 1.19 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.20 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -927,7 +927,7 @@ Tk_HandleEvent(eventPtr) preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, XNFontSet, dispPtr->inputXfs, NULL); if (winPtr->inputContext != NULL) - panic("inputContext not NULL"); + Tcl_Panic("inputContext not NULL"); winPtr->inputContext = XCreateIC(dispPtr->inputMethod, XNInputStyle, XIMPreeditPosition|XIMStatusNothing, XNClientWindow, winPtr->window, @@ -937,7 +937,7 @@ Tk_HandleEvent(eventPtr) XFree(preedit_attr); } else { if (winPtr->inputContext != NULL) - panic("inputContext not NULL"); + Tcl_Panic("inputContext not NULL"); winPtr->inputContext = XCreateIC(dispPtr->inputMethod, XNInputStyle, XIMPreeditNothing|XIMStatusNothing, XNClientWindow, winPtr->window, @@ -946,7 +946,7 @@ Tk_HandleEvent(eventPtr) } #else if (winPtr->inputContext != NULL) - panic("inputContext not NULL"); + Tcl_Panic("inputContext not NULL"); winPtr->inputContext = XCreateIC(dispPtr->inputMethod, XNInputStyle, XIMPreeditNothing|XIMStatusNothing, XNClientWindow, winPtr->window, @@ -1348,7 +1348,7 @@ Tk_QueueWindowEvent(eventPtr, position) */ if (dispPtr->delayedMotionPtr != NULL) { - panic("Tk_QueueWindowEvent found unexpected delayed motion event"); + Tcl_Panic("Tk_QueueWindowEvent found unexpected delayed motion event"); } dispPtr->delayedMotionPtr = wevPtr; Tcl_DoWhenIdle(DelayedMotionProc, (ClientData) dispPtr); @@ -1474,7 +1474,7 @@ DelayedMotionProc(clientData) TkDisplay *dispPtr = (TkDisplay *) clientData; if (dispPtr->delayedMotionPtr == NULL) { - panic("DelayedMotionProc found no delayed mouse motion event"); + Tcl_Panic("DelayedMotionProc found no delayed mouse motion event"); } Tcl_QueueEvent(&dispPtr->delayedMotionPtr->header, TCL_QUEUE_TAIL); dispPtr->delayedMotionPtr = NULL; diff --git a/generic/tkFocus.c b/generic/tkFocus.c index 93af5f5..967cd1c 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFocus.c,v 1.10 2002/10/08 19:57:59 hobbs Exp $ + * RCS: @(#) $Id: tkFocus.c,v 1.11 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -234,7 +234,7 @@ Tk_FocusObjCmd(clientData, interp, objc, objv) break; } default: { - panic("bad const entries to focusOptions in focus command"); + Tcl_Panic("bad const entries to focusOptions in focus command"); } } return TCL_OK; diff --git a/generic/tkFont.c b/generic/tkFont.c index 23f28dc..8274cfe 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.c,v 1.21 2002/09/02 19:13:47 hobbs Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.22 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -437,7 +437,7 @@ TkFontPkgFree(mainPtr) } #ifdef PURIFY if (fontsLeft) { - panic("TkFontPkgFree: all fonts should have been freed already"); + Tcl_Panic("TkFontPkgFree: all fonts should have been freed already"); } #endif Tcl_DeleteHashTable(&fiPtr->fontCache); @@ -1216,7 +1216,7 @@ Tk_GetFontFromObj(tkwin, objPtr) } } - panic("Tk_GetFontFromObj called with non-existent font!"); + Tcl_Panic("Tk_GetFontFromObj called with non-existent font!"); return NULL; } @@ -3700,7 +3700,7 @@ TkDebugFont(tkwin, name) if (hashPtr != NULL) { fontPtr = (TkFont *) Tcl_GetHashValue(hashPtr); if (fontPtr == NULL) { - panic("TkDebugFont found empty hash table entry"); + Tcl_Panic("TkDebugFont found empty hash table entry"); } for ( ; (fontPtr != NULL); fontPtr = fontPtr->nextPtr) { objPtr = Tcl_NewObj(); diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 928bea1..8a50675 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFrame.c,v 1.16 2003/07/16 23:16:52 pspjuth Exp $ + * RCS: @(#) $Id: tkFrame.c,v 1.17 2004/01/13 02:06:00 davygrvy Exp $ */ #include "default.h" @@ -1818,7 +1818,7 @@ TkInstallFrameMenu(tkwin) Frame *framePtr; framePtr = (Frame*) winPtr->instanceData; if (framePtr == NULL) { - panic("TkInstallFrameMenu couldn't get frame pointer"); + Tcl_Panic("TkInstallFrameMenu couldn't get frame pointer"); } TkpMenuNotifyToplevelCreate(winPtr->mainPtr->interp, framePtr->menuName); diff --git a/generic/tkGC.c b/generic/tkGC.c index e8b4c2d..5bb16f5 100644 --- a/generic/tkGC.c +++ b/generic/tkGC.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkGC.c,v 1.4 2002/04/12 10:02:40 hobbs Exp $ + * RCS: @(#) $Id: tkGC.c,v 1.5 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -259,7 +259,7 @@ Tk_GetGC(tkwin, valueMask, valuePtr) idHashPtr = Tcl_CreateHashEntry(&dispPtr->gcIdTable, (char *) gcPtr->gc, &new); if (!new) { - panic("GC already registered in Tk_GetGC"); + Tcl_Panic("GC already registered in Tk_GetGC"); } Tcl_SetHashValue(valueHashPtr, gcPtr); Tcl_SetHashValue(idHashPtr, gcPtr); @@ -298,7 +298,7 @@ Tk_FreeGC(display, gc) TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->gcInit) { - panic("Tk_FreeGC called before Tk_GetGC"); + Tcl_Panic("Tk_FreeGC called before Tk_GetGC"); } if (dispPtr->gcInit < 0) { /* @@ -311,7 +311,7 @@ Tk_FreeGC(display, gc) idHashPtr = Tcl_FindHashEntry(&dispPtr->gcIdTable, (char *) gc); if (idHashPtr == NULL) { - panic("Tk_FreeGC received unknown gc argument"); + Tcl_Panic("Tk_FreeGC received unknown gc argument"); } gcPtr = (TkGC *) Tcl_GetHashValue(idHashPtr); gcPtr->refCount--; @@ -390,7 +390,7 @@ GCInit(dispPtr) TkDisplay *dispPtr; { if (dispPtr->gcInit < 0) { - panic("called GCInit after GCCleanup"); + Tcl_Panic("called GCInit after GCCleanup"); } dispPtr->gcInit = 1; Tcl_InitHashTable(&dispPtr->gcValueTable, sizeof(ValueKey)/sizeof(int)); diff --git a/generic/tkGrid.c b/generic/tkGrid.c index fe8e47d..62b064f 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkGrid.c,v 1.30 2004/01/09 22:23:26 pspjuth Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.31 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -2560,7 +2560,7 @@ Unlink(slavePtr) } else { for (slavePtr2 = masterPtr->slavePtr; ; slavePtr2 = slavePtr2->nextPtr) { if (slavePtr2 == NULL) { - panic("Unlink couldn't find previous window"); + Tcl_Panic("Unlink couldn't find previous window"); } if (slavePtr2->nextPtr == slavePtr) { slavePtr2->nextPtr = slavePtr->nextPtr; diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index d89663e..b5e77c0 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkImgBmap.c,v 1.15 2002/08/05 04:30:39 dgp Exp $ + * RCS: @(#) $Id: tkImgBmap.c,v 1.16 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -798,7 +798,7 @@ ImgBmapCmd(clientData, interp, objc, objv) return code; } default: { - panic("bad const entries to bmapOptions in ImgBmapCmd"); + Tcl_Panic("bad const entries to bmapOptions in ImgBmapCmd"); } } return TCL_OK; @@ -1025,7 +1025,7 @@ ImgBmapDelete(masterData) BitmapMaster *masterPtr = (BitmapMaster *) masterData; if (masterPtr->instancePtr != NULL) { - panic("tried to delete bitmap image when instances still exist"); + Tcl_Panic("tried to delete bitmap image when instances still exist"); } masterPtr->tkMaster = NULL; if (masterPtr->imageCmd != NULL) { diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index a2afd81..3b3574e 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.42 2003/10/31 18:56:30 hobbs Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.43 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -1436,7 +1436,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) } } - panic("unexpected fallthrough"); + Tcl_Panic("unexpected fallthrough"); } case PHOTO_WRITE: { @@ -1558,7 +1558,7 @@ ImgPhotoCmd(clientData, interp, objc, objv) } } - panic("unexpected fallthrough"); + Tcl_Panic("unexpected fallthrough"); return TCL_ERROR; /* NOT REACHED */ } @@ -2434,7 +2434,7 @@ ImgPhotoGet(tkwin, masterData) XFree((char *) visInfoPtr); } else { - panic("ImgPhotoGet couldn't find visual for window"); + Tcl_Panic("ImgPhotoGet couldn't find visual for window"); } sprintf(buf, ((mono) ? "%d": "%d/%d/%d"), nRed, nGreen, nBlue); @@ -2827,7 +2827,7 @@ ImgPhotoDelete(masterData) while ((instancePtr = masterPtr->instancePtr) != NULL) { if (instancePtr->refCount > 0) { - panic("tried to delete photo image when instances still exist"); + Tcl_Panic("tried to delete photo image when instances still exist"); } Tcl_CancelIdleCall(DisposeInstance, (ClientData) instancePtr); DisposeInstance((ClientData) instancePtr); @@ -3111,7 +3111,7 @@ ImgPhotoInstanceSetSize(instancePtr) (masterPtr->height > 0) ? masterPtr->height: 1, instancePtr->visualInfo.depth); if (!newPixmap) { - panic("Fail to create pixmap with Tk_GetPixmap in ImgPhotoInstanceSetSize.\n"); + Tcl_Panic("Fail to create pixmap with Tk_GetPixmap in ImgPhotoInstanceSetSize.\n"); return; } @@ -3789,7 +3789,7 @@ DisposeColorTable(clientData) entry = Tcl_FindHashEntry(&imgPhotoColorHash, (char *) &colorPtr->id); if (entry == NULL) { - panic("DisposeColorTable couldn't find hash entry"); + Tcl_Panic("DisposeColorTable couldn't find hash entry"); } Tcl_DeleteHashEntry(entry); @@ -4417,7 +4417,7 @@ Tk_PhotoPutBlock(interp, handle, blockPtr, x, y, width, height, compRule) break; default: - panic("unknown compositing rule: %d", compRule); + Tcl_Panic("unknown compositing rule: %d", compRule); } srcPtr += blockPtr->pixelSize; } @@ -4724,7 +4724,7 @@ Tk_PhotoPutZoomedBlock(interp, handle, blockPtr, x, y, width, height, destPtr += 4; break; default: - panic("unknown compositing rule: %d", compRule); + Tcl_Panic("unknown compositing rule: %d", compRule); } } srcPtr += blockXSkip; @@ -5938,7 +5938,7 @@ Tk_PhotoPutBlock_NoComposite(handle, blockPtr, x, y, width, height) { if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } @@ -5952,7 +5952,7 @@ Tk_PhotoPutZoomedBlock_NoComposite(handle, blockPtr, x, y, width, height, if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, zoomX, zoomY, subsampleX, subsampleY, TK_PHOTO_COMPOSITE_OVERLAY) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } @@ -5977,7 +5977,7 @@ Tk_PhotoExpand_Panic(handle, width, height) int width, height; { if (Tk_PhotoExpand(NULL, handle, width, height) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } @@ -5989,7 +5989,7 @@ Tk_PhotoPutBlock_Panic(handle, blockPtr, x, y, width, height, compRule) { if (Tk_PhotoPutBlock(NULL, handle, blockPtr, x, y, width, height, compRule) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } @@ -6002,7 +6002,7 @@ Tk_PhotoPutZoomedBlock_Panic(handle, blockPtr, x, y, width, height, { if (Tk_PhotoPutZoomedBlock(NULL, handle, blockPtr, x, y, width, height, zoomX, zoomY, subsampleX, subsampleY, compRule) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } @@ -6012,6 +6012,6 @@ Tk_PhotoSetSize_Panic(handle, width, height) int width, height; { if (Tk_PhotoSetSize(NULL, handle, width, height) != TCL_OK) { - panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); + Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE); } } diff --git a/generic/tkImgUtil.c b/generic/tkImgUtil.c index 00c8b7d..d5635aa 100644 --- a/generic/tkImgUtil.c +++ b/generic/tkImgUtil.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkImgUtil.c,v 1.2 1998/09/14 18:23:13 stanton Exp $ + * RCS: @(#) $Id: tkImgUtil.c,v 1.3 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -46,7 +46,7 @@ TkAlignImageData(image, alignment, bitOrder) int i, j; if (image->bits_per_pixel != 1) { - panic("TkAlignImageData: Can't handle image depths greater than 1."); + Tcl_Panic("TkAlignImageData: Can't handle image depths greater than 1."); } /* diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 868268a..a87eaf3 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.24 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.25 2004/01/13 02:06:00 davygrvy Exp $ */ /* @@ -1230,7 +1230,7 @@ DestroyMenuInstance(menuPtr) } } } else if (menuPtr->nextInstancePtr != NULL) { - panic("Attempting to delete master menu when there are still clones."); + Tcl_Panic("Attempting to delete master menu when there are still clones."); } /* @@ -2497,7 +2497,7 @@ MenuAddOrInsert(interp, menuPtr, indexPtr, objc, objv) menuRefPtr = TkFindMenuReferencesObj(menuListPtr->interp, newCascadePtr); if (menuRefPtr == NULL) { - panic("CloneMenu failed inside of MenuAddOrInsert."); + Tcl_Panic("CloneMenu failed inside of MenuAddOrInsert."); } newObjv[0] = menuNamePtr; newObjv[1] = newCascadePtr; diff --git a/generic/tkObj.c b/generic/tkObj.c index 5338cb5..1b4414b 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkObj.c,v 1.9 2003/10/10 15:56:22 dkf Exp $ + * RCS: @(#) $Id: tkObj.c,v 1.10 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -519,7 +519,7 @@ UpdateStringOfMM(objPtr) mmPtr = (MMRep *) objPtr->internalRep.otherValuePtr; /* assert( mmPtr->units == -1 && objPtr->bytes == NULL ); */ if ((mmPtr->units != -1) || (objPtr->bytes != NULL)) { - panic("UpdateStringOfMM: false precondition"); + Tcl_Panic("UpdateStringOfMM: false precondition"); } Tcl_PrintDouble((Tcl_Interp *) NULL, mmPtr->value, buffer); diff --git a/generic/tkPack.c b/generic/tkPack.c index 5378575..b7747cb 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPack.c,v 1.18 2003/07/17 03:19:43 dgp Exp $ + * RCS: @(#) $Id: tkPack.c,v 1.19 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -290,7 +290,7 @@ Tk_PackObjCmd(clientData, interp, objc, objv) } else { for ( ; ; prevPtr = prevPtr->nextPtr) { if (prevPtr == NULL) { - panic("\"pack before\" couldn't find predecessor"); + Tcl_Panic("\"pack before\" couldn't find predecessor"); } if (prevPtr->nextPtr == packPtr) { break; @@ -797,7 +797,7 @@ ArrangePacking(clientData) y = frameY + (borderTop + frameHeight - height - borderBtm)/2; break; default: - panic("bad frame factor in ArrangePacking"); + Tcl_Panic("bad frame factor in ArrangePacking"); } width -= slavePtr->doubleBw; height -= slavePtr->doubleBw; @@ -1379,7 +1379,7 @@ Unlink(packPtr) } else { for (packPtr2 = masterPtr->slavePtr; ; packPtr2 = packPtr2->nextPtr) { if (packPtr2 == NULL) { - panic("Unlink couldn't find previous window"); + Tcl_Panic("Unlink couldn't find previous window"); } if (packPtr2->nextPtr == packPtr) { packPtr2->nextPtr = packPtr->nextPtr; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 09452b3..dacdcea 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPlace.c,v 1.14 2003/03/12 00:09:37 mdejong Exp $ + * RCS: @(#) $Id: tkPlace.c,v 1.15 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -472,7 +472,7 @@ UnlinkSlave(slavePtr) for (prevPtr = masterPtr->slavePtr; ; prevPtr = prevPtr->nextPtr) { if (prevPtr == NULL) { - panic("UnlinkSlave couldn't find slave to unlink"); + Tcl_Panic("UnlinkSlave couldn't find slave to unlink"); } if (prevPtr->nextPtr == slavePtr) { prevPtr->nextPtr = slavePtr->nextPtr; diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index 59d233f..454b9a5 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkRectOval.c,v 1.10 2003/02/09 07:48:22 hobbs Exp $ + * RCS: @(#) $Id: tkRectOval.c,v 1.11 2004/01/13 02:06:00 davygrvy Exp $ */ #include @@ -255,7 +255,7 @@ CreateRectOval(interp, canvas, itemPtr, objc, objv) int i; if (objc == 0) { - panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords\n"); } /* diff --git a/generic/tkSelect.c b/generic/tkSelect.c index d62aa43..c10c606 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkSelect.c,v 1.13 2003/01/14 19:24:56 jenglish Exp $ + * RCS: @(#) $Id: tkSelect.c,v 1.14 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -609,7 +609,7 @@ Tk_GetSelection(interp, tkwin, selection, target, proc, clientData) count = TkSelDefaultSelection(infoPtr, target, buffer, TK_SEL_BYTES_AT_ONCE, &type); if (count > TK_SEL_BYTES_AT_ONCE) { - panic("selection handler returned too many bytes"); + Tcl_Panic("selection handler returned too many bytes"); } if (count < 0) { goto cantget; @@ -630,7 +630,7 @@ Tk_GetSelection(interp, tkwin, selection, target, proc, clientData) goto cantget; } if (count > TK_SEL_BYTES_AT_ONCE) { - panic("selection handler returned too many bytes"); + Tcl_Panic("selection handler returned too many bytes"); } buffer[count] = '\0'; result = (*proc)(clientData, interp, buffer); diff --git a/generic/tkText.c b/generic/tkText.c index 987bafa..9981e1d 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.47 2003/12/05 17:19:06 vincentdarley Exp $ + * RCS: @(#) $Id: tkText.c,v 1.48 2004/01/13 02:06:00 davygrvy Exp $ */ #include "default.h" @@ -2465,7 +2465,7 @@ TextFetchSelection(clientData, offset, buffer, maxBytes) */ if (!TkBTreeNextTag(&search)) { - panic("TextFetchSelection couldn't find end of range"); + Tcl_Panic("TextFetchSelection couldn't find end of range"); } /* @@ -2848,7 +2848,7 @@ TextSearchCmd(textPtr, interp, objc, objv) searchSpec.exact = 0; break; default: - panic("unexpected switch fallthrough"); + Tcl_Panic("unexpected switch fallthrough"); } } endOfSwitchProcessing: @@ -3539,7 +3539,7 @@ TextDumpCmd(textPtr, interp, objc, objv) command = Tcl_GetString(objv[arg]); break; default: - panic("unexpected switch fallthrough"); + Tcl_Panic("unexpected switch fallthrough"); } } if (arg >= objc || arg+2 < objc) { diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 8ac05ea..c19e288 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextBTree.c,v 1.12 2004/01/07 16:28:23 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextBTree.c,v 1.13 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkInt.h" @@ -633,7 +633,7 @@ SplitSeg(indexPtr) return prevPtr; } } - panic("SplitSeg reached end of line!"); + Tcl_Panic("SplitSeg reached end of line!"); return NULL; } @@ -940,7 +940,7 @@ TkBTreeFindLine(tree, line) nodePtr->numLines <= linesLeft; nodePtr = nodePtr->nextPtr) { if (nodePtr == NULL) { - panic("TkBTreeFindLine ran out of nodes"); + Tcl_Panic("TkBTreeFindLine ran out of nodes"); } linesLeft -= nodePtr->numLines; } @@ -953,7 +953,7 @@ TkBTreeFindLine(tree, line) for (linePtr = nodePtr->children.linePtr; linesLeft > 0; linePtr = linePtr->nextPtr) { if (linePtr == NULL) { - panic("TkBTreeFindLine ran out of lines"); + Tcl_Panic("TkBTreeFindLine ran out of lines"); } linesLeft -= 1; } @@ -1003,7 +1003,7 @@ TkBTreeFindPixelLine(tree, pixels, pixelOffset) } if (nodePtr->numPixels == 0) { - panic("TkBTreeFindPixelLine called with empty window"); + Tcl_Panic("TkBTreeFindPixelLine called with empty window"); } /* @@ -1016,7 +1016,7 @@ TkBTreeFindPixelLine(tree, pixels, pixelOffset) nodePtr->numPixels <= pixelsLeft; nodePtr = nodePtr->nextPtr) { if (nodePtr == NULL) { - panic("TkBTreeFindPixelLine ran out of nodes"); + Tcl_Panic("TkBTreeFindPixelLine ran out of nodes"); } pixelsLeft -= nodePtr->numPixels; } @@ -1030,7 +1030,7 @@ TkBTreeFindPixelLine(tree, pixels, pixelOffset) linePtr->pixelHeight < pixelsLeft; linePtr = linePtr->nextPtr) { if (linePtr == NULL) { - panic("TkBTreeFindPixelLine ran out of lines"); + Tcl_Panic("TkBTreeFindPixelLine ran out of lines"); } pixelsLeft -= linePtr->pixelHeight; } @@ -1129,7 +1129,7 @@ TkBTreePreviousLine(linePtr) } prevPtr = prevPtr->nextPtr; if (prevPtr == (TkTextLine *) NULL) { - panic("TkBTreePreviousLine ran out of lines"); + Tcl_Panic("TkBTreePreviousLine ran out of lines"); } } @@ -1205,7 +1205,7 @@ TkBTreePixels(linePtr) for (linePtr2 = nodePtr->children.linePtr; linePtr2 != linePtr; linePtr2 = linePtr2->nextPtr) { if (linePtr2 == NULL) { - panic("TkBTreePixels couldn't find line"); + Tcl_Panic("TkBTreePixels couldn't find line"); } index += linePtr2->pixelHeight; } @@ -1221,7 +1221,7 @@ TkBTreePixels(linePtr) for (nodePtr2 = parentPtr->children.nodePtr; nodePtr2 != nodePtr; nodePtr2 = nodePtr2->nextPtr) { if (nodePtr2 == NULL) { - panic("TkBTreePixels couldn't find node"); + Tcl_Panic("TkBTreePixels couldn't find node"); } index += nodePtr2->numPixels; } @@ -1266,7 +1266,7 @@ TkBTreeLineIndex(linePtr) for (linePtr2 = nodePtr->children.linePtr; linePtr2 != linePtr; linePtr2 = linePtr2->nextPtr) { if (linePtr2 == NULL) { - panic("TkBTreeLineIndex couldn't find line"); + Tcl_Panic("TkBTreeLineIndex couldn't find line"); } index += 1; } @@ -1282,7 +1282,7 @@ TkBTreeLineIndex(linePtr) for (nodePtr2 = parentPtr->children.nodePtr; nodePtr2 != nodePtr; nodePtr2 = nodePtr2->nextPtr) { if (nodePtr2 == NULL) { - panic("TkBTreeLineIndex couldn't find node"); + Tcl_Panic("TkBTreeLineIndex couldn't find node"); } index += nodePtr2->numLines; } @@ -1604,7 +1604,7 @@ ChangeNodeToggleCount(nodePtr, tagPtr, delta) * first place). */ - panic("ChangeNodeToggleCount: bad toggle count (%d) max (%d)", + Tcl_Panic("ChangeNodeToggleCount: bad toggle count (%d) max (%d)", summaryPtr->toggleCount, tagPtr->toggleCount); } @@ -2212,7 +2212,7 @@ TkBTreeNextTag(searchPtr) } searchPtr->linesLeft -= nodePtr->numLines; if (nodePtr->nextPtr == NULL) { - panic("TkBTreeNextTag found incorrect tag summary info."); + Tcl_Panic("TkBTreeNextTag found incorrect tag summary info."); } } nextChild: @@ -2426,7 +2426,7 @@ TkBTreePrevTag(searchPtr) continue; } if (prevNodePtr == NULL) { - panic("TkBTreePrevTag found incorrect tag summary info."); + Tcl_Panic("TkBTreePrevTag found incorrect tag summary info."); } searchPtr->linesLeft -= linesSkipped; nodePtr = prevNodePtr; @@ -2993,21 +2993,21 @@ TkBTreeCheck(tree) nodePtr = tagPtr->tagRootPtr; if (nodePtr == (Node *) NULL) { if (tagPtr->toggleCount != 0) { - panic("TkBTreeCheck found \"%s\" with toggles (%d) but no root", + Tcl_Panic("TkBTreeCheck found \"%s\" with toggles (%d) but no root", tagPtr->name, tagPtr->toggleCount); } continue; /* no ranges for the tag */ } else if (tagPtr->toggleCount == 0) { - panic("TkBTreeCheck found root for \"%s\" with no toggles", + Tcl_Panic("TkBTreeCheck found root for \"%s\" with no toggles", tagPtr->name); } else if (tagPtr->toggleCount & 1) { - panic("TkBTreeCheck found odd toggle count for \"%s\" (%d)", + Tcl_Panic("TkBTreeCheck found odd toggle count for \"%s\" (%d)", tagPtr->name, tagPtr->toggleCount); } for (summaryPtr = nodePtr->summaryPtr; summaryPtr != NULL; summaryPtr = summaryPtr->nextPtr) { if (summaryPtr->tagPtr == tagPtr) { - panic("TkBTreeCheck found root node with summary info"); + Tcl_Panic("TkBTreeCheck found root node with summary info"); } } count = 0; @@ -3035,7 +3035,7 @@ TkBTreeCheck(tree) } } if (count != tagPtr->toggleCount) { - panic("TkBTreeCheck toggleCount (%d) wrong for \"%s\" should be (%d)", + Tcl_Panic("TkBTreeCheck toggleCount (%d) wrong for \"%s\" should be (%d)", tagPtr->toggleCount, tagPtr->name, count); } } @@ -3053,7 +3053,7 @@ TkBTreeCheck(tree) */ if (nodePtr->numLines < 2) { - panic("TkBTreeCheck: less than 2 lines in tree"); + Tcl_Panic("TkBTreeCheck: less than 2 lines in tree"); } while (nodePtr->level > 0) { nodePtr = nodePtr->children.nodePtr; @@ -3078,17 +3078,17 @@ TkBTreeCheck(tree) segPtr = segPtr->nextPtr; } if (segPtr->typePtr != &tkTextCharType) { - panic("TkBTreeCheck: last line has bogus segment type"); + Tcl_Panic("TkBTreeCheck: last line has bogus segment type"); } if (segPtr->nextPtr != NULL) { - panic("TkBTreeCheck: last line has too many segments"); + Tcl_Panic("TkBTreeCheck: last line has too many segments"); } if (segPtr->size != 1) { - panic("TkBTreeCheck: last line has wrong # characters: %d", + Tcl_Panic("TkBTreeCheck: last line has wrong # characters: %d", segPtr->size); } if ((segPtr->body.chars[0] != '\n') || (segPtr->body.chars[1] != 0)) { - panic("TkBTreeCheck: last line had bad value: %s", + Tcl_Panic("TkBTreeCheck: last line had bad value: %s", segPtr->body.chars); } } @@ -3132,7 +3132,7 @@ CheckNodeConsistency(nodePtr) } if ((nodePtr->numChildren < minChildren) || (nodePtr->numChildren > MAX_CHILDREN)) { - panic("CheckNodeConsistency: bad child count (%d)", + Tcl_Panic("CheckNodeConsistency: bad child count (%d)", nodePtr->numChildren); } @@ -3143,10 +3143,10 @@ CheckNodeConsistency(nodePtr) for (linePtr = nodePtr->children.linePtr; linePtr != NULL; linePtr = linePtr->nextPtr) { if (linePtr->parentPtr != nodePtr) { - panic("CheckNodeConsistency: line doesn't point to parent"); + Tcl_Panic("CheckNodeConsistency: line doesn't point to parent"); } if (linePtr->segPtr == NULL) { - panic("CheckNodeConsistency: line has no segments"); + Tcl_Panic("CheckNodeConsistency: line has no segments"); } for (segPtr = linePtr->segPtr; segPtr != NULL; segPtr = segPtr->nextPtr) { @@ -3157,11 +3157,11 @@ CheckNodeConsistency(nodePtr) && (segPtr->nextPtr != NULL) && (segPtr->nextPtr->size == 0) && (segPtr->nextPtr->typePtr->leftGravity)) { - panic("CheckNodeConsistency: wrong segment order for gravity"); + Tcl_Panic("CheckNodeConsistency: wrong segment order for gravity"); } if ((segPtr->nextPtr == NULL) && (segPtr->typePtr != &tkTextCharType)) { - panic("CheckNodeConsistency: line ended with wrong type"); + Tcl_Panic("CheckNodeConsistency: line ended with wrong type"); } } numChildren++; @@ -3172,10 +3172,10 @@ CheckNodeConsistency(nodePtr) for (childNodePtr = nodePtr->children.nodePtr; childNodePtr != NULL; childNodePtr = childNodePtr->nextPtr) { if (childNodePtr->parentPtr != nodePtr) { - panic("CheckNodeConsistency: node doesn't point to parent"); + Tcl_Panic("CheckNodeConsistency: node doesn't point to parent"); } if (childNodePtr->level != (nodePtr->level-1)) { - panic("CheckNodeConsistency: level mismatch (%d %d)", + Tcl_Panic("CheckNodeConsistency: level mismatch (%d %d)", nodePtr->level, childNodePtr->level); } CheckNodeConsistency(childNodePtr); @@ -3187,7 +3187,7 @@ CheckNodeConsistency(nodePtr) if (summaryPtr->tagPtr->tagRootPtr == nodePtr) { break; } - panic("CheckNodeConsistency: node tag \"%s\" not %s", + Tcl_Panic("CheckNodeConsistency: node tag \"%s\" not %s", summaryPtr->tagPtr->name, "present in parent summaries"); } @@ -3202,22 +3202,22 @@ CheckNodeConsistency(nodePtr) } } if (numChildren != nodePtr->numChildren) { - panic("CheckNodeConsistency: mismatch in numChildren (%d %d)", + Tcl_Panic("CheckNodeConsistency: mismatch in numChildren (%d %d)", numChildren, nodePtr->numChildren); } if (numLines != nodePtr->numLines) { - panic("CheckNodeConsistency: mismatch in numLines (%d %d)", + Tcl_Panic("CheckNodeConsistency: mismatch in numLines (%d %d)", numLines, nodePtr->numLines); } if (numPixels != nodePtr->numPixels) { - panic("CheckNodeConsistency: mismatch in numPixels (%d %d)", + Tcl_Panic("CheckNodeConsistency: mismatch in numPixels (%d %d)", numPixels, nodePtr->numPixels); } for (summaryPtr = nodePtr->summaryPtr; summaryPtr != NULL; summaryPtr = summaryPtr->nextPtr) { if (summaryPtr->tagPtr->toggleCount == summaryPtr->toggleCount) { - panic("CheckNodeConsistency: found unpruned root for \"%s\"", + Tcl_Panic("CheckNodeConsistency: found unpruned root for \"%s\"", summaryPtr->tagPtr->name); } toggleCount = 0; @@ -3249,13 +3249,13 @@ CheckNodeConsistency(nodePtr) } } if (toggleCount != summaryPtr->toggleCount) { - panic("CheckNodeConsistency: mismatch in toggleCount (%d %d)", + Tcl_Panic("CheckNodeConsistency: mismatch in toggleCount (%d %d)", toggleCount, summaryPtr->toggleCount); } for (summaryPtr2 = summaryPtr->nextPtr; summaryPtr2 != NULL; summaryPtr2 = summaryPtr2->nextPtr) { if (summaryPtr2->tagPtr == summaryPtr->tagPtr) { - panic("CheckNodeConsistency: duplicated node tag: %s", + Tcl_Panic("CheckNodeConsistency: duplicated node tag: %s", summaryPtr->tagPtr->name); } } @@ -3844,18 +3844,18 @@ CharCheckProc(segPtr, linePtr) */ if (segPtr->size <= 0) { - panic("CharCheckProc: segment has size <= 0"); + Tcl_Panic("CharCheckProc: segment has size <= 0"); } if (strlen(segPtr->body.chars) != (size_t) segPtr->size) { - panic("CharCheckProc: segment has wrong size"); + Tcl_Panic("CharCheckProc: segment has wrong size"); } if (segPtr->nextPtr == NULL) { if (segPtr->body.chars[segPtr->size-1] != '\n') { - panic("CharCheckProc: line doesn't end with newline"); + Tcl_Panic("CharCheckProc: line doesn't end with newline"); } } else { if (segPtr->nextPtr->typePtr == &tkTextCharType) { - panic("CharCheckProc: adjacent character segments weren't merged"); + Tcl_Panic("CharCheckProc: adjacent character segments weren't merged"); } } } @@ -4033,24 +4033,24 @@ ToggleCheckProc(segPtr, linePtr) int needSummary; if (segPtr->size != 0) { - panic("ToggleCheckProc: segment had non-zero size"); + Tcl_Panic("ToggleCheckProc: segment had non-zero size"); } if (!segPtr->body.toggle.inNodeCounts) { - panic("ToggleCheckProc: toggle counts not updated in nodes"); + Tcl_Panic("ToggleCheckProc: toggle counts not updated in nodes"); } needSummary = (segPtr->body.toggle.tagPtr->tagRootPtr != linePtr->parentPtr); for (summaryPtr = linePtr->parentPtr->summaryPtr; ; summaryPtr = summaryPtr->nextPtr) { if (summaryPtr == NULL) { if (needSummary) { - panic("ToggleCheckProc: tag not present in node"); + Tcl_Panic("ToggleCheckProc: tag not present in node"); } else { break; } } if (summaryPtr->tagPtr == segPtr->body.toggle.tagPtr) { if (!needSummary) { - panic("ToggleCheckProc: tag present in root node summary"); + Tcl_Panic("ToggleCheckProc: tag present in root node summary"); } break; } diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 9cab7f8..027bba9 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextDisp.c,v 1.39 2004/01/07 16:28:23 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextDisp.c,v 1.40 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tkPort.h" @@ -1050,7 +1050,7 @@ LayoutDLine(textPtr, indexPtr) * check is redundant: */ if (tagPtr->priority != info.elidePriority) { - panic("Bad tag priority being toggled off"); + Tcl_Panic("Bad tag priority being toggled off"); } /* @@ -1335,7 +1335,7 @@ LayoutDLine(textPtr, indexPtr) chunkPtr = NULL; } if (noCharsYet) { - panic("LayoutDLine couldn't place any characters on a line"); + Tcl_Panic("LayoutDLine couldn't place any characters on a line"); } wholeLine = (segPtr == NULL); @@ -1831,7 +1831,7 @@ UpdateDisplayInfo(textPtr) if (spaceLeft > 0 || dInfoPtr->newTopPixelOffset >= dInfoPtr->dLinePtr->height) { /* Bad situation */ - panic("Pixel height problem while laying out text widget"); + Tcl_Panic("Pixel height problem while laying out text widget"); } } } @@ -1847,7 +1847,7 @@ UpdateDisplayInfo(textPtr) for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) { if (y > dInfoPtr->maxY) { - panic("Added too many new lines in UpdateDisplayInfo"); + Tcl_Panic("Added too many new lines in UpdateDisplayInfo"); } dlPtr->y = y; y += dlPtr->height; @@ -3307,7 +3307,7 @@ TkTextUpdateOneLine(textPtr, linePtr, pixelHeight, indexPtr) char buffer[TCL_INTEGER_SPACE + 1]; if (TkBTreeNextLine(linePtr) == NULL) { - panic("Mustn't ever update line height of last artificial line"); + Tcl_Panic("Mustn't ever update line height of last artificial line"); } sprintf(buffer, "%d", pixelHeight); @@ -5682,7 +5682,9 @@ GetYView(interp, textPtr, report) * pixelHeight is for a logical line. */ #if 0 - panic("Counted more pixels (%d) than expected (%d) total pixels in text widget scroll bar calculation.", count, totalPixels); + Tcl_Panic("Counted more pixels (%d) than expected (%d) total " + "pixels in text widget scroll bar calculation.", count, + totalPixels); #endif count = totalPixels; } @@ -5808,7 +5810,7 @@ FindDLine(dlPtr, indexPtr) } linePtr = TkBTreeNextLine(linePtr); if (linePtr == NULL) { - panic("FindDLine reached end of text"); + Tcl_Panic("FindDLine reached end of text"); } } if (indexPtr->linePtr != dlPtr->index.linePtr) { diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index 4f6535f..50e86be 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextImage.c,v 1.11 2003/12/04 12:28:37 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextImage.c,v 1.12 2004/01/13 02:06:00 davygrvy Exp $ */ #include "tk.h" @@ -289,7 +289,7 @@ TkTextImageCmd(textPtr, interp, objc, objv) return TCL_OK; } default: - panic("unexpected switch fallthrough"); + Tcl_Panic("unexpected switch fallthrough"); } return TCL_ERROR; } @@ -535,7 +535,7 @@ EmbImageLayoutProc(textPtr, indexPtr, eiPtr, offset, maxX, maxChars, int width, height; if (offset != 0) { - panic("Non-zero offset in EmbImageLayoutProc"); + Tcl_Panic("Non-zero offset in EmbImageLayoutProc"); } /* @@ -605,10 +605,10 @@ EmbImageCheckProc(eiPtr, linePtr) TkTextLine *linePtr; /* Line containing segment. */ { if (eiPtr->nextPtr == NULL) { - panic("EmbImageCheckProc: embedded image is last segment in line"); + Tcl_Panic("EmbImageCheckProc: embedded image is last segment in line"); } if (eiPtr->size != 1) { - panic("EmbImageCheckProc: embedded image has size %d", eiPtr->size); + Tcl_Panic("EmbImageCheckProc: embedded image has size %d", eiPtr->size); } } diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 60138eb..85349c2 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextIndex.c,v 1.14 2004/01/07 15:21:02 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextIndex.c,v 1.15 2004/01/13 02:06:01 davygrvy Exp $ */ #include "default.h" @@ -1405,7 +1405,7 @@ TkTextIndexForwChars(textPtr, srcPtr, charCount, dstPtr, type) * check is redundant: */ if (tagPtr->priority != infoPtr->elidePriority) { - panic("Bad tag priority being toggled off"); + Tcl_Panic("Bad tag priority being toggled off"); } /* @@ -1573,7 +1573,7 @@ TkTextIndexCount(textPtr, indexPtr1, indexPtr2, type) * check is redundant: */ if (tagPtr->priority != infoPtr->elidePriority) { - panic("Bad tag priority being toggled off"); + Tcl_Panic("Bad tag priority being toggled off"); } /* @@ -1657,7 +1657,7 @@ TkTextIndexCount(textPtr, indexPtr1, indexPtr2, type) linePtr1 = TkBTreeNextLine(linePtr1); if (linePtr1 == NULL) { - panic("Reached end of text widget when counting characters"); + Tcl_Panic("Reached end of text widget when counting characters"); } segPtr = linePtr1->segPtr; } @@ -1830,7 +1830,7 @@ TkTextIndexBackChars(textPtr, srcPtr, charCount, dstPtr, type) * check is redundant: */ if (tagPtr->priority != infoPtr->elidePriority) { - panic("Bad tag priority being toggled on"); + Tcl_Panic("Bad tag priority being toggled on"); } /* diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index 3ee1738..5933af6 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextMark.c,v 1.10 2003/11/07 15:36:26 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextMark.c,v 1.11 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -647,7 +647,7 @@ MarkCheckProc(markPtr, linePtr) Tcl_HashEntry *hPtr; if (markPtr->body.mark.linePtr != linePtr) { - panic("MarkCheckProc: markPtr->body.mark.linePtr bogus"); + Tcl_Panic("MarkCheckProc: markPtr->body.mark.linePtr bogus"); } /* @@ -659,7 +659,7 @@ MarkCheckProc(markPtr, linePtr) &search); hPtr != markPtr->body.mark.hPtr; hPtr = Tcl_NextHashEntry(&search)) { if (hPtr == NULL) { - panic("MarkCheckProc couldn't find hash table entry for mark"); + Tcl_Panic("MarkCheckProc couldn't find hash table entry for mark"); } } } diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index b5da014..5c59603 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTextWind.c,v 1.11 2003/12/04 12:28:37 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextWind.c,v 1.12 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tk.h" @@ -685,7 +685,7 @@ EmbWinLayoutProc(textPtr, indexPtr, ewPtr, offset, maxX, maxChars, int width, height; if (offset != 0) { - panic("Non-zero offset in EmbWinLayoutProc"); + Tcl_Panic("Non-zero offset in EmbWinLayoutProc"); } if ((ewPtr->body.ew.tkwin == NULL) && (ewPtr->body.ew.create != NULL)) { @@ -820,10 +820,10 @@ EmbWinCheckProc(ewPtr, linePtr) TkTextLine *linePtr; /* Line containing segment. */ { if (ewPtr->nextPtr == NULL) { - panic("EmbWinCheckProc: embedded window is last segment in line"); + Tcl_Panic("EmbWinCheckProc: embedded window is last segment in line"); } if (ewPtr->size != 1) { - panic("EmbWinCheckProc: embedded window has size %d", ewPtr->size); + Tcl_Panic("EmbWinCheckProc: embedded window has size %d", ewPtr->size); } } diff --git a/generic/tkVisual.c b/generic/tkVisual.c index 766862e..d7e85b4 100644 --- a/generic/tkVisual.c +++ b/generic/tkVisual.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkVisual.c,v 1.4 2002/08/05 04:30:40 dgp Exp $ + * RCS: @(#) $Id: tkVisual.c,v 1.5 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -470,7 +470,7 @@ Tk_FreeColormap(display, colormap) dispPtr = TkGetDisplay(display); if (dispPtr == NULL) { - panic("unknown display passed to Tk_FreeColormap"); + Tcl_Panic("unknown display passed to Tk_FreeColormap"); } for (prevPtr = NULL, cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; prevPtr = cmapPtr, cmapPtr = cmapPtr->nextPtr) { @@ -529,7 +529,7 @@ Tk_PreserveColormap(display, colormap) dispPtr = TkGetDisplay(display); if (dispPtr == NULL) { - panic("unknown display passed to Tk_PreserveColormap"); + Tcl_Panic("unknown display passed to Tk_PreserveColormap"); } for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { diff --git a/generic/tkWindow.c b/generic/tkWindow.c index d14f125..05b591d 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.61 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.62 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkPort.h" @@ -864,7 +864,7 @@ TkCreateMainWindow(interp, screenName, baseName) */ if (sizeof(TkWindow) != sizeof(Tk_FakeWin)) { - panic("TkWindow and Tk_FakeWin are not the same size"); + Tcl_Panic("TkWindow and Tk_FakeWin are not the same size"); } /* @@ -929,7 +929,7 @@ TkCreateMainWindow(interp, screenName, baseName) isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL)) { - panic("TkCreateMainWindow: builtin command with NULL string and object procs"); + Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } if (cmdPtr->passMainWindow) { clientData = (ClientData) tkwin; @@ -1430,7 +1430,7 @@ Tk_DestroyWindow(tkwin) halfdeadPtr = halfdeadPtr->nextPtr; } if (halfdeadPtr == NULL) - panic("window not found on half dead list"); + Tcl_Panic("window not found on half dead list"); /* * Cleanup the data structures associated with this window. @@ -1580,7 +1580,7 @@ Tk_DestroyWindow(tkwin) backDispPtr = theDispPtr; } if (theDispPtr == NULL) { - panic("could not find display to close!"); + Tcl_Panic("could not find display to close!"); } if (backDispPtr == NULL) { tsdPtr->displayList = theDispPtr->nextPtr; @@ -1847,7 +1847,7 @@ Tk_ConfigureWindow(tkwin, valueMask, valuePtr) winPtr->changes.border_width = valuePtr->border_width; } if (valueMask & (CWSibling|CWStackMode)) { - panic("Can't set sibling or stack mode from Tk_ConfigureWindow."); + Tcl_Panic("Can't set sibling or stack mode from Tk_ConfigureWindow."); } if (winPtr->window != None) { @@ -2434,7 +2434,7 @@ UnlinkWindow(winPtr) while (prevPtr->nextPtr != winPtr) { prevPtr = prevPtr->nextPtr; if (prevPtr == NULL) { - panic("UnlinkWindow couldn't find child in parent"); + Tcl_Panic("UnlinkWindow couldn't find child in parent"); } } prevPtr->nextPtr = winPtr->nextPtr; diff --git a/mac/tkMacAppInit.c b/mac/tkMacAppInit.c index abbe279..15dfd1a 100644 --- a/mac/tkMacAppInit.c +++ b/mac/tkMacAppInit.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacAppInit.c,v 1.15 2002/10/18 03:01:33 das Exp $ + * RCS: @(#) $Id: tkMacAppInit.c,v 1.16 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -246,7 +246,7 @@ MacintoshInit() NGetTrapAddress(_Unimplemented, ToolTrap)) || (((Gestalt(gestaltSystemVersion, &result) != noErr) || (result < mask)))) { - panic("Tcl/Tk requires System 7 or higher."); + Tcl_Panic("Tcl/Tk requires System 7 or higher."); } /* @@ -256,7 +256,7 @@ MacintoshInit() if (((Gestalt(gestaltQuickdrawVersion, &result) != noErr) || (result < gestalt32BitQD13))) { - panic("Tk requires Color QuickDraw."); + Tcl_Panic("Tk requires Color QuickDraw."); } @@ -317,7 +317,7 @@ SetupMainInterp( return TCL_OK; error: - panic(Tcl_GetStringResult(interp)); + Tcl_Panic(Tcl_GetStringResult(interp)); return TCL_ERROR; } diff --git a/mac/tkMacAppearanceStubs.c b/mac/tkMacAppearanceStubs.c index 0fd0fee..898b21e 100755 --- a/mac/tkMacAppearanceStubs.c +++ b/mac/tkMacAppearanceStubs.c @@ -29,7 +29,7 @@ MoveWindowStructure( short hGlobal, short vGlobal) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } @@ -41,7 +41,7 @@ CreateNewWindow( const Rect *bounds, WindowPtr *outWindow) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } @@ -49,7 +49,7 @@ CreateNewWindow( pascal WindowPtr FrontNonFloatingWindow() { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return NULL; } @@ -58,7 +58,7 @@ GetWindowClass( WindowPtr window, WindowClass *outClass) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } @@ -70,35 +70,35 @@ ApplyThemeBackground( SInt16 inDepth, Boolean inColorDev) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } pascal OSStatus InitFloatingWindows(void) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } pascal OSStatus ShowFloatingWindows(void) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } pascal OSStatus HideFloatingWindows(void) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return noErr; } pascal Boolean IsValidWindowPtr(GrafPtr grafPort) { - panic("Error: Running stub for PPC-Only routine"); + Tcl_Panic("Error: Running stub for PPC-Only routine"); return true; } diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c index a055609..ef2b9eb 100644 --- a/mac/tkMacButton.c +++ b/mac/tkMacButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacButton.c,v 1.20 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkMacButton.c,v 1.21 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkButton.h" @@ -1129,7 +1129,7 @@ InitSampleControls() windowRef = NewCWindow(NULL, &geometry, "\pempty", false, zoomDocProc, (WindowRef) frontWin, true, 0); if (windowRef == NULL) { - panic("Can't allocate buffer window."); + Tcl_Panic("Can't allocate buffer window."); } /* @@ -1156,7 +1156,7 @@ InitSampleControls() err = CreateRootControl(windowRef, &dontCare); if (err != noErr) { - panic("Can't create root control in DrawBufferedControl"); + Tcl_Panic("Can't create root control in DrawBufferedControl"); } userPaneHandle = NewControl(windowRef, &geometry, "\p", diff --git a/mac/tkMacDraw.c b/mac/tkMacDraw.c index f3af2fc..5ef7937 100644 --- a/mac/tkMacDraw.c +++ b/mac/tkMacDraw.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacDraw.c,v 1.9 2002/04/08 09:04:43 das Exp $ + * RCS: @(#) $Id: tkMacDraw.c,v 1.10 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -371,7 +371,7 @@ TkPutImage( pixmap.pmReserved = 0; pixmap.baseAddr = image->data; if (image->bytes_per_line >= 0x4000) { - panic("TkImage too wide!"); + Tcl_Panic("TkImage too wide!"); } pixmap.rowBytes = image->bytes_per_line | 0x8000; diff --git a/mac/tkMacEmbed.c b/mac/tkMacEmbed.c index 06ceaa4..99595cf 100644 --- a/mac/tkMacEmbed.c +++ b/mac/tkMacEmbed.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacEmbed.c,v 1.6 2002/10/09 11:56:39 das Exp $ + * RCS: @(#) $Id: tkMacEmbed.c,v 1.7 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -243,7 +243,7 @@ TkpUseWindow( int result; if (winPtr->window != None) { - panic("TkpUseWindow: X window already assigned"); + Tcl_Panic("TkpUseWindow: X window already assigned"); } /* @@ -516,7 +516,7 @@ TkMacContainerId(winPtr) return (MacDrawable *) containerPtr->parent; } } - panic("TkMacContainerId couldn't find window"); + Tcl_Panic("TkMacContainerId couldn't find window"); return None; } @@ -845,7 +845,7 @@ ContainerEventProc(clientData, eventPtr) containerPtr->parent != eventPtr->xmaprequest.parent; containerPtr = containerPtr->nextPtr) { if (containerPtr == NULL) { - panic("ContainerEventProc couldn't find Container record"); + Tcl_Panic("ContainerEventProc couldn't find Container record"); } } diff --git a/mac/tkMacFont.c b/mac/tkMacFont.c index 61159a8..e72718a 100644 --- a/mac/tkMacFont.c +++ b/mac/tkMacFont.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacFont.c,v 1.8 2002/10/09 11:56:43 das Exp $ + * RCS: @(#) $Id: tkMacFont.c,v 1.9 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -311,7 +311,7 @@ TkpFontPkgInit(mainPtr) */ if (NewGWorld(&gWorld, 0, &rect, NULL, NULL, 0) != noErr) { - panic("TkpFontPkgInit: NewGWorld failed"); + Tcl_Panic("TkpFontPkgInit: NewGWorld failed"); } /* @@ -379,7 +379,7 @@ TkpFontPkgInit(mainPtr) } } if (fontMapOffset != numFonts) { - panic("TkpFontPkgInit: unexpected number of fonts"); + Tcl_Panic("TkpFontPkgInit: unexpected number of fonts"); } mapPtr = &newFontNameMap[numFonts]; @@ -2078,7 +2078,7 @@ GetUtfFaceName( return mapPtr->utfName; } } - panic("GetUtfFaceName: unexpected nativeName"); + Tcl_Panic("GetUtfFaceName: unexpected nativeName"); return NULL; } diff --git a/mac/tkMacInit.c b/mac/tkMacInit.c index e40a55a..4aa684c 100644 --- a/mac/tkMacInit.c +++ b/mac/tkMacInit.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacInit.c,v 1.10 2002/05/20 12:30:16 das Exp $ + * RCS: @(#) $Id: tkMacInit.c,v 1.11 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -223,6 +223,6 @@ TkpDisplayWarning( Tcl_DStringAppend(&ds, title, -1); Tcl_DStringAppend(&ds, ": ", -1); Tcl_DStringAppend(&ds, msg, -1); - panic(Tcl_DStringValue(&ds)); + Tcl_Panic(Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); } diff --git a/mac/tkMacMenus.c b/mac/tkMacMenus.c index 8114daf..69185fc 100644 --- a/mac/tkMacMenus.c +++ b/mac/tkMacMenus.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacMenus.c,v 1.8 2002/01/27 11:11:02 das Exp $ + * RCS: @(#) $Id: tkMacMenus.c,v 1.9 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tcl.h" @@ -186,11 +186,11 @@ TkMacInitMenus( */ if (TkMacUseMenuID(256) != TCL_OK) { - panic("Menu ID 256 is already in use!"); + Tcl_Panic("Menu ID 256 is already in use!"); } tkAppleMenu = NewMenu(256, "\p\024"); if (tkAppleMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkAppleMenu, 0); AppendMenu(tkAppleMenu, "\pAbout Tcl & TkŠ"); @@ -198,11 +198,11 @@ TkMacInitMenus( AppendResMenu(tkAppleMenu, 'DRVR'); if (TkMacUseMenuID(kFileMenu) != TCL_OK) { - panic("Menu ID %d is already in use!", kFileMenu); + Tcl_Panic("Menu ID %d is already in use!", kFileMenu); } tkFileMenu = NewMenu(kFileMenu, "\pFile"); if (tkFileMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkFileMenu, 0); AppendMenu(tkFileMenu, "\pSourceŠ"); @@ -211,11 +211,11 @@ TkMacInitMenus( AppendMenu(tkFileMenu, "\pQuit/Q"); if (TkMacUseMenuID(kEditMenu) != TCL_OK) { - panic("Menu ID %d is already in use!", kEditMenu); + Tcl_Panic("Menu ID %d is already in use!", kEditMenu); } tkEditMenu = NewMenu(kEditMenu, "\pEdit"); if (tkEditMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkEditMenu, 0); AppendMenu(tkEditMenu, "\pCut/X"); @@ -223,7 +223,7 @@ TkMacInitMenus( AppendMenu(tkEditMenu, "\pPaste/V"); AppendMenu(tkEditMenu, "\pClear"); if (TkMacUseMenuID(kHMHelpMenuID) != TCL_OK) { - panic("Help menu ID %s is already in use!", kHMHelpMenuID); + Tcl_Panic("Help menu ID %s is already in use!", kHMHelpMenuID); } DrawMenuBar(); diff --git a/mac/tkMacPort.h b/mac/tkMacPort.h index 91b1b35..c005fa8 100644 --- a/mac/tkMacPort.h +++ b/mac/tkMacPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacPort.h,v 1.11 2001/11/23 02:06:14 das Exp $ + * RCS: @(#) $Id: tkMacPort.h,v 1.12 2004/01/13 02:06:01 davygrvy Exp $ */ #ifndef _TKMACPORT @@ -70,9 +70,6 @@ extern int errno; * in any other header file. */ -#ifndef panic /* In a stubs-aware setting, this could confuse the #define */ -EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *, string)); -#endif #ifndef strcasecmp EXTERN int strcasecmp _ANSI_ARGS_((CONST char *s1, CONST char *s2)); diff --git a/mac/tkMacSubwindows.c b/mac/tkMacSubwindows.c index a60e901..ceea705 100644 --- a/mac/tkMacSubwindows.c +++ b/mac/tkMacSubwindows.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacSubwindows.c,v 1.7 2002/06/14 22:25:12 jenglish Exp $ + * RCS: @(#) $Id: tkMacSubwindows.c,v 1.8 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -425,7 +425,7 @@ XMoveResizeWindow( contWinPtr = TkpGetOtherWindow(macWin->winPtr); if (contWinPtr == NULL) { - panic("XMoveResizeWindow could not find container"); + Tcl_Panic("XMoveResizeWindow could not find container"); } macParent = contWinPtr->privatePtr; @@ -516,29 +516,29 @@ XMoveWindow( int deltaX, deltaY, parentBorderwidth; Rect bounds; MacDrawable *macParent; - - /* - * Find the Parent window - - * For an embedded window this will be its container. - */ - + + /* + * Find the Parent window - + * For an embedded window this will be its container. + */ + if (Tk_IsEmbedded(macWin->winPtr)) { TkWindow *contWinPtr; - + contWinPtr = TkpGetOtherWindow(macWin->winPtr); if (contWinPtr == NULL) { - panic("XMoveWindow could not find container"); + Tcl_Panic("XMoveWindow could not find container"); } macParent = contWinPtr->privatePtr; - + /* * NOTE: Here we should handle out of process embedding. */ - + } else { macParent = macWin->winPtr->parentPtr->privatePtr; if (macParent == NULL) { - return; /* TODO: Probably should be a panic */ + return; /* TODO: Probably should be a panic */ } } @@ -547,12 +547,12 @@ XMoveWindow( deltaX = - macWin->xOff; deltaY = - macWin->yOff; - - /* + + /* * If macWin->winPtr is an embedded window, don't offset by its * parent's borderwidth... */ - + if (!Tk_IsEmbedded(macWin->winPtr)) { parentBorderwidth = macWin->winPtr->parentPtr->changes.border_width; } else { @@ -562,7 +562,7 @@ XMoveWindow( macWin->winPtr->changes.x; deltaY += macParent->yOff + parentBorderwidth + macWin->winPtr->changes.y; - + UpdateOffsets(macWin->winPtr, deltaX, deltaY); TkMacWinBounds(macWin->winPtr, &bounds); InvalRect(&bounds); @@ -1212,7 +1212,7 @@ Tk_GetPixmap( err = NewGWorld(&gWorld, depth, &bounds, NULL, NULL, useTempMem); } if (err != noErr) { - panic("Out of memory: NewGWorld failed in Tk_GetPixmap"); + Tcl_Panic("Out of memory: NewGWorld failed in Tk_GetPixmap"); } /* diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c index d313633..0856b60 100644 --- a/mac/tkMacWm.c +++ b/mac/tkMacWm.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacWm.c,v 1.24 2003/02/09 07:51:04 hobbs Exp $ + * RCS: @(#) $Id: tkMacWm.c,v 1.25 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -2429,7 +2429,7 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); if (windows == NULL) { - panic("TkWmStackorderToplevel failed"); + Tcl_Panic("TkWmStackorderToplevel failed"); } else { for (window_ptr = windows; *window_ptr ; window_ptr++) { Tcl_AppendElement(interp, (*window_ptr)->pathName); @@ -2484,9 +2484,9 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) index2 = (window_ptr - windows); } if (index1 == -1) - panic("winPtr window not found"); + Tcl_Panic("winPtr window not found"); if (index2 == -1) - panic("winPtr2 window not found"); + Tcl_Panic("winPtr2 window not found"); ckfree((char *) windows); } @@ -3009,7 +3009,7 @@ TopLevelEventProc( printf("TopLevelEventProc: %s deleted\n", winPtr->pathName); } } else if (eventPtr->type == ReparentNotify) { - panic("recieved unwanted reparent event"); + Tcl_Panic("recieved unwanted reparent event"); } } @@ -3932,7 +3932,7 @@ Tk_MoveToplevelWindow( register WmInfo *wmPtr = winPtr->wmInfoPtr; if (!(winPtr->flags & TK_TOP_LEVEL)) { - panic("Tk_MoveToplevelWindow called with non-toplevel window"); + Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window"); } wmPtr->x = x; wmPtr->y = y; @@ -4143,7 +4143,7 @@ TkWmStackorderToplevel(parentPtr) frontWindow = frontWindow->nextWindow; } if (window_ptr != (windows-1)) - panic("num matched toplevel windows does not equal num children"); + Tcl_Panic("num matched toplevel windows does not equal num children"); } done: @@ -5094,7 +5094,7 @@ TkUnsupported1Cmd( Tcl_SetResult(interp, "floatSideZoomProc", TCL_STATIC); break; default: - panic("invalid style"); + Tcl_Panic("invalid style"); } if (appearanceSpec) { Tcl_Obj *attributeList, *newResult; @@ -5119,7 +5119,7 @@ TkUnsupported1Cmd( newResult = Tcl_NewStringObj("document", -1); break; default: - panic("invalid class"); + Tcl_Panic("invalid class"); } attributeList = Tcl_NewListObj(0, NULL); @@ -5404,12 +5404,12 @@ TkMacMakeRealWindowExist( } else if (gMacEmbedHandler != NULL) { if (gMacEmbedHandler->containerExistProc != NULL) { if (gMacEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) { - panic("ContainerExistProc could not make container"); + Tcl_Panic("ContainerExistProc could not make container"); } } return; } else { - panic("TkMacMakeRealWindowExist could not find container"); + Tcl_Panic("TkMacMakeRealWindowExist could not find container"); } /* @@ -5444,7 +5444,7 @@ TkMacMakeRealWindowExist( } if (newWindow == NULL) { - panic("couldn't allocate new Mac window"); + Tcl_Panic("couldn't allocate new Mac window"); } /* @@ -5467,7 +5467,7 @@ TkMacMakeRealWindowExist( valueHashPtr = Tcl_CreateHashEntry(&windowTable, (char *) newWindow, &new); if (!new) { - panic("same macintosh window allocated twice!"); + Tcl_Panic("same macintosh window allocated twice!"); } Tcl_SetHashValue(valueHashPtr, macWin); @@ -5509,7 +5509,7 @@ TkMacRegisterOffScreenWindow( valueHashPtr = Tcl_CreateHashEntry(&windowTable, (char *) portPtr, &new); if (!new) { - panic("same macintosh window allocated twice!"); + Tcl_Panic("same macintosh window allocated twice!"); } Tcl_SetHashValue(valueHashPtr, macWin); } @@ -5537,7 +5537,7 @@ TkMacUnregisterMacWindow( GWorldPtr portPtr) /* Pointer to a Mac GWorld. */ { if (!windowHashInit) { - panic("TkMacUnregisterMacWindow: unmapping before inited");; + Tcl_Panic("TkMacUnregisterMacWindow: unmapping before inited");; } Tcl_DeleteHashEntry(Tcl_FindHashEntry(&windowTable, (char *) portPtr)); diff --git a/mac/tkMacXStubs.c b/mac/tkMacXStubs.c index 2de6028..2671aca 100644 --- a/mac/tkMacXStubs.c +++ b/mac/tkMacXStubs.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacXStubs.c,v 1.16 2002/10/09 11:57:05 das Exp $ + * RCS: @(#) $Id: tkMacXStubs.c,v 1.17 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -166,7 +166,7 @@ TkpCloseDisplay( { Display *display = displayPtr->display; if (gMacDisplay != displayPtr) { - panic("TkpCloseDisplay: tried to call TkpCloseDisplay on bad display"); + Tcl_Panic("TkpCloseDisplay: tried to call TkpCloseDisplay on bad display"); } /* @@ -271,7 +271,7 @@ DefaultErrorHandler( * This call should never be called. Tk replaces * it with its own error handler. */ - panic("Warning hit bogus error handler!"); + Tcl_Panic("Warning hit bogus error handler!"); return 0; } diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 3405014..15be5b4 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.2 2002/08/31 06:12:29 das Exp $ + * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.3 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -242,7 +242,7 @@ TkpUseWindow( int result; if (winPtr->window != None) { - panic("TkpUseWindow: X window already assigned"); + Tcl_Panic("TkpUseWindow: X window already assigned"); } /* @@ -502,7 +502,7 @@ TkMacOSXContainerId(winPtr) return (MacDrawable *) containerPtr->parent; } } - panic("TkMacOSXContainerId couldn't find window"); + Tcl_Panic("TkMacOSXContainerId couldn't find window"); return None; } @@ -831,7 +831,7 @@ ContainerEventProc(clientData, eventPtr) containerPtr->parent != eventPtr->xmaprequest.parent; containerPtr = containerPtr->nextPtr) { if (containerPtr == NULL) { - panic("ContainerEventProc couldn't find Container record"); + Tcl_Panic("ContainerEventProc couldn't find Container record"); } } diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 1a6556c..082e7b2 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.3 2002/10/16 19:44:05 das Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.4 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -294,7 +294,7 @@ TkpFontPkgInit(mainPtr) * Used for saving and restoring state while drawing and measuring. */ if (NewGWorld(&gWorld, 0, &rect, NULL, NULL, 0) != noErr) { - panic("TkpFontPkgInit: NewGWorld failed"); + Tcl_Panic("TkpFontPkgInit: NewGWorld failed"); } /* * The name of each font is stored in the encoding of that font. @@ -361,7 +361,7 @@ TkpFontPkgInit(mainPtr) } } if (fontMapOffset != numFonts) { - panic("TkpFontPkgInit: unexpected number of fonts"); + Tcl_Panic("TkpFontPkgInit: unexpected number of fonts"); } mapPtr = &newFontNameMap[numFonts]; @@ -2086,7 +2086,7 @@ GetUtfFaceName( return mapPtr->utfName; } } - panic("GetUtfFaceName: unexpected nativeName"); + Tcl_Panic("GetUtfFaceName: unexpected nativeName"); return NULL; } diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index 805467d..cf28026 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.3 2003/03/08 02:15:46 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.4 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tk.h" @@ -166,11 +166,11 @@ TkMacOSXInitMenus( */ if (TkMacOSXUseMenuID(256) != TCL_OK) { - panic("Menu ID 256 is already in use!"); + Tcl_Panic("Menu ID 256 is already in use!"); } tkAppleMenu = NewMenu(256, "\p\024"); if (tkAppleMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkAppleMenu, 0); AppendMenu(tkAppleMenu, "\pAbout Tcl & TkÉ"); @@ -180,11 +180,11 @@ TkMacOSXInitMenus( */ if (TkMacOSXUseMenuID(kFileMenu) != TCL_OK) { - panic("Menu ID %d is already in use!", kFileMenu); + Tcl_Panic("Menu ID %d is already in use!", kFileMenu); } tkFileMenu = NewMenu(kFileMenu, "\pFile"); if (tkFileMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkFileMenu, 0); AppendMenu(tkFileMenu, "\pSourceÉ"); @@ -193,11 +193,11 @@ TkMacOSXInitMenus( AppendMenu(tkFileMenu, "\pQuit/Q"); if (TkMacOSXUseMenuID(kEditMenu) != TCL_OK) { - panic("Menu ID %d is already in use!", kEditMenu); + Tcl_Panic("Menu ID %d is already in use!", kEditMenu); } tkEditMenu = NewMenu(kEditMenu, "\pEdit"); if (tkEditMenu == NULL) { - panic("memory - menus"); + Tcl_Panic("memory - menus"); } InsertMenu(tkEditMenu, 0); AppendMenu(tkEditMenu, "\pCut/X"); @@ -205,7 +205,7 @@ TkMacOSXInitMenus( AppendMenu(tkEditMenu, "\pPaste/V"); AppendMenu(tkEditMenu, "\pClear"); if (TkMacOSXUseMenuID(kHMHelpMenuID) != TCL_OK) { - panic("Help menu ID %s is already in use!", kHMHelpMenuID); + Tcl_Panic("Help menu ID %s is already in use!", kHMHelpMenuID); } DrawMenuBar(); diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 0d0764f..4768c94 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.5 2002/09/26 17:07:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXNotify.c,v 1.6 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tclInt.h" @@ -288,7 +288,7 @@ TkMacOSXInitNotifier() if (notifierCount == 0) { if (Tcl_CreateThread(¬ifierThread, NotifierThreadProc, NULL, TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) { - panic("Tcl_InitNotifier: unable to start notifier thread"); + Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread"); } } notifierCount++; @@ -347,7 +347,7 @@ TkMacOSXFinalizeNotifier(clientData) if (notifierCount == 0) { if (triggerPipe < 0) { - panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); + Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized"); } /* @@ -971,7 +971,7 @@ NotifierThreadProc(clientData) char buf[2]; if (pipe(fds) != 0) { - panic("NotifierThreadProc: could not create trigger pipe."); + Tcl_Panic("NotifierThreadProc: could not create trigger pipe."); } receivePipe = fds[0]; @@ -980,19 +980,19 @@ NotifierThreadProc(clientData) status = fcntl(receivePipe, F_GETFL); status |= O_NONBLOCK; if (fcntl(receivePipe, F_SETFL, status) < 0) { - panic("NotifierThreadProc: could not make receive pipe non blocking."); + Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking."); } status = fcntl(fds[1], F_GETFL); status |= O_NONBLOCK; if (fcntl(fds[1], F_SETFL, status) < 0) { - panic("NotifierThreadProc: could not make trigger pipe non blocking."); + Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking."); } #else if (ioctl(receivePipe, (int) FIONBIO, &status) < 0) { - panic("NotifierThreadProc: could not make receive pipe non blocking."); + Tcl_Panic("NotifierThreadProc: could not make receive pipe non blocking."); } if (ioctl(fds[1], (int) FIONBIO, &status) < 0) { - panic("NotifierThreadProc: could not make trigger pipe non blocking."); + Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking."); } #endif diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h index def575d..1f8dbc1 100644 --- a/macosx/tkMacOSXPort.h +++ b/macosx/tkMacOSXPort.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXPort.h,v 1.4 2003/09/30 23:26:09 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXPort.h,v 1.5 2004/01/13 02:06:01 davygrvy Exp $ */ #ifndef _TKMACPORT @@ -137,9 +137,6 @@ extern int errno; * in any other header file. */ -#ifndef panic /* In a stubs-aware setting, this could confuse the #define */ -extern void panic _ANSI_ARGS_(TCL_VARARGS(char *, string)); -#endif #ifndef strcasecmp extern int strcasecmp _ANSI_ARGS_((CONST char *s1, CONST char *s2)); diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 380725f..064d470 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2 2002/08/31 06:12:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.3 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -425,7 +425,7 @@ XMoveResizeWindow( contWinPtr = TkpGetOtherWindow(macWin->winPtr); if (contWinPtr == NULL) { - panic("XMoveResizeWindow could not find container"); + Tcl_Panic("XMoveResizeWindow could not find container"); } macParent = contWinPtr->privatePtr; @@ -527,7 +527,7 @@ XMoveWindow( contWinPtr = TkpGetOtherWindow(macWin->winPtr); if (contWinPtr == NULL) { - panic("XMoveWindow could not find container"); + Tcl_Panic("XMoveWindow could not find container"); } macParent = contWinPtr->privatePtr; @@ -1259,7 +1259,7 @@ Tk_GetPixmap( err = NewGWorld(&gWorld, depth, &bounds, NULL, NULL, useTempMem); } if (err != noErr) { - panic("Out of memory: NewGWorld failed in Tk_GetPixmap"); + Tcl_Panic("Out of memory: NewGWorld failed in Tk_GetPixmap"); } /* diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index cb3f39c..ff4b41e 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXWm.c,v 1.8 2003/09/26 16:04:20 cc_benny Exp $ + * RCS: @(#) $Id: tkMacOSXWm.c,v 1.9 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -2251,7 +2251,7 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */ if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); if (windows == NULL) { - panic("TkWmStackorderToplevel failed"); + Tcl_Panic("TkWmStackorderToplevel failed"); } else { for (window_ptr = windows; *window_ptr ; window_ptr++) { Tcl_AppendElement(interp, (*window_ptr)->pathName); @@ -2306,9 +2306,9 @@ Tcl_Obj *CONST objv[]; /* Argument objects. */ index2 = (window_ptr - windows); } if (index1 == -1) - panic("winPtr window not found"); + Tcl_Panic("winPtr window not found"); if (index2 == -1) - panic("winPtr2 window not found"); + Tcl_Panic("winPtr2 window not found"); ckfree((char *) windows); } @@ -2820,7 +2820,7 @@ TopLevelEventProc( printf("TopLevelEventProc: %s deleted\n", winPtr->pathName); } } else if (eventPtr->type == ReparentNotify) { - panic("recieved unwanted reparent event"); + Tcl_Panic("recieved unwanted reparent event"); } } @@ -3737,7 +3737,7 @@ Tk_MoveToplevelWindow( WmInfo *wmPtr = winPtr->wmInfoPtr; if (!(winPtr->flags & TK_TOP_LEVEL)) { - panic("Tk_MoveToplevelWindow called with non-toplevel window"); + Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window"); } wmPtr->x = x; wmPtr->y = y; @@ -4555,7 +4555,7 @@ TkUnsupported1Cmd( Tcl_SetResult(interp, "floatSideZoomProc", TCL_STATIC); break; default: - panic("invalid style"); + Tcl_Panic("invalid style"); } if (appearanceSpec) { Tcl_Obj *attributeList, *newResult = NULL; @@ -4586,7 +4586,7 @@ TkUnsupported1Cmd( newResult = Tcl_NewStringObj("toolbar", -1); break; default: - panic("invalid class"); + Tcl_Panic("invalid class"); } attributeList = Tcl_NewListObj(0, NULL); @@ -4888,13 +4888,13 @@ TkMacOSXMakeRealWindowExist( return; } else if (gMacEmbedHandler != NULL) { if (gMacEmbedHandler->containerExistProc != NULL) { - if (gMacEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) { - panic("ContainerExistProc could not make container"); - } + if (gMacEmbedHandler->containerExistProc((Tk_Window) winPtr) != TCL_OK) { + Tcl_Panic("ContainerExistProc could not make container"); + } } return; } else { - panic("TkMacOSXMakeRealWindowExist could not find container"); + Tcl_Panic("TkMacOSXMakeRealWindowExist could not find container"); } /* @@ -4929,10 +4929,10 @@ TkMacOSXMakeRealWindowExist( } if (newWindow == NULL) { - panic("couldn't allocate new Mac window"); + Tcl_Panic("couldn't allocate new Mac window"); } if (CreateRootControl(newWindow,&rootControl) != noErr ) { - panic("couldn't create root control for new Mac window"); + Tcl_Panic("couldn't create root control for new Mac window"); } /* @@ -4956,7 +4956,7 @@ TkMacOSXMakeRealWindowExist( valueHashPtr = Tcl_CreateHashEntry(&windowTable, (char *) newWindow, &new); if (!new) { - panic("same macintosh window allocated twice!"); + Tcl_Panic("same macintosh window allocated twice!"); } Tcl_SetHashValue(valueHashPtr, macWin); @@ -5000,7 +5000,7 @@ TkMacOSXRegisterOffScreenWindow( valueHashPtr = Tcl_CreateHashEntry(&windowTable, (char *) portPtr, &new); if (!new) { - panic("same macintosh window allocated twice!"); + Tcl_Panic("same macintosh window allocated twice!"); } Tcl_SetHashValue(valueHashPtr, macWin); } @@ -5029,7 +5029,7 @@ TkMacOSXUnregisterMacWindow( { Tcl_HashEntry *entryPtr; if (!windowHashInit) { - panic("TkMacOSXUnregisterMacWindow: unmapping before inited"); + Tcl_Panic("TkMacOSXUnregisterMacWindow: unmapping before inited"); } entryPtr=Tcl_FindHashEntry(&windowTable,(char *) macWinPtr); if (!entryPtr) { @@ -5504,7 +5504,7 @@ TkWmStackorderToplevel(parentPtr) frontWindow = GetNextWindow(frontWindow); } if (window_ptr != (windows-1)) - panic("num matched toplevel windows does not equal num children"); + Tcl_Panic("num matched toplevel windows does not equal num children"); } done: diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index baadba5..8d9aee7 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.3 2003/03/18 13:47:52 das Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.4 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -178,7 +178,7 @@ TkpCloseDisplay( { Display *display = displayPtr->display; if (gMacDisplay != displayPtr) { - panic("TkpCloseDisplay: tried to call TkpCloseDisplay on bad display"); + Tcl_Panic("TkpCloseDisplay: tried to call TkpCloseDisplay on bad display"); } /* @@ -283,7 +283,7 @@ DefaultErrorHandler( * This call should never be called. Tk replaces * it with its own error handler. */ - panic("Warning hit bogus error handler!"); + Tcl_Panic("Warning hit bogus error handler!"); return 0; } diff --git a/unix/tkUnix3d.c b/unix/tkUnix3d.c index 5349a3f..9d7bab5 100644 --- a/unix/tkUnix3d.c +++ b/unix/tkUnix3d.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnix3d.c,v 1.7 2002/08/31 06:12:31 das Exp $ + * RCS: @(#) $Id: tkUnix3d.c,v 1.8 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -455,7 +455,7 @@ TkpGetShadows(borderPtr, tkwin) borderPtr->shadow = Tk_GetBitmap((Tcl_Interp *) NULL, tkwin, Tk_GetUid("gray50")); if (borderPtr->shadow == None) { - panic("TkpGetShadows couldn't allocate bitmap for border"); + Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border"); } } if (borderPtr->visual->map_entries > 2) { diff --git a/unix/tkUnixColor.c b/unix/tkUnixColor.c index e2def60..0337ee6 100644 --- a/unix/tkUnixColor.c +++ b/unix/tkUnixColor.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixColor.c,v 1.2 1998/09/14 18:23:55 stanton Exp $ + * RCS: @(#) $Id: tkUnixColor.c,v 1.3 2004/01/13 02:06:01 davygrvy Exp $ */ #include @@ -269,7 +269,7 @@ FindClosestColor(tkwin, desiredColorPtr, actualColorPtr) visInfoPtr = XGetVisualInfo(Tk_Display(tkwin), VisualIDMask, &template, &numFound); if (numFound < 1) { - panic("FindClosestColor couldn't lookup visual"); + Tcl_Panic("FindClosestColor couldn't lookup visual"); } stressPtr->numColors = visInfoPtr->colormap_size; XFree((char *) visInfoPtr); @@ -299,7 +299,7 @@ FindClosestColor(tkwin, desiredColorPtr, actualColorPtr) while (1) { if (stressPtr->numColors == 0) { - panic("FindClosestColor ran out of colors"); + Tcl_Panic("FindClosestColor ran out of colors"); } closestDistance = 1e30; closest = 0; diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index 6cf9159..5d46e84 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEmbed.c,v 1.6 2002/08/05 04:30:41 dgp Exp $ + * RCS: @(#) $Id: tkUnixEmbed.c,v 1.7 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -115,7 +115,7 @@ TkpUseWindow(interp, tkwin, string) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr->window != None) { - panic("TkUseWindow: X window already assigned"); + Tcl_Panic("TkUseWindow: X window already assigned"); } if (Tcl_GetInt(interp, string, &id) != TCL_OK) { return TCL_ERROR; @@ -232,7 +232,7 @@ TkpMakeWindow(winPtr, parent) for (containerPtr = tsdPtr->firstContainerPtr; ; containerPtr = containerPtr->nextPtr) { if (containerPtr == NULL) { - panic("TkMakeWindow couldn't find container for window"); + Tcl_Panic("TkMakeWindow couldn't find container for window"); } if (containerPtr->embeddedPtr == winPtr) { break; @@ -421,7 +421,7 @@ ContainerEventProc(clientData, eventPtr) containerPtr->parent != eventPtr->xmaprequest.parent; containerPtr = containerPtr->nextPtr) { if (containerPtr == NULL) { - panic("ContainerEventProc couldn't find Container record"); + Tcl_Panic("ContainerEventProc couldn't find Container record"); } } @@ -729,7 +729,7 @@ TkpGetOtherWindow(winPtr) return containerPtr->embeddedPtr; } } - panic("TkpGetOtherWindow couldn't find window"); + Tcl_Panic("TkpGetOtherWindow couldn't find window"); return NULL; } @@ -1029,6 +1029,6 @@ TkUnixContainerId(winPtr) return containerPtr->parent; } } - panic("TkUnixContainerId couldn't find window"); + Tcl_Panic("TkUnixContainerId couldn't find window"); return None; } diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index b4c1654..b76130e 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEvent.c,v 1.13 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkUnixEvent.c,v 1.14 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -224,7 +224,7 @@ TkpCloseDisplay(dispPtr) if (do_peek) { peek = (struct XIMPeek *) dispPtr->inputMethod; if (peek->ic_chain != NULL) - panic("input contexts not freed before XCloseIM"); + Tcl_Panic("input contexts not freed before XCloseIM"); } #endif XCloseIM(dispPtr->inputMethod); diff --git a/unix/tkUnixFocus.c b/unix/tkUnixFocus.c index 17dbb04..7093544 100644 --- a/unix/tkUnixFocus.c +++ b/unix/tkUnixFocus.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFocus.c,v 1.3 1999/04/16 01:51:46 stanton Exp $ + * RCS: @(#) $Id: tkUnixFocus.c,v 1.4 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -115,7 +115,7 @@ TkpChangeFocus(winPtr, force) errHandler = Tk_CreateErrorHandler(dispPtr->display, -1, -1, -1, (Tk_ErrorProc *) NULL, (ClientData) NULL); if (winPtr->window == None) { - panic("ChangeXFocus got null X window"); + Tcl_Panic("ChangeXFocus got null X window"); } XSetInputFocus(dispPtr->display, winPtr->window, RevertToParent, CurrentTime); diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index bf1c8b0..e004acb 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.21 2003/10/28 22:51:41 hobbs Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.22 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkUnixInt.h" @@ -2672,7 +2672,7 @@ GetSystemFont(display) if (fontStructPtr == NULL) { fontStructPtr = XLoadQueryFont(display, "*"); if (fontStructPtr == NULL) { - panic("TkpGetFontFromAttributes: cannot get any font"); + Tcl_Panic("TkpGetFontFromAttributes: cannot get any font"); } } return fontStructPtr; diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index 92add7f..3920dcb 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixSelect.c,v 1.11 2002/10/01 08:48:08 dkf Exp $ + * RCS: @(#) $Id: tkUnixSelect.c,v 1.12 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkInt.h" @@ -351,7 +351,7 @@ TkSelPropProc(eventPtr) } numItems += length; if (numItems > TK_SEL_BYTES_AT_ONCE) { - panic("selection handler returned too many bytes"); + Tcl_Panic("selection handler returned too many bytes"); } } ((char *) buffer)[numItems] = 0; @@ -448,7 +448,7 @@ TkSelPropProc(eventPtr) */ if (srcLen > TCL_UTF_MAX) { - panic("selection conversion left too many bytes unconverted"); + Tcl_Panic("selection conversion left too many bytes unconverted"); } memcpy(incrPtr->converts[i].buffer, src, (size_t) srcLen+1); Tcl_DStringFree(&ds); @@ -934,7 +934,7 @@ ConvertSelection(winPtr, eventPtr) continue; } if (numItems > TK_SEL_BYTES_AT_ONCE) { - panic("selection handler returned too many bytes"); + Tcl_Panic("selection handler returned too many bytes"); } ((char *) buffer)[numItems] = '\0'; } diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 4e115c8..024005c 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixSend.c,v 1.11 2002/08/13 16:20:49 rmax Exp $ + * RCS: @(#) $Id: tkUnixSend.c,v 1.12 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkPort.h" @@ -534,7 +534,7 @@ RegClose(regPtr) { if (regPtr->modified) { if (!regPtr->locked && !sendDebug) { - panic("The name registry was modified without being locked!"); + Tcl_Panic("The name registry was modified without being locked!"); } XChangeProperty(regPtr->dispPtr->display, RootWindow(regPtr->dispPtr->display, 0), @@ -1141,7 +1141,7 @@ Tk_SendCmd(clientData, interp, argc, argv) */ if (tsdPtr->pendingCommands != &pending) { - panic("Tk_SendCmd: corrupted send stack"); + Tcl_Panic("Tk_SendCmd: corrupted send stack"); } tsdPtr->pendingCommands = pending.nextPtr; if (pending.errorInfo != NULL) { @@ -1319,7 +1319,7 @@ SendInit(interp, dispPtr) dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL, "_comm", DisplayString(dispPtr->display)); if (dispPtr->commTkwin == NULL) { - panic("Tk_CreateWindow failed in SendInit!"); + Tcl_Panic("Tk_CreateWindow failed in SendInit!"); } Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 0d535ea..ea414c6 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixWm.c,v 1.38 2003/10/15 20:04:03 jenglish Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.39 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkPort.h" @@ -787,7 +787,7 @@ TkWmDeadWindow(winPtr) for (prevPtr = (WmInfo *) winPtr->dispPtr->firstWmPtr; ; prevPtr = prevPtr->nextPtr) { if (prevPtr == NULL) { - panic("couldn't unlink window in TkWmDeadWindow"); + Tcl_Panic("couldn't unlink window in TkWmDeadWindow"); } if (prevPtr->nextPtr == wmPtr) { prevPtr->nextPtr = wmPtr->nextPtr; @@ -875,7 +875,7 @@ TkWmDeadWindow(winPtr) } } if (wmPtr->numTransients != 0) - panic("numTransients should be 0"); + Tcl_Panic("numTransients should be 0"); if (wmPtr->masterPtr != NULL) { wmPtr2 = wmPtr->masterPtr->wmInfoPtr; @@ -2716,7 +2716,7 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); if (windows == NULL) { - panic("TkWmStackorderToplevel failed"); + Tcl_Panic("TkWmStackorderToplevel failed"); } else { for (window_ptr = windows; *window_ptr ; window_ptr++) { Tcl_AppendElement(interp, (*window_ptr)->pathName); @@ -2771,9 +2771,9 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) index2 = (window_ptr - windows); } if (index1 == -1) - panic("winPtr window not found"); + Tcl_Panic("winPtr window not found"); if (index2 == -1) - panic("winPtr2 window not found"); + Tcl_Panic("winPtr2 window not found"); ckfree((char *) windows); } @@ -5189,7 +5189,7 @@ Tk_MoveToplevelWindow(tkwin, x, y) register WmInfo *wmPtr = winPtr->wmInfoPtr; if (!(winPtr->flags & TK_TOP_LEVEL)) { - panic("Tk_MoveToplevelWindow called with non-toplevel window"); + Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window"); } wmPtr->x = x; wmPtr->y = y; @@ -5469,7 +5469,7 @@ TkWmStackorderToplevel(parentPtr) } } if ((window_ptr - windows) != table.numEntries) - panic("num matched toplevel windows does not equal num children"); + Tcl_Panic("num matched toplevel windows does not equal num children"); *window_ptr = NULL; if (numChildren) { XFree((char *) children); @@ -6114,7 +6114,7 @@ TkUnixSetMenubar(tkwin, menubar) } else { if ((menubarPtr->flags & TK_TOP_LEVEL) || (Tk_Screen(menubar) != Tk_Screen(tkwin))) { - panic("TkUnixSetMenubar got bad menubar"); + Tcl_Panic("TkUnixSetMenubar got bad menubar"); } wmPtr->menuHeight = Tk_ReqHeight(menubar); if (wmPtr->menuHeight == 0) { diff --git a/win/tkWin3d.c b/win/tkWin3d.c index 1b14dd2..3c97560 100644 --- a/win/tkWin3d.c +++ b/win/tkWin3d.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWin3d.c,v 1.6 2003/08/20 23:31:39 patthoyts Exp $ + * RCS: @(#) $Id: tkWin3d.c,v 1.7 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkWinInt.h" @@ -478,7 +478,7 @@ TkpGetShadows(borderPtr, tkwin) borderPtr->shadow = Tk_GetBitmap((Tcl_Interp *) NULL, tkwin, Tk_GetUid("gray50")); if (borderPtr->shadow == None) { - panic("TkpGetShadows couldn't allocate bitmap for border"); + Tcl_Panic("TkpGetShadows couldn't allocate bitmap for border"); } } if (borderPtr->visual->map_entries > 2) { diff --git a/win/tkWinButton.c b/win/tkWinButton.c index c085af7..b10f35f 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.23 2003/10/10 00:03:01 hobbs Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.24 2004/01/13 02:06:01 davygrvy Exp $ */ #define OEMRESOURCE @@ -1155,7 +1155,7 @@ ButtonProc(hwnd, message, wParam, lParam) Tk_Window tkwin = Tk_HWNDToWindow(hwnd); if (tkwin == NULL) { - panic("ButtonProc called on an invalid HWND"); + Tcl_Panic("ButtonProc called on an invalid HWND"); } butPtr = (WinButton *)((TkWindow*)tkwin)->instanceData; diff --git a/win/tkWinColor.c b/win/tkWinColor.c index 4bfd519..134176f 100644 --- a/win/tkWinColor.c +++ b/win/tkWinColor.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinColor.c,v 1.6 2000/07/06 03:17:44 mo Exp $ + * RCS: @(#) $Id: tkWinColor.c,v 1.7 2004/01/13 02:06:01 davygrvy Exp $ */ #include "tkWinInt.h" @@ -462,7 +462,7 @@ XFreeColors(display, colormap, pixels, npixels, planes) entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (char *) pixels[i]); if (!entryPtr) { - panic("Tried to free a color that isn't allocated."); + Tcl_Panic("Tried to free a color that isn't allocated."); } refCount = (int) Tcl_GetHashValue(entryPtr) - 1; if (refCount == 0) { @@ -478,7 +478,7 @@ XFreeColors(display, colormap, pixels, npixels, planes) ckfree((char *) entries); cmap->size--; } else { - panic("Tried to free a color that isn't allocated."); + Tcl_Panic("Tried to free a color that isn't allocated."); } Tcl_DeleteHashEntry(entryPtr); } else { @@ -576,7 +576,7 @@ XFreeColormap(display, colormap) { TkWinColormap *cmap = (TkWinColormap *) colormap; if (!DeleteObject(cmap->palette)) { - panic("Unable to free colormap, palette is still selected."); + Tcl_Panic("Unable to free colormap, palette is still selected."); } Tcl_DeleteHashTable(&cmap->refCounts); ckfree((char *) cmap); diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 9d2bee1..1ede6d5 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDialog.c,v 1.32 2003/07/28 22:12:33 patthoyts Exp $ + * RCS: @(#) $Id: tkWinDialog.c,v 1.33 2004/01/13 02:06:01 davygrvy Exp $ * */ @@ -16,6 +16,9 @@ #include "tkFileFilter.h" #include /* includes common dialog functionality */ +#ifdef _MSC_VER +# pragma comment (lib, "comdlg32.lib") +#endif #include /* includes common dialog template defines */ #include /* includes the common dialog error codes */ @@ -25,6 +28,9 @@ #define USE_NEW_CHOOSEDIR 1 #ifdef USE_NEW_CHOOSEDIR #include /* includes SHBrowseForFolder */ +#ifdef _MSC_VER +# pragma comment (lib, "shell32.lib") +#endif /* These needed for compilation with VC++ 5.2 */ #ifndef BIF_EDITBOX diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c index 86d22a8..53d5cfa 100644 --- a/win/tkWinDraw.c +++ b/win/tkWinDraw.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinDraw.c,v 1.13 2003/11/11 00:26:17 hobbs Exp $ + * RCS: @(#) $Id: tkWinDraw.c,v 1.14 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -377,7 +377,7 @@ XCopyPlane(display, src, dest, gc, src_x, src_y, width, height, dest_x, display->request++; if (plane != 1) { - panic("Unexpected plane specified for XCopyPlane"); + Tcl_Panic("Unexpected plane specified for XCopyPlane"); } srcDC = TkWinGetDrawableDC(display, src, &srcState); @@ -590,7 +590,7 @@ TkPutImage(colors, ncolors, display, d, gc, image, src_x, src_y, dest_x, ckfree((char *) infoPtr); } if(!bitmap) { - panic("Fail to allocate bitmap\n"); + Tcl_Panic("Fail to allocate bitmap\n"); DeleteDC(dcMem); TkWinReleaseDrawableDC(d, dc, &state); return; @@ -650,7 +650,7 @@ XFillRectangles(display, d, gc, rectangles, nrectangles) HBRUSH bgBrush = CreateSolidBrush(gc->background); if (twdPtr->type != TWD_BITMAP) { - panic("unexpected drawable type in stipple"); + Tcl_Panic("unexpected drawable type in stipple"); } /* @@ -766,7 +766,7 @@ RenderObject(dc, gc, points, npoints, mode, pen, func) HBRUSH oldMemBrush; if (twdPtr->type != TWD_BITMAP) { - panic("unexpected drawable type in stipple"); + Tcl_Panic("unexpected drawable type in stipple"); } /* diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 62ffbb3..1dae4d5 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinEmbed.c,v 1.9 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkWinEmbed.c,v 1.10 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -156,7 +156,7 @@ TkpUseWindow(interp, tkwin, string) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr->window != None) { - panic("TkpUseWindow: Already assigned a window"); + Tcl_Panic("TkpUseWindow: Already assigned a window"); } if (Tcl_GetInt(interp, string, &id) != TCL_OK) { @@ -542,7 +542,7 @@ TkpGetOtherWindow(winPtr) return containerPtr->embeddedPtr; } } - panic("TkpGetOtherWindow couldn't find window"); + Tcl_Panic("TkpGetOtherWindow couldn't find window"); return NULL; } @@ -659,7 +659,7 @@ EmbedWindowDeleted(winPtr) prevPtr = containerPtr; containerPtr = containerPtr->nextPtr; if (containerPtr == NULL) { - panic("EmbedWindowDeleted couldn't find window"); + Tcl_Panic("EmbedWindowDeleted couldn't find window"); } } if ((containerPtr->embeddedPtr == NULL) diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 46ba291..e78cd81 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinFont.c,v 1.21 2003/12/18 14:48:58 cc_benny Exp $ + * RCS: @(#) $Id: tkWinFont.c,v 1.22 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -852,7 +852,7 @@ Tk_DrawChars( SIZE size; if (twdPtr->type != TWD_BITMAP) { - panic("unexpected drawable type in stipple"); + Tcl_Panic("unexpected drawable type in stipple"); } /* diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index 75f820c..d1fc569 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPixmap.c,v 1.3 2000/02/01 11:41:44 hobbs Exp $ + * RCS: @(#) $Id: tkWinPixmap.c,v 1.4 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -169,14 +169,14 @@ XGetGeometry(display, d, root_return, x_return, y_return, width_return, BITMAPINFO info; if (twdPtr->bitmap.handle == NULL) { - panic("XGetGeometry: invalid pixmap"); + Tcl_Panic("XGetGeometry: invalid pixmap"); } dc = GetDC(NULL); info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); info.bmiHeader.biBitCount = 0; if (!GetDIBits(dc, twdPtr->bitmap.handle, 0, 0, NULL, &info, DIB_RGB_COLORS)) { - panic("XGetGeometry: unable to get bitmap size"); + Tcl_Panic("XGetGeometry: unable to get bitmap size"); } ReleaseDC(NULL, dc); @@ -186,13 +186,13 @@ XGetGeometry(display, d, root_return, x_return, y_return, width_return, RECT rect; if (twdPtr->window.handle == NULL) { - panic("XGetGeometry: invalid window"); + Tcl_Panic("XGetGeometry: invalid window"); } GetClientRect(twdPtr->window.handle, &rect); *width_return = rect.right - rect.left; *height_return = rect.bottom - rect.top; } else { - panic("XGetGeometry: invalid window"); + Tcl_Panic("XGetGeometry: invalid window"); } return 1; } diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index 453ea26..28591cd 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPointer.c,v 1.8 2000/04/19 01:06:51 ericm Exp $ + * RCS: @(#) $Id: tkWinPointer.c,v 1.9 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -469,7 +469,7 @@ TkpChangeFocus(winPtr, force) } if (winPtr->window == None) { - panic("ChangeXFocus got null X window"); + Tcl_Panic("ChangeXFocus got null X window"); } /* diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index 359fc46..7ad61d8 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinScrlbr.c,v 1.9 2003/02/21 02:07:50 hobbs Exp $ + * RCS: @(#) $Id: tkWinScrlbr.c,v 1.10 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -515,7 +515,7 @@ ScrollbarProc(hwnd, message, wParam, lParam) Tk_Window tkwin = Tk_HWNDToWindow(hwnd); if (tkwin == NULL) { - panic("ScrollbarProc called on an invalid HWND"); + Tcl_Panic("ScrollbarProc called on an invalid HWND"); } scrollPtr = (WinScrollbar *)((TkWindow*)tkwin)->instanceData; diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 303ebd2..e555484 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.59 2003/12/16 19:53:33 a_kovalenko Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.60 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -864,7 +864,7 @@ InitWindowClass(WinIconPtr titlebaricon) { class.hCursor = LoadCursor(NULL, IDC_ARROW); if (!(*tkWinProcs->registerClass)(&class)) { - panic("Unable to register TkTopLevel class"); + Tcl_Panic("Unable to register TkTopLevel class"); } Tcl_DStringFree(&classString); } @@ -1829,10 +1829,10 @@ UpdateWrapper(winPtr) if (winPtr->flags & TK_EMBEDDED) { wmPtr->wrapper = (HWND) winPtr->privatePtr; if (wmPtr->wrapper == NULL) { - panic("UpdateWrapper: Cannot find container window"); + Tcl_Panic("UpdateWrapper: Cannot find container window"); } if (!IsWindow(wmPtr->wrapper)) { - panic("UpdateWrapper: Container was destroyed"); + Tcl_Panic("UpdateWrapper: Container was destroyed"); } } else { @@ -2246,7 +2246,7 @@ TkWmDeadWindow(winPtr) for (prevPtr = winPtr->dispPtr->firstWmPtr; ; prevPtr = prevPtr->nextPtr) { if (prevPtr == NULL) { - panic("couldn't unlink window in TkWmDeadWindow"); + Tcl_Panic("couldn't unlink window in TkWmDeadWindow"); } if (prevPtr->nextPtr == wmPtr) { prevPtr->nextPtr = wmPtr->nextPtr; @@ -2274,7 +2274,7 @@ TkWmDeadWindow(winPtr) } } if (wmPtr->numTransients != 0) - panic("numTransients should be 0"); + Tcl_Panic("numTransients should be 0"); if (wmPtr->title != NULL) { ckfree(wmPtr->title); @@ -4286,7 +4286,7 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) if (objc == 3) { windows = TkWmStackorderToplevel(winPtr); if (windows == NULL) { - panic("TkWmStackorderToplevel failed"); + Tcl_Panic("TkWmStackorderToplevel failed"); } else { for (window_ptr = windows; *window_ptr ; window_ptr++) { Tcl_AppendElement(interp, (*window_ptr)->pathName); @@ -4341,9 +4341,9 @@ WmStackorderCmd(tkwin, winPtr, interp, objc, objv) index2 = (window_ptr - windows); } if (index1 == -1) - panic("winPtr window not found"); + Tcl_Panic("winPtr window not found"); if (index2 == -1) - panic("winPtr2 window not found"); + Tcl_Panic("winPtr2 window not found"); ckfree((char *) windows); } @@ -5586,7 +5586,7 @@ Tk_MoveToplevelWindow(tkwin, x, y) register WmInfo *wmPtr = winPtr->wmInfoPtr; if (!(winPtr->flags & TK_TOP_LEVEL)) { - panic("Tk_MoveToplevelWindow called with non-toplevel window"); + Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window"); } wmPtr->x = x; wmPtr->y = y; @@ -5717,7 +5717,7 @@ BOOL CALLBACK TkWmStackorderToplevelEnumProc(hwnd, lParam) childWinPtr = (TkWindow *) Tcl_GetHashValue(hPtr); /* Double check that same HWND does not get passed twice */ if (childWinPtr == NULL) { - panic("duplicate HWND in TkWmStackorderToplevelEnumProc"); + Tcl_Panic("duplicate HWND in TkWmStackorderToplevelEnumProc"); } else { Tcl_SetHashValue(hPtr, NULL); } @@ -5841,7 +5841,7 @@ TkWmStackorderToplevel(parentPtr) windows = NULL; } else { if (pair.window_ptr != (windows-1)) - panic("num matched toplevel windows does not equal num children"); + Tcl_Panic("num matched toplevel windows does not equal num children"); } done: diff --git a/win/tkWinX.c b/win/tkWinX.c index 8a4fe05..9327db1 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinX.c,v 1.27 2003/12/21 23:50:13 davygrvy Exp $ + * RCS: @(#) $Id: tkWinX.c,v 1.28 2004/01/13 02:06:02 davygrvy Exp $ */ #include "tkWinInt.h" @@ -26,6 +26,9 @@ #endif #include +#ifdef _MSC_VER +# pragma comment (lib, "comctl32.lib") +#endif /* * The zmouse.h file includes the definition for WM_MOUSEWHEEL. @@ -38,6 +41,9 @@ */ #include +#ifdef _MSC_VER +# pragma comment (lib, "imm32.lib") +#endif static TkWinProcs asciiProcs = { 0, @@ -271,7 +277,7 @@ TkWinXInit(hInstance) childClass.hCursor = NULL; if (!RegisterClass(&childClass)) { - panic("Unable to register TkChild class"); + Tcl_Panic("Unable to register TkChild class"); } /* @@ -552,7 +558,7 @@ TkpCloseDisplay(dispPtr) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (dispPtr != tsdPtr->winDisplay) { - panic("TkpCloseDisplay: tried to call TkpCloseDisplay on another display"); + Tcl_Panic("TkpCloseDisplay: tried to call TkpCloseDisplay on another display"); return; } -- cgit v0.12