# ticket

tkt_uuid: 220461ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: added support for Postscript output of canvas images
comment:
  OriginalBugID: 1541 RFE
  Version: 8.0.5
  SubmitDate: '1999-03-18'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:

  Marco R. Gazzetta


  CVS:

  RCS: @(#) $Id: tkCanvImg.c,v 1.2 1998/09/14 18:23:05 stanton Exp


  DesiredBehavior:

      canvas image items didn't have a postscript option. I added this.


  Patch:

  Index: tkCanvImg.c

  ===================================================================

  RCS file: /cvsroot/tk/generic/tkCanvImg.c,v

  retrieving revision 1.2

  diff -c -r1.2 tkCanvImg.c

  *** tkCanvImg.c1998/09/14 18:23:051.2

  --- tkCanvImg.c1999/03/19 00:17:12

  ***************

  *** 66,71 ****

  --- 66,74 ----

        char **argv));

    static intImageToArea _ANSI_ARGS_((Tk_Canvas canvas,

        Tk_Item *itemPtr, double *rectPtr));

  + static intImageToPostscript _ANSI_ARGS_((Tcl_Interp *interp,

  +     Tk_Canvas canvas, Tk_Item *itemPtr,

  +     int prepass));

    static doubleImageToPoint _ANSI_ARGS_((Tk_Canvas canvas,

        Tk_Item *itemPtr, double *coordPtr));

    static voidComputeImageBbox _ANSI_ARGS_((Tk_Canvas canvas,

  ***************

  *** 104,110 ****

        0,/* alwaysRedraw */

        ImageToPoint,/* pointProc */

        ImageToArea,/* areaProc */

  !     (Tk_ItemPostscriptProc *) NULL,/* postscriptProc */

        ScaleImage,/* scaleProc */

        TranslateImage,/* translateProc */

        (Tk_ItemIndexProc *) NULL,/* indexProc */

  --- 107,113 ----

        0,/* alwaysRedraw */

        ImageToPoint,/* pointProc */

        ImageToArea,/* areaProc */

  !     ImageToPostscript,/* postscriptProc */

        ScaleImage,/* scaleProc */

        TranslateImage,/* translateProc */

        (Tk_ItemIndexProc *) NULL,/* indexProc */

  ***************

  *** 558,563 ****

  --- 561,688 ----

    return 1;

        }

        return 0;

  + }

  + 

  + /*

  +  *--------------------------------------------------------------

  +  *

  +  * ImageToPostscript --

  +  *

  +  *      This procedure is invoked to create Postscript (TM) output

  +  *      for a photo image

  +  *

  +  * Results:

  +  *      The return value is a standard Tcl result.  If an error

  +  *      occurs in generating Postscript then an error message is

  +  *      left in interp->result, replacing whatever used

  +  *      to be there.  If no error occurs, then Postscript for the

  +  *      item is appended to the result.

  +  *

  +  * Side effects:

  +  *      None

  +  *

  +  *--------------------------------------------------------------

  +  */

  + 

  + static int

  + ImageToPostscript(interp, canvas, itemPtr, prepass)

  +     Tcl_Interp *interp;

  +     Tk_Canvas canvas;

  +     Tk_Item *itemPtr;

  +     int prepass;

  + {

  +     double x, y, w, h;

  +     int ix, iy;

  +     char buffer[2000];

  +     char color;

  +     unsigned char *pixel;

  +     char *photoName;

  +     Tk_PhotoHandle photo;

  +     Tk_PhotoImageBlock block;

  +     char hex[] = "0123456789ABCDEF";

  +     ImageItem *imgPtr = (ImageItem *) itemPtr;

  + 

  +     if (prepass == 1) return TCL_OK;

  + 

  +     /* Find photo and return with an error if we couldn't find it */

  +     photoName = imgPtr->imageString;

  +     if (!photoName) {

  +         Tcl_AppendResult(interp, "corrupt photo name", (char *) NULL);

  +         return TCL_ERROR;

  +     }

  +     if (photoName[0] == 0) {

  +         Tcl_AppendResult(interp, "empty photo name", (char *) NULL);

  +         return TCL_ERROR;

  +     }

  +     photo = Tk_FindPhoto(interp, photoName);

  +     if (!photo) {

  +         Tcl_AppendResult(interp, "\"", photoName, 

  +     "\" is not a photo name", (char *) NULL);

  +         return TCL_ERROR;

  +     }

  +     Tk_PhotoGetImage(photo, &block);

  + 

  +     /* Geometry info */

  +     w = imgPtr->header.x2 - imgPtr->header.x1;

  +     if (w < 0) w = -w;

  +     h = imgPtr->header.y2 - imgPtr->header.y1;

  +     if (h < 0) h = -h;

  + 

  +     /* Let's ignore images of 0 width or height */

  +     if (h==0 || w==0) return TCL_OK;

  + 

  +     /* Find the offset of the image */

  +     switch (imgPtr->anchor) {

  +     case TK_ANCHOR_NW:     x = imgPtr->x;           y = imgPtr->y + h;

  +         break;

  +     case TK_ANCHOR_W:      x = imgPtr->x;           y = imgPtr->y + h / 2.0;

  +         break;

  +     case TK_ANCHOR_SW:     x = imgPtr->x;           y = imgPtr->y;

  +         break;

  +     case TK_ANCHOR_N:      x = imgPtr->x - w / 2.0; y = imgPtr->y + h;

  +         break;

  +     case TK_ANCHOR_CENTER: x = imgPtr->x - w / 2.0; y = imgPtr->y + h / 2.0;

  +         break;

  +     case TK_ANCHOR_S:      x = imgPtr->x - w / 2.0; y = imgPtr->y;

  +         break;

  +     case TK_ANCHOR_NE:     x = imgPtr->x - w;       y = imgPtr->y + h;

  +         break;

  +     case TK_ANCHOR_E:      x = imgPtr->x - w;       y = imgPtr->y + h / 2.0;

  +         break;

  +     case TK_ANCHOR_SE:     x = imgPtr->x - w;       y = imgPtr->y;

  +     }

  +     y = Tk_CanvasPsY(canvas, y);

  + 

  +     /* let's create merry postscript output */

  +     sprintf(buffer,

  +         "/buffer %g string def \n%g %g translate\n%g %g scale\n%g %g 8\n",

  +         w*3, x, y, w, h, w, h);

  +     Tcl_AppendResult(interp, buffer, (char *)NULL);

  +     sprintf(buffer, "[%d 0 0 -%d 0 %d]\n", (int)w, (int)h, (int)h);

  +     Tcl_AppendResult(interp, buffer, "{currentfile\n",

  +         "  buffer readhexstring pop}\nfalse 3\ncolorimage\n",

  +         (char *)NULL);

  + 

  +     /* next, the actual data, one line at a time */

  +     for (iy = 0; iy < h; iy++) {

  +         for (ix = 0; ix < w; ix++) {

  +             pixel = block.pixelPtr + iy * block.pitch + ix * block.pixelSize;

  +             color = pixel[block.offset[0]];

  +             buffer[6 * ix    ] = hex[color >> 4 & 0xf];

  +             buffer[6 * ix + 1] = hex[color & 0xf];

  +             color = pixel[block.offset[1]];

  +             buffer[6 * ix + 2] = hex[color >> 4 & 0xf];

  +             buffer[6 * ix + 3] = hex[color & 0xf];

  +             color = pixel[block.offset[2]];

  +             buffer[6 * ix + 4] = hex[color >> 4 & 0xf];

  +             buffer[6 * ix + 5] = hex[color & 0xf];

  +         }

  +         buffer[6 * ix] = 0;

  +         Tcl_AppendResult(interp, buffer, "\n", (char *)NULL);

  +     }

  + 

  +     /* end */

  +     return TCL_OK;

    }

    

    /*


  PatchFiles:

      tkCanvImg.c




      tested on Windows NT 4.0 and Sun/Solaris
  --
  The dash patch support for this was added in 8.3b1. 
  -- 12/13/1999 hobbs


tkt_uuid: 220462ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Stub Entries
priority: 2
foundin: None
resolution: Fixed
title: XParseColor missing in stub table
comment:
  OriginalBugID: 1574 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-22'
  LastModified: '1999-03-29'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: Windows NT
  OSVersion: 4.0 SP4
  Machine: X86
  FixedDate: '1999-03-29'
  FixedInVersion: 8.1b3


  Name:

  Jan Nijtmans



  CVS:

  21/MAR/1998 11:00



  Extensions:

  Img 1.2b1



  ReproducibleScript:

      A prototype for XParseColor() is missing in tkIntXlibDecls.h,

      still this function is provided by the X11 emulation layer.

      







  Patch:

  *** generic/tkInt.decls.origSat Mar 20 14:20:48 1999

  --- generic/tkInt.declsSat Mar 20 14:25:06 1999

  ***************

  *** 1419,1424 ****

  --- 1419,1429 ----

    #      int clip_y_origin, XRectangle rectangles[], int n, int ordering)

    #  }

    

  + declare 82 win {

  +     Status XParseColor (Display *display, Colormap map, \

  +     _Xconst char* spec, XColor *colorPtr)

  + }

  + 

    # X functions for Mac

    

    # This slot is reserved for use by the dash patch:

  ***************

  *** 1685,1687 ****

  --- 1690,1696 ----

        unsigned int height)

    }

    

  + declare 58 mac {

  +     Status XParseColor (Display *display, Colormap map, \

  +     _Xconst char* spec, XColor *colorPtr)

  + }









  PatchFiles:

      tkInt.decls

      









      I noticed this when trying to create a binary distribution for Img 1.2b1
      on Windows. This bug is fatal for Img. There is another problem with
      Tk8.1b2 in combination with Img, but that will be handled in a separate
      bug report.
  ----
  Look and see if there is an external Tk API that should be used instead of the X routine.
  03/26/1999 11:04 - surles -

  This function should be exported.   03/29/1999 12:14 - stanton -


tkt_uuid: 220463ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 41. Photo Images
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: "window" format from Img 1.2b1 doesn't work with Tk8.1b2
comment:
  OriginalBugID: 1575 RFE
  Version: 8.1b2
  SubmitDate: '1999-03-22'
  LastModified: '2000-02-08'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 4060
  OS: Other
  Machine: NA
  FixedDate: '2000-02-08'
  FixedInVersion: 8.3


  Name:

  Jan Nijtmans


  CVS:

  21 Mar 1998


  ReproducibleScript:

      The reason why this doesn't work is because there is no way in the

      fileMatchProc and stringMatchProc functions to retreive the

      interpreter where the request came from. The patch I am

      submitting solves this problem, by adding an additional

      "interp" argument to the above two callback functions.


      The "window" format handler is the only handler using this,

      for other handlers it has no effect. It is binary compatible

      with Tk8.0.x, but not necessary source compatible. However,

      this potential source incompatibly is very easy to solve

      (which is already done in Img).


  Patch:

  *** generic/tk.h.origSat Mar 20 14:40:10 1999

  --- generic/tk.hSat Mar 20 14:42:53 1999

  ***************

  *** 1060,1068 ****


    typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;

    typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,

  ! char *fileName, char *formatString, int *widthPtr, int *heightPtr));

    typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string,

  ! char *formatString, int *widthPtr, int *heightPtr));

    typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,

    Tcl_Channel chan, char *fileName, char *formatString,

    Tk_PhotoHandle imageHandle, int destX, int destY,

  --- 1060,1068 ----


    typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;

    typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,

  ! char *fileName, char *formatString, int *widthPtr, int *heightPtr, Tcl_Interp *interp));

    typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string,

  ! char *formatString, int *widthPtr, int *heightPtr, Tcl_Interp *interp));

    typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,

    Tcl_Channel chan, char *fileName, char *formatString,

    Tk_PhotoHandle imageHandle, int destX, int destY,

  *** generic/tkImgGIF.c.origSat Mar 20 14:48:06 1999

  --- generic/tkImgGIF.cSat Mar 20 14:53:01 1999

  ***************

  *** 76,88 ****

     */


    static int      FileMatchGIF _ANSI_ARGS_((Tcl_Channel chan, char *fileName,

  !     char *formatString, int *widthPtr, int *heightPtr));

    static int      FileReadGIF  _ANSI_ARGS_((Tcl_Interp *interp,

        Tcl_Channel chan, char *fileName, char *formatString,

        Tk_PhotoHandle imageHandle, int destX, int destY,

        int width, int height, int srcX, int srcY));

    static intStringMatchGIF _ANSI_ARGS_(( char *string,

  !     char *formatString, int *widthPtr, int *heightPtr));

    static intStringReadGIF _ANSI_ARGS_((Tcl_Interp *interp, char *string,

        char *formatString, Tk_PhotoHandle imageHandle,

        int destX, int destY, int width, int height,

  --- 76,88 ----

     */


    static int      FileMatchGIF _ANSI_ARGS_((Tcl_Channel chan, char *fileName,

  !     char *formatString, int *widthPtr, int *heightPtr, Tcl_Interp *interp));

    static int      FileReadGIF  _ANSI_ARGS_((Tcl_Interp *interp,

        Tcl_Channel chan, char *fileName, char *formatString,

        Tk_PhotoHandle imageHandle, int destX, int destY,

        int width, int height, int srcX, int srcY));

    static intStringMatchGIF _ANSI_ARGS_(( char *string,

  !     char *formatString, int *widthPtr, int *heightPtr, Tcl_Interp *interp));

    static intStringReadGIF _ANSI_ARGS_((Tcl_Interp *interp, char *string,

        char *formatString, Tk_PhotoHandle imageHandle,

        int destX, int destY, int width, int height,

  ***************

  *** 165,177 ****

     */


    static int

  ! FileMatchGIF(chan, fileName, formatString, widthPtr, heightPtr)

        Tcl_Channel chan;/* The image file, open for reading. */

        char *fileName;/* The name of the image file. */

        char *formatString;/* User-specified format string, or NULL. */

        int *widthPtr, *heightPtr;/* The dimensions of the image are

     * returned here if the file is a valid

     * raw GIF file. */

    {

    return ReadGIFHeader(chan, widthPtr, heightPtr);

    }

  --- 165,178 ----

     */


    static int

  ! FileMatchGIF(chan, fileName, formatString, widthPtr, heightPtr, interp)

        Tcl_Channel chan;/* The image file, open for reading. */

        char *fileName;/* The name of the image file. */

        char *formatString;/* User-specified format string, or NULL. */

        int *widthPtr, *heightPtr;/* The dimensions of the image are

     * returned here if the file is a valid

     * raw GIF file. */

  +     Tcl_Interp *interp;/* not used */

    {

    return ReadGIFHeader(chan, widthPtr, heightPtr);

    }

  ***************

  *** 393,403 ****

     */


    static int

  ! StringMatchGIF(string, formatString, widthPtr, heightPtr)

        char *string;/* the string containing the image data */

        char *formatString;/* the image format string */

        int *widthPtr;/* where to put the string width */

        int *heightPtr;/* where to put the string height */

    {

        unsigned char header[10];

        int got;

  --- 394,405 ----

     */


    static int

  ! StringMatchGIF(string, formatString, widthPtr, heightPtr, interp)

        char *string;/* the string containing the image data */

        char *formatString;/* the image format string */

        int *widthPtr;/* where to put the string width */

        int *heightPtr;/* where to put the string height */

  +     Tcl_Interp *interp;/* not used */

    {

        unsigned char header[10];

        int got;

  *** generic/tkImgPPM.c.origSat Mar 20 14:47:59 1999

  --- generic/tkImgPPM.cSat Mar 20 14:54:11 1999

  ***************

  *** 39,45 ****


    static intFileMatchPPM _ANSI_ARGS_((Tcl_Channel chan,

        char *fileName, char *formatString,

  !     int *widthPtr, int *heightPtr));

    static intFileReadPPM  _ANSI_ARGS_((Tcl_Interp *interp,

        Tcl_Channel chan, char *fileName,

        char *formatString, Tk_PhotoHandle imageHandle,

  --- 39,45 ----


    static intFileMatchPPM _ANSI_ARGS_((Tcl_Channel chan,

        char *fileName, char *formatString,

  !     int *widthPtr, int *heightPtr, Tcl_Interp *interp));

    static intFileReadPPM  _ANSI_ARGS_((Tcl_Interp *interp,

        Tcl_Channel chan, char *fileName,

        char *formatString, Tk_PhotoHandle imageHandle,

  ***************

  *** 86,98 ****

     */


    static int

  ! FileMatchPPM(chan, fileName, formatString, widthPtr, heightPtr)

        Tcl_Channel chan;/* The image file, open for reading. */

        char *fileName;/* The name of the image file. */

        char *formatString;/* User-specified format string, or NULL. */

        int *widthPtr, *heightPtr;/* The dimensions of the image are

     * returned here if the file is a valid

     * raw PPM file. */

    {

        int dummy;


  --- 86,99 ----

     */


    static int

  ! FileMatchPPM(chan, fileName, formatString, widthPtr, heightPtr, interp)

        Tcl_Channel chan;/* The image file, open for reading. */

        char *fileName;/* The name of the image file. */

        char *formatString;/* User-specified format string, or NULL. */

        int *widthPtr, *heightPtr;/* The dimensions of the image are

     * returned here if the file is a valid

     * raw PPM file. */

  +     Tcl_Interp *interp;/* not used */

    {

        int dummy;


  *** generic/tkImgPhoto.c.origSat Mar 20 14:43:24 1999

  --- generic/tkImgPhoto.cSat Mar 20 14:45:06 1999

  ***************

  *** 3058,3064 ****

        (void) Tcl_Seek(chan, 0L, SEEK_SET);


        if ((*formatPtr->fileMatchProc)(chan, fileName, formatString,

  !     widthPtr, heightPtr)) {

    if (*widthPtr < 1) {

        *widthPtr = 1;

    }

  --- 3058,3064 ----

        (void) Tcl_Seek(chan, 0L, SEEK_SET);


        if ((*formatPtr->fileMatchProc)(chan, fileName, formatString,

  !     widthPtr, heightPtr, interp)) {

    if (*widthPtr < 1) {

        *widthPtr = 1;

    }

  ***************

  *** 3148,3154 ****

    }

    if ((formatPtr->stringMatchProc != NULL)

    && (*formatPtr->stringMatchProc)(string, formatString,

  ! widthPtr, heightPtr)) {

        break;

    }

        }

  --- 3148,3154 ----

    }

    if ((formatPtr->stringMatchProc != NULL)

    && (*formatPtr->stringMatchProc)(string, formatString,

  ! widthPtr, heightPtr, interp)) {

        break;

    }

        }


  PatchFiles:

      tk.h tkImgPhoto.c tkImgPPM.c tkImgGIF.c




  This is handled by the patch applied from 4060 for 8.3.0. 
  -- 02/08/2000 hobbs


tkt_uuid: 220464ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Fatal FPE in [scale] on Linux/Alpha
comment:
  OriginalBugID: 1589 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-22'
  LastModified: '2000-06-02'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Other
  OSVersion: RedHat Linux 5.x on Alpha XL 300
  Machine: NA
  FixedDate: '2000-06-02'
  FixedInVersion: 8.3


  Name:
  Don Porter

  CVS:
  Updated from CVS on 1999 Mar 22

  ObservedBehavior:
      $ wish8.1
      % scale .s
      .s
      % .s configure -variable x
      
      Program received signal SIGFPE, Arithmetic exception.
      0x15555716f4c in TkRoundToResolution (scalePtr=0x12019a770,
      value=7.2430898922756634e-312) at ./../generic/tkScale.c:1147
      (xxgdb) info stack
      #0  0x15555716f4c in TkRoundToResolution (scalePtr=0x12019a770,
      value=7.2430898922756634e-312) at ./../generic/tkScale.c:1147
      #1  0x15555715ffc in ConfigureScale (interp=0x1201016f0,
      scalePtr=0x12019a770, objc=2, objv=0x120102ee0) at
      ./../generic/tkScale.c:632
      #2  0x155557157d8 in ScaleWidgetObjCmd (clientData=0x12019a770,
      interp=0x1201016f0, objc=4, objv=0x120102ed0) at
      ./../generic/tkScale.c:397
      #3  0x15555914920 in TclExecuteByteCode (interp=0x1201016f0,
      codePtr=0x12019da30) at ./../generic/tclExecute.c:843
      #4  0x155558e2194 in Tcl_EvalObjEx (interp=0x1201016f0,
      objPtr=0x120111930, flags=131072) at ./../generic/tclBasic.c:2719
      #5  0x15555927758 in Tcl_RecordAndEvalObj (interp=0x1201016f0,
      cmdPtr=0x120111930, flags=131072) at ./../generic/tclHistory.c:142
      #6  0x15555927510 in Tcl_RecordAndEval (interp=0x1201016f0,
      cmd=0x12010d878 ".s configure -variable x\n", flags=131072) at
      ./../generic/tclHistory.c:62
      #7  0x155556c6734 in StdinProc (clientData=0x12014e890, mask=2) at
      ./../generic/tkMain.c:349
      #8  0x15555934b48 in Tcl_NotifyChannel (channel=0x12014e890, mask=2) at
      ./../generic/tclIO.c:5597
      #9  0x15555979d9c in FileHandlerEventProc (evPtr=0x1201992e0, flags=-3)
      at ./../unix/tclUnixNotfy.c:572
      #10 0x155559484ac in Tcl_ServiceEvent (flags=-3) at
      ./../generic/tclNotify.c:573
      #11 0x15555948ab8 in Tcl_DoOneEvent (flags=-3) at
      ./../generic/tclNotify.c:875
      #12 0x155556b3038 in Tk_MainLoop () at ./../generic/tkEvent.c:1102
      #13 0x155556c6528 in Tk_MainEx (argc=1, argv=0x11ffff7d8,
      appInitProc=0x120000a88 <Tcl_AppInit>, interp=0x1201016f0) at
      ./../generic/tkMain.c:278
      #14 0x120000a5c in main (argc=1, argv=0x11ffff7d8) at ./tkAppInit.c:54
      



  DesiredBehavior:
      No crash
      





      Adding -mieee to CFLAGS before compiling makes the problem
      go away.  Not sure if that's the proper bug fix, though.
      
  --

  This is reported not to happen using 8.3 on Linux/Alpha.
  Several scale widget fixes have gone in since 8.1b2, so
  one of those likely resolved this issue. 
  -- 06/02/2000 hobbs


tkt_uuid: 220465ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Binding "update" in <Expose> window event prevents Windows from managing geometry
comment:
  OriginalBugID: 1600 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-23'
  LastModified: '2000-01-31'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1601
  OS: Windows NT
  OSVersion: 4.0 SP4
  Machine: X86
  FixedDate: '2000-01-31'
  FixedInVersion: 8.3b2


  Name:
  Petasis Georgios

  ReproducibleScript:
      toplevel .t
      text .t.t
      pack .t.t
      bind .t <Expose> {update}
      
      toplevel .w
      text .w.t
      pack .w.t

  ObservedBehavior:
  Under windows only: you cannot move or resize the second window when
  overlaps
  the first. This happens only under windows (in my system NT 4.0 SP4) and
  not on unix (tested on Solaris 2.6 under KDE, CDE and Openwindows...)

  DesiredBehavior:
  Resize or move the second window without problem


  This works as expected in 8.3b2. 
  -- 01/31/2000 hobbs


tkt_uuid: 220466ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Tk_DestroyWindow deletes images after fonts; it shouldn't
comment:
  OriginalBugID: 1603 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-23'
  LastModified: '1999-03-30'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '1999-03-30'
  FixedInVersion: 8.1b3


  Name:  Bruce Stephens
  email:  b.stephens@isode.com
  Support:  None
  Severity:  3
  OperatingSystem:  Linux (Red Hat 5.0+ on Intel)
  Extensions:  Tix
  CustomShell:  no
  Synopsis:  Tk_DestroyWindow deletes images after fonts; it shouldn't

  ReproducibleScript:
      Images are flexible things, and might reasonably contain fonts.  Tix's
      compound image type, for example, allows an image to contain other
      images, text, and other things.
      
      However, if an image master contains a reference to a font, then when
      Tk_DestroyWindow is called for the last window of the application, then
      TkFontPkgFree will be called before TkDeleteAllImages, which causes a
      coredump (on Unix).
      

  ObservedBehavior:
      With tixwish4.1.8.1:
      
      set i [image create compound -window .]
      $i add text -text Hello
      exit
      
      causes a failure:
      TkFontPkgFree: all fonts should have been freed already
      
      

  DesiredBehavior:
      Well, no problems with fonts: the image delete/free procs ought to get
      the opportunity to clean up.
      

  Patch:
  *** tkWindow.c.old      Tue Mar 23 12:09:31 1999
  --- tkWindow.c  Tue Mar 23 12:10:04 1999
  ***************
  *** 1315,1322 ****
                    
              Tcl_DeleteHashTable(&winPtr->mainPtr->nameTable);
              TkBindFree(winPtr->mainPtr);
  -           TkFontPkgFree(winPtr->mainPtr);
              TkDeleteAllImages(winPtr->mainPtr);
    
                /*
                 * When embedding Tk into other applications, make sure 
  --- 1315,1322 ----
                    
              Tcl_DeleteHashTable(&winPtr->mainPtr->nameTable);
              TkBindFree(winPtr->mainPtr);
              TkDeleteAllImages(winPtr->mainPtr);
  +           TkFontPkgFree(winPtr->mainPtr);
    
                /*
                 * When embedding Tk into other applications, make sure 


  PatchFiles:
      tkWindow.c
      

  Comments:
      Tix's implementation of compound images is broken in other ways, too.
      Even with the above patch, it doesn't work properly.  However, changing
      the order of deletion would make a correct implementation possible.
      
      A workaround is for applications to ensure that the images are deleted
      before exiting.
      
  Posted To comp.lang.tcl: Posted Successfully



  Applied patch

  03/30/1999 13:14 - stanton -


tkt_uuid: 220467ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 80. Release Notes
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Tk 8.1b2 patch level not correct
comment:
  OriginalBugID: 1614 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-24'
  LastModified: '1999-04-05'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: Other
  Machine: NA
  FixedDate: '2019-06-01'
  FixedInVersion: 8.1b3


  Name:
  Jeffrey Hobbs

  ReproducibleScript:
      The tk_patchLevel was wrong when I did an about, which I traced back
      to the fact that it wasn't updated in tk.h
      
      



  Patch:
  ewsx2 [~/src/tk8.1b2/generic] 95 % diff tk.h~ tk.h
  48c48
  < #define TK_PATCH_LEVEL "8.1b1"
  ---
  > #define TK_PATCH_LEVEL "8.1b2"




  PatchFiles:
      tk8.1b2/generic/tk.h
      


tkt_uuid: 220468ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Stub Entries
priority: 2
foundin: None
resolution: Fixed
title: Need platform-dependent include file
comment:
  OriginalBugID: 1621 RFE
  Version: 8.0.5
  SubmitDate: '1999-03-24'
  LastModified: '1999-11-16'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: All
  FixedDate: '1999-11-16'
  FixedInVersion: 8.2


  Comments from Lothar Linhard:



  I want to ask for one thing we need with TclPro:

  >

  > * A possibility to get MS-Window's window handle (HWND)

  >   from a TK Drawable (on C-level).

  >

  >The purpose for that is, that for performance reasons,

  >our C-level TK extension draws directly to the native

  >HDC rather than thru TK's xlib emulation.

  >

  >With tcl/tk 8.0p2 we include tkWinInt.h and use the

  >Macros TkWinGetHWND(w) and TkWinGetHDC(w) but they

  >are not available with TclPro, because the include file

  >tkWinInt.h is missing.

  >Here is a piece of code, that we use with tcl/tk 8.0p2:

  >

  > #ifdef WIN32

  > #define _TKPORT         /* don't need to include tkPort.h */

  > #include <tkWinInt.h>

  > #endif

  > ...

  >        // Get the new device context

  >        //

  > Drawable d = ...;

  >        TkWinDrawable* twdPtr = (TkWinDrawable*)d;

  >        if (twdPtr->type == TWD_WINDOW) {

  >            impl_.dc = GetDC( TkWinGetHWND(twdPtr) );

  >            impl_.bitmap = 0;

  >        } else if (twdPtr->type == TWD_WINDC) {

  >            impl_.dc = TkWinGetHDC(twdPtr);

  >            impl_.bitmap = 0;

  >        } else {

  >     ....

  >

  >We understand, that using tkWinInt.h's in that way makes our

  >C-level TK extension sensitive to changes in your TK structs.

  >Therefore, for a long term, we would appreciate, if Scriptics

  >could provide Tk_WinGetHWND(w) and Tk_WinGetHDC(w) as an

  >interface functions (rather than' macros).  

  >

  Tk_GetHWND, et al are now public functions, and are also in
  the stubs tables for 8.2+. 
  -- 11/16/1999 hobbs


tkt_uuid: 220469ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 58. [send]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: win dde execute timeout large / request extra characters
comment:
  OriginalBugID: 1639 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-26'
  LastModified: '1999-04-05'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: redman
  OS: Windows 95
  OSVersion: B
  Machine: X86
  FixedDate: '1999-04-05'


  Name:

  Harald Oehlmann



  Extensions:

  none



  CustomShell:

  No



  ReproducibleScript:

      dde execute CS CS "\[SetPrinter(\"gimmick\")\]

      dde request CS CS "@VARLIST"

      







  ObservedBehavior:

      1) If the DDE server (here Codesoft 4.2 from Teklinx) crashes in the

      execution of a command, tk waits 2h in inactivity.

      2) dde request returns extra characters after the terminating zero.

      3) It was reported to me that windows send doesn't work because of the

      extra characters.

      







  DesiredBehavior:

      1) Timout at a reasonable time (ex. 30 sec)

      2) No extra characters

      







  Patch:

  *** tkWinSend.c_origSat Mar 13 19:09:41 1999

  --- tkWinSend.c_newFri Mar 26 11:07:24 1999

  ***************

  *** 844,850 ****

        }

    

        utilString = (char *) DdeAccessData(hData, &len);

  !     ddeObjectPtr = Tcl_NewStringObj(utilString, len);

        Tcl_IncrRefCount(ddeObjectPtr);

        DdeUnaccessData(hData);

        if (convPtr->returnPackagePtr != NULL) {

  --- 844,850 ----

        }

    

        utilString = (char *) DdeAccessData(hData, &len);

  !     ddeObjectPtr = Tcl_NewStringObj(utilString, strlen(utilString));

        Tcl_IncrRefCount(ddeObjectPtr);

        DdeUnaccessData(hData);

        if (convPtr->returnPackagePtr != NULL) {

  ***************

  *** 1184,1190 ****

                                ddeResult);

    } else {

        ddeReturn = DdeClientTransaction((LPBYTE) ddeData, 0xFFFFFFFF,

  !     hConv, 0, CF_TEXT, XTYP_EXECUTE, 7200000, NULL);

        if (ddeReturn == 0) {

    SetDdeError(interp);

    result = TCL_ERROR;

  --- 1184,1190 ----

                                ddeResult);

    } else {

        ddeReturn = DdeClientTransaction((LPBYTE) ddeData, 0xFFFFFFFF,

  !     hConv, 0, CF_TEXT, XTYP_EXECUTE, 30000, NULL);

        if (ddeReturn == 0) {

    SetDdeError(interp);

    result = TCL_ERROR;

  ***************

  *** 1223,1229 ****

    result = TCL_ERROR;

        } else {

    dataString = DdeAccessData(ddeData, &dataLength);

  ! returnObjPtr = Tcl_NewStringObj(dataString, dataLength);

    DdeUnaccessData(ddeData);

    DdeFreeDataHandle(ddeData);

    Tcl_SetObjResult(interp, returnObjPtr);

  --- 1223,1229 ----

    result = TCL_ERROR;

        } else {

    dataString = DdeAccessData(ddeData, &dataLength);

  ! returnObjPtr = Tcl_NewStringObj(dataString, strlen(dataString));

    DdeUnaccessData(ddeData);

    DdeFreeDataHandle(ddeData);

    Tcl_SetObjResult(interp, returnObjPtr);









  PatchFiles:

      win/tkWinSend.c

      









  04/05/1999 20:19 - redman - All problems have been fixed, applied patch to decrease the timeouts. 

     2) This is a known problem with Windows 95 / Windows 3.1.
      The DdeGetData command does not return a valid length.
      Instead strlen can be used because Win Atoms are always 0-terminated.
      3) I have send my version to Kevin Kenny how reported the 3rd problem.
      He will report if it works.


tkt_uuid: 220470ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: "Save" Button in tk_getSaveFile wrongly displays "Open"
comment:
  OriginalBugID: 1640 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-26'
  LastModified: '1999-04-05'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: HP-UX
  OSVersion: 10.20
  Machine: Other
  FixedDate: '1999-04-05'
  FixedInVersion: 8.1b3


  Name:
  Frank J. Leitner

  ReproducibleScript:
      tk_getSaveFile has a button which by default displays "Save". It changes
      to "Open" whenever you highlight a Directory, which is expected
      behavior:
      you want to open (enter) that directory. Selecting a file makes the
      button
      display "Save" again. Use this with a default filename:
        tk_getSaveFile -initialfile abc
      or select a file before entering a new directory. The key is: something
      needs to be in the "File name:" entry field before entering a directory
      to make the problem appear.
      



  ObservedBehavior:
      The button initially displays "Save" without any file being highlighted,
      but after changing the directory, it sticks to "Open" which is wrong in
      this case: pressing the button has the semantics of "Save".
      



  DesiredBehavior:
      The text on the button should match its current function.
      



  Patch:
  *** tkfbox.tcl.orig     Fri Mar 26 11:50:43 1999
  --- tkfbox.tcl  Fri Mar 26 12:31:10 1999
  ***************
  *** 1075,1080 ****
  --- 1075,1088 ----
        #
        cd $appPWD
    
  +     # Restore the Open/Save Button
  +     #
  +     if {![string compare $data(type) open]} {
  +         $data(okBtn) config -text "Open"
  +     } else {
  +         $data(okBtn) config -text "Save"
  +     }
  + 
        # turn off the busy cursor.
        #
        $data(ent) config -cursor $entCursor




  PatchFiles:
      library/tkfbox.tcl
      





      This is basically a rebuild with a more detailed description of
      bug id 1369 (same problem, tk 8.0.3). This patch is still in
      "Contributed" state, but IMHO should be re-considered for the 8.1
      final release.
      
  applied patch
  04/05/1999 20:15 - stanton -


tkt_uuid: 220471ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Crash when backward regexp search in text widget
comment:
  OriginalBugID: 1642 Bug
  Version: 8.0.5
  SubmitDate: '1999-03-26'
  LastModified: '1999-04-19'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  OS: Other
  OSVersion: HP-UX / Sun Solaris / Windows NT
  Machine: NA
  FixedDate: '1999-04-19'
  FixedInVersion: 8.1


  Name:
  Stephan Uyttebroeck

  ReproducibleScript:
      text .t
      pack .t
      .t insert end "line 1\n"
      .t insert end "line 2\n"
      .t insert end "line 3\n"
      .t insert end "line 4\n"
      .t insert end "line 5\n"
      tkTextSetCursor .t 3.0
      .t search -backward -regexp "\$" insert 1.0
      
      



  ObservedBehavior:
      The wish executable crashes.
      
      



  DesiredBehavior:
      2.6
      





      It crashed with versions 8.0.4 and 8.0.5 on Unix and NT.
      With 8.1b2 it doesn't crash, but it doesn't return the position of the
      match

      The forward search works (.t search -forward -regexp "\$" insert end)

  This crashes in 8.1b3.
  04/16/1999 13:48 - stanton -

  This as looping into empty memory.  It's been fixed to do the right thing.  04/19/1999 18:05 - rjohnson -


tkt_uuid: 220472ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: starting line missed when searching in text widget
comment:
  OriginalBugID: 1643 Bug
  Version: 8.0.5
  SubmitDate: '1999-03-26'
  LastModified: '2000-01-21'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-01-21'
  FixedInVersion: 8.3


  Name:
  Stephan Uyttebroeck

  ReproducibleScript:
      text .t
      pack .t
      .t insert end "\n"
      .t insert end "line 2\n"
      .t insert end "\n"
      .t insert end "line 4\n"
      .t insert end "\n"
      .t insert end "line 6\n"
      tkTextSetCursor .t 1.0
      .t search -forward -regexp {^$} insert end
      



  ObservedBehavior:
      This regular expression should find 'empty' lines.
      The first line found is however not line 1, but line 3.
      





  The search fails (at least) with Tcl/Tk versions 8.0.4, 8.0.5 and 8.1b2.

  Problem still exists in 8.2b2. 
  -- 08/07/1999 hobbs

  The text widget was not properly handling the somewhat special case in which the comparison text was zero length after removing the trailing newline.  I corrected this in 8.3.

  - eric

  -- 01/21/2000 ericm


tkt_uuid: 220473ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Add to Tk distributions reference files which may not be on user's system
comment:
  OriginalBugID: 1645 RFE
  Version: 8.1b2
  SubmitDate: '1999-03-26'
  LastModified: '2000-04-27'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-04-27'
  FixedInVersion: 8.4a1


  Name: Larry W. Virden

  DesiredBehavior:
  I would like to suggest that the Tk binary and source distributions add
  as provided documentation of the valid symbolic color, key event and cursor
  names that Tk recognizes , with platform differences in particular
  pointed out.
      





      This would provide programmers on MacOS and Windows the info
      that X programmers typically have.  With the platform
      differences pointed out, it provides the Tk programmers on
      X information also invaluable.

  --

  I added colors.n, keysyms.n, and cursors.n, with appropriate crosslinks in other manual entries.  These pages include the information requested.  They will go out with 8.4a1.

  - eric

  -- 04/27/2000 ericm


tkt_uuid: 220474ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 75. wish
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Solution for known Stubs problem
comment:
  OriginalBugID: 1650 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-29'
  LastModified: '1999-04-05'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: redman
  OS: Other
  Machine: NA
  FixedDate: '1999-04-05'
  FixedInVersion: 8.1b3


  Name:
  Jan Nijtmans

  CVS:
  27 March 1999

  ReproducibleScript:

      The "ChangeLog" file in the current CVS database writes:
        1999-03-26    <surles@scriptics.com>
      * unix/configure.in: Removed --enable-tcl-stub.  Linking Tk to Tcl
       stubs is causing too many problems when linking executables like wish.
        Until the Tk is a fully loadable extension, linking against the Tcl
       stubs is not supported in Tk.

      Although I agree with the removal of "--enable-tcl-stub" option
      (it should be the normal behavior!!!!), I strongly oppose to the
      argumentation here. Paul Duffin and I never had any problem with
      our Stubs implementation like this, so I was curious about the
      problem described here. Therefor I tried to build a Stub-aware
      Tk version from the current CVS code, and just see what happended.

      Probably, the cause of the problem described here was that tkAppInit.c
      was compiled with the TCL_USE_STUBS flag. This should NEVER be
      done, because at that time the stub table is not initilized yet.

      Recommendations (see patch):
      - #undef TCL_USE_STUBS in winMain.c, tkAppInit.c and tkMacAppInit.c,
        makeing sure that those files are never compiled with this flag.
        This should prevent anyone from making the same mistake.
      - #undef TK_USE_STUBS as well. This prevents extensions writers to
        make the same mistake when linking against Tk's stub table. For
        Tk it has no effect.
      - Use the flag "-DUSE_TCL_STUBS" when compiling shared libraries
        always.

      The last line suggests that it is necessary for Stubs that Tk is
      dynamically loadable. Actually it is reverse: For Tk to be
      dyncamically loadable on all platforms, Stubs are necessary.
      Therefore, Scriptics' attempts should be to concentrate on
      making Stubs work in all situations before trying to make
      Tk dyncamically loadable.

      Final recommendation: If there are problems with Stubs,
      please ask Paul Duffin or me for help. In our implementations,
      what formed the basis of what Scriptics is doing now,
      we think we solved all problems. That including making Tk a
      normal loadable package (for which indeed some more fixes
      are required).

  Patch:
  *** unix/configure.in.origFri Mar 26 12:25:36 1999
  --- unix/configure.inFri Mar 26 12:40:48 1999
  ***************
  *** 435,441 ****
        [ok=$enableval], [ok=yes])
    if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
        TK_SHARED_BUILD=1
  !     TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
        TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
        MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}"
        RANLIB=":"
  --- 435,441 ----
        [ok=$enableval], [ok=yes])
    if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
        TK_SHARED_BUILD=1
  !     TK_SHLIB_CFLAGS="${SHLIB_CFLAGS} -DUSE_TCL_STUBS"
        TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
        MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}"
        RANLIB=":"
  *** unix/tkAppInit.c.origFri Mar 26 12:07:01 1999
  --- unix/tkAppInit.cFri Mar 26 12:10:04 1999
  ***************
  *** 13,18 ****
  --- 13,21 ----
     * RCS: @(#) $Id: tkAppInit.c,v 1.1.4.3 1999/02/11 04:13:50 stanton Exp $
     */

  + #undef USE_TCL_STUBS
  + #undef USE_TK_STUBS
  + 
    #include "tk.h"
    #include "locale.h"

  *** win/winMain.c.origFri Mar 26 12:34:28 1999
  --- win/winMain.cFri Mar 26 12:36:46 1999
  ***************
  *** 12,17 ****
  --- 12,20 ----
     * RCS: @(#) $Id: winMain.c,v 1.1.4.5 1999/03/10 07:13:52 stanton Exp $
     */

  + #undef USE_TCL_STUBS
  + #undef USE_TK_STUBS
  + 
    #include <tk.h>
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
  *** mac/tkMacAppInit.c.origFri Mar 26 12:35:03 1999
  --- mac/tkMacAppInit.cFri Mar 26 12:35:45 1999
  ***************
  *** 12,17 ****
  --- 12,20 ----
     * RCS: @(#) $Id: tkMacAppInit.c,v 1.1.4.5 1999/03/10 07:13:48 stanton Exp $
     */

  + #undef USE_TCL_STUBS
  + #undef USE_TK_STUBS
  + 
    #include <Gestalt.h>
    #include <ToolUtils.h>
    #include <Fonts.h>

  PatchFiles:
      configure.in tkAppInit.c winMain.c tkMacAppInit.c



  04/05/1999 17:54 - redman - Already applied.


tkt_uuid: 220475ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Embedded window in text: fatal bug remains
comment:
  OriginalBugID: 1651 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-29'
  LastModified: '1999-04-05'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: Other
  Machine: NA
  FixedDate: '1999-04-05'
  FixedInVersion: 8.1b3


  Name:
  Don Porter

  CVS:
  tkTextIndex.c,v 1.1.4.3 1999/03/27 02:31:39

  ReproducibleScript:
      # FILE: demo.tcl
      package require Tk
      set t [text .t]
      $t insert end \n
      $t window create end -window [button $t.b]
      # Modify prior bug demonstration script
      # $t index end-2c
      $t tag add {} end-2c
      pack $t
      



  ObservedBehavior:
      $ wish8.1 demo.tcl
      Segmentation fault (core dumped)
      
      



  DesiredBehavior:
      No crash.
      



  Patch:
  The patch has already been submitted.  See:

  http://www.scriptics.com/patches/tk8.1b1/tkTextIndex.c.991.txt




  PatchFiles:
      tkTextIndex.c
      





      The CVS ChangeLog file contains the entry:
      ===========================================
      1999-03-26    <redman@scriptics.com>
      
              * generic/tkTextIndex.c:
              * tests/testIndex.test: Avoid looking past the beginning of the
              array storing data for the text widget (.t index end-2c).  Added
              test case to check for the bug.  [Bug 991]
      ============================================
      The change to tkTextIndex.c which accompanies that entry does in fact
      make the original script submitted with Bug 991 run correctly.  However,
      it doesn't apply the patch submitted with that bug report, so it doesn't
      fix the underlying bug.  The new script reveals that the bug remains and
      it still has fatal consequences.  Please apply the patch.
      

  The patch has been applied.
  04/05/1999 20:03 - stanton -


tkt_uuid: 220476ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title:
  The search function of the text widget reports incorrect number of characters when finding double-byte code.

comment:
  OriginalBugID: 1666 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-30'
  LastModified: '1999-04-02'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  RelatedBugIDs: 1056  1148
  OS: Windows NT
  OSVersion: 4.0 Japanese
  Machine: X86
  FixedDate: '1999-04-02'
  FixedInVersion: 8.1b3


  Name:
  Syd Polk

  CVS:
  03/30/1999

  ReproducibleScript:
      Initialize a text widget with some japanese text. Call the text widget
      search function to look for two japanese characters. Make sure and add a
      "-count" paramter. The variable you give the -count parameter will
      contain the number 6, not the number 2.
      



  Patch:
  Index: tkText.c
  ===================================================================
  RCS file: /cvsroot/tk/generic/tkText.c,v
  retrieving revision 1.1.4.5
  diff -r1.1.4.5 tkText.c
  1837c1837,1838
  < sprintf(buffer, "%d", matchLength);
  ---
  > sprintf(buffer, "%d", Tcl_NumUtfChars(startOfLine + matchByte,
  >         matchLength));




  PatchFiles:
      tk/generic/tkText.c
      





      There are other problems in this function also, like adding and
      subtracting 1 from byte indices. While these probably don't affect much,
      doing a regexp search starting from in the middle of a multi-byte
      sequence is probably not a good idea.
      

  This patch is close, but not quite right.  I have applied the correct fix.

  04/02/1999 15:49 - stanton -


tkt_uuid: 220477ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Need to call setlocale() before XOpenIM for input methods to work
comment:
  OriginalBugID: 1668 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-25'
  LastModified: '1999-10-22'
  Severity: SER
  Status: Released
  Submitter: stanton
  ChangedBy: hobbs
  RelatedBugIDs: 1636
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '1999-10-22'
  FixedInVersion: 8.2


    Hi folks. I am a maintainer of Tcl/Tk Japanization patch kit (AKA
  tcl/tk[78]xjp). 

    BUT NOTE THAT:
    With Tk world, Tk or Tcl MUST call setlocale() with proper locale to
  handle XIM (X Input method) BEFORE calling XOpenIM(). Further more, if
  the X library is compiled with -DX_LOCALE, Tcl or Tk MUST NOT call
  setlocale() in libc BUT call _xsetlocale() in the X library. This is
  a specification of X11R[56].

  m-hirano@trc.rwcp.or.jp (m-hirano@sra.co.jp)
  Real World Computing Partnership, Tsukuba, Japan
  Software Research Associates, Inc., Japan 


  I have sent mail to m-hirano to determine what really needs to be done here. It is dangerous to call setlocale() because this affects the way Tcl parses numbers and letters.
  03/30/1999 15:25 - stanton -
  Tk 8.2 changed some initialization around, and setlocale will be
  called in Tcl.  If more work is needed, another more accurate bug
  report needs to be submitted based off the new features. 
  -- 10/22/1999 hobbs


tkt_uuid: 220478ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 58. [send]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Tk doesn't start if Tcl is running
comment:
  OriginalBugID: 1674 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-31'
  LastModified: '1999-04-06'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: surles
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-04-06'


  Name:
  Ingemar Hansson

      If tclsh81 is running and I try to start wish81 it hangs until tclsh81
      exits.
      It seems to hang before a new process is created since if I try to start
      wish81 from a command prompt, I don't get the prompt back until tclsh81
      exits and wish starts.
      I'm running Windows NT 4.0 SP4 with NTFS file system
      


  Fixed previously.  04/06/1999 14:42 - surles -


tkt_uuid: 220479ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Fixed
title: Problem with 2 buttons calling tk_getSaveFile
comment:
  OriginalBugID: 1676 Bug
  Version: 8.0p2
  SubmitDate: '1999-03-31'
  LastModified: '2000-02-01'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  Machine: Other
  FixedDate: '2000-02-01'
  FixedInVersion: 8.3b2


  Name:
  Eric Brunel

  ReproducibleScript:
      The code is the following:
      
      proc file1 {} {
        tk_getSaveFile -parent .wdw
      }
      proc file2 {} {
        tk_getSaveFile
      }
      toplevel .wdw
      button .wdw.btn1 -text Button1 -command {file1}
      pack .wdw.btn1 -side top
      button .wdw.btn2 -text Button2 -command {file2}
      pack .wdw.btn2 -side top
      
      Run the script with the wish interpretor without arguments, then:
      - click "Button1", go to /tmp (using the buttons), enter a dummy
      filename and press "Save";
      - click "Button2", go to another directory (like /var/tmp for example),
      enter another dummy filename and press "Save";
      - click "Button1" again
      



  ObservedBehavior:
      The dialog appears, but the "parent directory" button does not work as
      intended (the directory name is updated, but not the file list) and the
      "Save" button does not close the window...
      



  DesiredBehavior:
      Normal operation for tk_getSaveFile: the "parent directory" button must
      refresh the file list and the "Save" button must close the window and
      return the selected file.
      





      Making the dialog in proc. file2 a child of .wdw seems to solve the
      problem. But this solution may not be applicable...
      
  --
  This was fixed with other Unix dialog enhancements in 8.3b2. 
  -- 02/01/2000 hobbs


tkt_uuid: 220480ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Windows: entry with -show option copies visible text
comment:
  OriginalBugID: 1687 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-01'
  LastModified: '1999-04-05'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: Linux-SuSE
  OSVersion: SuSE6.0
  Machine: Other
  FixedDate: '1999-04-05'
  FixedInVersion: 8.1b3


  Name:

  Christian Krone


  ReproducibleScript:

      # This script should display in *both* entries five stars.

      # Instead it displays in the second entry the magic word...


      pack [entry .e -show *]

      pack [entry .e2]

      tkwait visibility .e


      .e insert 0 magic

      .e selection range 0 end

      event generate .e <<Copy>>

      event generate .e2 <<Paste>>


  ObservedBehavior:

      On Windows (exactly on systems, where the <<Cut>>, <<Copy>> and

      <<Paste>>

      events are active) the user can make hidden (by means of the -show

      option)

      text visible. She has simple copy (or cut) it into the clipboard and

      then

      paste it into any application (another Tk entry or maybe the Notepad.


  DesiredBehavior:

      The clipboard should see exactly the same text as it is visible on the

      display: The show character and nothing else.


  Patch:

  *** entry.tcl.org       Wed Sep 30 04:17:32 1998

  --- entry.tcl   Thu Apr  1 17:45:14 1999

  ***************

  *** 32,47 ****

    # The code below creates the default class bindings for entries.

    #-------------------------------------------------------------------------

    bind Entry <<Cut>> {

  !     if {![catch {set data [string range [%W get] [%W index sel.first]\

  !           [expr {[%W index sel.last] - 1}]]}]} {

          clipboard clear -displayof %W

          clipboard append -displayof %W $data

          %W delete sel.first sel.last

        }

    }

    bind Entry <<Copy>> {

  !     if {![catch {set data [string range [%W get] [%W index sel.first]\

  !           [expr {[%W index sel.last] - 1}]]}]} {

          clipboard clear -displayof %W

          clipboard append -displayof %W $data

        }

  --- 32,45 ----

    # The code below creates the default class bindings for entries.

    #-------------------------------------------------------------------------

    bind Entry <<Cut>> {

  !     if {![catch {set data [tkEntryGetSelection %W]}]} {

          clipboard clear -displayof %W

          clipboard append -displayof %W $data

          %W delete sel.first sel.last

        }

    }

    bind Entry <<Copy>> {

  !     if {![catch {set data [tkEntryGetSelection %W]}]} {

          clipboard clear -displayof %W

          clipboard append -displayof %W $data

        }

  ***************

  *** 608,610 ****

  --- 606,623 ----

        return $pos

    }


  + # tkEntryGetSelection --

  + #

  + # Returns the selected text of the entry with respect to the -show option.

  + #

  + # Arguments:

  + # w -         The entry window from which the text to get

  +

  + proc tkEntryGetSelection {w} {

  +     set entryString [string range [$w get] [$w index sel.first] \

  +                        [expr [$w index sel.last] - 1]]

  +     if {[$w cget -show] != ""} {

  +       regsub -all . $entryString [string index [$w cget -show] 0] entryString

  +     }

  +     return $entryString

  + }


  PatchFiles:

      entry.tcl




      The patch applies to tk8.0.3, too.
      


tkt_uuid: 220481ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: selected text not highlighted in edit
comment:
  OriginalBugID: 1688 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-01'
  LastModified: '1999-08-07'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-08-07'
  FixedInVersion: 8.1.1


  Name:
  Brian Toby

  ReproducibleScript:
      text .txt -width 50 -wrap none -state disabled  -yscrollcommand ".yscroll set" -xscrollcommand ".xscroll set" 
      scrollbar .yscroll -command ".txt yview"
      scrollbar .xscroll -command ".txt xview" -orient horizontal
      grid .xscroll -column 0 -row 2 -sticky ew -columnspan 4
      grid .txt -column 0 -row 1 -sticky nsew -columnspan 4
      grid .yscroll -column 4 -row 1 -sticky ns 
      grid columnconfigure . 3 -weight 1
      grid rowconfigure . 1 -weight 1
      grid [button .b1 -text enable -command ".txt config -state normal"]  -column 0 -row 0
      grid [button .b2 -text disable -command ".txt config -state disabled"]
       -column 1 -row 0
      grid [button .b3 -text "show selection"  -command {tk_dialog .show Select [selection get] "" 0 OK} ]  -column 2 -row 0
      for {set i 0} {$i < 50} {incr i} {.txt insert end "this is line $i\n"}

  ObservedBehavior:
      In the above script, text in the text box can be selected by dragging
      the mouse. In UNIX selected text is highlighted, in Windows it is not,
      even though the selection is indeed set . Interestingly, the text is
      highlighted if the state for .txt is set to normal. Once text has been
      selected and highlighted once, the text box can then be set "disabled"
      and text highlighting occurs correctly.

  DesiredBehavior:
      Selected text should always be highlighted.



      I would really love a work around -- is there any command that would
      allow me to select part of rhe buffer.
  --
  This was a minor bug in the bindings that disabled select on Windows
  for state disabled texts and has since been fixed.  A work-around
  in 8.0.5 would be to remove the check for state. 
  -- 08/07/1999 hobbs


tkt_uuid: 220482ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.1b2
resolution: Invalid
title: focus.test hangs tktest with threads enabled
comment:
  OriginalBugID: 1700 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-01'
  LastModified: '1999-04-09'
  Severity: SER
  Status: Released
  Submitter: lfb
  ChangedBy: redman
  OS: Solaris
  OSVersion: 2.6
  Machine: NA
  FixedDate: '1999-04-09'
  FixedInVersion: 8.1


  [from Larry's post]
  Platform: SPARC Solaris 2.6, Sun C compiler.

  I built Tcl with threads .  Then I built Tk with threads.  I do a make test
  and the tests run up to the focus.tcl test and then things stop and never
  start back up.

  Anyone else seeing this?

  04/09/1999 16:32 - redman - Fixed the problem in tcl/unix/tclUnixNotfy.c, need to release the notifierMutex before calling write() to feed data to the thread to wake it up (the pipe blocks on write, and since the mutex is already locked the thread won't wake up).


tkt_uuid: 220483ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 12. Unix Menus
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: Disabled menubuttons display improperly
comment:
  OriginalBugID: 1735 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-06'
  LastModified: '1999-04-06'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: lfb
  RelatedBugIDs: 1703
  OS: Digital Unix
  Machine: Other
  FixedDate: '1999-04-06'


  Name:

  James Hemmerle



  ReproducibleScript:

  menubutton .m -text test

      pack .m

      .m configure -state disabled



  ObservedBehavior:

  When the menubutton is disabled, the text is unreadable.  The

      button appears completely in the disabledForeground color.



  DesiredBehavior:

  The menubutton should display in the disabledForeground and background

      colors.  (The way it displayed in Tk4.2 and the way disabled buttons

      appear in Tk8.1.)



  Patch:

  146,147c146,147

  <     if (((mbPtr->state == STATE_DISABLED) && (mbPtr->disabledFg != NULL) )

  <           || (mbPtr->image != NULL)) {

  ---

  >     if ((mbPtr->state == STATE_DISABLED) 

  >       && ((mbPtr->disabledFg == NULL) || (mbPtr->image != NULL))) {



  PatchFiles:

  tkUnixMenubu.c


tkt_uuid: 220484ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 76. Widget Tour
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Widget tour error: The file lib\tk8.1\demos\twind.tcl is missing
comment:
  OriginalBugID: 1754 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-08'
  LastModified: '1999-10-30'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  FixedDate: '1999-10-30'
  FixedInVersion: 8.2.2


  Name:
  Ingemar Hansson

  Comments:
  Widget tour error:
      The link to "A text widget with embedded windows" doesn't work. 
      The file lib\tk8.1\demos\twind.tcl is missing



  This is missing in the Windows distrib for 8.2.1 as well. 
  -- 10/22/1999 hobbs
  For some reason this was set to be installed in demos\twin\released.tcl
  (where it can be found).  This was changed back to the expected value. 
  -- 10/30/1999 hobbs


tkt_uuid: 220485ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title:
  when binding "destroy $w" to alt-w and ctrl-w, you got an error pressing alt-w and it works pressing ctrl-c...

comment:
  OriginalBugID: 1759 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-08'
  LastModified: '1999-09-16'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux
  OSVersion: latest slackware i586 pc
  Machine: Other
  FixedDate: '1999-09-16'
  FixedInVersion: 8.2


  Name:

  Luc Deschenaux



  Extensions:

  Tk..



  CustomShell:

  nothing but applied this patch right now



  Comments:

  Thanks for Tcl/Tk !



  ReproducibleScript:

  two destructive hotkeys that's too hot for a TK 8.0.5...

      

      I try to be user friendly and look what happends... 

      I use ctrl and alt for my shortcuts, eg:

      (paste this in wish and press alt-w)

      

      proc about {} { 

        catch { 

          set w .about 

          toplevel $w 

      #    about_ui $w 

          bind $w <Alt-w> "destroy $w" 

          bind $w <Control-w> "destroy $w" 

          wm title .about "About this application" 

          wm resizable .about 0 0 

        } 

      } 

      about

      

      



  ObservedBehavior:

  the window is destroyed normally using Control-w but I got an error when

      I press Alt-w...  the error occurs in tkTraverseToMenu (lib/tk/menu.tcl)

      and there's no menu in this window :) 

      

      the stack trace is: 

      

      bad window path name ".about" 

          while executing 

      "winfo class $w" 

          (procedure "tkTraverseToMenu" line 6) 

          invoked from within 

      "tkTraverseToMenu .about w" 

          (command bound to event) 

        

      

      once it crashed my program and I got this message in the terminal

      window: 

      

      bgerror failed to handle background error. 

          Original error: bad window path name ".about" 

          Error in bgerror: can't invoke "toplevel" command:  application has

      been destroyed



  DesiredBehavior:

  guess..

      

      ok wait, I make the patch myself..



  Patch:

  *** menu.tcl.orig       Thu Apr  8 07:51:01 1999

  --- menu.tcl    Thu Apr  8 07:56:00 1999

  ***************

  *** 956,962 ****



    proc tkTraverseToMenu {w char} {

        global tkPriv

  !     if {$char == ""} {

          return

        }

        while {[winfo class $w] == "Menu"} {

  --- 956,962 ----



    proc tkTraverseToMenu {w char} {

        global tkPriv

  !     if {[catch {winfo class $w}] || $char == ""} {

          return

        }

        while {[winfo class $w] == "Menu"} {



  PatchFiles:

  lib/tk8.0/menu.tcl





  The "winfo class" should probably be a "winfo exists", since that avoids the need for a catch. 
  04/16/1999 14:49 - stanton -
  This works as expected for 8.2. 
  -- 09/16/1999 hobbs


tkt_uuid: 220486ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Chinese letter support in text widget
comment:
  OriginalBugID: 1761 RFE
  Version: 8.0.5
  SubmitDate: '1999-04-08'
  LastModified: '1999-09-01'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-09-01'
  FixedInVersion: 8.2


  Name:
  Di Yu

  DesiredBehavior:
  I want to use Tcl/Tk for Windows to write a program, I want it to
      support 
      Chinese also. Under Chinese platforms such as Richwin for Windows,
      Tcl/Tk8.0.5 
      can display Chinese letters(while 8.1b2 can't), but (1)sometimes Chinese
      letters 
      in a text widget will be cut in half when the widget try to wrap the
      line 
      (2)when I click on a disabled text widget with Chinese letters in it,
      sometimes 
      the letters will change into a mess.



  Please upgrade to the newest Tcl/Tk: 8.2, as this will solve most
  of the Unicode problems.  8.0 was not really a Unicode ready version. 
  -- 09/01/1999 hobbs


tkt_uuid: 220487ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: UPDATE: [scale .s -variable x] --> CRASH!
comment:
  OriginalBugID: 1768 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-09'
  LastModified: '1999-04-16'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  RelatedBugIDs: 1764
  OS: Other
  OSVersion: Red Hat Linux 5.x on Alpha XL 300
  Machine: NA
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1


  Name:
  Don Porter

  Comments:
  The value of the variable 'x' should be stored away as the value
      of the scale only if the variable 'x' exists, and it contains a
      double.  Other variable contents or uninitialized memory can cause
      fatal floating point exceptions.
      
      This patch supercedes one previously submitted, which provided an
      incomplete fix:
      http://www.dejanews.com/getdoc.xp?AN=464143101

  ObservedBehavior:
  $ wish8.1
      % set x {}
      % scale .s -variable x
      
      Program received signal SIGFPE, Arithmetic exception.
      0x1555571b0ac in TkRoundToResolution (scalePtr=0x12019c460,
      value=7.243135901842493e-312) at ./../generic/tkScale.c:1150
      (xxgdb) info stack
      #0  0x1555571b0ac in TkRoundToResolution (scalePtr=0x12019c460,
      value=7.243135901842493e-312) at ./../generic/tkScale.c:1150
      #1  0x1555571a0e4 in ConfigureScale (interp=0x120101720,
      scalePtr=0x12019c460, objc=2, objv=0x120102f10) at
      ./../generic/tkScale.c:635
      #2  0x1555571943c in Tk_ScaleObjCmd (clientData=0x0, interp=0x120101720,
      objc=4, objv=0x120102f00) at ./../generic/tkScale.c:323
      #3  0x15555902544 in TclExecuteByteCode ()
      #4  0x155558de828 in Tcl_EvalObjEx ()
      #5  0x1555590f4a0 in Tcl_RecordAndEvalObj ()
      #6  0x1555590f2bc in Tcl_RecordAndEval ()
      #7  0x155556c64a0 in StdinProc (clientData=0x12014b920, mask=2) at
      ./../generic/tkMain.c:350
      #8  0x15555918944 in Tcl_NotifyChannel ()
      #9  0x1555594aa90 in FileHandlerEventProc ()
      #10 0x1555592737c in Tcl_ServiceEvent ()
      #11 0x1555592778c in Tcl_DoOneEvent ()
      #12 0x155556b1bf4 in Tk_MainLoop () at ./../generic/tkEvent.c:1102
      #13 0x155556c6200 in Tk_MainEx (argc=1, argv=0x11ffff7e8,
      appInitProc=0x120000ab8 <Tcl_AppInit>, interp=0x120101720) at
      ./../generic/tkMain.c:279
      #14 0x120000a8c in main (argc=1, argv=0x11ffff7e8) at ./tkAppInit.c:54

  DesiredBehavior:
  No crashes.

  Patch:
  Index: tkScale.c
  ===================================================================
  RCS file: /cvsroot/tk/generic/tkScale.c,v
  retrieving revision 1.1.4.8
  diff -c -r1.1.4.8 tkScale.c
  *** tkScale.c   1999/03/30 23:56:57     1.1.4.8
  --- tkScale.c   1999/04/09 00:10:29
  ***************
  *** 619,625 ****
    
          /*
           * If the scale is tied to the value of a variable, then set 
  !        * the scale's value from the value of the variable, if it exists.
           */
    
          if (scalePtr->varNamePtr != NULL) {
  --- 619,626 ----
    
          /*
           * If the scale is tied to the value of a variable, then set 
  !        * the scale's value from the value of the variable, if it exists
  !        * and it holds a valid double value.
           */
    
          if (scalePtr->varNamePtr != NULL) {
  ***************
  *** 629,638 ****
    
              name = Tcl_GetString(scalePtr->varNamePtr);
              valuePtr = Tcl_GetVar2Ex(interp, name, NULL, TCL_GLOBAL_ONLY);
  !           if (valuePtr != NULL) {
  !               Tcl_GetDoubleFromObj(interp, valuePtr, &value);
              }
  -           scalePtr->value = TkRoundToResolution(scalePtr, value);
          }
    
          /*
  --- 630,640 ----
    
              name = Tcl_GetString(scalePtr->varNamePtr);
              valuePtr = Tcl_GetVar2Ex(interp, name, NULL, TCL_GLOBAL_ONLY);
  !           if ((valuePtr != NULL)
  !                   && (Tcl_GetDoubleFromObj(interp, valuePtr, &value)
  !                           == TCL_OK)) {
  !               scalePtr->value = TkRoundToResolution(scalePtr, value);
              }
          }
    
          /*

  PatchFiles:
  tkScale.c



  I applied the patch.  04/16/1999 19:03 - rjohnson -


tkt_uuid: 220488ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: summary of test suite failures
comment:
  OriginalBugID: 1770 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-09'
  LastModified: '1999-04-21'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hershey
  RelatedBugIDs: 1769
  OS: Other
  OSVersion: Red Hat Linux 5.x on Alpha XL 300; fvwm2
  Machine: NA
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1


  Name: Don Porter



  CustomShell: The patch to tkScale.c submitted earlier



  Comments: fvwm2 manages a desktop four times as big as the screen.

      I start the test suite in the NW screen of the desktop.

      As the test suite runs, the test windows move up and to

      the left beyond the corner of the screen (should they do

      that?).  When test pack-18.1 iconifies and de-iconifies

      the window .pack, it re-appears in the SE screen of

      the desktop, and the monitor is switched to view that

      screen.  Something about the shift in the screen being

      displayed on the monitor causes the errors in scale-15.5

      and scale-15.6 above.  The patch adjusts the position

      of .pack before test pack-18.1 to avoid the screen switch

      so all tests take place on one screen.  This makes the

      errors scale-15.5 and scale-15.6 go away and it makes

      the errors pack-18.1 and pack 18.2 go away in the 

      interactive testing.  No, I don't understand why the

      pack-* errors occur in interactive testing but not in

      'make test'.

      

      If I interactively select a different screen of the 

      desktop for display as the test suite runs, so that

      . and the other toplevel windows end up on different

      screens, some more errors occur, some apparently

      related to whether or not commands associated with

      widgets get evaluated:

      ==== entry-5.7 ConfigureEntry procedure FAILED

      ==== Test generated error:

      can't read "scrollInfo": no such variable

      ---- Result should have been:

      0 0.363636

      ==== entry-5.7 FAILED

      

      ==== entry-7.1 InsertChars procedure FAILED

      ==== Test generated error:

      can't read "scrollInfo": no such variable

      ---- Result should have been:

      abXXXcde abXXXcde {0 1}

      ==== entry-7.1 FAILED

      

      ==== entry-17.4 EntryUpdateScrollbar procedure FAILED

      ---- Result was:

      {This is line 1, out of 500

      This is line 2, out of 500

      ...

      This is line 500, out of 500

      } {bad entry index "1xyz"

          while executing

      ".e index 1xyz"}

      ---- Result should have been:

      {invalid command name "bogus"} {invalid command name "bogus"

          while executing

      "bogus 0 1"

          (horizontal scrolling command executed by entry)}

      ==== entry-17.4 FAILED

      

      ==== image-10.1 Tk_FreeImage procedure FAILED

      ---- Result was:

      foo {{foo free}}

      ---- Result should have been:

      foo {{foo free} {foo display 0 0 30 15 103 121}}

      ==== image-10.1 FAILED

      

      The remaining errors (menubutton-*, scale-7*,

      unixEmbed-3.1) I have no explanation for.

      

      The patch includes a fix for a rather obvious

      typo in tests/all.tcl .



  ObservedBehavior:

  $ cd tk8.1b3/unix

      $ ./configure --enable-gcc

      $ make all test

      ...

      ==== menubutton-4.5 ConfigureMenuButton procedure FAILED

      ---- Result was:

      98 44 20 12

      ---- Result should have been:

      102 46 20 12

      ==== menubutton-4.5 FAILED

      

      ==== menubutton-7.13 ComputeMenuButtonGeometry procedure FAILED

      ---- Result was:

      71 26

      ---- Result should have been:

      78 28

      ==== menubutton-7.13 FAILED

      ...

      ==== scale-7.1 ComputeScaleGeometry procedure FAILED

      ---- Result was:

      88 383

      ---- Result should have been:

      88 458

      ==== scale-7.1 FAILED

      

      ==== scale-7.5 ComputeScaleGeometry procedure FAILED

      ---- Result was:

      383 61

      ---- Result should have been:

      458 61

      ==== scale-7.5 FAILED

      

      ==== scale-15.5 ScaleVarProc procedure, variable deleted FAILED

      ---- Result was:

      0 6 6 6

      ---- Result should have been:

      0 6 6 untouched

      ==== scale-15.5 FAILED

      

      ==== scale-15.6 ScaleVarProc procedure, don't call -command FAILED

      ==== Contents of test case:

      ---- Result was:

      60 60

      ---- Result should have been:

      untouched 60

      ==== scale-15.6 FAILED

      ...

      ==== unixEmbed-3.1 ContainerEventProc procedure, detect creation FAILED

      ---- Result was:

      {{XXX .f1 {} {}}} {{XXX .f1 {} {}}}

      ---- Result should have been:

      {{XXX .f1 {} {}}} {{XXX .f1 XXX {}}}

      ==== unixEmbed-3.1 FAILED

      

      Also:

      $ make runtest

      % source ./../tests/pack.test

      

      ==== pack-18.1 unmap slaves when master unmapped FAILED

      ---- Result was:

      1 0 100 50 0 1

      ---- Result should have been:

      1 0 200 75 0 1

      ==== pack-18.1 FAILED

      

      ==== pack-18.2 unmap slaves when master unmapped FAILED

      ---- Result was:

      1 0 70 30 0 1

      ---- Result should have been:

      1 0 100 30 0 1

      ==== pack-18.2 FAILED



  DesiredBehavior:

  all tests pass



  Patch:

  Index: all.tcl

  ===================================================================

  RCS file: /cvsroot/tk/tests/Attic/all.tcl,v

  retrieving revision 1.1.2.6

  diff -c -r1.1.2.6 all.tcl

  *** all.tcl     1999/04/07 01:59:48     1.1.2.6

  --- all.tcl     1999/04/09 05:33:51

  ***************

  *** 9,15 ****

    #

    # RCS: @(#) $Id: all.tcl,v 1.1.2.6 1999/04/07 01:59:48 hershey Exp $



  ! if {[lsearch ::tcltest [namespace children]] == -1} {

        source [file join [pwd] [file dirname [info script]] defs.tcl]

    }

    set ::tcltest::testSingleFile false

  --- 9,15 ----

    #

    # RCS: @(#) $Id: all.tcl,v 1.1.2.6 1999/04/07 01:59:48 hershey Exp $



  ! if {[lsearch [namespace children] ::tcltest] == -1} {

        source [file join [pwd] [file dirname [info script]] defs.tcl]

    }

    set ::tcltest::testSingleFile false

  Index: pack.test

  ===================================================================

  RCS file: /cvsroot/tk/tests/pack.test,v

  retrieving revision 1.1.4.4

  diff -c -r1.1.4.4 pack.test

  *** pack.test   1999/03/24 02:54:56     1.1.4.4

  --- pack.test   1999/04/09 05:33:52

  ***************

  *** 923,928 ****

  --- 923,929 ----

          [catch {pack info .pack.a} msg] $msg

    } {place 20x40+40+10 1 {window ".pack.a" isn't packed}}



  + wm geometry .pack +100+100

    test pack-18.1 {unmap slaves when master unmapped} {tempNotPc} {

        # On the PC, when the width/height is configured while the window is

        # unmapped, the changes don't take effect until the window is remapped.



  PatchFiles:

  all.tcl

      pack.test





  I applied the patch.  I made the all.tcl change in Tcl8.1 as well as
  Tk8.1.  The pack.test change was added inside each pack-18.* test.

  I didn't do any work on the tests that failed as a result
  interactively selecting different screens.  It would be nice if such
  interactive changes will did not have ill consequense, but that's a
  rather high expectation.

  I marked the scale-7.*, menubutton, and unixEmbed tests nonPortable.
  I couldn't reproduce the scale-15.* failures. I suspect they are the fault
  of the window manager triggering too many events.
  -hershey


tkt_uuid: 220489ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Chinese letters in a text widget become a mess when clicked
comment:
  OriginalBugID: 1774 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-09'
  LastModified: '1999-08-13'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-08-13'
  FixedInVersion: 8.1


  Name:
  Di Yu

  ReproducibleScript:
  "text .t1 -font ... 
      pack .t1"
      then input Chinese letters into the text under Windows 95 and a Chinese
      platform like Richwin for Internet. Then, click the mouse on the middle
      point of a Chinese letter.

  ObservedBehavior:
  Under Windows 95 and a Chinese platform, the text widget can display
      Chinese words, but when I click the mouse over the widget or move the
      insertion mark by direction keys in the widget, then the text becomes a
      mess. Entry widget doesn't have this problem, so I guess there is
      something wrong with the text widget.

  DesiredBehavior:
  The letters inside text widget should not be influenced by the moving of
      the insertion mark whether by keyboard or by mouse-clicking, no matter
      the letters are English or Chinese. As entry widget can do this, I think
      text widget should also be able to do this.



  This was fixed with internationalization work done in 8.1. 
  -- 08/13/1999 hobbs


tkt_uuid: 220490ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: select to id end - one char missing
comment:
  OriginalBugID: 1777 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-09'
  LastModified: '1999-04-20'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  OS: Solaris
  Machine: Other
  FixedDate: '1999-04-20'
  FixedInVersion: 8.1


  Name:
  Peter Weigand

  ReproducibleScript:
  The behaviour for text select changed in 8.1.
      The Dummy without y is shown selected in 8.1 in the following example:
      frame .main
      canvas .main.c
      pack .main.c
      pack .main
      update
      set id [.main.c create text 0 0 -text "Dummy" -anchor nw]
      .main.c select from $id 0
      .main.c select to $id end

  DesiredBehavior:
  It should show the whole selection as selected.



  Bug appears to have been caused by diff of bytes & chars in handling text code in canvas.  Changed the test to get the "last selected item" and all appears to be working now.  04/20/1999 15:30 - rjohnson -


tkt_uuid: 220491ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: TkMan will not work without dash patched Tk
comment:
  OriginalBugID: 1779 RFE
  Version: 8.1b3
  SubmitDate: '1999-04-12'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Other
  Machine: NA
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:
  Bruce Stephens

  DesiredBehavior:
  TkMan is an excellent advertisement for Tcl/Tk.  But it requires a patch
      to the core--the elide patch (to provide elided text in text widgets).
      The patch is relatively small, and seems harmless (although it doesn't
      seem to have tests or documentation).  I think it would be worth
      expending a little effort to get it into the core---otherwise everyone
      that wants to use this excellent application needs to use a patched Tk.



  This is also part of the dash patch.  This could be considered if
  it had FULL tests and documentation. 
  -- 08/06/1999 hobbs
  In 8.3b1. 
  -- 12/13/1999 hobbs


tkt_uuid: 220492ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 36. [tk_chooseDirectory]
priority: 2
foundin: obsolete: 8.1b2
resolution: Fixed
title: tk_chooseDirectory undocumnted
comment:
  OriginalBugID: 1786 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-12'
  LastModified: '2000-01-26'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-01-26'
  FixedInVersion: 8.3


  Name:
  Christopher Nelson

  ReproducibleScript:
  info commands *ire*

  ObservedBehavior:
  There's no entry for tk_chooseDirectory in the .HLP file index nor can
      it be found by searching for directory

  DesiredBehavior:
  Document it like tk_getOpenFile and tk_saveFile; possibly on the same
      page (surely with a cross reference).



  Still missing in 8.2.1. 
  -- 10/22/1999 hobbs

  I added the documentation for tk_chooseDirectory as well as the implementation for Unix/Mac (adapted from the code in your errata).
  It will go out with 8.3.

  - eric

  -- 01/26/2000 ericm


tkt_uuid: 220493ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: tkText.c: TextSearchCmd() memory loss
comment:
  OriginalBugID: 1790 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-13'
  LastModified: '1999-04-16'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  OS: Solaris
  OSVersion: 5.5.1
  Machine: Other
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1


  Name:

  Peter Weigand



  Comments:

  The Tcl_DStringInit(&line); is moved because you need to init it before

      you try to free it.



  ReproducibleScript:

  In the above mention function there are return TCL_ERROR without freeing

      the DStrings.T



  Patch:

  *** tkText.cSat Apr  3 01:56:02 1999

  --- tkText.c.newMon Apr 12 22:20:44 1999

  ***************

  *** 1624,1631 ****

    Tcl_UtfToLower(pattern);

        }

    

        if (TkTextGetIndex(interp, textPtr, argv[i+1], &index) != TCL_OK) {

  ! return TCL_ERROR;

        }

        numLines = TkBTreeNumLines(textPtr->tree);

        startingLine = TkBTreeLineIndex(index.linePtr);

  --- 1624,1635 ----

    Tcl_UtfToLower(pattern);

        }

    

  +     Tcl_DStringInit(&line);/* make sure init */

  + 

        if (TkTextGetIndex(interp, textPtr, argv[i+1], &index) != TCL_OK) {

  ! code = TCL_ERROR;

  ! goto done;

  ! /*return TCL_ERROR;*/

        }

        numLines = TkBTreeNumLines(textPtr->tree);

        startingLine = TkBTreeLineIndex(index.linePtr);

  ***************

  *** 1642,1648 ****

        }

        if (argsLeft == 1) {

    if (TkTextGetIndex(interp, textPtr, argv[i+2], &stopIndex) != TCL_OK) {

  !     return TCL_ERROR;

    }

    stopLine = TkBTreeLineIndex(stopIndex.linePtr);

    if (!backwards && (stopLine == numLines)) {

  --- 1646,1654 ----

        }

        if (argsLeft == 1) {

    if (TkTextGetIndex(interp, textPtr, argv[i+2], &stopIndex) != TCL_OK) {

  ! code = TCL_ERROR;

  ! goto done;

  ! /*return TCL_ERROR;*/

    }

    stopLine = TkBTreeLineIndex(stopIndex.linePtr);

    if (!backwards && (stopLine == numLines)) {

  ***************

  *** 1666,1677 ****

        } else {

    regexp = Tcl_RegExpCompile(interp, pattern);

    if (regexp == NULL) {

  !     return TCL_ERROR;

    }

        }

        lineNum = startingLine;

        code = TCL_OK;

  !     Tcl_DStringInit(&line);

        for (passes = 0; passes < 2; ) {

    if (lineNum >= numLines) {

        /*

  --- 1672,1685 ----

        } else {

    regexp = Tcl_RegExpCompile(interp, pattern);

    if (regexp == NULL) {

  ! code = TCL_ERROR;

  ! goto done;

  ! /*return TCL_ERROR;*/

    }

        }

        lineNum = startingLine;

        code = TCL_OK;

  !     /*Tcl_DStringInit(&line);*/

        for (passes = 0; passes < 2; ) {

    if (lineNum >= numLines) {

        /*



  PatchFiles:

  tkText.c





  Applied patch - 04/16/1999 19:27 - rjohnson -


tkt_uuid: 220494ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 52. [clipboard]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: selection not UTF-aware
comment:
  OriginalBugID: 1791 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-13'
  LastModified: '1999-07-01'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: foster
  OS: Solaris
  OSVersion: 2.5.1
  Machine: Other
  FixedDate: '1999-06-03'
  FixedInVersion: 8.2b1


  Name:
  Jeffrey Hobbs

  CustomShell:
  I have made mods, but the above is

  Comments:
  I'd like to see some fix to prevent the crash, and then whatever
      route was chosen should probably be documented in the selection
      mechanism docs (both C and Tk level APIs).

      Note that this isn't a problem in Tk8.0 due to the lack of Unicode.

  ReproducibleScript:
  The problem is that the Tk selection mechanism can bring chars into Tk
      that are not safe in all areas of the UTF code (specifically,
      conversion
      between UTF and Unicode, like in string to*).  Here is a snapshot from
      tkcon (commented) that illustrates the bug (causing a crash).  It must
      be done with a Tk-based console (because selection get is used) to
      bring out the bug.

      Main console display active
      ## Here I get the value for a from the xterm,
      ## pasting into the text widget with <2>
      ## We see it comes across as u(umlauted)ber, even with
      ## the cut and past to Netscape
      (unix) 1 % set a über
      über
      ## This special function is like string length without
      ## the Tcl_NumUtfChars, meaning it returns the exact number
      ## of bytes used internally to store the string.
      ## We see that the umlauted u takes only one byte
      (unix) 2 % string bytes $a
      4
      ## Here I type in the \374, which Tcl conveniently converts to
      ## the umlauted u (utf-wise), and I see that in Tk.  The tilde'd A
      ## followed by the 1/4 symbol occurs only through cut-and-paste.
      ## That is the difference really between UTF-wise unicode and straight
      ## interpretation of the umlauted u.  It fits in one byte (as was
      ## done with 8.0), but in a proper UTF env, it is two.
      (unix) 3 % set b \374ber
      über
      ## Here we see that Tcl recognizes the proper ueber is 5 bytes.
      (unix) 4 % string bytes $b
      5
      (unix) 5 % string len $a
      4
      (unix) 6 % string len $b
      4
      ## Both come to the same length (NumUtfChars)
      ## toupper works on b, as the size is appropriate
      ## I get the U-umlaut, as expected in Tk, it just
      ## gets lost here in selection again.
      (unix) 7 % string toupper $b
      Ã?BER
      (unix) 8 % string toupper $a
      ## Doing a string toupper on a, with only 4 bytes, seg faults
      ## on Solaris.

  ObservedBehavior:
  Program received signal SIGSEGV, Segmentation fault.
      0xef5a83dc in Tcl_UniCharToUtf (ch=156, 
          str=0x168000 <Address 0x168000 out of bounds>) at
      ./../generic/tclUtf.c:109
      109             str[1] = (char) ((ch | 0x80) & 0xBF);
      (gdb) bt
      #0  0xef5a83dc in Tcl_UniCharToUtf (ch=156, 
          str=0x168000 <Address 0x168000 out of bounds>) at
      ./../generic/tclUtf.c:109
      #1  0xef5a92a4 in Tcl_UtfToUpper (
          str=0xbb428
      "Ã\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â 234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234
      Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\2
      34Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â
      \234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\23
      4Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â 234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234Â\234"...) at
      ./../generic/tclUtf.c:862
      #2  0xef54193c in Tcl_StringObjCmd (dummy=0x0, interp=0xaa810, objc=3, 
          objv=0xab17c) at ./../generic/tclCmdMZ.c:1197
      #3  0xef55cf44 in TclExecuteByteCode (interp=0xaa810, codePtr=0xb1388)
          at ./../generic/tclExecute.c:843

  DesiredBehavior:
  I would expect it not to crash.  Preferrably in my case, I would like to
      see that stuff coming in from selection get is properly converted into a
      format that Tcl code won't choke on.  See the example:

      Main console display active
      (unix) 1 % set a über
      über
      (unix) 2 % string bytes $a
      4
      (unix) 3 % encoding convertfrom ascii $a
      über
      (unix) 4 % string bytes [encoding convertfrom ascii $a]
      5

      OK, so for me to safely (the question is whether it is proper) bring in
      arbitrary data to Tk that might be further manipulated in Tcl (this
      would be the case for any text editor), I have to do an encoding
      conversion
      on my own.  Note that this is a two-way problem (UTF chars go out as is,
      meaning I paste them into something non-UTF aware and get multiple
      chars).



  The problem with "string toupper" (and consequently "string tolower") was fixed.  the problem was that badly formed Utf strings can contain character that increase in size when converted to their lower of upper case counterparts.  The Tcl_UtfToUpper and Tcl_UtfToLower functions now check that the number of bytes is not increased before copying the new char (in place).  If the number of bytes has increased, the the offending character is not converted to upper or lower case.

  A small test case for the "string toupper" bug is the following:

       text .t ; pack .t
       # paste über or into the text widget
       set x [.t get 0.0 end]
       string toupper $x

  The selection bug can be handled by changing tk code in 4 places:

  1) convert local encoding to utf in TkSelEventProc, where retrPtr->proc is called.

  2) convert local encoding to utf in SelRcvIncrProc.  This is the conversion case where the selection is large so it's done in multiple chunks.  Avoid converting a partial char to utf--do this by storing the partial char in the selection struct, to be converted the next time.  Use the flags in the Tcl_ExternalToUtf call to learn whether there is a partial char.

  3 &4) convert the utf to local encoding in ConvertSelection.  Do this in both the 1-chunk and multiple-chunk selections, where propPtr is set (in the "if" and "else if" clauses, but not in the "else" clause--handles binary data).  Beware of copying partial bytes in multiple-chunk case.
  04/28/1999 19:10 - hershey -

  06/03/1999 11:46 - stanton - Selection code has been upgraded to support COMPOUND_TEXT and STRING formats using iso2022 and iso8859-1 respectively.


tkt_uuid: 220495ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: NT / tkIntXlibDecls.h not installed correctly
comment:
  OriginalBugID: 1799 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-14'
  LastModified: '1999-04-16'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: surles
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1b3


  Name:
  Petteri Kettunen

  Extensions:
  N/A

  CustomShell:
  N/A

  Comments:
  N/A

  ReproducibleScript:
  Dowload tk81b3.zip, cd tk8.1b3\win, nmake, nmake install. Then try to
      compile something that includes tk.h from install directory.
      
      C:\tmp>cat dummy.c
      #include <stdio.h>
      #include <tcl.h>
      #include <tk.h>
      
      void dummy() { }

  ObservedBehavior:
  C:\tmp>cl -c -Ie:\pr\tcl\include dummy.c
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
      80x86
      Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
      
      dummy.c
      e:\pr\tcl\include\X11/Xlib.h(1220) : fatal error C1083: Cannot open
      include file
      : 'tkIntXlibDecls.h': No such file or directory

  DesiredBehavior:
  Clean compilation without errors.

  Patch:
  N/A

  PatchFiles:
  N/A



  04/16/1999 17:19 - surles - Updated the Tcl and Tk makefile.vc files so that the correct decl header files are installed."


tkt_uuid: 220496ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 82. X11 Emulation
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Xlib.h not usable together with GNU Win32 header (Windows32/Stuctures.h)
comment:
  OriginalBugID: 1804 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-14'
  LastModified: '1999-05-07'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-05-07'
  FixedInVersion: 8.1


  Name:
  Jan Nijtmans

  Comments:
  This change is exactly how Cygnus already solved this problem
      in its own Tcl/Tk version. It is not a bug in a GNU-Win32
      header-file, it's simply the fact that "Status" is a valid field
      name in an already existing structure. The macro in <Xlib.h>
      is dangerous because it replaces "Status" with "int"
      everywhere, even if it results in syntactically incorrect
      program code. Changing this in a typedef solves this,
      without any undesired side-effects.

  ReproducibleScript:
  Compile any extension with mingw32 or cygwin, thereby including
      <X11/Xlib.h>
      before <windows.h>. The compiler (gcc or egcs) gives an error-message
      because "int" is not a valid variable name.
      
      The problem comes because "Status" is also a variable name in some
      internal structures in the "Windows32/Stuctures.h" header-file.

  ObservedBehavior:
  Compiler warning: "empty declaration", but in fact this
      warning is fatal in some situations. De compiler tries
      to fix this by splitting an int member-variable into two
      empty int member variables. In this case that is totally
      wrong, which can result in undesired behaviour very
      difficult to track down. Therefore I strongly suggest
      that this is fixed in Tk's <X11/Xlib.h> header file.

  Patch:
  *** Xlib.h.origMon Apr 05 19:48:32 1999
  --- Xlib.hWed Apr 14 16:15:52 1999
  ***************
  *** 58,64 ****
    typedef char *XPointer;
    
    #define Bool int
  ! #define Status int
    #define True 1
    #define False 0
    
  --- 58,64 ----
    typedef char *XPointer;
    
    #define Bool int
  ! typedef int Status;
    #define True 1
    #define False 0

  PatchFiles:
  X11/Xlib.h


tkt_uuid: 220497ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: text & entry cursor blink continues when disabled
comment:
  OriginalBugID: 1807 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-14'
  LastModified: '2000-01-06'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Other
  OSVersion: openVMS V7.1
  Machine: NA
  FixedDate: '2000-01-06'
  FixedInVersion: 8.3b2


  Name:
  Roy Lane

  CVS:
  tktext.c,tkentry.c

  CustomShell:
  minor modifications for openVMS support

  ObservedBehavior:
  Particularly with text widget, but also applies to entry widget.  When
      text widget is in "disabled" state (used for read-only text), there
      should be no calls to TextBlinkProc().  There is a noticeable drag in
      performance.  When the recommended patch is applied, performance
      improves greatly.

  Patch:
  (generation 2 is 8.0.5 release; generation 3 contains modifications)

  Files Compared By LANE On 14-APR-1999 08:36:06
     (1)  Element TKTEXT.C Generation 2
     (2)  Element TKTEXT.C Generation 3

  (in TextBlinkProc())
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  Element TKTEXT.C(2) Line 1514
        1)    if (!(textPtr->flags & GOT_FOCUS) || (textPtr->insertOffTime == 0))*

  Element TKTEXT.C(3) Line 1514
        2)    if ((textPtr->state == tkTextDisabledUid) ||
        2)            !(textPtr->flags & GOT_FOCUS) || (textPtr->insertOffTime ==*
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  Files Compared By LANE On 14-APR-1999 08:37:23
     (1)  Element TKENTRY.C Generation 2
     (2)  Element TKENTRY.C Generation 3

  (in EntryBlinkProc())
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  Element TKENTRY.C(2) Line 2198
        1)    if (!(entryPtr->flags & GOT_FOCUS) || (entryPtr->insertOffTime == 0*

  Element TKENTRY.C(3) Line 2198
        2)    if ((entryPtr->state == tkDisabledUid) ||
        2)            !(entryPtr->flags & GOT_FOCUS) || (entryPtr->insertOffTime *
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  PatchFiles:
  tkText.c
      tkEntry.c



  4/22/99 - redman - a little late for 8.1.0, try for 8.1.1.
  --
  Added to 8.3b2 as specified. 
  -- 01/06/2000 hobbs


tkt_uuid: 220498ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 46. Unix Fonts
priority: 2
foundin: obsolete: 8.0.4
resolution: Fixed
title: Font selection fails for some X servers
comment:
  OriginalBugID: 1808 RFE
  Version: 8.0.4
  SubmitDate: '1999-04-14'
  LastModified: '2000-02-25'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux-Red Hat
  Machine: Other
  FixedDate: '2000-02-25'
  FixedInVersion: 8.1.1


  Name:
  D. Richard Hipp

  ReproducibleScript:
  # Fails on the KEA-X! Xserver.  Works OK on XFree86.
      #
      button .b -text hello -font "times 24"; pack .b

  ObservedBehavior:
  On KEA-X! (An X server for Win98) any font named using "<family> <size>"
      gives you the font we normally call "fixed".
      
      I traced the problem to the XLoadQueryFont() call within
      TkpGetNativeFont() in the file unix/tkUnixFont.c.  KEA-X! always
      returns a font for this call.  It never returns NULL.  If it can
      do no better, it returns the fixed-pitch font.  
      
      I can think of several work-arounds here, but in every case
      I think I need to patch the core.  I'd like to have a
      discussion with your developers about what the best solution
      might be.  I'll be happy to implement a fix and submit it
      to you, once we decide what the best approach is.  But I
      need your input.  Please call.  D. Richard Hipp.  704.948.4565

  DesiredBehavior:
  When I request "times 24", I expect to see a 24-point Times font,
      or at least something close to that.



  This is really the fault of the Xserver (Exceed has the same problem,
  but Xwin32 works as expected).  The X server is not supposed to
  substitute a font for you (and Unix X servers adhere to this).  The
  Windows X servers should follow this standard, but some choose the
  "Windows" way of returning a default font. 
  -- 02/25/2000 hobbs
  IN RESPONSE:
  I agree.  But the fact remains that the only X server many
  folks will ever see is Exceed and we want to give them
  a good experience.

  This bug has been fixed for ages, by the way.  I think
  it was fixed in like 8.1 or something.
  -- 
  D. Richard Hipp -- drh@acm.org -- http://www.hwaci.com/drh/ 
  -- 02/25/2000 hobbs


tkt_uuid: 220499ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: canvas find below x - segmentation error
comment:
  OriginalBugID: 1840 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-15'
  LastModified: '1999-04-16'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  OS: Solaris
  OSVersion: 2.5.1
  Machine: Other
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1


  Name:

  Peter Weigand



  ReproducibleScript:

  canvas .c

      pack .c

      .c find below Selected



  DesiredBehavior:

  no segmentation error



  Patch:

  *** tkCanvas.cWed Feb 17 03:18:30 1999

  --- tkCanvas.c.newThu Apr 15 21:43:15 1999

  ***************

  *** 2539,2546 ****

        return TCL_ERROR;

    }

    itemPtr = StartTagSearch(canvasPtr, argv[1], &search);

  ! if (itemPtr->prevPtr != NULL) {

  !     DoItem(interp, itemPtr->prevPtr, uid);

    }

        } else if ((c == 'c') && (strncmp(argv[0], "closest", length) == 0)) {

    double closestDist;

  --- 2539,2548 ----

        return TCL_ERROR;

    }

    itemPtr = StartTagSearch(canvasPtr, argv[1], &search);

  ! if (itemPtr != NULL) {/* needed otherwise segment error */

  !     if (itemPtr->prevPtr != NULL) {

  ! DoItem(interp, itemPtr->prevPtr, uid);

  !     }

    }

        } else if ((c == 'c') && (strncmp(argv[0], "closest", length) == 0)) {

    double closestDist;



  PatchFiles:

  tkCanvas.c





  That sure was a bug - must have been in for a long time!  04/16/1999 18:37 - rjohnson -


tkt_uuid: 220500ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: bug in GetKeySym in tkBind.C
comment:
  OriginalBugID: 1850 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-16'
  LastModified: '2000-01-12'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  Machine: Other
  FixedDate: '2000-01-12'
  FixedInVersion: 8.2b3


  Name:

  Robert Sangkyu Lee


  Comments:

  I look like GetKeySym function in tkBind.c use's Tk's own method for 

      determining the KeySym.  There are other places in tkBind.C that uses 

      XLookupString to get the character from X.  However, GetKeySym should

      have

      been using XLookupString as well.


  ReproducibleScript:

  In Solaris 2.6 and Linux 5.2, run the following code:


      #!/usr/local/bin/wish -f


      label .lab1 -text "Name:"

      entry .ent1

      bind .ent1 <KeyPress> "puts \" {W=%W #=%# A=%A  x=%x y=%y b=%b s=%s

      K=%K} \""

      grid .lab1 -row 1 -column 0 -sticky e

      grid .ent1 -row 1 -column 1 -sticky ew


  ObservedBehavior:

  When I press number 4 with numlock turned on, Tk reports number 4 is

      pressed, but it also reports that KeySym is "Left".   See the output

      below.


      {W=.ent1 #=134 A=4  x=118 y=33 b=112 s=0 K=Left}


  DesiredBehavior:

  When I press number 4 with numlock turned on, Tk reports number 4 is

      pressed and reports that KeySym is "KP_4".   See the output below which

      ran correctly with Exceed 6 on NT.


      {W=.ent1 #=134 A=4  x=118 y=33 b=112 s=32 K=KP_4}


  Patch:

  $ diff -c tkBind.c tkBind.c.rslee

  *** tkBind.c    Fri Oct  9 20:30:36 1998

  --- tkBind.c.rslee      Thu Apr 15 09:31:25 1999

  ***************

  *** 4229,4234 ****

  --- 4229,4242 ----

        XEvent *eventPtr;         /* Description of X event. */

    {

        KeySym sym;

  + 

  + #ifndef TK_USE_INPUT_METHODS

  +     char numStorage[NUM_SIZE+1];

  +     XComposeStatus status_in_out;

  + 

  +     XLookupString(&eventPtr->xkey, numStorage, NUM_SIZE, &sym, &status_in_out);

  +     return sym;

  + #else /* TK_USE_INPUT_METHODS */ 

        int index;


        /*

  ***************

  *** 4284,4289 ****

  --- 4292,4298 ----

                      index & ~1);

        }

        return sym;

  + #endif /* TK_USE_INPUT_METHODS */ 

    }


    /*


  PatchFiles:

  tkBind.C




  With 8.2b3 there appears to be no problem in recognizing the
  keysym.  tkBind has been reworked, so this problem possibly
  went away. 
  -- 08/13/1999 hobbs


tkt_uuid: 220501ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 40. Bitmap Images
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: segmentation error with faulty stipple Bitmap
comment:
  OriginalBugID: 1853 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-16'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: rjohnson
  OS: Solaris
  OSVersion: 2.5.1
  Machine: Other
  FixedDate: '1999-04-16'
  FixedInVersion: 8.1


  Name:

  Peter Weigand



  Comments:

  It is all over in the code: check if interp is not NULL and then call

      Tcl_AppendResult, Tcl_SetResult, ...

      Why not checking for interp not NULL in these functions instead of all

      over in the code. It makes life easier but execution of an application

      might be a little bit slower but it decreases the code size when the

      checking is done in the place where it should be (where you need the

      interp).

      If the checking for interp is done in the low level functions then it

      also removes some maybe still missing checks for "is the interp valid?".

      Actually the interp should be known globally so you do not have to pass

      it all the time and you can get all information returned. Just make a

      function like Tcl_GetActiveInterp and you never need to pass it. This

      might be a bit tricky to find out what is the interp I should use but If

      you have just one interp then it is really simple.



  ReproducibleScript:

  do a stipple bitmap where the bitmap has errors in a canvas create

      command



  ObservedBehavior:

  It results in a segmentation error because TkReadBitmapFile has no

      interp passed and then it calls TkGetBitmapData with interp NULL.

      Because of the faulty bitmap data it calls TclSetResult with interp NULL

      and there the segmentation error happens.



  DesiredBehavior:

  No segmentation errors at all.



  Patch:

  *** tkImgBmap.cWed Feb 17 03:18:35 1999

  --- tkImgBmap.c.newFri Apr 16 19:15:59 1999

  ***************

  *** 630,636 ****

        return data;

    

        error:

  !     Tcl_SetResult(interp, "format error in bitmap data", TCL_STATIC);

    

        errorCleanup:

        if (data != NULL) {

  --- 630,638 ----

        return data;

    

        error:

  !     if (interp != NULL) {

  ! Tcl_SetResult(interp, "format error in bitmap data", TCL_STATIC);

  !     }

    

        errorCleanup:

        if (data != NULL) {



  PatchFiles:

  tkImgBmap.c





  Applied patch - 04/16/1999 19:34 - rjohnson -


tkt_uuid: 220502ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 57. [option]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_AddOption API
comment:
  OriginalBugID: 1854 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man page for this function for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220503ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_GetHINSTANCE API
comment:
  OriginalBugID: 1862 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man page entry for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220504ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_GetHWND API
comment:
  OriginalBugID: 1863 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man page for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220505ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_GetNumMainWindows API
comment:
  OriginalBugID: 1865 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man entry for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220506ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 28. Utility Functions
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_GetScrollInfoObj API
comment:
  OriginalBugID: 1866 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-25'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-25'
  FixedInVersion: 8.3.1


  .

  I added a manual entry for this API for 8.3.1.

  - eric
   
  -- 04/25/2000 ericm


tkt_uuid: 220507ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 56. [grab]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_Grab API
comment:
  OriginalBugID: 1868 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man entry for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220508ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_HWNDToWindow API
comment:
  OriginalBugID: 1869 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added a man page for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220509ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_IsContainer API
comment:
  OriginalBugID: 1871 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-01-18'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: hobbs
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-01-18'
  FixedInVersion: 8.3


  as above

  added to WindowId.3 for 8.3.0. 
  -- 01/18/2000 hobbs


tkt_uuid: 220510ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_IsEmbedded API
comment:
  OriginalBugID: 1872 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-01-18'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: hobbs
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-01-18'
  FixedInVersion: 8.3


  as above

  added to WindowId.3 for 8.3.0. 
  -- 01/18/2000 hobbs


tkt_uuid: 220511ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_SafeInit API
comment:
  OriginalBugID: 1884 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-27'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-27'
  FixedInVersion: 8.4a1


  .

  I added an entry for this API.  This fix will go out with 8.4a1.

  - eric
   
  -- 04/27/2000 ericm


tkt_uuid: 220512ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 56. [grab]
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Docs missing for Tk_Ungrab API
comment:
  OriginalBugID: 1889 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '2000-04-24'
  Severity: MED
  Status: Released
  Submitter: surles
  ChangedBy: ericm
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '2000-04-24'
  FixedInVersion: 8.3.1


  .

  I added the man page entry for this API for 8.3.1.

  - eric
   
  -- 04/24/2000 ericm


tkt_uuid: 220513ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 61. Safe Tk
priority: 2
foundin: obsolete: 8.1b3
resolution: Fixed
title: Can't delete Tk from safe interp on W98
comment:
  OriginalBugID: 1939 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-27'
  LastModified: '2000-04-16'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86
  FixedDate: '2000-04-16'
  FixedInVersion: 8.3.1


  Name:
  Christopher Nelson

  ReproducibleScript:
  ::safe::interpCreate bar -statics 1
      ::safe::loadTk bar
      # Click on Delete button in new top level

  ObservedBehavior:
  invalid command name "none"
          while executing
      "none"
          (procedure "disallowTk" line 4)
          invoked from within
      "disallowTk $slave"
          (procedure "::safe::tkDelete" line 18)
          invoked from within
      "::safe::tkDelete .safe4.fc .safe4 bar"
          (command bound to event)
      
      While displaying stack trace, another error is displayed:
      
      can't unset "tkInit(bar)": no such element in array
          while executing
      "unset tkInit($interpPath)"
          (procedure "disallowTk" line 3)
          invoked from within
      "disallowTk $slave"
          (procedure "::safe::tkDelete" line 18)
          invoked from within
      "::safe::tkDelete .safe5 .safe5 bar"
          invoked from within
      ".safe5.fc.fb.b invoke"
          ("uplevel" body line 1)
          invoked from within
      "uplevel #0 [list $w invoke]"
          (procedure "tkButtonUp" line 8)
          invoked from within
      "tkButtonUp .safe5.fc.fb.b
      "
          (command bound to event)

  DesiredBehavior:
  No errors.



  This is fidxed for 8.3.1.  The safetk.tcl code for this proc was
  doing some odd stuff and was completely rewritten. 
  -- 04/16/2000 hobbs


tkt_uuid: 220514ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.0.4
resolution: Fixed
title: wish crashes when a text widget is created
comment:
  OriginalBugID: 1945 Bug
  Version: 8.0.4
  SubmitDate: '1999-04-27'
  LastModified: '1999-11-12'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux-Red Hat
  OSVersion: 5.2
  Machine: Intel
  FixedDate: '1999-11-12'
  FixedInVersion: 8.2


  Name:  Martin Foressen
  CVS:  tkText.c 1.1.4.3   tkText.h 1.1.4.2

  ReproducibleScript:
  Start wish and give the command: text .t

  ObservedBehavior:
  wish dumps a core

  DesiredBehavior:
  No core

  Patch:
  Index: generic/tkText.c
  ===================================================================
  RCS file: /cvsroot/tk/generic/tkText.c,v
  retrieving revision 1.1.4.3
  diff -c -r1.1.4.3 tkText.c
  *** tkText.c    1999/01/07 02:42:51     1.1.4.3
  --- tkText.c    1999/01/30 14:25:07
  ***************
  *** 785,794 ****
         * the geometry and setting the background from a 3-D border.
         */

  !     if ((textPtr->state != tkTextNormalUid)
  !           && (textPtr->state != tkTextDisabledUid)) {
  !       Tcl_AppendResult(interp, "bad state value \"", textPtr->state,
  !               "\": must be normal or disabled", (char *) NULL);
          textPtr->state = tkTextNormalUid;
          return TCL_ERROR;
        }
  --- 785,794 ----
         * the geometry and setting the background from a 3-D border.
         */

  !     if ((textPtr->state != TK_STATE_NORMAL)
  !           && (textPtr->state != TK_STATE_DISABLED)) {
  !       Tcl_AppendResult(interp, "bad state value must be normal or disabled",
  !               (char *) NULL);
          textPtr->state = tkTextNormalUid;
          return TCL_ERROR;
        }
  Index: generic/tkText.h
  ===================================================================
  RCS file: /cvsroot/tk/generic/tkText.h,v
  retrieving revision 1.1.4.2
  diff -c -r1.1.4.2 tkText.h
  *** tkText.h    1998/09/30 02:17:21     1.1.4.2
  --- tkText.h    1999/01/30 14:25:42
  ***************
  *** 470,476 ****
                                   * image segment doesn't yet have an
                                   * associated image, there is no entry for
                                   * it here. */
  !     Tk_Uid state;             /* Normal or disabled.  Text is read-only
                                   * when disabled. */

        /*
  --- 470,476 ----
                                   * image segment doesn't yet have an
                                   * associated image, there is no entry for
                                   * it here. */
  !     int state;                        /* Normal or disabled.  Text is read-onl
  y
                                   * when disabled. */

        /*

  PatchFiles:
  tkText.c
  tkText.h



  This was changed to Tk_GetUid() calls sometime before 8.2. 
  -- 11/12/1999 hobbs


tkt_uuid: 220515ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: 100% CPU Usage on some system commands.
comment:
  OriginalBugID: 1959 Bug
  Version: 8.1.1
  SubmitDate: '1999-04-29'
  LastModified: '1999-08-09'
  Severity: CRIT
  Status: Released
  Submitter: surles
  ChangedBy: hobbs
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '1999-08-09'
  FixedInVersion: 8.2b2


  04/29/1999 10:16 - surles -
  I can make the CPU usage jump to 100% by calling some system commands.  In a previous bug report, the user thrashed the CPU by calling an invalid system command (something like command.com / r foo)  We assumed it was a bug in the OS due to the fact that the call was bad.

  However, using Tcl8.1.1 version of prowish81d.exe on WinNT sp3, I can thrash the CPU by calling the "mem" system command from WISH ONLY!!!  In Tclsh this command returns perfectly.  Could this be a Console bug???

  NOTE: Looking at the Task Manager, the prowish process is not thrashing the CPU.  The executable that is going nuts is ntvdm.exe.



  Fixed in 8.2b2, or is it? 
  -- 08/09/1999 redman


tkt_uuid: 220516ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 43. Photo Image|PPM
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Colour errors writing ppm format images
comment:
  OriginalBugID: 1963 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-30'
  LastModified: '2000-01-05'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT and 98
  Machine: X86
  FixedDate: '2000-01-05'
  FixedInVersion: 8.3b1


  Name:
  Bernard Tiddeman

  ReproducibleScript:
  from the Tcl prompt on windows NT or 98:
      image create photo img
      label .l -image img
      img read logoLarge.gif
      pack .l
      img write logoLarge.ppm
      img read logoLarge.ppm

  ObservedBehavior:
  Colours of image have changed, probably from RGB to GBR. 
      In 8.0.4 the alignment of rows were out, probaply due to not opening the
      output file in binary mode. 
      This bug looks like an additional character or two have been output.

  DesiredBehavior:
  image colours should not change.



  Just tested this in 8.3b1 and it works as expected.  This was
  likely fixed earlier (somewhere in 8.1). 
  -- 01/05/2000 hobbs


tkt_uuid: 220517ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: tk 8.1 test suite failures
comment:
  OriginalBugID: 1977 Bug
  Version: 8.1
  SubmitDate: '1999-05-04'
  LastModified: '1999-08-14'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6 and CDE
  Machine: Other
  FixedDate: '1999-08-14'
  FixedInVersion: 8.2


  Name:
  Larry W. Virden

  Extensions:
  none

  CustomShell:
  none

  ReproducibleScript:
  configure
      make all test

  ObservedBehavior:
  The following test suite tests failed:
      
      clipboard.test
      
      ==== clipboard-6.2 Tk_ClipboardAppend procedure FAILED
      ==== Contents of test case:
      
          setupbg
          clipboard clear
          clipboard append -f INTEGER -t TEST "16"
          set result [dobg {selection get -s CLIPBOARD TEST}]
          cleanupbg
          set result
      
      ---- Result was:
      CLIPBOARD selection doesn't exist or form "TEST" not defined
      ---- Result should have been:
      0x10
      ==== clipboard-6.2 FAILED
      
      focus.test
      
      ==== focus-5.1 ChangeXFocus procedure, don't take focus unless have it
      FAILED
      ==== Contents of test case:
      
          focusSetup
          focus -force .t
          update
          set result [focus]
          send [dobg {tk appname}] {focus -force .; update}
          lappend result [focus]
          focus .t.b2
          update
          lappend result [focus]
      
      ---- Result was:
      .t .t {}
      ---- Result should have been:
      .t {} {}
      ==== focus-5.1 FAILED
      
      focusTcl.test
      font.test
      
      ==== font-46.4 TkFontGetAliasList: match FAILED
      ==== Contents of test case:
      
          font actual {{times new roman} 10} -family
      
      ---- Result was:
      times new roman
      ---- Result should have been:
      times
      ==== font-46.4 FAILED
      
      unixFont.test
      
      ==== unixfont-2.2 TkpGetFontFromAttributes procedure: Times relatives
      FAILED
      ==== Contents of test case:
      
          set x {}
          lappend x [lindex [font actual {-family "Times New Roman"}] 1]
          lappend x [lindex [font actual {-family "New York"}] 1]
          lappend x [lindex [font actual {-family "Times"}] 1]
      
      ---- Result was:
      {times new roman} times times
      ---- Result should have been:
      times times times
      ==== unixfont-2.2 FAILED
      
      ==== unixfont-2.3 TkpGetFontFromAttributes procedure: Courier relatives
      FAILED
      ==== Contents of test case:
      
          set x {}
          lappend x [lindex [font actual {-family "Courier New"}] 1]
          lappend x [lindex [font actual {-family "Monaco"}] 1]
          lappend x [lindex [font actual {-family "Courier"}] 1]
      
      ---- Result was:
      {courier new} courier courier
      ---- Result should have been:
      courier courier courier
      ==== unixfont-2.3 FAILED
      
      ==== unixfont-2.4 TkpGetFontFromAttributes procedure: Helvetica
      relatives FAILED
      ==== Contents of test case:
      
          set x {}
          lappend x [lindex [font actual {-family "Arial"}] 1]
          lappend x [lindex [font actual {-family "Geneva"}] 1]
          lappend x [lindex [font actual {-family "Helvetica"}] 1]
      ---- Result was:
      arial helvetica helvetica
      ---- Result should have been:
      helvetica helvetica helvetica
      ==== unixfont-2.4 FAILED
      
      Tests ended at Mon May 03 11:19:35 EDT 1999
      all.tcl:        Total   6539    Passed  6112    Skipped 421     Failed
      6
      Sourced 83 Test Files.
      Files with failing tests: clipboard.test focus.test font.test
      unixFont.test
      Number of tests skipped for each constraint:
              2       altDisplay
              2       emptyTest
              44      macOnly
              11      macOrPc
              1       nonPOrtable
              131     nonPortable
              229     pcOnly
              1       userInteraction

  DesiredBehavior:
  All test suite tests pass.



  None of the above errors occur for us when running a make test
  on Solaris 5.7 with 8.2.0. 
  -- 08/14/1999 hobbs


tkt_uuid: 220518ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: Documentation of "text" widget is incomplete
comment:
  OriginalBugID: 2004 Bug
  Version: 8.1
  SubmitDate: '1999-05-07'
  LastModified: '2000-01-18'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux-Red Hat
  Machine: Other
  FixedDate: '2000-01-18'
  FixedInVersion: 8.3


  Name:
  D. Richard Hipp

  ReproducibleScript:
  The is a documentation error only.  In the text widget in the
      "dump" widget command, there is no mention of the "-image" option.



  added in 8.3.0. 
  -- 01/18/2000 hobbs


tkt_uuid: 220519ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: tk_popup fails when called too quickly
comment:
  OriginalBugID: 2009 Bug
  Version: 8.1
  SubmitDate: '1999-05-07'
  LastModified: '1999-05-07'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: stanton
  OS: HP-UX
  OSVersion: 10.20
  Machine: Other
  FixedDate: '1999-05-07'
  FixedInVersion: 8.1.1


  Name:

  Frank J. Leitner



  Comments:

  This error happens in all 8.x version i've tried so far. The second part

      of

      the patch fixes a bug reported by John Chambers on compl.lang.tcl on

      Tue, 04 May 1999 (Message-ID: <372EED34.DD6FC493@gte.com>).



  ReproducibleScript:

  Simple popup menu:

      

        menu .m

        .m add command -label "whatever"

        bind . <Button-1> {tk_popup .m %X %Y}

      

      And now multi-click on the toplevel widget at a high frequency. After

      some

      tries, the following error message appears:



  ObservedBehavior:

  grab failed: window not viewable

          while executing

      "grab -global $menu"

          (procedure "tkMenuButtonDown" line 33)

          invoked from within

      "tkMenuButtonDown .m

      "

          (command bound to event)



  DesiredBehavior:

  No error message:-)



  Patch:

  *** menu.tcl.orig       Fri May  7 14:05:36 1999

  --- menu.tcl    Fri May  7 14:20:28 1999

  ***************

  *** 555,560 ****

  --- 555,565 ----

    proc tkMenuButtonDown menu {

        global tkPriv

        global tcl_platform

  + 

  +     if {![winfo viewable $menu]} {

  +         return

  +     }

  + 

        $menu postcascade active

        if {[string compare $tkPriv(postedMb) ""]} {

          grab -global $tkPriv(postedMb)

  ***************

  *** 1242,1248 ****

          tkMenuUnpost {}

        }

        tkPostOverPoint $menu $x $y $entry

  !     if {![string compare $tcl_platform(platform) "unix"]} {

          tkSaveGrabInfo $menu

          grab -global $menu

          set tkPriv(popup) $menu

  --- 1247,1254 ----

          tkMenuUnpost {}

        }

        tkPostOverPoint $menu $x $y $entry

  !     if {![string compare $tcl_platform(platform) "unix"]

  !           && [winfo viewable $menu]} {

          tkSaveGrabInfo $menu

          grab -global $menu

          set tkPriv(popup) $menu



  PatchFiles:

  library/menu.tcl


tkt_uuid: 220520ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 54. [console]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Wish has old copyright notice in About Help (1996 Sun Micro)
comment:
  OriginalBugID: 2022 Bug
  Version: 8.1.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-08-08'
  Severity: LOW
  Status: Released
  Submitter: foster
  ChangedBy: hobbs
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedDate: '1999-08-08'
  FixedInVersion: 8.2


  Seems like the copyright notice in the About Box under the Help menu in wish should mention Scriptics.



  This is correct in the 8.2b2 release. 
  -- 08/08/1999 hobbs


tkt_uuid: 220521ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 41. Photo Images
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: GIF write for Tk
comment:
  OriginalBugID: 2039 RFE
  Version: 8.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-11-29'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux-Red Hat
  OSVersion: 4.2
  Machine: Other
  FixedDate: '1999-11-29'
  FixedInVersion: 8.3b1


  Name:

  Jan Nijtmans


  Comments:

  The reason that I submit 2 enancements (GIF-write and "<imageName>

      data")

      in one patch, is that they are highly related. At this moment there is

      no way to write image data to a (base-64 encoded) string, only to a

      file. This is a serious limitation, which only can be solved by a patch.

      However, there is currently also no photo format handler for which the

      StringWrite function is implemented. Therefore, there is no way to

      demonstrate this new feature without enhancing at least one format

      handler as well. GIF was simply the most useful candidate.


  DesiredBehavior:

  This enhancement request is essentially the same as:


      http://www.scriptics.com/live/showurl?i=software%2epatches%2etk803&url=%2

      fpatches%2ftk8%2e0%2e3%2fgif%2dwrite%2etxt

      ,only it is upgraded for Tk8.1, and contains a small additional bug-fix

      in the GIF-write function.


      * GIF write function, for example:

         imageName write fileName -format GIF

      This will save the content of the photo in a file, in the popular GIF

      format. In stead of the lzw compression, miGIF compression is used,

      which is a kind of runlength encoding. This compression method is not as

      good as lzw, but it can be decoded by any lzw decompressor and it can

      freely be used without patent problems. (see also the comments in

      tkImgGIF.c) 

      * New "imageName data" command. This command extracts data from the

      photo and transforms it to a string. For example:

          imageName data

      This will return the content of the image in the same format as accepted

      by "imageName put"

        imageName data -format GIF

      This returns the content of the image in base-64 encoded GIF format.

      Extensions can add other formats in the usual way. The "imageName data"

      command accepts the "-to" option in the same way as the "imageName

      write" command. 

      * The photo man page is adapted according to these enhancements. 

      * Tests are added executing all possible branches in the C-code.


      Known limitations:

      * Only images containing less than 255 colors can be written, otherwise

      an error is generated. (color quantisation is not easy to

      implement......)

      * The GIF-write function is not thread-safe yet.


      The "imageName data" command and the GIF write function are already in

      use by the Img extension for about two years. The miGIF compression

      method is more recent: I extracted it from the popular GD library, the

      core library behind Gdtcl.


  Patch:

  *** doc/photo.n.origThu Apr 29 21:37:42 1999

  --- doc/photo.nSun May  9 20:09:42 1999

  ***************

  *** 186,191 ****

  --- 186,214 ----

    default value is the same as \fIx\fR.

    .RE

    .TP

  + \fIimageName \fBdata ?\fIoption value(s) ...\fR?

  + returns image data in the form of a string.

  + The following options may be specified:

  + .RS

  + .TP

  + \fB\-format\fI format-name\fR

  + Specifies the name of the image file format handler to be used to

  + convert the data.  Specifically, this subcommand searches

  + for the first handler whose name matches a initial substring of

  + \fIformat-name\fR and which has the capability to write an string.

  + If this option is not given, the data is returned in the default

  + format as accepted by \fIimageName \fBput\fR?.

  + .TP

  + \fB\-from \fIx1 y1 x2 y2\fR

  + Specifies a rectangular region of \fIimageName\fR to be written to the

  + string.  If only \fIx1\fR and \fIy1\fR are specified, the region

  + extends from \fI(x1,y1)\fR to the bottom-right corner of

  + \fIimageName\fR.  If all four coordinates are given, they specify

  + diagonally opposite corners of the rectangular region.  The default,

  + if this option is not given, is the whole image.

  + .RE

  + .TP

  + 

    \fIimageName \fBget\fR \fIx y\fR

    Returns the color of the pixel at coordinates (\fIx\fR,\fIy\fR) in the

    image as a list of three integers between 0 and 255, representing the

  *** generic/tkImgGIF.c.origThu Apr 29 21:37:52 1999

  --- generic/tkImgGIF.cSun May  9 21:19:20 1999

  ***************

  *** 30,35 ****

  --- 30,37 ----

     * RCS: @(#) $Id: tkImgGIF.c,v 1.3 1999/04/16 01:51:15 stanton Exp $

     */


  + #include "tcl.h"

  + 

    /*

     * GIF's are represented as data in base64 format.

     * base64 strings consist of 4 6-bit characters -> 3 8 bit bytes.

  ***************

  *** 44,49 ****

  --- 46,52 ----

    #define GIF_SPACE(GIF_SPECIAL+2)

    #define GIF_BAD(GIF_SPECIAL+3)

    #define GIF_DONE(GIF_SPECIAL+4)

  + #define GIF_CHAN(GIF_SPECIAL+5)


    /*

     * structure to "mimic" FILE for Mread, so we can look like fread.

  ***************

  *** 55,60 ****

  --- 58,65 ----

        unsigned char *data;/* mmencoded source string */

        int c;/* bits left over from previous character */

        int state;/* decoder state (0-4 or GIF_DONE) */

  +     Tcl_DString *buffer;/* pointer to dynamical string */

  +     int length;/* length of phisical line already written */

    } MFile;


    #include "tkInt.h"

  ***************

  *** 87,92 ****

  --- 92,106 ----

        char *formatString, Tk_PhotoHandle imageHandle,

        int destX, int destY, int width, int height,

        int srcX, int srcY));

  + static int FileWriteGIF _ANSI_ARGS_(( Tcl_Interp *interp,  

  +     char *filename, char *formatString, 

  +     Tk_PhotoImageBlock *blockPtr));

  + static intStringWriteGIF _ANSI_ARGS_((Tcl_Interp *interp,

  +     Tcl_DString *dataPtr, char *formatString,

  +     Tk_PhotoImageBlock *blockPtr));

  + static intCommonWriteGIF _ANSI_ARGS_((Tcl_Interp *interp,

  +     MFile *handle, char *formatString,

  +     Tk_PhotoImageBlock *blockPtr));


    Tk_PhotoImageFormat tkImgFmtGIF = {

    "GIF",/* name */

  ***************

  *** 94,101 ****

    StringMatchGIF, /* stringMatchProc */

    FileReadGIF,    /* fileReadProc */

    StringReadGIF,  /* stringReadProc */

  ! NULL,           /* fileWriteProc */

  ! NULL,           /* stringWriteProc */

    };


    #define INTERLACE0x40

  --- 108,115 ----

    StringMatchGIF, /* stringMatchProc */

    FileReadGIF,    /* fileReadProc */

    StringReadGIF,  /* stringReadProc */

  ! FileWriteGIF,   /* fileWriteProc */

  ! StringWriteGIF, /* stringWriteProc */

    };


    #define INTERLACE0x40

  ***************

  *** 145,150 ****

  --- 159,170 ----

    static intchar64 _ANSI_ARGS_((int c));

    static voidmInit _ANSI_ARGS_((unsigned char *string,

        MFile *handle));

  + static intMputc _ANSI_ARGS_((int c, MFile *handle));

  + static intMwrite _ANSI_ARGS_((MFile *handle,

  +     CONST char *src, int count));

  + static voidmWriteInit _ANSI_ARGS_((Tcl_DString *buffer,

  +     MFile *handle));

  + 

    

    /*

     *----------------------------------------------------------------------

  ***************

  *** 1070,1072 ****

  --- 1090,2013 ----

    return Tcl_Read(chan, (char *) dst, (int) (hunk * count));

        }

    }

  + 

  + 

  + /*

  +  * ChanWriteGIF - writes a image in GIF format.

  +  *-------------------------------------------------------------------------

  +  * Author:          Lolo

  +  *                              Engeneering Projects Area 

  +  *            Department of Mining 

  +  *                  University of Oviedo

  +  * e-mailzz11425958@zeus.etsimo.uniovi.es

  +  *                  lolo@pcsig22.etsimo.uniovi.es

  +  * Date:            Fri September 20 1996

  +  *----------------------------------------------------------------------

  +  * FileWriteGIF-

  +  *

  +  *    This procedure is called by the photo image type to write

  +  *    GIF format data from a photo image into a given file 

  +  *

  +  * Results:

  +  *A standard TCL completion code.  If TCL_ERROR is returned

  +  *then an error message is left in interp->result.

  +  *

  +  *----------------------------------------------------------------------

  +  */

  + 

  +  /*

  +   *  Types, defines and variables needed to write and compress a GIF.

  +   */

  + 

  + typedef int (* ifunptr) _ANSI_ARGS_((void));

  + 

  + #define LSB(a)                  ((unsigned char) (((short)(a)) & 0x00FF))

  + #define MSB(a)                  ((unsigned char) (((short)(a)) >> 8))

  + 

  + #define GIFBITS 12

  + #define HSIZE  5003            /* 80% occupancy */

  + 

  + static int ssize;

  + static int csize;

  + static int rsize;

  + static unsigned char *pixelo;

  + static int pixelSize;

  + static int pixelPitch;

  + static int greenOffset;

  + static int blueOffset;

  + static int alphaOffset;

  + static int num;

  + static unsigned char mapa[MAXCOLORMAPSIZE][3];

  + 

  + /*

  +  *Definition of new functions to write GIFs

  +  */

  + 

  + static int color _ANSI_ARGS_((int red,int green, int blue));

  + static void compress _ANSI_ARGS_((int init_bits, MFile *handle,

  + ifunptr readValue));

  + static int nuevo _ANSI_ARGS_((int red, int green ,int blue,

  + unsigned char mapa[MAXCOLORMAPSIZE][3]));

  + static int savemap _ANSI_ARGS_((Tk_PhotoImageBlock *blockPtr,

  + unsigned char mapa[MAXCOLORMAPSIZE][3]));

  + static int ReadValue _ANSI_ARGS_((void));

  + static int no_bits _ANSI_ARGS_((int colors));

  + 

  + static int

  + FileWriteGIF (interp, filename, formatString, blockPtr)

  +     Tcl_Interp *interp;/* Interpreter to use for reporting errors. */

  +     char*filename;

  +     char*formatString;

  +     Tk_PhotoImageBlock *blockPtr;

  + {

  +     Tcl_Channel chan = NULL;

  +     MFile handle;

  +     int result;

  + 

  +     chan = Tcl_OpenFileChannel(interp, filename, "w", 0644);

  +     if (!chan) {

  + return TCL_ERROR;

  +     }

  +     if (Tcl_SetChannelOption(interp, chan, "-translation", "binary") != TCL_OK) {

  + return TCL_ERROR;

  +     }

  + 

  +     handle.data = (char *) chan;

  +     handle.state = GIF_CHAN;

  + 

  +     result = CommonWriteGIF(interp, &handle, formatString, blockPtr);

  +     if (Tcl_Close(interp, chan) == TCL_ERROR) {

  + return TCL_ERROR;

  +     }

  +     return result;

  + }

  + 

  + static int

  + StringWriteGIF(interp, dataPtr, formatString, blockPtr)

  +     Tcl_Interp *interp;

  +     Tcl_DString *dataPtr;

  +     char *formatString;

  +     Tk_PhotoImageBlock *blockPtr;

  + {

  +     int result;

  +     MFile handle;

  + 

  +     Tcl_DStringSetLength(dataPtr, 1024);

  +     mWriteInit(dataPtr, &handle);

  + 

  +     result = CommonWriteGIF(interp, &handle, formatString, blockPtr);

  +     Mputc(GIF_DONE, &handle);

  + 

  +     return(result);

  + }

  + 

  + static int

  + CommonWriteGIF(interp, handle, formatString, blockPtr)

  +     Tcl_Interp *interp;

  +     MFile *handle;

  +     char *formatString;

  +     Tk_PhotoImageBlock *blockPtr;

  + {

  +     int  resolution;

  +     long  numcolormap;

  + 

  +     long  width,height,x;

  +     unsigned char c;

  +     unsigned int top,left;

  +     int num;

  + 

  +     top = 0;

  +     left = 0;

  + 

  +     pixelSize=blockPtr->pixelSize;

  +     greenOffset=blockPtr->offset[1]-blockPtr->offset[0];

  +     blueOffset=blockPtr->offset[2]-blockPtr->offset[0];

  +     alphaOffset = blockPtr->offset[0];

  +     if (alphaOffset < blockPtr->offset[2]) {

  + alphaOffset = blockPtr->offset[2];

  +     }

  +     if (++alphaOffset < pixelSize) {

  + alphaOffset -= blockPtr->offset[0];

  +     } else {

  + alphaOffset = 0;

  +     }

  + 

  +     Mwrite(handle, (CONST char *) (alphaOffset ? "GIF89a":"GIF87a"), 6);

  + 

  +     for (x=0;x<MAXCOLORMAPSIZE;x++) {

  + mapa[x][CM_RED] = 255;

  + mapa[x][CM_GREEN] = 255;

  + mapa[x][CM_BLUE] = 255;

  +     }

  + 

  + 

  +     width=blockPtr->width;

  +     height=blockPtr->height;

  +     pixelo=blockPtr->pixelPtr + blockPtr->offset[0];

  +     pixelPitch=blockPtr->pitch;

  +     if ((num=savemap(blockPtr,mapa))<0) {

  + Tcl_AppendResult(interp, "too many colors", (char *) NULL);

  + return TCL_ERROR;

  +     }

  +     if (num<3) num=3;

  +     c=LSB(width);

  +     Mputc(c,handle);

  +     c=MSB(width);

  +     Mputc(c,handle);

  +     c=LSB(height);

  +     Mputc(c,handle);

  +     c=MSB(height);

  +     Mputc(c,handle);

  + 

  +     c= (1 << 7) | (no_bits(num) << 4) | (no_bits(num));

  +     Mputc(c,handle);

  +     resolution = no_bits(num)+1;

  + 

  +     numcolormap=1 << resolution;

  + 

  +     /*  background color */

  + 

  +     Mputc(0,handle);

  + 

  +     /*  zero for future expansion  */

  + 

  +     Mputc(0,handle);

  + 

  +     for (x=0; x<numcolormap ;x++) {

  + Mputc(mapa[x][CM_RED],handle);

  + Mputc(mapa[x][CM_GREEN],handle);

  + Mputc(mapa[x][CM_BLUE],handle);

  +     }

  + 

  +     /*

  +      * Write out extension for transparent colour index, if necessary.

  +      */

  + 

  +     if (alphaOffset) {

  + Mwrite(handle, "!\371\4\1\0\0\0", 8);

  +     }

  + 

  +     Mputc(',',handle);

  +     c=LSB(top);

  +     Mputc(c,handle);

  +     c=MSB(top);

  +     Mputc(c,handle);

  +     c=LSB(left);

  +     Mputc(c,handle);

  +     c=MSB(left);

  +     Mputc(c,handle);

  + 

  +     c=LSB(width);

  +     Mputc(c,handle);

  +     c=MSB(width);

  +     Mputc(c,handle);

  + 

  +     c=LSB(height);

  +     Mputc(c,handle);

  +     c=MSB(height);

  +     Mputc(c,handle);

  + 

  +     c=0;

  +     Mputc(c,handle);

  +     c=resolution;

  +     Mputc(c,handle);

  + 

  +     ssize = rsize = blockPtr->width;

  +     csize = blockPtr->height;

  +     compress(resolution+1, handle, ReadValue);

  +  

  +     Mputc(0,handle);

  +     Mputc(';',handle);

  + 

  +     return TCL_OK;

  + }

  + 

  + static int

  + color(red, green, blue)

  +     int red;

  +     int green;

  +     int blue;

  + {

  +     int x;

  +     for (x=(alphaOffset != 0);x<=MAXCOLORMAPSIZE;x++) {

  + if ((mapa[x][CM_RED]==red) && (mapa[x][CM_GREEN]==green) &&

  + (mapa[x][CM_BLUE]==blue)) {

  +     return x;

  + }

  +     }

  +     return -1;

  + }

  + 

  + 

  + static int

  + nuevo(red, green, blue, mapa)

  +     int red,green,blue;

  +     unsigned char mapa[MAXCOLORMAPSIZE][3];

  + {

  +     int x;

  +     for (x=(alphaOffset != 0);x<num;x++) {

  + if ((mapa[x][CM_RED]==red) && (mapa[x][CM_GREEN]==green) &&

  + (mapa[x][CM_BLUE]==blue)) {

  +     return 0;

  + }

  +     }

  +     return 1;

  + }

  + 

  + static int

  + savemap(blockPtr,mapa)

  +     Tk_PhotoImageBlock *blockPtr;

  +     unsigned char mapa[MAXCOLORMAPSIZE][3];

  + {

  +     unsigned char  *colores;

  +     int x,y;

  +     unsigned char  red,green,blue;

  + 

  +     if (alphaOffset) {

  + num = 1;

  + mapa[0][CM_RED] = 0xd9;

  + mapa[0][CM_GREEN] = 0xd9;

  + mapa[0][CM_BLUE] = 0xd9;

  +     } else {

  + num = 0;

  +     }

  + 

  +     for(y=0;y<blockPtr->height;y++) {

  + colores=blockPtr->pixelPtr + blockPtr->offset[0]

  + + y * blockPtr->pitch;

  + for(x=0;x<blockPtr->width;x++) {

  +     if (!alphaOffset || (colores[alphaOffset] != 0)) {

  + red = colores[0];

  + green = colores[greenOffset];

  + blue = colores[blueOffset];

  + if (nuevo(red,green,blue,mapa)) {

  +     if (num>255) 

  + return -1;

  + 

  +     mapa[num][CM_RED]=red;

  +     mapa[num][CM_GREEN]=green;

  +     mapa[num][CM_BLUE]=blue;

  +     num++;

  + }

  +     }

  +     colores += pixelSize;

  + }

  +     }

  +     return num-1;

  + }

  + 

  + static int

  + ReadValue()

  + {

  +     unsigned int col;

  + 

  +     if (csize == 0) {

  + return EOF;

  +     }

  +     if (alphaOffset && (pixelo[alphaOffset]==0)) {

  + col = 0;

  +     } else {

  + col = color(pixelo[0],pixelo[greenOffset],pixelo[blueOffset]);

  +     }

  +     pixelo += pixelSize;

  +     if (--ssize <= 0) {

  + ssize = rsize;

  + csize--;

  + pixelo += pixelPitch - (rsize * pixelSize);

  +     }

  + 

  +     return col;

  + }

  + 

  + /*

  +  * Return the number of bits ( -1 ) to represent a given

  +  * number of colors ( ex: 256 colors => 7 ).

  +  */

  + static int

  + no_bits( colors )

  + int colors;

  + {

  +     register int bits = 0;

  + 

  +     colors--;

  +     while ( colors >> bits ) {

  + bits++;

  +     }

  + 

  +     return (bits-1);

  + }

  + 

  + /*

  +  *-----------------------------------------------------------------------

  +  * Mwrite --

  +  *

  +  *  This procedure is invoked to put imaged data into a stream

  +  *  using Mputc.

  +  *

  +  * Results:

  +  *  The return value is the number of characters "written"

  +  *

  +  * Side effects:

  +  *  The base64 handle will change state.

  +  *

  +  *-----------------------------------------------------------------------

  +  */

  + 

  + int

  + Mwrite(handle, src, count)

  +     MFile *handle;/* mmencode "file" handle */

  +     CONST char *src;/* where to get the data */

  +     int count;/* number of bytes */

  + {

  +     register int i;

  +     int curcount, bufcount;

  + 

  +     if (handle->state == GIF_CHAN) {

  + return Tcl_Write((Tcl_Channel) handle->data, (char *) src, count);

  +     }

  +     curcount = (char *) handle->data - Tcl_DStringValue(handle->buffer);

  +     bufcount = curcount + count + count/3 + count/52 + 1024;

  + 

  +     /* make sure that the DString contains enough space */

  +     if (bufcount >= (handle->buffer->spaceAvl)) {

  + Tcl_DStringSetLength(handle->buffer, bufcount + 4096);

  + handle->data = Tcl_DStringValue(handle->buffer) + curcount;

  +     }

  +     /* write the data */

  +     for (i=0; (i<count) && (Mputc(*src++, handle) != GIF_DONE); i++) {

  + /* empty loop body */

  +     }

  +     return i;

  + }

  + /*

  +  *-----------------------------------------------------------------------

  +  *

  +  * Mputc --

  +  *

  +  *  This procedure encodes and writes the next byte to a base64

  +  *  encoded string.

  +  *

  +  * Results:

  +  *  The written byte is returned.

  +  *

  +  * Side effects:

  +  *  the base64 handle will change state.

  +  *

  +  *-----------------------------------------------------------------------

  +  */

  + 

  + static char base64_table[64] = {

  +     'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',

  +     'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',

  +     'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',

  +     'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',

  +     'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',

  +     'o', 'p', 'q', 'r', 's', 't', 'u', 'v',

  +     'w', 'x', 'y', 'z', '0', '1', '2', '3',

  +     '4', '5', '6', '7', '8', '9', '+', '/'

  + };

  + 

  + int

  + Mputc(c, handle)

  +     register int c;/* character to be written */

  +     register MFile *handle;/* handle containing decoder data and state */

  + {

  +     /* In fact, here should be checked first if the dynamic

  +      * string contains enough space for the next character.

  +      * This would be very expensive to do for each character.

  +      * Therefore we just allocate 1024 bytes immediately in

  +      * the beginning and also take a 1024 bytes margin inside

  +      * every Mwrite. At least this check is done then only

  +      * every 256 bytes, which is much faster. Because the GIF

  +      * header is less than 1024 bytes and pixel data is

  +      * written in 256 byte portions, this should be safe.

  +      */

  + 

  +     if (c == GIF_DONE) {

  + switch(handle->state) {

  +     case 0:

  + break;

  +     case 1:

  + *handle->data++ = base64_table[(handle->c<<4)&63];

  + *handle->data++ = '='; *handle->data++ = '='; break;

  +     case 2:

  + *handle->data++ = base64_table[(handle->c<<2)&63];

  + *handle->data++ = '='; break;

  +     default:

  + handle->state = GIF_DONE;

  + return GIF_DONE;

  + }

  + Tcl_DStringSetLength(handle->buffer,

  + (char *) handle->data - Tcl_DStringValue(handle->buffer));

  + handle->state = GIF_DONE;

  + return GIF_DONE;

  +     }

  + 

  +     if (handle->state == GIF_CHAN) {

  + char ch = (char) c;

  + return (Tcl_Write((Tcl_Channel) handle->data, &ch, 1)>0) ? c : GIF_DONE;

  +     }

  + 

  +     c &= 0xff;

  +     switch (handle->state++) {

  + case 0:

  +     *handle->data++ = base64_table[(c>>2)&63]; break;

  + case 1:

  +     c |= handle->c << 8;

  +     *handle->data++ = base64_table[(c>>4)&63]; break;

  + case 2:

  +     handle->state = 0;

  +     c |= handle->c << 8;

  +     *handle->data++ = base64_table[(c>>6)&63];

  +     *handle->data++ = base64_table[c&63]; break;

  +     }

  +     handle->c = c;

  +     if (handle->length++ > 52) {

  + handle->length = 0;

  + *handle->data++ = '\n';

  +     }

  +     return c & 0xff;

  + };

  + 

  + /*

  +  *-------------------------------------------------------------------------

  +  * mWriteInit --

  +  *  This procedure initializes a base64 decoder handle for writing

  +  *

  +  * Results:

  +  *  none

  +  *

  +  * Side effects:

  +  *  the base64 handle is initialized

  +  *

  +  *-------------------------------------------------------------------------

  +  */

  + 

  + void

  + mWriteInit(buffer, handle)

  +     Tcl_DString *buffer;

  +     MFile *handle;/* mmencode "file" handle */

  + {

  +     Tcl_DStringSetLength(buffer, buffer->spaceAvl);

  +     handle->buffer = buffer;

  +     handle->data = Tcl_DStringValue(buffer);

  +     handle->state = 0;

  +     handle->length = 0;

  + }

  + 

  + 

  + 

  + /*-----------------------------------------------------------------------

  +  *

  +  * miGIF Compression - mouse and ivo's GIF-compatible compression

  +  *

  +  *          -run length encoding compression routines-

  +  *

  +  * Copyright (C) 1998 Hutchison Avenue Software Corporation

  +  *               http://www.hasc.com

  +  *               info@hasc.com

  +  *

  +  * Permission to use, copy, modify, and distribute this software and its

  +  * documentation for any purpose and without fee is hereby granted, provided

  +  * that the above copyright notice appear in all copies and that both that

  +  * copyright notice and this permission notice appear in supporting

  +  * documentation.  This software is provided "AS IS." The Hutchison Avenue 

  +  * Software Corporation disclaims all warranties, either express or implied, 

  +  * including but not limited to implied warranties of merchantability and 

  +  * fitness for a particular purpose, with respect to this code and accompanying

  +  * documentation. 

  +  * 

  +  * The miGIF compression routines do not, strictly speaking, generate files 

  +  * conforming to the GIF spec, since the image data is not LZW-compressed 

  +  * (this is the point: in order to avoid transgression of the Unisys patent 

  +  * on the LZW algorithm.)  However, miGIF generates data streams that any 

  +  * reasonably sane LZW decompresser will decompress to what we want.

  +  *

  +  * miGIF compression uses run length encoding. It compresses horizontal runs 

  +  * of pixels of the same color. This type of compression gives good results

  +  * on images with many runs, for example images with lines, text and solid 

  +  * shapes on a solid-colored background. It gives little or no compression 

  +  * on images with few runs, for example digital or scanned photos.

  +  *

  +  *                               der Mouse

  +  *                      mouse@rodents.montreal.qc.ca

  +  *            7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

  +  *

  +  *                             ivo@hasc.com

  +  *

  +  * The Graphics Interchange Format(c) is the Copyright property of

  +  * CompuServe Incorporated.  GIF(sm) is a Service Mark property of

  +  * CompuServe Incorporated.

  +  *

  +  */

  + 

  + static int rl_pixel;

  + static int rl_basecode;

  + static int rl_count;

  + static int rl_table_pixel;

  + static int rl_table_max;

  + static int just_cleared;

  + static int out_bits;

  + static int out_bits_init;

  + static int out_count;

  + static int out_bump;

  + static int out_bump_init;

  + static int out_clear;

  + static int out_clear_init;

  + static int max_ocodes;

  + static int code_clear;

  + static int code_eof;

  + static unsigned int obuf;

  + static int obits;

  + static MFile *ofile;

  + static unsigned char oblock[256];

  + static int oblen;

  + 

  + /* Used only when debugging GIF compression code */

  + /* #define DEBUGGING_ENVARS */

  + 

  + #ifdef DEBUGGING_ENVARS

  + 

  + static int verbose_set = 0;

  + static int verbose;

  + #define VERBOSE (verbose_set?verbose:set_verbose())

  + 

  + static int set_verbose(void)

  + {

  +  verbose = !!getenv("GIF_VERBOSE");

  +  verbose_set = 1;

  +  return(verbose);

  + }

  + 

  + #else

  + 

  + #define VERBOSE 0

  + 

  + #endif

  + 

  + 

  + static const char *

  + binformat(v, nbits)

  +     unsigned int v;

  +     int nbits;

  + {

  +  static char bufs[8][64];

  +  static int bhand = 0;

  +  unsigned int bit;

  +  int bno;

  +  char *bp;

  + 

  +  bhand --;

  +  if (bhand < 0) bhand = (sizeof(bufs)/sizeof(bufs[0]))-1;

  +  bp = &bufs[bhand][0];

  +  for (bno=nbits-1,bit=1U<<bno;bno>=0;bno--,bit>>=1)

  +   { *bp++ = (v & bit) ? '1' : '0';

  +     if (((bno&3) == 0) && (bno != 0)) *bp++ = '.';

  +   }

  +  *bp = '\0';

  +  return(&bufs[bhand][0]);

  + }

  + 

  + static void write_block()

  + {

  +  int i;

  +  unsigned char c;

  + 

  +  if (VERBOSE)

  +   { printf("write_block %d:",oblen);

  +     for (i=0;i<oblen;i++) printf(" %02x",oblock[i]);

  +     printf("\n");

  +   }

  +  c = oblen;

  +  Mwrite(ofile, (CONST char *) &c, 1);

  +  Mwrite(ofile, &oblock[0], oblen);

  +  oblen = 0;

  + }

  + 

  + static void

  + block_out(c)

  +     unsigned char c;

  + {

  +  if (VERBOSE) printf("block_out %s\n",binformat(c,8));

  +  oblock[oblen++] = c;

  +  if (oblen >= 255) write_block();

  + }

  + 

  + static void block_flush()

  + {

  +  if (VERBOSE) printf("block_flush\n");

  +  if (oblen > 0) write_block();

  + }

  + 

  + static void output(val)

  +     int val;

  + {

  +  if (VERBOSE) printf("output %s [%s %d %d]\n",binformat(val,out_bits),binformat(obuf,obits),obits,out_bits);

  +  obuf |= val << obits;

  +  obits += out_bits;

  +  while (obits >= 8)

  +   { block_out(obuf&0xff);

  +     obuf >>= 8;

  +     obits -= 8;

  +   }

  +  if (VERBOSE) printf("output leaving [%s %d]\n",binformat(obuf,obits),obits);

  + }

  + 

  + static void output_flush()

  + {

  +  if (VERBOSE) printf("output_flush\n");

  +  if (obits > 0) block_out(obuf);

  +  block_flush();

  + }

  + 

  + static void did_clear()

  + {

  +  if (VERBOSE) printf("did_clear\n");

  +  out_bits = out_bits_init;

  +  out_bump = out_bump_init;

  +  out_clear = out_clear_init;

  +  out_count = 0;

  +  rl_table_max = 0;

  +  just_cleared = 1;

  + }

  + 

  + static void

  + output_plain(c)

  +     int c;

  + {

  +  if (VERBOSE) printf("output_plain %s\n",binformat(c,out_bits));

  +  just_cleared = 0;

  +  output(c);

  +  out_count ++;

  +  if (out_count >= out_bump)

  +   { out_bits ++;

  +     out_bump += 1 << (out_bits - 1);

  +   }

  +  if (out_count >= out_clear)

  +   { output(code_clear);

  +     did_clear();

  +   }

  + }

  + 

  + static unsigned int isqrt(x)

  +     unsigned int x;

  + {

  +  unsigned int r;

  +  unsigned int v;

  + 

  +  if (x < 2) return(x);

  +  for (v=x,r=1;v;v>>=2,r<<=1) ;

  +  while (1)

  +   { v = ((x / r) + r) / 2;

  +     if ((v == r) || (v == r+1)) return(r);

  +     r = v;

  +   }

  + }

  + 

  + static unsigned int

  + compute_triangle_count(count, nrepcodes)

  +     unsigned int count;

  +     unsigned int nrepcodes;

  + {

  +  unsigned int perrep;

  +  unsigned int cost;

  + 

  +  cost = 0;

  +  perrep = (nrepcodes * (nrepcodes+1)) / 2;

  +  while (count >= perrep)

  +   { cost += nrepcodes;

  +     count -= perrep;

  +   }

  +  if (count > 0)

  +   { unsigned int n;

  +     n = isqrt(count);

  +     while ((n*(n+1)) >= 2*count) n --;

  +     while ((n*(n+1)) < 2*count) n ++;

  +     cost += n;

  +   }

  +  return(cost);

  + }

  + 

  + static void max_out_clear()

  + {

  +  out_clear = max_ocodes;

  + }

  + 

  + static void reset_out_clear()

  + {

  +  out_clear = out_clear_init;

  +  if (out_count >= out_clear)

  +   { output(code_clear);

  +     did_clear();

  +   }

  + }

  + 

  + static void

  + rl_flush_fromclear(count)

  +     int count;

  + {

  +  int n;

  + 

  +  if (VERBOSE) printf("rl_flush_fromclear %d\n",count);

  +  max_out_clear();

  +  rl_table_pixel = rl_pixel;

  +  n = 1;

  +  while (count > 0)

  +   { if (n == 1)

  +      { rl_table_max = 1;

  +        output_plain(rl_pixel);

  +        count --;

  +      }

  +     else if (count >= n)

  +      { rl_table_max = n;

  +        output_plain(rl_basecode+n-2);

  +        count -= n;

  +      }

  +     else if (count == 1)

  +      { rl_table_max ++;

  +        output_plain(rl_pixel);

  +        count = 0;

  +      }

  +     else

  +      { rl_table_max ++;

  +        output_plain(rl_basecode+count-2);

  +        count = 0;

  +      }

  +     if (out_count == 0) n = 1; else n ++;

  +   }

  +  reset_out_clear();

  +  if (VERBOSE) printf("rl_flush_fromclear leaving table_max=%d\n",rl_table_max);

  + }

  + 

  + static void rl_flush_clearorrep(count)

  +     int count;

  + {

  +  int withclr;

  + 

  +  if (VERBOSE) printf("rl_flush_clearorrep %d\n",count);

  +  withclr = 1 + compute_triangle_count(count,max_ocodes);

  +  if (withclr < count)

  +   { output(code_clear);

  +     did_clear();

  +     rl_flush_fromclear(count);

  +   }

  +  else

  +   { for (;count>0;count--) output_plain(rl_pixel);

  +   }

  + }

  + 

  + static void rl_flush_withtable(count)

  +     int count;

  + {

  +  int repmax;

  +  int repleft;

  +  int leftover;

  + 

  +  if (VERBOSE) printf("rl_flush_withtable %d\n",count);

  +  repmax = count / rl_table_max;

  +  leftover = count % rl_table_max;

  +  repleft = (leftover ? 1 : 0);

  +  if (out_count+repmax+repleft > max_ocodes)

  +   { repmax = max_ocodes - out_count;

  +     leftover = count - (repmax * rl_table_max);

  +     repleft = 1 + compute_triangle_count(leftover,max_ocodes);

  +   }

  +  if (VERBOSE) printf("rl_flush_withtable repmax=%d leftover=%d repleft=%d\n",repmax,leftover,repleft);

  +  if (1+compute_triangle_count(count,max_ocodes) < repmax+repleft)

  +   { output(code_clear);

  +     did_clear();

  +     rl_flush_fromclear(count);

  +     return;

  +   }

  +  max_out_clear();

  +  for (;repmax>0;repmax--) output_plain(rl_basecode+rl_table_max-2);

  +  if (leftover)

  +   { if (just_cleared)

  +      { rl_flush_fromclear(leftover);

  +      }

  +     else if (leftover == 1)

  +      { output_plain(rl_pixel);

  +      }

  +     else

  +      { output_plain(rl_basecode+leftover-2);

  +      }

  +   }

  +  reset_out_clear();

  + }

  + 

  + static void rl_flush()

  + {

  +  if (VERBOSE) printf("rl_flush [ %d %d\n",rl_count,rl_pixel);

  +  if (rl_count == 1)

  +   { output_plain(rl_pixel);

  +     rl_count = 0;

  +     if (VERBOSE) printf("rl_flush ]\n");

  +     return;

  +   }

  +  if (just_cleared)

  +   { rl_flush_fromclear(rl_count);

  +   }

  +  else if ((rl_table_max < 2) || (rl_table_pixel != rl_pixel))

  +   { rl_flush_clearorrep(rl_count);

  +   }

  +  else

  +   { rl_flush_withtable(rl_count);

  +   }

  +  if (VERBOSE) printf("rl_flush ]\n");

  +  rl_count = 0;

  + }

  + 

  + 

  + static void compress( init_bits, handle, readValue )

  +     int init_bits;

  +     MFile *handle;

  +     ifunptr readValue;

  + {

  +  int c;

  + 

  +  ofile = handle;

  +  obuf = 0;

  +  obits = 0;

  +  oblen = 0;

  +  code_clear = 1 << (init_bits - 1);

  +  code_eof = code_clear + 1;

  +  rl_basecode = code_eof + 1;

  +  out_bump_init = (1 << (init_bits - 1)) - 1;

  +  /* for images with a lot of runs, making out_clear_init larger will

  +     give better compression. */ 

  +  out_clear_init = (init_bits <= 3) ? 9 : (out_bump_init-1);

  + #ifdef DEBUGGING_ENVARS

  +   { const char *ocienv;

  +     ocienv = getenv("GIF_OUT_CLEAR_INIT");

  +     if (ocienv)

  +      { out_clear_init = atoi(ocienv);

  +        if (VERBOSE) printf("[overriding out_clear_init to %d]\n",out_clear_init);

  +      }

  +   }

  + #endif

  +  out_bits_init = init_bits;

  +  max_ocodes = (1 << GIFBITS) - ((1 << (out_bits_init - 1)) + 3);

  +  did_clear();

  +  output(code_clear);

  +  rl_count = 0;

  +  while (1)

  +   { c = readValue();

  +     if ((rl_count > 0) && (c != rl_pixel)) rl_flush();

  +     if (c == EOF) break;

  +     if (rl_pixel == c)

  +      { rl_count ++;

  +      }

  +     else

  +      { rl_pixel = c;

  +        rl_count = 1;

  +      }

  +   }

  +  output(code_eof);

  +  output_flush();

  + }

  + 

  + /*-----------------------------------------------------------------------

  +  *

  +  * End of miGIF section  - See copyright notice at start of section.

  +  *

  +  *-----------------------------------------------------------------------*/

  *** generic/tkImgPhoto.c.origThu Apr 29 21:37:53 1999

  --- generic/tkImgPhoto.cSun May  9 20:28:01 1999

  ***************

  *** 364,369 ****

  --- 364,372 ----

        int width, int height));

    static voidImgPhotoInstanceSetSize _ANSI_ARGS_((

        PhotoInstance *instancePtr));

  + static intImgStringWrite _ANSI_ARGS_((Tcl_Interp *interp,

  +     Tcl_DString *dataPtr, char *formatString,

  +     Tk_PhotoImageBlock *blockPtr));

    static intIsValidPalette _ANSI_ARGS_((PhotoInstance *instancePtr,

        char *palette));

    static intCountBits _ANSI_ARGS_((pixel mask));

  ***************

  *** 684,689 ****

  --- 687,781 ----

    options.toY2 - options.toY, options.zoomX, options.zoomY,

    options.subsampleX, options.subsampleY);


  +     } else if ((c == 'd') && (strncmp(argv[1], "data", length) == 0)) {

  + /*

  +  * photo data command - first parse and check parameters.

  +  */

  + Tk_PhotoImageBlock block;

  + Tcl_DString buffer;

  + 

  + Tk_ImageStringWriteProc *stringWriteProc = NULL;

  + 

  + index = 2;

  + memset((VOID *) &options, 0, sizeof(options));

  + options.name = NULL;

  + options.format = NULL;

  + options.



  These are integrated with 8.3. 
  -- 11/29/1999 hobbs


tkt_uuid: 220522ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: Doc boo boo re: tcl_platform(user)
comment:
  OriginalBugID: 2042 Bug
  Version: 8.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-08-08'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86
  FixedDate: '1999-08-08'
  FixedInVersion: 8.2


  Name:
  Christopher Nelson

  ObservedBehavior:
  The .HLP entry for tcl_platform(user) (in tclvars), starts "Either
      windows, macintosh, or unix."  This appears to be a cut-and-paste error
      from the previous entry, tcl_platform(platform) which starts the same
      way and actually should have one of those values.



  Fixed in 8.2b3 docs. 
  -- 08/08/1999 hobbs


tkt_uuid: 220523ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: A few portability problems (Borland, gcc, egcs)
comment:
  OriginalBugID: 2053 RFE
  Version: 8.1
  SubmitDate: '1999-05-12'
  LastModified: '1999-11-18'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0 SP3
  Machine: X86
  FixedDate: '1999-11-18'
  FixedInVersion: 8.2.3


  Name:
  Jan Nijtmans

  Comments:
  All those patches are adapted from the Cygnus version of Tcl/Tk (Thanks
      to Mummit Khan for his assistance!!!!)

  DesiredBehavior:
  The supplied patch fixes the following problems:
      - In tkWinX.c, the header file <zmouse.h> is included, which
        is missing in many development systems. In stead of forcing
        all developers to download this file from MicroSoft, it is
        much easier to supply the definition of WM_MOUSEWHEEL only,
        since that is the only symbol used from the header file.
      - The function GetCurrentTime() is obsolete (according to Microsoft),
        and should be replaced by GetTickCount(). Some other development
        environments (e.g. CygWin) don't even bother to implement
      GetCurrentTime(),
        thereby forcing users to make the switch.
      - The GNU compilers (gcc and egcs) don't support strnicmp() and
      stricmp().
        Use strncasecmp() and strcasecmp() instead.
      - "struct TkFontAttributes" is defined in both tkFont.h and tkWinInt.h.
        This leads to a warning if both tkWinInt.h and tkFont.h are included
        in a C-file. Better remove the definition from the latter; it doesn't
        serve any purpose.

  Patch:
  *** win/tkWinX.c.origThu Apr 29 21:38:44 1999
  --- win/tkWinX.cWed May 12 06:30:33 1999
  ***************
  *** 19,25 ****
     * The zmouse.h file includes the definition for WM_MOUSEWHEEL.
     */
    
  ! #include <zmouse.h>
    
    /*
     * Definitions of extern variables supplied by this file.
  --- 19,25 ----
     * The zmouse.h file includes the definition for WM_MOUSEWHEEL.
     */
    
  ! #define WM_MOUSEWHEEL (WM_MOUSELAST+1)
    
    /*
     * Definitions of extern variables supplied by this file.
  ***************
  *** 1129,1133 ****
    unsigned long
    TkpGetMS()
    {
  !     return GetCurrentTime();
    }
  --- 1129,1133 ----
    unsigned long
    TkpGetMS()
    {
  !     return GetTickCount();
    }
  *** win/tkWinPort.h.origThu Apr 29 21:38:43 1999
  --- win/tkWinPort.hWed May 12 06:30:32 1999
  ***************
  *** 39,46 ****
  --- 39,48 ----
    #    define hypot _hypot
    #endif /* _MSC_VER */
    
  + #ifndef __GNUC__
    #define strncasecmp strnicmp
    #define strcasecmp stricmp
  + #endif
    
    #define NBBY 8
    
  *** win/tkWinInt.h.origThu Apr 29 21:38:42 1999
  --- win/tkWinInt.hWed May 12 07:40:47 1999
  ***************
  *** 41,48 ****
    #define WS_EX_TOOLWINDOW0x00000080L 
    #endif
    
  - typedef struct TkFontAttributes TkFontAttributes;
  - 
    /*
     * The TkWinDCState is used to save the state of a device context
     * so that it can be restored later.
  --- 41,46 ----

  PatchFiles:
  tkWinX.c tkWinPort.h tkWinInt.h



  The mousewheel stuff we'd rather leave to the std headers and not
  import just the one #define.

  GetTickCount now used as specified.

  ifdef GNUC for str*cmp added.

  struct TkFontAttrs removed from tkWinInt.h 
  -- 11/16/1999 hobbs


tkt_uuid: 220524ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 83. Mac OS X Build
priority: 2
foundin: obsolete: 8.0.4
resolution: Fixed
title: MacOS 68k -> Bus Error
comment:
  OriginalBugID: 2061 Bug
  Version: 8.0.4
  SubmitDate: '1999-05-13'
  LastModified: '1999-10-22'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 7.5.5
  Machine: Power PC
  FixedDate: '1999-10-22'
  FixedInVersion: 8.2.1


  Name: Kyle Daniels

  Extensions: standard set from Tcl/Tk install

  Comments:
  SpecTcl: I would also like to ask y'all to provide a 68k version of
      SpecTcl. I can't afford TclPro right now, else I'd gladly make the
      purchase.

  ObservedBehavior:
  Wish app and D&D Tklets crashes the system w/ mssg = "Bus Error". This
      happens when Wish or D&D Tklets is launched once, successfully executes,
      terminates, then launched for a second time.



  The user should pick up new binaries for the mac from
  ftp://ftp.scriptics.com/pub/tcl/mac/ as several Mac fixes
  have occured since 8.0.4. 
  -- 10/22/1999 hobbs


tkt_uuid: 220525ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: Problems with Tk 8.1 entry widget.
comment:
  OriginalBugID: 2067 Bug
  Version: 8.1
  SubmitDate: '1999-05-14'
  LastModified: '1999-10-29'
  Severity: SER
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 3150
  OS: Linux-Red Hat
  Machine: Other
  FixedDate: '1999-10-29'
  FixedInVersion: 8.2.2


  Name: Patrick Earl

  Comments:
  Tcl/Tk were compiled with --enable-shared --enable-gcc on pgcc-2.91.60
      (1.1.1)
      
  I have a Tk app (quirc.org) that I frequently paste large pieces of text
  into, and the slow (or frozen) behaviour of the entry box is annoying at
  best.

  ReproducibleScript:
  echo "pack [entry .test]" | wish8.1
      
      There are a number of problems that occur when I do one of the
      following:
      1) Paste a large amount of text into the entry box (ex. >2k) and hit
      End.
      2) Type for an extended period of time into the entry box.
      3) Paste a fair amount of text into an already selected area of text.

  ObservedBehavior:
  1) Freezes the app with 100% CPU usage
      2) The entry box becomes sluggish and does not update itself as it needs
      to.  It becomes slower and slower as one types more text.  I typed a
      couple paragraphs in it, and it was practically unusable for text entry
      at that point.
      3) I took a selection of 80 characters of text, pasted it within the
      entry box a single time.  Then I selected what I had just pasted and
      proceeded to simply paste within the existing selection.  After around 7
      pastes, there was noticeable CPU usage.  The CPU usage disappears when
      the window is not in focus.
      The CPU usage increased up until about 11 pastes where it was taking up
      around 100% CPU.  I did 12 pastes, then changed the focus to another
      window, and then back to this one, and I got the following error (with
      wish dying):
      
      X Error of failed request:  BadLength (poly request too large or
      internal Xlib length error)
        Major opcode of failed request:  74 (X_PolyText8)
        Serial number of failed request:  5800
        Current serial number in output stream:  5808
      
      If I paste a bunch of times after 12 without letting the window leave
      focus, it goes into a state of 100% CPU usage and does not seem to stop
      without killing wish.

  DesiredBehavior:
  1) It should not freeze, but should simply go to the end of the pasted
      text.
      2) Should not slow down, should continue entering text at normal speeds.
      3) It should not freeze or consume large amounts of CPU, but should
      continue to allow pasting and entry of text as normal.



  There is an obvious slowdown in the action wizards using entry widgets when the user types really fast in an entry. This was part of the problems observed in # 3150 (the other issues have been resolved). 
  -- 10/29/1999 sven
  This was do to an overeager while calculation in tkEntrySeeInsert.
  This has been changed for 8.2.2, slightly altering the behavior
  when moving the cursor in the entry widget (for the better, IMO). 
  -- 10/29/1999 hobbs


tkt_uuid: 220526ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 41. Photo Images
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: Initialization of unused field in Tk_PhotoBlock
comment:
  OriginalBugID: 2068 RFE
  Version: 8.1
  SubmitDate: '1999-05-14'
  LastModified: '1999-06-30'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: redman
  OS: Linux
  OSVersion: 4.2
  Machine: Other
  FixedDate: '1999-06-30'
  FixedInVersion: 8.2b1


  Name:

  Jan Nijtmans



  DesiredBehavior:

  In Tk8.0.3 an additional field was added to the Tk_PhotoBlock

      strucure at my request, but so far is isn't used. If this field

      would be initialized to 0 (in 4 places), it could be used

      by extension (e.g. Img) to detect whether Tk has support for

      transparency or not.



  Patch:

  *** generic/tkImgGIF.c.origFri May 14 10:33:54 1999

  --- generic/tkImgGIF.cFri May 14 10:36:27 1999

  ***************

  *** 263,268 ****

  --- 263,269 ----

        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);

    

  *** generic/tkImgPPM.c.origFri May 14 10:34:01 1999

  --- generic/tkImgPPM.cFri May 14 10:37:20 1999

  ***************

  *** 183,188 ****

  --- 183,189 ----

    block.offset[1] = 1;

    block.offset[2] = 2;

        }

  +     block.offset[3] = 0;

        block.width = width;

        block.pitch = block.pixelSize * fileWidth;

    

  *** generic/tkImgPhoto.c.origFri May 14 10:33:46 1999

  --- generic/tkImgPhoto.cFri May 14 10:35:54 1999

  ***************

  *** 802,807 ****

  --- 802,808 ----

    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,4177 ****

  --- 4174,4179 ----

        blockPtr->offset[0] = 0;

        blockPtr->offset[1] = 1;

        blockPtr->offset[2] = 2;

  +     blockPtr->offset[3] = 0;

        return 1;

    }



  PatchFiles:

  tkImgGIF.c tkImgPPM.c tkImgPhoto.c





  Applied the patch. 
  -- 06/30/1999 redman


tkt_uuid: 220527ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: font configure gives wrong error message when params are missing
comment:
  OriginalBugID: 2075 Bug
  Version: 8.1
  SubmitDate: '1999-05-14'
  LastModified: '1999-09-16'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Linux-Red Hat
  Machine: Other
  FixedDate: '1999-09-16'
  FixedInVersion: 8.2.1


  Name:
  Geoff Pike

  ReproducibleScript:
  Try this under unix (I'm using Redhat Linux 5.1):
      
      echo "font create f; font config f -size 12 -family" | wish8.0
      echo "font create f; font config f -size 12 -family" | wish8.1

  ObservedBehavior:
  Tk8.0 correctly complains that the family parameter is missing.  
      Tk8.1 complains that the size parameter is missing.


tkt_uuid: 220528ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: &quot;wm state .&quot; under Windows has undocumented behavior
comment:
  OriginalBugID: 2077 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-14'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '2000-01-06'
  FixedInVersion: 8.3b2


  Name:
  Geoff Pike

  ReproducibleScript:
  I have consulted the Tk man pages for 8.0 and 8.1 (wm.n) and I have
      searched
      Scriptics site and comp.lang.tcl, to no avail.  I am wondering what
      the deal is with "wm state" on maximized windows under Microsoft
      Windows.
      It seems to report "zoomed," an undocumented behavior.  I am also
      wondering how to put a window into the zoomed state.
      
      Finally, a bug in "wm deiconify $w".  It should not change a window out
      of the
      zoomed state.  (To recreate the behavior, start wish, maximize it, and
      do "wm deiconify .".)



  We recognize the zoomed state, but currently do not support it (there
  is no equiv on Unix).  Needs to be examined further. 
  -- 08/14/1999 hobbs
  zoom state is the maximized state, and proper support for it has
  been added in 8.3b2.  The second bug mentioned has also been fixed. 
  -- 01/06/2000 hobbs


tkt_uuid: 220529ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 49. [grid]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: Use of deprecated functions in tkGrid.c
comment:
  OriginalBugID: 2080 Bug
  Version: 8.1
  SubmitDate: '1999-05-17'
  LastModified: '1999-06-30'
  Severity: LOW
  Status: Released
  Submitter: pat
  ChangedBy: redman
  OS: Linux
  OSVersion: 4.2
  Machine: Other
  FixedDate: '1999-06-30'
  FixedInVersion: 8.2b1


  Name:

  Jan Nijtmans



  Comments:

  I checked all of Tk for any use of this group of deprecated functions

      and symbols. tkGrid.c was the only one reported.



  ObservedBehavior:

  In tkGrid.c the functions Tk_CancelIdleCall() and Tk_EventuallyFree()

      are used, which are deprecated. Lucky enough, tk.h contains macros

      which do the conversion, still it is bad style.



  Patch:

  *** generic/tkGrid.c.origThu Apr 29 21:37:52 1999

  --- generic/tkGrid.cSat May 15 18:26:16 1999

  ***************

  *** 435,441 ****

        slavePtr->iPadX = slavePtr->iPadY = 0;

        slavePtr->doubleBw = 2*Tk_Changes(tkwin)->border_width;

        if (slavePtr->flags & REQUESTED_RELAYOUT) {

  ! Tk_CancelIdleCall(ArrangeGrid, (ClientData) slavePtr);

        }

        slavePtr->flags = 0;

        slavePtr->sticky = 0;

  --- 435,441 ----

        slavePtr->iPadX = slavePtr->iPadY = 0;

        slavePtr->doubleBw = 2*Tk_Changes(tkwin)->border_width;

        if (slavePtr->flags & REQUESTED_RELAYOUT) {

  ! Tcl_CancelIdleCall(ArrangeGrid, (ClientData) slavePtr);

        }

        slavePtr->flags = 0;

        slavePtr->sticky = 0;

  ***************

  *** 522,528 ****

     */

    

    while (masterPtr->flags & REQUESTED_RELAYOUT) {

  !     Tk_CancelIdleCall(ArrangeGrid, (ClientData) masterPtr);

        ArrangeGrid ((ClientData) masterPtr);

    }

    SetGridSize(masterPtr);

  --- 522,528 ----

     */

    

    while (masterPtr->flags & REQUESTED_RELAYOUT) {

  !     Tcl_CancelIdleCall(ArrangeGrid, (ClientData) masterPtr);

        ArrangeGrid ((ClientData) masterPtr);

    }

    SetGridSize(masterPtr);

  ***************

  *** 2007,2013 ****

     *

     * DestroyGrid --

     *

  !  *This procedure is invoked by Tk_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

  --- 2007,2013 ----

     *

     * DestroyGrid --

     *

  !  *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,2106 ****

    Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->gridHashTable,

    (char *) gridPtr->tkwin));

    if (gridPtr->flags & REQUESTED_RELAYOUT) {

  !     Tk_CancelIdleCall(ArrangeGrid, (ClientData) gridPtr);

    }

    gridPtr->tkwin = NULL;

  ! Tk_EventuallyFree((ClientData) gridPtr, DestroyGrid);

        } else if (eventPtr->type == MapNotify) {

    if (!(gridPtr->flags & REQUESTED_RELAYOUT)) {

        gridPtr->flags |= REQUESTED_RELAYOUT;

  --- 2097,2106 ----

    Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->gridHashTable,

    (char *) gridPtr->tkwin));

    if (gridPtr->flags & REQUESTED_RELAYOUT) {

  !     Tcl_CancelIdleCall(ArrangeGrid, (ClientData) gridPtr);

    }

    gridPtr->tkwin = NULL;

  ! Tcl_EventuallyFree((ClientData) gridPtr, DestroyGrid);

        } else if (eventPtr->type == MapNotify) {

    if (!(gridPtr->flags & REQUESTED_RELAYOUT)) {

        gridPtr->flags |= REQUESTED_RELAYOUT;



  PatchFiles:

  tkGrid.c





  Applied the patch.
   
  -- 06/30/1999 redman


tkt_uuid: 220530ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: bad binding scripts can crash prowish
comment:
  OriginalBugID: 2120 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-21'
  LastModified: '1999-10-22'
  Severity: CRIT
  Status: Released
  Submitter: pat
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86
  FixedDate: '1999-10-22'
  FixedInVersion: 8.2


  Name: Berry Kercheval

  ReproducibleScript:
  If you run this:
         entry .e
         pack .e
         bind .e <KeyPress> {puts "%a"}
      then ProWish on Win 98 crashes hard.  The %a is probably a bogus thing
      for a 
      keypress event, but a hard crash is a rather more severe penalty than I
      expected from a simple typo (I had intended %A)

  ObservedBehavior:
  CRASH!!!

  DesiredBehavior:
  I expect some value, probably meaningless, to be substituted for %a, or
      even for an error to be thrown.



  This works in 8.2 (sub'ing '??' in). 
  -- 10/22/1999 hobbs


tkt_uuid: 220531ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 52. [clipboard]
priority: 2
foundin: None
resolution: Fixed
title: clipboard command enhancement
comment:
  OriginalBugID: 2159 RFE
  Version: 8.0.5
  SubmitDate: '1999-06-03'
  LastModified: '1999-09-18'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-09-18'
  FixedInVersion: 8.2


  Name:
  Michael S. Schliephake

  DesiredBehavior:
  Actual situation: Upon exit TkpCloseDisplay() clears the clipboard data
      without rendering them so that no other program is able to paste. If
      another program had the ownership during the runtime of the
      Tk-application the data were rendered and can be pasted after
      Tk-program-exit too.
      
      Proposal: The behaviour is in principal accepatable, this avoids large
      amounts of unused data in the clipboard. But even in Windows the use of
      the clipboard is a very common practice - ranging from words of simple
      entries to whole documents.
      So I would create new subcommand
      "clipboard permanent" or so. This command had to do the transfer of the
      data to the clipboard and detach the ownership of the data in the
      Tk-data structure. Then the data would not be deleted upon exit. And,
      the permanent placing would be under control of the programmer, so he
      can selectively use ist, when the mechanism should be used to transfer
      data into other applications.



  In 8.2.0, Tcl will copy any data that was set to be copied
  before exiting completely.  If I select data in a text widget,
  do ^C, and then close the app, I can still paste that data into
  Netscape (or other Windows app). 
  -- 09/18/1999 hobbs


tkt_uuid: 220532ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.0.3
resolution: Fixed
title: Mac Simple Tk (PPC) causes type 1 error after exiting.
comment:
  OriginalBugID: 2161 Bug
  Version: 8.0.3
  SubmitDate: '1999-06-03'
  LastModified: '1999-11-16'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  Machine: Power PC
  FixedDate: '1999-11-16'
  FixedInVersion: 8.2


  Name:
  Arthur J. Milgram

  Extensions:
  none

  CustomShell:
  one function call in TclAppInit.c

  Comments:
  I've built an application which uses Boutell's GD library, and a CGI
      support lib from Apple, that runs under a Tcl/Tk interpreter. I've been
      working on this for over two years. The program reads GeneBank files and
      draws whole bacterial genomes in cartoon form, and manipulates genomic
      data on the size of several genomes in order to construct gene
      illustrations.
      
      It is very useful for me, and encapsulation is such that using the
      instructions in the FAQ to build and link with the Tcl/Tk interpreter
      required the insertion of only a single function call.
      
      I hope soonish to be able to release it as an Open Source app.
      
      This problem I describe occurs in the Simple Tk I am using for my
      program, but also in the Simple Tk app itself right out of the box (I
      mean the .gz tarball compiled with Code Warrior Pro 4, I purchased the
      Tcl Blast CD, but it doesn't have the libraries precompiled on it).
      
      I've also spent about 6 months time (since I upgraded from CW 11, to Pro
      4, which won't compile 7.6/4.0) trying to figure it out. Both in Simple
      Tk and in my app. I'm afraid this has lead to so real close the windows
      and lock the doors kind of moments for me.
      
      Is this a problem you've seen before, has anything like it been reported
      before? Is Tcl/Tk 8.1 available on Macs and would that fix my problems
      (Tcl/Tk 8.0.5 didn't appear to be)? I've looked at the Mac.Tcl mailing
      list on the consortium's site, but can't tell if the link is a subscribe
      to list "mailto" or the list itself. Are there any sources of
      information, or people who might know anything about this whom you might
      recomend?

  ReproducibleScript:
  Simple Tk (PPC) on a Mac 7600 Sys 8.5 Shell, and ToolKit work fine (all
      scripts, and tasks, no trouble), but after exiting, certain programs,
      (namely Netscape, and JPegView) will crash with a System Type 1 error if
      you pull down the file menu. 
      
      Is repeatable on my Powerbook G3 running Sys 8.0.

  ObservedBehavior:
  At first, this behavior also occured while Simple Tk (PPC) was running,
      but rebuilding the project Tk_MDEF.* fixed that.
      
      So, I'm suspecting this is a resources elated problem.

  DesiredBehavior:
  I'd like very much to run Simple Tk, quit and restart several times,
      without any OS troubles. *S*



  This behavior does not exist when testing on a PowerMac G4
  running OS 8.6.  Perhaps the fix went away with the new
  version.  It is possible that it was related to Tcl using
  too much stack before. 
  -- 11/16/1999 hobbs


tkt_uuid: 220533ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: When compiling Tk from makefile.vc various errors are encountered.
comment:
  OriginalBugID: 2164 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-03'
  LastModified: '1999-08-14'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-08-14'
  FixedInVersion: 8.2


  Name:
  Lindsay Gill

  ReproducibleScript:
  nmake /f "makfile.vc" test

  ObservedBehavior:
  --------------------Configuration: compile files - Win32
      Debug--------------------
      Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
      Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
       set TCL_LIBRARY=..\..\tcl8.1.1/library
       set PATH=..\..\tcl8.1.1\win\Release;C:\Program Files\Microsoft Visual
      Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual
      Studio\VC98\BIN;C:\Program Files\Microsoft Visual
      Studio\Common\TOOLS;C:\Program Files\Microsoft Visual Studio\Common TOOLS\WINNT;C:\WINNT\system32;C:\WINNT;C:\PROGRA~1\Tcl\bin
       .\Release\tktest.exe ../tests/all.tcl | .\Release\cat32.exe
      Tk 8.1.1 tests running in interp:  D:/tk8.1.1/compile
      files/Release/tktest.exe
      Tests running in working dir:  D:/tk8.1.1/compile files
      Tests began at Thu Jun 03 14:58:51 Central Daylight Time 1999
      bell.test
      Bell should ring now ...
      bgerror.test
      bind.test
      bitmap.test
      border.test
      button.test
      canvImg.test
      canvPs.test
      canvRect.test
      canvText.test
      canvWind.test
      canvas.test
      clipboard.test
      clrpick.test
      cmds.test
      color.test
      config.test
      cursor.test
      ==== cursor-3.1 Tk_FreeCursorFromObj - reference counts FAILED
      ==== Contents of test case:
          set x arrow
          destroy .b1 .b2 .b3
          button .b1 -cursor $x
          button .b3 -cursor $x
          button .b2 -cursor $x
          set result {}
          lappend result [testcursor arrow]
          destroy .b1
          lappend result [testcursor arrow]
          destroy .b2
          lappend result [testcursor arrow]
          destroy .b3
          lappend result [testcursor arrow]
      ---- Result was:
      {{9 5}} {{8 5}} {{7 5}} {{6 5}}
      ---- Result should have been:
      {{3 1}} {{2 1}} {{1 1}} {}
      ==== cursor-3.1 FAILED
      ==== cursor-4.1 FreeCursorObjProc FAILED
      ==== Contents of test case:
          destroy .b
          set x [format arrow]
          button .b -cursor $x
          set y [format arrow]
          .b configure -cursor $y
          set z [format arrow]
          .b configure -cursor $z
          set result {}
          lappend result [testcursor arrow]
          set x red
          lappend result [testcursor arrow]
          set z 32
          lappend result [testcursor arrow]
          destroy .b
          lappend result [testcursor arrow]
          set y bogus
          set result
      ---- Result was:
      {{7 7}} {{7 6}} {{7 5}} {{6 5}}
      ---- Result should have been:
      {{1 3}} {{1 2}} {{1 1}} {}
      ==== cursor-4.1 FAILED
      entry.test
      event.test
      filebox.test
      focus.test
      can't read "::tcltest::fd": no such variable
      focusTcl.test
      font.test
      frame.test
      geometry.test
      get.test
      grid.test
      ==== grid-11.14 default widget placement FAILED
      ==== Contents of test case:
          foreach i {1 2 3} {
       frame .f$i -width 50 -height 50 -highlightthickness 0 -bg red
          }
          grid .f1 .f2
          grid  ^  .f3
          update
          set a ""
          foreach i {1 2 3} {
       lappend a "[winfo x .f$i],[winfo y .f$i]  [winfo width .f$i],[winfo
      height .f$i]"
          }
          set a
      ---- Result was:
      {2,25  50,50} {52,0  50,50} {52,50  50,50}
      ---- Result should have been:
      {0,25  50,50} {50,0  50,50} {50,50  50,50}
      ==== grid-11.14 FAILED
      id.test
      This application hasn't been compiled with the testwrapper command,
      therefore I am skipping all of these tests.
      image.test
      imgBmap.test
      imgPPM.test
      imgPhoto.test
      listbox.test
      macEmbed.test
      macFont.test
      skipping: Mac only tests...
      macMenu.test
      skipping: Mac only tests...
      macWinMenu.test
      macscrollbar.test
      skipping: Mac only tests...
      main.test
      menu.test
      menuDraw.test
      menubut.test
      msgbox.test
      obj.test
      oldpack.test
      option.test
      pack.test
      place.test
      raise.test
      safe.test
      ==== safe-1.2 Safe Tk loading into an interpreter FAILED
      ==== Contents of test case:
          catch {safe::interpDelete a}
          safe::interpCreate a
          safe::loadTk a
          set l [lsort [interp hidden a]]
          safe::interpDelete a
          set l
      ---- Result was:
      bell cd clipboard encoding exec exit fconfigure file glob grab load menu
      open pwd selection socket source tk tk_chooseColor tk_chooseDirectory
      tk_getOpenFile tk_getSaveFile tk_messageBox toplevel wm
      ---- Result should have been:
      bell cd clipboard encoding exec exit fconfigure file glob grab load menu
      open pwd selection socket source tk tk_chooseColor tk_getOpenFile
      tk_getSaveFile tk_messageBox toplevel wm
      ==== safe-1.2 FAILED
      scale.test
      scrollbar.test
      ==== scrollbar-6.27 ScrollbarPosition procedure FAILED
      ==== Contents of test case:
          .s identify [expr [winfo width .s] / 2] [expr int(.4 / [.s delta 0
      1])  + [testmetrics cyvscroll]]
      ---- Result was:
      slider
      ---- Result should have been:
      trough2
      ==== scrollbar-6.27 FAILED
      select.test
      send.test
      xhost application isn't available - skipping tests
      text.test
      textBTree.test
      textDisp.test
      skipping font-sensitive tests
      ==== textDisp-4.12 UpdateDisplayInfo, filling in extra vertical space
      FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert end "1\n2\n3\n4\n5\n7\n8\n9\n10\n11\n12"
          button .b -text "Test" -bd 2 -highlightthickness 2
          .t window create 3.end -window .b
          .t yview moveto 1
          update
          .t yview moveto 0
          update
          .t yview moveto 1
          update
          winfo ismapped .b
      ---- Result was:
      1
      ---- Result should have been:
      0
      ==== textDisp-4.12 FAILED
      textImage.test
      textIndex.test
      textMark.test
      textTag.test
      textWind.test
      ==== textWind-10.1 EmbWinLayoutProc procedure FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          .t window create 1.5 -create {
       frame .f -width 10 -height 20 -bg $color
          }
          update
          list [winfo exists .f] [winfo geom .f] [.t index .f]
      ---- Result was:
      1 10x20+45+5 1.5
      ---- Result should have been:
      1 10x20+40+5 1.5
      ==== textWind-10.1 FAILED
      ==== textWind-10.11 EmbWinLayoutProc procedure, doesn't fit on line
      FAILED
      ==== Contents of test case:
          .t configure -wrap none
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .f -width 130 -height 20 -bg $color -bd 2 -relief raised
          .t window create 1.12 -window .f
          update
          list [.t bbox .f] [.t bbox 1.13]
      ---- Result was:
      {101 5 130 20} {231 6 8 17}
      ---- Result should have been:
      {89 5 126 20} {}
      ==== textWind-10.11 FAILED
      ==== textWind-11.1 EmbWinDisplayProc procedure, geometry transforms
      FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          pack forget .t
          place .t -x 30 -y 50
          frame .f -width 30 -height 20 -bg $color
          .t window create 1.12 -window .f
          update
          winfo geom .f
      ---- Result was:
      30x20+131+55
      ---- Result should have been:
      30x20+119+55
      ==== textWind-11.1 FAILED
      ==== textWind-11.2 EmbWinDisplayProc procedure, geometry transforms
      FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          pack forget .t
          place .t -x 30 -y 50
          frame .t.f -width 30 -height 20 -bg $color
          .t window create 1.12 -window .t.f
          update
          winfo geom .t.f
      ---- Result was:
      30x20+101+5
      ---- Result should have been:
      30x20+89+5
      ==== textWind-11.2 FAILED
      ==== textWind-13.1 EmbWinBboxProc procedure FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .f -width 5 -height 5 -bg $color
          .t window create 1.2 -window .f -align top -padx 2 -pady 1
          update
          list [winfo geom .f] [.t bbox .f]
      ---- Result was:
      5x5+23+6 {23 6 5 5}
      ---- Result should have been:
      5x5+21+6 {21 6 5 5}
      ==== textWind-13.1 FAILED
      ==== textWind-13.2 EmbWinBboxProc procedure FAILED
      ==== Contents of test case:
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .f -width 5 -height 5 -bg $color
          .t window create 1.2 -window .f -align center -padx 2 -pady 1
          update
          list [winfo geom .f] [.t bbox .f]
      ---- Result was:
      5x5+23+11 {23 11 5 5}
      ---- Result should have been:
      5x5+21+9 {21 9 5 5}
      ==== textWind-13.2 FAILED
      ==== textWind-13.9 EmbWinBboxProc procedure, spacing options FAILED
      ==== Contents of test case:
          .t configure -spacing1 5 -spacing3 2
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .f -width 5 -height 5 -bg $color
          .t window create 1.2 -window .f -align center -padx 2 -pady 1
          update
          list [winfo geom .f] [.t bbox .f]
      ---- Result was:
      5x5+23+16 {23 16 5 5}
      ---- Result should have been:
      5x5+21+14 {21 14 5 5}
      ==== textWind-13.9 FAILED
      ==== textWind-16.2 EmbWinTextStructureProc procedure FAILED
      ==== Contents of test case:
          .t configure -wrap none
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .f -width 30 -height 20 -bg $color
          .t window create 1.6 -window .f
          update
          set result {}
          lappend result [winfo geom .f] [.t bbox .f]
          frame .f2 -width 150 -height 30 -bd 2 -relief raised
          pack .f2 -before .t
          update
          lappend result [winfo geom .f] [.t bbox .f]
      ---- Result was:
      30x20+53+5 {53 5 30 20} 30x20+53+35 {53 5 30 20}
      ---- Result should have been:
      30x20+47+5 {47 5 30 20} 30x20+47+35 {47 5 30 20}
      ==== textWind-16.2 FAILED
      ==== textWind-16.4 EmbWinTextStructureProc procedure FAILED
      ==== Contents of test case:
          .t configure -wrap none
          .t delete 1.0 end
          .t insert 1.0 "Some sample text"
          frame .t.f -width 30 -height 20 -bg $color
          .t window create 1.6 -window .t.f
          update
          pack forget .t
          update
          list [winfo ismapped .t.f] [.t bbox .t.f]
      ---- Result was:
      1 {53 5 30 20}
      ---- Result should have been:
      1 {47 5 30 20}
      ==== textWind-16.4 FAILED
      tk.test
      unixButton.test
      skipping: Unix only tests...
      unixEmbed.test
      skipping: Unix only tests...
      unixFont.test
      skipping: Unix only tests...
      unixMenu.test
      skipping: Unix only tests...
      unixSend.test
      skipping: Unix only tests...
      unixWm.test
      skipping: Unix only tests...
      util.test
      visual.test
      visual_bb.test
      winButton.test
      winClipboard.test
      winDialog.test
      winFont.test
      winMenu.test
      winSend.test
      skipping: Unimplemented send command
      winWm.test
      ==== winWm-5.1 UpdateGeometryInfo: menu resizing FAILED
      ==== Contents of test case:
          set result {}
          toplevel .t
          frame .t.f -width 150 -height 50 -bg red
          pack .t.f
          update
          set result [winfo height .t]
          menu .t.m
          .t.m add command -label foo
          .t conf -menu .t.m
          update
          lappend result [winfo height .t]
          .t.m add command -label "thisisreallylong"
          .t.m add command -label "thisisreallylong"
          update
          lappend result [winfo height .t]
          destroy .t
          set result
      ---- Result was:
      50 50 32
      ---- Result should have been:
      50 50 50
      ==== winWm-5.1 FAILED
      window.test
      winfo.test
      xmfbox.test
      Tests ended at Thu Jun 03 14:59:25 Central Daylight Time 1999
      all.tcl: Total 5844 Passed 5224 Skipped 604 Failed 16
      Sourced 82 Test Files.
      Files with failing tests: cursor.test grid.test safe.test scrollbar.test
      textDisp.test textWind.test winWm.test
      Number of tests skipped for each constraint:
       5 emptyTest
       245 fonts
       1 knownBug
       44 macOnly
       15 macOrUnix
       58 nonPortable
       77 nonUnixUserInteraction
       3 pseudocolor
       1 tempNotPc
       136 unixOnly
       19 userInteraction
      stderr32

      compile files.exe - 0 error(s), 0 warning(s)



  The same system config with Tk 8.2.0 does not produce these errors
  here.  I will assume they have been clarified in/before 8.2.0. 
  -- 08/14/1999 hobbs


tkt_uuid: 220534ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Implementation of XSetDashes for Windows
comment:
  OriginalBugID: 2168 RFE
  Version: 8.1.1
  SubmitDate: '1999-06-03'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0 SP3
  Machine: X86
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:

  Jan Nijtmans


  Comments:

  This patch makes the XSetDashes function available for the mac

      as well, but there it only operates as a NOP.


  DesiredBehavior:

  This patch is extracted from the Dash-patch for 8.1.1,

      (to be released soon), but it is identical to version

      8.0.5 and 7.6p2. Slot 0 of the Xlib Stub-table is

      alread reserved for this function, the only thing

      missing is the implementation.


      This patch is created against 8.1.1, but it works

      unmodified for 8.0.x as well.


  Patch:

  *** generic/tkInt.decls.origWed May 26 07:11:33 1999

  --- generic/tkInt.declsSat May 29 00:02:25 1999

  ***************

  *** 1051,1060 ****


    # X functions for Windows


  ! # This slot is reserved for use by the dash patch:

  ! #  declare 0 win {

  ! #XSetDashes

  ! #  }

    declare 1 win {

        XModifierKeymap* XGetModifierMapping (Display* d)

    }

  --- 1051,1061 ----


    # X functions for Windows


  ! declare 0 win {

  !     void XSetDashes (Display* display, GC gc, int dash_offset,

  !     _Xconst char* dash_list, int n)

  ! }

  ! 

    declare 1 win {

        XModifierKeymap* XGetModifierMapping (Display* d)

    }

  ***************

  *** 1520,1529 ****


    # X functions for Mac


  ! # This slot is reserved for use by the dash patch:

  ! #  declare 0 win {

  ! #XSetDashes

  ! #  }


    declare 1 mac {

        XModifierKeymap* XGetModifierMapping (Display* d)

  --- 1521,1530 ----


    # X functions for Mac


  ! declare 0 mac {

  !     void XSetDashes (Display* display, GC gc, int dash_offset,

  !     _Xconst char* dash_list, int n)

  ! }


    declare 1 mac {

        XModifierKeymap* XGetModifierMapping (Display* d)

  *** win/tkWinDraw.c.origFri Apr 16 23:03:02 1999

  --- win/tkWinDraw.cSat May 29 00:02:34 1999

  ***************

  *** 125,130 ****

  --- 125,131 ----

    static voidRenderObject _ANSI_ARGS_((HDC dc, GC gc,

        XPoint* points, int npoints, int mode, HPEN pen,

        WinDrawFunc func));

  + static HPENSetUpGraphicsPort _ANSI_ARGS_((GC gc));

    

    /*

     *----------------------------------------------------------------------

  ***************

  *** 888,929 ****


        dc = TkWinGetDrawableDC(display, d, &state);


  !     if (!tkpIsWin32s && (gc->line_width > 1)) {

  ! LOGBRUSH lb;

  ! DWORD style;

  ! 

  ! lb.lbStyle = BS_SOLID;

  ! lb.lbColor = gc->foreground;

  ! lb.lbHatch = 0;

  ! 

  ! style = PS_GEOMETRIC|PS_COSMETIC;

  ! switch (gc->cap_style) {

  !     case CapNotLast:

  !     case CapButt:

  ! style |= PS_ENDCAP_FLAT; 

  ! break;

  !     case CapRound:

  ! style |= PS_ENDCAP_ROUND; 

  ! break;

  !     default:

  ! style |= PS_ENDCAP_SQUARE; 

  ! break;

  ! }

  ! switch (gc->join_style) {

  !     case JoinMiter: 

  ! style |= PS_JOIN_MITER; 

  ! break;

  !     case JoinRound:

  ! style |= PS_JOIN_ROUND; 

  ! break;

  !     default:

  ! style |= PS_JOIN_BEVEL; 

  ! break;

  ! }

  ! pen = ExtCreatePen(style, gc->line_width, &lb, 0, NULL);

  !     } else {

  ! pen = CreatePen(PS_SOLID, gc->line_width, gc->foreground);

  !     }

        RenderObject(dc, gc, points, npoints, mode, pen, Polyline);

        DeleteObject(pen);


  --- 889,895 ----


        dc = TkWinGetDrawableDC(display, d, &state);


  !     pen = SetUpGraphicsPort(gc);

        RenderObject(dc, gc, points, npoints, mode, pen, Polyline);

        DeleteObject(pen);


  ***************

  *** 1009,1015 ****


        dc = TkWinGetDrawableDC(display, d, &state);


  !     pen = CreatePen(PS_SOLID, gc->line_width, gc->foreground);

        oldPen = SelectObject(dc, pen);

        oldBrush = SelectObject(dc, GetStockObject(NULL_BRUSH));

        SetROP2(dc, tkpWinRopModes[gc->function]);

  --- 975,981 ----


        dc = TkWinGetDrawableDC(display, d, &state);


  !     pen = SetUpGraphicsPort(gc);

        oldPen = SelectObject(dc, pen);

        oldBrush = SelectObject(dc, GetStockObject(NULL_BRUSH));

        SetROP2(dc, tkpWinRopModes[gc->function]);

  ***************

  *** 1171,1177 ****

         * difference in pixel definitions between X and Windows.

         */


  !     pen = CreatePen(PS_SOLID, gc->line_width, gc->foreground);

        oldPen = SelectObject(dc, pen);

        if (!fill) {

    /*

  --- 1137,1143 ----

         * difference in pixel definitions between X and Windows.

         */


  !     pen = SetUpGraphicsPort(gc);

        oldPen = SelectObject(dc, pen);

        if (!fill) {

    /*

  ***************

  *** 1193,1198 ****

  --- 1159,1253 ----

        }

        DeleteObject(SelectObject(dc, oldPen));

        TkWinReleaseDrawableDC(d, dc, &state);

  + }

  + 

  + /*

  +  *----------------------------------------------------------------------

  +  *

  +  * SetUpGraphicsPort --

  +  *

  +  *Set up the graphics port from the given GC.

  +  *

  +  * Results:

  +  *None.

  +  *

  +  * Side effects:

  +  *The current port is adjusted.

  +  *

  +  *----------------------------------------------------------------------

  +  */

  + 

  + static HPEN

  + SetUpGraphicsPort(gc)

  +     GC gc;

  + {

  +     DWORD style;

  + 

  +     if (gc->line_style == LineOnOffDash) {

  + unsigned char *p = (unsigned char *) &(gc->dashes);

  + /* pointer to the dash-list */

  + 

  + /*

  +  * Below is a simple translation of serveral dash patterns

  +  * to valid windows pen types. Far from complete,

  +  * but I don't know how to do it better.

  +  * Any ideas: <mailto:Jan.Nijtmans@wxs.nl>

  +  */

  + 

  + if (p[1] && p[2]) {

  +     if (!p[3] || p[4]) {

  + style = PS_DASHDOTDOT;/*-..*/

  +     } else {

  + style = PS_DASHDOT;/*-.*/

  +     }

  + } else {

  +     if (p[0] > (4 * gc->line_width)) {

  + style = PS_DASH;/*-*/

  +     } else {

  + style = PS_DOT;/*.*/

  +     }

  + }

  +     } else {

  + style = PS_SOLID;

  +     }

  +     if (tkpIsWin32s || (gc->line_width < 2)) {

  + if (gc->line_width > 1) {

  +     style = PS_SOLID;

  + }

  + return CreatePen(style, gc->line_width, gc->foreground);

  +     } else {

  + LOGBRUSH lb;

  + 

  + lb.lbStyle = BS_SOLID;

  + lb.lbColor = gc->foreground;

  + lb.lbHatch = 0;

  + 

  + style |= PS_GEOMETRIC;

  + switch (gc->cap_style) {

  +     case CapNotLast:

  +     case CapButt:

  + style |= PS_ENDCAP_FLAT; 

  + break;

  +     case CapRound:

  + style |= PS_ENDCAP_ROUND; 

  + break;

  +     default:

  + style |= PS_ENDCAP_SQUARE; 

  + break;

  + }

  + switch (gc->join_style) {

  +     case JoinMiter: 

  + style |= PS_JOIN_MITER; 

  + break;

  +     case JoinRound:

  + style |= PS_JOIN_ROUND; 

  + break;

  +     default:

  + style |= PS_JOIN_BEVEL; 

  + break;

  + }

  + return ExtCreatePen(style, gc->line_width, &lb, 0, NULL);

  +     }

    }

    

    /*

  *** xlib/xgc.c.origFri Apr 16 23:03:05 1999

  --- xlib/xgc.cSat May 29 00:02:34 1999

  ***************

  *** 46,52 ****

    {

        GC gp;


  !     gp = (XGCValues *)ckalloc(sizeof(XGCValues));

        if (!gp) {

    return None;

        }

  --- 46,60 ----

    {

        GC gp;


  ! /*

  !  * In order to have room for a dash list, MAX_DASH_LIST_SIZE extra chars are

  !  * defined, which is invisible from the outside. The list is assumed to end

  !  * with a 0-char, so this must be set explicitely during initialization.

  !  */

  ! 

  ! #define MAX_DASH_LIST_SIZE 10

  ! 

  !     gp = (XGCValues *)ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE);

        if (!gp) {

    return None;

        }

  ***************

  *** 73,78 ****

  --- 81,87 ----

        gp->clip_y_origin = (mask & GCClipYOrigin)?values->clip_y_origin:0;

        gp->dash_offset = (mask & GCDashOffset)?values->dash_offset:0;

        gp->dashes = (mask & GCDashList)?values->dashes:4;

  +     (&(gp->dashes))[1] = 0;


        if (mask & GCClipMask) {

    gp->clip_mask = (Pixmap)ckalloc(sizeof(TkpClipMask));

  ***************

  *** 131,137 ****

        if (mask & GCClipYOrigin) { gc->clip_y_origin = values->clip_y_origin; }

        if (mask & GCClipMask) { XSetClipMask(d, gc, values->clip_mask); }

        if (mask & GCDashOffset) { gc->dash_offset = values->dash_offset; }

  !     if (mask & GCDashList) { gc->dashes = values->dashes; }

    }

    

    /*

  --- 140,146 ----

        if (mask & GCClipYOrigin) { gc->clip_y_origin = values->clip_y_origin; }

        if (mask & GCClipMask) { XSetClipMask(d, gc, values->clip_mask); }

        if (mask & GCDashOffset) { gc->dash_offset = values->dash_offset; }

  !     if (mask & GCDashList) { gc->dashes = values->dashes; (&(gc->dashes))[1] = 0;}

    }

    

    /*

  ***************

  *** 198,203 ****

  --- 207,230 ----

    }


    void

  + XSetDashes(display, gc, dash_offset, dash_list, n)

  +     Display* display;

  +     GC gc;

  +     int dash_offset;

  +     _Xconst char* dash_list;

  +     int n;

  + {

  +     char *p = &(gc->dashes);

  + 

  +     gc->dash_offset = dash_offset;

  +     if (n > MAX_DASH_LIST_SIZE) n = MAX_DASH_LIST_SIZE;

  +     while (n-- > 0) {

  + *p++ = *dash_list++;

  +     }

  +     *p = 0;

  + }

  + 

  + void

    XSetFunction(display, gc, function)

        Display *display;

        GC gc;


  PatchFiles:

  tkInt.decls tkWinDraw.c xgc.c




  in 8.3b1. 
  -- 12/13/1999 hobbs


tkt_uuid: 220535ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 47. Win Fonts
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Handling of non true type fonts on Windows could be better.
comment:
  OriginalBugID: 2172 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-03'
  LastModified: '2000-05-12'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 5469
  OS: All Windows
  Machine: X86
  FixedDate: '2000-05-12'
  FixedInVersion: 8.4a1


  Name:

  Peter Spjuth



  Comments:

  When using non true type fonts, like the default font ms sans serif, and

      fonts

      like fixedsys and system, Tk only uses the characters up to 7F even

      though

      those fonts can display more.

      

      This patch let such fonts display characters A0-FF too, making things

      look

      a lot better when using Tk with a language like Swedish.

      

      I don't know if the assumption that fonts with ANSI_CHARSET always can

      display characters A0-FF is true, but as I see it, it is true enough.

      

      I have not done any deeper study of how fonts are handled, so I don't

      know if this solution is correct, or if it's the best solution, but

      it solves the problems I have had.



  ReproducibleScript:

  pack [label .l1 -text aöbéc]

      pack [label .l2 -text aöbéc -font system]

      pack [label .l3 -text aöbéc -font fixedsys]



  ObservedBehavior:

  The labels' texts don't look nice since the non US ascii characters 

      are displayed with a different font than the others.

      

      I hope the script survive the passage through e-mail, but otherwise

      you can enter any chars from the upper half of 8-bit ascii at the text

      option.



  Patch:

  *** tkWinFont.c.origSun May 30 18:34:06 1999

  --- tkWinFont.cWed Jun 02 21:02:38 1999

  ***************

  *** 2202,2214 ****

        USHORT **endCountPtr,/* Filled with malloced pointer to 

     * character range information. */

        int *symbolPtr)

  !  {

  !     int n, i, swapped, offset, cbData, segCount;

        DWORD cmapKey;

        USHORT *startCount, *endCount;

        CMAPTABLE cmapTable;

        ENCODINGTABLE encTable;

        SUBTABLE subTable;

        char *s;

    

        segCount = 0;

  --- 2202,2215 ----

        USHORT **endCountPtr,/* Filled with malloced pointer to 

     * character range information. */

        int *symbolPtr)

  ! {

  !     int n, i, swapped, offset, cbData, segCount, charSet;

        DWORD cmapKey;

        USHORT *startCount, *endCount;

        CMAPTABLE cmapTable;

        ENCODINGTABLE encTable;

        SUBTABLE subTable;

  +     TEXTMETRIC tm;

        char *s;

    

        segCount = 0;

  ***************

  *** 2305,2310 ****

  --- 2306,2323 ----

    }

        }

    }

  +     } else if (GetTextMetrics(hdc, &tm)) {

  +         charSet = tm.tmCharSet;

  +         if (charSet == ANSI_CHARSET) {

  +             segCount = 2;

  +             cbData = segCount * sizeof(USHORT);

  +             startCount = (USHORT *) ckalloc(cbData);

  +             endCount = (USHORT *) ckalloc(cbData);

  +             startCount[0] = 0x0020;

  +             endCount[0] = 0x007f;

  +             startCount[1] = 0x00a0;

  +             endCount[1] = 0x00ff;

  +         }

        }

        SelectObject(hdc, hFont);



  PatchFiles:

  tkWinFont.c





  I changed this patch to the simpler:



      } else if (GetTextCharset(hdc) == ANSI_CHARSET) {

  /*

   * Bitmap font.  We should also support ranges for the other

   * *_CHARSET values.

   */

  segCount = 1;

  cbData = segCount * sizeof(USHORT);

  startCount = (USHORT *) ckalloc(cbData);

  endCount = (USHORT *) ckalloc(cbData);

  startCount[0] = 0x0000;

  endCount[0] = 0x00ff;



  As upon further examination, ANSI_CHARSET == cp1252 for Windows,

  and that should really handle all of the first 256 chars.  After

  applying the patch, you can see the difference when using the

  right font and outputing:



  for {set i 0} {$i < 256} {incr i} {

      puts "$i\t[format %x $i]\t[subst \\[format %o $i]]"

  }



  This is in 8.4a1 for now, but may change because there are other

  bitmap charset identifiers which we might want to support correctly

  in that else case. 

  -- 05/12/2000 hobbs


tkt_uuid: 220536ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Boo boos in the tk_messageBox help page
comment:
  OriginalBugID: 2218 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '2000-04-27'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 2219
  OS: Windows 98
  Machine: X86
  FixedDate: '2000-04-27'
  FixedInVersion: 8.4a1


  Name:
  Christopher Nelson

  ObservedBehavior:
  In the .HLP file for Tk 8.1.1, the -default option of tk_messageBox says
  "if this option is not specified, there won't be any default button".
  At least on Windoze 98, the default button is always the first button if
  none is specified.  Maybe there isn't one on UNIX (I can't check right
  now).
      
  Also, there are useless links from the -icon option to [error] and [info].



  Part 1 verified with 8.3.1; part 2 was fixed between 8.1 and 8.3.

  I corrected the Unix dialog implementation to comply with the Windows one (since we can't change the Windows behavior) and updated the documentation.  This fix will go out with 8.4a1.

  - eric

  -- 04/27/2000 ericm


tkt_uuid: 220537ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: tk_messageBox -icon incorrect behavior
comment:
  OriginalBugID: 2219 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '2000-06-26'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 2218 2690
  OS: All
  Machine: X86
  FixedDate: '2000-06-26'
  FixedInVersion: 8.4a2


  Name:
  Christopher Nelson

  ObservedBehavior:
  The help for tk_messageBox says that there isn't an icon if none is
      specified.  At least on Windoze 98, the default icon is info if none is
      specified.



  The documentation has been corrected to state that the default icon is info if none is specified.  This fix will be in 8.4a2.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 06/26/2000 ericm


tkt_uuid: 220538ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Cannot compile on HP-UX 10.20
comment:
  OriginalBugID: 2222 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '1999-10-29'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2221
  OS: HP-UX
  OSVersion: 10.20
  Machine: Other
  FixedDate: '1999-10-29'
  FixedInVersion: 8.2.1


  Name:
  Hank van Bekkem

  ReproducibleScript:
  1. cc: "../generic/../unix/tkUnixPort.h", line 94: warning 525:
         Redeclaration of identifier "fd_mask".
         - Uncomment line 94 of ../unix/tkUnixPort.h
      2. cc: "../generic/tkEvent.c", line 424: error 1705: Function prototypes
         are an ANSI feature.
         - Could only get it to compile by adding compiler option "-Aa" for
           this file.
      3. cc: "../generic/tkSelect.c", line 914: error 1705: Function
         prototypes are an ANSI feature.
         - Could only get it to compile by adding compiler option "-Aa" for
           this file.



  Headers were fixed in 8.2.1, and compiles fine on HP 10.20.
  gcc is recommended, as the default compiler for HP is not ANSI
  compliant (although it will work). 
  -- 10/21/1999 hobbs


tkt_uuid: 220539ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: wish8.1 cannot find tk.tcl
comment:
  OriginalBugID: 2225 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '1999-11-16'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: SunOS
  OSVersion: SunOS amazone 5.5.1 Generic_103640-24 sun4m sparc SUNW,SPARCstat
  Machine: Sparc
  FixedDate: '1999-11-16'
  FixedInVersion: 8.2


  Name: Bert Helthuis

  ReproducibleScript:
  Solaris 2.5, SUN'c C-compiler, sparc, tcl/tk 8.1.1
      
      did (standard)
      ./configure --enable-shared --prefix=/Window/X11/contrib/lib/tk8.1.1
      
      starting wish8.1 gave warning message that tk.tcl could not be found

  ObservedBehavior:
  The paths reported in the search for tk.tcl don't include TK_LIBRARY
      from the Makefile, which in my opinion should be the case.

  DesiredBehavior:
  TK_LIBRARY variable in unix/Makefile is not used in finding tk.tcl,
      although it is used in a -D-define when compiling tkUnixInit.c



  Could not reproduce this problem with 8.2 (it does include
  the prefix in the search path), so this was either fixed,
  or somehow the user's library was mangled (perhaps it picked
  up an older libtcl). 
  -- 11/16/1999 hobbs


tkt_uuid: 220540ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 12. Unix Menus
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Resize window causes X error
comment:
  OriginalBugID: 2244 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-16'
  LastModified: '2000-01-07'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: FreeBSD 2.2.6-RELEASE
  Machine: NA
  FixedDate: '2000-01-07'
  FixedInVersion: 8.3b1


  Name:
  Ken Schmidt

  CustomShell:
  I applied FreeBSD patches that altered "Makefile.in" and "configure" in the unix directory, so that both a shared library and a static library are created.

  Comments:
  This has something to do with the new (tk >= 8.0) menu building features
      under unix.  "33" seems to be the height of the menubar itself (when I
      set the height to 150, the actual height of the window is 183).

      When I run this under Windows, it won't let me resize the window shorter
      than the menu bar, so there's no problem.  I can also set the minsize to
      >0, and there's no problem (my workaround).

  ReproducibleScript:
  #!/usr/local/bin/wish
      menu .mbar -type menubar
      . configure -menu .mbar
      .mbar add cascade -label "File" -underline 0 -menu .mbar.file
      menu .mbar.file -activeborderwidth 1 -borderwidth 1 -tearoff 0
      frame .main -borderwidth 1
      pack .main -side top -fill both -expand yes
      wm geometry . 300x150

      After I run the script above, I resize the Tcl/Tk window to 300x33.

  ObservedBehavior:
  I get the following:

      X Error of failed request:  BadValue (integer parameter out of range for
      operation)  Major opcode of failed request:  12 (X_ConfigureWindow)
        Value in failed request:  0x0
        Serial number of failed request:  127
        Current serial number in output stream:  128

  DesiredBehavior:
  I expected the window to resize properly, not crash.



  Not verifiable with 8.3b1 on Solaris7 - may have been fixed. 
  -- 01/03/2000 hobbs
  This was indeed fixed in 8.3b1 on a related bug.  The panic
  was removed in favor of proper X error surpression for this case. 
  -- 01/07/2000 hobbs


tkt_uuid: 220541ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 75. wish
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: dir hangs tk in Win98
comment:
  OriginalBugID: 2266 Bug
  Version: 8.1
  SubmitDate: '1999-06-21'
  LastModified: '1999-07-01'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: foster
  OS: Windows 98
  Machine: X86
  FixedDate: '1999-06-29'
  FixedInVersion: 8.2b1


  Name:
  Michael F. Ellis

  CustomShell:
  None

  ReproducibleScript:
  ## Put this script in a file.
      ## Run by double-click in Explorer.
      proc hang {} {
      set list [exec command /c dir]
      }
      
      button .hangme -text "Click to hang" -command hang
      pack .hangme

  ObservedBehavior:
  Hangs when button is pushed. Requires CTRL-ALT-DEL to kill process.
      Can get same result by typing "dir" in wish Console.
      No problem in tclsh.
      
      Apologies if this is a well-known problem, but a web search on "Tk win98
      dir" turned up no problem reports.



  Fixed in 8.2b1 (formerly 8.1.2) 
  -- 06/29/1999 redman


tkt_uuid: 220542ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Tcl_Exit() before Tk_Init() --> CRASH!
comment:
  OriginalBugID: 2269 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-21'
  LastModified: '1999-06-30'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: redman
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-06-30'
  FixedInVersion: 8.2b1


  Name:

  Don Porter



  Comments:

  Thanks to Paul Duffin for his advice and assistance.



  ReproducibleScript:

  See previous bug report archived at

      

      <URL: http://www.deja.com/=dnc/getdoc.xp?AN=489983570>



  Patch:

  Index: tkWinWm.c

  ===================================================================

  RCS file: /cvsroot/tk/win/tkWinWm.c,v

  retrieving revision 1.8

  diff -c -r1.8 tkWinWm.c

  *** tkWinWm.c1999/04/16 01:51:541.8

  --- tkWinWm.c1999/06/17 19:39:54

  ***************

  *** 518,524 ****

    TkWinWmCleanup(hInstance)

        HINSTANCE hInstance;

    {

  !     ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 

                Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));

    

        if (!tsdPtr->initialized) {

  --- 518,537 ----

    TkWinWmCleanup(hInstance)

        HINSTANCE hInstance;

    {

  !     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) {



  PatchFiles:

  tkWinWm.c





  Applied the patch. 
  -- 06/30/1999 redman


tkt_uuid: 220543ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.0.4
resolution: Fixed
title: Must click twice on menus of inactive windows
comment:
  OriginalBugID: 2272 Bug
  Version: 8.0.4
  SubmitDate: '1999-06-21'
  LastModified: '2000-04-14'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  FixedDate: '2000-04-14'
  FixedInVersion: 8.3.1


  Name:
  Brian Griffin

  CVS:
  core-8-0-4

  Extensions:
  Tix4.1, [incrTcl]3.0, gdi, printer

  CustomShell:
  Several.  Don't recall exactly which ones.

  Comments:
  This is a bug only for menus and not other Tk widgets because the menu
      is not under Tk's control.  By delaying the window activation, the mouse
      down event gets consumed by Tk and the Menu never sees it.  This can
      also be a problem with any other widgets that are implemented in the
      native form.
      
      The stated reason for delaying the window activation event is so that a
      test for active grabs can be done.  This must be done immediately
      otherwise the native widgets will not work correctly.

  ReproducibleScript:
  # Execute the following in wish
      # Try to select the Test (or Test2) menu in the inactive window
      # The first mouse click will activate the window, but will not activate
      the
      # menu.  The second mouse click will activate the menu.
      # Then try this same experiment with any non-Tk based Windows
      application.
      menu .mbar
      . configure -menu .mbar
      .mbar add cascade -label Test -menu .mbar.test
      menu .mbar.test
      .mbar.test add command -label Echo -command {puts test}
      toplevel .foo
      menu .foo.mbar
      .foo configure -menu .foo.mbar
      .foo.mbar add cascade -label Test2 -menu .foo.mbar.test2
      menu .foo.mbar.test2
      .foo.mbar.test2 add command -label Echo2 -command {puts test2}

  ObservedBehavior:
  This is a Windows only problem:
      Selecting a menu in an inactive Tk toplevel window requires two mouse
      clicks.  This is not the case for any other non-Tk based Windows
      application.

  DesiredBehavior:
  A single mouse click should both activate the window and select the
      menu.

  Patch:
  cvs diff tkWinWm.c      
  Index: tkWinWm.c
  ===================================================================
  RCS file: /cvsroot/tk/win/tkWinWm.c,v
  retrieving revision 1.5
  diff -r1.5 tkWinWm.c
  4007a4008,4012
  >               if (winPtr && (TkGrabState(winPtr) != TK_GRAB_EXCLUDED)) {
  >                       result = DefWindowProc(hwnd, message, wParam, lParam);
  >                       goto done;
  >               }
  > 
  4009,4010c4014,4015
  <            * Don't activate the window yet since there may be grabs
  <            * that should take precedence.  Instead we need to queue
  ---
  >            * Don't activate the window yet since there is a grab
  >            * that takes precedence.  Instead we need to queue

  PatchFiles:
  tkWinWm.c



  Although the patch line indicators point to the WM_CHITTEST
  message, this seems to work correctly when placed in the
  WM_MOUSEACTIVATE switch (which seem logical anyway).  Perhaps
  a blooper based on other changes in the file.

  This has been added for 8.3.1. 
  -- 04/14/2000 hobbs


tkt_uuid: 220544ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: text man page incorrect
comment:
  OriginalBugID: 2277 Bug
  Version: 8.1
  SubmitDate: '1999-06-22'
  LastModified: '2000-01-18'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  Machine: Other
  FixedDate: '2000-01-18'
  FixedInVersion: 8.3


  Name:
  Greg McFarlane

  ReproducibleScript:
  In the description of mark gravity in the text widget man page,
      the following line:
          "position will appear to the right of the mark.  The gravity"
      should be:
          "position will appear to the *left* of the mark.  The gravity"



  Well, that's a spot of the code that definitely needs reading
  twice to understand it.  I've changed it to:

    If a mark has left gravity, then the mark is treated as if it
    were attached to the character on its left, so the mark will
    remain to the left of any text inserted at the mark position.
    If the mark has right gravity, new text inserted at the mark
    position will appear to the left of the mark (so that the mark
    remains rightmost).  The gravity for a mark defaults to \fBright\fR.
   
  -- 01/18/2000 hobbs


tkt_uuid: 220545ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Boo boo in wm help page
comment:
  OriginalBugID: 2284 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-25'
  LastModified: '1999-08-08'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86
  FixedDate: '1999-08-08'
  FixedInVersion: 8.2


  Name:
  Christopher Nelson

  ObservedBehavior:
  The help for [wm positionfrom] says:
      
        If who is specified, it must be either program or user, ... Otherwise
      it 
        returns user or window
      
      I'm confused between "program" and "window".  Is "window" a typo?  It
      would seem to be.



  Fixed in 8.2b3 docs.  The 'window' should be 'program'. 
  -- 08/08/1999 hobbs


tkt_uuid: 220546ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 49. [grid]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: "grid propagate .win 0" incorrect behavior
comment:
  OriginalBugID: 2286 Bug
  Version: 8.1
  SubmitDate: '1999-06-25'
  LastModified: '2000-04-17'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  Machine: X86
  FixedDate: '2000-04-17'
  FixedInVersion: 8.3.1


  Name:
  daniel barrett

  Extensions:
  BLT, IMG

  Comments:
  Since "grid propagate .test 1" works properly, propagation off can be
      guaranteed by proceeding the off command with an on command:
      grid propagate .test 1
      grid propagate .test 0

  ReproducibleScript:
  % frame .test
      .test
      % grid .test
      % grid propagate .test 0
      % grid propagate .test
      0
      % grid propagate .test 0
      % grid propagate .test
      1

  ObservedBehavior:
  The "grid propagate .test 0" acts as a toggle, rather than a switch.  If
      applied to a widget with propagation already off, it will turn it back
      on.
      Turning propagation on with a positive boulean works as expected, as do
      the pack propagate commands.

  DesiredBehavior:
  grid propage .test 0 should always result in propagation off for the
      specified widget (.test).



  Verified in 8.3a1.

  - eric

  -- 01/05/2000 ericm

  There was a some bad logic in the [grid propagate] routine; I corrected this, and the fix will go out with 8.3.1.

  - eric

  -- 04/17/2000 ericm


tkt_uuid: 220547ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 05. Canvas Items
priority: 2
foundin: None
resolution: Fixed
title: Request for "-visible" canvas item option
comment:
  OriginalBugID: 2297 RFE
  Version: 8.1.1
  SubmitDate: '1999-06-28'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  OSVersion: 4.00.951
  Machine: X86
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:
  John Nakulski

  DesiredBehavior:
  It is not possible to hide a canvas item (such as a line or a photo
      image) temporarily.
      My current work-around is to either:
      (a) Move the item off-screen. This is dangerous, because the user might
      scroll to that section of the canvas.
      (b) Delete the item, and store its attributes in a buffer (or to a Tcl
      command string) to later recreate the item.
      I would like a "-visible" option for every canvas item that allows me to
      show/hide canvas items easily:
      # Sample program with requested feature
      canvas .c
      pack .c
      .c create line 0 0 10 10
      .c configure -visible 0 ;# hide the line
      .c configure -visible 1 ;# show the line



  in 8.3b1 (-state hidden for items) 
  -- 12/13/1999 hobbs


tkt_uuid: 220548ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 2
foundin: None
resolution: Fixed
title: Request for 8.2: fix bitmap bug, include dash/img patches!
comment:
  OriginalBugID: 2311 RFE
  Version: 8.0.5
  SubmitDate: '1999-07-01'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: We run on linux, solaris, Mac, Windows, Irix, Digital, etc etc.
  Machine: NA
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:
  Sandy Antunes

  CustomShell:
  Dash patch, Img patch.

  Comments:
  We love Tcl/Tk at NASA!

  DesiredBehavior:
  1) Fix the -stipple bug (where you can specify a bitmap file, but not a
  bitmap data item, because the internal represenation of bitmaps is messed
  up)
  2) Include the dash-patch and img-patch, for gosh sakes... I'm certain Jan
  can deliver them to you quickly, since he generally only lags a day
  or so from the current release, and I don't know anyone who uses an
  unpatched version!



  Item (1) is harder than it sounds because the image mechanism is
  newer than the other stuff and requires extra hooks to make sure
  all the mem is cleaned up that the old style doesn't support.

  We are looking to integrate most/all of dash/img for 8.3. 
  -- 09/18/1999 hobbs
  in 8.3b1 
  -- 12/13/1999 hobbs


tkt_uuid: 220549ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Fixed
title: tk_get{Open|Save}File might fail to restore grab
comment:
  OriginalBugID: 2314 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-01'
  LastModified: '1999-11-12'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: HP-UX
  OSVersion: 10.20
  Machine: Other
  FixedDate: '1999-11-12'
  FixedInVersion: 8.3b1


  Name:

  Frank J. Leitner



  CVS:

  @(#) $Id: tkfbox.tcl,v 1.9 1999/04/16 01:51:27 stanton Exp $



  Comments:

  The problem is that the tcl-only version of tk_getOpenFile and

  tk_getSaveFile

  try to restore the focus and grab that existed prior to calling them. There

  is a catch around the line trying to restore the focus, but not around the

  grab command. You could simply add a catch to the two "grab $oldGrab" and

  "grab -global $oldGrab" line, or apply the above patch.



  Please note that this bug isn't restricted to 8.1(.1), it's propably

  been there since those commands were created. And it is still in the

  CVS version as of July 30.



  ReproducibleScript:

  Two different scripts giving two different error messages:

      

        pack [entry .e]

        grab .e

        after 2000 "destroy .e"; tk_getOpenFile

      

      throws

      

        bad window path name ".e"

      

      and

      

        pack [entry .e]

        grab -global .e; after 2000 "pack forget .e"; tk_getOpenFile

      

      gives

      

        grab failed: window not viewable

      

      Both errors happen when closing the tk_getOpenFile box after

      the entry widget has disappeard.



  ObservedBehavior:

  bad window path name ".e"

          while executing

      "grab $oldGrab"

          (procedure "tk_getOpenFile" line 91)

          invoked from within

      "tk_getOpenFile"

      --------8<---------------8<---------

      grab failed: window not viewable

          while executing

      "grab -global $oldGrab"

          (procedure "tk_getOpenFile" line 89)

          invoked from within

      "tk_getOpenFile"



  Patch:

  *** tkfbox.tcl.orig     Fri Apr 16 03:51:27 1999

  --- tkfbox.tcl  Wed Jun 30 16:42:53 1999

  ***************

  *** 729,736 ****

        catch {focus $oldFocus}

        grab release $w

        wm withdraw $w

  !     if {$oldGrab != ""} {

  !       if {$grabStatus == "global"} {

              grab -global $oldGrab

          } else {

              grab $oldGrab

  --- 729,736 ----

        catch {focus $oldFocus}

        grab release $w

        wm withdraw $w

  !     if {[winfo exists $oldGrab]} {

  !       if {$grabStatus == "global" && [winfo viewable $oldGrab]} {

              grab -global $oldGrab

          } else {

              grab $oldGrab



  PatchFiles:

  library/tkfbox.tcl





  The winfo viewable belongs with the exists.  Fixed. 
  -- 11/12/1999 hobbs


tkt_uuid: 220550ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: System stops with coredump while inserting lines in a text-widget
comment:
  OriginalBugID: 2316 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-01'
  LastModified: '1999-12-16'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1265 2044 2261 2716
  OS: AIX
  OSVersion: AIX 4.3.2
  Machine: RS6000
  FixedDate: '1999-12-16'
  FixedInVersion: 8.3b1


  Name:
  Siegfried Weigl

  Comments:
  This bug was also reported for version tk8.0.4

  ReproducibleScript:
  1. Start Interpreter 'wish'
      2. Type following text:
      % text .t
      .t
      % pack .t
      % .t insert end "Hello world"
      % Segmentation fault(coredump)



  AIX has an outstanding reoccuring problem with the text widget.
  It works for some, but in some magic compiler/version combo
  there seems to be an error.  This might be related to the fact
  that AIX is the only Unix we know that cores on ckalloc(0).
  This must be examined further (it must work for some AIX users,
  otherwise we'd expect more mail...)
  -- 08/20/1999 hobbs
  This turns out to be a bug in the IBM compiler (not noted for
  being the best).  The fix is to remove -O (optimization) from
  the CFLAGS.  This will be the default for 8.3, and we are
  also going to try and get the gcc options working properly. 
  -- 12/16/1999 hobbs


tkt_uuid: 220551ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 42. Photo Image|GIF
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: GIF that freezes Tk
comment:
  OriginalBugID: 2327 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-06'
  LastModified: '1999-12-14'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: NetBSD-1.4/i386
  Machine: NA
  FixedDate: '1999-12-14'
  FixedInVersion: 8.2.2


  Name:
  Hume Smith

  ObservedBehavior:
  The image at http://www.FurNation.com/bucky/yarr/menu/Ky-butts.gif
      causes my Tk to freeze.  GIMP and giftopnm can handle it.

  DesiredBehavior:
  No image should be able to freeze the image system.



  This does not freeze 8.2.2 on Solaris of NT.  It does take about
  8 seconds to load in, but it doesn't freeze. 
  -- 12/14/1999 hobbs


tkt_uuid: 220552ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 34. [tk_chooseColor]
priority: 2
foundin: obsolete: 8.3
resolution: Fixed
title: parent of tk_chooseColor Dialog Box
comment:
  OriginalBugID: 2334 Bug
  Version: 8.0p2
  SubmitDate: '1999-07-07'
  LastModified: '2000-03-01'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All Unix
  FixedDate: '2000-03-01'
  FixedInVersion: 8.3.1


  Name:

  Didier Willam



  ReproducibleScript:

  # ... start wish on screen: tgv4:0.0

      toplevel .test -screen tgv4:0.1

      tk_chooseColor -parent .test

      

      and the Color Dialog Box appears on screen tgv4:0.0. It should appear on

      tgv4:0.1.



  ObservedBehavior:

  The sceen of the child window is wrong!



  DesiredBehavior:

  To see the window on the right screen.



  Patch:

  *** clrpick.tcl.old     Mon Jul  5 15:01:11 1999

  --- clrpick.tcl Mon Jul  5 14:59:31 1999

  ***************

  *** 25,33 ****

    #

    proc tkColorDialog {args} {

        global tkPriv

  !     set w .__tk__color

        upvar #0 $w data

   

        # The lines variables track the start and end indices of the line

        # elements in the colorbar canvases.

        set data(lines,red,start)   0

  --- 25,45 ----

    #

    proc tkColorDialog {args} {

        global tkPriv

  !

  !     set w tkPrivMsgBox

        upvar #0 $w data

   

  +     # Parse args to obtain the parent window

  +     tkColorDialog_Config $w $args

  +

  +     # Set the correct window path

  +     if [string compare $data(-parent) .] {

  +       set w $data(-parent).__tk__messagebox

  +     } else {

  +       set w .__tk__messagebox

  +     }

  +     upvar #0 $w data

  +

        # The lines variables track the start and end indices of the line

        # elements in the colorbar canvases.

        set data(lines,red,start)   0



  PatchFiles:

  lib/tk8.0/clrpick.tcl





  As you noted, the choose color dialog was not picking up the screen setting from its parent.  I fixed the problem slightly differently than you did, by having the dialog instead query its parent for a screen value, and creating the dialog with that value for its screen.  If the dialog has already been created, it will test for equivalence between the dialog's screen and the parent's screen, destroying and recreating the dialog if they are different.
  This cuts down on the proliferation of toplevels that would be seen with the patch you submitted, although it will cause a destroy/recreate every time you bring the dialog up on an alternate screen.  However, that should not happen so frequently that it becomes a problem.

  This fix will go out with 8.3.1.

  - eric

  -- 03/01/2000 ericm


tkt_uuid: 220553ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Implementation of XWarpPointer for Windows
comment:
  OriginalBugID: 2340 RFE
  Version: 8.1.1
  SubmitDate: '1999-07-07'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:

  Jan Nijtmans



  CVS:

  Juli 2, 1999



  DesiredBehavior:

  This function allows extensions to warp the

      mouse pointer in the same way as X does it.

      I know it is not recommended to do that in

      general user interfaces, but for things like

      playback it is the common thing to do.



  Patch:

  *** generic/tkInt.decls.origTue Jul  6 21:23:07 1999

  --- generic/tkInt.declsTue Jul  6 21:37:38 1999

  ***************

  *** 1505,1510 ****

        void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \

        int x2, int y2)

    }

    

    # X functions for Mac

    

  --- 1505,1514 ----

        void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \

        int x2, int y2)

    }

  + declare 105 win {

  +     void XWarpPointer (Display* d, Window dw, int sx, int sy, \

  +     unsigned int sw, unsigned int sh, int dx, int dy)

  + }

    

    # X functions for Mac

    

  *** win/tkWinPointer.c.origTue Jul  6 21:23:27 1999

  --- win/tkWinPointer.cTue Jul  6 21:24:13 1999

  ***************

  *** 331,336 ****

  --- 331,372 ----

        *mask_return = TkWinGetModifierState();

        return True;

    }

  + 

  + /*

  +  *----------------------------------------------------------------------

  +  *

  +  * XWarpPointer --

  +  *

  +  *Move pointer to new location.  This is not a complete

  +  *implementation of this function.

  +  *

  +  * Results:

  +  *None.

  +  *

  +  * Side effects:

  +  *Mouse pointer changes position on screen.

  +  *

  +  *----------------------------------------------------------------------

  +  */

  + 

  + void

  + XWarpPointer(display, src_w, dest_w, src_x, src_y, src_width,

  + src_height, dest_x, dest_y)

  +     Display* display;

  +     Window src_w;

  +     Window dest_w;

  +     int src_x;

  +     int src_y;

  +     unsigned int src_width;

  +     unsigned int src_height;

  +     int dest_x;

  +     int dest_y;

  + {

  +     RECT r;

  + 

  +     GetWindowRect(Tk_GetHWND(dest_w), &r);

  +     SetCursorPos(r.left+dest_x, r.top+dest_y);    

  + }

    

    /*

     *----------------------------------------------------------------------



  PatchFiles:

  tkInt.decls tkWinPointer.c





  in 8.3b1 
  -- 12/13/1999 hobbs


tkt_uuid: 220554ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 2
foundin: None
resolution: Fixed
title: Maintainance improvement for Objectified commands
comment:
  OriginalBugID: 2348 RFE
  Version: 8.1.1
  SubmitDate: '1999-07-16'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  Machine: NA
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:

  Jan Nijtmans


  CVS:

  juli 2, 1999


  DesiredBehavior:

  Currently, the 'objectification' of widgets not only requires the use of

      Tcl_Obj's in stead of strings, but also that the newer option database

      functions are used in stead of the older ones. This is a high burden in

      the process of converting all widgets to use Tcl_Objs. The following

      patch (tk.h, tkOldConfig.c) adds the flag TK_CONFIG_OBJS to the

      Tk_ConfigureWidget() function, which makes it usable with Tcl_Obj's

      as well.


      The remainder of the patch is a demonstration of this new feature:

      the objectification of the "frame" and "toplevel" commands while

      still using the old option functions (using the TK_CONFIG_OBJS flag).

      At the same time it is a thorough test, because the "frame" and

      "toplevel" commands are still expected to work exactly as before.

      Only they are speeded up because many string-object conversions are

      saved. Later, the switch can be made to the new option functions,

      thereby gaining an even greater speed-up.


      This feature is used by the dash-patch, in order to make it easier

      to track down changes in the Scriptics' source code. The value of

      TK_CONFIG_OBJS is carefully chosen not to conflict with any other

      flags. In time this code will disappear, but at least it will make

      life easier (and Tk run faster) until then.


      Finally, the submitted patch adapts the documentation as well

      (ConfigWidg.3).


  Patch:

  *** generic/tk.h.origWed Jul  7 19:46:46 1999

  --- generic/tk.hWed Jul  7 19:47:40 1999

  ***************

  *** 347,352 ****

  --- 347,353 ----

     */


    #define TK_CONFIG_ARGV_ONLY1

  + #define TK_CONFIG_OBJS0x80


    /*

     * Possible flag values for Tk_ConfigSpec structures.  Any bits at

  *** generic/tkOldConfig.c.origWed Jul  7 19:46:51 1999

  --- generic/tkOldConfig.cWed Jul  7 19:47:40 1999

  ***************

  *** 125,131 ****

         */


        for ( ; argc > 0; argc -= 2, argv += 2) {

  ! specPtr = FindConfigSpec(interp, specs, *argv, needFlags, hateFlags);

    if (specPtr == NULL) {

        return TCL_ERROR;

    }

  --- 125,138 ----

         */


        for ( ; argc > 0; argc -= 2, argv += 2) {

  ! char *arg;

  ! 

  ! if (flags & TK_CONFIG_OBJS) {

  !     arg = Tcl_GetString((Tcl_Obj *) *argv);

  ! } else {

  !     arg = *argv;

  ! }

  ! specPtr = FindConfigSpec(interp, specs, arg, needFlags, hateFlags);

    if (specPtr == NULL) {

        return TCL_ERROR;

    }

  ***************

  *** 135,145 ****

     */


    if (argc < 2) {

  !     Tcl_AppendResult(interp, "value for \"", *argv,

        "\" missing", (char *) NULL);

        return TCL_ERROR;

    }

  ! if (DoConfig(interp, tkwin, specPtr, argv[1], 0, widgRec) != TCL_OK) {

        char msg[100];


        sprintf(msg, "\n    (processing \"%.40s\" option)",

  --- 142,157 ----

     */


    if (argc < 2) {

  !     Tcl_AppendResult(interp, "value for \"", arg,

        "\" missing", (char *) NULL);

        return TCL_ERROR;

    }

  ! if (flags & TK_CONFIG_OBJS) {

  !     arg = Tcl_GetString((Tcl_Obj *) argv[1]);

  ! } else {

  !     arg = argv[1];

  ! }

  ! if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) {

        char msg[100];


        sprintf(msg, "\n    (processing \"%.40s\" option)",

  *** generic/tkFrame.c.origWed Jul  7 20:08:35 1999

  --- generic/tkFrame.cWed Jul  7 21:11:31 1999

  ***************

  *** 167,173 ****

     */


    static intConfigureFrame _ANSI_ARGS_((Tcl_Interp *interp,

  !     Frame *framePtr, int argc, char **argv,

        int flags));

    static voidDestroyFrame _ANSI_ARGS_((char *memPtr));

    static voidDisplayFrame _ANSI_ARGS_((ClientData clientData));

  --- 167,173 ----

     */


    static intConfigureFrame _ANSI_ARGS_((Tcl_Interp *interp,

  !     Frame *framePtr, int objc, Tcl_Obj *CONST objv[],

        int flags));

    static voidDestroyFrame _ANSI_ARGS_((char *memPtr));

    static voidDisplayFrame _ANSI_ARGS_((ClientData clientData));

  ***************

  *** 175,188 ****

        ClientData clientData));

    static voidFrameEventProc _ANSI_ARGS_((ClientData clientData,

        XEvent *eventPtr));

  ! static intFrameWidgetCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int argc, char **argv));

    static voidMapFrame _ANSI_ARGS_((ClientData clientData));

    

    /*

     *--------------------------------------------------------------

     *

  !  * Tk_FrameCmd, Tk_ToplevelCmd --

     *

     *These procedures are invoked to process the "frame" and

     *"toplevel" Tcl commands.  See the user documentation for

  --- 175,188 ----

        ClientData clientData));

    static voidFrameEventProc _ANSI_ARGS_((ClientData clientData,

        XEvent *eventPtr));

  ! static intFrameWidgetObjCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));

    static voidMapFrame _ANSI_ARGS_((ClientData clientData));

    

    /*

     *--------------------------------------------------------------

     *

  !  * Tk_FrameObjCmd, Tk_ToplevelObjCmd --

     *

     *These procedures are invoked to process the "frame" and

     *"toplevel" Tcl commands.  See the user documentation for

  ***************

  *** 199,223 ****

     */


    int

  ! Tk_FrameCmd(clientData, interp, argc, argv)

        ClientData clientData;/* Main window associated with

     * interpreter. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings. */

    {

  !     return TkCreateFrame(clientData, interp, argc, argv, 0, (char *) NULL);

    }


    int

  ! Tk_ToplevelCmd(clientData, interp, argc, argv)

        ClientData clientData;/* Main window associated with

     * interpreter. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings. */

    {

  !     return TkCreateFrame(clientData, interp, argc, argv, 1, (char *) NULL);

    }

    

    /*

  --- 199,223 ----

     */


    int

  ! Tk_FrameObjCmd(clientData, interp, objc, objv)

        ClientData clientData;/* Main window associated with

     * interpreter. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int objc;/* Number of arguments. */

  !     Tcl_Obj *CONST objv[];/* Argument objects. */

    {

  !     return TkCreateFrame(clientData, interp, objc, objv, 0, (char *) NULL);

    }


    int

  ! Tk_ToplevelObjCmd(clientData, interp, objc, objv)

        ClientData clientData;/* Main window associated with

     * interpreter. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int objc;/* Number of arguments. */

  !     Tcl_Obj *CONST objv[];/* Argument objects. */

    {

  !     return TkCreateFrame(clientData, interp, objc, objv, 1, (char *) NULL);

    }

    

    /*

  ***************

  *** 240,252 ****

     */


    int

  ! TkCreateFrame(clientData, interp, argc, argv, toplevel, appName)

        ClientData clientData;/* Main window associated with interpreter.

     * If we're called by Tk_Init to create a

     * new application, then this is NULL. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings. */

        int toplevel;/* Non-zero means create a toplevel window,

     * zero means create a frame. */

        char *appName;/* Should only be non-NULL if clientData is

  --- 240,252 ----

     */


    int

  ! TkCreateFrame(clientData, interp, objc, objv, toplevel, appName)

        ClientData clientData;/* Main window associated with interpreter.

     * If we're called by Tk_Init to create a

     * new application, then this is NULL. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int objc;/* Number of arguments. */

  !     Tcl_Obj *CONST objv[];/* Argument objects. */

        int toplevel;/* Non-zero means create a toplevel window,

     * zero means create a frame. */

        char *appName;/* Should only be non-NULL if clientData is

  ***************

  *** 262,270 ****

        Colormap colormap;

        Visual *visual;


  !     if (argc < 2) {

  ! Tcl_AppendResult(interp, "wrong # args: should be \"",

  ! argv[0], " pathName ?options?\"", (char *) NULL);

    return TCL_ERROR;

        }


  --- 262,269 ----

        Colormap colormap;

        Visual *visual;


  !     if (objc < 2) {

  ! Tcl_WrongNumArgs(interp, 1, objv, "pathName ?options?");

    return TCL_ERROR;

        }


  ***************

  *** 277,304 ****


        className = colormapName = screenName = visualName = useOption = NULL;

        colormap = None;

  !     for (i = 2; i < argc; i += 2) {

  ! arg = argv[i];

  ! length = strlen(arg);

    if (length < 2) {

        continue;

    }

    c = arg[1];

  ! if ((c == 'c') && (strncmp(arg, "-class", strlen(arg)) == 0)

    && (length >= 3)) {

  !     className = argv[i+1];

    } else if ((c == 'c')

  ! && (strncmp(arg, "-colormap", strlen(arg)) == 0)) {

  !     colormapName = argv[i+1];

    } else if ((c == 's') && toplevel

  ! && (strncmp(arg, "-screen", strlen(arg)) == 0)) {

  !     screenName = argv[i+1];

    } else if ((c == 'u') && toplevel

  ! && (strncmp(arg, "-use", strlen(arg)) == 0)) {

  !     useOption = argv[i+1];

    } else if ((c == 'v')

  ! && (strncmp(arg, "-visual", strlen(arg)) == 0)) {

  !     visualName = argv[i+1];

    }

        }


  --- 276,302 ----


        className = colormapName = screenName = visualName = useOption = NULL;

        colormap = None;

  !     for (i = 2; i < objc; i += 2) {

  ! arg = Tcl_GetStringFromObj(objv[i], &length);

    if (length < 2) {

        continue;

    }

    c = arg[1];

  ! if ((c == 'c') && (strncmp(arg, "-class", length) == 0)

    && (length >= 3)) {

  !     className = Tcl_GetString(objv[i+1]);

    } else if ((c == 'c')

  ! && (strncmp(arg, "-colormap", length) == 0)) {

  !     colormapName = Tcl_GetString(objv[i+1]);

    } else if ((c == 's') && toplevel

  ! && (strncmp(arg, "-screen", length) == 0)) {

  !     screenName = Tcl_GetString(objv[i+1]);

    } else if ((c == 'u') && toplevel

  ! && (strncmp(arg, "-use", length) == 0)) {

  !     useOption = Tcl_GetString(objv[i+1]);

    } else if ((c == 'v')

  ! && (strncmp(arg, "-visual", length) == 0)) {

  !     visualName = Tcl_GetString(objv[i+1]);

    }

        }


  ***************

  *** 321,327 ****

    screenName = (toplevel) ? "" : NULL;

        }

        if (tkwin != NULL) {

  ! new = Tk_CreateWindowFromPath(interp, tkwin, argv[1], screenName);

        } else {

    /*

     * We were called from Tk_Init;  create a new application.

  --- 319,325 ----

    screenName = (toplevel) ? "" : NULL;

        }

        if (tkwin != NULL) {

  ! new = Tk_CreateWindowFromPath(interp, tkwin, Tcl_GetString(objv[1]), screenName);

        } else {

    /*

     * We were called from Tk_Init;  create a new application.

  ***************

  *** 392,399 ****

        framePtr->tkwin = new;

        framePtr->display = Tk_Display(new);

        framePtr->interp = interp;

  !     framePtr->widgetCmd = Tcl_CreateCommand(interp,

  !     Tk_PathName(new), FrameWidgetCmd,

        (ClientData) framePtr, FrameCmdDeletedProc);

        framePtr->className = NULL;

        framePtr->mask = (toplevel) ? TOPLEVEL : FRAME;

  --- 390,397 ----

        framePtr->tkwin = new;

        framePtr->display = Tk_Display(new);

        framePtr->interp = interp;

  !     framePtr->widgetCmd = Tcl_CreateObjCommand(interp,

  !     Tk_PathName(new), FrameWidgetObjCmd,

        (ClientData) framePtr, FrameCmdDeletedProc);

        framePtr->className = NULL;

        framePtr->mask = (toplevel) ? TOPLEVEL : FRAME;

  ***************

  *** 426,432 ****

            mask |= ActivateMask;

        }

        Tk_CreateEventHandler(new, mask, FrameEventProc, (ClientData) framePtr);

  !     if (ConfigureFrame(interp, framePtr, argc-2, argv+2, 0) != TCL_OK) {

    goto error;

        }

        if ((framePtr->isContainer)) {

  --- 424,430 ----

            mask |= ActivateMask;

        }

        Tk_CreateEventHandler(new, mask, FrameEventProc, (ClientData) framePtr);

  !     if (ConfigureFrame(interp, framePtr, objc-2, objv+2, 0) != TCL_OK) {

    goto error;

        }

        if ((framePtr->isContainer)) {

  ***************

  *** 454,460 ****

    /*

     *--------------------------------------------------------------

     *

  !  * FrameWidgetCmd --

     *

     *This procedure is invoked to process the Tcl command

     *that corresponds to a frame widget.  See the user

  --- 452,458 ----

    /*

     *--------------------------------------------------------------

     *

  !  * FrameWidgetObjCmd --

     *

     *This procedure is invoked to process the Tcl command

     *that corresponds to a frame widget.  See the user

  ***************

  *** 470,552 ****

     */


    static int

  ! FrameWidgetCmd(clientData, interp, argc, argv)

        ClientData clientData;/* Information about frame widget. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings. */

    {

        register Frame *framePtr = (Frame *) clientData;

  !     int result;

        size_t length;

        int c, i;


  !     if (argc < 2) {

  ! Tcl_AppendResult(interp, "wrong # args: should be \"",

  ! argv[0], " option ?arg arg ...?\"", (char *) NULL);

    return TCL_ERROR;

        }

        Tcl_Preserve((ClientData) framePtr);

  !     c = argv[1][0];

  !     length = strlen(argv[1]);

  !     if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)

  !     && (length >= 2)) {

  ! if (argc != 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"",

  !     argv[0], " cget option\"",

  !     (char *) NULL);

        result = TCL_ERROR;

        goto done;

    }

    result = Tk_ConfigureValue(interp, framePtr->tkwin, configSpecs,

  ! (char *) framePtr, argv[2], framePtr->mask);

  !     } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)

  !     && (length >= 2)) {

  ! if (argc == 2) {

        result = Tk_ConfigureInfo(interp, framePtr->tkwin, configSpecs,

        (char *) framePtr, (char *) NULL, framePtr->mask);

  ! } else if (argc == 3) {

        result = Tk_ConfigureInfo(interp, framePtr->tkwin, configSpecs,

  !     (char *) framePtr, argv[2], framePtr->mask);

    } else {

        /*

         * Don't allow the options -class, -colormap, -container,

         * -newcmap, -screen, -use, or -visual to be changed.

         */


  !     for (i = 2; i < argc; i++) {

  ! length = strlen(argv[i]);

    if (length < 2) {

        continue;

    }

  ! c = argv[i][1];

  ! if (((c == 'c') && (strncmp(argv[i], "-class", length) == 0)

    && (length >= 2))

    || ((c == 'c') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(argv[i], "-colormap", length) == 0)

    && (length >= 3))

    || ((c == 'c')

  ! && (strncmp(argv[i], "-container", length) == 0)

    && (length >= 3))

    || ((c == 's') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(argv[i], "-screen", length) == 0))

    || ((c == 'u') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(argv[i], "-use", length) == 0))

    || ((c == 'v') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(argv[i], "-visual", length) == 0))) {

  !     Tcl_AppendResult(interp, "can't modify ", argv[i],

        " option after widget is created", (char *) NULL);

        result = TCL_ERROR;

        goto done;

    }

        }

  !     result = ConfigureFrame(interp, framePtr, argc-2, argv+2,

        TK_CONFIG_ARGV_ONLY);

    }

  !     } else {

  ! Tcl_AppendResult(interp, "bad option \"", argv[1],

  ! "\": must be cget or configure", (char *) NULL);

  ! result = TCL_ERROR;

        }


        done:

  --- 468,554 ----

     */


    static int

  ! FrameWidgetObjCmd(clientData, interp, objc, objv)

        ClientData clientData;/* Information about frame widget. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int objc;/* Number of arguments. */

  !     Tcl_Obj *CONST objv[];/* Argument objects. */

    {

  +     static char *frameOptions[] = {

  + "cget", "configure", (char *) NULL

  +     };

  +     enum options {

  + FRAME_CGET, FRAME_CONFIGURE

  +     };

        register Frame *framePtr = (Frame *) clientData;

  !     int result = TCL_OK, index;

        size_t length;

        int c, i;


  !     if (objc < 2) {

  ! Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?");

  ! return TCL_ERROR;

  !     }

  !     if (Tcl_GetIndexFromObj(interp, objv[1], frameOptions, "option", 0,

  !     &index) != TCL_OK) {

    return TCL_ERROR;

        }

        Tcl_Preserve((ClientData) framePtr);

  !     switch ((enum options) index) {

  !       case FRAME_CGET: {

  ! if (objc != 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "option");

        result = TCL_ERROR;

        goto done;

    }

    result = Tk_ConfigureValue(interp, framePtr->tkwin, configSpecs,

  ! (char *) framePtr, Tcl_GetString(objv[2]), framePtr->mask);

  ! break;

  !       }

  !       case FRAME_CONFIGURE: {

  ! if (objc == 2) {

        result = Tk_ConfigureInfo(interp, framePtr->tkwin, configSpecs,

        (char *) framePtr, (char *) NULL, framePtr->mask);

  ! } else if (objc == 3) {

        result = Tk_ConfigureInfo(interp, framePtr->tkwin, configSpecs,

  !     (char *) framePtr, Tcl_GetString(objv[2]), framePtr->mask);

    } else {

        /*

         * Don't allow the options -class, -colormap, -container,

         * -newcmap, -screen, -use, or -visual to be changed.

         */


  !     for (i = 2; i < objc; i++) {

  ! char *arg = Tcl_GetStringFromObj(objv[i], &length);

    if (length < 2) {

        continue;

    }

  ! c = arg[1];

  ! if (((c == 'c') && (strncmp(arg, "-class", length) == 0)

    && (length >= 2))

    || ((c == 'c') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(arg, "-colormap", length) == 0)

    && (length >= 3))

    || ((c == 'c')

  ! && (strncmp(arg, "-container", length) == 0)

    && (length >= 3))

    || ((c == 's') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(arg, "-screen", length) == 0))

    || ((c == 'u') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(arg, "-use", length) == 0))

    || ((c == 'v') && (framePtr->mask == TOPLEVEL)

  ! && (strncmp(arg, "-visual", length) == 0))) {

  !     Tcl_AppendResult(interp, "can't modify ", arg,

        " option after widget is created", (char *) NULL);

        result = TCL_ERROR;

        goto done;

    }

        }

  !     result = ConfigureFrame(interp, framePtr, objc-2, objv+2,

        TK_CONFIG_ARGV_ONLY);

    }

  ! break;

  !       }

        }


        done:

  ***************

  *** 591,597 ****

     *

     * ConfigureFrame --

     *

  !  *This procedure is called to process an argv/argc list, plus

     *the Tk option database, in order to configure (or

     *reconfigure) a frame widget.

     *

  --- 593,599 ----

     *

     * ConfigureFrame --

     *

  !  *This procedure is called to process an objv/objc list, plus

     *the Tk option database, in order to configure (or

     *reconfigure) a frame widget.

     *

  ***************

  *** 608,619 ****

     */


    static int

  ! ConfigureFrame(interp, framePtr, argc, argv, flags)

        Tcl_Interp *interp;/* Used for error reporting. */

        register Frame *framePtr;/* Information about widget;  may or may

     * not already have values for some fields. */

  !     int argc;/* Number of valid entries in argv. */

  !     char **argv;/* Arguments. */

        int flags;/* Flags to pass to Tk_ConfigureWidget. */

    {

        char *oldMenuName;

  --- 610,621 ----

     */


    static int

  ! ConfigureFrame(interp, framePtr, objc, objv, flags)

        Tcl_Interp *interp;/* Used for error reporting. */

        register Frame *framePtr;/* Information about widget;  may or may

     * not already have values for some fields. */

  !     int objc;/* Number of valid entries in objv. */

  !     Tcl_Obj *CONST objv[];/* Arguments. */

        int flags;/* Flags to pass to Tk_ConfigureWidget. */

    {

        char *oldMenuName;

  ***************

  *** 630,636 ****

        }


        if (Tk_ConfigureWidget(interp, framePtr->tkwin, configSpecs,

  !     argc, argv, (char *) framePtr, flags | framePtr->mask) != TCL_OK) {

    return TCL_ERROR;

        }


  --- 632,639 ----

        }


        if (Tk_ConfigureWidget(interp, framePtr->tkwin, configSpecs,

  !     objc, (char **) objv, (char *) framePtr,

  !     flags | framePtr->mask | TK_CONFIG_OBJS) != TCL_OK) {

    return TCL_ERROR;

        }


  *** generic/tkInt.decls.origWed Jul  7 20:41:28 1999

  --- generic/tkInt.declsWed Jul  7 20:42:49 1999

  ***************

  *** 86,92 ****


    declare 13 generic {

        int TkCreateFrame (ClientData clientData, \

  !     Tcl_Interp *interp, int argc, char **argv, \

        int toplevel, char *appName)

    }


  --- 86,92 ----


    declare 13 generic {

        int TkCreateFrame (ClientData clientData, \

  !     Tcl_Interp *interp, int objc, Tcl_Obj *CONST argv[], \

        int toplevel, char *appName)

    }


  *** generic/tkInt.h.origWed Jul  7 20:43:15 1999

  --- generic/tkInt.hWed Jul  7 20:44:25 1999

  ***************

  *** 909,916 ****

        Tcl_Obj *CONST objv[]));

    EXTERN intTk_FileeventCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

  ! EXTERN intTk_FrameCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int argc, char **argv));

    EXTERN intTk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int objc, 

        Tcl_Obj *CONST objv[]));

  --- 909,917 ----

        Tcl_Obj *CONST objv[]));

    EXTERN intTk_FileeventCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

  ! EXTERN intTk_FrameObjCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int objc,

  !     Tcl_Obj *CONST objv[]));

    EXTERN intTk_FocusObjCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int objc, 

        Tcl_Obj *CONST objv[]));

  ***************

  *** 974,981 ****

        Tcl_Obj *CONST objv[]));

    EXTERN intTk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

  ! EXTERN intTk_ToplevelCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int argc, char **argv));

    EXTERN intTk_UpdateObjCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int objc, 

        Tcl_Obj *CONST objv[]));

  --- 975,983 ----

        Tcl_Obj *CONST objv[]));

    EXTERN intTk_TkwaitCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

  ! EXTERN intTk_ToplevelObjCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int objc,

  !     Tcl_Obj *CONST objv[]));

    EXTERN intTk_UpdateObjCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int objc, 

        Tcl_Obj *CONST objv[]));

  *** generic/tkIntDecls.h.origWed Jul  7 20:41:56 1999

  --- generic/tkIntDecls.hWed Jul  7 20:57:04 1999

  ***************

  *** 82,89 ****

    XColor bg));

    /* 13 */

    EXTERN intTkCreateFrame _ANSI_ARGS_((ClientData clientData, 

  ! Tcl_Interp * interp, int argc, char ** argv, 

  ! int toplevel, char * appName));

    /* 14 */

    EXTERN Tk_WindowTkCreateMainWindow _ANSI_ARGS_((Tcl_Interp * interp, 

    char * screenName, char * baseName));

  --- 82,90 ----

    XColor bg));

    /* 13 */

    EXTERN intTkCreateFrame _ANSI_ARGS_((ClientData clientData, 

  ! Tcl_Interp * interp, int objc, 

  ! Tcl_Obj *CONST argv[], int toplevel, 

  ! char * appName));

    /* 14 */

    EXTERN Tk_WindowTkCreateMainWindow _ANSI_ARGS_((Tcl_Interp * interp, 

    char * screenName, char * baseName));

  ***************

  *** 517,523 ****

        int (*tkCopyAndGlobalEval) _ANSI_ARGS_((Tcl_Interp * interp, char * script)); /* 10 */

        unsigned long (*tkCreateBindingProcedure) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventString, TkBindEvalProc * evalProc, TkBindFreeProc * freeProc, ClientData clientData)); /* 11 */

        TkCursor * (*tkCreateCursorFromData) _ANSI_ARGS_((Tk_Window tkwin, char * source, char * mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg)); /* 12 */

  !     int (*tkCreateFrame) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int argc, char ** argv, int toplevel, char * appName)); /* 13 */

        Tk_Window (*tkCreateMainWindow) _ANSI_ARGS_((Tcl_Interp * interp, char * screenName, char * baseName)); /* 14 */

        Time (*tkCurrentTime) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 15 */

        void (*tkDeleteAllImages) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 16 */

  --- 518,524 ----

        int (*tkCopyAndGlobalEval) _ANSI_ARGS_((Tcl_Interp * interp, char * script)); /* 10 */

        unsigned long (*tkCreateBindingProcedure) _ANSI_ARGS_((Tcl_Interp * interp, Tk_BindingTable bindingTable, ClientData object, char * eventString, TkBindEvalProc * evalProc, TkBindFreeProc * freeProc, ClientData clientData)); /* 11 */

        TkCursor * (*tkCreateCursorFromData) _ANSI_ARGS_((Tk_Window tkwin, char * source, char * mask, int width, int height, int xHot, int yHot, XColor fg, XColor bg)); /* 12 */

  !     int (*tkCreateFrame) _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp, int objc, Tcl_Obj *CONST argv[], int toplevel, char * appName)); /* 13 */

        Tk_Window (*tkCreateMainWindow) _ANSI_ARGS_((Tcl_Interp * interp, char * screenName, char * baseName)); /* 14 */

        Time (*tkCurrentTime) _ANSI_ARGS_((TkDisplay * dispPtr)); /* 15 */

        void (*tkDeleteAllImages) _ANSI_ARGS_((TkMainInfo * mainPtr)); /* 16 */

  *** generic/tkWindow.c.origWed Jul  7 20:45:36 1999

  --- generic/tkWindow.cWed Jul  7 21:05:50 1999

  ***************

  *** 137,143 ****

        {"canvas",Tk_CanvasCmd,NULL,1, 1},

        {"checkbutton",NULL,Tk_CheckbuttonObjCmd,1, 0},

        {"entry",NULL,                   Tk_EntryObjCmd,1, 0},

  !     {"frame",Tk_FrameCmd,NULL,1, 1},

        {"label",NULL,Tk_LabelObjCmd,1, 0},

        {"listbox",Tk_ListboxCmd,NULL,1, 1},

        {"menubutton",NULL,                   Tk_MenubuttonObjCmd,1, 0},

  --- 137,143 ----

        {"canvas",Tk_CanvasCmd,NULL,1, 1},

        {"checkbutton",NULL,Tk_CheckbuttonObjCmd,1, 0},

        {"entry",NULL,                   Tk_EntryObjCmd,1, 0},

  !     {"frame",NULL,Tk_FrameObjCmd,1, 1},

        {"label",NULL,Tk_LabelObjCmd,1, 0},

        {"listbox",Tk_ListboxCmd,NULL,1, 1},

        {"menubutton",NULL,                   Tk_MenubuttonObjCmd,1, 0},

  ***************

  *** 146,152 ****

        {"scale",NULL,                Tk_ScaleObjCmd,1, 0},

        {"scrollbar",Tk_ScrollbarCmd,NULL,1, 1},

        {"text",Tk_TextCmd,NULL,1, 1},

  !     {"toplevel",Tk_ToplevelCmd,NULL,0, 1},


        /*

         * Misc.

  --- 146,152 ----

        {"scale",NULL,                Tk_ScaleObjCmd,1, 0},

        {"scrollbar",Tk_ScrollbarCmd,NULL,1, 1},

        {"text",Tk_TextCmd,NULL,1, 1},

  !     {"toplevel",NULL,Tk_ToplevelObjCmd,0, 1},


        /*

         * Misc.

  ***************

  *** 2705,2711 ****

    {

        char *p;

        int argc, code;

  !     char **argv, *args[20];

        Tcl_DString class;

        ThreadSpecificData *tsdPtr;


  --- 2705,2712 ----

    {

        char *p;

        int argc, code;

  !     char **argv;

  !     Tcl_Obj *args[20];

        Tcl_DString class;

        ThreadSpecificData *tsdPtr;


  ***************

  *** 2870,2883 ****

         * using the information parsed from argv, if any.

         */


  !     args[0] = "toplevel";

  !     args[1] = ".";

  !     args[2] = "-class";

  !     args[3] = Tcl_DStringValue(&class);

        argc = 4;

        if (display != NULL) {

  ! args[argc] = "-screen";

  ! args[argc+1] = display;

    argc += 2;


    /*

  --- 2871,2884 ----

         * using the information parsed from argv, if any.

         */


  !     args[0] = Tcl_NewStringObj("toplevel", -1);

  !     args[1] = Tcl_NewStringObj(".", -1);

  !     args[2] = Tcl_NewStringObj("-class", -1);

  !     args[3] = Tcl_NewStringObj(Tcl_DStringValue(&class), -1);

        argc = 4;

        if (display != NULL) {

  ! args[argc] = Tcl_NewStringObj("-screen", -1);

  ! args[argc+1] = Tcl_NewStringObj(display, -1);

    argc += 2;


    /*

  ***************

  *** 2891,2910 ****

    }

        }

        if (colormap != NULL) {

  ! args[argc] = "-colormap";

  ! args[argc+1] = colormap;

    argc += 2;

            colormap = NULL;

        }

        if (use != NULL) {

  ! args[argc] = "-use";

  ! args[argc+1] = use;

    argc += 2;

            use = NULL;

        }

        if (visual != NULL) {

  ! args[argc] = "-visual";

  ! args[argc+1] = visual;

    argc += 2;

            visual = NULL;

        }

  --- 2892,2911 ----

    }

        }

        if (colormap != NULL) {

  ! args[argc] = Tcl_NewStringObj("-colormap", -1);

  ! args[argc+1] = Tcl_NewStringObj(colormap, -1);

    argc += 2;

            colormap = NULL;

        }

        if (use != NULL) {

  ! args[argc] = Tcl_NewStringObj("-use", -1);

  ! args[argc+1] = Tcl_NewStringObj(use, -1);

    argc += 2;

            use = NULL;

        }

        if (visual != NULL) {

  ! args[argc] = Tcl_NewStringObj("-visual", -1);

  ! args[argc+1] = Tcl_NewStringObj(visual, -1);

    argc += 2;

            visual = NULL;

        }

  *** doc/ConfigWidg.3.origWed Jul  7 20:04:18 1999

  --- doc/ConfigWidg.3Wed Jul  7 20:06:57 1999

  ***************

  *** 51,56 ****

  --- 51,58 ----

    TK_CONFIG_ARGV_ONLY causes the option database and defaults to be

    ignored, and flag bits TK_CONFIG_USER_BIT and higher are used to

    selectively disable entries in \fIspecs\fR.

  + TK_CONFIG_OBJS causes the argv argument to be threated

  + as Tcl_Obj's in stead of strings.

    .AP "type name" type in

    The name of the type of a widget record.

    .AP "field name" field in


  PatchFiles:

  tk.h tkOldConfig.c tkFrame.c tkInt.decls tkInt.h tkIntDecls.h tkWindow.c

      ConfigWidg.3




  in 8.3b1. 
  -- 12/13/1999 hobbs


tkt_uuid: 220555ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Fix for use of global var in entry.tcl
comment:
  OriginalBugID: 2350 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-16'
  LastModified: '1999-08-06'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2370
  OS: Other
  Machine: NA
  FixedDate: '1999-08-06'
  FixedInVersion: 8.2


  Name:

  Jeffrey Hobbs



  Comments:

  This exists in the 8.0 strain as well.



  ReproducibleScript:

  This is a fix for the bug report from 1bayuk@mindspring.com

      reporting the problem of the use of $data in entry Cut/Copy



  Patch:

  *** entry.tcl~  Thu May 27 13:38:16 1999

  --- entry.tcl   Thu Jul  8 15:24:28 1999

  ***************

  *** 26,31 ****

  --- 26,32 ----

    #                     char, word, or line.

    # x, y -              Last known mouse coordinates for scanning

    #                     and auto-scanning.

  + # data -              Used for Cut and Copy

    #-------------------------------------------------------------------------

    

    #-------------------------------------------------------------------------

  ***************

  *** 32,48 ****

    # The code below creates the default class bindings for entries.

    #-------------------------------------------------------------------------

    bind Entry <<Cut>> {

  !     if {![catch {set data [tkEntryGetSelection %W]}]} {

          clipboard clear -displayof %W

  !       clipboard append -displayof %W $data

          %W delete sel.first sel.last

        }

    }

    bind Entry <<Copy>> {

  !     if {![catch {set data [tkEntryGetSelection %W]}]} {

          clipboard clear -displayof %W

  !       clipboard append -displayof %W $data

        }

    }

    bind Entry <<Paste>> {

        global tcl_platform

  --- 33,51 ----

    # The code below creates the default class bindings for entries.

    #-------------------------------------------------------------------------

    bind Entry <<Cut>> {

  !     if {![catch {tkEntryGetSelection %W} tkPriv(data)]} {

          clipboard clear -displayof %W

  !       clipboard append -displayof %W $tkPriv(data)

          %W delete sel.first sel.last

        }

  +     unset tkPriv(data)

    }

    bind Entry <<Copy>> {

  !     if {![catch {tkEntryGetSelection %W} tkPriv(data)]} {

          clipboard clear -displayof %W

  !       clipboard append -displayof %W $tkPriv(data)

        }

  +     unset tkPriv(data)

    }

    bind Entry <<Paste>> {

        global tcl_platform



  PatchFiles:

  entry.tcl





  Applied for the 8.2b3 release. 
  -- 08/06/1999 hobbs


tkt_uuid: 220556ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: I can't get Tk to install per the instructions - I get fatal errors in the make.
comment:
  OriginalBugID: 2356 Bug
  Version: 8.1
  SubmitDate: '1999-07-16'
  LastModified: '1999-08-20'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: foster
  OS: Solaris
  Machine: Other
  FixedDate: '1999-08-20'


  Name:
  J. Goss

  CVS:
  RCS: @(#) $Id: README,v 1.16 1999/04/24 01:50:47 stanton Exp $

  ReproducibleScript:
  I issued 'make' and followed all recommendations concerning PATH
      variables and
      directory layout.  Issuing 'make' produces (at the end of make's
      output):
      
      Text relocation remains                         referenced
          against symbol                  offset      in file
      __ctype                             0x1cc       tkGet.o
      __ctype                             0x2a04      tkCanvPs.o
      __ctype                             0x1e8       tkGet.o
      ld: fatal: relocations remain against allocatable but non-writable
      sections
      *** Error code 1
      make: Fatal error: Command failed for target `libtk8.1.so'

  DesiredBehavior:
  How can get it to build?



  Solution provided in:
      http://x46.deja.com/getdoc.xp?AN=499923360 
  -- 08/20/1999 hobbs

  namely: Just hand edit the Makefile to remove the "-z text" ...  
  -- 08/20/1999 foster


tkt_uuid: 220557ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Tk_MeasureChars inconsistency causes text display problems
comment:
  OriginalBugID: 2362 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-16'
  LastModified: '1999-12-16'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 98
  Machine: X86
  FixedDate: '1999-12-16'
  FixedInVersion: 8.3b1


  Name:
  Frederic BONNET

  Comments:
  Workaround: use strictly negative maxPixels values when measuring
      unbounded text lines (eg. -1 instead of 0).  The new behavior is
      platform-consistent.

  ObservedBehavior:
  According to the Tk_MeasureChars man page:
      
      " If maxPixels is greater than 0, it specifies the longest permissible
      line length in pixels.  Characters from string are processed only until
      this many pixels have been covered.  If maxPixels is <= 0, then the line
      length is unbounded and the flags argument is ignored. "
      
      This was true in Tk8.0.5 and prior versions but isn't in Tk8.1.1:
      maxPixels must be < 0 (and not <=) for the line length to be unbounded.
      This is an undocumented potential incompatibility.

  DesiredBehavior:
  Either revert to the old behavior (for better backward compatibility) or
      update the man page and the change log.



  It was decided that 0 should be an allowed length that shouldn't
  mean all (this makes it more consistent with other areas of Tcl/Tk),
  and the docs were unfortunately not updated.  This has been fixed
  for 8.3b1. 
  -- 12/16/1999 hobbs


tkt_uuid: 220558ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 01. Bindings
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Robustness of tk.tcl
comment:
  OriginalBugID: 2365 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-16'
  LastModified: '1999-08-12'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1138
  OS: Other
  Machine: NA
  FixedDate: '1999-08-12'
  FixedInVersion: 8.2


  Name:

  Jan Nijtmans



  CVS:

  july 10, 1999



  ReproducibleScript:

  If $tk_library is the empty string (which can happen in standalone

      executables), it is still appended to auto_path. Also other

      initialization files are attempted to be sourced from non-existing

      places. The patch below, which

      is needed for the upcoming "Wrap" extension, fixes this.



  Patch:

  *** library/tk.tcl.origSat Jul 10 12:32:09 1999

  --- library/tk.tclSat Jul 10 12:34:58 1999

  ***************

  *** 20,29 ****

    # Add Tk's directory to the end of the auto-load search path, if it

    # isn't already on the path:

    

  ! if {[info exists auto_path]} {

  !     if {[lsearch -exact $auto_path $tk_library] < 0} {

  ! lappend auto_path $tk_library

  !     }

    }

    

    # Turn off strict Motif look and feel as a default.

  --- 20,28 ----

    # Add Tk's directory to the end of the auto-load search path, if it

    # isn't already on the path:

    

  ! if {[info exists auto_path] && [string compare $tk_library {}] &&

  ! [lsearch -exact $auto_path $tk_library] < 0} {

  !     lappend auto_path $tk_library

    }

    

    # Turn off strict Motif look and feel as a default.

  ***************

  *** 181,187 ****

    # Read in files that define all of the class bindings.

    # ----------------------------------------------------------------------

    

  ! if {[string compare $tcl_platform(platform) "macintosh"]} {

        source [file join $tk_library button.tcl]

        source [file join $tk_library entry.tcl]

        source [file join $tk_library listbox.tcl]

  --- 180,187 ----

    # Read in files that define all of the class bindings.

    # ----------------------------------------------------------------------

    

  ! if {[string compare $tcl_platform(platform) "macintosh"] &&

  ! [string compare $tk_library {}]} {

        source [file join $tk_library button.tcl]

        source [file join $tk_library entry.tcl]

        source [file join $tk_library listbox.tcl]



  PatchFiles:

  tk.tcl





  Integrated into 8.2. 
  -- 08/12/1999 hobbs


tkt_uuid: 220559ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: prolog.ps missing or misplaced
comment:
  OriginalBugID: 2377 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-16'
  LastModified: '1999-07-16'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: redman
  OS: Other
  Machine: NA
  FixedDate: '1999-07-16'


  Name:
  Don Porter

  Comments:
  Perhaps the Makefile wants to install generic/prolog.ps ?
      There is no file library/prolog.ps in the release.
      There is a file library/prolog.ps in NetCVS, though.
      Hmmmm.... another reason to get those 'cvs rm's up to date.

  ObservedBehavior:
  $ make install
      ...
      Installing ./../library/prolog.ps
      cp: ./../library/prolog.ps: No such file or directory
      chmod: //usr/local/install/tcl8.2b1/lib/tk8.2/#inst.2361#: No such file
      or directory
      mv: //usr/local/install/tcl8.2b1/lib/tk8.2/#inst.2361#: No such file or
      directory
      Installing ./../library/tclIndex
      ...



  Fixed install-libraries target to grab the file installed with the dist target.  Fixed in 8.2b2

  -- 07/16/1999 redman


tkt_uuid: 220560ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: Incorrect TK_MINOR_VERSION macro
comment:
  OriginalBugID: 2379 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-16'
  LastModified: '1999-07-16'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: redman
  OS: Other
  Machine: NA
  FixedDate: '1999-07-16'


  Name:
  Don Porter

  Patch:
  Index: tk.h
  ===================================================================
  RCS file: /cvsroot/tk/generic/tk.h,v
  retrieving revision 1.27
  diff -c -r1.27 tk.h
  *** tk.h        1999/06/25 23:47:57     1.27
  --- tk.h        1999/07/16 01:38:00
  ***************
  *** 44,50 ****
     */
    
    #define TK_MAJOR_VERSION   8
  ! #define TK_MINOR_VERSION   1
    #define TK_RELEASE_LEVEL   TCL_BETA_RELEASE
    #define TK_RELEASE_SERIAL  1
    
  --- 44,50 ----
     */
    
    #define TK_MAJOR_VERSION   8
  ! #define TK_MINOR_VERSION   2
    #define TK_RELEASE_LEVEL   TCL_BETA_RELEASE
    #define TK_RELEASE_SERIAL  1

  PatchFiles:
  tk.h



  Fixed in 8.2b2 
  -- 07/16/1999 redman


tkt_uuid: 220561ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: one minor bug, two minor problems
comment:
  OriginalBugID: 2385 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-19'
  LastModified: '1999-07-22'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: redman
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-07-22'
  FixedInVersion: 8.2b2


  Name:
  vince darley

  CustomShell:
  I'm running with my 'glob' patch.

  ReproducibleScript:
  Problem 1)
      ----------
      
      In the pkgindex for iwidgets the following line:
      
      package ifneeded Iwidgets 3.0.0 "source [file join $dir iwidgets.tcl]"
      
      should be replaced with
      
      package ifneeded Iwidgets 3.0.0 [list source [file join $dir
      iwidgets.tcl]]
      
      or iwidgets will not load if you've installed Tcl in a path with spaces
      (the default under Windows!).
      
      Problem 2)
      ----------
      
      So that Tcl/Tk extensions can be built with the Metrowerks compiler on
      windows, two small changes should be made:
      
      In tkWinPort.h the following line should be wrapped as follows:
      
      #ifndef __MWERKS__
      #include <sys/stat.h>
      #endif
      
      since this file doesn't exist in the Metrowerks Standard Library (or
      perhaps it's just 'stat.h' not in sys).  Anyway to build an extension
      the above suffices.
      
      Similarly tclWinPort.h requires the following minor change:
      
      #ifndef __MWERKS__
      #include <sys/stat.h>
      #include <sys/timeb.h>
      #endif
      
      With these two changes one can easily build extensions for Tcl and Tk
      using the standard distribution.



  Problem (1) was fixed in 8.2b1, but not the source release. Need to do (2) still.

  -- 07/21/1999 redman

  Fixed problem (2).

  -- 07/22/1999 redman


tkt_uuid: 220562ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: Bug in MacTk header file
comment:
  OriginalBugID: 2389 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-19'
  LastModified: '1999-08-01'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  Machine: Power PC
  FixedDate: '1999-08-01'
  FixedInVersion: 8.2b2


  Name:
  vince darley

  ReproducibleScript:
  When compiling extensions which use stubs, if you first include "tk.h",
      and then later decide to include tkInt.h/tkPort.h/tkMacPort.h (because
      the extension requires some internals), the stub-#defines cause the
      following
      line (in tkMacPort.h) to turn into garbage (=> compiler errors):
      
      extern void panic  _ANSI_ARGS_(TCL_VARARGS(char *, string));
      
      I suggest it be either removed or wrapped in the following #ifdef
      
      #ifndef panic
      extern void panic  _ANSI_ARGS_(TCL_VARARGS(char *, string));
      #endif
      
      to avoid this problem.



  Unable to test properly, since it is in the mac headers. 
  -- 08/01/1999 hobbs


tkt_uuid: 220563ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: winfo interps returns empty string on Win95
comment:
  OriginalBugID: 2403 Bug
  Version: 8.0.5
  SubmitDate: '1999-07-19'
  LastModified: '1999-08-20'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-08-20'
  FixedInVersion: 8.2


  Name:
  Alain Wittmann

  ObservedBehavior:
  winfo returns an empty string on my PC running on Windows 95

  DesiredBehavior:
  I expect to see at least one interpreter in the list.



  winfo interps was stubbed out for 8.0 as send was not yet available.
  It was added temporarily in 8.1, but later replaced with the dde
  command which has become the standard for send on Windows.  See the
  docs on how to use it like send. 
  -- 08/20/1999 hobbs


tkt_uuid: 220564ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 47. Win Fonts
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Further info: unicode crash with Adobe G2 fonts
comment:
  OriginalBugID: 2406 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-19'
  LastModified: '2000-02-08'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2405
  OS: Windows 95
  OSVersion: OSR3+IE5.0
  Machine: X86
  FixedDate: '2000-02-08'
  FixedInVersion: 8.3


  Name:
  Kevin Kenny

  CVS:
  * RCS: @(#) $Id: tkWinFont.c,v 1.5 1999/04/16 01:51:51 stanton Exp $

  CustomShell:
  Patched as above

  ReproducibleScript:
  #  The bug report that I submitted earlier today contains a questionable
      patch.
      # Pleas apply the attached one instead.

  ObservedBehavior:
  # The bad patch causes the G2 fonts to match various Unicode characters
      # in the range 0x0100-0x0fff, incorrectly

  DesiredBehavior:
  # The symbol fonts should use the symbol encoding only for 8-bit
      characters

  Patch:
  *** Tcl8.1/src/tk8.1/win/tkWinFont.cThu Apr 29 15:38:42 1999
  --- Tcl8.1-from-source/src/tk8.1/win/tkWinFont.cSat Jul 17 17:25:20 1999
  ***************
  *** 2295,2304 ****
         */
    
        for (i = 0; i < segCount; i++) {
  ! if ((startCount[i] & 0xff00) == 0xf000) {
        startCount[i] &= 0xff;
  - }
  - if ((endCount[i] & 0xff00) == 0xf000) {
        endCount[i] &= 0xff;
    }
        }
  --- 2295,2303 ----
         */
    
        for (i = 0; i < segCount; i++) {
  ! if ( ( startCount[i] & 0xff00 ) == 0xf000
  !      && ( endCount[i] & 0xff00 ) == 0xf000 ) {
        startCount[i] &= 0xff;
        endCount[i] &= 0xff;
    }
        }

  PatchFiles:
  tkWinFont.c



  Patch applied, although I don't have a G2 font to test the change.
  The fix is applied for 8.3.0. 
  -- 02/08/2000 hobbs


tkt_uuid: 220565ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: Character search on Windows slow
comment:
  OriginalBugID: 2407 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-19'
  LastModified: '1999-12-16'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  OSVersion: OSR3+IE5.0
  Machine: X86
  FixedDate: '1999-12-16'
  FixedInVersion: 8.3b1


  Name: Kevin Kenny



  CustomShell:

  Patched as per my other bug report



  Comments:

  The patch above does NOT solve the entire problem of searching for a

      font

      capable of rendering the text.  What it does it to place "Bitstream

      Cyberbit"

      (by far the most popular CJK font for Win95/98 in North America)

      into the global fallback table.  This change at least gets Cyberbit

      searched as the fifth font or so, rather than the 361st, and allows

      Chinese

      text to be rendered at a more reasonable speed.  A real fix is still

      needed

      so that Tk doesn't freeze if it tries to display a burst of nonexistent

      glyphs.



  ReproducibleScript:

  # If many fonts are installed (my system returns 361 for 

      # [llength [font families]]), the search for a font to render a

      character

      # is horribly slow.  Try executing:

      font create x -family times -size 24

      label .l -font x -text "The Chinese name of Tk is \u592a\u9177"

      grid .l



  ObservedBehavior:

  The label takes several seconds to create.  Displaying a text widget

      containing

      a paragraph of Chinese text had not come back after several hours.



  DesiredBehavior:

  It would be nice if some of the capability information (which fonts

      support

      which characters) could be cached in memory.  Apparently, any time that

      the

      system has to search all the fonts, it must make many, many expensive

      GDI

      calls to do so.



  Patch:

  *** Tcl8.1/src/tk8.1/generic/tkFont.cThu Apr 29 15:37:50 1999

  --- Tcl8.1-from-source/src/tk8.1/generic/tkFont.cSat Jul 17 18:05:16 1999

  ***************

  *** 310,315 ****

  --- 310,316 ----

        "symbol",/* All platforms. */

    /* Unix. */

        "lucida sans unicode",/* Windows. */

  +     "bitstream cyberbit",

        "chicago",/* Mac. */

        NULL

    };



  PatchFiles:

  tkFont.c





  Added to 8.3b1. 
  -- 12/16/1999 hobbs


tkt_uuid: 220566ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: NetCVS distributed deprecated files
comment:
  OriginalBugID: 2418 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-19'
  LastModified: '1999-07-20'
  Severity: MED
  Status: Released
  Submitter: jenn
  ChangedBy: stanton
  OS: All
  Machine: NA
  FixedDate: '1999-07-20'


  Name:  Don Porter

  ObservedBehavior:
      The following files are distributed as part of Tk by NetCVS, even though
      they are no longer part of the official Tk releases:
      
      doc/InitStubs.3
      generic/tkIntPlatStubs.c
      generic/tkIntStubs.c
      generic/tkIntXlibStubs.c
      generic/tkPlatStubs.c
      generic/tkStubs.c
      mac/tkMacProlog.c
      tests/all
      tests/defs
      tests/visual
      win/makefile.bc
      
      

  DesiredBehavior:
      'cvs rm' files from NetCVS as they become obsolete.


  07/20/1999 14:05 - stanton - fixed rdist script to removed deleted files


tkt_uuid: 220567ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 01. Bindings
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Abbreviated Tk commands don't work with iWidgets
comment:
  OriginalBugID: 2422 Bug
  Version: 8.0.5
  SubmitDate: '1999-07-20'
  LastModified: '1999-08-10'
  Severity: CRIT
  Status: Released
  Submitter: jenn
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  FixedDate: '1999-08-10'
  FixedInVersion: 8.2
  ClosedDate: '1999-08-05'


  Name:  Krzysztof Kozminski

  CVS:  RCS: @(#) $Id: tk.tcl,v 1.6 1999/01/04 19:25:27 rjohnson Exp $

  ReproducibleScript:
      There is no simple way to reproduce it.  But the fix is trivial.
      

  ObservedBehavior:
      In my application, Tk widget commands are hidden and replaced by Itcl
      classes with the same names; these are loosely based on Itk classes but,
      unlike Itk, they retain all Tk widget's attributes and methods (and have
      some additional ones).  For example, an Itcl class 'entry' has methods
      named bbox, cget, configure, delete, etc.  All that Itcl methods
      "inherited" from Tk widgets do, is pass the arguments to the Tk widgets
      associated with the Itcl object ($itk_hull in Itk).
      
      Unfortunately, while Tk widget methods can be abbreviated, Itcl object
      method do not seem to have this property.  So if I have, e,g. Tk entry
      .a-itk_hull and a corresponding Itcl object .a, I can do:
      
      .a-itk_hull icur end
      
      but the .a object requires full method name:
      
      .a icursor end.
      
      This breaks any code where the programmer was too lazy to type the full
      name of a Tk widget method.  The first example of this is in the
      aforementioned file (tk8.0/tk.tcl), in the procedure tkTabToWindow.
      

  DesiredBehavior:
      I expect the code in the tcl libraries to have Tk widgets methods
      spelled out in full.
      

  Patch:
  *** /tmp/tk.tcl Tue Jul 13 10:41:35 1999
  --- tk.tcl  Mon Jul 12 18:55:03 1999
  ***************
  *** 186,193 ****
    
    proc tkTabToWindow {w} {
        if {"[winfo class $w]" == "Entry"} {
  !   $w select range 0 end
  !   $w icur end
        }
        focus $w
    }
  --- 186,193 ----
    
    proc tkTabToWindow {w} {
        if {"[winfo class $w]" == "Entry"} {
  !   $w selection range 0 end
  !   $w icursor end
        }
        focus $w
    }


  Comments:
      In case you're wondering why this was done, I wanteded to be able to
      extend the behavior of Tk widgets, including those in various public
      extensions (e.g. file selection dialog), without editing the code of the
      public extension each time it is updated.
      


  This problem are fixed in 8.2b3. 
  -- 08/10/1999 hobbs


tkt_uuid: 220568ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: Syntax error in menu.tcl
comment:
  OriginalBugID: 2425 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-21'
  LastModified: '1999-07-22'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: redman
  OS: Other
  Machine: NA
  FixedDate: '1999-07-22'


  Name:
  Jeffrey Hobbs

  Comments:
  This exists in 8.1.1 as well.

  ReproducibleScript:
  I am not able to reproduce this, but it is as reported by
      Michael Capito (mikec at tgf.tc.faa.gov) on c.l.tcl, and
      is an obvious syntax error.

  Patch:
  ib-service [~/src/tk8.2b1/library] 271 % diff -c menu.tcl~ menu.tcl
  *** menu.tcl~   Fri May  7 22:05:40 1999
  --- menu.tcl    Wed Jul 21 09:44:34 1999
  ***************
  *** 934,940 ****
                          [$child cget -underline]]
                  if {![string compare $char [string tolower $char2]]
                          || ![string compare $char ""]} {
  !                   if {[string compare [$child cget $i -state] "disabled"]} {
                          return $child
                      }
                  }
  --- 934,940 ----
                          [$child cget -underline]]
                  if {![string compare $char [string tolower $char2]]
                          || ![string compare $char ""]} {
  !                   if {[string compare [$child cget -state] "disabled"]} {
                          return $child
                      }
                  }

  PatchFiles:
  library/menu.tcl



  Applied patch, fixed in 8.2b2. 
  -- 07/22/1999 redman


tkt_uuid: 220569ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 16. [scrollbar]
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Edit/Preferences/Appearance/Font/Size generates "Error in Tcl Script"
comment:
  OriginalBugID: 2428 Bug
  Version: 8.2
  SubmitDate: '1999-07-21'
  LastModified: '1999-10-20'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-SuSE
  OSVersion: SuSE6.1 with Linux 2.2.5
  Machine: Other
  FixedDate: '1999-10-20'
  FixedInVersion: 8.3b1


  Name:
  Christian Krone

  Extensions:
  None

  ReproducibleScript:
  First call Edit/Preferences... and select the tab Appearance.
      Then click on the arrow button next to the font size, don't
      release the button yet. Move the mouse pointer over the scrollbar
      of the listbox with the font sizes. Now release the button.
      A Tcl error with the following message will appear:
        can't read "tkPriv(relief)": no such element in array

  ObservedBehavior:
  can't read "tkPriv(relief)": no such element in array
          while executing
      "$w configure -activerelief $tkPriv(relief)"
          (procedure "tkScrollButtonUp" line 4)
          invoked from within
      "tkScrollButtonUp
      .prefDbgWin.tabWin.appFrm.fontFrm.titleFrm.subFrm.sizeBox_tl.frm.yscroll
      7 54
      "
          (command bound to event)



  Melissa says:

  i've discussed this bug with Brent, and he thing it's a bug in the X  server (on many different machines), and that the most reasonable fix  would be in tk core, rather than in our tools.

  -- 07/30/1999 jenn

  The problem is that this piece of code for the scrollbar expects
  that it has a matching ButtonPress for the ButtonRelease (otherwise
  we see the error).  The complication is that sometimes widgets that
  are over the scrollbar can be deleted on a ButtonPress (the widget
  will then go away), and the scrollbar receives the ButtonRelease,
  since it was underneath.  You can work around this by having the
  overlying dialog go away on a ButtonRelease instead.  The fix was
  to also protect this case for the scrollbar itself, but this can
  occur for other widgets that expect a matching ButtonPress to the
  ButtonRelease. 
  -- 10/20/1999 hobbs


tkt_uuid: 220570ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 39. Image Basics
priority: 2
foundin: None
resolution: Fixed
title: Img patch for Tk8.2b1
comment:
  OriginalBugID: 2431 RFE
  Version: 8.2b1
  SubmitDate: '1999-07-21'
  LastModified: '1999-11-16'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2325
  OS: Other
  Machine: NA
  FixedDate: '1999-11-16'
  FixedInVersion: 8.3b1


  Name:
  Jan Nijtmans

  Comments:
  Especiall the C-API changes are important to be implemented now, because
      otherwise they have to wait for Tk 8.3. The "window" format handler of
      Img 1.2 depends on it.

  DesiredBehavior:
  This is a follow to BugID: 2325 (which supplied the same fixes for
      Tk8.1.1).
      The difference is that this new patch is re-generated against Tk8.2b1,
      and
      now also contains the full documentation of the required changes in the
      C-API.
      
      This patch adds many enhancements to the "image" command, mainly the
      photo widget. This patch is supplied by Img for a long time, and is from
      time to time enhanced with more features. This version is functionally
      equivalent to the Img 1.2 patch, only it is regenerated and cleaned up
      for use with Tk 8.2b1.
      - 100% objectified (much faster than before). This part is
        originally written by Steve Ball. It makes the image command
        much faster and in addition allows the "-data" option to accept
        binary data.
      - Transparency handled correctly. In order to do this, it was
        necessary to change the internal representation from 3 to 4
        bytes per pixel. The current implementation works for GIF only,
        but this patch moves this code to the Tcl_PhotoPutBlock() function.
        This makes it usable for all image formats, not only GIF.
      - new "imageName data" subcommand. This command allows the content
        of an image to be read into a base-64 encoded string. Currently
        the only way to do that is through a temporary file and an external
        base-64 decoder.
      - new options "-grayscale" and "-background" to the "imageName data"
        and "imageName write" commands. Those options allow colored images
        to be written in grayscale and partially transparent images to be
        written fully opaque. They work for all image formats.
      - GIF format handler has a new "-index" option, which allows to
        extract single images from an animated GIF.
      - C-API changed in order to accomodate the above modifications.
      - All documentation is adapted according to the above
        enhancements, both at the Tcl level and the C-API)
      - Tests adapted to the new commands. However, it is not
        a complete test suite for photo images yet. (The original
        photo test suite is far from complete as well......)

  Patch:
  http://home.wxs.nl/~nijtmans/patch.tk82b1.gz

  PatchFiles:
  tk.h tkImage.c tkImgBmp.c tkImgGIF.c tkImgPPM.c tkImgPhoto.c tkInt.h
      tkTest.c tkWindow.c photo.n image.test imgPhoto.test CrtImgType.3
      CrtPhImgFmt.3 FindPhoto.3 photo.n



  This patch requires modifications to continue to support the char*
  based image types.  The plan is to add this in, but by creating
  Tk_CreateObjImageType Tcl_Obj based funcs parallel to the current
  char* based ones. 
  -- 08/01/1999 hobbs
  Included in 8.3. 
  -- 11/16/1999 hobbs


tkt_uuid: 220571ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 2
foundin: None
resolution: Fixed
title: XFillRectangle missing from Tk's stub table
comment:
  OriginalBugID: 2446 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-26'
  LastModified: '1999-07-30'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux
  OSVersion: Redhat 4.2
  Machine: Other
  FixedDate: '1999-07-30'
  FixedInVersion: 8.2b2


  Name:

  Jan Nijtmans



  Comments:

  I don't want entry 105 to be used, because this should be reserved for

      the function XWarpPointer(). See also BugID 2340, please.



  ReproducibleScript:

  Try to compile Tktable 2.5 as stub-enabled extension on Windows. The

      result is

      that the symbol "XFillRectangle" is undefined. I already submitted a

      workaround for this problem to Jeffrey Hobbs. But the real problem is in

      Tk, so that's where it should be fixed.



  Patch:

  *** tkInt.decls.origWed Jun 16 22:11:28 1999

  --- tkInt.declsSun Jul 25 16:22:57 1999

  ***************

  *** 1505,1510 ****

  --- 1505,1514 ----

        void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \

        int x2, int y2)

    }

  + declare 106 win {

  +     void XFillRectangle (Display* display, Drawable d, GC gc, \

  +     int x, int y, unsigned int width, unsigned int height)

  + }

    

    # X functions for Mac

    

  ***************

  *** 1880,1883 ****

  --- 1884,1891 ----

    declare 82 mac {

        void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \

        int x2, int y2)

  + }

  + declare 83 mac {

  +     void XFillRectangle (Display* display, Drawable d, GC gc, \

  +     int x, int y, unsigned int width, unsigned int height)

    }



  PatchFiles:

  tkInt.decls


tkt_uuid: 220572ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: scrollbar configure options don't
comment:
  OriginalBugID: 2491 Bug
  Version: 8.0.5
  SubmitDate: '1999-08-03'
  LastModified: '1999-08-04'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-08-04'
  FixedInVersion: 8.2


  Name:
  Bob Halpin

  CustomShell:
  none

  Comments:
  Win NT 4.0 (SR5)

  ReproducibleScript:
  scrollbar .s
      pack .s -expand true -fill y
      .s configure -troughcolor red

  ObservedBehavior:
  Troughcolor doesn't change. In fact, most -configure options don't work.

  DesiredBehavior:
  troughcolor change to blue (and other options work as well.)



  Certain options are not enabled for Tk widgets that are actually
  wrappers around native widgets (like the scrollbar), because
  that is not allowed on that platform.  This is essentially a
  doc bug since it wasn't clarified (but now is). 
  -- 08/04/1999 hobbs


tkt_uuid: 220573ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: obsolete: 8.0.3
resolution: Fixed
title: Caps Lock light goes off on some Win95-98
comment:
  OriginalBugID: 2493 Bug
  Version: 8.0.3
  SubmitDate: '1999-08-03'
  LastModified: '2000-02-09'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 683 1656
  OS: Windows 95
  OSVersion: 95 - 98 and NT
  Machine: X86
  FixedDate: '2000-02-09'
  FixedInVersion: 8.3


  Name:
  Dany Ayotte

  Comments:
  Do you have any simple work around for that?

  ReproducibleScript:
  wish

  ObservedBehavior:
  Create annoyance for customer, especially when typing password, user
  don't have indication whatever Caps Lock is active or not.

  DesiredBehavior:
  Normal Caps Lock light behaviour.



  Reported to only affect Win95/98, not NT. 
  -- 08/07/1999 hobbs
  This was fixed for 8.3.0 (patch from Spjuth). 
  -- 02/09/2000 hobbs


tkt_uuid: 220574ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 24. Relief
priority: 2
foundin: obsolete: 8.2b1
resolution: Fixed
title: Improve seletion of 3D colors
comment:
  OriginalBugID: 2501 RFE
  Version: 8.2b1
  SubmitDate: '1999-08-04'
  LastModified: '2000-04-13'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  Machine: Other
  FixedDate: '2000-04-13'
  FixedInVersion: 8.3.1


  Name:

  D. Richard Hipp



  CVS:

  Aug 1, 1999



  Comments:

  There are constants in the algorithm (ex: to decide when to begin

      using the alternative algorithm) which I have determined empirically.

      I make no claim that the algorithm given is optimal in any way.

      I do, however, think it works better than the existing algorithm.

      

      I'd appreciate a quick e-mail if and when you decide to either

      incorporate or reject this patch.  That will help me plan what

      I need to do to work around this problem.



  DesiredBehavior:

  When the background color is nearly white or nearly black, then Tk

      does a poor job of chosing shadow colors for the 3D borders.  The

      patches given below use the existing shadow-color algorithm for most

      instances, but substitute a different algorithm when the background

      color becomes too bright or too dark.



  Patch:

  *** tkUnix3d.c.orig     Wed Aug  4 13:16:22 1999

  --- tkUnix3d.c  Wed Aug  4 14:15:42 1999

  ***************

  *** 339,344 ****

  --- 339,345 ----

    {

        XColor lightColor, darkColor;

        int stressed, tmp1, tmp2;

  +     int r, g, b;

        XGCValues gcValues;

    

        if (borderPtr->lightGC != None) {

  ***************

  *** 359,401 ****

        if (!stressed && (Tk_Depth(tkwin) >= 6)) {

          /*

           * This is a color display with lots of colors.  For the dark

  !        * shadow, cut 40% from each of the background color components.

           * For the light shadow, boost each component by 40% or half-way

           * to white, whichever is greater (the first approach works

           * better for unsaturated colors, the second for saturated ones).

           */

    

  !       darkColor.red = (60 * (int) borderPtr->bgColorPtr->red)/100;

  !       darkColor.green = (60 * (int) borderPtr->bgColorPtr->green)/100;

  !       darkColor.blue = (60 * (int) borderPtr->bgColorPtr->blue)/100;

          borderPtr->darkColorPtr = Tk_GetColorByValue(tkwin, &darkColor);

          gcValues.foreground = borderPtr->darkColorPtr->pixel;

          borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues);

    

          /*

  !        * Compute the colors using integers, not using lightColor.red

  !        * etc.: these are shorts and may have problems with integer

  !        * overflow.

           */

    

  !       tmp1 = (14 * (int) borderPtr->bgColorPtr->red)/10;

  !       if (tmp1 > MAX_INTENSITY) {

  !           tmp1 = MAX_INTENSITY;

  !       }

  !       tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->red)/2;

  !       lightColor.red = (tmp1 > tmp2) ? tmp1 : tmp2;

  !       tmp1 = (14 * (int) borderPtr->bgColorPtr->green)/10;

  !       if (tmp1 > MAX_INTENSITY) {

  !           tmp1 = MAX_INTENSITY;

  !       }

  !       tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->green)/2;

  !       lightColor.green = (tmp1 > tmp2) ? tmp1 : tmp2;

  !       tmp1 = (14 * (int) borderPtr->bgColorPtr->blue)/10;

  !       if (tmp1 > MAX_INTENSITY) {

  !           tmp1 = MAX_INTENSITY;

          }

  !       tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->blue)/2;

  !       lightColor.blue = (tmp1 > tmp2) ? tmp1 : tmp2;

          borderPtr->lightColorPtr = Tk_GetColorByValue(tkwin, &lightColor);

          gcValues.foreground = borderPtr->lightColorPtr->pixel;

          borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues);

  --- 360,440 ----

        if (!stressed && (Tk_Depth(tkwin) >= 6)) {

          /*

           * This is a color display with lots of colors.  For the dark

  !        * shadow, cut 40% from each of the background color component.

  !        * But if the background is already very dark, make the

  !        * dark color a little lighter than the background by increasing

  !        * each color component 1/4th of the way to MAX_INTENSITY.

  !        *

           * For the light shadow, boost each component by 40% or half-way

           * to white, whichever is greater (the first approach works

           * better for unsaturated colors, the second for saturated ones).

  +        * But if the background is already very bright, instead choose a

  +        * slightly darker color for the light shadow by reducing each

  +        * color component by 10%.

  +        *

  +        * Compute the colors using integers, not using lightColor.red

  +        * etc.: these are shorts and may have problems with integer

  +        * overflow.

  +        */

  + 

  + 

  +       /*

  +        * Compute RGB value for the dark shadow

           */

    

  !       r = borderPtr->bgColorPtr->red;

  !       g = borderPtr->bgColorPtr->green;

  !       b = borderPtr->bgColorPtr->blue;

  !       if (r*0.5*r + g*1.0*g + b*0.28*b < MAX_INTENSITY*0.05*MAX_INTENSITY) {

  !           darkColor.red = (MAX_INTENSITY + 3*r)/4;

  !           darkColor.green = (MAX_INTENSITY + 3*g)/4;

  !           darkColor.blue = (MAX_INTENSITY + 3*b)/4;

  !       } else {

  !           darkColor.red = (60 * r)/100;

  !           darkColor.green = (60 * g)/100;

  !           darkColor.blue = (60 * b)/100;

  !       }

  !   

  !       /*

  !        * Allocate the dark shadow color and its GC

  !        */

          borderPtr->darkColorPtr = Tk_GetColorByValue(tkwin, &darkColor);

          gcValues.foreground = borderPtr->darkColorPtr->pixel;

          borderPtr->darkGC = Tk_GetGC(tkwin, GCForeground, &gcValues);

    

          /*

  !        * Compute the RGB components of the light shadow

           */

    

  !       if (g > MAX_INTENSITY*85/100) {

  !           lightColor.red = (90 * r)/100;

  !           lightColor.green = (90 * g)/100;

  !           lightColor.blue = (90 * b)/100;

  !       } else {

  !           tmp1 = (14 * r)/10;

  !           if (tmp1 > MAX_INTENSITY) {

  !               tmp1 = MAX_INTENSITY;

  !           }

  !           tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->red)/2;

  !           lightColor.red = (tmp1 > tmp2) ? tmp1 : tmp2;

  !           tmp1 = (14 * (int) borderPtr->bgColorPtr->green)/10;

  !           if (tmp1 > MAX_INTENSITY) {

  !               tmp1 = MAX_INTENSITY;

  !           }

  !           tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->green)/2;

  !           lightColor.green = (tmp1 > tmp2) ? tmp1 : tmp2;

  !           tmp1 = (14 * (int) borderPtr->bgColorPtr->blue)/10;

  !           if (tmp1 > MAX_INTENSITY) {

  !               tmp1 = MAX_INTENSITY;

  !           }

  !           tmp2 = (MAX_INTENSITY + (int) borderPtr->bgColorPtr->blue)/2;

  !           lightColor.blue = (tmp1 > tmp2) ? tmp1 : tmp2;

          }

  ! 

  !       /*

  !        * Allocate the light shadow color and its GC

  !        */

  ! 

          borderPtr->lightColorPtr = Tk_GetColorByValue(tkwin, &lightColor);

          gcValues.foreground = borderPtr->lightColorPtr->pixel;

          borderPtr->lightGC = Tk_GetGC(tkwin, GCForeground, &gcValues);



  PatchFiles:

  The patch above is for unix/tkUnix3d.c.  A similar change will need to

      be

      made to win/tkWin3d.c.  (I don't have VC++6.0, so I have no means to

      test

      such a change.)





  I applied this patch to the sources in CVS; it will go out with 8.3.1.  Thanks for the great patch (contrary to your claim, I applied it virtually unaltered).

  - eric

  -- 04/13/2000 ericm


tkt_uuid: 220575ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: obsolete: 8.2b2
resolution: Fixed
title: crash when destroying window
comment:
  OriginalBugID: 2513 Bug
  Version: 8.2b2
  SubmitDate: '1999-08-10'
  LastModified: '2000-01-19'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0sp5
  Machine: X86
  FixedDate: '2000-01-19'
  FixedInVersion: 8.3


  Name:

  vince darley



  CustomShell:

  my glob patch has been applied



  Comments:

  I guess there is a workaround, which is to make sure to never do both

      of: (i) destroy the toplevel, and (ii) throw an error, in a script used

      in the above way.   Unfortunately for my code this requires complicating

      things a bit.

      

      It seems a possible solution to avoid the crash is to modify

      Tk_GetAtomName so

      that if the dispPtr is set incorrectly, it returns the string "?atom not

      known, since window destroyed?", in a similar fashion to how it

      currently returns the string "?bad atom?"  if the atom doesn't exist on

      tkwin's display.



  ReproducibleScript:

  invoke the following commands in wish (WindowsNT):

      

      toplevel .t

      wm protocol .t WM_DELETE_WINDOW foo

      bind .t <<Destroy>> foo

      proc foo {} { destroy .t ; error "crash" }

      

      Now click on the 'close box' (the X) in the .t toplevel.  Wish will

      crash.



  ObservedBehavior:

  Here's where the error occurs in the C code (Windows Tk)

      In TkWmProtocolEventProc(winPtr, eventPtr):

      

          result = Tcl_GlobalEval(interp, protPtr->command);

          if (result != TCL_OK) {

      Tcl_AddErrorInfo(interp, "\n    (command for \"");

      Tcl_AddErrorInfo(interp,

      Tk_GetAtomName((Tk_Window) winPtr, protocol));

      

      

      After the script I've bound to 'wm protocol .win WM_DELETE_WINDOW'

      returns an

      error, Tk crashes in trying to create the error message.  The crash

      occurs

      in the 'Tk_GetAtomName' method, right at the beginning:

      

         register TkDisplay *dispPtr;

          register Tcl_HashEntry *hPtr;

      

          dispPtr = ((TkWindow *) tkwin)->dispPtr;

          if (!dispPtr->atomInit) {

      

      dispPtr seems to set badly, and so 'dispPtr->atomInit' causes an access

      violation.

      

      Other circumstances: this occurs as the window is being destroyed (since

      it is something bound to 'WM_DELETE_WINDOW'), so that presumably

      contributes to the problem.





  This seems to be related to the use of <<Destroy>>, which is not
  what the user wants anyway (they really should us <Destroy>).  This
  virtual event call is causing a crash though, which must be
  investigated. 
  -- 08/19/1999 hobbs
  The problem was in tkWinWm.c:TkWmProtocolEventProc where an atom
  name was requested using the tkwin after the window was destroyed.
  This is fixed for 8.3.0. 
  -- 01/19/2000 hobbs


tkt_uuid: 220576ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 2
foundin: obsolete: 8.2b2
resolution: Fixed
title: $canvas find enclosed does not find text with trailing newline
comment:
  OriginalBugID: 2525 Bug
  Version: 8.2b2
  SubmitDate: '1999-08-12'
  LastModified: '2000-02-03'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: All
  FixedDate: '2000-02-03'
  FixedInVersion: 8.3


  Name:

  Marco R. Gazzetta



  Extensions:

  n.a.



  CustomShell:

  n.a.



  ReproducibleScript:

  pack [canvas .c]

      set item [.c create text 100 100 -text Hello\n -anchor nw]

      set bbox [.c bbox $item]

      set x2 [lindex $bbox 2]

      set y2 [lindex $bbox 3]

      incr y2

      for {set i 1} {$i < 1000000000} {append i 0} {

      puts "$i [.c find enclosed 99 99 [expr $x2 + $i] [expr $y2 + 1]]"

      }



  ObservedBehavior:

  until $i reaches a very large number (hard-coded in tkFont.c), the item

      is not retrieved



  DesiredBehavior:

  the first call (with i == 1) should already return the item searched



  Patch:

  Index: tkFont.c

  ===================================================================

  RCS file: /cvsroot/tk/generic/tkFont.c,v

  retrieving revision 1.5

  diff -c -r1.5 tkFont.c

  *** tkFont.c    1999/06/02 18:15:54     1.5

  --- tkFont.c    1999/08/11 18:13:46

  ***************

  *** 1922,1928 ****

                      continue;

                  }

              } else {

  !               NewChunk(&layoutPtr, &maxChunks, start, 1, curX, 1000000000,

                          baseline)->numDisplayChars = -1;

                  start++;

                  goto wrapLine;

  --- 1922,1928 ----

                      continue;

                  }

              } else {

  !               NewChunk(&layoutPtr, &maxChunks, start, 1, curX, curX,

                          baseline)->numDisplayChars = -1;

                  start++;

                  goto wrapLine;



  PatchFiles:

  tkFont.c





  The problem, as you correctly concluded, was the call to NewChunk and that odd huge number that was passed into it.  This caused the creation of a display element with a large width, rather than one with a zero width as would be expected for a display element containing only a newline.  I applied your patch and corrected another instance of the same mistake later in the same function.

  This fix is in 8.3 final.  Thanks for the patch.

  - eric

  -- 02/03/2000 ericm


tkt_uuid: 220577ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 2
foundin: final: 8.1.1
resolution: Fixed
title: raising a popup window crashes
comment:
  OriginalBugID: 2530 Bug
  Version: 8.1.1
  SubmitDate: '1999-08-12'
  LastModified: '2000-02-09'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 8.1.1
  Machine: X86
  FixedDate: '2000-02-09'
  FixedInVersion: 8.3


  Name:
  David Beccue

  CustomShell:
  none until this patch

  Comments:
  Please let me know if this patch is good, or if instanceData shouldn't
      ever be NULL so there really must be something wrong somewhere else in
      my code.

      Thanks!

  ReproducibleScript:
  I'm a newbie at TCL/TK porting a project from Unix to NT.  I didn't take
      the time to produce a small example, BUT I did trace the problem in the
      TK source and patch it effectively.

  ObservedBehavior:
  crash in TkFrame.c::TkInstallFrameMenu::TkpMenuNotifyToplevelCreate when
      framePtr == NULL

  DesiredBehavior:
  no crash

  Patch:
  I just added:

  if (framePtr)

  in front of the call to TkpMenuNotifyToplevelCreate(...) in function TkInstallFrameMenu in TkFrame.c in generic subdirectory

  PatchFiles:
  TkInstallFrameMenu in TkFrame.c in generic subdirectory



  It should never happen that the framePtr is NULL, please check the
  C code.  A 'panic' was added in 8.3 to help others pinpoint future
  problems of the same sort. 
  -- 02/09/2000 hobbs


tkt_uuid: 220578ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 31. Cursor Names
priority: 2
foundin: obsolete: 8.2b2
resolution: Fixed
title: panic "GetCursorFromObj called with non-existent cursor!"
comment:
  OriginalBugID: 2562 Bug
  Version: 8.2b2
  SubmitDate: '1999-08-18'
  LastModified: '1999-08-20'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.6
  Machine: Other
  FixedDate: '1999-08-20'
  FixedInVersion: 8.2.1


  Name:

  Uwe Zimmermann



  Extensions:

  TclX 8.2, Tix 4.1.0.006



  CustomShell:

  No changes but this patch.



  ReproducibleScript:

  Cannot recreate but with our application, which runs fine with Tk 8.0.3

      Application changes cursor of all widget windows to "watch" cursor

      to indicate "busy" state.

      Have not been able to reproduce with simplified code.



  ObservedBehavior:

  Aborts with core with "GetCursorFromObj called with non-existent

      cursor!"



  DesiredBehavior:

  Works fine with Tk 8.0.3.

      Works fine with patch below.



  Patch:

  wazoom[352] diff -c tkCursor.c.orig tkCursor.c

  *** tkCursor.c.origTue Aug 17 11:28:17 1999

  --- tkCursor.cTue Aug 17 11:04:54 1999

  ***************

  *** 716,722 ****

    

        for (cursorPtr = (TkCursor *) Tcl_GetHashValue(hashPtr);

        cursorPtr != NULL; cursorPtr = cursorPtr->nextPtr) {

  ! if (Tk_Display(tkwin) != cursorPtr->display) {

        objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) cursorPtr;

        cursorPtr->objRefCount++;

        return cursorPtr;

  --- 716,722 ----

    

        for (cursorPtr = (TkCursor *) Tcl_GetHashValue(hashPtr);

        cursorPtr != NULL; cursorPtr = cursorPtr->nextPtr) {

  ! if (Tk_Display(tkwin) == cursorPtr->display) {

        objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) cursorPtr;

        cursorPtr->objRefCount++;

        return cursorPtr;



  PatchFiles:

  generic/tkCursor.c





  This appears to have never been called before...  The fixed was
  applied for the 8.2.1/8.3b1 release. 
  -- 08/20/1999 hobbs


tkt_uuid: 220579ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 2
foundin: obsolete: 8.2b3
resolution: Fixed
title: Image on menubutton always displayed as if it is disabled
comment:
  OriginalBugID: 2564 Bug
  Version: 8.2b3
  SubmitDate: '1999-08-18'
  LastModified: '1999-11-18'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2084 2171
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-11-18'
  FixedInVersion: 8.2.1


  Name: Schelte Bron



  Comments:

  This problem was not present in version 8.0p2.

      I saw the problem on both the win95 and linux versions of wish 8.2p3. 

      Judging by the source file, also the mac would show the same behaviour.

      I have not been able to test the patch for the mac, but the change is

      similar

      so it should work.



  ReproducibleScript:

  When you run the following script with wish 8.2p3, the image on the

      menubutton

      is displayed stippled:

      

      set menu [image create bitmap -data {

      #define menu_width 8

      #define menu_height 8

      static unsigned char menu_bits[] = {

      0x00, 0x00, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00};

      }]

      

      button .b -image $menu -relief raised -width 16 -highlightthickness 0

      

      grid .b -sticky news



  ObservedBehavior:

  The image on the menubutton is displayed with a stippled effect,

      indicating

      the menu is disabled while it is not.



  DesiredBehavior:

  If the menubutton state is normal, I expect to see the image displayed

      unstippled.



  Patch:

  *** unix/tkUnixMenubu.c.origFri Apr 16 03:51:47 1999

  --- unix/tkUnixMenubu.cTue Aug 17 12:11:48 1999

  ***************

  *** 143,150 ****

         * foreground color, generate the stippled effect.

         */

    

  !     if (((mbPtr->state == STATE_DISABLED) 

  !             && (mbPtr->disabledFg == NULL)) || (mbPtr->image != NULL)) {

    XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC,

    mbPtr->inset, mbPtr->inset,

    (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset),

  --- 143,150 ----       * foreground color, generate the stippled effect.

         */

    

  !     if ((mbPtr->state == STATE_DISABLED) 

  !             && ((mbPtr->disabledFg == NULL) || (mbPtr->image != NULL))) {

    XFillRectangle(mbPtr->display, pixmap, mbPtr->disabledGC,

    mbPtr->inset, mbPtr->inset,

    (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset),

  *** mac/tkMacMenubutton.c.origTue Aug 10 20:14:59 1999

  --- mac/tkMacMenubutton.cTue Aug 17 12:58:27 1999

  ***************

  *** 163,170 ****

         * foreground color, generate the stippled effect.

         */

    

  !     if ((mbPtr->state == STATE_DISABLED && mbPtr->disabledFg != NULL)

  !             || (mbPtr->image != NULL)) {

    XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), 

                    mbPtr->disabledGC, mbPtr->inset, mbPtr->inset,

    (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset),

  --- 163,170 ----

         * foreground color, generate the stippled effect.

         */

    

  !     if ((mbPtr->state == STATE_DISABLED)

  !     && ((mbPtr->disabledFg != NULL) || (mbPtr->image != NULL))) {

    XFillRectangle(mbPtr->display, Tk_WindowId(tkwin), 

                    mbPtr->disabledGC, mbPtr->inset, mbPtr->inset,

    (unsigned) (Tk_Width(tkwin) - 2*mbPtr->inset),



  PatchFiles:

  unix/tkUnixMenubu.c

      mac/tkMacMenubutton.c





  in 8.2.1 
  -- 11/18/1999 hobbs


tkt_uuid: 220580ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: None
resolution: Fixed
title: Support line styles in Windows X emulation layer
comment:
  OriginalBugID: 2578 RFE
  Version: 8.0.4
  SubmitDate: '1999-08-18'
  LastModified: '1999-12-13'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  Machine: X86
  FixedDate: '1999-12-13'
  FixedInVersion: 8.3b1


  Name:

  Brian Griffin


  CVS:

  tkWinDraw.c 1998/09/14 18:24:00     1.2


  CustomShell:

  I have several patches; don't recall them all.  Some are my own which I've submitted previously.


  Comments:

  I have only tested LineOnOffDash of signle pixel wide lines.  Lines

      wider than 1 pixel uses different code.


  ReproducibleScript:

  Using these emulated X calls on Windows:

      XSetLineAttributes( display, gc, line_width, line_style, cap_style,

      join_style);

      XDrawLine( display, d, gc, x1, y1 , x2, y2 );


      You'll find that the line_style argument is ignored.  All lines are draw

      as LineSolid (a.k.a. PS_SOLID).


  DesiredBehavior:

  LineOnOffDash and LineDoubleDash should also be supported.


  Patch:

  cvs diff -c tkWinDraw.c

  Index: tkWinDraw.c

  ===================================================================

  RCS file: /cvsroot/tk/win/tkWinDraw.c,v

  retrieving revision 1.2

  diff -c -r1.2 tkWinDraw.c

  *** tkWinDraw.c 1998/09/14 18:24:00     1.2

  --- tkWinDraw.c 1999/08/12 19:21:21

  ***************

  *** 743,748 ****

  --- 743,750 ----

        RECT rect;

        HPEN oldPen;

        HBRUSH oldBrush;

  +     int oldBkMode;

  +     COLORREF oldBkColor;

        POINT *winPoints = ConvertPoints(points, npoints, mode, &rect);


        if ((gc->fill_style == FillStippled

  ***************

  *** 838,843 ****

  --- 840,847 ----


          SetPolyFillMode(dc, (gc->fill_rule == EvenOddRule) ? ALTERNATE

                  : WINDING);

  +       oldBkMode = SetBkMode(dc, TRANSPARENT);

  +       oldBkColor = SetBkColor(dc, gc->background);


          (*func)(dc, winPoints, npoints);


  ***************

  *** 913,921 ****

                  style |= PS_JOIN_BEVEL;

                  break;

          }

          pen = ExtCreatePen(style, gc->line_width, &lb, 0, NULL);

        } else {

  !       pen = CreatePen(PS_SOLID, gc->line_width, gc->foreground);

        }

        RenderObject(dc, gc, points, npoints, mode, pen, Polyline);

        DeleteObject(pen);

  --- 917,939 ----

                  style |= PS_JOIN_BEVEL;

                  break;

          }

  +       switch (gc->line_style) {

  +       case LineSolid:      style |= PS_SOLID; break;

  +       case LineOnOffDash:  style |= PS_DOT; break;

  +       case LineDoubleDash: style |= PS_DASH; break;

  +       default:             style |= PS_SOLID; break;

  +       }

          pen = ExtCreatePen(style, gc->line_width, &lb, 0, NULL);

        } else {

  !       int style;

  !       switch (gc->line_style) {

  !       case LineSolid:      style = PS_SOLID; break;

  !       case LineOnOffDash:  style = PS_DOT; break;

  !       case LineDoubleDash: style = PS_DASH; break;

  !       default:             style = PS_SOLID; break;

  !       }

  !

  !       pen = CreatePen(style, gc->line_width, gc->foreground);

        }

        RenderObject(dc, gc, points, npoints, mode, pen, Polyline);

        DeleteObject(pen);


  PatchFiles:

  tkWinDraw.c




  Changed to RFE, because at the moment we don't require this in Tk
  (which doesn't mean we won't include it after further analysis). 
  -- 08/20/1999 hobbs
  8.3b1 has the dash part of the dash patch. 
  -- 12/13/1999 hobbs


tkt_uuid: 220581ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 2
foundin: obsolete: 8.1
resolution: Fixed
title: .text dump counts by bytes, not chars
comment:
  OriginalBugID: 2582 Bug
  Version: 8.1
  SubmitDate: '1999-08-19'
  LastModified: '2000-02-03'
  Severity: SER
  Status: Released
  Submitter: hobbs
  ChangedBy: ericm
  RelatedBugIDs: 2708 4043
  OS: All
  FixedDate: '2000-02-03'
  FixedInVersion: 8.3


  In the code snippet:

  % .text insert 1.0 \xb1\xb1\xb1
  % .text dump -all 1.0 2.0
  text ±±± 1.0 text {
  } 1.6

  We see that the text widget is counting in bytes, not chars,
  when it comes to Unicode stuff.  This might also affect
  other areas of text widget indexing (search, index, ...),
  where indices are required or returned.

  The problem is in tkText.c:DumpLine, where the function is iterating from the 0'th byte to the end byte of the line, printing out each tkText segment as it goes.  It uses a dumb helper function to format the output, and it gives the offsets to that function in bytes.  The helper doesn't have enough information to be able to fix the offset, so it must be done in DumpLine.  It's probably easiest to continue to use bytes as the iterator and just munge the value before printing it.

  - eric

  -- 02/02/2000 ericm

  OK, the actual fix was a little different than I expected.  I modified the helper function to take the index offsets in a slightly different form (a TkTextIndex structure instead of two integer offsets), and I modified DumpLine to conform to this new spec.  The helper function then has enough information to use TkTextPrintIndex to format the index into a readable value.  This fix is in 8.3 final.

  - eric

  -- 02/03/2000 ericm


tkt_uuid: 220582ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.0p2
resolution: Fixed
title: unix/configure needs -R<X11-path>
comment:
  OriginalBugID: 2586 Bug
  Version: 8.0p2
  SubmitDate: '1999-08-20'
  LastModified: '1999-08-20'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 5.6
  Machine: Other
  FixedDate: '1999-08-20'
  FixedInVersion: 8.2


  Name:
  Hallvard B Furuseth

  ReproducibleScript:
  # login on a host with /local/X11R6/lib/libX11.so but not libX11.a
      cd tk8.0/unix
      ./configure;
      make -s all install test

  ObservedBehavior:
  wish aborts while loading because it doesn't find libX11.so

  DesiredBehavior:
  workingn wish (without having to set LD_LIBRARY_PATH)

  Patch:
  I _think_ this should do it, though I have never hacked autoconf stuff.
  Afterwards configure must be rebuilt.

  --- unix/configure.in.bakMon Aug 16 06:54:23 1999
  +++ unix/configure.inWed Aug 18 18:00:34 1999
  @@ -179,3 +179,7 @@
       AC_MSG_RESULT($i)
  -    XLIBSW="-L$i -lX11"
  +    if test -r $i/libX11.so -o -r $i/libX11.sl; then
  +XLIBSW="-L$i -R$i -lX11"
  +    else
  +XLIBSW="-L$i -lX11"
  +    fi
       x_libraries="$i"
  @@ -188,3 +192,3 @@
       else
  -XLIBSW="-L$x_libraries -lX11"
  +XLIBSW="-L$x_libraries -R$x_libraries -lX11"
       fi

  PatchFiles:
  unix/configure.in
      unix/configure



  8.0p2 is an old version to be running on at this point, as there
  are more stable releases in the 8.0 and 8.2 lines where this
  bug has been fixed. 
  -- 08/20/1999 hobbs


tkt_uuid: 220583ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: wish fails to bind on AIX 4.3.2
comment:
  OriginalBugID: 2591 Bug
  Version: 8.2
  SubmitDate: '1999-08-20'
  LastModified: '1999-09-20'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: AIX
  OSVersion: 4.3.2
  Machine: RS6000
  FixedDate: '1999-09-20'
  FixedInVersion: 8.2.1
  ClosedDate: '1999-08-21'


  Name:
  Dave Marquardt

  Extensions:
  None

  CustomShell:
  Modified generated Makefile to specify a copy of

  ReproducibleScript:
  Having fixed a previous bug where ldAix didn't exist by modifying the
      Makefile to specify the ldAix from
      the Tcl 8.2 source, wish still fails to bind.  Just run "make" to see
      this.

  ObservedBehavior:
  When binding wish, I see many errors related to unresolved symbols:
      
      rm -f libtk8.2.so
      /usr/local/src/tcl8.2.0/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp
      -H512 -T512 -bnoentry -o libtk8.2.so tk3d.o tkArgv.o tkAtom.o tkBind.o
      tkBitmap.o tkClipboard.o tkCmds.o  tkColor.o tkConfig.o tkConsole.o
      tkCursor.o tkError.o tkEvent.o  tkFocus.o tkFont.o tkGet.o tkGC.o
      tkGeometry.o tkGrab.o tkGrid.o  tkMain.o tkObj.o tkOldConfig.o
      tkOption.o tkPack.o tkPlace.o  tkSelect.o tkUtil.o tkVisual.o tkWindow.o
        tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o
      tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o  tkUnixFocus.o
      tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o  tkUnixMenubu.o
      tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o  tkUnixSend.o tkUnixWm.o
      tkUnixXId.o tkStubInit.o tkStubLib.o tkButton.o tkEntry.o tkFrame.o
      tkListbox.o  tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkScale.o
      tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o
      tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o  tkCanvUtil.o
      tkCanvWind.o tkRectOval.o tkTrig.o !
      tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o tkText.o
      tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o  tkTextMark.o
      tkTextTag.o tkTextWind.o -L/usr/local/lib -L/usr/local/src/tcl8.2.0/unix
       -lX11 -ldl -lm -lc
      noDotA="libtk8.2.so"
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetString
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Free
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_InitHashTable
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Panic
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewIntObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ListObjAppendElement
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetIndexFromObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_WrongNumArgs
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetStringFromObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetObjResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetIntObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewStringObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetStringObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Alloc
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetThreadData
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_QueueEvent
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CancelIdleCall
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DoWhenIdle
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateTimerHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Preserve
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetEncoding
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringInit
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringAppend
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ExternalToUtf
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringSetLength
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Release
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringFree
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_FreeEncoding
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ResetResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetInt
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetDoubleFromObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetIntFromObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetDouble
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetBooleanFromObj
      ld: 0711-317 ERROR: Undefined symbol: .TclpGetTime
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetMaxBlockTime
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteEventSource
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ServiceEvent
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateEventSource
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateExitHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateFileHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteFileHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteHashEntry
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DoOneEvent
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringStartSublist
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringAppendElement
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringEndSublist
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfToExternalDString
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetBoolean
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendElement
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SplitList
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Merge
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_IsSafe
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_TranslateFileName
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateInterp
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteInterp
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_PrintDouble
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_FirstHashEntry
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_StringMatch
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UniCharToUtf
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfToExternal
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfToUniChar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetEncodingName
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NextHashEntry
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteHashTable
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateEncoding
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewListObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ListObjGetElements
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Realloc
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NumUtfChars
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewBooleanObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetObjResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UniCharIsUpper
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UniCharToLower
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DuplicateObj
      ld: 0711-317 ERROR: Undefined symbol: .TclFreeObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UniCharToUpper
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfAtIndex
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfNext
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AddErrorInfo
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_OpenFileChannel
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_PosixError
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Seek
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Close
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Read
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_BackgroundError
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteCommandFromToken
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateCommand
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetChannelOption
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_EventuallyFree
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GlobalEval
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ExternalToUtfDString
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ScanElement
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ConvertElement
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetStringResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ObjGetVar2
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ObjSetVar2
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_TraceVar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendToObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_NewDoubleObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetAssocData
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendStringsToObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetAssocData
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetVar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateObjCommand
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UntraceVar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_EvalObjv
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ListObjLength
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ListObjIndex
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_ListObjReplace
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_EvalObjEx
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AppendObjToObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetCommandInfo
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Eval
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_HideCommand
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_VarEval
      ld: 0711-317 ERROR: Undefined symbol: Tcl_Free
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DStringGetResult
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_AllowExceptions
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteTimerHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Sleep
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetBooleanObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetVar2
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetLongObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetLongFromObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetVar2Ex
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetObjErrorCode
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetDoubleObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar2Ex
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetCommandInfo
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetChannel
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Write
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfPrev
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar2
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfToLower
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_RegExpCompile
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_RegExpExec
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_RegExpRange
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UniCharIsAlpha
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_PkgRequire
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetMaster
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetInterpPath
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetStdChannel
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_WriteChars
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UtfToTitle
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Gets
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Exit
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_DeleteChannelHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CommandComplete
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateChannelHandler
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_RecordAndEval
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_WriteObj
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Flush
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_FindExecutable
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_EvalFile
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SourceRCFile
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetErrno
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Init
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateChannel
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetStdChannel
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_PkgProvideEx
      ld: 0711-317 ERROR: Undefined symbol: tclStubsPtr
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_Eof
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_LinkVar
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_InterpDeleted
      ld: 0711-317 ERROR: Undefined symbol: .Tcl_UnlinkVar
      ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
      information.
      make: 1254-004 The error code from the last command is 8.
      
      Stop.

  DesiredBehavior:
  I expect to see no such errors.



  As Larry Virden pointed out on the newsgroup, there is no reference
  to -ltcl anywhere, which is why all the Tcl calls aren't being found... 
  -- 08/21/1999 hobbs
  This was a failure in the Tcl config stuff.  It is fixed in 8.2.1. 
  -- 09/20/1999 hobbs


tkt_uuid: 220584ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Tk8.2 does not include configure.in's macro definition
comment:
  OriginalBugID: 2595 RFE
  Version: 8.2
  SubmitDate: '1999-08-20'
  LastModified: '2000-01-12'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: FreeBSD-3.2-stable
  Machine: NA
  FixedDate: '2000-01-12'
  FixedInVersion: 8.3b2


  Name:
  Taguchi, Takeshi

  DesiredBehavior:
  I think Tk's configure.in has some external m4 macros, such as
      'SC_PATH_TCLCONFIG' etc.
      But dist tar ball for Tk8.2.0 does not include these macros.
      So I can not enhance configure.in.
      Would you like include them?
      
      And another request.
      Tk8.2.0 does not support XIM.
      I feel sadness, strongly.....;-(
      Would you like support XIM? Please!



  The aclocal.m4 is now included in the distribution.

  As for XIM, with 8.3 we have made it a run-time option, and we
  would be open to better supporting it if we receive patches. 
  -- 01/12/2000 hobbs


tkt_uuid: 220585ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Windows 8.2.0 installation has tk_patchLevel 8.2b3
comment:
  OriginalBugID: 2599 Bug
  Version: 8.2
  SubmitDate: '1999-08-20'
  LastModified: '1999-08-20'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  FixedDate: '1999-08-20'
  FixedInVersion: 8.2.1


  Name:
  Mike Bevington

  ReproducibleScript:
  run tcl82.exe to install tcl8.2 on Windows NT 4.0
      run wish82.exe - click Help, About
      
      reports:
      
      Tcl 8.2.0
      Tk 8.2b3
      
      When I build tk8.2\win from the scriptics repository source
      after nmake clean, I get a tk82.dll with the correct version.

  ObservedBehavior:
  No operational problems observed.

  DesiredBehavior:
  Tcl 8.2.0
      Tk 8.2.0



  This particular oversight has since been fixed.  Hopefully we
  bump it appropriately for the next cut... 
  -- 08/20/1999 hobbs


tkt_uuid: 220586ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: entryfield "-show" option doesn't stop cut-n-paste
comment:
  OriginalBugID: 2614 Bug
  Version: 8.0.5
  SubmitDate: '1999-08-31'
  LastModified: '1999-08-31'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: NT4 SP4
  Machine: X86
  FixedDate: '1999-08-31'
  FixedInVersion: 8.1.1


  Name:
  Shaun Lowry

  Comments:
  This is considered a security risk in what is arguably a security
      feature

  ReproducibleScript:
  entryfield .f -show "*"
      
      or 
      
      entryfield .f -show "*" -exportselection false

  ObservedBehavior:
  When cutting and pasting from an entryfield which is showing *'s, the
      cut text on the clipboard is what was actually typed in

  DesiredBehavior:
  I would expect the clipboard text to be all *'s or cut-n-paste should be
      disabled



  This was fixed on 1999-04-05. 
  -- 08/31/1999 hobbs


tkt_uuid: 220587ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Makefile generated by configure specifies wrong ldAix
comment:
  OriginalBugID: 2624 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-09-15'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2685
  OS: AIX
  OSVersion: 4.3.3
  Machine: RS6000
  FixedDate: '1999-09-15'
  FixedInVersion: 8.2.1


  Name:
  Dave Marquardt

  Comments:
  I would have modified configure.in if I could have found these lines
      there, but they don't seem to be
      there--I guess the distribution is missing something w.r.t. the
      configuration files and autoconf.

      I thought I'd submitted this bug report before, but I've lost all traces
      of it, and can't find it in the DejaNews archive of postings to
      comp.lang.tcl.

  ReproducibleScript:
  Download tk 8.2 to an AIX 4.3.2 system.  Unpack it.  Change to unix
      subdirectory.  Run

      ./configure --enable-shared

      Run make.  Note that it fails because it specifies ldAix in the TK
      source directory rather than the Tcl
      source directory, where it actually exists.

  ObservedBehavior:
  libtk fails to bind.

      Here are the lines from make's output where ldAix is specified in the
      wrong directory:

              rm -f libtk8.2.so
              /usr/local/src/tk8.2.0/unix/ldAix /bin/ld -bhalt:4 -bM:SRE
      -bE:lib.exp -H512 -T512 -bnoentry -o libtk8.2.so tk3d.o tkArgv.o
      tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o  tkColor.o
      tkConfig.o tkConsole.o tkCursor.o tkError.o tkEvent.o  tkFocus.o
      tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o  tkMain.o tkObj.o
      tkOldConfig.o tkOption.o tkPack.o tkPlace.o  tkSelect.o tkUtil.o
      tkVisual.o tkWindow.o   tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o
      tkUnixConfig.o  tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o
      tkUnixFocus.o tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o
      tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o  tkUnixSend.o
      tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o tkButton.o tkEntry.o
      tkFrame.o tkListbox.o  tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o
      tkScale.o  tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o
       tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o  tkCanvUtil.o
      tkCanvWind.o tkRectOval.o tkT!
      rig.o tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o tkText.o
      tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o  tkTextMark.o
      tkTextTag.o tkTextWind.o -L/usr/local/lib -L/usr/local/src/tcl8.2.0/unix
       -lX11 -ldl -lm -lc
      /bin/sh: /usr/local/src/tk8.2.0/unix/ldAix:  not found.

  DesiredBehavior:
  The generated Makefile should specify an existing copy of ldAix.

  Patch:
  *** configure~  Fri Aug 13 17:06:14 1999
  --- configure   Mon Aug 23 15:22:28 1999
  ***************
  *** 1524,1530 ****
        case $system in
          AIX-4.[2-9])
              SHLIB_CFLAGS=""
  !           SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
              SHLIB_LD_LIBS='${LIBS}'
              SHLIB_SUFFIX=".so"
              DL_OBJS="tclLoadDl.o"
  --- 1524,1530 ----
        case $system in
          AIX-4.[2-9])
              SHLIB_CFLAGS=""
  !           SHLIB_LD=$TCL_SHLIB_LD
              SHLIB_LD_LIBS='${LIBS}'
              SHLIB_SUFFIX=".so"
              DL_OBJS="tclLoadDl.o"

  PatchFiles:
  unix/configure



  Fixed. 
  -- 09/15/1999 hobbs


tkt_uuid: 220588ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Tk fails to compile under HP-UX
comment:
  OriginalBugID: 2649 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-08-31'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: HP-UX
  OSVersion: B.10.20
  Machine: Other
  FixedDate: '1999-08-31'
  FixedInVersion: 8.2.1


  Name:
  jso

  Comments:
  The problem arises from the use of explicit casts in a function
      declaration. By using the K&R style of typing the parameters after the
      (params) list, tk compiles cleanly. This only affects one function in
      one file: the TkpDrawHighlightBorder function in tkUnixDraw.c

  ObservedBehavior:
  Tk fails to compile while using HP's cc compiler on HP-UX B.10.20.



  Fixed header style for 8.2.1. 
  -- 08/31/1999 hobbs


tkt_uuid: 220589ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Highlight color & highlight background inverted for canvas
comment:
  OriginalBugID: 2674 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-09-01'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 7
  Machine: Other
  FixedDate: '1999-09-01'
  FixedInVersion: 8.2.1


  Name:

  Colin McDonald



  ReproducibleScript:

  pack [canvas .c -highlightcolor red] -fill both

      focus .c



  ObservedBehavior:

  The red highlight color is displayed when the canvas widget does not

      have focus,

      and not when it has focus.



  DesiredBehavior:

  Display the highlight color when the widget has focus.



  Patch:

  *** tkCanvas.c.origFri Aug 20 09:38:37 1999

  --- tkCanvas.cFri Aug 20 09:41:54 1999

  ***************

  *** 1842,1851 ****

        GC fgGC, bgGC;

        

                 

  !     bgGC = Tk_GCForColor(canvasPtr->highlightColorPtr,

        Tk_WindowId(tkwin));

        if (canvasPtr->textInfo.gotFocus) {

  ! fgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr,

    Tk_WindowId(tkwin));

        TkpDrawHighlightBorder(tkwin, fgGC, bgGC, canvasPtr->highlightWidth,

            Tk_WindowId(tkwin));

  --- 1842,1851 ----

        GC fgGC, bgGC;

        

                 

  !     bgGC = Tk_GCForColor(canvasPtr->highlightBgColorPtr,

        Tk_WindowId(tkwin));

        if (canvasPtr->textInfo.gotFocus) {

  ! fgGC = Tk_GCForColor(canvasPtr->highlightColorPtr,

    Tk_WindowId(tkwin));

        TkpDrawHighlightBorder(tkwin, fgGC, bgGC, canvasPtr->highlightWidth,

            Tk_WindowId(tkwin));



  PatchFiles:

  tkCanvas.c


tkt_uuid: 220590ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: canvas widget always draws its highlight border
comment:
  OriginalBugID: 2676 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-09-01'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: SunOS  5.5 sparc
  Machine: Other
  FixedDate: '1999-09-01'
  FixedInVersion: 8.2.1


  Name:
  Aldo MAZZILLI

  Extensions:
  TCL, TK 8.2

  ReproducibleScript:
  pack [canvas .c] [canvas .d]

  ObservedBehavior:
  Each canvas has its highlightthickness border *always* drawn.

  DesiredBehavior:
  No borders



  Occurs on all platforms. 
  -- 09/01/1999 hobbs
  This was a problem caused by GC swapping (fg <> bg) when Jim added
  better highlight support on the Mac.  This is fixed for 8.2.1. 
  -- 09/01/1999 hobbs


tkt_uuid: 220591ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: possible mispackaging
comment:
  OriginalBugID: 2686 Bug
  Version: 8.2
  SubmitDate: '1999-09-01'
  LastModified: '1999-09-01'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows 95
  Machine: X86
  FixedDate: '1999-09-01'


  Name:
  Hume Smith

  ReproducibleScript:
  puts $tcl_patchLevel,$tk_patchLevel

  ObservedBehavior:
  this printed
      8.2.0,8.2b3
      on my freshly-DLed-and-installed Winduhs 8.2 binary... the next oldest
      version ever to touch this machine is 8.0.something, so it's probably
      not some sort of collision with a previous version.

  DesiredBehavior:
  i expected to see
      8.2.0,8.2.0



  This was a problem in labelling only, and is now fixed.  The
  actual libraries are both 8.2.0. 
  -- 09/01/1999 hobbs


tkt_uuid: 220592ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Tcl/Tk Wish crashes
comment:
  OriginalBugID: 2687 Bug
  Version: 8.2
  SubmitDate: '1999-09-01'
  LastModified: '1999-09-10'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 7.5.5
  Machine: Power PC
  FixedDate: '1999-09-10'


  Name:
  Paul Whittington

  Extensions:
  Standard binary install from www.scriptics.com

  CustomShell:
  None

  ReproducibleScript:
  We've got a PowerMac 7600 with 64Mb running OS 7.5.5.
      
      The shell will run but Wish crashes.



  This is a known Mac problem, having to do with a regexp that
  causes a stack overflow.  Jim fixed this by increasing the
  alloted stack size when recompiling the sources.  We should
  also look at making the regexp more efficient. 
  -- 09/10/1999 hobbs


tkt_uuid: 220593ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 66. Aqua Window Operations
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Mac: focus-frame drawn wrongly
comment:
  OriginalBugID: 2728 Bug
  Version: 8.0.5
  SubmitDate: '1999-09-10'
  LastModified: '1999-09-10'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Macintosh
  OSVersion: 8.5
  Machine: Power PC
  FixedDate: '1999-09-10'
  FixedInVersion: 8.2


  Name:
  Andreas Leitgeb

  Comments:
  I only have irregular access to a Mac, and I'm not very much into Mac's
      either.  Usually I develop under Linux with unix/X11-variant of Tcl/Tk.

  ReproducibleScript:
  frame .f  -takefocus 1 -highlightthickness 2   -bd 5 -relief sunken
      label .f.l  -highlightthickness 2 -bd 5 -relief raised -text foo
      # the reliefs are only there to separate the highlightborders visually
      pack .f.l; pack .f
      focus -force .f.l

  ObservedBehavior:
  On Mac-Tk,  the highlightborder on the label is not drawn black at all
      (but the frame is there, just white), and the highlightborder on the
      frame is only one pixel thick. it is always one pixel thinner than
      specified to the option, and the remaining one-pixel-rectangle is not
      drawn at all.  if a window
      is placed above it, and then withdrawn, then that one-pixel-rectangle
      will remain "dirty"

  DesiredBehavior:
  Whether or not  Mac's native-look  allows for focus-rectangles,  that
      "dirty"-one-pixel-rectangle
      is definitely a bug.  However, I'd prefer highlighting of widgets, whose
      -highlight...-options are set appropriately, even on Mac's.



  Fixed in 8.2.0. 
  -- 09/10/1999 hobbs


tkt_uuid: 220594ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 03. [*button] and [label]
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title: Pointer smash in TkpDisplayButton
comment:
  OriginalBugID: 2733 Bug
  Version: 8.0.5
  SubmitDate: '1999-09-10'
  LastModified: '1999-09-15'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0 SP5
  Machine: X86
  FixedDate: '1999-09-15'
  FixedInVersion: 8.2.1


  Name:

  Kevin Kenny



  CVS:

  * RCS: @(#) $Id: tkWinButton.c,v 1.2 1998/09/14 18:23:59 stanton Exp $



  Extensions:

  Many homegrown extensions.



  CustomShell:

  Running against an unmodified core



  Comments:

  This bug is present against all releases of Tk since 7.6.  The 8.2

      general

      release does NOT fix it.

      

      A possible alternative to invoking TkpDisplayButton directly

      from ButtonProc might be to let the idle loop do the display.

      The code would look like:

      

      if ( ! ( butPtr->info.flags & REDRAW_PENDING ) ) {

          butPtr->info.flags |= REDRAW_PENDING;

          Tcl_DoWhenIdle( TkpDisplayButton, (ClientData) butPtr );

      }

      

      I'm not really confident, though, of how this might interact

      with the rest of the event processing on Windows.



  ReproducibleScript:

  # This problem is horribly difficult to reproduce; I've reconstructed

      # it from a post-mortem dump.  There is a timing problem on Windows if

      # a button is destroyed at exactly the wrong point during its creation.



  ObservedBehavior:

  The sequence of events, as I reconstruct it, is:

      

      - The button is created, and windowed into a text widget.

      - The button is scheduled for redraw.  The REDRAW_PENDING bit is set,

        and TkpDisplayButton is scheduled with Tcl_DoWhenIdle

      - A WM_PAINT event arrives, causing TkpDisplayButton to run from the

        ButtonProc function in tkWinButton.c.  REDRAW_PENDING is cleared

        from the button's instance data.

      - Another background event handler causes the button to be destroyed.

        DestroyButton doesn't see REDRAW_PENDING, and so doesn't cancel the

        Tcl_DoWhenIdle call.

      - Eventually, Tcl_ServiceIdle calls TkpDisplayButton.  The client data

        is a dangling pointer to the destroyed button's instance data.

      Results

        are unpredicatable, but unlikely to be amusing.



  DesiredBehavior:

  Clearly, Tk shouldn't crash!



  Patch:

  *** tkWinButton.c Tue Feb 23 23:22:00 1999

  --- tkWinButton.c.proposed Thu Sep  9 13:08:02 1999

  ***************

  *** 783,788 ****

  --- 783,796 ----

        BeginPaint(hwnd, &ps);

        EndPaint(hwnd, &ps);

        TkpDisplayButton((ClientData)butPtr);

  + 

  +     /*

  +      * Special note: must cancel any existing idle handler

  +      * for TkpDisplayButton;  it's no longer needed, and

  +      * TkpDisplayButton cleared the REDRAW_PENDING flag.

  +      */

  +     

  +     Tcl_CancelIdleCall( TkpDisplayButton, (ClientData) butPtr );

        return 0;

    }

    case BN_CLICKED: {



  PatchFiles:

  tkWinButton.c





  Fixed in 8.3b1. 
  -- 09/15/1999 hobbs


tkt_uuid: 220595ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: tk tests need to use LIBPATH under AIX as well
comment:
  OriginalBugID: 2797 Bug
  Version: 8.2
  SubmitDate: '1999-09-16'
  LastModified: '1999-09-20'
  Severity: LOW
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: AIX
  OSVersion: 4.3.2
  Machine: RS6000
  FixedDate: '1999-09-20'
  FixedInVersion: 8.2.1


  Name:
  Nick Kisseberth

  Comments:
  This patch also includes a line to include the definition of
      SHLIB_LD_LIBS, this is needed to work with the configuration patches
      I will post shortly.

  ObservedBehavior:
  tk's tests also need to set LIBPATH in addition to LD_LIBRARY_PATH in
      order
      to work as designed under AIX

  Patch:
  *** tk8.2.0/unix/Makefile.in    Fri Aug 13 17:06:14 1999
  --- tk8.2.0-AIX/unix/Makefile.in        Sat Sep 11 17:40:15 1999
  ***************
  *** 197,202 ****
  --- 197,203 ----
    # The values of the symbolis normally set by the configure script.

    SHLIB_LD = @SHLIB_LD@
  + SHLIB_LD_LIBS = @SHLIB_LD_LIBS@

    # Additional search flags needed to find the various shared libraries
    # at run-time.  The first symbol is for use when creating a binary
  ***************
  *** 396,401 ****
  --- 397,403 ----
    test: tktest
          LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH};  export LD_LIBRARY_PATH;  +       LIBPATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; export LIBPATH;  SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH};  export SHLIB_PATH;  TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY;  ***************
  *** 406,411 ****
  --- 408,414 ----
    runtest:
          LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH};  export LD_LIBRARY_PATH;  +       LIBPATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; export LIBPATH;  SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH};  export SHLIB_PATH;  TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY;  
  PatchFiles:
  unix/Makefile.in



  Added to 8.2.1 (note small bug in patch - LD_LIBRARY_PATH should
  be LIBPATH for the LIBPATH lines). 
  -- 09/20/1999 hobbs


tkt_uuid: 220596ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: CDE window manager Close operation causes dump
comment:
  OriginalBugID: 2802 Bug
  Version: 8.2
  SubmitDate: '1999-09-16'
  LastModified: '2000-01-17'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2483
  OS: Solaris
  OSVersion: 2.6
  Machine: Other
  FixedDate: '2000-01-17'
  FixedInVersion: 8.2.1


  Name:
  Larry W. Virden

  CVS:
  August 23, 1999 15:42 EDT

  Extensions:
  Tcl / Tk 8.2, stooop 4.0.1, scwoop 2.6

  CustomShell:
  I have compiled the latest modules from the CVS.

  ReproducibleScript:
  I installed Tcl/Tk 8.2 with the latest patches cvs has returned.
      I installed stooop-4.0.1 and scwoop-2.6.
      I then ran scwoop-2.6/confdemo.tcl .  It brought up the demo fine.  To
      terminate the application, I used the Close option that CDE's window
      manager
      provides on the window title bar.

  ObservedBehavior:
  wish core dumped.
      
      Reading wish
      core file header read successfully
      Reading ld.so.1
      Reading libtk8.2.so
      Reading libtcl8.2.so
      Reading libsocket.so.1
      Reading libnsl.so.1
      Reading libX11.so.4
      Reading libdl.so.1
      Reading libm.so.1
      Reading libc.so.1
      Reading libmp.so.2
      Reading libXext.so.0
      Reading libc_psr.so.1
      program terminated by signal SEGV (no mapping at the fault address)
      (dbx 1) where                                                  
      =>[1] Tcl_DeleteHashEntry(0xef628228, 0x48, 0x132b10, 0x10d1a8,
      0x121490, 0xd8), at 0xef5d1d94
        [2] Tcl_DeleteCommandFromToken(0x8a798, 0x12e8c8, 0xe, 0xef322eb4,
      0x10d1a8, 0xd9), at 0xef5a7d50
        [3] DestroyEntry(0x12eaa8, 0xef73a7a0, 0xefffddc0, 0xefffddc0,
      0xef322eb4, 0xef2c672c), at 0xef6e20b0
        [4] Tk_HandleEvent(0x12e9c8, 0xef73a7a0, 0x8a798, 0x12e9c8, 0x20000,
      0x2f300), at 0xef6b04c0
        [5] Tk_DestroyWindow(0x12e9c8, 0x2d008, 0xef73a7a0, 0x0, 0x3d6a0,
      0x12e9c8), at 0xef6c8d40
        [6] Tk_DestroyWindow(0x12cf20, 0x12e9c8, 0xef73a7a0, 0x0, 0x3d6a0,
      0x12cf20), at 0xef6c8c7c
        [7] Tk_DestroyWindow(0x10ad78, 0x12cf20, 0xef73a7a0, 0x143688,
      0x3d6a0, 0x10ad78), at 0xef6c8c7c
        [8] Tk_DestroyWindow(0x97188, 0x10ad78, 0xef73a7a0, 0xde614, 0x3d6a0,
      0x97188), at 0xef6c8c7c
        [9] Tcl_DeleteCommandFromToken(0x8a798, 0xac6f0, 0x8a988, 0x13f900,
      0xef322eb4, 0xef5e3ed4), at 0xef5a7d9c
        [10] TclTeardownNamespace(0x8aa18, 0x0, 0x8a9e4, 0x13f900, 0x146450,
      0x8a798), at 0xef5e3f14
        [11] DeleteInterpProc(0x8a798, 0xef61946c, 0xef73a7a0, 0x91428,
      0x8a798, 0x896f0), at 0xef5a6b58
        [12] Tk_HandleEvent(0x896f0, 0xef73a7a0, 0x8a798, 0x896f0, 0x0,
      0x2f300), at 0xef6b0520
        [13] WindowEventProc(0x146148, 0xfffffffd, 0xef61946c, 0x1436a0,
      0xef322eb4, 0xef5e7434), at 0xef6b0a1c
        [14] Tcl_ServiceEvent(0xef6b09a0, 0x22c50, 0x146140, 0xfffffffd, 0x0,
      0x22e14), at 0xef5e734c
        [15] Tcl_DoOneEvent(0x0, 0xef61946c, 0x22c50, 0x0, 0x22c68, 0x1), at
      0xef5e766c
        [16] Tk_MainLoop(0x22fa0, 0xef61946c, 0x4, 0x0, 0xefffe438, 0x22fa0),
      at 0xef6b0ab8
        [17] Tk_MainEx(0x29ee8, 0xef74a6d4, 0xefffe438, 0x22fa0, 0xef73a7a0,
      0x10c60), at 0xef6bcf50
        [18] main(0x2, 0xefffe5c4, 0x20d78, 0x20c00, 0x0, 0x0), at 0x10c40
      (dbx 2)

  DesiredBehavior:
  no core dumps from wish



  This looks to be related to 2483, where long window pathnames used
  in megawidget like code could overflow a static buffer.  This was
  fixed in 8.2.1 (I can't reproduce this bug in 8.3). 
  -- 01/17/2000 hobbs


tkt_uuid: 220597ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: raise a mainwindow works different on winnt/95 or win98
comment:
  OriginalBugID: 2851 Bug
  Version: 8.2
  SubmitDate: '1999-09-21'
  LastModified: '1999-12-14'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Other
  OSVersion: winnt win98 win95
  Machine: NA
  FixedDate: '1999-12-14'
  FixedInVersion: 8.2.1


  Name:
  Thomas Schwarze

  ReproducibleScript:
  I have observed that on WinNT/95 the code:
      
        wm withdraw .
        wm deiconify .
      
      raises a mainwindow to the top of the screen, on win98 it doesnt !!!
      The only q.'n.d. solution for win98 is:
        
        wm deiconify .
        wm iconify .
        wm deiconify .
      
      looks a little bit strange, but works.

  ObservedBehavior:
  see 6)

  DesiredBehavior:
  see 6)



  8.2.1 should have fixed this to make the various Windows
  versions always raise the toplevel to the top. 
  -- 12/14/1999 hobbs


tkt_uuid: 220598ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Tk8.2.0/unix ldAix-script does not exist for RS6000.
comment:
  OriginalBugID: 2917 Bug
  Version: 8.2
  SubmitDate: '1999-09-27'
  LastModified: '1999-09-28'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: AIX
  OSVersion: AIX 4.2.1
  Machine: RS6000
  FixedDate: '1999-09-28'
  FixedInVersion: 8.2.1


  Name:
  Sang-Lung CHAN

  After configure tk8.2, then run make will produce the error no idAix file found

  This was a bug in the config script, fixed in 8.2.1. 
  -- 09/28/1999 hobbs


tkt_uuid: 220599ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Bug in FocusGroup Handling under CDE
comment:
  OriginalBugID: 2960 Bug
  Version: 8.2
  SubmitDate: '1999-09-28'
  LastModified: '2000-04-07'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Solaris
  OSVersion: 2.7
  Machine: Other
  FixedDate: '2000-04-07'
  FixedInVersion: 8.3.1


  Name:

  Donal Fellows



  Comments:

  This fixes a long-standing bug in Tk (it was certainly there

      in 8.0.4) which made keyboard navigation of the standard

      open/save file dialogs nearly impossible.  Since keyboard

      navigation is important for Power Users, this fix is a good

      idea.  It doesn't impact much on beginners though, who

      tend to prefer the point-and-grunt style of interaction...



  ReproducibleScript:

  First, run the following code in wish running under CDE (it might

      exist under other window managers/environments, but I have not

      checked):

          set tk_strictMotif 0

          tk_getOpenFile -initialfile foobar

      Now, try to use the left arrow key (not the mouse) to move

      backward within the entry field to between the "o" and the "b". 

      You will find that it is impossible to move more than one

      character back.  This is a problem!



  ObservedBehavior:

  The problem is that the focus handling for focus groups is too

      agressive (given the context of CDE at least, which traps

      some keystrokes for its own nefarious purposes.)  FocusIn

      events are only meaningful when they have a detail field (%d)

      of NotifyNonlinear or NotifyNonlinearVirtual.



  DesiredBehavior:

  I expect to be able to use the keyboard to navigate about the entry

      widget!



  Patch:

  *** comdlg.tcl.old      Tue Sep 28 10:50:29 1999

  --- comdlg.tcl.new      Tue Sep 28 10:51:30 1999

  ***************

  *** 217,222 ****

  --- 217,228 ----

    proc tkFocusGroup_In {t w detail} {

        global tkPriv tkFocusIn

    

  +     if {[string compare $detail NotifyNonlinear] &&

  +       [string compare $detail NotifyNonlinearVirtual]} {

  +       # This is caused by mouse moving out&in of the window *or*

  +       # ordinary keypresses some window managers!

  +       return

  +     }

        if {![info exists tkFocusIn($t,$w)]} {

          set tkFocusIn($t,$w) ""

          return



  PatchFiles:

  comdlg.tcl





  Confirmed in CDE and fixed for 8.3.1. 
  -- 04/07/2000 hobbs


tkt_uuid: 220600ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: missing symbol in windows binary tk82.lib
comment:
  OriginalBugID: 2963 Bug
  Version: 8.2
  SubmitDate: '1999-09-28'
  LastModified: '1999-11-16'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Windows NT
  OSVersion: 4.0 SP4
  Machine: X86
  FixedDate: '1999-11-16'
  FixedInVersion: 8.2.2


  Name:
  Christopher Volpe

  ReproducibleScript:
  I'm building a 3rd party application that links with theTcl/Tk
      libraries. This is the first time I have tried it with Tcl/Tk 8.2. Using
      the library file tk82.lib that ships with the MS Windows binary
      distribution, the linker complains about the missing symbol
      "_TkWinChildProc@16". I used the cygwin "nm" command to check for
      symbols in tk82.lib and confirmed that this symbol is indeed not in the
      library. But then I downloaded the source distributions for Tcl and Tk
      8.2, built each of them, and discovered that the symbol
      "_TkWinChildProc@16" does appear in the tk82.lib file that I built.
      Using this file solves my problem, but I don't think it was intended
      that the library you shipped as part of the binary distribution would be
      missing this symbol.



  8.2.2 shows this symbol, as seen with NT's Explorer QuickView
  of tk82.dll. 
  -- 11/16/1999 hobbs


tkt_uuid: 220601ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: tk_getOpenFile & tk_getSaveFile core dump
comment:
  OriginalBugID: 2995 Bug
  Version: 8.2
  SubmitDate: '1999-09-29'
  LastModified: '1999-10-22'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Digital Unix
  OSVersion: Tru64Unix 4.0f
  Machine: Other
  FixedDate: '1999-10-22'
  FixedInVersion: 8.2.1


  Name:
  Ingo Brunberg

  ReproducibleScript:
  start up wish8.2
      tk_getOpenFile or tk_getSaveFile

  ObservedBehavior:
  unable to alloc 0 bytes
      Abort (core dumped)

  DesiredBehavior:
  a Filechooser Dialogbox coming up



  This was fixed in 8.2.1. 
  -- 10/22/1999 hobbs


tkt_uuid: 220602ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 75. wish
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: wish panics on bad command line arguments
comment:
  OriginalBugID: 3052 Bug
  Version: 8.2
  SubmitDate: '1999-10-06'
  LastModified: '1999-11-02'
  Severity: MED
  Status: Released
  Submitter: stanton
  ChangedBy: hobbs
  RelatedBugIDs: 1472
  OS: All Windows
  FixedDate: '1999-11-02'
  FixedInVersion: 8.2.2


  In WinMain, when an error occurs during initialization, it calls WishPanic to display the message.  This is inappropriate because WishPanic calls DebugBreak().  WinMain should display a message box directly and then cleanly exit with an appropriate return code instead.



  Fixed for 8.2.2. 
  -- 11/02/1999 hobbs


tkt_uuid: 220603ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: binding for Shift-Tab should be virtual event
comment:
  OriginalBugID: 3163 Bug
  Version: 8.2
  SubmitDate: '1999-10-22'
  LastModified: '2000-01-19'
  Severity: LOW
  Status: Released
  Submitter: hobbs
  ChangedBy: ericm
  OS: Linux
  FixedDate: '2000-01-19'
  FixedInVersion: 8.3


  On systems like Linux and IRIX, the Shift-Tab actually maps to
  ISO_Left_Tab, and on HP it is hpBackTab.  Instead of relying
  on Shift-Tab, we should make a <<PrevWindow>> virtual event
  (for our purposes) and add events to that.

  I added the <<PrevWindow>> virtual event, with a <Shift-Tab> binding, and OS specific bindings for Linux, IRIX and HP-UX.  We can add others as we learn about them.

  - eric

  -- 01/19/2000 ericm


tkt_uuid: 220604ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 32. Key Symbols
priority: 2
foundin: obsolete: 8.2.1
resolution: Fixed
title: 'event generate . <Left>' generates bad %K %A
comment:
  OriginalBugID: 3195 Bug
  Version: 8.2.1
  SubmitDate: '1999-10-26'
  LastModified: '1999-10-30'
  Severity: SER
  Status: Released
  Submitter: hobbs
  ChangedBy: hobbs
  OS: Windows NT
  FixedDate: '1999-10-30'
  FixedInVersion: 8.2.2


  Do:

  bind . <KeyPress> {puts "K:%K k:%k a:%A"}
  pack [button .b -text Event -command {event generate . <Left>}]

  Click on button.  Fails for other sym-type events (Home, Up, ...)
  but works fine on Unix.


  Tk's XKeysymToKeycode was letting VkKeyScan return codes for
  such special sym events that didn't map into the right area.
  This could be due to bad casting, but the fix was to do the
  special key table lookup ahead of time. 
  -- 10/30/1999 hobbs


tkt_uuid: 220605ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 2
foundin: final: 8.0.5
resolution: Fixed
title:
  slowdown with tcl/tk 8.0.5 and above when creating and destroying windows with large number of widgets in them

comment:
  OriginalBugID: 3220 Bug
  Version: 8.0.5
  SubmitDate: '1999-10-28'
  LastModified: '2000-04-09'
  Severity: SER
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2824 2239 3410 2875
  OS: IRIX
  OSVersion: IRIX64 6.5
  Machine: Other
  FixedDate: '2000-04-09'
  FixedInVersion: 8.3


  Name: Jamie Hecker

  Comments:
  I originally reported this bug as a problem with tclpro1.2, but further
  testing (and help from scriptics) has pointed out that it appears to be
  inherent in all versions of tcl/tk after 8.0.3.  There is a substantial
  difference in speed between 8.0.3 and 8.0.5 and above (I have tried
  8.2.0 and had the same problem).

  ReproducibleScript:
  proc test {} {

      set top [toplevel .toplevel]

      ::wm geometry $top 400x800+600+100

      set canvas [canvas $top.sc -width 400 -height 1000]
      frame $canvas.win -width 100 -height 1000
      $canvas create window 300 25  -window $canvas.win -anchor n

      for {set i 1} {$i <= 200} {incr i} {

      $canvas create text 10 [expr $i * 50]  -text "simple text row $i"  -anchor w

  scale $canvas.win.scale$i -width 5 -label "scale2 $i"  -orient horizontal -length 100

  place $canvas.win.scale$i -in $canvas.win -x 0  -y [expr $i * 50]  -anchor w 

      }

      place $top.sc -x 0 -y 0
      return $top
  }

  for {set i 0} {$i < 100} {incr i} {

      set iteration_time [time "test; update idletasks; destroy .toplevel
  "]

      puts "$i: $iteration_time"

  }

  ObservedBehavior:
  the test case runs approximately 7 times slower after 99 iterations on
  8.0.5.  on 8.0.3 the difference is small (in fact the speed it takes on
  its 99th iteration on 8.0.3 is faster than the first iteration on
  8.0.5).   I have run the test case on Windows NT, and did not see the
  same performance degredation (under 8.0.5), so it appears to be IRIX
  specific

  DesiredBehavior:
  Since the nature of our application requires that widgets be created
  and destroyed very often, I would hope that this operation would have
  little impact on the performance of the application.



  The performance problem is potentially due to TK_USE_INPUT_METHODS,
  which gets defined in tk.h.  Try to #define that out and see if
  the performance problem disappears.  Starting with 8.3, we are
  moving towards getting that #def runtime switchable, with the
  default off. 
  -- 01/07/2000 hobbs
  The related reports all have some similar slowdown seen, relating
  to impaired usage over time or extensive widget creation. 
  -- 01/25/2000 hobbs

  It has been confirmed that moving the XInputMethods code to a
  runtime conditional (tk useinputmethods boolean) has eliminated
  this slowdown for 8.3+.  For earlier versions, make sure to compile
  with the XInputMethods undefined (tk.h).  You can see the effect
  by running Tk8.3 on a previously affected machine with and without
  [tk useinputmethods] set (default off).

  This seems to be an xserver related problem, as not all xservers
  with XInputMethods are affected.  The problem is likely some leak
  in system level resources. 
  -- 04/09/2000 hobbs


tkt_uuid: 220606ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 09. [listbox]
priority: 2
foundin: obsolete: 8.2.1
resolution: Fixed
title: -listvar for listbox
comment:
  OriginalBugID: 3301 RFE
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-12-09'
  Severity: LOW
  Status: Released
  Submitter: hobbs
  ChangedBy: hobbs
  OS: All
  FixedDate: '1999-12-09'
  FixedInVersion: 8.3b1


  -listvar would be equiv to entry's -textvar.

  Somewhat mutually exclusive to the RFE to add itemconfigure
  (ability to change fg/bg color, font for specific listbox items),
  but may be more useful.


tkt_uuid: 220607ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 39. Image Basics
priority: 2
foundin: None
resolution: Fixed
title: need an 'is image in use' query
comment:
  OriginalBugID: 3327 RFE
  Version: 8.2
  SubmitDate: '1999-11-05'
  LastModified: '2000-05-15'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: ericm
  OS: Other
  OSVersion: NetBSD-1.4.1/i386
  FixedDate: '2000-05-15'
  FixedInVersion: 8.4a1


  Name: hume smith

  DesiredBehavior:
  In a program like Quill, it's rather hard to keep track of whether or
  not an image is being used to know whether to erase it.  It would be
  nice to be able to simply ask the widget whether any widgets want it...
  I'm guessing this is known for the sake of Tk_ImageChanged, and requires
  little more than a script interface?


  I added an [image inuse] command with the semantics you describe:

  % image create photo foo -file foo.gif
  foo
  % image inuse foo
  0
  % button .b -image foo
  .b
  % image inuse foo
  1

  This will go out with 8.4a1.

  - eric
   
  -- 05/15/2000 ericm


tkt_uuid: 220608ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 2
foundin: obsolete: 8.2
resolution: Fixed
title: Race in tkUnixWm.C:TkCoordsToWindow leads to X error
comment:
  OriginalBugID: 3328 Bug
  Version: 8.2
  SubmitDate: '1999-11-05'
  LastModified: '1999-12-22'
  Severity: CRIT
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: Linux-Red Hat
  FixedDate: '1999-12-22'
  FixedInVersion: 8.3b1


  Name:

  David Ackley


  CustomShell:

  Only the included patch.


  ReproducibleScript:

  TO DUPLICATE:


      #start of deathwish.tcl

      puts "set tk_version [set tk_version]"

      update

      for {set i 0} {1} {incr i} {

          set xy [winfo pointerxy .]

          set win [winfo containing [lindex $xy 0] [lindex $xy 1]]

          after 10

      }

      #end of deathwish.tcl


      #start of deathwin.tcl

      for {set i 0} {1} {incr i} {

          toplevel .foo

          update

          after 500

          destroy .foo

      }

      #end of deathwin.tcl


      Do 'wish deathwish.tcl'.  Get your window manager to place windows

      automatically.  My window manager places this window at 0,0.


      Do 'wish deathwin.tcl' as well.  Mine repeatedly puts .foo at 0,0.


      Now you have .foo blinking on and off (over the deathwish window,

      although I don't think that matters).


      Put the pointer into the area where the .foo window is being created

      and destroyed.  Wait.  Watch deathwish.tcl get an X error and die

      (BadWindow, from X_TranslateCoords).  (If you have to wait more than

      ten or fifteen seconds, your experience is very different than mine.)


  ObservedBehavior:

  $ wish deathwish.tcl

      set tk_version 8.0

      X Error of failed request:  BadWindow (invalid Window parameter)

        Major opcode of failed request:  40 (X_TranslateCoords)

        Resource id in failed request:  0x140e7da

        Serial number of failed request:  1911

        Current serial number in output stream:  1911

      $


  DesiredBehavior:

  DIAGNOSIS:


      There is a race condition in tkUnixWm.c, at least in versions 8.0

      through 8.2, perhaps earlier.  Tk4.2 does not suffer from the problem;

      it appears to have been introduced whenever the concept of 'embedded

      toplevel' windows (for the Tcl plug-in?) appeared.


      In tkUnixWm.c, TkCoordsToWindow uses XTranslateCoordinates on a series

      of windows down from the root window of the relevant screen.  At each

      step, the 'child' window returned from one XTranslateCoordinates call

      is used as the 'parent' in the subsequent XTranslateCoordinates call.


      No provision is made to handle the possible failure of a

      XTranslateCoordinates call.  However, it is possible that the returned

      'child' window will be destroyed between the time it is returned from

      one call and the time it is supplied in the next call.  In such cases,

      the latter XTranslateCoordinates call will fail with a BadWindow

      error, and take the application down with it.


      SOLUTION:


      The supplied patch against tk8.2.0 corrects the problem, albeit in

      less than optimal fashion.  It sets an error handler around each call

      to XTranslateCoordinates, and jumps back to the top of the routine if

      a call fails.  As a desperation fallback, if find we've restarted more

      than a few times in a single call, we return NULL.  This amounts to

      bogusly claiming that the pointer is not in any of the application's

      windows, even though it might be --- but if we've tried several times

      and failed to locate which one, things must be pretty dynamic on the

      server, so perhaps we could get away with this little lie..  And

      perhaps not --- but it's still better than an X protocol error and

      death. 


      The patch below is likely suboptimal, at least because:

      (1) It sets and clears the errorhandler inside the loop.  Would be

          better to move that out, but the loop has too many exits for me to

          touch. 

      (2) The restart point might be higher than necessary.  Perhaps the

          original parent could be saved and reused.


  Patch:

  diff -c tkUnixWm.c.orig tkUnixWm.c

  *** tkUnixWm.c.origSun Oct  3 20:22:35 1999

  --- tkUnixWm.cSun Oct  3 23:36:47 1999

  ***************

  *** 3490,3495 ****

  --- 3490,3496 ----

        WmInfo *wmPtr;

        TkWindow *winPtr, *childPtr, *nextPtr;

        TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;

  +     int spincount = 0;


        /*

         * Step 1: scan the list of toplevel windows to see if there is a

  ***************

  *** 3498,3503 ****

  --- 3499,3505 ----

         * coordinates.

         */


  +  restart:

        parent = window = RootWindowOfScreen(Tk_Screen(tkwin));

        x = rootX;

        y = rootY;

  ***************

  *** 3529,3539 ****

         */


        while (1) {

  ! if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,

  ! x, y, &childX, &childY, &child) == False) {

  !     panic("Tk_CoordsToWindow got False return from XTranslateCoordinates");

    }

  ! if (child == None) {

        return NULL;

    }

    for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL; 

  --- 3531,3567 ----

         */


        while (1) {

  !         /* Sun Oct  3 23:33:17 1999 Ackley: Need to be careful.  Between

  !    (1) the time we get a child window back from one 

  !        call to XTranslateCoordinates, and 

  !            (2) the time that we use that window as parent 

  !        in the subsequent call of XTranslateCoordinates, 

  !            that window might be destroyed.   If so the latter

  !    XTranslateCoordinates gets a Bad Window error.  So, we

  !    (1) Ignore X errors here

  !    (2) If XTranslateCoords returns false, we going to make sure

  !         we aren't looping too much.  If so, we'll just bogusly declare

  !        that the pointer is NOT in our windows, otherwise

  !    (3) We'll just jump back to restart again from the root(s) 

  !        and hope the churn on the server has calmed down. 

  ! */

  ! 

  !         int result;

  ! Tk_ErrorHandler errHandler;

  ! errHandler = Tk_CreateErrorHandler(dispPtr->display, -1, -1, -1,

  !    (Tk_ErrorProc *) NULL, (ClientData) NULL);

  !       

  ! result = 

  !   XTranslateCoordinates(Tk_Display(tkwin), parent, window,

  ! x, y, &childX, &childY, &child);

  ! Tk_DeleteErrorHandler(errHandler);

  ! 

  ! if (result == False) {

  !   if (++spincount > 5) return NULL; /* Last ditch lie during utter chaos.. */

  !   goto restart;

    }

  ! 

  !         if (child == None) {

        return NULL;

    }

    for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL;


  PatchFiles:

  tkUnixWm.c




  This could also occur in Tix through another means.  A different
  fix was applied for 8.3b1 where a message would be printed to
  stderr, but no panic will occur. 
  -- 12/22/1999 hobbs


tkt_uuid: 220609ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 2
foundin: obsolete: 8.2.1
resolution: Fixed
title: Window "." flashes under windows when tk starts
comment:
  OriginalBugID: 3338 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: All Windows
  FixedDate: '2000-01-06'
  FixedInVersion: 8.3b2


  Name:
  Georgios Petasis

  ObservedBehavior:
  When running an application under Windows 98 with directx 7.0 with tk
      8.2.1, the main window appears and disappears quickly, even if
      the first command in the script is "wm withdraw .". This problem has
      started with tk 8.2.1.

  DesiredBehavior:
  Applications starting normally, without getting this "flash" when just
      started.



  This has been fixed in 8.3b2.  The problem was that in 8.2.1,
  the Windows-style behavior to ensure that a deiconified window
  was raised to the top caused it to be mapped before waiting
  for geometry updates to occur (during idle time).  This has
  been changed to occur as an idle event. 
  -- 01/06/2000 hobbs


tkt_uuid: 220610ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 2
foundin: obsolete: 8.2.1
resolution: Fixed
title: tk configure and test failure
comment:
  OriginalBugID: 3348 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-12-17'
  Severity: MED
  Status: Released
  Submitter: techsupp
  ChangedBy: hobbs
  OS: IRIX
  OSVersion: IRIX64 6.5.5
  FixedDate: '1999-12-17'
  FixedInVersion: 8.3b1


  Name:
  Nils H. Busch

  ReproducibleScript:
  enc CC=cc configure --enable-prefix=/home/ --enable-shared --enable
      threads
      make
      make test

  ObservedBehavior:
  compiler sgi cc v 7.3
      configure script tries to use gcc despite enc CC=cc and disabling gcc in
      configure
      modification to Makefile to eliminate unrecognized compiler options :
      n32 instead of -mabi=n32 and commenting out warning directives
      in configure:
      configure:1284: gcc -pipe -c -g -O2  conftest.c 1>&5
      gcc: -pipe is not supported.
      configure: failed program was:
      #line 1277 "configure"
      #include "confdefs.h"
      
      in make:
      
      c-1552 cc: WARNING File = ./../generic/tkFont.c, Line = 3031
        The variable "resultPtr" is set but never used.
      
            Tcl_Obj *resultPtr;
      
      c-1552 cc: WARNING File = ./tkUnixFont.c, Line = 342
        The variable "srcStart" is set but never used.
      
            CONST char *srcStart, *srcEnd;
      
      cc-1552 cc: WARNING File = ./tkUnixMenu.c, Line = 661
        The variable "margin" is set but never used.
      
            int margin;
                ^
      
      cc-1552 cc: WARNING File = ./tkUnixMenu.c, Line = 939
        The variable "currentRowWidth" is set but never used.
      
            int x, y, currentRowHeight, currentRowWidth, maxWidth;
                                        ^
      
      cc-1552 cc: WARNING File = ./tkUnixMenu.c, Line = 1138
        The variable "margin" is set but never used.
      
            int margin, segmentWidth, maxX;
      
      cc-1552 cc: WARNING File = ./../generic/tkEntry.c, Line = 584
        The variable "string" is set but never used.
      
                  char *string;
                        ^
      
      cc-1552 cc: WARNING File = ./../generic/tkEntry.c, Line = 1262
        The variable "string" is set but never used.
      
            char *string;
      
      cc-1552 cc: WARNING File = ./../generic/tkCanvText.c, Line = 629
        The variable "text" is set but never used.
      
              char *text;
      
      cc-1552 cc: WARNING File = ./../generic/tkImgPPM.c, Line = 356
        The variable "firstInLine" is set but never used.
      
            int i, numFields, firstInLine;
      int main() {
      
      ; return 0; }
      
      in make test
      entry.test
      
      ==== entry-3.81 EntryWidgetCmd procedure, "xview" widget command FAILED
      ==== Contents of test case:
      
          # UTF
          # If Tcl_NumUtfChars wasn't used, wrong answer would be:
          # {0.106383 0.319149} {0.117021 0.351064} {0.117021 0.351064}
      
          set x {}
          .e xview moveto .1
          lappend x [.e xview]
          .e xview moveto .11
          lappend x [.e xview]
          .e xview moveto .12
          lappend x [.e xview]
      
      ---- Result was:
      {0.0957447 0.255319} {0.106383 0.265957} {0.117021 0.329787}
      ---- Result should have been:
      {0.0957447 0.308511} {0.106383 0.319149} {0.117021 0.329787}
      ==== entry-3.81 FAILED
      
      unixFont.test
      
      ==== unixfont-1.2 TkpGetNativeFont procedure: native FAILED
      ==== Contents of test case:
      
          font measure fixed 0
      
      ---- Result was:
      12
      ---- Result should have been:
      6
      ==== unixfont-1.2 FAILED
      
      
      ==== unixfont-5.9 Tk_MeasureChars procedure: TK_PARTIAL_OK FAILED
      ==== Contents of test case:
      
          .b.c dchars $t 0 end
          .b.c insert $t 0 "0000"
          .b.c index $t @[expr int($ax*2.5)],1
      
      ---- Result was:
      4
      ---- Result should have been:
      2
      ==== unixfont-5.9 FAILED
      
      
      ==== unixfont-9.1 GetControlCharSubst procedure: 2 chars subst FAILED
      ==== Contents of test case:
      
          .b.c dchars $t 0 end
          .b.c insert $t 0 "0\a0"
          set x {}
          lappend x [.b.c index $t @[expr $ax*0],0]
          lappend x [.b.c index $t @[expr $ax*1],0]
          lappend x [.b.c index $t @[expr $ax*2],0]
          lappend x [.b.c index $t @[expr $ax*3],0]
      
      ---- Result was:
      0 1 3 3
      ---- Result should have been:
      0 1 1 2
      ==== unixfont-9.1 FAILED
      
      
      ==== unixfont-9.2 GetControlCharSubst procedure: 4 chars subst FAILED
      ==== Contents of test case:
      
          .b.c dchars $t 0 end
          .b.c insert $t 0 "0\0010"
          set x {}
          lappend x [.b.c index $t @[expr $ax*0],0]
          lappend x [.b.c index $t @[expr $ax*1],0]
          lappend x [.b.c index $t @[expr $ax*2],0]
          lappend x [.b.c index $t @[expr $ax*3],0]
          lappend x [.b.c index $t @[expr $ax*4],0]
          lappend x [.b.c index $t @[expr $ax*5],0]
      
      ---- Result was:
      0 1 1 3 3 3
      ---- Result should have been:
      0 1 1 1 1 2
      ==== unixfont-9.2 FAILED
      
      
      unixWm.test
      
      ==== unixWm-50.1 Tk_CoordsToWindow procedure, finding a toplevel,
      x-coords FAILED
      ==== Contents of test case:
      
          eval destroy [winfo children .]
          toplevel .t -width 300 -height 400 -bg green
          wm geom .t +40+0
          tkwait visibility .t
          toplevel .t2 -width 100 -height 80 -bg red
          wm geom .t2 +140+200
          tkwait visibility .t2
          raise .t2
          set x [winfo rootx .t]
          set y [winfo rooty .t]
          list [winfo containing [expr $x - 30] [expr $y + 250]]  [winfo
      containing [expr $x - 1] [expr $y + 250]]  [winfo containing $x [expr $y
      + 250]]  [winfo containing [expr $x + 99] [expr $y + 250]]  [winfo
      containing [expr $x + 100] [expr $y + 250]]  [winfo containing [expr $x
      + 199] [expr $y + 250]]  [winfo containing [expr $x + 200] [expr $y +
      250]]  [winfo containing [expr $x + 220] [expr $y + 250]]
      
      ---- Result was:
      {} {} .t {} {} {} {} .t
      ---- Result should have been:
      {} {} .t {} .t2 .t2 {} .t
      ==== unixWm-50.1 FAILED

  DesiredBehavior:
  successful test



  The noted compiler warnings have been fixed (good smart compiler).
  The test warnings are innocuous, and due to the fact that the test
  results are based on the tests running with a specific window
  manager (not 4dwm). 
  -- 12/17/1999 hobbs


