From 92c03979f6743ffce1d4b3ce95309dd43e6aed91 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 19 Nov 2010 14:48:00 +0000 Subject: Revise Tcl_Panic() calls ending with a newline removing the newline, because Tcl_Panic() outputs a final newline already --- ChangeLog | 14 ++++++++++++++ generic/tkCanvArc.c | 4 ++-- generic/tkCanvBmap.c | 4 ++-- generic/tkCanvImg.c | 4 ++-- generic/tkCanvLine.c | 4 ++-- generic/tkCanvPoly.c | 4 ++-- generic/tkCanvText.c | 4 ++-- generic/tkCanvWind.c | 4 ++-- generic/tkGeometry.c | 4 ++-- generic/tkImgPhInstance.c | 4 ++-- generic/tkMenu.c | 6 +++--- generic/tkRectOval.c | 4 ++-- generic/tkTextBTree.c | 6 +++--- generic/tkWindow.c | 4 ++-- unix/tkUnixRFont.c | 4 ++-- win/tkWinColor.c | 8 ++++---- win/tkWinDraw.c | 4 ++-- win/tkWinMenu.c | 12 ++++++------ 18 files changed, 56 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54fdba7..eebc3b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2010-11-19 Jan Nijtmans + + * generic/tkCanv*.c: Revise Tcl_Panic() calls ending with a newline + * generic/tkGeomerty.c removing the newline, because Tcl_Panic() + * generic/tkImgPhInstance.c outputs a final newline already. + * generic/tkMenu.c + * generic/tkRectOval.c + * generic/tkTextBTree.c + * generic/tkWindow.c + * unix/tkUnixRFont.c + * win/tkWinColor.c + * win/tkWinDraw.c + * win/tkWinMenu.c + 2010-11-18 Jan Nijtmans * win/winMain.c: [FRQ 491789]: "setargv() doesn't support a diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 22ab653..f0c4de2 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.23 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvArc.c,v 1.24 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -269,7 +269,7 @@ CreateArc( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index 79f4110..ffca675 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.20 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvBmap.c,v 1.21 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -174,7 +174,7 @@ TkcCreateBitmap( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index ac97926..4a4b0f9 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.18 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvImg.c,v 1.19 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -163,7 +163,7 @@ CreateImage( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 79d2c2b..c06c398 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.33 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvLine.c,v 1.34 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -284,7 +284,7 @@ CreateLine( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index e777d60..c64dcc1 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.27 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvPoly.c,v 1.28 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -253,7 +253,7 @@ CreatePolygon( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index db81c79..ce587af 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.39 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvText.c,v 1.40 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -237,7 +237,7 @@ CreateText( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index c83860c..d11a001 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.23 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvWind.c,v 1.24 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -178,7 +178,7 @@ CreateWinItem( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c index b5a1654..2a9e2f4 100644 --- a/generic/tkGeometry.c +++ b/generic/tkGeometry.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: tkGeometry.c,v 1.15 2009/08/19 23:02:00 pspjuth Exp $ + * RCS: @(#) $Id: tkGeometry.c,v 1.16 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -373,7 +373,7 @@ TkFreeGeometryMaster( if (winPtr->geometryMaster != NULL && strcmp(winPtr->geometryMaster, master) != 0) { - Tcl_Panic("Trying to free %s from geometry manager %s.", + Tcl_Panic("Trying to free %s from geometry manager %s", winPtr->geometryMaster, master); } if (winPtr->geometryMaster != NULL) { diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c index 816169e..df33769 100644 --- a/generic/tkImgPhInstance.c +++ b/generic/tkImgPhInstance.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhInstance.c,v 1.3 2009/06/30 00:56:29 das Exp $ + * RCS: @(#) $Id: tkImgPhInstance.c,v 1.4 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkImgPhoto.h" @@ -761,7 +761,7 @@ TkImgPhotoInstanceSetSize( (masterPtr->height > 0) ? masterPtr->height: 1, instancePtr->visualInfo.depth); if (!newPixmap) { - Tcl_Panic("Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize.\n"); + Tcl_Panic("Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize"); } /* diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 9b2b4e3..f9ea395 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.60 2010/05/10 20:58:18 nijtmans Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.61 2010/11/19 14:48:00 nijtmans Exp $ */ /* @@ -1211,7 +1211,7 @@ DestroyMenuInstance( } } } else if (menuPtr->nextInstancePtr != NULL) { - Tcl_Panic("Attempting to delete master menu when there are still clones."); + Tcl_Panic("Attempting to delete master menu when there are still clones"); } /* @@ -2480,7 +2480,7 @@ MenuAddOrInsert( menuRefPtr = TkFindMenuReferencesObj(menuListPtr->interp, newCascadePtr); if (menuRefPtr == NULL) { - Tcl_Panic("CloneMenu failed inside of MenuAddOrInsert."); + Tcl_Panic("CloneMenu failed inside of MenuAddOrInsert"); } newObjv[0] = menuNamePtr; newObjv[1] = newCascadePtr; diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index adb36db..3ef205d 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.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: tkRectOval.c,v 1.23 2010/06/15 11:16:03 nijtmans Exp $ + * RCS: @(#) $Id: tkRectOval.c,v 1.24 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -242,7 +242,7 @@ CreateRectOval( int i; if (objc == 0) { - Tcl_Panic("canvas did not pass any coords\n"); + Tcl_Panic("canvas did not pass any coords"); } /* diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index be8d0e9..cd1da60 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.31 2010/01/02 22:52:38 dkf Exp $ + * RCS: @(#) $Id: tkTextBTree.c,v 1.32 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -2939,7 +2939,7 @@ TkBTreeNextTag( } searchPtr->linesLeft -= nodePtr->numLines; if (nodePtr->nextPtr == NULL) { - Tcl_Panic("TkBTreeNextTag found incorrect tag summary info."); + Tcl_Panic("TkBTreeNextTag found incorrect tag summary info"); } } nextChild: @@ -3157,7 +3157,7 @@ TkBTreePrevTag( continue; } if (prevNodePtr == NULL) { - Tcl_Panic("TkBTreePrevTag found incorrect tag summary info."); + Tcl_Panic("TkBTreePrevTag found incorrect tag summary info"); } searchPtr->linesLeft -= linesSkipped; nodePtr = prevNodePtr; diff --git a/generic/tkWindow.c b/generic/tkWindow.c index a47b080..508c961 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.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: tkWindow.c,v 1.113 2010/06/22 14:02:32 a_kovalenko Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.114 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkInt.h" @@ -1860,7 +1860,7 @@ Tk_ConfigureWindow( winPtr->changes.border_width = valuePtr->border_width; } if (valueMask & (CWSibling|CWStackMode)) { - Tcl_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) { diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 381aab2..43a5730 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.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: tkUnixRFont.c,v 1.34 2010/03/29 09:16:47 dkf Exp $ + * RCS: @(#) $Id: tkUnixRFont.c,v 1.35 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -123,7 +123,7 @@ GetFont( * proceed at this point. */ - Tcl_Panic("Cannot find a usable font."); + Tcl_Panic("Cannot find a usable font"); } if (angle == 0.0) { diff --git a/win/tkWinColor.c b/win/tkWinColor.c index 518f543..47e0cbd 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.17 2010/10/06 14:33:29 nijtmans Exp $ + * RCS: @(#) $Id: tkWinColor.c,v 1.18 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkWinInt.h" @@ -436,7 +436,7 @@ XFreeColors( for (i = 0; i < npixels; i++) { entryPtr = Tcl_FindHashEntry(&cmap->refCounts, (char *) pixels[i]); if (!entryPtr) { - Tcl_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) { @@ -452,7 +452,7 @@ XFreeColors( ckfree((char *) entries); cmap->size--; } else { - Tcl_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 { @@ -550,7 +550,7 @@ XFreeColormap( TkWinColormap *cmap = (TkWinColormap *) colormap; if (!DeleteObject(cmap->palette)) { - Tcl_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/tkWinDraw.c b/win/tkWinDraw.c index edb804c..5e2c415 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.24 2009/08/02 21:40:16 nijtmans Exp $ + * RCS: @(#) $Id: tkWinDraw.c,v 1.25 2010/11/19 14:48:00 nijtmans Exp $ */ #include "tkWinInt.h" @@ -585,7 +585,7 @@ TkPutImage( ckfree((char *) infoPtr); } if (!bitmap) { - Tcl_Panic("Fail to allocate bitmap\n"); + Tcl_Panic("Fail to allocate bitmap"); DeleteDC(dcMem); TkWinReleaseDrawableDC(d, dc, &state); return; diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 3aaebd8..4347cfd 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.78 2010/11/03 12:11:44 nijtmans Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.79 2010/11/19 14:48:00 nijtmans Exp $ */ #define OEMRESOURCE @@ -1300,7 +1300,7 @@ TkWinHandleMenuEvent( TkActivateMenuEntry(menuPtr, -1); } else { if (mePtr->index >= menuPtr->numEntries) { - Tcl_Panic("Trying to activate an entry which doesn't exist."); + Tcl_Panic("Trying to activate an entry which doesn't exist"); } TkActivateMenuEntry(menuPtr, mePtr->index); } @@ -3305,13 +3305,13 @@ TkpMenuInit(void) wndClass.lpszMenuName = NULL; wndClass.lpszClassName = MENU_CLASS_NAME; if (!RegisterClass(&wndClass)) { - Tcl_Panic("Failed to register menu window class."); + Tcl_Panic("Failed to register menu window class"); } wndClass.lpfnWndProc = TkWinEmbeddedMenuProc; wndClass.lpszClassName = EMBEDDED_MENU_CLASS_NAME; if (!RegisterClass(&wndClass)) { - Tcl_Panic("Failed to register embedded menu window class."); + Tcl_Panic("Failed to register embedded menu window class"); } TkCreateExitHandler(MenuExitHandler, (ClientData) NULL); @@ -3345,7 +3345,7 @@ TkpMenuThreadInit(void) 0, 0, 10, 10, NULL, NULL, Tk_GetHINSTANCE(), NULL); if (!tsdPtr->menuHWND) { - Tcl_Panic("Failed to create the menu window."); + Tcl_Panic("Failed to create the menu window"); } tsdPtr->embeddedMenuHWND = @@ -3353,7 +3353,7 @@ TkpMenuThreadInit(void) WS_POPUP, 0, 0, 10, 10, NULL, NULL, Tk_GetHINSTANCE(), NULL); if (!tsdPtr->embeddedMenuHWND) { - Tcl_Panic("Failed to create the embedded menu window."); + Tcl_Panic("Failed to create the embedded menu window"); } Tcl_InitHashTable(&tsdPtr->winMenuTable, TCL_ONE_WORD_KEYS); -- cgit v0.12