diff options
author | davygrvy <davygrvy> | 2004-01-13 02:05:59 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2004-01-13 02:05:59 (GMT) |
commit | 475a691cd4526144149fa20e18994e84959a7361 (patch) | |
tree | d3e42f48fb70b654f8a82545d3a63ea270c93825 /win | |
parent | 176a8ad27faf6ea66dae60d38d4452762528499e (diff) | |
download | tk-475a691cd4526144149fa20e18994e84959a7361.zip tk-475a691cd4526144149fa20e18994e84959a7361.tar.gz tk-475a691cd4526144149fa20e18994e84959a7361.tar.bz2 |
* 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:
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWin3d.c | 4 | ||||
-rw-r--r-- | win/tkWinButton.c | 4 | ||||
-rw-r--r-- | win/tkWinColor.c | 8 | ||||
-rw-r--r-- | win/tkWinDialog.c | 8 | ||||
-rw-r--r-- | win/tkWinDraw.c | 10 | ||||
-rw-r--r-- | win/tkWinEmbed.c | 8 | ||||
-rw-r--r-- | win/tkWinFont.c | 4 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 10 | ||||
-rw-r--r-- | win/tkWinPointer.c | 4 | ||||
-rw-r--r-- | win/tkWinScrlbr.c | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 24 | ||||
-rw-r--r-- | win/tkWinX.c | 12 |
12 files changed, 56 insertions, 44 deletions
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 <commdlg.h> /* includes common dialog functionality */ +#ifdef _MSC_VER +# pragma comment (lib, "comdlg32.lib") +#endif #include <dlgs.h> /* includes common dialog template defines */ #include <cderr.h> /* includes the common dialog error codes */ @@ -25,6 +28,9 @@ #define USE_NEW_CHOOSEDIR 1 #ifdef USE_NEW_CHOOSEDIR #include <shlobj.h> /* 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 <commctrl.h> +#ifdef _MSC_VER +# pragma comment (lib, "comctl32.lib") +#endif /* * The zmouse.h file includes the definition for WM_MOUSEWHEEL. @@ -38,6 +41,9 @@ */ #include <imm.h> +#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; } |