From 48983800722593d1fab54871e4a97b1c03f25024 Mon Sep 17 00:00:00 2001 From: redman Date: Thu, 1 Jul 1999 00:39:38 +0000 Subject: Patches from Bug: 2068 2080 2269 FossilOrigin-Name: 4bec4dc6eedf8f345bec167088cd8c7d76a49829 --- ChangeLog | 14 ++++++++++++++ generic/tkGrid.c | 12 ++++++------ generic/tkImgGIF.c | 3 ++- generic/tkImgPPM.c | 3 ++- generic/tkImgPhoto.c | 4 +++- win/tkWinWm.c | 17 +++++++++++++++-- 6 files changed, 42 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b0b6b5..f133a94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +1999-06-30 + + * generic/tkGrid.c: removed deprecated functions (applied patch + from Jan Nijtmans). [Bug: 2080] + + * generic/tkImgGIF.c: + * generic/tkImgPPM.c: + * generic/tkImgPhoto.c: Applied patch to allow Img extension to + work with 8.2, from Jan Nijtmans. [Bug: 2068] + + * win/tkWinWm.c: Applied patch from Don Porter to prevent the + windows code from calling the Tcl functions when the stub table + has not been initialized in TkWinWmCleanup. [Bug: 2269] + 1999-06-16 * unix/configure.in: diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 11ae69d..e44569f 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.4 1999/04/16 01:51:14 stanton Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.5 1999/07/01 00:39:44 redman Exp $ */ #include "tkInt.h" @@ -435,7 +435,7 @@ Tk_GridCmd(clientData, interp, argc, argv) slavePtr->iPadX = slavePtr->iPadY = 0; slavePtr->doubleBw = 2*Tk_Changes(tkwin)->border_width; if (slavePtr->flags & REQUESTED_RELAYOUT) { - Tk_CancelIdleCall(ArrangeGrid, (ClientData) slavePtr); + Tcl_CancelIdleCall(ArrangeGrid, (ClientData) slavePtr); } slavePtr->flags = 0; slavePtr->sticky = 0; @@ -522,7 +522,7 @@ Tk_GridCmd(clientData, interp, argc, argv) */ while (masterPtr->flags & REQUESTED_RELAYOUT) { - Tk_CancelIdleCall(ArrangeGrid, (ClientData) masterPtr); + Tcl_CancelIdleCall(ArrangeGrid, (ClientData) masterPtr); ArrangeGrid ((ClientData) masterPtr); } SetGridSize(masterPtr); @@ -2007,7 +2007,7 @@ Unlink(slavePtr) * * DestroyGrid -- * - * This procedure is invoked by Tk_EventuallyFree or Tcl_Release + * This procedure is invoked by Tcl_EventuallyFree or Tcl_Release * to clean up the internal structure of a grid at a safe time * (when no-one is using it anymore). Cleaning up the grid involves * freeing the main structure for all windows. and the master structure @@ -2097,10 +2097,10 @@ GridStructureProc(clientData, eventPtr) Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->gridHashTable, (char *) gridPtr->tkwin)); if (gridPtr->flags & REQUESTED_RELAYOUT) { - Tk_CancelIdleCall(ArrangeGrid, (ClientData) gridPtr); + Tcl_CancelIdleCall(ArrangeGrid, (ClientData) gridPtr); } gridPtr->tkwin = NULL; - Tk_EventuallyFree((ClientData) gridPtr, DestroyGrid); + Tcl_EventuallyFree((ClientData) gridPtr, DestroyGrid); } else if (eventPtr->type == MapNotify) { if (!(gridPtr->flags & REQUESTED_RELAYOUT)) { gridPtr->flags |= REQUESTED_RELAYOUT; diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 88edfa8..dc29baa 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -27,7 +27,7 @@ * | provided "as is" without express or implied warranty. | * +-------------------------------------------------------------------+ * - * RCS: @(#) $Id: tkImgGIF.c,v 1.3 1999/04/16 01:51:15 stanton Exp $ + * RCS: @(#) $Id: tkImgGIF.c,v 1.4 1999/07/01 00:39:44 redman Exp $ */ /* @@ -263,6 +263,7 @@ FileReadGIF(interp, chan, fileName, formatString, imageHandle, destX, destY, block.offset[0] = 0; block.offset[1] = 1; block.offset[2] = 2; + block.offset[3] = 0; nBytes = height * block.pitch; block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes); diff --git a/generic/tkImgPPM.c b/generic/tkImgPPM.c index 4342670..a86a254 100644 --- a/generic/tkImgPPM.c +++ b/generic/tkImgPPM.c @@ -13,7 +13,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPPM.c,v 1.4 1999/04/24 01:50:47 stanton Exp $ + * RCS: @(#) $Id: tkImgPPM.c,v 1.5 1999/07/01 00:39:44 redman Exp $ */ #include "tkInt.h" @@ -183,6 +183,7 @@ FileReadPPM(interp, chan, fileName, formatString, imageHandle, destX, destY, block.offset[1] = 1; block.offset[2] = 2; } + block.offset[3] = 0; block.width = width; block.pitch = block.pixelSize * fileWidth; diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 38996ed..895f201 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -15,7 +15,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.8 1999/04/30 22:49:55 stanton Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.9 1999/07/01 00:39:44 redman Exp $ */ #include "tkInt.h" @@ -802,6 +802,7 @@ ImgPhotoCmd(clientData, interp, argc, argv) block.offset[0] = 0; block.offset[1] = 1; block.offset[2] = 2; + block.offset[3] = 0; Tk_PhotoPutBlock((ClientData)masterPtr, &block, options.toX, options.toY, options.toX2 - options.toX, options.toY2 - options.toY); @@ -4173,5 +4174,6 @@ Tk_PhotoGetImage(handle, blockPtr) blockPtr->offset[0] = 0; blockPtr->offset[1] = 1; blockPtr->offset[2] = 2; + blockPtr->offset[3] = 0; return 1; } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 71b78ca..ca2b834 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.8 1999/04/16 01:51:54 stanton Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.9 1999/07/01 00:39:48 redman Exp $ */ #include "tkWinInt.h" @@ -518,7 +518,20 @@ void TkWinWmCleanup(hInstance) HINSTANCE hInstance; { - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + ThreadSpecificData *tsdPtr; + + /* + * If we're using stubs to access the Tcl library, and they + * haven't been initialized, we can't call Tcl_GetThreadData. + */ + +#ifdef USE_TCL_STUBS + if (tclStubsPtr == NULL) { + return; + } +#endif + + tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!tsdPtr->initialized) { -- cgit v0.12