# ticket

tkt_uuid: 219904ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: crashes when top level popup windows are destroyed in a large TCL/TK/Tix program
comment:
  OriginalBugID: 720 Bug
  Version: 8.0.3
  SubmitDate: '1998-10-13'
  LastModified: '1999-08-14'
  Severity: CRIT
  Status: Closed
  Submitter: admin
  ChangedBy: hobbs
  RelatedBugIDs: 716
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-08-14'


  ReproducibleScript:  This is the same problem I've reported before at http://www.scriptics.com/patches/tk8.0p2/tkUnixWm.c.txt

  I haven't been able to recreate the problem with small test programs yet.
  I did notice that it took up to 3 times of destroying a given popup for the 
  TCL/TK interpretter to crash during execution of a large (30k lines) program.

  This problem has been reported numerous times by other developers on the Tix mailing list.
  ObservedBehavior:  tixwish crashes with:

  X Error of failed request:  BadWindow (invalid Window parameter)
                                      Major opcode of failed request:  40 (X_TranslateCoords)
                                      Resource id in failed request:  0x1400246
                                      Serial number of failed request:  15956
                                      Current serial number in output stream:  15956

  DesiredBehavior:  Popup gets destroyed without any catastrophic side effects.

  CustomShell:  The patch is located at http://www.scriptics.com/patches/tk8.0p2/tkUnixWm.c.txt


tkt_uuid: 219905ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: wm protocol does not support WM_TAKE_FOCUS or WM_SAVE_YOURSELF on Windows
comment:
  OriginalBugID: 789 RFE
  Version: 8.0.4
  SubmitDate: '1998-11-04'
  LastModified: '2000-05-22'
  Severity: MED
  Status: Closed
  Submitter: stanton
  ChangedBy: hobbs
  RelatedBugIDs: 1644
  OS: All Windows
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '2000-05-22'


  These protocols are supported under X, but not Windows.  They have natural mappings onto Windows events, but Tk doesn't forward the information.



  We have to double check what these are supposed to do and find out what the appropriate mapping is for windows.

  - eric

  -- 04/03/2000 ericm


tkt_uuid: 219906ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Duplicate
title: tk_getOpenFile disturbs the event loop
comment:
  OriginalBugID: 830 Bug
  Version: 8.0.3
  SubmitDate: '1998-11-16'
  LastModified: '1999-08-20'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1212
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-08-20'


  Script to reproduce the problem:

  button .b -text "Open" -command {puts $x}
  pack .b

  set x [tk_getOpenFile]

  This script will hang if running from the command line as follows:

  prowish80 test.tcl

  But if the same script is sourced into the same interpreter, it works fine. This problem happens on both Unix and Windows.

  Another test case:

  > The following code runs fine from the console, but when I run in from a
  > file the button never becomes usable.  It gets created but never seems
  > to get any events sent to (i.e I can't click on it).  Is there something
  > wrong with the following code, or is this a bug?
  > By the way I'm running this on Windows NT, and versions 8.0.2 and 8.0.3
  > have the same result.
  > 
  > namespace eval Junk {
  >    proc createWidgets {b l} {
  >       variable junkvar [cmd]   ;# can call cmd from this procedure
  >       button $b -text hello -command ::Junk::cmd
  >       label $l -textvariable ::Junk::junkvar
  >       pack $b $l
  >    }
  >    proc cmd {} {tk_messageBox -message "cmd called"}
  > }
  > Junk::createWidgets .b .l
  > focus .b



  The workaround Brent gave is to add an update command before calling tk_getOpenFile.


tkt_uuid: 219907ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: tk window configure -cursor option does not report valid options
comment:
  OriginalBugID: 841 Bug
  Version: 8.0.3
  SubmitDate: '1998-11-24'
  LastModified: '1999-08-14'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 945
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-08-14'


   > Name:  Larry W. Virden
   > email:  lvirden@cas.org
   > Support:  Upgrade
   > Severity:  3
   > OperatingSystem:  Sun Solaris
   > OperatingSystemVersion:  2.6
   > Extensions:  tk
   > CustomShell:  none
   > Interpreter:  Wish
   > InterpreterVersion:  whatever version prowish80 is
   > Synopsis:  tk window configure -cursor option does not report valid options
   > 
   > ReproducibleScript:
   > . configure -cursor something
   > 
   > ObservedBehavior:
   > When I run the above line in prowish80
   > the results are
   > bad cursor spec "something"
   > 
   > DesiredBehavior:
   > bad cursor spec "something" - should be X_cursor, arrow, based_arrow_down, b
       ased_arrow_up, boat, bogosity,
   > and so forth thru the entire list.
   > 
   > Comments:
   > Having this behavior in the Unix and
   > Windows mac would solve a recurring confusion for people.


tkt_uuid: 219908ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: Bug when using negative coordinates in window geometry
comment:
  OriginalBugID: 864 Bug
  Version: 8.0.3
  SubmitDate: '1998-11-25'
  LastModified: '1999-08-06'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2326
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-08-06'


  Date: Thu, 5 Nov 1998 07:50:57 -0800 (PST)
  To: tclsupport@scriptics.com
  Subject: Bug when using negative coordinates in window geometry
  From: peter.spjuth@space.se

  Tk 8.0.3 Bug

  email:  peter.spjuth@space.se
  Support:  None
  Severity:  4
  OperatingSystem:  Windows NT
  OperatingSystemVersion:  4.0
  Synopsis:  Bug when using negative coordinates in window geometry

  ReproducibleScript:
  proc change {} {
      global test n
      if {$test == "qwerty"} {set test zxcv} else {set test qwerty}

      incr n
      if {$n < 5} {after 1000 change}
  }

  pack [label .l -textvariable test]
  set test qwerty
  set n 0
  wm geometry . -400-200
  after 1000 change


  ObservedBehavior:
  The window moves over the screen when the label's text changes.


  DesiredBehavior:



  Comments:
  I have tested this with 8.0p2 under Solaris also.
  The effect is the same there, if I run it with "wish scriptfile".
  When I source the script from the wish prompt, the bug does not appear.


tkt_uuid: 219909ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 44. Generic Fonts
priority: 1 Zero
foundin: obsolete: 8.1a2
resolution: Duplicate
title: i18n bug in Tk menus
comment:
  OriginalBugID: 871 Bug
  Version: 8.1a2
  SubmitDate: '1998-11-25'
  LastModified: '1999-05-20'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hershey
  RelatedBugIDs: 819
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-05-20'


  Subject: i18n bug in Tk menus
  From: Ben Elliston <bje@cygnus.com>
  Date: 20 Oct 1998 17:46:04 +1000
  Posted-to: comp.lang.tcl

  The following message is a courtesy copy of an article
  that has been posted to comp.lang.tcl as well.

  I feel I have found a bug in the underline handling for menu buttons
  in Tcl/Tk 8.1a2--in relation to encoding support for i18n.

  Here is a tiny uuencoded file that contains two Kanji characters (ShiftJIS
  encoded) followed by the menu hotkey, as is typically shown in
  Japanised applications.  Suppose our two Kanji characters are `#' and
  `*' respectively.  The string in the file is:

  #*(V)

  (for a total of 5 characters).

  begin 644 shiftjis.str
  )E5R.IBA;5BD*
  `
  end

  First, we'll use wish to read this string into a variable:

  set f [open shiftjis.str r]
  fconfigure $f -encoding shiftjis
  set jstring [read $f]

  # Verify it. Tcl will translate Kanji chars to `?' for your
  # Western terminal.
  puts stdout $jstring

  Next, we'll create a menu button and label it with our string:

  menubutton .mb -text $jstring
  pack .mb

  Since we have five characters, you would expect that underlining index
  0 of the menu button label to underline `#' and index 3 to underline `V'.
  Underlining `V' is what I want to do.

  Interesting things happen if you manually underline each index in turn
  and observe:

  .mb configure -underline 0
  .mb configure -underline 1
  .mb configure -underline 2
  .mb configure -underline 3
  .mb configure -underline 4
  .mb configure -underline 5
  .mb configure -underline 6
  .mb configure -underline 7

  The underlining appears for index 0, but not 1 or 2, 3 but not 4 or
  5.  It appears for 6 and 7.  Underlining position 7 is what is
  required to underline `V'.

  Any ideas?

  Thanks, Ben

  ---
  Ben Elliston
  bje@cygnus.com


tkt_uuid: 219910ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Stack Overrun
comment:
  OriginalBugID: 944 Bug
  Version: 8.0.4
  SubmitDate: '1998-12-14'
  LastModified: '1998-12-15'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: pat
  OS: Windows NT
  OSVersion: 4.0 Service Pack 4
  Machine: X86
  ClosedDate: '1998-12-15'


  Name:
  Tom Halliley

  CustomShell:
  None.

  ReproducibleScript:
  This happens during load time of wish80d.exe, under Windows NT.

  To reproduce, just double-click wish80d.exe.

  ObservedBehavior:

  In file tkWinMenu.c, routine TkpMenuInit, the following call

  GetTextFace(scratchDC, sizeof(menuFontDString), faceName);

  writes beyond the length of faceName.

  I found this using BoundsChecker (by NuMega).

  Also, In file tclExecute.c, routine RecordTracebackInfo, the following line:

  sprintf(buf, "\n    while executing\n\"%.*s%s\"",                numChars, cmd, ellipsis);

  writes beyond the end of buf.

  I found this using BoundsChecker (by NuMega).



  Duplicate of bug 909 (12/15/98 pat)


tkt_uuid: 219911ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 32. Key Symbols
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: Keysyms are not the same on Windows and Linux
comment:
  OriginalBugID: 947 Bug
  Version: 8.0.3
  SubmitDate: '1998-12-14'
  LastModified: '1999-10-21'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1160 870
  OS: Linux
  OSVersion: Also Windows NT 4sp3
  Machine: Other
  ClosedDate: '1999-10-21'


  Name:
  Laurent Duperval

  Extensions:
  Plus patch 3

  ReproducibleScript:
  button .b
  bind .b <KeyPress> {.b configure -text "%K"}
  pack .b -fill x



  ObservedBehavior:
  When running it on WinNT, pressing The right Alt, Shift and Control keys show
  Alt_L, Shift_L and Control_L while on Linux, it says _R. The Windows keys
  appear properly as Win_L and Win_R on WinNT but as Meta_L and Meta_R on Linux;
  this could be an Xserver issue since I don't have the latest and
  greatest on my machine (not sure about version #).  The menu key shows as
  "Menu" on Linux but "App" on WinNT.





  DesiredBehavior:
  I expect the name of all keysyms to be identical on all platforms.


tkt_uuid: 219912ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: obsolete: 8.0p2
resolution: Duplicate
title: window "raising" on windows nt doesn't often work
comment:
  OriginalBugID: 951 Bug
  Version: 8.0p2
  SubmitDate: '1998-12-14'
  LastModified: '1999-08-07'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1174
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  ClosedDate: '1999-08-07'


  Name:
  danny chen

  ReproducibleScript:
  try this short script in wish80:

  proc again {} {
      after 2000 again
      raise .
      wm deiconify .
  }
  again

  ObservedBehavior:

  on unix, no problem.  i can iconify or cover the wish window and it will pop up again in at most 2 seconds.  but on nt, the behavior is unpredictable.  sometimes the wish window will raise itself but other times it will not.
  (deiconify always works).

  interestingly, if i xhost a unix version, the raise always works (i.e. the x-server knows how to raise a window but tcl/tk does not seem to get it right all the time).



  03/01/1999 10:02 - redman - Same customer as Bug ID 1174?  In any case, it's the same problem.


tkt_uuid: 219914ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: Index of embedded window in text: dumps core
comment:
  OriginalBugID: 1003 Bug
  Version: 8.1b1
  SubmitDate: '1998-12-22'
  LastModified: '1999-02-02'
  Severity: CRIT
  Status: Closed
  Submitter: welch
  ChangedBy: pat
  OS: Other
  Machine: NA
  ClosedDate: '1999-02-02'


  Name:

  Don Porter



  ReproducibleScript:

  # FILE: demo.tcl

  package require Tk

  set t [text .t]

  $t insert end \n

  $t window create end -window [button $t.b]

  $t index end-2c

  pack $t









  ObservedBehavior:

  $ wish8.1 demo.tcl

  Segmentation fault (core dumped)









  DesiredBehavior:

  No crash.







  Patch:

  *** tkTextIndex.c.orig  Thu Dec 17 01:30:22 1998

  --- tkTextIndex.c       Thu Dec 17 01:31:00 1998

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

  *** 1015,1021 ****

                  charCount--;

              }

          } else {

  !           if (charCount < segSize) {

                  dstPtr->byteIndex -= charCount;

                  return;

              }

  --- 1015,1021 ----

                  charCount--;

              }

          } else {

  !           if (charCount <= segSize) {

                  dstPtr->byteIndex -= charCount;

                  return;

              }









  PatchFiles:

  tkTextIndex.c









  Whenever an embedded window is at the first position of a line in
  a text widget (in demo.tcl, at index 2.0), and we try to compute that
  index using a modifier which starts with "-" (like "-2c"), a bug in the
  function TkTextIndexBackChars() causes an incorrect index to be computed.
  The incorrect index refers to one position past the end of the preceding
  line (in demo.tcl, 1.1) and when later code tries to reference that
  incorrect index, it attempts to follow a NULL pointer.  **CRASH**

  02/02/1999 16:57 - pat -duplicate of bug 991


tkt_uuid: 219915ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Widgets
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Request for more widgets
comment:
  OriginalBugID: 1159 RFE
  Version: 8.0.3
  SubmitDate: '1999-02-02'
  LastModified: '2000-04-16'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1910
  OS: Linux
  Machine: Other
  ClosedDate: '2000-04-16'


  Name:
  Simon Geard

  Extensions:
  Tix tcl+

  CustomShell:
  None

  DesiredBehavior:
  I would like to see the Tix megawidget set subsumed into tk or become a supported extension.


tkt_uuid: 219916ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 1 Zero
foundin: obsolete: 8.1b3
resolution: Duplicate
title: WinNT event loop not entered properly; making a button not respond to mouse clicks
comment:
  OriginalBugID: 1163 Bug
  Version: 8.1b3
  SubmitDate: '1999-02-02'
  LastModified: '1999-08-20'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1212
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  ClosedDate: '1999-08-20'


  Name:
  vince darley

  Extensions:
  none

  CustomShell:
  none

  ReproducibleScript:
  # save this in a file 'bug.tcl', and double click 
  # to run it.  Bug happens at least on WinNT, Tk 8.0.3, 8.0.4, 8.1b1
  console show
  button .b -text "This button doesn't respond, even  after you dismiss the file dialog!!" -command exit
  pack .b

  # One workaround is to uncomment these three lines so that Tk enters
  # the event loop properly:
  #after idle {set buggy 1}
  #vwait buggy
  #unset buggy

  # Another workaround is to place the file dialog in an 'after idle'
  if {1} {
      # you must cancel or select a file in the dialog.
      # Obviously the button won't respond while the dialog is there!
      set file [tk_getOpenFile]
  } else {
      # the workaround for the bug.  However requires use of global variable 'file'
      # which is very inconvenient for Itcl code etc.
      after idle {set file [tk_getOpenFile]}
      vwait file
  }
  # the problem is that when the code gets here, the button still
  # won't respond.

  ObservedBehavior:
  Even _after_ you dismiss the file dialog, the button doesn't respond
  to clicks.  Bug exists in Tk 8.0.3, 8.0.4 and 8.1b1

  DesiredBehavior:
  The button should respond,



  04/07/1999 12:05 - redman - Also is in 8.1b3
  04/22/1999 11:14 - redman - Should be easy to workaround, lower priority.
  --
  A work-around is to call 'update' before native dialogs, but
  this is mentioned in several bug ids. 
  -- 08/20/1999 hobbs


tkt_uuid: 219917ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Making an unmapped window transient maps it again
comment:
  OriginalBugID: 1165 Bug
  Version: 8.0.4
  SubmitDate: '1999-02-03'
  LastModified: '1999-09-16'
  Severity: MED
  Status: Closed
  Submitter: stanton
  ChangedBy: hobbs
  RelatedBugIDs: 572
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-09-16'


  I think I have found a bug in the "wm transient" command. Try the
  following: 

  toplevel .t
  wm withdraw .t
  wm transient .t .

  The "wm transient" command causes the toplevel to be mapped !


  02/03/1999 18:27 - stanton - This happens because the wm code tries to ensure the transient is in the same state as its master.  Unfortunately this is inappropriate if the master is currently mapped and the transient window isn't.  This logic needs to be beefed up.


tkt_uuid: 219918ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 06. Canvas Postscript
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: need support for Japanese text in the postscript template
comment:
  OriginalBugID: 1215 Bug
  Version: 8.1b2
  SubmitDate: '1999-02-16'
  LastModified: '2000-01-07'
  Severity: SER
  Status: Closed
  Submitter: admin
  ChangedBy: hobbs
  RelatedBugIDs: 2596
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '2000-01-07'


  I use Tcl/Tk8.1b1 on WindowsNT4.0.
  I have a question of canvas widget.

  If canvas which placed the Japanese text is output to PostScript, the
  Japanese character will transform itself.  Is there solution?.


  pack [canvas .can]
  .can create $x $y -text {Japanese Character} -font {Japanese Font}
  .can postscript -file foo.ps
  --
  Satoshi Imai
  2nd systems Department
  MicroComputer Division System LSI Operations Unit
  NEC Corporation
  E-mail: s-imai@lsi.nec.co.jp


tkt_uuid: 219919ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 31. Cursor Names
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Support for custom cursors on Win32
comment:
  OriginalBugID: 1252 RFE
  Version: 8.0.4
  SubmitDate: '1999-02-22'
  LastModified: '1999-08-31'
  Severity: LOW
  Status: Closed
  Submitter: welch
  ChangedBy: hobbs
  RelatedBugIDs: 1350
  OS: Windows NT
  OSVersion: 4, SP3
  Machine: X86
  ClosedDate: '1999-08-31'


  Name:

  David Ascher


  Extensions:

  None


  CustomShell:

  Patch to tkWinCursor, no backwards-incompatible changes.  Only added new functionality on Win32


  ReproducibleScript:

  As documented in the Tk doc, custom cursors don't work on Win32.


  ObservedBehavior:

  Custom cursors don't work on Win32 -- one is limited to the system cursors.


  DesiredBehavior:

  Behavior similar on win32 as on X.


  Patch:

  --- tkWinCursor.c.oldWed Jan 13 13:28:21 1999

  +++ tkWinCursor.c.newWed Jan 13 13:51:26 1999

  @@ -109,6 +109,29 @@

   cursorPtr->winCursor = LoadCursor(Tk_GetHINSTANCE(), string);

   cursorPtr->system = 0;

       }

  +#ifdef WINDOWS_CURSOR_FILES

  +    if (string[0] == '@') {

  +    int argc;

  +    char **argv = NULL;

  +    if (Tcl_SplitList(interp, string, &argc, &argv) != TCL_OK) {

  +    return NULL;

  +    }

  +    if ((argc != 1) || (argv[0][0] != '@')) {

  +    ckfree((char *)cursorPtr);

  +    Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",

  +     (char *) NULL);

  +    return NULL;

  +    }

  +    if (Tcl_IsSafe(interp)) {

  +    Tcl_AppendResult(interp, "can't get cursor from a file in",

  +     " a safe interpreter", (char *) NULL);

  +    ckfree((char *)cursorPtr);

  +    return NULL;

  +    }

  +    cursorPtr->winCursor = LoadCursorFromFile(&(argv[0][1]));

  +    cursorPtr->system = 0;

  +    }

  +#endif

       if (cursorPtr->winCursor == NULL) {

   ckfree((char *)cursorPtr);

   Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",


  PatchFiles:

  tkWinCursor.c




  This adds support for .CUR and .ANI cursors.

  I believe I've submitted this patch before, but it never showed up anywhere, nor did I get an ack.  Please acknowledge receipt.


tkt_uuid: 219921ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: simple three line wish script cause core dump.
comment:
  OriginalBugID: 1265 Bug
  Version: 8.1b1
  SubmitDate: '1999-02-23'
  LastModified: '1999-08-20'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2316
  OS: AIX
  OSVersion: AIX 4.2
  Machine: RS6000
  ClosedDate: '1999-08-20'


  Name:
  Marc Schwarzschild

  Extensions:
  see above comments

  CustomShell:
  None

  ReproducibleScript:
  text .a
  pack .a
  .a insert end foo





  ObservedBehavior:
  core dump




  DesiredBehavior:
  the string foo should be inserted into the text widget




  I have just built tcl8.1 and tk8.1.  Then I tried a simple wish session
  and got
  a core dump.

  The following is a complete listing of the build of both tcl8.1 and
  tk8.1.
  Followed by the core dump session.  Followed by the core stack trace
  from dbx.

  Please let me know that you have received this and what I should do
  now.

  Thank you,
  Marc Schwarzschild

  ---------------------------- starts here

  [snipped by surles -- it was just a bunch of junk]


  Cannot reproduce this bug.  User error?
  03/25/1999 15:36 - surles -

  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). 
  -- 08/20/1999 hobbs


tkt_uuid: 219922ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 08. [(label)frame] and [toplevel]
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: Transparent frames don't quite work on W98
comment:
  OriginalBugID: 1267 RFE
  Version: 8.1b1
  SubmitDate: '1999-02-23'
  LastModified: '1999-12-14'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2339
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-12-14'


  Name:
  Christopher Nelson

  ReproducibleScript:
  frame .f -background red
  pack .f
  frame .f.f -background {}
  pack .f.f
  button .f.f.b1 -text foo
  pack .f.f.b1
  button .f.f.b2 -text "foo bar baz"
  pack .f.f.b2





  ObservedBehavior:
  The slack space around .f.f.b1 should be red.  Its color is
  unpredicable.  Continuing the script with 

  .f.f configure -background blue
  .f.f configure -background {}

  shows more interesting results.




  DesiredBehavior:
  I expect the slack space around .f.f.b1 to show .f's background color.





  This was an undocumented side effect that apparently no longer works.
  03/26/1999 11:14 - surles -


tkt_uuid: 219923ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: core dump when using text widget under Tk8.1b1
comment:
  OriginalBugID: 1300 Bug
  Version: 8.1b1
  SubmitDate: '1999-02-25'
  LastModified: '1999-03-25'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: surles
  RelatedBugIDs: 991
  OS: Linux
  OSVersion: Linux Debian 1.3
  Machine: Other
  ClosedDate: '1999-03-25'


  Name:
  Claude BARRAS

  ReproducibleScript:
  $  wish8.1

  # Following 5 lines script fails for Tcl/Tk 8.1b1 under Linux (Debian
  1.3)
  text .t
  pack .t
  .t insert insert "\n"
  .t window create insert -window [button .t.b]
  .t index insert-1c





  ObservedBehavior:
  Program received signal SIGSEGV, Segmentation fault.
  0x4008a19f in TkTextPrintIndex ()

  (it also fails with embedded images instead of embedded windows)





  DesiredBehavior:
  it correctly works with Tcl/Tk 8.0.4; it should also work for Tcl/Tk 8.1





  Duplicate 991.


tkt_uuid: 219924ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 12. Unix Menus
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: undesirable automatic post of cascade menu
comment:
  OriginalBugID: 1320 RFE
  Version: 8.1b1
  SubmitDate: '1999-03-02'
  LastModified: '1999-11-02'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 676
  OS: Solaris
  OSVersion: SUN-OS 5.5
  Machine: Other
  ClosedDate: '1999-11-02'


  Name:
  Aldo MAZZILLI

  ReproducibleScript:
      menubutton .test -text "TEST" -menu .test.menu
      pack .test -side left
      set n [menu .test.menu ]
      $n add cascade -label "Subtest" -menu $n.test
      set n0 [menu $n.test]
      $n0 add command -label "exit" -command "exit"
      
      



  ObservedBehavior:
      The command menu line "exit" is automatically posted when you click on
      the "TEST" menubutton which is an undesirable behaviour for the
      customer.
      Under SunOS : this occurs with TCL/TK8.0.4 and TCL/TK8.1b1 but it was
      not exist with TCL/TK7.6.
      Under Win32 : everything is correct
      



  DesiredBehavior:
      I don't want the cascade menu (which is the command menu line "exit") to
      be posted automatically but only when the customer click on the
      cascade-line "Subtest" like it was under TCL/TK7.6
      


tkt_uuid: 219925ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Cut/copy/paste in entry window uses global 'data' variable
comment:
  OriginalBugID: 1337 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-04-16'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: stanton
  RelatedBugIDs: 1475
  OS: Windows 95
  OSVersion: OEM Service Release 3
  Machine: X86
  ClosedDate: '1999-04-16'


  Name:

  Kevin B. Kenny



  CVS:

  # RCS: @(#) $Id: entry.tcl,v 1.5 1998/09/14 18:23:23 stanton Exp $



  Extensions:

  None relevant to this test



  CustomShell:

  No modifications relevant to this test.



  ReproducibleScript:

      # The cut/copy/paste mechanism on entry windows uses an undocumented

      # global variable named 'data'.  If the user happens to use this name

      # for a scalar, the cut/copy/paste mechanism corrupts the content

      # of the user's variable.  If the variable is an array, an attempt

      # to cut or copy fails silently.  

      

      package require Tk

      global data

      set data(x) y

      grid [entry .e]

      grid [entry .f]

      .e insert insert abcdef

      .e selection range 1 4

      focus .e

      event generate .e <<Copy>>

      puts $errorInfo

      

      







  ObservedBehavior:

      There are two bugs here; the error occurs in response to the generated

      event, and the error is not reported.  The stack trace *is* left

      in $::errorInfo:

      

      can't set "data": variable is array

          while executing

      "set data [string range [.e get] [.e index sel.first] [expr {[.e index

      sel.last] - 1}]]"

      

      







  DesiredBehavior:

      I'd expect the string 'bcde' on the CLIPBOARD selection

      







  Patch:

  *** F:/Program Files/Tcl8.0.4/lib/tk8.0/entry.tclMon Sep 14 11:23:24 1998

  --- E:/Program Files/Tcl8.0.4/lib/tk8.0/entry.tclSat Feb 27 23:09:40 1999

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

  *** 32,69 ****

    # 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

  !     }

    }

    bind Entry <<Paste>> {

  !     global tcl_platform

  !     catch {

  ! if {"$tcl_platform(platform)" != "unix"} {

  !     catch {

  ! %W delete sel.first sel.last

  !     }

  ! }

  ! %W insert insert [selection get -displayof %W -selection CLIPBOARD]

  ! tkEntrySeeInsert %W

  !     }

    }

    bind Entry <<Clear>> {

        %W delete sel.first sel.last

    }

    bind Entry <<PasteSelection>> {

        if {!$tkPriv(mouseMoved) || $tk_strictMotif} {

  ! tkEntryPaste %W %x

        }

    }

    

  --- 32,51 ----

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

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

    bind Entry <<Cut>> {

  !     tkEntryCut %W

    }

    bind Entry <<Copy>> {

  !     tkEntryCopy %W

    }

    bind Entry <<Paste>> {

  !     tkEntryPaste %W

    }

    bind Entry <<Clear>> {

        %W delete sel.first sel.last

    }

    bind Entry <<PasteSelection>> {

        if {!$tkPriv(mouseMoved) || $tk_strictMotif} {

  ! tkEntryPasteSelection %W %x

        }

    }

    

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

  *** 392,398 ****

  --- 374,431 ----

        update idletasks

    }

    

  + # tkEntryCut --

  + # This procedure cuts the selection text from the entry and

  + # places it on the clipboard.

  + #

  + # Arguments:

  + # w -The entry window.

  + 

  + proc tkEntryCut { w } {

  +     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

  +     }

  + }

  + 

  + # tkEntryCopy --

  + # This procedure copies the selected text from the entry to the

  + # clipboard.

  + #

  + # Arguments:

  + # w -The entry window

  + 

  + proc tkEntryCopy { w } {

  +     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

  +     }

  + }

  + 

    # tkEntryPaste --

  + # This procedure pastes the text from the clipboard into the

  + # entry window

  + #

  + # Arguments:

  + # w -The entry window

  + 

  + proc tkEntryPaste { w } {

  +     global tcl_platform

  +     catch {

  + if {"$tcl_platform(platform)" != "unix"} {

  +     catch {

  + $w delete sel.first sel.last

  +     }

  + }

  + $w insert insert [selection get -displayof $w -selection CLIPBOARD]

  + tkEntrySeeInsert $w

  +     }

  + }

  + 

  + # tkEntryPasteSelection --

    # This procedure sets the insertion cursor to the current mouse position,

    # pastes the selection there, and sets the focus to the window.

    #

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

  *** 400,406 ****

    # w -The entry window.

    # x -X position of the mouse.

    

  ! proc tkEntryPaste {w x} {

        global tkPriv

    

        $w icursor [tkEntryClosestGap $w $x]

  --- 433,439 ----

    # w -The entry window.

    # x -X position of the mouse.

    

  ! proc tkEntryPasteSelection {w x} {

        global tkPriv

    

        $w icursor [tkEntryClosestGap $w $x]









  PatchFiles:

      entry.tcl

      









      The patch fixes only the problem of using the global 'data' array.
      I haven't yet had the chance to trace my way through 'event generate'
      to find out where the TCL_ERROR return is getting lost.  I'm not
      even sure what it's *supposed* to do; should it return as an error from
      'event generate', or should it land in 'bgerror' instead?  I'm convinced
      that having it simply disappear is not The Right Thing.  8-)
      


tkt_uuid: 219926ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Duplicate
title: Strange file dialog behaviour on Windows
comment:
  OriginalBugID: 1339 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-12'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2111 2312
  OS: Windows NT
  OSVersion: 4.0 SP3
  Machine: X86
  ClosedDate: '1999-08-12'


  Name:
  Peter Spjuth

  ReproducibleScript:
      button .b -text Dialog -command tk_getOpenFile
      pack .b
      checkbutton .c -text aaaaa -relief raised
      pack .c -expand 1 -fill both
      -------
      Resize the window to make the checkbutton larger
      Press the Dialog button to bring up the file selector
      Move the file selector to place one of the files listed over the
      checkbutton.
      Double click on the file. The dialog disappears and the checkbox is
      selected.
      
      



  ObservedBehavior:
      It seems that the second click goes through to the main window when the
      dialog disappears, which is very annoying. 
      
      I have tested this with 8.0p2 under Solaris and there it works as it
      should.
      
      




  This was answered here:
      http://x23.deja.com/[ST_rn=ps]/getdoc.xp?AN=496001244

  This is more of a Windows native dialog problem, but requires
  that the Tk user be aware of the quirk with that dialog.  
  -- 08/12/1999 hobbs


tkt_uuid: 219927ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.0p2
resolution: Duplicate
title: X Error of failed request: BadWindow (invalid Window parameter)
comment:
  OriginalBugID: 1355 Bug
  Version: 8.0p2
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-14'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 716
  OS: Linux-Red Hat
  Machine: Other
  ClosedDate: '1999-08-14'


  Name:
  Danny Bach

  Extensions:
  Tix4.1 and DP4.0

  CustomShell:
  No

  ReproducibleScript:
  crash under RedHat Linux 5.0 with tk8.0p2, and RedHat Linux 5.2 with tk8.0.3.
  It happens fairly often after clicking on buttons from the GUI



  ObservedBehavior:
  Program aborts with the following message
  X Error of failed request: BadWindow (invalid Window parameter)
  Major opcode of failed request: 40 (X_TranslateCoords)


tkt_uuid: 219930ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: ByteCode Stack Fatal Error
comment:
  OriginalBugID: 1366 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-09-13'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1454
  OS: Windows NT
  OSVersion: 4.0 SP 3
  Machine: X86
  ClosedDate: '1999-09-13'


  Name:
  Steven Sokol

  Extensions:
  odbctcl80.dll

  CustomShell:
  None

  ReproducibleScript:
  set IVRDB {}
  set CurValue {}
  set Channel_Number {SIM}
  set version [join [split $tcl_version .] {}]
  load odbctcl$version.dll

  wm title . "Stratagy Simulator"
  frame .top -borderwidth 0
  pack .top -side top -fill x

  #label .top.title -text "Stratagy Simulator 1.0" -justify center -font system
  #pack .top.title -side top

  set but [button .top.select -text "Select" -command Select -width 8]
  button .top.exec -text "Run" -command Run -width 8
  pack .top.select .top.exec  -side left -padx 2 -pady 0

  label .top.1 -text "SES Script:" -padx 1
  entry .top.cmd -width 20 -relief sunken -textvariable tvFileName
  pack .top.1 -side left
  pack .top.cmd -side left -fill x -expand true

  bind .top.cmd <Return> Run
  bind .top.cmd <Control-c> Stop
  focus .top.cmd

  proc Scrolled_Text {f args} {
  frame $f
  eval {text $f.text  -xscrollcommand [list $f.xscroll set]  -yscrollcommand [list $f.yscroll set]} $args
  scrollbar $f.xscroll -orient horizontal  -command [list $f.text xview]
  scrollbar $f.yscroll -orient vertical  -command [list $f.text yview]
  grid $f.text $f.yscroll -sticky news
  grid $f.xscroll -sticky news
  grid rowconfigure $f 0 -weight 1
  grid columnconfigure $f 0 -weight 1
  return $f.text
  }

  set browse(text) [Scrolled_Text .body -width 80 -height 10 -setgrid true]
  pack .body -fill both -expand true

  set t [Scrolled_Text .eval -width 80 -height 10]
  pack .eval -fill both -expand true

  $t tag configure prompt -underline true
  $t tag configure result -foreground purple
  $t tag configure error -foreground red
  $t tag configure output -foreground blue

  set eval(prompt) "tcl> "
  $t insert insert $eval(prompt) prompt
  $t mark set limit insert
  $t mark gravity limit left
  focus $t
  set eval(text) $t

  bind $t <Return> {EvalTypein ; break}
  bind $t <BackSpace> {
  if {[%W tag nextrange set 1.0 end] != ""} {
  %W delete sel.first sel.last
  } elseif {[%W compare insert > limit]} {
  %W delete insert-1c
  %W see insert
  }
  break
  }
  bind $t <Key> {
  if [%W compare insert < limit] {
  %W mark set insert end
  }
  }

  proc EvalTypein {} {
  global eval
  set command [$eval(text) get limit end]
  $eval(text) insert insert \n
  if [info complete $command] {
  $eval(text) mark set limit insert
  Eval $command
  }
  }

  proc EvalEcho {command} {
  global eval
  $eval(text) mark set insert end
  $eval(text) insert insert $command\n
  Eval $command
  }

  proc Eval {command} {
  global eval
  $eval(text) mark set insert end
  if [catch {$eval(slave) eval $command} result] {
  $eval(text) insert insert $result error
  } else {
  $eval(text) insert insert $result result
  }
  if {[$eval(text) compare insert != "insert linestart"]} {
  $eval(text) insert insert \n
  }
  $eval(text) insert insert $eval(prompt) prompt
  $eval(text) see insert
  $eval(text) mark set limit insert
  return
  }

  proc SlaveInit {slave} {
  interp create $slave
  interp eval $slave {set Channel_Number {SIM}}
  interp alias $slave reset {} ResetAlias $slave
  interp alias $slave puts {} PutsAlias $slave
  interp alias $slave tTrace {} PutsAlias $slave
  interp alias $slave cg_connectdb {} cg_connectdbA
  interp alias $slave cg_executesql {} cg_executesqlA
  interp alias $slave cg_return {} cg_returnA
  interp alias $slave cg_playFile {} cg_playFileA
  interp alias $slave cg_collectDtmf {} cg_collectDtmfA
  interp alias $slave pValue {} pValueA
  return $slave
  }

  proc ResetAlias {slave} {
  interp delete $slave
  SlaveInit $slave
  }

  proc PutsAlias {slave args} {
  if {[llength $args] > 3} {
  error "invalid arguments"
  }
  set newline "\n"
  if {[string match "-nonewline" [lindex $args 0]]} {
  set newline ""
  set args [lreplace $args 0 0]
  }
  if {[llength $args] == 1} {
  set chan stdout
  set string [lindex $args 0]$newline
  } else {
  set chan [lindex $args 0]
  set string [lindex $args 1]$newline
  }
  if [regexp (stdout|stderr) $chan] {
  global eval
  $eval(text) mark gravity limit right
  $eval(text) insert limit $string output
  $eval(text) see limit
  $eval(text) mark gravity limit left
  } else {
  puts -nonewline $chan $string
  }
  }

  #set eval(slave) [SlaveInit shell]

  proc Run {} {
  global tvFileName eval
  set eval(slave) [SlaveInit shell]
  EvalEcho [list source $tvFileName]
  }

  proc Log {} {
  global input log
  if [eof $input] {
  Stop
  } else {
  gets $input line
  $log insert end $line\n
  $log see end
  }
  }

  proc Stop {} {
  global input but
  catch {close $input}
  $but config -text "Run it" -command Run
  }

  proc Select {} {
  global tvFileName browse
  set types {{{TCL Scripts}       {.tcl}        }}
  set sFileName [tk_getOpenFile -filetypes $types -initialdir "C:/Vortec/Bin"]
  if {[string length $sFileName] > 0} {
  set tvFileName $sFileName
  set t $browse(text)
  $t config -state normal
  $t delete 1.0 end
  if [catch {open $sFileName} in] {
  $t insert end $in
  } else {
  $t insert end [read $in]
  close $in
  }
  $t config -state disabled
  } else {
  set tvFileName {}
  }
  }

  proc tTrace {strValue} {
  puts $strValue
  }

  #####################################################################
  # DOS Editing/Testing Functions
  #####################################################################
  proc tTrace {param} {
  puts $param
  }
  proc cg_connectdbA {DSN} {
  global IVRDB
  puts "CONNECTING TO DSN:$DSN"
  odbc_connect IVRDB $DSN
  return "Connected"
  }

  proc cg_playFileA {file opt wap enc rep} {

  global CurValue

  toplevel .playFile -height 200 -width 200
  wm title .playFile "Play File"
  frame .playFile.top
  pack .playFile.top -side top
  label .playFile.top.fileLabel -text "Audio File:"
  entry .playFile.top.fileName -textvariable fName -width 80
  pack propagate .playFile false
  pack .playFile.top.fileLabel .playFile.top.fileName -side left -padx 2 -pady 2
  .playFile.top.fileName insert 0 $file
  .playFile.top.fileName configure -state disabled

  frame .playFile.padOne -borderwidth 2
  pack .playFile.padOne 
  button .playFile.padOne.bOne -width 4 -height 2 -text "1" -command {pValue "1"}
  button .playFile.padOne.bTwo -width 4 -height 2 -text "2" -command {pValue "2"}
  button .playFile.padOne.bThree -width 4 -height 2 -text "3" -command {pValue "3"}
  pack .playFile.padOne.bOne .playFile.padOne.bTwo .playFile.padOne.bThree -side left

  frame .playFile.padTwo -borderwidth 2
  pack .playFile.padTwo
  button .playFile.padTwo.bFour -width 4 -height 2 -text "4" -command {pValue "4"}
  button .playFile.padTwo.bFive -width 4 -height 2 -text "5" -command {pValue "5"}
  button .playFile.padTwo.bSix -width 4 -height 2 -text "6" -command {pValue "6"}
  pack .playFile.padTwo.bFour .playFile.padTwo.bFive .playFile.padTwo.bSix -side left

  frame .playFile.padThree -borderwidth 2
  pack .playFile.padThree
  button .playFile.padThree.bSeven -width 4 -height 2 -text "7" -command {pValue "7"}
  button .playFile.padThree.bEight -width 4 -height 2 -text "8" -command {pValue "8"}
  button .playFile.padThree.bNine -width 4 -height 2 -text "9" -command {pValue "9"}
  pack .playFile.padThree.bSeven .playFile.padThree.bEight .playFile.padThree.bNine -side left

  focus .playFile

  #if {$wap == 0} {
  #puts "NO RESPONSE NEEDED"
  #return "Done"
  #} else {
  #puts "Enter A Response Digit:"
  #gets stdin Digit
  #if {[string length $Digit] > 0} {
  #return "Digit$Digit"
  #} else {
  #return "Done"
  #}
  #}

  while {[string length $CurValue] < 1} {
  vwait CurValue
  destroy .playFile
  return "Digit$CurValue"
  }

  }

  proc cg_executesqlA {statement} {
    global sqlres
    set ret_list {}
    set full_list {}
    puts "SQL STATEMENT:$statement"
    if [catch "IVRDB execdirect \$statement" msg] {
  puts "error: $msg\n"
  return "Error"
    } else {
  puts "cg_executesql Result = $msg\n"
  if {[lindex $msg 0] > 0} {
  # Convert sqlres Array Into List
  lappend full_list $sqlres(0,1)
    for {set row 1} {$row <= [lindex $msg 0]} {incr row} {
      for {set col 1} {$col <= [lindex $msg 1]} {incr col} {
        lappend ret_list $sqlres($row,$col)
      }
  lappend full_list $ret_list
  unset ret_list
    }
  return $full_list
  } else {
  return "1"
  }
    }

  }

  proc cg_collectDtmfA {max term silence inter cb ca} {
  puts "DIGIT COLLECTION - ENTER UP TO $max DIGITS:"
  gets stdin Digits
  return "Collected $Digits"
  }

  proc cg_returnA {args} {
  puts "END OF APPLICATION"
  }

  proc Beep {} {
  puts "BEEP!"
  }

  proc cg_recordFile {path option wait encode} {
  puts "RECORDING FILE $path PRESS ENTER TO CONTINUE"
  gets stdin junk
  return {}
  }
  proc play_money {amount args} {
  puts "PLAY MONEY VALUE: \$$amount"
  return {}
  }
  proc play_number {number} {
  puts "PLAY NUMBER VALUE: $number"
  return {}
  }

  proc play_alphanum {cvals} {
  puts "PLAY ALPHANUM: " $cvals
  return {}
  }

  proc pValue {Num} {
  global CurValue
  set CurValue "$CurValue$Num"
  }
  #####################################################################

  ObservedBehavior:
  The above script is a simulator for an IVR system we have using TCL as the script language.  I feed it a script that calls the oddly named cg_playFile command which can see calls back to the main interp though an alias.

  When I select a button in the toplevel which pops up when I call cg_playFileA, the system sometimes (every other time) throws a fit.

  Sometimes this gets an "Unrecognized op code 76" message.  Somtimes it gets "WISH FATAL ERROR: TclExecuteByteCode Execution Failure: end stack top != start stack top.  Occasionally I even get a GPF or IPF from NT.

  DesiredBehavior:
  The system should simply destroy the window and return the digit value entered with the "Digit" string prepended.


tkt_uuid: 219931ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: "Save" button in tk_getSaveFile displays "Open"
comment:
  OriginalBugID: 1369 Bug
  Version: 8.0.3
  SubmitDate: '1999-03-02'
  LastModified: '1999-04-05'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: stanton
  RelatedBugIDs: 1640
  OS: HP-UX
  OSVersion: 10.20
  Machine: Other
  ClosedDate: '1999-04-05'


  Name:
  Frank J. Leitner

  CustomShell:
  Plus-Patches applied

  ReproducibleScript:
  Within the tk_getOpenFile Dialog there is a Button named "Save". Click on
  a directory, and it shows "Open". Click on a file and it will display "Save"
  again. BUT: Open a directory (double-click)...




  ObservedBehavior:
  After building the contents of the new directory, the Button still displays
  "Open".



  DesiredBehavior:
  The Button should display "Open" only whenever there is a directory highlighted
  that you would want to open, and read "Save" in any other case.



  Patch:
  *** tkfbox.tcl.orig     Tue Nov  3 07:03:50 1998
  --- tkfbox.tcl  Wed Feb  3 17:06:57 1999
  ***************
  *** 1067,1072 ****
  --- 1067,1080 ----
        #
        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




  see bug 1640 for more details


tkt_uuid: 219932ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Duplicate
title: port of Tcl/Tk to Windows CE?
comment:
  OriginalBugID: 1375 RFE
  Version: 8.0.3
  SubmitDate: '1999-03-02'
  LastModified: '2000-02-07'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 3509
  OS: Linux-Red Hat
  Machine: Other
  ClosedDate: '2000-02-07'


  Name:
  Jeff Richards

  DesiredBehavior:
  Probably doesn't fit.  Just curious if anyone considered porting Tcl/Tk to Windows CE.


tkt_uuid: 219933ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 5 Medium
foundin: obsolete: 8.1a2
resolution: Invalid
title: Tcl/Tk crashes with Xlib sequence lost error
comment:
  OriginalBugID: 1376 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-14'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 716
  OS: Digital Unix
  OSVersion: V4.0B
  Machine: Other
  ClosedDate: '1999-08-14'


  Name:

  Emmanuel Gustin



  Extensions:

  Tix 4.1.0



  CustomShell:

  Recently applied: Dash patch. Did not have any effect on the problem.



  Description:

  Not exactly what I would call a patch, but when debugging I inserted 

  the following statements in tkUnixWm.c, in Tk_CoordsToWindow(), 

  after the while(1) { that opens step 2 of the search: 



  XGetWindowAttributes(Tk_Display(tkwin), parent, &xwat);

  XGetWindowAttributes(Tk_Display(tkwin), window, &xwat);



  where xwat of course has been declared as 

  XWindowAttributes xwat;

  earlier in the function. I intended this for

  debugging, but strangely enough it seems to have

  cured the trouble (or at least most of the trouble,

  it hasn't crashed yet but I keep my fingers crossed.)







  This seems to be a bug that just Tix triggers. 
  -- 08/14/1999 hobbs


tkt_uuid: 219934ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: canvas oval stipple & no cursors
comment:
  OriginalBugID: 1379 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-14'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1274
  OS: Windows NT
  OSVersion: 4.0 with service pack 3
  Machine: X86
  ClosedDate: '1999-08-14'


  Name:
  Keith Powell

  Extensions:
  itcl, iwidgets that comes with TclPro1.1

  CustomShell:
  none

  ReproducibleScript:
  The canvas 'create oval' command seems to ignore the stipple.

  #-----------------------------
  canvas .c
  pack .c
  .c create oval 10 10 100 100 -fill blue -stipple gray12
  #-----------------------------

  Also, I have created a custom shell to use with prowrap.  When I try configure a widget to use any cursor other than arrow, it fails saying 'bad cursor spec "blahblah"'.  Have I missed something that makes the cursors available?


tkt_uuid: 219935ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 04. Canvas Basics
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Scrollbars not scrolling canvas correctly
comment:
  OriginalBugID: 1385 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-07'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2309
  OS: AIX
  OSVersion: 4.1 - 4.3
  Machine: RS6000
  ClosedDate: '1999-08-07'


  Name:
  Anthony Johnson
  email:  caldiver@pacbell.net

  Extensions:
  TclX

  ReproducibleScript:
  I create a canvas and a window and attach a scrollbar. The canvas contains a gridded list, each line containing a button with a 16x16 bitmap image and a label of approximately 20 characters.

  The scroll increment is set to the height of a single cell. I use the Scroll_Set and Scrolled_Listbox procedures as defined in Welch's book.

  ObservedBehavior:
  If the list exceeds 1380 lines, the scrollbar will no longer scroll to the bottom of the list. It is not possible to view or select any entries from the list below that point. Also, if you clock the scrollbar area between the bar and the arrow button (for scrolling a page), it jumps several pages at once.

  DesiredBehavior:
  The same behavior with a long list as a short list.


tkt_uuid: 219936ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Tcl/Tk App crashed with X-errrors
comment:
  OriginalBugID: 1390 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-08-14'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1376 716
  OS: Digital Unix
  OSVersion: V4.0B  [Rev. 564]
  Machine: Other
  ClosedDate: '1999-08-14'


  Name:
  Emmanuel Gustin

  Extensions:
  Tix 4.10, PlPlot 980407

  CustomShell:
  Extensions were written to read in data files used in our laboratory, perform calculations on them, and control PlPlot output. They were defined as new Tcl commands. No changes were made to tk. No core commands were redefined.

  ReproducibleScript:
  None available --- behaviour is not reproduced by short scripts,
  for reasons unclear to me. 

  ObservedBehavior:
  System: DEC Alpha machine running DEC OSF/1, X11R6. Compiler
  used is gcc.

  Application: Data processing program using Tcl/Tk as interface
  (8.0.4 but 7.6/4.2 produce the same behaviour, perhaps less
  frequently), extended with Tix (4.1.0), PlPlot as plotting 
  package (release 980407), and own C++ code for I/O and calculations. 

  Behaviour: Crashes frequently when handling user input, typically
  when processing mouse clicks. The system generates errors such as:

    X Error of failed request:  BadWindow (invalid Window parameter)
      Major opcode of failed request:  40 (X_TranslateCoords)
      Resource id in failed request:  0x31
      Serial number of failed request:  1944
      Current serial number in output stream:  1944

  This is typical, but sometimes oter opcodes are displayed.

  If the program is started in a "wish8.0 -sync" shell, the
  program crashes far less often. The type of error reported
  is then:

    Xlib: sequence lost (0x1030a > 0xcbec) in reply type 0x0!
      X Error of failed request:  0
      Major opcode of failed request:  0 ()
      Serial number of failed request:  778
      Current serial number in output stream:  52204

  There are variations in the Major opcode, the values in the (... < ...) 
  part, and the other parameters. A characteristic call stack is:

  #0  exit () at exit.cpp:6
  #1  _XDefaultError (dpy=, event=) at XlibInt.c:2958
  #2  ErrorProc () at ./../generic/tkError.c:5
  #3  _XError (dpy=, rep=) at XlibInt.c:3010
  #4  _XReply (dpy=, rep=, extra=0, discard=1) at XlibInt.c:1900
  #5  XGetWindowAttributes ()
  #6  _XimSetProtoResource ()
  #7  _XimSetICDefaults ()
  #8  WindowEventProc () at ./../generic/tkEvent.c:5
  #9  Tcl_ServiceEvent () at ./../generic/tclNotify.c:5
  #10 TkUnixDoOneXEvent () at ./tkUnixEvent.c:5
  #11 WaitForEvent () at ./tkUnixWm.c:5
  #12 WaitForMapNotify () at ./tkUnixWm.c:5
  #13 TkWmMapWindow () at ./tkUnixWm.c:5
  #14 Tk_MapWindow () at ./../generic/tkWindow.c:5
  #15 MapFrame () at ./../generic/tkFrame.c:5
  #16 TclServiceIdle () at ./../generic/tclTimer.c:5
  #17 Tcl_DoOneEvent () at ./../generic/tclNotify.c:5
  #18 Tk_UpdateCmd () at ./../generic/tkCmds.c:5
  #19 TclInvokeStringCommand () at ./../generic/tclBasic.c:5
  #20 TclExecuteByteCode () at ./../generic/tclExecute.c:5
  #21 Tcl_EvalObj () at ./../generic/tclBasic.c:5
  #22 TclObjInterpProc () at ./../generic/tclProc.c:5
  #23 TclExecuteByteCode () at ./../generic/tclExecute.c:5
  #24 Tcl_EvalObj () at ./../generic/tclBasic.c:5
  #25 Tcl_Eval () at ./../generic/tclBasic.c:5
  #26 Tcl_GlobalEval () at ./../generic/tclBasic.c:5
  #27 Tk_BindEvent () at ./../generic/tkBind.c:5
  #28 TkBindEventProc () at ./../generic/tkCmds.c:5
  #29 Tk_HandleEvent () at ./../generic/tkEvent.c:5
  #30 WindowEventProc () at ./../generic/tkEvent.c:5
  #31 Tcl_ServiceEvent () at ./../generic/tclNotify.c:5
  #32 Tcl_DoOneEvent () at ./../generic/tclNotify.c:5
  #33 Tk_UpdateCmd () at ./../generic/tkCmds.c:5
  #34 TclInvokeStringCommand () at ./../generic/tclBasic.c:5
  #35 TclExecuteByteCode () at ./../generic/tclExecute.c:5
  #36 Tcl_EvalObj () at ./../generic/tclBasic.c:5
  #37 TclObjInterpProc () at ./../generic/tclProc.c:5
  #38 TclExecuteByteCode () at ./../generic/tclExecute.c:5
  #39 Tcl_EvalObj () at ./../generic/tclBasic.c:5
  #40 TclObjInterpProc () at ./../generic/tclProc.c:5
  #41 TclExecuteByteCode () at ./../generic/tclExecute.c:5
  #42 Tcl_EvalObj () at ./../generic/tclBasic.c:5
  #43 Tcl_Eval () at ./../generic/tclBasic.c:5
  #44 Tcl_GlobalEval () at ./../generic/tclBasic.c:5
  #45 Tk_BindEvent () at ./../generic/tkBind.c:5
  #46 TkBindEventProc () at ./../generic/tkCmds.c:5
  #47 Tk_HandleEvent () at ./../generic/tkEvent.c:5
  #48 WindowEventProc () at ./../generic/tkEvent.c:5
  #49 Tcl_ServiceEvent () at ./../generic/tclNotify.c:5
  #50 Tcl_DoOneEvent () at ./../generic/tclNotify.c:5
  #51 Tk_MainLoop () at ./../generic/tkEvent.c:5
  #52 Tk_Main () at ./../generic/tkMain.c:5
  #53 main (argc=2, argv=) at dio_new.cpp:48

  According to the X11 FAQ, 
  see http://www.faqs.org/faqs/x-faq/part7/section-16.html
  and http://www.faqs.org/faqs/x-faq/part7/section-14.html ,
  this type of "Sequence lost" error is caused by an error
  or signal handler making requests to Xlib or Xt, which is 
  illegal. The errors produced when the -sync option is not
  used, indeed do suggest that the status of the X11 system 
  is invalidated. 

  I have considered memory errors within my own code, but there
  is not reason why this should affect the X11 system. I do not
  make any direct calls to X11 functions. 

  The problem arose a few months ago for unknown reasons; previously
  it did not occur (or occured so rarely that it was not reported). 
  No changes were made to the system at that time (I asked the sysop),
  and changes to the program were limited to adding I/O for another
  file format, which seems unlikely to cause a problem like this 
  (besides, the problem also occurs when this new code is not 
  called). Maybe the system load is a factor. 

  More Info about bug:

  Date: Fri, 15 Jan 1999 07:08:12 -0800 (PST)
  To: tclsupport@scriptics.com
  Subject: [Bug Tk 8.0.4] Update on yesterday's bug report: Example script
  From: gustin@uia.ua.ac.be
  Status: O

  Tk 8.0.4 Bug

  Name:  Emmanuel Gustin
  email:  gustin@uia.ua.ac.be
  Support:  None
  Severity:  1
  OperatingSystem:  Digital Unix
  OperatingSystemVersion:  Digital UNIX V4.0B  [Rev. 564]
  Extensions:  Tix 4.1.0, own extensions
  CustomShell:  See yesterday's message
  Synopsis:  Update on yesterday's bug report: Example script

  ReproducibleScript:
  See my report of yesterday. This script generates an Xlib: Sequence lost 
  error on our system, after a number of iterations that is often as low as
  25, but can sometimes be considerably higher:

  #!/usr/local/bin/wish8.0
  for {set i 0} {$i < 120} {incr i} {
    # create windows
    toplevel .a
    toplevel .b
    toplevel .c
    toplevel .d
    button .a.close -text "Close" -command {destroy .a}
    grid .a.close
    button .b.close -text "Close" -command {destroy .b}
    grid .b.close
    button .c.close -text "Close" -command {destroy .c}
    grid .c.close
    button .d.close -text "Close" -command {destroy .d}
    grid .d.close
    update idletasks
    # close windows
    .a.close invoke
    .b.close invoke
    .c.close invoke
    .d.close invoke
    update idletasks
    # log
    puts "$i "
  }

  ObservedBehavior:
  See yesterday. "Xlib: sequence lost" errors. 


tkt_uuid: 219937ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 75. wish
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Segmentation fault in wish when using Zircon
comment:
  OriginalBugID: 1410 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-02'
  LastModified: '1999-11-02'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2454
  OS: Other
  OSVersion: NetBSD (unsure of version)
  Machine: NA
  ClosedDate: '1999-11-02'


  Name:
  Phil Reynolds

  CustomShell:
  No changes

  ReproducibleScript:
  (No script available. Activation with command "zircon", Lindsay Marshall's IRC client)

  ObservedBehavior:
  At times, for random/no reason, the application crashes with a segmentation fault. Common, but totally strange, causes include high load (excess of 0.9) on the machine being used as display (not processor), running of non blank-screen xlock (same problem).

  DesiredBehavior:
  No crash... application continues to run.


tkt_uuid: 219938ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: None
resolution: Duplicate
title: MS Windows NT, can't get KeyPress events when a menu is posted
comment:
  OriginalBugID: 1415 RFE
  Version: 8.0.3
  SubmitDate: '1999-03-02'
  LastModified: '2000-02-10'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 3222
  OS: Windows NT
  OSVersion: Version 4.0 (Build 1381)
  Machine: X86
  ClosedDate: '2000-02-10'


  Name:
  Quackenbush, Phil

  ReproducibleScript:
  Severe impact may be an exaggeration, but not being able to get help (e.g. F1) when a menu is up severely compromises usability.

  I bound <KeyPress-F1> to a menu, but couldn't get anything.

  Checked the MS Windows implementation of menus (tkWinMenu.c - WM_MENUCHAR case in the function TkWinHandleMenuEvent in particular) and it appears I can't get any KeyPress events?



  This is really an RFE.  We provide the <<MenuSelect>> to get the
  change in menu index, but since we use native menus on Win/Mac,
  we can't promise full control over the menus.  It may be possible
  to add handling for keys in Windows. 
  -- 02/10/2000 hobbs


tkt_uuid: 219939ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Toplevels not resizing when widgets destroyed
comment:
  OriginalBugID: 1450 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-04'
  LastModified: '1999-08-07'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2308
  OS: AIX
  OSVersion: 4.3
  Machine: RS6000
  ClosedDate: '1999-08-07'


  Name:
  Anthony Johnson
  email:  caldiver@pacbell.net

  ReproducibleScript:
  toplevel .test
  button .test.but1 -text "show button" -command "button .test.but2  -text {destroy me} -command {destroy .test.but2; pack .test.but2}"

  -> Try pressing the "destroy" button after resizing the toplevel.
  -> Try adding "wm resizable .test 0 0"

  ObservedBehavior:
  Catch-22: I want to destroy a widget from a toplevel window and have the toplevel shrink accordingly:
    - If the user changes the window size using the resize bars from the
      window manager, the toplevel will no longer shrink when widgets destroyed.
    - If I use "wm resizable .win 0 0" so the user can't resize the window, the
      toplevel will also not shrink when widgets destroyed.
  Essencially, to have this function, I must allow the user to resize the window, but if they do so, the program no longer works as expected.

  DesiredBehavior:
  I need to EITHER:
    1. disable the resizing of the window by the user and still have the
       window adjust its size to fit new/destroyed widgets. OR
    2. allow the user to resize the window and STILL automatically re-adjust the
       window to fit new/destroyed widgets.


tkt_uuid: 219940ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: obsolete: 8.1b1
resolution: Duplicate
title: Check and radio button entries not drawn correctly
comment:
  OriginalBugID: 1464 Bug
  Version: 8.1b1
  SubmitDate: '1999-03-08'
  LastModified: '2000-09-05'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 4178
  OS: Windows 98
  Machine: X86
  FixedDate: '2000-09-05'


  Name:
  Christopher Nelson

  ReproducibleScript:
      menu .mb
      . configure -menu .mb
      
      menu .mb.options -tearoff 0
      
      .mb.options add checkbutton -label "Check 1" -variable check1
      .mb.options add checkbutton -label "Check 2" -variable check2
      .mb.options add separator
      .mb.options add radiobutton -label "Radio 1" -variable radio -value 0
      .mb.options add radiobutton -label "Radio 2" -variable radio -value 1
      .mb.options add radiobutton -label "Radio 3" -variable radio -value 2
      
      .mb add cascade -label Options -underline 0 -menu .mb.options
      
      



  ObservedBehavior:
      When the menu is posted, the check marks are incomplete.  As the menu is
      traversed, they are drawn the rest of the way.
      



  DesiredBehavior:
      The checkmarks should be complete when the menu is posted.
      




  This seems to be working properly in 8.2. 
  -- 09/16/1999 hobbs

  This only occurs with "Animated Menus" turned on.  See 4178. 
  -- 09/05/2000 hobbs


tkt_uuid: 219943ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: prowish80 -h generates Dr. Watson Error
comment:
  OriginalBugID: 1472 Bug
  Version: 8.0.5
  SubmitDate: '1999-03-08'
  LastModified: '1999-10-19'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 3052
  OS: Windows NT
  OSVersion: NT4.0SP4
  Machine: X86
  ClosedDate: '1999-10-19'


  Name:
  Steve Hurrell

  Extensions:
  Just protcl 1.2 invoked from a DOS box.

  CustomShell:
  Nothing

  ReproducibleScript:
      Type "prowish80 -h" then click on the OK button. Dr. Watson fires up a
      reports as below. This is on a NT4.0sp4 box that has never seen any tcl
      product before.
      Thanks. Steve
      
      



  ObservedBehavior:
      Exception: hardcoded breakpoint(0x80000003), Address:0x004014eb
      




  03/08/1999 11:42 - pat -the problem also occurs when you use -help


tkt_uuid: 219944ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: focus command not returning correct window
comment:
  OriginalBugID: 1506 Bug
  Version: 8.0.4
  SubmitDate: '1999-03-15'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1505 2307
  OS: AIX
  OSVersion: 4.1 and 4.3
  Machine: RS6000
  ClosedDate: '2000-01-06'


  Name:
  Anthony Johnson
  email:  caldiver@pacbell.net

  Extensions:
  8.0p2 and 8.0.4, TclX8.0.3, TkX8.0.3

  ReproducibleScript:
     focus <-- returns NULL
     toplevel .test
     raise .test
     focus .test
     focus <-- returns NULL
  ---------------------
     toplevel .test
     raise .test
     focus .test
     update
     focus <--- returns "."
  ------------------
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns .test
  -------------------
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL
     destroy .test
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL
  -------------------
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL
     destroy .test
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL

  ObservedBehavior:
  Using "update idletasks" instead of "update" has the same affect as omitting it entirely. I cannot use "update" becasue I do not want to start an event loop within my proc. Even when using "update", it doesnt appear to return the correct window I last focused on. Any time a window is destroyed, the focus command returns NULL until update is executed again.

  DesiredBehavior:
  Focus should return the name of the toplevel window which last had focus.

  Tk 8.0.4 Bug

  Name:  Anthony Johnson
  email:  caldiver@pacbell.net
  Support:  None
  CVS:  Correction: focus command not returning correct window
  Synopsis:  Correction to last portion of test case

  ReproducibleScript:
  Did not update my comments in the last portion of the test case:
  OLD:
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL
     destroy .test
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns NULL
  NEW:
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns .test
     destroy .test
     update
     toplevel .test
     raise .test
     focus .test
     focus <--- returns .test


tkt_uuid: 219945ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: Index of window in text STILL dumps core
comment:
  OriginalBugID: 1546 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-19'
  LastModified: '1999-03-24'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: surles
  RelatedBugIDs: 991
  OS: Other
  Machine: NA
  ClosedDate: '1999-03-24'


  Name:
  Don Porter



      See [BugID: 991] reporting the bug in Tk 8.1b1 on
      http://www.scriptics.com/resource/software/patches/tk81b1
      
      The bug is still present in Tk 8.1b2.  
      The submitted patch still fixes it.
      
      PLEASE, don't let 8.1 go final without fixing this.
      


tkt_uuid: 219946ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: Tk widgets do not work correctly if the filename is a reserved word
comment:
  OriginalBugID: 1566 Bug
  Version: 8.0.5
  SubmitDate: '1999-03-19'
  LastModified: '1999-09-13'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2691
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-09-13'


  From: Rolf Schroedter <Rolf.Schroedter@dlr.de>
  Newsgroups: comp.lang.tcl
  Subject: Re: Strange button.tcl bug?
  Date: Mon, 15 Mar 1999 10:35:34 +0100
  Organization: DLR, Inst.f.Planetenerkundung
  Message-ID: <36ECD466.2E25CAA9@dlr.de>
  References: <36EB1540.C550575C@mail.netanya.ac.il>

  This is a funny kind of bug that has already been reported 
  several times.

  Don't use 'reserved' filenames like "button.tcl", "menu.tcl",...
  Otherwise Tk's option data base will not be configured properly.

  The only conclusion for me is to use only nonsense filenames
  as "gnlfkr.tcl".

  Regards,
  Rolf.

  Samy Zafrany wrote:
  > 
  > I have handed my students a file called "button.tcl"
  > with the famous button example:
  > 
  >      button .b -text Hello -command {puts "Hello World!"}
  >      pack .b
  > ...
  > (Tcl is installed in c:\tcl on our college labs)
  > So at the DOS prompt we write
  >     D:\SOMEDIR\> wish button.tcl
  > A very starnge thing happened!
  > The button shows up ok, but when I enter the "Hello" button, I get the
  > following error message: "Error: unknown option -state".
  > 
  > I have renamed the "button.tcl" file to "but.tcl" and everything worked
  > fine!
  > This is ver strange to me!?!?! Can someone explain this weird behaviour?
  > 
  > I suspect it has to do with the c:\tcl\lib\tk8.0\button.tcl file
  > but I still don't see how.
  > Samy.


  The problem occurs when confusion arises over class names.
   A script takes the root filename of the script as the class
   name for the primary toplevel.  Tk will then tie that in
   to known classes when creating the toplevel, so a toplevel
   will try to be configured with class Radiobutton...  
  -- 09/13/1999 hobbs


tkt_uuid: 219947ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 58. [send]
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: wish hangs on Windows after spawning itself via fileevent
comment:
  OriginalBugID: 1594 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-22'
  LastModified: '1999-03-26'
  Severity: CRIT
  Status: Closed
  Submitter: hershey
  ChangedBy: surles
  RelatedBugIDs: 1495
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-03-26'


  If you source the following script in the wish81b2 on windows, it
  hangs after printing the exe name.  Note that two wish81.exe processes
  are running when the app is hung, and if you kill the second one, then
  the first one continues.  This code was taken directly from the
  defs.tcl test suite file.

  set tcltest [info nameofexecutable]
  puts $tcltest
  update
  puts "goodbye"
  flush stdout

  catch {
      file delete -force tmp
      set f [open tmp w]
      puts $f {
  exit
      }
      close $f
      set f [open "|[list $tcltest tmp]" r]
      close $f
  }
  catch {file delete -force tmp}


  Duplicate bug ID 1495.


tkt_uuid: 219948ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: Creating scale widgets from within a procedure changes expr precision
comment:
  OriginalBugID: 1606 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-23'
  LastModified: '1999-03-25'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: stanton
  RelatedBugIDs: 1516
  OS: SunOS
  OSVersion: 5.7
  Machine: Sparc
  ClosedDate: '1999-03-25'


  Name:
  Matthew Swift

  CVS:
  Checked out core-8-1-b2 of Tcl/Tk on March 22nd 1999 at 09:15+0000

  Extensions:
  None

  CustomShell:
  None

  ReproducibleScript:
      From within wish8.1:

      set tcl_patchLevel# Returns 8.1b2
      set tk_patchLevel# Returns 8.1b1 (should be 8.1b2)

      proc foo {name} {
      scale $name.s -from 0 -to 100 -orient horizontal  -variable ${name}(window) -showvalue 0

      pack $name.s -fill x -expand yes
      }

      expr 100# returns 100
      toplevel .x
      foo .x
      expr 100# returns 100.0, expected 100

      format "Hello %d" [expr 100 * 10] # ERROR: expected integer but got
      "1000.0"

  ObservedBehavior:
      1) tk_patchLevel variable is wrong (this isn't important though)
      2) The result of [expr 100] is 100 before I create the scale widget and
      100.0 afterwards. This lead to problems where subsequent calculations
      that are supposed to return integers produce errors when passed to the
      format command via the %d flag (as shown above).

  DesiredBehavior:
      The behaviour of expr should not be altered by the scale command.



      Interestingly, if I create the scale widget at the global level (i.e.
      not from within the procedure) the problem does not occur.
  ----
  Simplified script that causes bug:

    proc foo {} {
        scale .s -from 0 -to 100
    }
    puts "[expr 100]"
    foo
    puts "[expr 100]"

  03/25/1999 10:30 - surles -
      
      


tkt_uuid: 219949ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: wm deiconify $win doesn't raise at the same time
comment:
  OriginalBugID: 1610 Bug
  Version: 8.0.5
  SubmitDate: '1999-03-23'
  LastModified: '1999-03-23'
  Severity: MED
  Status: Closed
  Submitter: welch
  ChangedBy: stanton
  RelatedBugIDs: 1609
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  ClosedDate: '1999-03-23'


  Name:

  Marco R. Gazzetta



  CVS:

  RCS: @(#) $Id: tkWinWm.c,v 1.7 1999/03/10 19:29:24 redman Exp $



  ReproducibleScript:

      wish80d.exe

      wm withdraw .

      [ now click on any window that was behind . ]

      wm deiconify .

      







  ObservedBehavior:

      the main window never appears

      







  DesiredBehavior:

      the main window shows up

      







  Patch:

  Index: tkWinWm.c

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

  RCS file: /cvsroot/tk/win/tkWinWm.c,v

  retrieving revision 1.7

  diff -c -r1.7 tkWinWm.c

  *** tkWinWm.c   1999/03/10 19:29:24     1.7

  --- tkWinWm.c   1999/03/23 18:17:15

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

  *** 1348,1353 ****

  --- 1348,1358 ----

                        ": it is an embedded window", (char *) NULL);

                return TCL_ERROR;

            }

  +         /* Annoying bug on windows: whenever a window is iconified, it

  +          * is put at the end of the Z-order. If we don't restack here,

  +          * deiconified windows stay always in the background (marcog)

  +          */

  +         Tk_RestackWindow(tkwin,Above,NULL);

          TkpWmSetState(winPtr, NormalState);

        } else if ((c == 'f') && (strncmp(argv[1], "focusmodel", length) == 0)

              && (length >= 2)) {







  PatchFiles:

      tkWinWm.c

      









      the standard behavior on UNIX is that wm deiconify not only RAISES the
      window, it additionally focuses it. I left that out in the patch to have
      minimal impact, but it might be considered. As soon as this patch is in
      and if the UNIX behavior  is considered a model, the focus change could
      be added as well.
      
      This second consideration seemed less important to me. The problem was
      that the window, since not showing up, was never percieved as existing,
      which meant quite a debugging effort.
      


tkt_uuid: 219950ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: Many Tk interfaces claim to work on chars, but really work on bytes
comment:
  OriginalBugID: 1646 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-26'
  LastModified: '1999-05-20'
  Severity: CRIT
  Status: Closed
  Submitter: stanton
  ChangedBy: hershey
  RelatedBugIDs: 749  747
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-05-20'


  Interfaces like Tk_CharBbox used to take a character index.  This index is now a byte offest, but the code that calls it hasn't been updated.

  A complete review of all character oriented Tk interfaces is needed.


tkt_uuid: 219961ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: Caps Lock light failure
comment:
  OriginalBugID: 1656 Bug
  Version: 8.0.3
  SubmitDate: '1999-03-29'
  LastModified: '1999-08-07'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2493
  OS: Windows 95
  OSVersion: OSR2
  Machine: X86
  ClosedDate: '1999-08-07'


  Name:
  Robert Embleton

  Extensions:
  none

  CustomShell:
  none

  ReproducibleScript:
      No script necessary.  Just start Wish80 on Win95 or Win98 and press the
      Caps Lock button.  See, no indication on the keyboard that caps lock is
      enabled.
      



  ObservedBehavior:
      Win 95/98 platform.  If the Caps Lock key is pressed to enable caps lock
      mode, the indicator light on the keyboard flashes on then turns off.
      The caps lock mode is enabled, but the light is off.  Pressing the Caps
      Lock again toggles the caps lock mode off.  The indicator light remains
      off.  FYI:  This does not occur on a NT platform
      



  DesiredBehavior:
      One would expect the indicator light to remain lit while thecaps lock
      mode is enabled.
      


tkt_uuid: 219962ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: make test generates many errors
comment:
  OriginalBugID: 1658 Bug
  Version: 8.1b2
  SubmitDate: '1999-03-29'
  LastModified: '1999-08-31'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2181
  OS: Solaris
  OSVersion: 2.6
  Machine: Other
  ClosedDate: '1999-08-31'


  Name: Larry W. Virden
  Extensions: Tk
  CustomShell: none

  ReproducibleScript:
      I did a make distclean to remove the previous configuration
      (which was core dumping).  I then did a
      /vol/tclsrcsol/tcl81/tk8.1b2/unix/configure --prefix=/usr/tcl81
      --exec_prefix=/usr/tcl81/sun4 --enable-shared
      make all
      make test

  ObservedBehavior:
      the make test reported 47 failures - ranging from
      canvText.test clipboard.test config.test focus.test grid.test main.test
      safe.test send.test textDisp.test unixEmbed.test unixFont.test
      unixSend.test util.test winfo.test
      
      Here are the specifics of the failures.
      
      canvText.test
      
      ==== canvText-6.1 ComputeTextBbox procedure FAILED
      ==== Contents of test case:
      
          .c itemconfig test -font $font -text 0
          .c coords test 0 0
          set x {}
          lappend x [.c itemconfig test -anchor n; .c bbox test]
          lappend x [.c itemconfig test -anchor nw; .c bbox test]
          lappend x [.c itemconfig test -anchor w; .c bbox test]
          lappend x [.c itemconfig test -anchor sw; .c bbox test]
          lappend x [.c itemconfig test -anchor s; .c bbox test]
          lappend x [.c itemconfig test -anchor se; .c bbox test]
          lappend x [.c itemconfig test -anchor e; .c bbox test]
          lappend x [.c itemconfig test -anchor ne; .c bbox test]
          lappend x [.c itemconfig test -anchor center; .c bbox test]
      
      ---- Result was:
      {-6 0 6 25} {-1 0 11 25} {-1 -12 11 13} {-1 -25 11 0} {-6 -25 6 0} {-11
      -25 1 0} {-11 -12 1 13} {-11 0 1 25} {-6 -12 6 13}
      ---- Result should have been:
      {-6 0 6 25} {-1 0 11 25} {-1 -13 11 12} {-1 -25 11 0} {-6 -25 6 0} {-11
      -25 1 0} {-11 -13 1 12} {-11 0 1 25} {-6 -13 6 12}
      ==== canvText-6.1 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
      
      clrpick.test
      Skipped tests clrpick2.1, clrpick2.2 and clrpick2.3 because
      you ran out of colors in your color palette, and this would
      have caused the tests to generate errors.
      
      config.test
      
      ==== config-8.9 Tk_RestoreSavedOptions - font internal form FAILED
      ==== Contents of test case:
      
          eval destroy [winfo children .]
          testobjconfig internal .a
          list [catch {.a csave -font {Times 12} -color bogus}] [.a cget
      -font]
      
      ---- Result was:
      1 {-*-lucida sans typewriter-medium-r-*-*-16-*-*-*-*-*-*-*}
      ---- Result should have been:
      1 {Helvetica 12}
      ==== config-8.9 FAILED
      
      focus.test
      
      ==== focus-6.1 miscellaneous - embedded application in same process
      FAILED
      ==== Contents of test case:
      
          eval interp delete [interp slaves]
          catch {destroy .t}
          toplevel .t
          wm geometry .t +0+0
          frame .t.f1 -container 1
          frame .t.f2
          pack .t.f1 .t.f2
          entry .t.f2.e1 -bg red
          pack .t.f2.e1
          bind all <FocusIn> {lappend x "focus in %W %d"}
          bind all <FocusOut> {lappend x "focus out %W %d"}
          interp create child
          child eval "set argv {-use [winfo id .t.f1]}"
          load {} tk child
          child eval {
              entry .e1 -bg lightBlue
              pack .e1
              bind all <FocusIn> {lappend x "focus in %W %d"}
              bind all <FocusOut> {lappend x "focus out %W %d"}
              set x {}
          }
      
          # Claim the focus and wait long enough for it to really arrive.
      
          focus -force .t.f2.e1
          after 300 {set timer 1}
          vwait timer
          set x {}
          lappend x [focus] [child eval focus]
      
          # See if a "focus" command will move the focus to the embedded
          # application.
      
          child eval {focus .e1}
          after 300 {set timer 1}
          vwait timer
          lappend x |
          child eval {lappend x |}
      
          # Bring the focus back to the main application.
      
          focus .t.f2.e1
          after 300 {set timer 1}
          vwait timer
          set result [list $x [child eval {set x}]]
          interp delete child
          set result
      
      ---- Result was:
      {.t.f2.e1 {} | {focus out .t.f2.e1 NotifyNonlinear} {focus out .t.f2
      NotifyNonlinearVirtual} {focus in .t.f1 NotifyNonlinear}} {| {focus in .
      NotifyVirtual} {focus in .e1 NotifyAncestor}}
      ---- Result should have been:
      {.t.f2.e1 {} {focus out .t.f2.e1 NotifyNonlinear} {focus out .t.f2
      NotifyNonlinearVirtual} {focus in .t.f1 NotifyNonlinear} | {focus out
      .t.f1 NotifyNonlinear} {focus in .t.f2 NotifyNonlinearVirtual} {focus in
      .t.f2.e1 NotifyNonlinear}} {{focus in . NotifyVirtual} {focus in .e1
      NotifyAncestor} | {focus out .e1 NotifyAncestor} {focus out .
      NotifyVirtual}}
      ==== focus-6.1 FAILED
      
      grid.test
      
      ==== grid-6.9 location: check updates pending FAILED
      ==== Contents of test case:
      
              set a ""
              foreach i {0 1 2} {
                  frame .$i -width 120 -height 75 -bg red
                  lappend a [grid location . 150 90]
                  grid .$i -row $i -column $i
              }
              set a
      
      ---- Result was:
      {0 0} {0 1} {1 1}
      ---- Result should have been:
      {0 0} {1 1} {1 1}
      ==== grid-6.9 FAILED
      
      main.test
      
      ==== main-1.1 StdinProc FAILED
      ==== Contents of test case:
      
          catch {removeFile script}
          set fd [open script w]
          puts $fd {
              close stdin; exit
          }
          close $fd
          if {[catch {exec $tktest <script} msg]} {
              set error 1
          } else {
              set error 0
          }
          file delete -force script
          list $error $msg
      
      ---- Result was:
      1 {can't read "tktest": no such variable}
      ---- Result should have been:
      0 {}
      ==== main-1.1 FAILED
      
      safe.test
      
      ==== safe-5.1 loading Tk in safe interps without master's clearance
      FAILED
      ==== Contents of test case:
      
          set i [safe::interpCreate]
          catch {interp eval $i {load {} Tk}} msg
          safe::interpDelete $i
          set msg
      
      ---- Result was:
      couldn't create child of window "0xa0008f7"
      ---- Result should have been:
      not allowed to start Tk by master's safe::TkInit
      ==== safe-5.1 FAILED
      
      send.test
      
      ==== send-8.1 Tk_SendCmd procedure, options FAILED
      ==== Contents of test case:
      
          setupbg
          set app [dobg {tk appname}]
          set a 66
          send -async $app [list send [tk appname] set a 77]
          set result $a
          after 200 set x 40
          tkwait variable x
          cleanupbg
          lappend result $a
      
      ---- Result was:
      66 66
      ---- Result should have been:
      66 77
      ==== send-8.1 FAILED
      
      ==== send-10.19 SendEventProc procedure, send exits FAILED
      ==== Contents of test case:
      
              setupbg
              dobg {tk appname t_s_3}
              set x [list [catch {send t_s_3 exit} msg] $msg]
              close $fd
              set x
      
      ==== Test generated error:
      can not find channel named "file7"
      ---- Result should have been:
      1 {target application died}
      ==== send-10.19 FAILED
      
      ==== send-12.2 TimeoutProc procedure FAILED
      ==== Contents of test case:
      
          winfo interps
          tk appname tktest
          update
          setupbg
          puts $fd {after 10 {after 5000; exit}; puts [tk appname]; puts
      **DONE**; flush stdout}
          set ::test::bgDone 0
          set ::test::bgData {}
          flush $fd
          tkwait variable ::test::bgDone
          set app $::test::bgData
          after 200
          set result [list [catch {send $app foo} msg] $msg]
          close $fd
          set result
      
      ==== Test generated error:
      can not find channel named "file7"
      ---- Result should have been:
      1 {target application died}
      ==== send-12.2 FAILED
      
      textDisp.test
      
      ==== textDisp-2.22 LayoutDLine, spacing options FAILED
      ==== Contents of test case:
      
          .t configure -wrap word
          .t delete 1.0 end
          .t tag delete x y
          .t insert end "Short line\nLine 2 is long enough "
          .t insert end "to wrap around a couple of times"
          .t insert end "\nLine 3\nLine 4"
          set i [.t dlineinfo 1.0]
          set b1 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 2.0]
          set b2 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 2.end]
          set b3 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 3.0]
          set b4 [expr [lindex $i 1] + [lindex $i 4]]
          .t configure -spacing1 2 -spacing2 1 -spacing3 3
          set i [.t dlineinfo 1.0]
          set b1 [expr [lindex $i 1] + [lindex $i 4] - $b1]
          set i [.t dlineinfo 2.0]
          set b2 [expr [lindex $i 1] + [lindex $i 4] - $b2]
          set i [.t dlineinfo 2.end]
          set b3 [expr [lindex $i 1] + [lindex $i 4] - $b3]
          set i [.t dlineinfo 3.0]
          set b4 [expr [lindex $i 1] + [lindex $i 4] - $b4]
          list $b1 $b2 $b3 $b4
      
      ---- Result was:
      2.0 7.0 10.0 15.0
      ---- Result should have been:
      2 7 10 15
      ==== textDisp-2.22 FAILED
      
      ==== textDisp-2.23 LayoutDLine, spacing options FAILED
      ==== Contents of test case:
      
          .t configure -wrap word
          .t delete 1.0 end
          .t tag delete x y
          .t insert end "Short line\nLine 2 is long enough "
          .t insert end "to wrap around a couple of times"
          .t insert end "\nLine 3\nLine 4"
          set i [.t dlineinfo 1.0]
          set b1 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 2.0]
          set b2 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 2.end]
          set b3 [expr [lindex $i 1] + [lindex $i 4]]
          set i [.t dlineinfo 3.0]
          set b4 [expr [lindex $i 1] + [lindex $i 4]]
          .t configure -spacing1 4 -spacing2 4 -spacing3 4
          .t tag configure x -spacing1 1 -spacing2 2 -spacing3 3
          .t tag add x 1.0 end
          .t tag configure y -spacing1 0 -spacing2 3
          .t tag add y 2.19 end
          .t tag raise y
          set i [.t dlineinfo 1.0]
          set b1 [expr [lindex $i 1] + [lindex $i 4] - $b1]
          set i [.t dlineinfo 2.0]
          set b2 [expr [lindex $i 1] + [lindex $i 4] - $b2]
          set i [.t dlineinfo 2.end]
          set b3 [expr [lindex $i 1] + [lindex $i 4] - $b3]
          set i [.t dlineinfo 3.0]
          set b4 [expr [lindex $i 1] + [lindex $i 4] - $b4]
          list $b1 $b2 $b3 $b4
      
      ---- Result was:
      1.0 5.0 13.0 16.0
      ---- Result should have been:
      1 5 13 16
      ==== textDisp-2.23 FAILED
      
      ==== textDisp-24.9 TkTextCharLayoutProc, line ends with space FAILED
      ==== Contents of test case:
      
          .t configure -wrap char
          .t delete 1.0 end
          .t insert 1.0 "a b c d e f g h i j k l m n o p"
          wm geom . [expr $width-6]x$height
          update
          list [.t bbox 1.19] [.t bbox 1.20]
      
      ==== Test generated error:
      bad geometry specifier "244.0x140"
      ---- Result should have been:
      {136 3 5 13} {3 16 7 13}
      ==== textDisp-24.9 FAILED
      
      unixEmbed.test
      
      ==== unixEmbed-1.3 TkpUseWindow procedure, inheriting colormap FAILED
      ==== Contents of test case:
      
          catch {destroy .t}
          catch {destroy .x}
          toplevel .t -colormap new
          wm geometry .t +0+0
          eatColors .t.t
          frame .t.f -container 1
          toplevel .x -use [winfo id .t.f]
          set result [colorsFree .x]
          destroy .t
          set result
      
      ==== Test generated error:
      expected integer but got "0.0"
      ---- Result should have been:
      0
      ==== unixEmbed-1.3 FAILED
      
      ==== unixEmbed-1.4 TkpUseWindow procedure, inheriting colormap FAILED
      ==== Contents of test case:
      
          catch {destroy .t}
          catch {destroy .t2}
          catch {destroy .x}
          toplevel .t -container 1 -colormap new
          wm geometry .t +0+0
          eatColors .t2
          toplevel .x -use [winfo id .t]
          set result [colorsFree .x]
          destroy .t
          set result
      
      ==== Test generated error:
      expected integer but got "0.0"
      ---- Result should have been:
      1
      ==== unixEmbed-1.4 FAILED
      
      ==== unixEmbed-5.1 EmbedFocusProc procedure, FocusIn events FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
              bind .t1 <FocusIn> {lappend x "focus in %W"}
              bind .t1 <FocusOut> {lappend x "focus out %W"}
              set x {}
          }
          focus -force .f1
          update
          dobg {set x}
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {focus in .t1}
      ==== unixEmbed-5.1 FAILED
      
      ==== unixEmbed-5.2 EmbedFocusProc procedure, focusing on dead window
      FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
          }
          update
          dobg {
              after 200 {destroy .t1}
          }
          after 400
          focus -force .f1
          update
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      
      ==== unixEmbed-5.2 FAILED
      
      ==== unixEmbed-5.3 EmbedFocusProc procedure, FocusOut events FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
              bind .t1 <FocusIn> {lappend x "focus in %W"}
              bind .t1 <FocusOut> {lappend x "focus out %W"}
              set x {}
          }
          focus -force .f1
          update
          set x [dobg {update; set x}]
          focus .
          update
          list $x [dobg {update; set x}]
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{focus in .t1}} {{focus in .t1} {focus out .t1}}
      ==== unixEmbed-5.3 FAILED
      
      ==== unixEmbed-6.1 EmbedGeometryRequest procedure, window changes size
      FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
          }
          update
          dobg {
              bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
              set x {}
              .t1 configure -width 300 -height 120
              update
              list $x [winfo geom .t1]
          }
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{configure .t1 300 120}} 300x120+0+0
      ==== unixEmbed-6.1 FAILED
      
      ==== unixEmbed-6.2 EmbedGeometryRequest procedure, window changes size
      FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          place .f1 -width 200 -height 200
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
          }
          after 300 {set x done}
          vwait x
          dobg {
              bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
              set x {}
              .t1 configure -width 300 -height 120
              update
              list $x [winfo geom .t1]
          }
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{configure .t1 200 200}} 200x200+0+0
      ==== unixEmbed-6.2 FAILED
      
      ==== unixEmbed-7.1 TkpRedirectKeyEvent procedure, forward keystroke
      FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
          }
          focus -force .
          bind . <KeyPress> {lappend x {key %A %E}}
          set x {}
          set y [dobg {
              update
              bind .t1 <KeyPress> {lappend y {key %A}}
              set y {}
              event generate .t1 <KeyPress> -keysym a
              set y
          }]
          update
          bind . <KeyPress> {}
          list $x $y
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{key a 1}} {}
      ==== unixEmbed-7.1 FAILED
      
      ==== unixEmbed-7.2 TkpRedirectKeyEvent procedure, don't forward
      keystroke width FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1
          }
          update
          focus -force .f1
          update
          bind . <KeyPress> {lappend x {key %A}}
          set x {}
          set y [dobg {
              update
              bind .t1 <KeyPress> {lappend y {key %A}}
              set y {}
              event generate .t1 <KeyPress> -keysym b
              set y
          }]
          update
          bind . <KeyPress> {}
          list $x $y
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {} {{key b}}
      ==== unixEmbed-7.2 FAILED
      
      ==== unixEmbed-8.1 TkpClaimFocus procedure FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          frame .f2 -width 200 -height 50
          pack .f1 .f2
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
          }
          focus -force .f2
          update
          list [dobg {
              focus .t1
              set x [list [focus]]
              update
              after 500
              update
              lappend x [focus]
          }] [focus]
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{} .t1} .f1
      ==== unixEmbed-8.1 FAILED
      
      ==== unixEmbed-9.2 EmbedWindowDeleted procedure, check embeddedPtr
      FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
              catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
              eval destroy [winfo child .]
              toplevel .t1 -use $w1 -highlightthickness 2 -bd 2 -relief sunken
              set x {}
              lappend x [testembed]
              destroy .t1
              lappend x [testembed]
          }
      
      ==== Test generated error:
      error flushing "file10": broken pipe
      ---- Result should have been:
      {{XXX {} {} .t1}} {}
      ==== unixEmbed-9.2 FAILED
      
      unixFont.test
      
      ==== unixfont-5.4 Tk_MeasureChars procedure: reached right edge FAILED
      ==== Contents of test case:
      
          .b.l config -text "0000000000000"
          getsize
      
      ---- Result was:
      60 26
      ---- Result should have been:
      60.0 26
      ==== unixfont-5.4 FAILED
      
      ==== unixfont-5.5 Tk_MeasureChars procedure: ran out of chars FAILED
      ==== Contents of test case:
      
          .b.l config -text "000000"
          getsize
      
      ---- Result was:
      36 13
      ---- Result should have been:
      36.0 13
      ==== unixfont-5.5 FAILED
      
      ==== unixfont-5.6 Tk_MeasureChars procedure: find last word FAILED
      ==== Contents of test case:
      
          .b.l config -text "000000 00000"
          getsize
      
      ---- Result was:
      36 26
      ---- Result should have been:
      36.0 26
      ==== unixfont-5.6 FAILED
      
      ==== unixfont-5.7 Tk_MeasureChars procedure: already saw space in line
      FAILED
      ==== Contents of test case:
      
          .b.l config -text "000000     00000"
          getsize
      
      ---- Result was:
      36 26
      ---- Result should have been:
      36.0 26
      ==== unixfont-5.7 FAILED
      
      ==== unixfont-5.8 Tk_MeasureChars procedure: internal spaces significant
      FAILED
      ==== Contents of test case:
      
          .b.l config -text "00  000     00000"
          getsize
      
      ---- Result was:
      42 26
      ---- Result should have been:
      42.0 26
      ==== unixfont-5.8 FAILED
      
      ==== unixfont-5.10 Tk_MeasureChars procedure: TK_AT_LEAST_ONE FAILED
      ==== Contents of test case:
      
          .b.l config -text "000000000000"
          getsize
      
      ---- Result was:
      60 26
      ---- Result should have been:
      60.0 26
      ==== unixfont-5.10 FAILED
      
      ==== unixfont-5.11 Tk_MeasureChars: TK_AT_LEAST_ONE + not even one char
      fit! FAILED
      ==== Contents of test case:
      
          set a [.b.l cget -wrap]
          .b.l config -text "000000" -wrap 1
          set x [getsize]
          .b.l config -wrap $a
          set x
      
      ---- Result was:
      6 78
      ---- Result should have been:
      6 78.0
      ==== unixfont-5.11 FAILED
      
      ==== unixfont-5.12 Tk_MeasureChars procedure: include eol spaces FAILED
      ==== Contents of test case:
      
          .b.l config -text "000   \n000"
          getsize
      
      ---- Result was:
      36 26
      ---- Result should have been:
      36.0 26
      ==== unixfont-5.12 FAILED
      
      ==== unixfont-8.4 AllocFont procedure: classify characters FAILED
      ==== Contents of test case:
      
          set x 0
          incr x [font measure $courier "\u4000"]   ;# 6
          incr x [font measure $courier "\002"]   ;# 4
          incr x [font measure $courier "\012"]   ;# 2
          incr x [font measure $courier "\101"]   ;# 1
          set x
      
      ---- Result was:
      78
      ---- Result should have been:
      78.0
      ==== unixfont-8.4 FAILED
      
      ==== unixfont-8.6 AllocFont procedure: setup widths of special chars
      FAILED
      ==== Contents of test case:
      
          set x 0
          incr x [font measure $courier "\001"]   ;# 4
          incr x [font measure $courier "\002"]   ;# 4
          incr x [font measure $courier "\012"]   ;# 2
          set x
      
      ---- Result was:
      60
      ---- Result should have been:
      60.0
      ==== unixfont-8.6 FAILED
      
      unixMenu.test
      unixSend.test
      
      ==== unixSend-10.19 SendEventProc procedure, send exits FAILED
      ==== Contents of test case:
      
              setupbg
              dobg {tk appname t_s_3}
              set x [list [catch {send t_s_3 exit} msg] $msg]
              close $fd
              set x
      
      ==== Test generated error:
      can not find channel named "file7"
      ---- Result should have been:
      1 {target application died}
      ==== unixSend-10.19 FAILED
      
      ==== unixSend-12.2 TimeoutProc procedure FAILED
      ==== Contents of test case:
      
          winfo interps
          tk appname tktest
          update
          setupbg
          puts $fd {after 10 {after 5000; exit}; puts [tk appname]; puts
      **DONE**; flush stdout}
          set ::test::bgDone 0
          set ::test::bgData {}
          flush $fd
          tkwait variable ::test::bgDone
          set app $::test::bgData
          after 200
          set result [list [catch {send $app foo} msg] $msg]
          close $fd
          set result
      
      ==== Test generated error:
      can not find channel named "file7"
      ---- Result should have been:
      1 {target application died}
      ==== unixSend-12.2 FAILED
      
      unixWm.test
      
      ==== unixWm-2.1 moving window while mapped FAILED
      ==== Contents of test case:
      
              wm geom .t $geom
              update
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "20.0"
      ---- Result should have been:
      +20+80
      ==== unixWm-2.1 FAILED
      
      ==== unixWm-2.2 moving window while mapped FAILED
      ==== Contents of test case:
      
              wm geom .t $geom
              update
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "80.0"
      ---- Result should have been:
      +80+20
      ==== unixWm-2.2 FAILED
      
      ==== unixWm-2.7 moving window while mapped FAILED
      ==== Contents of test case:
      
              wm geom .t $geom
              update
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      -10-5
      ==== unixWm-2.7 FAILED
      
      ==== unixWm-2.8 moving window while mapped FAILED
      ==== Contents of test case:
      
              wm geom .t $geom
              update
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      -10+5
      ==== unixWm-2.8 FAILED
      
      ==== unixWm-2.9 moving window while mapped FAILED
      ==== Contents of test case:
      
              wm geom .t $geom
              update
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      +10-5
      ==== unixWm-2.9 FAILED
      
      ==== unixWm-3.1 moving window while iconified FAILED
      ==== Contents of test case:
      
              wm iconify .t
              sleep 200
              wm geom .t $geom
              update
              wm deiconify .t
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "20.0"
      ---- Result should have been:
      +20+80
      ==== unixWm-3.1 FAILED
      
      ==== unixWm-3.2 moving window while iconified FAILED
      ==== Contents of test case:
      
              wm iconify .t
              sleep 200
              wm geom .t $geom
              update
              wm deiconify .t
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "80.0"
      ---- Result should have been:
      +80+20
      ==== unixWm-3.2 FAILED
      
      ==== unixWm-3.7 moving window while iconified FAILED
      ==== Contents of test case:
      
              wm iconify .t
              sleep 200
              wm geom .t $geom
              update
              wm deiconify .t
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      -10-5
      ==== unixWm-3.7 FAILED
      
      ==== unixWm-3.8 moving window while iconified FAILED
      ==== Contents of test case:
      
              wm iconify .t
              sleep 200
              wm geom .t $geom
              update
              wm deiconify .t
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      -10+5
      ==== unixWm-3.8 FAILED
      
      ==== unixWm-3.9 moving window while iconified FAILED
      ==== Contents of test case:
      
              wm iconify .t
              sleep 200
              wm geom .t $geom
              update
              wm deiconify .t
              scan [wm geom .t] %dx%d%1s%d%1s%d width height xsign x ysign y
              format "%s%d%s%d" $xsign [eval expr $x$xsign$xerr] $ysign  [eval
      expr $y$ysign$yerr]
      
      ==== Test generated error:
      expected integer but got "10.0"
      ---- Result should have been:
      +10-5
      ==== unixWm-3.9 FAILED
      
      bad geometry specifier "+100.0+200"
      
      visual.test
      expected integer but got "0.0"
      
      winfo.test
      
      ==== winfo-3.4 "winfo colormapfull" command FAILED
      ==== Contents of test case:
      
              eatColors .t {-colormap new}
              set result [list [winfo colormapfull .] [winfo colormapfull .t]]
              .t.c delete 34
              lappend result [winfo colormapfull .t]
              .t.c create rectangle 30 30 80 80 -fill #441739
              lappend result [winfo colormapfull .t]
              .t.c create rectangle 40 40 90 90 -fill #ffeedd
              lappend result [winfo colormapfull .t]
              destroy .t.c
              lappend result [winfo colormapfull .t]
      
      ==== Test generated error:
      expected integer but got "0.0"
      ---- Result should have been:
      0 1 0 0 1 0
      ==== winfo-3.4 FAILED
      
      This application hasn't been compiled with the testwrapper command,
      therefore I am skipping all of these tests.
      
      Tests ended at Mon Mar 29 13:20:52 EST 1999
      all.tcl:        Total   6054    Passed  5844    Skipped 163     Failed
      47
      Sourced 68 Test Files.
      Files with failing tests: canvText.test clipboard.test config.test
      focus.test grid.test main.test safe.test send.test textDisp.test
      unixEmbed.test unixFont.test unixSend.test util.test winfo.test

  DesiredBehavior:
      I would expect that tests should succeed.


  Marked tests nonPortable:
  canvText-6.1
  config-8.9
  grid-6.9

  Already fixed bug in test suite or source code:
  main-1.1: bug in test
  safe-5.1: bug in interp deletion

  Haven't reproduced these yet:
  focus-6.1
  clipboard-6.2
  send-8.1,10.19,12.2
  textDisp-2.22,2.23,24.9
  unixEmbed 1.3,1.4: I think these were fixed.

  We fixed a bug in how integer values get returned in Tcl8.1b2.  This fix probably fixed many of the other failures.
  -hershey

  This has narrowed down to 2 test suite failures for Larry in 8.1.1
  in the related bug id. 
  -- 08/31/1999 hobbs


tkt_uuid: 219963ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: wish core dump with scale.test
comment:
  OriginalBugID: 1686 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-01'
  LastModified: '1999-04-19'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: rjohnson
  RelatedBugIDs: 1748  1768
  OS: Digital Unix
  OSVersion: 4.0B
  Machine: Other
  ClosedDate: '1999-04-19'


  CVS: Apr.1, tk8.1, 1.1.4.12
  Extensions: none

  ReproducibleScript:
      ./configure --prefix=/usr/new/src/tk/tk8.1b/Tobedel/installc  --disable-shared --enable-64bit

      make ; make test

      ./configure --prefix=/usr/new/src/tk/tk8.1b/Tobedel/installc  --disable-shared --enable-symbols

      make ; make test

  ObservedBehavior:
      On Digital-Unix-4.0B, up to tcl/tk8.1b1 wish 
      worked fairly well, although thread support 
      was not mature.  However, tcl/tk8.1b2 and 
      cvs versions show many starange behaviours, 
      and crash (core dump). 

      (1) cvs(apr.1) tcl

      make test
      Tests ended at Thu Apr 01 10:35:27 JST 1999
      all.tcl:        Total   8382    Passed  7673    Skipped 701     Failed
      8
      Sourced 115 Test Files.
      Files with failing tests: clock.test if-old.test ioCmd.test safe.test
      Number of tests skipped for each constraint:
              15      95
              16      doTestsWithRemoteServer
              48      emptyTest
              2       hasIsoLocale
              7       installedTcl
              1       japanese
              14      knownBug
              122     macOnly
              151     nonPortable
              16      nt
              302     pcOnly
              1       testthread
              1       umask2
              5       xdev
      /bin/sh: 15581 Bus error - core dumped
      make: *** [test] Error 138

      (2) cvs (apr.1) tk

      make ; make test
      scale.test makes tktest core dump

      dbx tktest core
      dbx version 3.11.10
      Type 'help' for help.
      Core file created by program "tktest"

      signal Floating point exception at   [TkRoundToResolution:1150
      +0x20,0x120095ea0]       new = scalePtr->resolution *
      floor(value/scalePtr->resolution);
      (dbx) where
      >  0 TkRoundToResolution(scalePtr = 0x140323a00, value = Denormalized
      number 0x4022b190) ["./../generic/tkScale.c":1150, 0x120095ea0]
         1 ConfigureScale(interp = 0x14005b200, scalePtr = 0x140323a00, objc =
      8, objv = 0x140061748) ["./../generic/tkScale.c":635, 0x1200951c0]
         2 Tk_ScaleObjCmd(clientData = 0x1401a5520, interp = 0x14005b200, objc
      = 10, objv = 0x140061738) ["./../generic/tkScale.c":323, 0x12009485c]
         3 TclExecuteByteCode(0x10000000a, 0x14005b200, 0x1401310d0,
      0x14011af30, 0x1200e0788) [0x1201224fc]
         4 Tcl_EvalObjEx(0x14005b200, 0x6, 0x14005b200, 0x0, 0x100000000)
      [0x1200e0a68]
         5 Tcl_UplevelObjCmd(0x1200e3c04, 0x14005b200, 0x1, 0x140109e84,
      0x120122458) [0x120120914]
         6 TclExecuteByteCode(0x100000002, 0x1, 0x100000000, 0x14005b200,
      0x1200e0788) [0x1201224fc]
         7 Tcl_EvalObjEx(0x14001b740, 0x2, 0x5, 0x11fffdbb0, 0x0)
      [0x1200e0a68]
         8 TclObjInterpProc(0x140020e70, 0x14038dabd, 0x1200e70f4,
      0x14005b200, 0x0) [0x120121118]
         9 (unknown)() [0x12010e1c0]
        10 (unknown)() [0x1200e74b0]
        11 Tcl_EvalEx(0x1200fbd54, 0x14005b200, 0x1200fbd78, 0x14005b200,
      0x140147220) [0x1200e7dd4]
        12 Tcl_EvalFile(0x0, 0x14005b200, 0x1200e3c04, 0x14005b200,
      0x120137be0) [0x1200fbd94]
        13 Tcl_SourceObjCmd(0x1200e3c04, 0x14005b200, 0x120137be0,
      0x14005b200, 0x120122500) [0x120137bf4]
        14 TclExecuteByteCode(0x100000002, 0x14005b200, 0x14011a600,
      0x1401a2320, 0x1200e0788) [0x1201224fc]
        15 Tcl_EvalObjEx(0x14005b200, 0x2, 0x14011a5d0, 0x0, 0x140020e70)
      [0x1200e0a68]
        16 Tcl_CatchObjCmd(0x120122500, 0x140065800, 0x70597, 0x14010e859,
      0x140061700) [0x12012c190]
        17 TclExecuteByteCode(0x100000003, 0x14005b200, 0x140070d40, 0x1,
      0x1200e0788) [0x1201224fc]
        18 Tcl_EvalObjEx(0x1, 0x1, 0x11fffec58, 0x0, 0x14013e180)
      [0x1200e0a68]
        19 Tcl_ForeachObjCmd(0x1200e70f4, 0x14005b200, 0x0, 0x184, 0x4)
      [0x12012e998]
        20 (unknown)() [0x1200e74b0]
        21 Tcl_EvalEx(0x1200fbd54, 0x14005b200, 0x1200fbd78, 0x14005b200,
      0x11ffff358) [0x1200e7dd4]
        22 Tcl_EvalFile(0x11ffff470, 0x3, 0x120029964, 0x14005b200,
      0x1200321f8) [0x1200fbd94]
        23 Tk_MainEx(argc = 3, argv = 0x11ffff470, appInitProc = 0x12002983c,
      interp = 0x14005b200) ["./../generic/tkMain.c":228, 0x120032244]
        24 main(argc = 4, argv = 0x11ffff468) ["./tkAppInit.c":54,
      0x120029818]

      I've tried tk8.1b2 and cvs with several 
      combinations of thread, 64bit, gcc, shared, 
      without success. 

  DesiredBehavior:
      no core dump

  Comments:

      If you need more information, please ask me. 
      I think there are many users of Digital-unix/
      Tru64-Unix waiting for the fix. 

      I didn't have any problems with tk8.1b1. 



  This bug is reflected in 1748.
  04/07/1999 16:11 - hershey -

  Can't recreate bug this works on all the platforms we have. We really can't address
  this with out a patch or a machine.   04/16/1999 18:27 - rjohnson -


tkt_uuid: 219964ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: Disabled menubuttons have same foreground & background color
comment:
  OriginalBugID: 1703 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-02'
  LastModified: '1999-04-06'
  Severity: LOW
  Status: Closed
  Submitter: lfb
  ChangedBy: lfb
  RelatedBugIDs: 1735
  OS: All
  OSVersion: NA
  Machine: NA
  FixedDate: '1999-04-05'
  FixedInVersion: 8.1b3


  menubutton .mb -text "File" -state disabled
  pack .mb -padx 4 -pady 4

  The above script produces a menubutton that uses the same fg and bg color, which renders the text impossible to read.



  Duplicate bug id #1735


tkt_uuid: 219965ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 42. Photo Image|GIF
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: Displaying Gif-Images on an EBCDIC machine
comment:
  OriginalBugID: 1723 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-05'
  LastModified: '1999-04-05'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: pat
  OS: Other
  OSVersion: OS/390 4.0
  Machine: NA
  ClosedDate: '1999-04-05'


  Name:

  Christian Krone



  Extensions:

  Expect



  ReproducibleScript:

  On an EBCDIC machine (OS/390) Tk doesn't display gif images.



  DesiredBehavior:

  Tk should display gif images on an EBCDIC machine,

      if you transfer the images binary (without conversion from ascii to

      ebcdic).



  Patch:

  *** tkImgGIF.c.orgSat Mar 13 19:09:20 1999

  --- tkImgGIF.cTue Mar 23 14:54:04 1999

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

  *** 61,66 ****

  --- 61,89 ----

    #include "tkPort.h"

    

    /*

  +  * EBCDIC-Support:

  +  * Images in the GIF format contain binary pixel values and must not be

  +  * victim of an ASCII to EBCDIC translation. Unfortunately, the GIF header

  +  * and some special markers inside the file are still ASCII characters

  +  * then. They cannot be compared to EBCDIC strings and chars, which are

  +  * produced by the compiler.

  +  */

  + 

  + #if ' ' == 0x20 /*ASCII*/

  + #  define GIF87a         "GIF87a"

  + #  define GIF89a         "GIF89a"

  + #  define GIF_TERMINATOR ';'

  + #  define GIF_EXTENSION  '!'

  + #  define GIF_START      ','

  + #else /* EBCDIC */

  + #  define GIF87a         "\x47\x49\x46\x38\x37\x61"

  + #  define GIF89a         "\x47\x49\x46\x38\x39\x61"

  + #  define GIF_TERMINATOR 0x3b

  + #  define GIF_EXTENSION  0x21

  + #  define GIF_START      0x2c

  + #endif

  + 

  + /*

     *  HACK ALERT!!  HACK ALERT!!  HACK ALERT!!

     * This code is hard-wired for reading from files.  In order to read

     * from a data stream, we'll trick fread so we can reuse the same code

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

  *** 276,282 ****

        break;

    }

    

  ! if (buf[0] == ';') {

        /*

         * GIF terminator.

         */

  --- 299,305 ----

        break;

    }

    

  ! if (buf[0] == GIF_TERMINATOR) {

        /*

         * GIF terminator.

         */

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

  *** 284,290 ****

        break;

    }

    

  ! if (buf[0] == '!') {

        /*

         * This is a GIF extension.

         */

  --- 307,313 ----

        break;

    }

    

  ! if (buf[0] == GIF_EXTENSION) {

        /*

         * This is a GIF extension.

         */

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

  *** 303,309 ****

        continue;

    }

    

  ! if (buf[0] != ',') {

        /*

         * Not a valid start character; ignore it.

         */

  --- 326,332 ----

        continue;

    }

    

  ! if (buf[0] != GIF_START) {

        /*

         * Not a valid start character; ignore it.

         */

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

  *** 405,412 ****

        mInit((unsigned char *) string, &handle);

        got = Mread(header, 10, 1, &handle);

        if (got != 10

  !     || ((strncmp("GIF87a", (char *) header, 6) != 0)

  !     && (strncmp("GIF89a", (char *) header, 6) != 0))) {

    return 0;

        }

        *widthPtr = LM_to_uint(header[6],header[7]);

  --- 428,435 ----

        mInit((unsigned char *) string, &handle);

        got = Mread(header, 10, 1, &handle);

        if (got != 10

  !     || ((strncmp(GIF87a, (char *) header, 6) != 0)

  !     && (strncmp(GIF89a, (char *) header, 6) != 0))) {

    return 0;

        }

        *widthPtr = LM_to_uint(header[6],header[7]);

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

  *** 489,496 ****

        unsigned char buf[7];

    

        if ((Fread(buf, 1, 6, chan) != 6)

  !     || ((strncmp("GIF87a", (char *) buf, 6) != 0)

  !     && (strncmp("GIF89a", (char *) buf, 6) != 0))) {

    return 0;

        }

    

  --- 512,519 ----

        unsigned char buf[7];

    

        if ((Fread(buf, 1, 6, chan) != 6)

  !     || ((strncmp(GIF87a, (char *) buf, 6) != 0)

  !     && (strncmp(GIF89a, (char *) buf, 6) != 0))) {

    return 0;

        }



  PatchFiles:

  tkImgGIF.c





  04/05/1999 12:03 - pat -duplicate of 1605


tkt_uuid: 219966ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 06. Canvas Postscript
priority: 1 Zero
foundin: obsolete: 8.1b2
resolution: Duplicate
title: OS/390 has no passwd.pw_gecos field
comment:
  OriginalBugID: 1724 Bug
  Version: 8.1b2
  SubmitDate: '1999-04-05'
  LastModified: '1999-04-05'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: pat
  OS: Other
  OSVersion: OS/390 4.0
  Machine: NA
  ClosedDate: '1999-04-05'


  Name:
  Christian Krone

  Extensions:
  Expect 5.28

  ReproducibleScript:
  Compilation error on OS/390 for tkCanvPs.c,
      since the passwd struct has no pw_gecos field.

  Patch:
  *** unix/configure.in.orgWed Mar 17 04:29:03 1999
  --- unix/configure.inTue Mar 23 13:10:54 1999
  ***************
  *** 199,204 ****
  --- 199,216 ----
    AC_CHECK_HEADERS(sys/time.h)
    AC_HEADER_TIME

  + #-------------------------------------------
  + #In OS/390 struct pwd has no pw_gecos field
  + #-------------------------------------------
  + 
  + AC_MSG_CHECKING([pw_gecos in struct pwd])
  + AC_TRY_COMPILE([#include <pwd.h>],
  + [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
  + AC_MSG_RESULT($tk_ok)
  + if test $tk_ok = yes; then
  +     AC_DEFINE(HAVE_PW_GECOS)
  + fi
  + 
    #--------------------------------------------------------------------
    #Locate the X11 header files and the X11 library archive.  Try
    #the ac_path_x macro first, but if it doesn't find the X stuff
  *** unix/configure.orgWed Mar 17 04:29:03 1999
  --- unix/configureTue Mar 23 13:12:11 1999
  ***************
  *** 1434,1439 ****
  --- 1434,1471 ----
    fi

  + #-------------------------------------------
  + #In OS/390 struct pwd has no pw_gecos field
  + #-------------------------------------------
  + 
  + echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
  + echo "configure:1505: checking pw_gecos in struct pwd" >&5
  + cat > conftest.$ac_ext <<EOF
  + #line 1507 "configure"
  + #include "confdefs.h"
  + #include <pwd.h>
  + int main() {
  + struct passwd pwd; pwd.pw_gecos;
  + ; return 0; }
  + EOF
  + if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  +   rm -rf conftest*
  +   tk_ok=yes
  + else
  +   echo "configure: failed program was:" >&5
  +   cat conftest.$ac_ext >&5
  +   rm -rf conftest*
  +   tk_ok=no
  + fi
  + rm -f conftest*
  + echo "$ac_t""$tk_ok" 1>&6
  + if test $tk_ok = yes; then
  +     cat >> confdefs.h <<\EOF
  + #define HAVE_PW_GECOS 1
  + EOF
  + 
  + fi
  + 
    #--------------------------------------------------------------------
    #Locate the X11 header files and the X11 library archive.  Try
    #the ac_path_x macro first, but if it doesn't find the X stuff
  *** generic/tkCanvPs.c.orgWed Sep 30 04:16:44 1998
  --- generic/tkCanvPs.cTue Mar 23 13:22:09 1999
  ***************
  *** 711,717 ****

        Tcl_AppendResult(canvasPtr->interp, "%!PS-Adobe-3.0 EPSF-3.0\n",
        "%%Creator: Tk Canvas Widget\n", (char *) NULL);
  ! #if !(defined(__WIN32__) || defined(MAC_TCL))
        if (!Tcl_IsSafe(interp)) {
    struct passwd *pwPtr = getpwuid(getuid());/* INTL: Native. */
    Tcl_AppendResult(canvasPtr->interp, "%%For: ",
  --- 711,717 ----

        Tcl_AppendResult(canvasPtr->interp, "%!PS-Adobe-3.0 EPSF-3.0\n",
        "%%Creator: Tk Canvas Widget\n", (char *) NULL);
  ! #ifdef HAVE_PW_GECOS
        if (!Tcl_IsSafe(interp)) {
    struct passwd *pwPtr = getpwuid(getuid());/* INTL: Native. */
    Tcl_AppendResult(canvasPtr->interp, "%%For: ",
  ***************
  *** 719,725 ****
    (char *) NULL);
    endpwent();
        }
  ! #endif /* __WIN32__ || MAC_TCL */
        Tcl_AppendResult(canvasPtr->interp, "%%Title: Window ",
        Tk_PathName(canvasPtr->tkwin), "\n", (char *) NULL);
        time(&now);
  --- 719,725 ----
    (char *) NULL);
    endpwent();
        }
  ! #endif /* HAVE_PW_GECOS */
        Tcl_AppendResult(canvasPtr->interp, "%%Title: Window ",
        Tk_PathName(canvasPtr->tkwin), "\n", (char *) NULL);
        time(&now);

  PatchFiles:
  configure.in
      configure
      tkCanvPs.c



  04/05/1999 12:04 - pat -duplicate of 1604


tkt_uuid: 219967ffffffffffffffffffffffffffffffffff
type: Bug
status: Open
subsystem: 48. Geometry Management
priority: 8
foundin: obsolete: 8.5.8
resolution: Fixed
title: grid and pack together cause Tk to lock up
comment:
  OriginalBugID: 1746 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-07'
  LastModified: '1999-08-13'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2444 677
  OS: Solaris
  OSVersion: 6.2
  Machine: Other
  ClosedDate: '1999-08-13'


  Name:
  mo

  ReproducibleScript:
  If you run these two commands in wish it will lock up the computer
      by using 100% of the CPU.
      
      pack [text .one]
      grid [label .two]

  ObservedBehavior:
  Tk gets stuck in a loop.



  This is really a programming error, and should probably report
  an error case instead of allowing it and locking up. 
  -- 08/13/1999 hobbs


tkt_uuid: 219968ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.1b3
resolution: Duplicate
title: scale fails with uninitialized -variable on HP and 64-bit Solaris (with openWin display)
comment:
  OriginalBugID: 1748 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-07'
  LastModified: '1999-04-19'
  Severity: CRIT
  Status: Closed
  Submitter: hershey
  ChangedBy: hershey
  RelatedBugIDs: 1686 1731
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-04-19'


      ==== scale-5.3 ConfigureScale procedure FAILED
      ==== Contents of test case:
      
          catch {destroy .s}
          catch {unset x}
          scale .s -from 0 -to 100 -variable x
          set result $x
          lappend result [.s get]
          set x 92
          lappend result [.s get]
          .s set 3
          lappend result $x
          unset x
          lappend result [catch {set x} msg] $msg
      
      ---- Result was:
      100 100 92 3 0 3
      ---- Result should have been:
      0 0 92 3 0 3
      ==== scale-5.3 FAILED


  this bug was already reported on digital unix.
  -hershey


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


  Name:

  Don Porter



  Comments:

  When the variable 'x', doesn't exist, the scale widget has its value

      set to be the contents of uninitialized memory.  When those contents

      aren't a valid floating point value, wish come crashing down with a

      floating point exception.

      

      The fix is to only set the value of the scale widget when there exists

      a variable 'x' from which to take the value.  When no variable 'x'

      exists,

      the scale should keep whatever value it already has.

      

      This bug was previously reported without a patch:

      <URL: http://www.dejanews.com/getdoc.xp?AN=457606230>



  ObservedBehavior:

  $ wish8.1

      % scale .s -variable x

      

      Program received signal SIGFPE, Arithmetic exception.

      0x1555571b0ac in TkRoundToResolution (scalePtr=0x12019ce40,

      value=7.243135901842493e-312) at ./../generic/tkScale.c:1150

      (xxgdb) info stack

      #0  0x1555571b0ac in TkRoundToResolution (scalePtr=0x12019ce40,

      value=7.243135901842493e-312) at ./../generic/tkScale.c:1150

      #1  0x1555571a0e4 in ConfigureScale (interp=0x120101720,

      scalePtr=0x12019ce40, 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  0x15555902684 in TclExecuteByteCode ()

      #4  0x155558de988 in Tcl_EvalObjEx ()

      #5  0x1555590f5e0 in Tcl_RecordAndEvalObj ()

      #6  0x1555590f3fc in Tcl_RecordAndEval ()

      #7  0x155556c64a0 in StdinProc (clientData=0x12014ec50, mask=2) at

      ./../generic/tkMain.c:350

      #8  0x15555918a84 in Tcl_NotifyChannel ()

      #9  0x1555594abd0 in FileHandlerEventProc ()

      #10 0x155559274bc in Tcl_ServiceEvent ()

      #11 0x155559278cc in Tcl_DoOneEvent ()

      #12 0x155556b1bf4 in Tk_MainLoop () at ./../generic/tkEvent.c:1102

      #13 0x155556c6200 in Tk_MainEx (argc=1, argv=0x11ffff828,

      appInitProc=0x120000ab8 <Tcl_AppInit>, interp=0x120101720) at

      ./../generic/tkMain.c:279

      #14 0x120000a8c in main (argc=1, argv=0x11ffff828) at ./tkAppInit.c:54



  DesiredBehavior:

  Test suite runs without crashing.



  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/08 19:06:21

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

  *** 631,638 ****

              valuePtr = Tcl_GetVar2Ex(interp, name, NULL, TCL_GLOBAL_ONLY);

              if (valuePtr != NULL) {

                  Tcl_GetDoubleFromObj(interp, valuePtr, &value);

              }

  -           scalePtr->value = TkRoundToResolution(scalePtr, value);

          }



          /*

  --- 631,638 ----

              valuePtr = Tcl_GetVar2Ex(interp, name, NULL, TCL_GLOBAL_ONLY);

              if (valuePtr != NULL) {

                  Tcl_GetDoubleFromObj(interp, valuePtr, &value);

  +               scalePtr->value = TkRoundToResolution(scalePtr, value);

              }

          }



          /*



  PatchFiles:

  tkScale.c





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


tkt_uuid: 219970ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title:
  Get an coredump while inserting text in a 'text'-widget. Also the 'widget'-demo doesn't work in the demos-directorywork

comment:
  OriginalBugID: 1795 Bug
  Version: 8.0.4
  SubmitDate: '1999-04-13'
  LastModified: '1999-08-20'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2316
  OS: AIX
  OSVersion: AIX 4.3.2
  Machine: RS6000
  ClosedDate: '1999-08-20'


  Name:
  Siegfried Weigl

  Extensions:
  Tix 4.1.0

  ReproducibleScript:
  text .t
      pack .t
      .t insert end "Hello world\n"


tkt_uuid: 219971ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 1 Zero
foundin: obsolete: 8.1b3
resolution: Duplicate
title: Tk_InitStubs() not usable in tk81.dll
comment:
  OriginalBugID: 1842 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-15'
  LastModified: '2000-01-25'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1841 2078
  OS: Windows NT
  OSVersion: 4.0 SP3
  Machine: X86
  ClosedDate: '2000-01-25'


  Name:

  Jan Nijtmans


  ReproducibleScript:

  This is the same bug as described in "Tcl_InitStubs() not usable in

      tcl81.dll",

      submitted for tcl8.1b3. The patch supplied is not really a fix; It

      just removes Tk_InitStubs from the dll so there isn't any mis-

      understanding about the fact that linking a Stub-enabled extension

      against tk81.dll should never be done.


      However for Tk, there is an additional argument why this fix is

      needed. Currently Tk_InitStubs() doesn't use the EXPORT macro,

      which makes that it doesn't work with extensions compiled with C++.

      The patch below fixes this, and in addition fixes everything

      described in the "Tcl_InitStubs() not usable in tcl81.dll"

      bug report, but then for Tk.


  Patch:

  *** generic/tk.h.origWed Apr 14 22:31:14 1999

  --- generic/tk.hWed Apr 14 22:34:22 1999

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

  *** 1159,1173 ****

    #define Tk_Main(argc, argv, proc) \

        Tk_MainEx(argc, argv, proc, Tcl_CreateInterp())


  - char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, char *version, int exact));

  - 

  - #ifndef USE_TK_STUBS

  - 

  - #define Tk_InitStubs(interp, version, exact) \

  -     Tcl_PkgRequire(interp, "Tk", version, exact)

  - 

  - #endif

  - 

    

    /*

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

  --- 1159,1164 ----

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

  *** 1205,1210 ****

  --- 1196,1213 ----

     * Tcl commands exported by Tk:

     */


  + #undef TCL_STORAGE_CLASS

  + #define TCL_STORAGE_CLASS

  + 

  + EXTERN char *Tk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,

  +     char *version, int exact));

  + 

  + #ifndef USE_TK_STUBS

  + 

  + #define Tk_InitStubs(interp, version, exact) \

  +     Tcl_PkgRequire(interp, "Tk", version, exact)

  + 

  + #endif


    #endif /* RESOURCE_INCLUDED */


  *** generic/tkWindow.c.origWed Apr 14 22:31:19 1999

  --- generic/tkWindow.cWed Apr 14 22:35:23 1999

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

  *** 2945,2955 ****

  --- 2945,2957 ----

    goto done;

        }


  + #ifndef __WIN32__

    #ifdef Tk_InitStubs

    #undef Tk_InitStubs

    #endif


        Tk_InitStubs(interp, TK_VERSION, 1);

  + #endif


        /*

         * Invoke platform-specific initialization.

  *** win/makefile.vc.origWed Apr 14 22:35:46 1999

  --- win/makefile.vcWed Apr 14 22:37:00 1999

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

  *** 208,214 ****

    $(TMPDIR)\tkUtil.obj \

    $(TMPDIR)\tkVisual.obj \

    $(TMPDIR)\tkStubInit.obj \

  - $(TMPDIR)\tkStubLib.obj \

    $(TMPDIR)\tkWindow.obj


    TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj \

  --- 208,213 ----


  PatchFiles:

  tk.h tkWindow.c makefile.vc




  4/22/99 - redman - After talking with Scott S., we're going to try another scheme to work around the problem described (exporting the symbols in question and removing the need to use -DUSE_TCL_STUBS).  This really isn't a critical issue and can wait.
  --
  2078 includes 8.1.0 based patch. 
  -- 01/25/2000 hobbs


tkt_uuid: 219972ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.1b3
resolution: Duplicate
title: Docs missing for Tk_InitStubs API
comment:
  OriginalBugID: 1870 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-16'
  LastModified: '1999-04-22'
  Severity: MED
  Status: Closed
  Submitter: surles
  ChangedBy: hershey
  RelatedBugIDs: 1843
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '1999-04-22'




  04/16/1999 15:06 - surles - Duplicate to 1843.


tkt_uuid: 219973ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 43. Photo Image|PPM
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: error in writing out .ppm files on NT platform
comment:
  OriginalBugID: 1918 Bug
  Version: 8.0.5
  SubmitDate: '1999-04-21'
  LastModified: '1999-11-16'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1963
  OS: Windows NT
  Machine: X86
  ClosedDate: '1999-11-16'


  Name:
  Parag

  ReproducibleScript:
  set loadedImage [image create photo -file something.gif]
      $loadedImage write temp.ppm -format ppm

  ObservedBehavior:
  1) the file is corrupted.
      2) Color channels are interchanged while writing out the file.
      
      this problem doesnot occur on Unix machines for the same version of
      tcl/tk...

  DesiredBehavior:
  the uncorrupted .ppm file


tkt_uuid: 219974ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 1 Zero
foundin: obsolete: 8.1b3
resolution: Duplicate
title: Compile error, and Alt key error on HP-UX
comment:
  OriginalBugID: 1920 Bug
  Version: 8.1b3
  SubmitDate: '1999-04-22'
  LastModified: '1999-08-08'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2425
  OS: HP-UX
  OSVersion: 10
  Machine: Other
  FixedInVersion: 8.2b2
  ClosedDate: '1999-08-08'


  Name:

  Steve Mullerworth



  Extensions:

  None



  CustomShell:

  None



  ReproducibleScript:

  The errors are straightforward bugs



  ObservedBehavior:

  Compiling on HP-UX10:

      There are two compile failures in tk relating to (void) arguments:

      void TkEventInit(void)

      void TkSelGetInProgress(void)cc: 

      The errors are resolved by deleting the void:

      "../generic/tkEvent.c", line 424: error 1705: Function prototypes are an

      ANSI feature.

      

      When creating menus with -underlines, there is a failure when using

      the Alt-<key> to open the menu (line 933 of menu.tcl):

      can't read "i": no such variable

          while executing

      "$child cget $i -state"

          ("Menubutton" arm line 5)

          invoked from within

      "switch [winfo class $child] {

          Menubutton {

      set char2 [string index [$child cget -text]  [$child cget

      -underline]]

                    if {![string co..."

          (procedure "tkMenuFind" line 39)

          invoked from within

      "tkMenuFind $child $char"

          ("default" arm line 2)

          invoked from within

      "switch [winfo class $child] {

          Menubutton {

      set char2 [string index [$child cget -text]  [$child cget

      -underline]]

                    if {![string co..."

          (procedure "tkMenuFind" line 39)

          invoked from within

      "tkMenuFind $child $char"

          ("default" arm line 2)

          invoked from within

      "switch [winfo class $child] {

          Menubutton {

      set char2 [string index [$child cget -text]  [$child cget

      -underline]]

                    if {![string co..."

          (procedure "tkMenuFind" line 39)

          invoked from within

      "tkMenuFind [winfo toplevel $w] $char"

          (procedure "tkTraverseToMenu" line 16)

          invoked from within

      "tkTraverseToMenu . e"

          (command bound to event)





  Fixed in 8.2b2. 
  -- 08/08/1999 hobbs


tkt_uuid: 219975ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: Canvas image size limits
comment:
  OriginalBugID: 1926 Bug
  Version: 8.0.3
  SubmitDate: '1999-04-23'
  LastModified: '1999-10-22'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2964
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-10-22'


  Name:
  Christophe Odet

  ReproducibleScript:
  simply run this with wish80
      
          canvas .c -height 4000 -width 4000
          pack .c
          image create photo im -width 2047 -height 2040
          .c create image 0 0 -image im -anchor nw

  ObservedBehavior:
  When trying this little piece of tcl/tk 8.0.3, all is right:
      
          canvas .c -height 4000 -width 4000
          pack .c
          image create photo im -width 2047 -height 2039
          .c create image 0 0 -image im -anchor nw
      
      But when I change image size like in
      
          canvas .c -height 4000 -width 4000
          pack .c
          image create photo im -width 2047 -height 2040
          .c create image 0 0 -image im -anchor nw
      
      or in  (small changes !)
      
          canvas .c -height 4000 -width 4000
          pack .c
          image create photo im -width 2048 -height 2039
          .c create image 0 0 -image im -anchor nw
      
      IT CRASHES in tk80.dll on my PC Dell Dimension XPS R450 256 Mo Win98
      with tcl8.0.3.
      
      Stack trace:
      
      WISH80 a causé une défaillance de page dans
       le module TK80.DLL à 0177:0041f2d9.
      Registres :
      EAX=00000000 CS=0177 EIP=0041f2d9 EFLGS=00010202
      EBX=00600000 SS=017f ESP=0070f178 EBP=0070f17c
      ECX=00000000 DS=017f ESI=00d52ec0 FS=0e6f
      EDX=004e037c ES=017f EDI=004e6f60 GS=0000
      Octets à CS : EIP :
      89 51 08 8b e5 5d c3 55 8b ec 83 ec 34 8b 45 0c 
      État de la pile :
      00000000 0070f1c0 0045e25e 00000000 004e037c 004e6f60 00d52ec0 000007ff
      000007f8 0070f1e8 00000000 00000000 00000000 00000020 00000002 00000000

  DesiredBehavior:
  no crashes or limits known


tkt_uuid: 219976ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: obsolete: 8.0.3
resolution: Duplicate
title: Need to click twice on menus to post on Windows
comment:
  OriginalBugID: 1949 RFE
  Version: 8.0.3
  SubmitDate: '1999-04-27'
  LastModified: '2000-01-27'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2272
  OS: Windows NT
  Machine: X86
  ClosedDate: '2000-01-27'


  Name:
  Laurent Duperval

  DesiredBehavior:
  On WinNT, if a window contains a menu bar and you click on one of the menu items, the window is raised but the menu is not posted. You must click on the menu a second time to post it. All other MS apps post the menu when the window is raised.


tkt_uuid: 219977ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 06. Canvas Postscript
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Would like to generate postscript for all unicode character sets in canvas
comment:
  OriginalBugID: 1956 RFE
  Version: 8.1b3
  SubmitDate: '1999-04-28'
  LastModified: '2000-04-14'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2596
  OS: All
  OSVersion: NA
  Machine: NA
  FixedInVersion: NA
  ClosedDate: '2000-04-14'


  Jim Stokely is developing an educational program that would run on multiple platforms (windows and mac) and he is interested in the unicode support in Tcl/Tk 8.1. He would like to enter non ISO8859-1 characters in a canvas and generate postscript file from it. Currently, we support only ISO8859-1 character sets.



  I asked on comp.lang.postscript once for references to Unicode
  charsets, and the responses seemed to indicate that we would have
  to create our own because there aren't any free ones (at the
  moment) for postscript printing. 
  -- 02/28/2000 hobbs


tkt_uuid: 219978ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 7 High
foundin: obsolete: 8.0p2
resolution: Works For Me
title: menu bugs in tk when deleting items
comment:
  OriginalBugID: 1960 Bug
  Version: 8.0p2
  SubmitDate: '1999-04-29'
  LastModified: '2000-07-27'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: ericm
  RelatedBugIDs: 5275
  OS: Windows NT
  OSVersion: WinNT4sp2, Win95, SUN Solaris 2.5.1
  Machine: X86
  FixedDate: '2000-07-27'


  Name: Pascal BOUVIER

  ReproducibleScript:
  source the following on Win95/NT4 INTEL or SUN sparc Solaris 2.5.1

  toplevel .s
  menubutton .s.mb -text Fenetres -menu .s.mb.m
  pack .s.mb
  menu .s.mb.m

  for {set i 1} {$i < 7} {incr i} {
  .s.mb.m add command -label "a-$i" -command "puts ok__$i" 
  }
  .s.mb.m delete 3

  ObservedBehavior:
  BUG 1:
      On Windows (the following works correctly on sun):
      If you move the mouse over items, only a-1, a-2 and a-6 are highlighted
      (change their apearance). Items a-4 and a-5 don't.
      Clicking on "a-4" launchs the bad command (it prints ok__5)
      Clicking the last item of the menu is ok.
      
      BUG 2: (after having performed the previous sequence)
      Now detach the menu (on both SUN and Windows) and do:
      .s.mb.m delete 2
      
      On the torn off menu:
      click on "a-1" prints ok__1
      click on "a-4" jumps to and highlights the last item and prints ok__6
      (bad)
      click on "a-5" does nothing (bad)
      click on "a-6" does nothing (bad)
      
      Using a fresh torn off menu (created after deleting menu items) makes
      things work correctly.

  DesiredBehavior:
  Moving the mouse on any surviving menu item should make the item change
      its appearance .
      Clicking any surviving menu item should launch its associated command
      (not an other one or nothing).

  This bug is a duplicate of bug #5275, which has been fixed for Tcl/Tk 8.4a2. I'm sorry it took so long to notify you.  Thanks for reporting the bug.

     Eric Melski                            The Other Tcl Guy
     ericm at ajubasolutions.com            Ajuba Solutions

  -- 07/27/2000 ericm


tkt_uuid: 219979ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: make test : 148 tests failed on linux - window geometry differences
comment:
  OriginalBugID: 1970 Bug
  Version: 8.1
  SubmitDate: '1999-05-04'
  LastModified: '1999-11-23'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: jenn
  RelatedBugIDs: 3555
  OS: Linux-Red Hat
  OSVersion: 5.2
  Machine: Other
  ClosedDate: '1999-11-23'


  Name:
  Vladimir Kondratiev

  Comments:
  There is 70 Kb output 'make test' produces. It provides all error
      messages.
      Could you please tell me how to send it? I consider it's impossible to
      put this file's contents in one of bug report form's fields.

  ReproducibleScript:
  mkdir /tmp/3;cd /tmp/3; tar xzf /tmp/tcl8.1.tar.gz; tar xzf
      /tmp/tk8.1.tar.gz
      cd tcl8.1/unix && ./configure && make && make test
      cd tk8.1/unix && ./configure && make && make test
      
      tcl's 'make test' reports no errors, tk's 'make test' reports 148 failed
      tests
      
      I included 2 examples. 1-st (as most of others) provide just incorrect
      numbers regarding to window geometry, however 2-nd one is, I guess, more
      serious.

  ObservedBehavior:
  Just some of error messages:
      ==== listbox-4.6 ConfigureListbox procedure FAILED
      
        
      ==== Contents of test case:
      
        
      
      
        
          catch {destroy .l}
      
        
      
      
        
          # The following code (reset geometry, withdraw, etc.) is necessary
      
        
          # to reset the state of some window managers like olvwm under
      
        
          # SunOS 4.1.3.
      
        
      
      
        
          wm geom . 300x300
      
        
          update
      
        
          wm geom . {}
      
        
          wm withdraw .
      
        
          listbox .l -font $fixed -width 15 -height 20
      
        
          pack .l
      
        
          update
      
        
          wm deiconify .
      
        
          set x [getsize .]
      
        
          .l configure -setgrid 1
      
        
          update
      
        
          list $x [getsize .]
      
        
      
      
        
      ---- Result was:
      
        
      115x348 15x20
      
        
      ---- Result should have been:
      
        
      115x328 15x20
      
        
      ==== listbox-4.6 FAILED
      
        
      
      ==== unixEmbed-6.2 EmbedGeometryRequest procedure, window changes size
      FAILED
          
      ==== Contents of test case:
      
        
      
      
        
          foreach w [winfo child .] {
      
        
              catch {destroy $w}
      
        
          }
      
        
          frame .f1 -container 1 -width 200 -height 50
      
        
          place .f1 -width 200 -height 200
      
        
          dobg "set w1 [winfo id .f1]"
      
        
          dobg {
      
        
              eval destroy [winfo child .]
      
        
              toplevel .t1 -use $w1
      
        
          }
      
        
          after 300 {set x done}
      
        
          vwait x
      
        
          dobg {
      
        
              bind .t1 <Configure> {lappend x {configure .t1 %w %h}}
      
        
              set x {}
      
        
              .t1 configure -width 300 -height 120
      
        
              update
      
        
              list $x [winfo geom .t1]
      
        
          }
      
        
      
      
        
      ---- Result was:
      
        
      bad window path name ".t1"
      
        
      ---- Result should have been:
      
        
      {{configure .t1 200 200}} 200x200+0+0
      
        
      ==== unixEmbed-6.2 FAILED
      
        
      
      Tests ended at Sun May 02 10:06:06 IDT 1999
      
        
      all.tcl:        Total   6341    Passed  5800    Skipped 393     Failed
      148
         
      Sourced 83 Test Files.
      
        
      Files with failing tests: listbox.test text.test textDisp.test
      textWind.test unixEmbed.test
                  
      Number of tests skipped for each constraint:
      
        
              2       altDisplay
      
        
              2       emptyTest
      
        
              44      macOnly
      
        
              11      macOrPc
      
        
              1       nonPOrtable
      
        
              98      nonPortable
      
        
              229     pcOnly
      
        
              4       pseudocolor
      
        
              1       secureServer
      
        
              1       userInteraction


tkt_uuid: 219980ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: tcl_pkgPath missing, tcl_libPath undocumented
comment:
  OriginalBugID: 2041 Bug
  Version: 8.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-08-08'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2317 2394 2455
  OS: Other
  Machine: NA
  FixedInVersion: 8.2
  ClosedDate: '1999-08-08'


  Name:
  Christopher Nelson

  ObservedBehavior:
  The .HLP file which comes with Tcl 8.1 describes the variable
      tcl_pkgPath but on W98, [puts $tcl_pkgPath] fails in wish and tclsh
      because tcl_pkgPath does not exists.  However, [info vars *Path*] turns
      up tcl_libPath.  Is this a replacement for tcl_pkgPath?  Where's it
      documented?



  It says specifically in init.tcl that tcl_pkgPath is not used on
  Windows.  This is a bug in the documentation (which just mentions
  the variable without the caveats).  Doc fixed in 8.2b3.
   
  -- 08/08/1999 hobbs


tkt_uuid: 219981ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: Segv when moving pointer over text in text-widget on AIX
comment:
  OriginalBugID: 2044 Bug
  Version: 8.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-08-20'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2316
  OS: AIX
  OSVersion: 3.4
  Machine: RS6000
  ClosedDate: '1999-08-20'


  Name:
  Adrian Wallaschek

  Extensions:
  None, pure wish8.1

  ReproducibleScript:
  # This script creates just a text widget.
      # To cause the error just type some chars and move the mouse over them
      ... bang!
      # This happens for me on AIX 3.4

      # Create a callback log in the main window
      wm title . "CLS API Probe Callbacklog"

      text .cbl -yscrollcommand ".yscroll set"  -xscrollcommand ".xscroll set"  -width 80 -height 24

      scrollbar .yscroll -command ".cbl yview" -orient vertical
      scrollbar .xscroll -command ".cbl xview" -orient horizontal

      button .clear -text "Clear log" -command ".cbl delete 1.0 end"

      grid .cbl .yscroll -sticky news
      grid .xscroll -sticky ew
      grid .clear -sticky ew
      grid rowconfigure . 0 -weight 1
      grid columnconfigure . 0 -weight 1

      proc x11_cls_callback_log {varname index op} {
              upvar $varname v
              set x "[clock format [lindex $v 0]]: [lindex $v 2] [lindex $v
      3]\n"
              .cbl insert end $x
      #       update
      }

      trace variable ::cls::callback wu x11_cls_callback_log

  ObservedBehavior:
  On AIX 3.4 the tcl/tk crashes when running above script (the trace is
      not
      necessary, just supplied my whole script.) typing some chars into the
      text 
      and move to mouse over them. I use Xceed instead of a AIX X-server just
      in 
      case this makes a difference, which I don't think.
      The core dump then show this stack:
      (dbx) where
      signal.pthread_kill(??, ??) at 0xd43e8df4
      signal._p_raise(??) at 0xd43e83ac
      raise.raise(??) at 0xd418280c
      abort.abort() at 0xd41af7b0
      _Insight_signal_handler(int)(0xb), line 381 in "trap.cc"
      TkTextPixelIndex() at 0x101ffda4
      TkTextPickCurrent() at 0x102022a0
      tkTextDisp.DisplayText() at 0x101fd04c
      TclServiceIdle(), line 692 in "tclTimer.c"
      Tcl_DoOneEvent(0xffffffff), line 889 in "tclNotify.c"
      TclEventLoop::Perform()(this = 0x200d2f10), line 49 in
      "cls_papi_probe.cpp"
      OnCall()(0x200d2f10), line 63 in "cls_papi_timer.cpp"
      TimerCallback(void*)(0x200d2ea0), line 12 in "cls_mapi_timer.cpp"
      Call(const CTS_Event&)(0x200dce48, 0x2ff1ef74), line 85 in
      "cls_ccli.cpp"
      OnSysEvent__8CTS_BaseFRC9CTS_Event() at 0x10045bb8
      OnSysEvent__8CTS_UtabFRC9CTS_Event() at 0x10045894
      CTSOO_ar_utab_event() at 0x10047140
      FSM_process() at 0xd325d474
      FSM_process_sys_event() at 0xd3261860
      FSM_process_event2() at 0xd326174c
      FSM_process() at 0xd325d338
      FSM_handle_cb() at 0xd325c37c
      CALL_call_callback() at 0xd3233bd8
      CAPP_loop_main() at 0xd32350b4
      CAPP_main() at 0xd32352c4
      FSM_main_loop() at 0xd3264228
      CTS_run(), line 630 in "cts_init.h"
      CACHE_Run(0x20048d40), line 121 in "cls_ccli.cpp"
      CLSRunInitAPI(0x2004d290), line 48 in "cls_mapi.cpp"
      main(argc = 1, argv = 0x2ff22580), line 114 in "cls_papi_probe.cpp"
      (dbx) 

      First I thought my own app with a split-up event-handling, etc. was the
      cause
      but then I could reproduce it with a locally compiled out-of-the-box
      wish8.1.

      Compiler is xlc rsp. cc
      on AIX ... 3 4 000290854C00

      The problem is persistent and makes the text-widget unusable, other
      widgets seem
      no to be affected but I didn't test other wery well (not beyond the
      demos).
      The program cores when moving over the text or traversing between title
      bar
      and text-widget. (I still can leave the widget with the mouse and enter
      the
      window title from the top but not directly from the text-widget !?!?)

  DesiredBehavior:
  Well ... no core-dump ;-)



  This looks to be the common AIX-text widget problem. 
  -- 08/20/1999 hobbs


tkt_uuid: 219982ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 54. [console]
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: tcl_trace* variables don't work
comment:
  OriginalBugID: 2045 Bug
  Version: 8.1
  SubmitDate: '1999-05-10'
  LastModified: '1999-08-24'
  Severity: SER
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2597
  OS: All Windows
  Machine: X86
  ClosedDate: '1999-08-24'


  Name:
  Christopher Nelson

  ReproducibleScript:
  # In wish on W98
      set tcl_traceCompile 1
      set tcl_traceExec 1
      proc foo { s } {
          puts $s
      }
      foo asdf

  ObservedBehavior:
  No compile or exec trace shown

  DesiredBehavior:
  Compile and exec traces



  The problem is that the tcl_trace* output goes to 'stdout', which
  doesn't really exist in the wish console.  Dupping this to 2597
  as that points the problem out better. 
  -- 08/24/1999 hobbs


tkt_uuid: 219983ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 83. Mac OS X Build
priority: 1 Zero
foundin: obsolete: 8.1a2
resolution: Duplicate
title: wish8.1a2 doesn't run on MacOS 7.5.3
comment:
  OriginalBugID: 2056 Bug
  Version: 8.1a2
  SubmitDate: '1999-05-12'
  LastModified: '1999-09-16'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2051
  OS: Macintosh
  OSVersion: 7.5.3 rev 2
  Machine: Power PC
  ClosedDate: '1999-09-16'


  Name:
  David Laur

  Extensions:
  none

  CustomShell:
  none

  Comments:
  I'm really just looking for a version of tcl/tk for the mac which
      supports
      the "socket" command.

  ReproducibleScript:
  My system is an Apple PowerBook 520 (68k system, running 7.5.3),
      downloaded the tcl/tk binary release for the Mac,
      installed it,
      double-click the Wish 8.1a2 icon

  ObservedBehavior:
  wish fails to launch, instead the following "stop" dialog appears:
      
      The application "Wish 8.1a2" could not be opened because
      "ObjectSupportLib" could not be found.

  DesiredBehavior:
  tcl/tk shouldn't be looking for ObjectSupportLib on non-PowerPC systems.
      The apple tech info site
      (http://til.info.apple.com/techinfo.nsf/artnum/n56890)
      says "ObjectSupportLib: A library developers use to support AppleScript
      on
      PowerPC-based computers."  See also http://kb.indiana.edu/data/aczd.html


tkt_uuid: 219984ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: bitmap image in a menubutton is gray not black
comment:
  OriginalBugID: 2084 Bug
  Version: 8.1
  SubmitDate: '1999-05-17'
  LastModified: '1999-09-15'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2171
  OS: Windows NT
  OSVersion: 4.0
  Machine: X86
  ClosedDate: '1999-09-15'


  Name:
  Karsten Wolff

  Comments:
  The described behavier is true for WinNT 4.0 and Linux.

  ReproducibleScript:
  # The following code shows three images. 
      # The first one is grey in version 8.1.0.
      
      image create bitmap down-arrow -data  {
          #define down_arrow_width 15
          #define down_arrow_height 15
          static char down_arrow_bits[] = {
      0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
      0x00,0x80,0xf8,0x8f,0xf0,0x87,0xe0,0x83,
      0xc0,0x81,0x80,0x80,0x00,0x80,0x00,0x80,
      0x00,0x80,0x00,0x80,0x00,0x80
          }
      } 
      
      set m .pulldown.menu
      menubutton .pulldown -menu $m -relief raised
      .pulldown configure -image down-arrow
      menu $m -tearoff 0
      $m add command -label Exit -command exit
      button .button -image down-arrow
      label .label -image down-arrow
      pack .pulldown .button .label -side left

  ObservedBehavior:
  Bitmap image in a menubutton is gray not black in TclTk 8.1.0
      In version 8.0.5 or 8.1a2 the image in the menubutton is black.
      This occurs only for the menubutton. In a label or button the image is
      black.

  DesiredBehavior:
  The bitmap image in a menubutton should be black as in prior versions.


tkt_uuid: 219985ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: double-click tk_getOpenFile problem
comment:
  OriginalBugID: 2111 Bug
  Version: 8.1
  SubmitDate: '1999-05-20'
  LastModified: '1999-08-12'
  Severity: MED
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 1339 2312
  OS: Windows 95
  Machine: X86
  ClosedDate: '1999-08-12'


  Name:
  Greg Orchard

  ReproducibleScript:
  If you use tk_getOpenFile and double-click on a file, a <button-1> is
      sent to the window behind the file selection window. As a result, if
      there is a button directly below on the underlying window, the action
      for the button is selected. 
      This can be recreated using the "File selection dialog" in the standard
      Tcl Widget Tour distributed with Tcl.



  This was answered here:
      http://x23.deja.com/[ST_rn=ps]/getdoc.xp?AN=496001244

  This is more of a Windows native dialog problem, but requires
  that the Tk user be aware of the quirk with that dialog.  
  -- 08/12/1999 hobbs


tkt_uuid: 219986ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: Solaris 2.5.1: Failed focus and unixEmbed tests on solaris 2.5.1
comment:
  OriginalBugID: 2116 Bug
  Version: 8.1
  SubmitDate: '1999-05-21'
  LastModified: '1999-11-23'
  Severity: LOW
  Status: Closed
  Submitter: pat
  ChangedBy: jenn
  RelatedBugIDs: 2181
  OS: Solaris
  OSVersion: 2.5.1
  Machine: Other
  ClosedDate: '1999-11-23'


  Name:
  Hans Werner Strube

  ReproducibleScript:
  (In subdirectory unix/ :) make test

  ObservedBehavior:
  tk8.1 in Solaris 2.5.1 on UltraSPARC 1,
      compiler: Sun cc, version SC4.0 18 Oct 1995 C 4.0,
      configure --enable-threads
      
      Running "make test" yields the following failed tests:
      focus, unixEmbed; detailed output:
      
      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
      
      unixEmbed.test
      
      ==== unixEmbed-5.1 EmbedFocusProc procedure, FocusIn events FAILED
      ==== Contents of test case:
      
          foreach w [winfo child .] {
      catch {destroy $w}
          }
          frame .f1 -container 1 -width 200 -height 50
          pack .f1
          dobg "set w1 [winfo id .f1]"
          dobg {
      eval destroy [winfo child .]
      toplevel .t1 -use $w1
      bind .t1 <FocusIn> {lappend x "focus in %W"}
      bind .t1 <FocusOut> {lappend x "focus out %W"}
      set x {}
          }
          focus -force .f1
          update
          dobg {set x}
      
      ---- Result was:
      
      ---- Result should have been:
      {focus in .t1}
      ==== unixEmbed-5.1 FAILED

  DesiredBehavior:
  No "FAILED" messages.


tkt_uuid: 219987ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 39. Image Basics
priority: 1 Zero
foundin: None
resolution: Duplicate
title: image command segfault
comment:
  OriginalBugID: 2130 Bug
  Version: 8.0.5
  SubmitDate: '1999-05-26'
  LastModified: '1999-08-31'
  Severity: CRIT
  Status: Closed
  Submitter: pat
  ChangedBy: hobbs
  RelatedBugIDs: 2156
  OS: Windows 95
  Machine: X86
  ClosedDate: '1999-08-31'


  Name:
  Tim Peters

  Extensions:
  none

  CustomShell:
  none

  Comments:
  This got reported in the Python world as a crash using Tkinter (Python's
      interface to Tcl/Tk).  I can change Tkinter to refuse to accept
      non-string "name" arguments, but Tk still shouldn't die.

  ReproducibleScript:
  Run this one-liner under wish:
      
      image create photo .

  ObservedBehavior:
  Memory fault in tk80.dll under Windows.
      Segfault reported by someone else under an unspecified Linux version.

  DesiredBehavior:
  Don't care, so long as it doesn't bring down Tk!  An error msg would be
      appropriate (the cmd doesn't make sense).


tkt_uuid: 219988ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Double-clicking in text widget wrong on NT
comment:
  OriginalBugID: 2132 Bug
  Version: 8.1.1
  SubmitDate: '1999-05-28'
  LastModified: '1999-08-08'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1388
  OS: Windows NT
  Machine: X86
  ClosedDate: '1999-08-08'


  Name:

  Stephan Uyttebroeck



  ReproducibleScript:

  pack [text .t]

      .t insert 1.0 {ab cd(ef,gh);}



  ObservedBehavior:

  Now click with the mouse on e.g. 'e' or f'.

      On Unix you see the expected selection 'ef'.

      On Windows you get 'cd(ef,gh);}', thus only space-separated selection.

      

      From the man pages:

      ~~~~~~~~~~~~~~~~~~

      ... ``word'' refers to a contiguous group of letters, digits, or ``_''

      characters, or any single character other than these. 

      

      ...

      

      [2]

           Double-clicking with mouse button 1 selects the word under the

      mouse and positions the insertion cursor at the beginning of the

      word...



  DesiredBehavior:

  Same behavior on Windows as on Unix !!!


tkt_uuid: 219989ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: None
resolution: Duplicate
title: big menus are unusable, there's a workaround but it's a waste of time
comment:
  OriginalBugID: 2158 RFE
  Version: 8.0.5
  SubmitDate: '1999-06-03'
  LastModified: '2000-01-27'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3222
  OS: Linux
  OSVersion: Slackware 4.0
  Machine: Other
  ClosedDate: '2000-01-27'


  Name: Luc Deschenaux

  ReproducibleScript:
  try a menu with so many items that his height top the screen height...

  ObservedBehavior:
  you can't access all items in the menu since it doesnt scroll
      
      I should put hierarchical menus where needed using the max height of the
      root window and use a procedure to convert menu item numbers

  DesiredBehavior:
  the menus could scroll when the cursor enter the last entry, when this
      one is a triangle indicating there's more items below...
      
      or tk could handle himself the "more..." hierarchical menus workaround
      so that the numbering of items would not be changed.


  Tk8 menus have a -columnbreak option, which causes menus to not
  be vertically more than X in number.  This is the programmatic
  way to avoid the above problem.  It might be nice to have Tk
  build this automatically, but there are limitation when working
  with native system menus (or not - on Mac we get the desired behavior
  by default because of the underlying menu system).
  This has been changed to an RFE for that reason. 
  -- 01/18/2000 hobbs


tkt_uuid: 219990ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 12. Unix Menus
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: image on Menubutton
comment:
  OriginalBugID: 2171 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-03'
  LastModified: '1999-09-15'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2084 2564
  OS: HP-UX
  OSVersion: HP-UX10.20
  Machine: Other
  ClosedDate: '1999-09-15'


  Name:

  Nobumasa Akasaka



  CustomShell:

  nothing



  Comments:

  It was ok with tk8.0, but it went wrong with tk8.1.



  ReproducibleScript:

  image create photo logo64   -file {logo64.gif} -format {gif}  

      menubutton .mb  -image {logo64}

      pack .mb

      menu .mb.m

      .mb configure -menu .mb.m



  ObservedBehavior:

  The image on the menubutton is grayed out, but it's working normally.



  DesiredBehavior:

  The image should be displayed normally.



  Patch:

  --- tkUnixMenubu.c.clnFri Apr 30 04:38:38 1999

  +++ tkUnixMenubu.cThu May  6 20:53:13 1999

  @@ -143,8 +143,8 @@

        * foreground color, generate the stippled effect.

        */

   

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

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

  +    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),



  PatchFiles:

  unix/tkUnixMenubu.c


tkt_uuid: 219991ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: make install does not create intermediate directories
comment:
  OriginalBugID: 2183 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-07'
  LastModified: '1999-08-08'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 709
  OS: Digital Unix
  OSVersion: 4.0b
  Machine: Other
  ClosedDate: '1999-08-08'


  Extensions:
  none;

  CustomShell:
  none; no;

  ReproducibleScript:
  when building and installing tk in a nonstandard directory running
      make install
      will abort if the ${exec_prefix} directory does not exist; this is
      not the case with tcl which does the right thing;

  ObservedBehavior:
  Making directory /tools/tcl/source_tk/lib
      *** Exit 2

  DesiredBehavior:
  in the makefile and consquently in the file makefile.in the 
      install-binaries target should have 
      mkdir -p $$i;  rather than
      mkdir $$i;  


  Integrated sometime before 8.2b2. 
  -- 08/08/1999 hobbs


tkt_uuid: 219992ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: used tk_getOpenFile & pack; 2nd window freezes
comment:
  OriginalBugID: 2191 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-07'
  LastModified: '1999-08-20'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1212
  OS: Windows 95
  Machine: X86
  ClosedDate: '1999-08-20'


  Name:
  Greg Samoluk

  CVS:
  reloaded latest version 6/7/99 @ 10:45 EST

  Extensions:
  no extensions used

  CustomShell:
  none

  Comments:
  Have I violated some coding conventions?

  ReproducibleScript:
  #===============================================================
      # BROWSE.TCL - browse a file
      #===============================================================
      set file_types {
           { "All Files" *.* }
      }
      set filename [tk_getOpenFile  -initialdir "c:"  -filetypes  $file_types  -title      "Browse File Open..."]
      if {$filename == ""} exit
      #===============================================================
      set input     [open "$filename" "r"]
      #===============================================================
      font create myfont -family Courier -size 10
      font create mybold -family Courier -size 10 -weight bold
      regsub -all {/} $filename {\\} wmfn
      wm      title    . "Browse $wmfn"
      wm      geometry . +100+150
      frame   .part1
      scrollbar .part1.xscroll -command {.part1.list xview}  -orient horizontal
      pack      .part1.xscroll -fill x
      listbox   .part1.list -yscrollcommand {.part1.yscroll set}  -xscrollcommand {.part1.xscroll set}  -height 10 -width 75 -font myfont
      while {[gets $input data] >= 0} {
          .part1.list insert end $data
      }
      close $input
      scrollbar .part1.yscroll -command {.part1.list yview}
      pack      .part1.list .part1.yscroll -fill y -side left
      pack      .part1

      label .blank -text " "
      pack  .blank

      button .quit -text "Quit" -font mybold -command exit
      pack   .quit

  ObservedBehavior:
  If I hard code the 'filename', the 2nd window allows me to browse a file
      with both vertical and horizontal scrolling (and the Quit button works).
       If tk_getOpenFile is used to make this code dynamic, the appropriate
      file is opened, some data is displayed but the scroll bars are frozen
      and the quit
      button does not respond.

  DesiredBehavior:
  see #7


tkt_uuid: 219993ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: -- New Widgets
priority: 1 Zero
foundin: None
resolution: Duplicate
title: No "hint"-option available for Tk-buttons
comment:
  OriginalBugID: 2212 RFE
  Version: 8.1
  SubmitDate: '1999-06-15'
  LastModified: '1999-08-06'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 549
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-08-06'


  Name:
  Toni Rath

  DesiredBehavior:
  I need those "hints" just like in Windows or KDE (those little windows
      that
      pop up, when you stay over a button for a second or more). If you only
      have
      little drawings in the button, the user might not understand the
      function of
      this button and with the hints one could get a little help text.


tkt_uuid: 219994ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Blooper in tkwait help
comment:
  OriginalBugID: 2220 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-15'
  LastModified: '1999-08-08'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2187
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-08-08'


  Name:
  Christopher Nelson

  ObservedBehavior:
  There's a bogus link from the word "variable" in the tkwait help page to
      the help page for [variable]



  The help files are generated automagically, and this is picked
  up in the cross-linking step.  It would take too many resources
  to police the help files after each generation for the small
  occasional mis-link that slips in like the above.  
  -- 08/08/1999 hobbs


tkt_uuid: 219995ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.0p2
resolution: Duplicate
title: significant slow down after longer tcl/tk usage
comment:
  OriginalBugID: 2239 Bug
  Version: 8.0p2
  SubmitDate: '1999-06-16'
  LastModified: '2000-01-25'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3220
  OS: Linux-Red Hat
  Machine: Other
  ClosedDate: '2000-01-25'


  Name:
  Georges Thill

  ReproducibleScript:
  proc __DialogInfo {mesg} {
          global DauerTestId
      
          set win .info
          toplevel $win
      
          frame $win.controls
          pack $win.controls -side bottom  -fill x    -padx 4 -pady 4
      
          frame $win.sep -height 2 -borderwidth 1 -relief sunken
          pack $win.sep      -side bottom  -fill x    -pady 2
      
          frame $win.entry
          pack $win.entry    -side bottom  -fill both -padx 2 -pady 0
      
          frame $win.help
          pack $win.help     -side bottom  -fill x    -padx 2 -pady 0
      
          frame $win.info
          pack $win.info     -side bottom  -fill both -padx 2 -pady 0 -expand
      yes
      
          bind $win <Escape> "destroy $win"
          update
          after 100
      
          destroy $win
      }
      
      proc GroupDauerTest   { } {
          global DauerTestId
      
          __DialogInfo hallo
          update
      
          set DauerTestId [after 200 GroupDauerTest]
      }
      
      proc GroupDauerTestOff  { } {
          global DauerTestId
          after cancel $DauerTestId
      }
      
      for { set i 0 } {$i < 16  } {incr i  } {
          frame .f$i
          pack .f$i -side bottom
          for { set j 0 } {$j < 32  } {incr j  } {
              button .f$i.b$j
              pack .f$i.b$j -side left
          }
      }
      
      button .b1 -text Start -command GroupDauerTest
      button .b2 -text Stop  -command GroupDauerTestOff
      
      pack .b1 .b2
      
      bind . <Escape> exit

  ObservedBehavior:
  when starting the test script, everything works as expected, a window is
      opened and close periodically. When switching virtual desktops the
      refresh starts immediately. After about 20 minutes of test run, this is
      no longer the case. when switching back to the screen where the test
      window is on, there is an (increasing) delay before refresh starts.
        The problem seems to be related to the use of the use of the function
      XFilterEvent . Thus, by undefining  TK_USE_INPUT_METHODS  in tk.h for a
      tk  recompile, the problem can be worked around. It is not known if it
      is actually XFilterEvent itself or related function calls that are
      erroneous. The effect does not show up on an AIX with and older X
      revision. It seems to be related to the X server tho, because
      redirecting the display from the AIX on a linux box makes the problem
      appear. Additional tests showed that the Metrox server has the same
      problems with it as the (latest) XFree86 we are using.
         The workaround mentioned above exists, but any help to fix the actual
      bug would be greatly appreciated.



  This isn't confirmed, but there are several mentions of
  TK_USE_INPUT_METHODS slowing down some X servers due to excessive
  request traffic.  We are looking into making this functionality
  a runtime option for 8.3. 
  -- 08/21/1999 hobbs


tkt_uuid: 219996ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Tcl_Exit() before Tk_Init() --> CRASH!
comment:
  OriginalBugID: 2247 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-16'
  LastModified: '1999-06-29'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: redman
  RelatedBugIDs: 2269
  OS: Windows 95
  Machine: X86
  ClosedDate: '1999-06-29'


  Name:
  Don Porter

  Comments:
  I still want to be able to build "big shells" using Tcl/Tk 8.1.x.
      
      Based on a very inadequate understanding of Tcl stubs tables, here's
      my guess at what is wrong.  I need the help of a stubs expert to help
      work around this problem.
      
      When "demo" calls Tcl_Exit, the program has not yet called Tk_Init(),
      so the Tk DLL has not yet called Tcl_InitStubs, and the Tk DLL cannot
      yet call any Tcl_* routines without crashing.
      
      However, Tcl_Exit()  calls exit() which calls routines to unload
      and cleanup after the Tk DLL.  This includes TkWinWmCleanup which
      tries to call Tcl_GetThreadData.  OOPS!  CRASH!
      
      This problem is holding back our release of an 8.1.x-compatible product.
      Any help finding a workaround is greatly appreciated.

  ReproducibleScript:
  /* FILE: demo.c */
      #include <tcl.h>
      #include <tk.h>
      
      int main(int argc, char *argv[])
      {
        Tcl_Interp *interp;
      
        Tcl_FindExecutable(argv[0]);
        interp = Tcl_CreateInterp();
        Tcl_Init(interp);
        /*
         * It might seem unusual to call Tcl_Exit() at this point, but
         * it might happen in response to an error in Tcl_Init, or an
         * error in the Foo_Init for another extension, Foo, initialized
         * at this point in a "big shell".
         */
        Tcl_Exit(1);
        Tk_Init(interp);
        Tk_MainLoop();
        Tcl_DeleteInterp(interp);
        Tcl_Exit(0);
        return(0);
      }
      /* End FILE: demo.c */
      
      Compile and link demo.c on MS Windows 95 with MSVC++ 5.0:
      
      C:\> cl /c "/IC:\Program Files\Tcl\include" demo.c
      C:\> link demo.obj "C:\Program Files\Tcl\lib\tcl81.lib" "C:\Program
      Files\Tcl\lib\tk81.lib"

  ObservedBehavior:
  Run the executable "demo".  A dialog box pops up reporting:
      
      "This program has performed an illegal operation and will be shut down.
      
      If the program persists, contact the program vendor."

  DesiredBehavior:
  I want the "demo" program to exit clean, without fatal error messages.



  See 2269, includes patch. 
  -- 06/29/1999 redman


tkt_uuid: 219997ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Tk segmentation fault on AIX 4.2
comment:
  OriginalBugID: 2261 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-21'
  LastModified: '1999-08-20'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2316
  OS: AIX
  OSVersion: 4.2
  Machine: RS6000
  ClosedDate: '1999-08-20'


  Name:
  John Severs

  Comments:
  I have tried the script line by line and it is the insert that causes
      the crash. I should say that this is a new install of tcl/tk. We haven't
      had it running on any AIX system before and this is the first script I
      have tried. The install procedure was successful with no error messages.

  ReproducibleScript:
  I am running the following script on AIX 4.2

      wm title . "Netview Log"

      frame .t
      set xlog [text .t.xlog -width 80 -height 10  -borderwidth 2 -relief raised -setgrid true  -yscrollcommand {.t.scroll set}]
      scrollbar .t.scroll -command {.t.xlog yview}
      pack .t.scroll -side right -fill y
      pack .t.xlog -side left -fill both -expand true
      pack .t -side top -fill both -expand true

      .t.xlog insert insert "text"

      I start wish then source the file which crashes when it hits the insert.

  ObservedBehavior:
  # wish
      % source test.tcl
      % Segmentation fault(coredump)
      # tclsh
      % echo $tcl_patchLevel
      8.1.1

  DesiredBehavior:
  It should insert some text into the text widget



  The text widget-AIX problem rears its ugly head again. 
  -- 08/20/1999 hobbs


tkt_uuid: 219998ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: Word-wrapping problem with 8-bit strings (latin1 accented chars) and other related problems
comment:
  OriginalBugID: 2288 Bug
  Version: 8.0.5
  SubmitDate: '1999-06-25'
  LastModified: '1999-08-05'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2305
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-08-05'


  Name:
  Frédéric BONNET

  Comments:
  I believe there are many places in Tcl and Tk where is-routines are used
      (isspace, isupper...). Most seem to be called with signed chars as
      argument. The solution would be to find them all and wrap their
      arguments with UCHAR(). Strangely, this macro had been defined (in
      tclInt.h) several years ago in order for is-routines to be called
      safely, but newer code doesn't seem to take it into account. I don't
      think this problem still exist under Tcl8.1 now that it uses UTF-8.

  ReproducibleScript:
  # Try it on Windows. Other platforms may need different pixel values
      # for the bug to occur.

      # Notice the accented e in the third word
      label .l -font "Arial 16" -wraplength 130  -text "azertyuiop azertyuiop azértyuiop"

      # After packing, notice how the 3rd word is incorrectly cut
      pack .l -expand 1 -fill both

  ObservedBehavior:
  The Tk_MeasureChars() function, when used with the TK_WHOLE_WORDS flags,
      is supposed to wrap strings at word boundaries (ie spaces). To do so, it
      uses the ANSI C function isspace(), but it forgets to cast the char
      argument into an unsigned char using the UCHAR() macro. The consequence
      is that some words are broken at 8-bit chars such as accented chars. I
      observed this problem on Windows, where isspace() is a macro doing a
      lookup in a static table using the char value as the index. When this
      value is negative the lookup is done outside the table boundary and so
      reports unpredictable results, as it is documented in the MS VC++
      documentation ("is, isw routines").

  DesiredBehavior:
  Correct handling of 8-bit characters with is-routines.



  patch provided in related report, but 8.0.5 has no plans for
  an 8.0.6. 
  -- 08/05/1999 hobbs


tkt_uuid: 219999ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Fixed
title: image -data option needs revisiting
comment:
  OriginalBugID: 2295 Bug
  Version: 8.1.1
  SubmitDate: '1999-06-28'
  LastModified: '1999-08-05'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2431
  OS: Other
  OSVersion: NetBSD-1.4/i386
  Machine: NA
  ClosedDate: '1999-08-05'


  Name:
  Hume Smith

  ReproducibleScript:
  #!/usr/bin/env wish
      
      regsub -all .. [join {
      47494638376120002000c20000000000ffff0000ff008080000000ffff00
      000000000000002c00000000200020000003ac08badcfe908d01268d38cf
      cc4108de5775594078c479919089aa6c247ee01a3fab754b56afeb249f70
      22a80031c39e6020681a3748e393c96c3a7b1ae1d209b04e6d8e2675cbdd
      767d18abbaa8a876c547c896ba301b97714ca1b0702bac581c7b6d5e7d78
      50197b646c758788118a857d54817a7c7270790f7c970d448e607a61999a
      2c16a0a13898a85393178f8da414425fa5a749b8a56fb2b97f8ca3804a43
      a69f856b3b80bf3bcb1109003b} {}] {\\x&} x
      set x [subst $x]
      
      if {[catch {image create photo -format gif -data $x} n]} {
      puts {-data failed}
      } {
      label .1 -image $n
      pack .1
      }
      
      set fn /var/tmp/[pid]
      set f [open $fn w]
      fconfigure $f -translation binary
      puts -nonewline $f $x
      close $f
      
      if {[catch {image create photo -format gif -file $fn} n]} {
      puts {-file failed}
      } {
      label .2 -image $n
      pack .2
      }
      
      # eof

  ObservedBehavior:
  Creating the image using -data fails.

  DesiredBehavior:
  Now that we have binary string capability, I would expect two
      images to appear (sorry for the tactless choice, it was the
      smallest GIF i had. :-).



  This issue is addressed in the related report (Img patch).  It
  has been evaluated and is scheduled for 8.3. 
  -- 08/05/1999 hobbs


tkt_uuid: 220000ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 55. [focus]
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: focus command not returning corect window
comment:
  OriginalBugID: 2307 Bug
  Version: 8.0.4
  SubmitDate: '1999-07-01'
  LastModified: '1999-08-07'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1506
  OS: AIX
  OSVersion: 4.1, 4.3
  Machine: RS6000
  ClosedDate: '1999-08-07'


  Name:
  Anthony Johnson

  Extensions:
  8.0p2 and 8.0.4, TclX8.0.3, TkX8.0.3

  ReproducibleScript:
  focus <-- returns NULL
         toplevel .test
         raise .test
         focus .test
         focus <-- returns NULL
      ---------------------
         toplevel .test
         raise .test
         focus .test
         update
         focus <--- returns "."
      ------------------
         update
         toplevel .test
         raise .test
         focus .test
         focus <--- returns .test
      -------------------
         update
         toplevel .test
         raise .test
         focus .test
         focus <--- returns NULL
         destroy .test
         toplevel .test
         raise .test
         focus .test
         focus <--- returns NULL
      -------------------
          update
         toplevel .test
         raise .test
         focus .test
         focus <--- returns .test
         destroy .test
         update
         toplevel .test
         raise .test
         focus .test
         focus <--- returns .test

  ObservedBehavior:
  Using "update idletasks" instead of "update" has the same affect as
      omitting it
      entirely. I cannot use "update" becasue I do not want to start an event
      loop
      within my proc. Even when using "update", it doesnt appear to return the
      correct
      window I last focused on. Any time a window is destroyed, the focus
      command
      returns NULL until update is executed again.

  DesiredBehavior:
  Focus should return the name of the toplevel window which last had
      focus.


tkt_uuid: 220001ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 08. [(label)frame] and [toplevel]
priority: 1 Zero
foundin: obsolete: 8.0.4
resolution: Duplicate
title: Crazy focus behavior of toplevel window
comment:
  OriginalBugID: 2310 Bug
  Version: 8.0.4
  SubmitDate: '1999-07-01'
  LastModified: '1999-08-07'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1505
  OS: AIX
  OSVersion: 4.1, 4.3
  Machine: RS6000
  ClosedDate: '1999-08-07'


  Name:
  Anthony Johnson

  Extensions:
  8.0p2 and 8.0.4, TclX8.0.3, TkX8.0.3

  ReproducibleScript:
  Problem occurs when creating/destroying toplevel windows within the
      application.
      Problems are very inconsistent but frequent enough to make the
      application
      very annoying to use.

  ObservedBehavior:
  1. When destroying a top-level window, {destroy $curwin; raise $parent;
      focus
      $parent} has no affect. The focus is still given to the prior toplevel
      in the
      stack.
      2. When toplevel is destroyed, prior window in the stack gets raised but
      is not
      refreshed until the pointer is moved into the window (it seem this is
      only the
      behaviour with Mwm and not Cde window manager)
      3. When a toplevel is created (withdrawn, deiconified, raised), the main
      (.)
      toplevel is [sometimes] immediately raised above it for no obvious
      reason.
      4. Miscellandous windows, even those that are not part of the
      application (or
      even Tk), get raised when the cursor moves into them. This (mostly)
      occurs after
      a toplevel has been destroyed. The window focus policy is explicit, and
      this
      behaviour never occurs unless running the Tk application.

  DesiredBehavior:
  When a toplevel is destroyed, I expect the prior window in the stack to
      be
      raised, refreshed, and focused. But, even explicit raise/focus command
      do nto
      appear to work as expected.


tkt_uuid: 220002ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 41. Photo Images
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Many fixes to photo images
comment:
  OriginalBugID: 2325 RFE
  Version: 8.1.1
  SubmitDate: '1999-07-06'
  LastModified: '1999-08-01'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2431
  OS: Other
  Machine: NA
  ClosedDate: '1999-08-01'


  Name:

  Jan Nijtmans


  CVS:

  July 2, 1999


  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.


      Due to the size of this patch I don't post it to comp.lang.tcl.


  DesiredBehavior:

  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.2 from

      the latest CVS sources.

      - 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.

      The documentation "photo.n" is adapted according to the above

      enhancements at the Tcl level. The C-API modifications are not

      yet documented, but this is rather trivial (I'm willing to do

      that, if it helps)


  Patch:

  *** generic/tk.h.origSat Jul  3 20:06:24 1999

  --- generic/tk.hSat Jul  3 21:38:15 1999

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

  *** 979,985 ****


    typedef struct Tk_ImageType Tk_ImageType;

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

  ! char *name, int argc, char **argv, Tk_ImageType *typePtr,

    Tk_ImageMaster master, ClientData *masterDataPtr));

    typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,

    ClientData masterData));

  --- 979,985 ----


    typedef struct Tk_ImageType Tk_ImageType;

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

  ! char *name, int objc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr,

    Tk_ImageMaster master, ClientData *masterDataPtr));

    typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,

    ClientData masterData));

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

  *** 1055,1064 ****

     * pixels in successive lines. */

        intpixelSize;/* Address difference between successive

     * pixels in the same line. */

  !     intoffset[3];/* Address differences between the red, green

  !  * and blue components of the pixel and the

  !  * pixel as a whole. */

  !     intreserved;/* Reserved for extensions (dash patch) */

    } Tk_PhotoImageBlock;


    /*

  --- 1055,1063 ----

     * pixels in successive lines. */

        intpixelSize;/* Address difference between successive

     * pixels in the same line. */

  !     intoffset[4];/* Address differences between the red, green,

  !  * blue and alpha components of the pixel and

  !  * the pixel as a whole. */

    } Tk_PhotoImageBlock;


    /*

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

  *** 1068,1087 ****


    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,

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

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

  ! char *string, char *formatString, Tk_PhotoHandle imageHandle,

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

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

  ! char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));

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

  ! Tcl_DString *dataPtr, char *formatString,

    Tk_PhotoImageBlock *blockPtr));


    /*

  --- 1067,1088 ----


    typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;

    typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,

  ! char *fileName, Tcl_Obj *format, int *widthPtr,

  ! int *heightPtr, Tcl_Interp *interp));

  ! typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((Tcl_Obj *dataObj,

  ! Tcl_Obj *format, int *widthPtr, int *heightPtr,

  ! Tcl_Interp *interp));

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

  ! Tcl_Channel chan, char *fileName, Tcl_Obj *format,

    Tk_PhotoHandle imageHandle, int destX, int destY,

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

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

  ! Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle,

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

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

  ! char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr));

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

  ! Tcl_DString *dataPtr, Tcl_Obj *format,

    Tk_PhotoImageBlock *blockPtr));


    /*

  *** generic/tkImage.c.origSat Jul  3 20:06:29 1999

  --- generic/tkImage.cSun Jul  4 22:27:56 1999

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

  *** 119,125 ****

    /*

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

     *

  !  * Tk_ImageCmd --

     *

     *This procedure is invoked to process the "image" Tcl command.

     *See the user documentation for details on what it does.

  --- 119,125 ----

    /*

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

     *

  !  * Tk_ImageObjCmd --

     *

     *This procedure is invoked to process the "image" Tcl command.

     *See the user documentation for details on what it does.

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

  *** 134,148 ****

     */


    int

  ! Tk_ImageCmd(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. */

    {

        TkWindow *winPtr = (TkWindow *) clientData;

  !     int c, i, new, firstOption;

  !     size_t length;

        Tk_ImageType *typePtr;

        ImageMaster *masterPtr;

        Image *imagePtr;

  --- 134,155 ----

     */


    int

  ! Tk_ImageObjCmd(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 strings. */

    {

  +     static char *imageOptions[] = {

  + "create", "delete", "height", "names", "type", "types", "width",

  + (char *) NULL

  +     };

  +     enum options {

  + IMAGE_CREATE, IMAGE_DELETE, IMAGE_HEIGHT, IMAGE_NAMES,

  + IMAGE_TYPE, IMAGE_TYPES, IMAGE_WIDTH

  +     };

        TkWindow *winPtr = (TkWindow *) clientData;

  !     int i, new, firstOption,  index;

        Tk_ImageType *typePtr;

        ImageMaster *masterPtr;

        Image *imagePtr;

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

  *** 153,186 ****

        ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 

                Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));


  !     if (argc < 2) {

  ! Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  ! " option ?args?\"", (char *) NULL);

    return TCL_ERROR;

        }

  !     c = argv[1][0];

  !     length = strlen(argv[1]);

  !     if ((c == 'c') && (strncmp(argv[1], "create", length) == 0)) {

  ! if (argc < 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " create type ?name? ?options?\"", (char *) NULL);

        return TCL_ERROR;

    }

  - c = argv[2][0];


    /*

     * Look up the image type.

     */


    for (typePtr = tsdPtr->imageTypeList; typePtr != NULL;

    typePtr = typePtr->nextPtr) {

  !     if ((c == typePtr->name[0])

  !     && (strcmp(argv[2], typePtr->name) == 0)) {

    break;

        }

    }

    if (typePtr == NULL) {

  !     Tcl_AppendResult(interp, "image type \"", argv[2],

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

  --- 160,196 ----

        ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 

                Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));


  !     if (objc < 2) {

  ! Tcl_WrongNumArgs(interp, 1, objv, "option ?args?");

    return TCL_ERROR;

        }

  ! 

  !     if (Tcl_GetIndexFromObj(interp, objv[1], imageOptions, "option", 0,

  !     &index) != TCL_OK) {

  ! return TCL_ERROR;

  !     }

  !     switch ((enum options) index) {

  !       case IMAGE_CREATE: {

  ! char *arg;

  ! if (objc < 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "type ?name? ?options?");

        return TCL_ERROR;

    }


    /*

     * Look up the image type.

     */


  + arg = Tcl_GetString(objv[2]);

    for (typePtr = tsdPtr->imageTypeList; typePtr != NULL;

    typePtr = typePtr->nextPtr) {

  !     if ((*arg == typePtr->name[0])

  !     && (strcmp(arg, typePtr->name) == 0)) {

    break;

        }

    }

    if (typePtr == NULL) {

  !     Tcl_AppendResult(interp, "image type \"", arg,

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

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

  *** 189,201 ****

     * Figure out a name to use for the new image.

     */


  ! if ((argc == 3) || (argv[3][0] == '-')) {

        dispPtr->imageId++;

        sprintf(idString, "image%d", dispPtr->imageId);

        name = idString;

        firstOption = 3;

    } else {

  !     name = argv[3];

        firstOption = 4;

    }


  --- 199,212 ----

     * Figure out a name to use for the new image.

     */


  ! arg = Tcl_GetString(objv[3]);

  ! if ((objc == 3) || (arg[0] == '-')) {

        dispPtr->imageId++;

        sprintf(idString, "image%d", dispPtr->imageId);

        name = idString;

        firstOption = 3;

    } else {

  !     name = arg;

        firstOption = 4;

    }


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

  *** 240,247 ****

     * the image.

     */


  ! if ((*typePtr->createProc)(interp, name, argc-firstOption,

  ! argv+firstOption, typePtr, (Tk_ImageMaster) masterPtr,

    &masterPtr->masterData) != TCL_OK) {

        DeleteImage(masterPtr);

        return TCL_ERROR;

  --- 251,258 ----

     * the image.

     */


  ! if ((*typePtr->createProc)(interp, name, objc-firstOption,

  ! objv+firstOption, typePtr, (Tk_ImageMaster) masterPtr,

    &masterPtr->masterData) != TCL_OK) {

        DeleteImage(masterPtr);

        return TCL_ERROR;

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

  *** 255,292 ****

    Tcl_SetResult(interp,

    Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr),

    TCL_STATIC);

  !     } else if ((c == 'd') && (strncmp(argv[1], "delete", length) == 0)) {

  ! for (i = 2; i < argc; i++) {

  !     hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, argv[i]);

        if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", argv[i],

        "\" doesn't exist", (char *) NULL);

    return TCL_ERROR;

        }

        masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

        DeleteImage(masterPtr);

    }

  !     } else if ((c == 'h') && (strncmp(argv[1], "height", length) == 0)) {

  ! char buf[TCL_INTEGER_SPACE];

  ! 

  ! if (argc != 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " height name\"", (char *) NULL);

        return TCL_ERROR;

    }

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, argv[2]);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", argv[2],

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

    masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

  ! sprintf(buf, "%d", masterPtr->height);

  ! Tcl_SetResult(interp, buf, TCL_VOLATILE);

  !     } else if ((c == 'n') && (strncmp(argv[1], "names", length) == 0)) {

  ! if (argc != 2) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " names\"", (char *) NULL);

        return TCL_ERROR;

    }

    for (hPtr = Tcl_FirstHashEntry(&winPtr->mainPtr->imageTable, &search);

  --- 266,307 ----

    Tcl_SetResult(interp,

    Tcl_GetHashKey(&winPtr->mainPtr->imageTable, hPtr),

    TCL_STATIC);

  ! break;

  !       }

  !       case IMAGE_DELETE: {

  ! for (i = 2; i < objc; i++) {

  !     char *arg = Tcl_GetString(objv[i]);

  !     hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, arg);

        if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", arg,

        "\" doesn't exist", (char *) NULL);

    return TCL_ERROR;

        }

        masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

        DeleteImage(masterPtr);

    }

  ! break;

  !       }

  !       case IMAGE_HEIGHT: {

  ! char *arg;

  ! if (objc != 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "name");

        return TCL_ERROR;

    }

  ! arg = Tcl_GetString(objv[2]);

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, arg);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", arg,

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

    masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

  ! Tcl_SetIntObj(Tcl_GetObjResult(interp), masterPtr->height);

  ! break;

  !       }

  !       case IMAGE_NAMES: {

  ! if (objc != 2) {

  !     Tcl_WrongNumArgs(interp, 2, objv, NULL);

        return TCL_ERROR;

    }

    for (hPtr = Tcl_FirstHashEntry(&winPtr->mainPtr->imageTable, &search);

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

  *** 294,308 ****

        Tcl_AppendElement(interp, Tcl_GetHashKey(

        &winPtr->mainPtr->imageTable, hPtr));

    }

  !     } else if ((c == 't') && (strcmp(argv[1], "type") == 0)) {

  ! if (argc != 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " type name\"", (char *) NULL);

        return TCL_ERROR;

    }

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, argv[2]);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", argv[2],

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

  --- 309,326 ----

        Tcl_AppendElement(interp, Tcl_GetHashKey(

        &winPtr->mainPtr->imageTable, hPtr));

    }

  ! break;

  !       }

  !       case IMAGE_TYPE: {

  ! char *arg;

  ! if (objc != 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "name");

        return TCL_ERROR;

    }

  ! arg = Tcl_GetString(objv[2]);

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, arg);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", arg,

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

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

  *** 310,347 ****

    if (masterPtr->typePtr != NULL) {

        Tcl_SetResult(interp, masterPtr->typePtr->name, TCL_STATIC);

    }

  !     } else if ((c == 't') && (strcmp(argv[1], "types") == 0)) {

  ! if (argc != 2) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " types\"", (char *) NULL);

        return TCL_ERROR;

    }

    for (typePtr = tsdPtr->imageTypeList; typePtr != NULL;

    typePtr = typePtr->nextPtr) {

        Tcl_AppendElement(interp, typePtr->name);

    }

  !     } else if ((c == 'w') && (strncmp(argv[1], "width", length) == 0)) {

  ! char buf[TCL_INTEGER_SPACE];

  ! 

  ! if (argc != 3) {

  !     Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  !     " width name\"", (char *) NULL);

        return TCL_ERROR;

    }

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, argv[2]);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", argv[2],

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

    masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

  ! sprintf(buf, "%d", masterPtr->width);

  ! Tcl_SetResult(interp, buf, TCL_VOLATILE);

  !     } else {

  ! Tcl_AppendResult(interp, "bad option \"", argv[1],

  ! "\": must be create, delete, height, names, type, types,",

  ! " or width", (char *) NULL);

  ! return TCL_ERROR;

        }

        return TCL_OK;

    }

  --- 328,363 ----

    if (masterPtr->typePtr != NULL) {

        Tcl_SetResult(interp, masterPtr->typePtr->name, TCL_STATIC);

    }

  ! break;

  !       }

  !       case IMAGE_TYPES: {

  ! if (objc != 2) {

  !     Tcl_WrongNumArgs(interp, 2, objv, NULL);

        return TCL_ERROR;

    }

    for (typePtr = tsdPtr->imageTypeList; typePtr != NULL;

    typePtr = typePtr->nextPtr) {

        Tcl_AppendElement(interp, typePtr->name);

    }

  ! break;

  !       }

  !       case IMAGE_WIDTH: {

  ! char *arg;

  ! if (objc != 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "name");

        return TCL_ERROR;

    }

  ! arg = Tcl_GetString(objv[2]);

  ! hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->imageTable, arg);

    if (hPtr == NULL) {

  !     Tcl_AppendResult(interp, "image \"", arg,

        "\" doesn't exist", (char *) NULL);

        return TCL_ERROR;

    }

    masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);

  ! Tcl_SetIntObj(Tcl_GetObjResult(interp), masterPtr->width);

  ! break;

  !       }

        }

        return TCL_OK;

    }

  *** generic/tkImgBmap.c.origSat Jul  3 20:06:31 1999

  --- generic/tkImgBmap.cSun Jul  4 22:33:53 1999

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

  *** 80,86 ****


    static intGetByte _ANSI_ARGS_((Tcl_Channel chan));

    static intImgBmapCreate _ANSI_ARGS_((Tcl_Interp *interp,

  !     char *name, int argc, char **argv,

        Tk_ImageType *typePtr, Tk_ImageMaster master,

        ClientData *clientDataPtr));

    static ClientDataImgBmapGet _ANSI_ARGS_((Tk_Window tkwin,

  --- 80,86 ----


    static intGetByte _ANSI_ARGS_((Tcl_Channel chan));

    static intImgBmapCreate _ANSI_ARGS_((Tcl_Interp *interp,

  !     char *name, int argc, Tcl_Obj *CONST objv[],

        Tk_ImageType *typePtr, Tk_ImageMaster master,

        ClientData *clientDataPtr));

    static ClientDataImgBmapGet _ANSI_ARGS_((Tk_Window tkwin,

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

  *** 150,162 ****

     */


    static intImgBmapCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int argc, char **argv));

    static voidImgBmapCmdDeletedProc _ANSI_ARGS_((

        ClientData clientData));

    static voidImgBmapConfigureInstance _ANSI_ARGS_((

        BitmapInstance *instancePtr));

    static intImgBmapConfigureMaster _ANSI_ARGS_((

  !     BitmapMaster *masterPtr, int argc, char **argv,

        int flags));

    static intNextBitmapWord _ANSI_ARGS_((ParseInfo *parseInfoPtr));

    

  --- 150,162 ----

     */


    static intImgBmapCmd _ANSI_ARGS_((ClientData clientData,

  !     Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[]));

    static voidImgBmapCmdDeletedProc _ANSI_ARGS_((

        ClientData clientData));

    static voidImgBmapConfigureInstance _ANSI_ARGS_((

        BitmapInstance *instancePtr));

    static intImgBmapConfigureMaster _ANSI_ARGS_((

  !     BitmapMaster *masterPtr, int argc, Tcl_Obj *CONST objv[],

        int flags));

    static intNextBitmapWord _ANSI_ARGS_((ParseInfo *parseInfoPtr));

    

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

  *** 184,190 ****

     * image. */

        char *name;/* Name to use for image. */

        int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings for options (doesn't

     * include image name or type). */

        Tk_ImageType *typePtr;/* Pointer to our type record (not used). */

        Tk_ImageMaster master;/* Token for image, to be used by us in

  --- 184,190 ----

     * image. */

        char *name;/* Name to use for image. */

        int argc;/* Number of arguments. */

  !     Tcl_Obj *CONST argv[];/* Argument objects for options (doesn't

     * include image name or type). */

        Tk_ImageType *typePtr;/* Pointer to our type record (not used). */

        Tk_ImageMaster master;/* Token for image, to be used by us in

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

  *** 197,203 ****

        masterPtr = (BitmapMaster *) ckalloc(sizeof(BitmapMaster));

        masterPtr->tkMaster = master;

        masterPtr->interp = interp;

  !     masterPtr->imageCmd = Tcl_CreateCommand(interp, name, ImgBmapCmd,

        (ClientData) masterPtr, ImgBmapCmdDeletedProc);

        masterPtr->width = masterPtr->height = 0;

        masterPtr->data = NULL;

  --- 197,203 ----

        masterPtr = (BitmapMaster *) ckalloc(sizeof(BitmapMaster));

        masterPtr->tkMaster = master;

        masterPtr->interp = interp;

  !     masterPtr->imageCmd = Tcl_CreateObjCommand(interp, name, ImgBmapCmd,

        (ClientData) masterPtr, ImgBmapCmdDeletedProc);

        masterPtr->width = masterPtr->height = 0;

        masterPtr->data = NULL;

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

  *** 238,259 ****

     */


    static int

  ! ImgBmapConfigureMaster(masterPtr, argc, argv, flags)

        BitmapMaster *masterPtr;/* Pointer to data structure describing

     * overall bitmap image to (reconfigure). */

  !     int argc;/* Number of entries in argv. */

  !     char **argv;/* Pairs of configuration options for image. */

        int flags;/* Flags to pass to Tk_ConfigureWidget,

     * such as TK_CONFIG_ARGV_ONLY. */

    {

        BitmapInstance *instancePtr;

        int maskWidth, maskHeight, dummy1, dummy2;


        if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),

  !     configSpecs, argc, argv, (char *) masterPtr, flags)

        != TCL_OK) {

    return TCL_ERROR;

        }


        /*

         * Parse the bitmap and/or mask to create binary data.  Make sure that

  --- 238,267 ----

     */


    static int

  ! ImgBmapConfigureMaster(masterPtr, objc, objv, flags)

        BitmapMaster *masterPtr;/* Pointer to data structure describing

     * overall bitmap image to (reconfigure). */

  !     int objc;/* Number of entries in objv. */

  !     Tcl_Obj *CONST objv[];/* Pairs of configuration options for image. */

        int flags;/* Flags to pass to Tk_ConfigureWidget,

     * such as TK_CONFIG_ARGV_ONLY. */

    {

        BitmapInstance *instancePtr;

        int maskWidth, maskHeight, dummy1, dummy2;


  +     char **argv = (char **) ckalloc((objc+1) * sizeof(char *));

  +     for (dummy1 = 0; dummy1 < objc; dummy1++) {

  + argv[dummy1]=Tcl_GetString(objv[dummy1]);

  +     }

  +     argv[objc] = NULL;

  + 

        if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),

  !     configSpecs, objc, argv, (char *) masterPtr, flags)

        != TCL_OK) {

  + ckfree((char *) argv);

    return TCL_ERROR;

        }

  +     ckfree((char *) argv);


        /*

         * Parse the bitmap and/or mask to create binary data.  Make sure that

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

  *** 742,792 ****

     */


    static int

  ! ImgBmapCmd(clientData, interp, argc, argv)

        ClientData clientData;/* Information about the image master. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int argc;/* Number of arguments. */

  !     char **argv;/* Argument strings. */

    {

        BitmapMaster *masterPtr = (BitmapMaster *) clientData;

  !     int c, code;

  !     size_t length;


  !     if (argc < 2) {

  ! Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],

  ! " option ?arg arg ...?\"", (char *) NULL);

    return TCL_ERROR;

        }

  !     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);

        return TCL_ERROR;

    }

    return Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs,

  ! (char *) masterPtr, argv[2], 0);

  !     } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)

  !     && (length >= 2)) {

  ! if (argc == 2) {

        code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),

        configSpecs, (char *) masterPtr, (char *) NULL, 0);

  ! } else if (argc == 3) {

        code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),

  !     configSpecs, (char *) masterPtr, argv[2], 0);

    } else {

  !     code = ImgBmapConfigureMaster(masterPtr, argc-2, argv+2,

        TK_CONFIG_ARGV_ONLY);

    }

    return code;

  !     } else {

  ! Tcl_AppendResult(interp, "bad option \"", argv[1],

  ! "\": must be cget or configure", (char *) NULL);

  ! return TCL_ERROR;

        }

    }

    

    /*

  --- 750,801 ----

     */


    static int

  ! ImgBmapCmd(clientData, interp, objc, objv)

        ClientData clientData;/* Information about the image master. */

        Tcl_Interp *interp;/* Current interpreter. */

  !     int objc;/* Number of arguments. */

  !     Tcl_Obj *CONST objv[];/* Argument objects. */

    {

  +     static char *bmapOptions[] = {"cget", "configure", (char *) NULL};

        BitmapMaster *masterPtr = (BitmapMaster *) clientData;

  !     int code, index;


  !     if (objc < 2) {

  ! Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?");

  ! return TCL_ERROR;

  !     }

  !     if (Tcl_GetIndexFromObj(interp, objv[1], bmapOptions, "option", 0,

  !     &index) != TCL_OK) {

    return TCL_ERROR;

        }

  !     switch (index) {

  !       case 0: {

  ! if (objc != 3) {

  !     Tcl_WrongNumArgs(interp, 2, objv, "option");

        return TCL_ERROR;

    }

    return Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs,

  ! (char *) masterPtr, Tcl_GetString(objv[2]), 0);

  !       }

  !       case 1: {

  ! if (objc == 2) {

        code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),

        configSpecs, (char *) masterPtr, (char *) NULL, 0);

  ! } else if (objc == 3) {

        code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),

  !     configSpecs, (char *) masterPtr,

  !     Tcl_GetString(objv[2]), 0);

    } else {

  !     code = ImgBmapConfigureMaster(masterPtr, objc-2, objv+2,

        TK_CONFIG_ARGV_ONLY);

    }

    return code;

  !       }

  !       default: {

  ! panic("bad const entries to bmapOptions in ImgBmapCmd");

  !       }

        }

  +     return TCL_OK;

    }

    

    /*

  *** generic/tkImgGIF.c.origSat Jul  3 20:06:31 1999

  --- generic/tkImgGIF.cSat Jul  3 21:38:19 1999

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

  *** 3,15 ****

     *

     *A photo image file handler for GIF files. Reads 87a and 89a GIF

     *files. At present there is no write function.  GIF images may be

  !  *read using the -data option of the photo image by representing

     *the data as BASE64 encoded ascii.  Derived from the giftoppm code

     *found in the pbmplus package and tkImgFmtPPM.c in the tk4.0b2

     *distribution.

     *

     * Copyright (c) Reed Wade (wade@cs.utk.edu), University of Tennessee

     * Copyright (c) 1995-1997 Sun Microsystems, Inc.

     *

     * See the file "license.terms" for information on usage and redistribution

     * of this file, and for a DISCLAIMER OF ALL WARRANTIES.

  --- 3,17 ----

     *

     *A photo image file handler for GIF files. Reads 87a and 89a GIF

     *files. At present there is no write function.  GIF images may be

  !  *read using the -data option of the photo image.  The data may be

  !  *given as a binary string in a Tcl_Obj or by representing

     *the data as BASE64 encoded ascii.  Derived from the giftoppm code

     *found in the pbmplus package and tkImgFmtPPM.c in the tk4.0b2

     *distribution.

     *

     * Copyright (c) Reed Wade (wade@cs.utk.edu), University of Tennessee

     * Copyright (c) 1995-1997 Sun Microsystems, Inc.

  +  * Copyright (c) 1997 Australian National University

     *

     * See the file "license.terms" for information on usage and redistribution

     * of this file, and for a DISCLAIMER OF ALL WARRANTIES.

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

  *** 63,69 ****

    /*

     *  HACK ALERT!!  HACK ALERT!!  HACK ALERT!!

     * This code is hard-wired for reading from files.  In order to read

  !  * from a data stream, we'll trick fread so we can reuse the same code

     */


    typedef struct ThreadSpecificData {

  --- 65,72 ----

    /*

     *  HACK ALERT!!  HACK ALERT!!  HACK ALERT!!

     * This code is hard-wired for reading from files.  In order to read

  !  * from a data stream, we'll trick fread so we can reuse the same code.

  !  * 0==from file; 1==from base64 encoded data; 2==from binary data

     */


    typedef struct ThreadSpecificData {

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

  *** 76,90 ****

     */


    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,

        int srcX, int srcY));


  --- 79,95 ----

     */


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

  !     Tcl_Obj *format, int *widthPtr, int *heightPtr,

  !     Tcl_Interp *interp));

    static int      FileReadGIF  _ANSI_ARGS_((Tcl_Interp *interp,

  !     Tcl_Channel chan, char *fileName, Tcl_Obj *format,

        Tk_PhotoHandle imageHandle, int destX, int destY,

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

  ! static intStringMatchGIF _ANSI_ARGS_(( Tcl_Obj *dataObj,

  !     Tcl_Obj *format, int *widthPtr, int *heightPtr,

  !     Tcl_Interp *interp));

  ! static intStringReadGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,

  !     Tcl_Obj *format, Tk_PhotoHandle imageHandle,

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

        int srcX, int srcY));


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

  *** 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);

    }

  --- 170,183 ----

     */


    static int

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

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

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

  !     Tcl_Obj *format;/* User-specified format object, 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);

    }

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

  *** 197,208 ****

     */


    static int

  ! FileReadGIF(interp, chan, fileName, formatString, imageHandle, destX, destY,

    width, height, srcX, srcY)

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

        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. */

        Tk_PhotoHandle imageHandle;/* The photo image to write into. */

        int destX, destY;/* Coordinates of top-left pixel in

     * photo image to be written to. */

  --- 203,214 ----

     */


    static int

  ! FileReadGIF(interp, chan, fileName, format, imageHandle, destX, destY,

    width, height, srcX, srcY)

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

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

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

  !     Tcl_Obj *format;/* User-specified format object, or NULL. */

        Tk_PhotoHandle imageHandle;/* The photo image to write into. */

        int destX, destY;/* Coordinates of top-left pixel in

     * photo image to be written to. */

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

  ***


tkt_uuid: 220003ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 75. wish
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Pipe to 16 bit program not working under Windows NT 4
comment:
  OriginalBugID: 2330 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-06'
  LastModified: '1999-08-05'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2368
  OS: Windows NT
  OSVersion: Win NT 4.0 + ServicePack 4
  Machine: X86
  ClosedDate: '1999-08-05'


  Name:
  Martin Conrad

  Extensions:
  no

  CustomShell:
  no

  Comments:
  Best regards,
      
      Martin

  ReproducibleScript:
  The following scripts can be invoked by tclsh81 or wish81. First you
      must insert a formatted high density floppy disk into drive A:, then you
      type
      
      tclsh81 initfd
      
      or
      
      wish81 initfd
      
      In both cases, the script sends commands to debug which build a new BIOS
      parameter block, FAT tables and an empty directory (for higher total
      capacity).
      
      If you use tclsh81, you can see some output on the console screen, if
      you use wish, you see nothing, but the floppy drive LED should be turned
      on and off.
      
      Here the scripts:
      ------------------------------------------ initfd (1st version)
      
      puts "Start initialization drive 0"
      set fdp [open "| debug" w]
      puts $fdp "
      l200 0 0 2
      f20d,20d 8
      f211,211 30
      f215,215 f0
      f216,216 2
      f400,400 f0
      f403,11ff 0
      f800,802 f0 ff ff
      w200 0 0 8
      q
      "
      puts "Close command pipe now"
      close $fdp
      puts "Initialisierung beendet"
      exit
      
      --------------------------------------------------------- initfd (2nd
      version)
      
      exec debug << "
      l200 0 0 2
      f20d,20d 8
      f211,211 30
      f215,215 f0
      f216,216 2
      f400,400 f0
      f403,11ff 0
      f800,802 f0 ff ff
      w200 0 0 8
      q
      "
      exit
      
      ---------------------------------------------------------

  ObservedBehavior:
  If you use wish81, the script hangs. The task manager shows a process
      NTVDM.EXE,
      which consumes nearly all cpu time. If you stop that process, an error
      message
      pops up, with the following contents (1st version):
              broken pipechild process exited abnormally
                while executing
              "close $fdp"
                (file "...\initfd" line 16)
      Contents for 2nd version:
              child process exited abnormally
                while executing
              "exec debug << "
                   :
                   :
                      q
              ""
                (file "...\initfd" line 1

  DesiredBehavior:
  As with wish80, the debug commands written to the pipe should be
      executed and
      the script should stop afterwards.


tkt_uuid: 220004ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 07. [entry]
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: Entry widget bindings have bad global usage
comment:
  OriginalBugID: 2370 Bug
  Version: 8.0.5
  SubmitDate: '1999-07-16'
  LastModified: '1999-08-05'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2350
  OS: Windows NT
  OSVersion: Applies to all O/S (Unix, Linux, Win)
  Machine: X86
  ClosedDate: '1999-08-05'


  Comments:
  I found this in Tk 8.0.5 but it still exists in Tk 8.1.1

  ReproducibleScript:
  Script:
        set data(0) 0
        entry .e
        pack .e
      Instructions: Type into the entry and try <<Cut>> (Ctrl-X) or <<Copy>>
      (Ctrl-C),
      then <<Paste>> (Ctrl-V). Note Cut/Copy do not work. Without the "set
      data(0)"
      line they will work.

  ObservedBehavior:
  The entry widget binding for <<Copy>> and <<Cut>> use a global variable
      "data" to store the value copied to/from the clipboard. This can
      conflict
      with the programmer's script. In the example above, it silently fails
      because
      data is an array.
      
      Worse behavior will result if "data" is used in the main application as
      as scalar, since the value will be overwritten by Copy and Cut.

  DesiredBehavior:
  The Entry bindings should use a private variable like tk_priv* 
      so as not to conflict with this very common variable name.


tkt_uuid: 220005ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 47. Win Fonts
priority: 1 Zero
foundin: final: 8.1.1
resolution: Duplicate
title: Unicode support fails horribly on systems with Adobe G2 fonts
comment:
  OriginalBugID: 2405 Bug
  Version: 8.1.1
  SubmitDate: '1999-07-19'
  LastModified: '1999-08-04'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2406
  OS: Windows 95
  OSVersion: OSR3 + IE 5.0 (hence, it's effectively WIN98)
  Machine: X86
  ClosedDate: '1999-08-04'


  Name:

  Kevin Kenny



  CVS:

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



  Extensions:

  None relevant



  CustomShell:

  Patched as above.



  Comments:

  The problem lies in the fact that symbol fonts use the vendor-defined

      code range in Unicode, F000-FDFF.  This code range is used because these

      fonts

      define non-Unicode glyphs, and hence contain characters for which there

      is

      no correct Unicode encoding.

      

      The code in tkWinFont.c attempts to solve this problem by pretending

      that the

      code range F000-F0FF is equivalent to 0000-00FF, so that the Microsoft

      "Symbol"

      font can be displayed by using 8-bit characters.  Unfortunately, a

      symbol font

      containing higher-order characters will fail.

      

      In particular, the "Times New Roman Special G2" font contains the

      character

      ranges:  F020-F10E, F110-F112, F241-F25A, F260-F27B, and the end

      sentinel

      FFFF-FFFF.  The problem arises because the code in tkWinFont.c as it

      stands

      makes the first range into 0020-F10E; the result is that the font is

      thought

      to contain all printable Unicode characters, and a good many

      hypothetical

      ones to boot!  The patch changes the mapping so that all ranges between

      F000

      and FFFF and mapped down to 0000 through 0FFF.

      

      This approach is formally incorrect; a better approach would be to

      require

      users of the "Symbol" font to use the vendor-defined codes; hence, to

      get

      a label with a "Symbol" version of a "there-exists" sign, one would have

      to

      do

      

      grid [label .exists -text \uf024 -font {Symbol 24}]

      

      instead of

      

      grid [label .exists -text \$ -font {Symbol 24}]

      

      Unfortunately, this decision would break a good deal of existing code;

      hence, I wouldn't recommend it.



  ReproducibleScript:

  # On a Win95 system whose font configuration includes the Adobe G2

      fonts,

      # such as "Times New Roman Special G2", and has one of these fonts ahead

      of

      # a CJK font in the sequence returned from EnumFontFamilies, any attempt

      to

      # display CJK text will fail.  The test case is a simple program like

      

      grid [button .taiku -text "\u592a\u9177" -command exit]



  ObservedBehavior:

  The button contains two rectangles for characters not found.



  DesiredBehavior:

  Obvoiusly, the button should contain the Chinese phrase, "tai ku."



  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 16:26:26 1999

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

  *** 2295,2306 ****

  --- 2295,2315 ----

         */

    

        for (i = 0; i < segCount; i++) {

  + #ifdef AS_SHIPPED

    if ((startCount[i] & 0xff00) == 0xf000) {

        startCount[i] &= 0xff;

    }

    if ((endCount[i] & 0xff00) == 0xf000) {

        endCount[i] &= 0xff;

    }

  + #else

  + if ((startCount[i] >= 0xf000)) {

  +   startCount[i] -= 0xf000;

  + }

  + if ((endCount[i] >= 0xf000)) {

  +   endCount[i] -= 0xf000;

  + }

  + #endif

        }

    }

        }



  PatchFiles:

  tkWinFont.c


tkt_uuid: 220006ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: obsolete: 8.2b1
resolution: Duplicate
title: oval drawing leaves trace behind
comment:
  OriginalBugID: 2426 Bug
  Version: 8.2b1
  SubmitDate: '1999-07-21'
  LastModified: '1999-12-14'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3354 2251
  OS: Windows NT
  OSVersion: 4.0 SP5
  Machine: X86
  ClosedDate: '1999-12-14'


  Name:
  Jan Nijtmans

  Comments:
  I didn't write a patch yet, but the problem is not so difficult to
      track down. The easiest solution is to make the bounding box one
      pixel wider and higher in ComputeRectOvalBbox (tkRectOval.c).
      However, because it only happens with "-outline {}" and not with
      "-width 0" and also only with ovals, not with rects, it could
      also be that DisplayRectOval() is a little bit to generous
      on Windows. I didn't check yet if UNIX shows the same problem, it
      might very well be Windows specific.

  ReproducibleScript:
  pack [canvas .c]
      .c create oval 50 50 100 100 -fill black -outline {}
      for {set i 1} {$i < 10} {incr i} {
          update
          .c move all -4 -4
      }

  ObservedBehavior:
  In the above script, the oval leaves a trace behind. It only
      happens with ovals having "-outline {}".



  This is verified on 8.2.0, on Windows, no problem on Solaris. 
  -- 08/21/1999 hobbs


tkt_uuid: 220007ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Printing tcl source from a wish window on NT
comment:
  OriginalBugID: 2430 RFE
  Version: 8.2b1
  SubmitDate: '1999-07-21'
  LastModified: '1999-12-22'
  Severity: LOW
  Status: Closed
  Submitter: jenn
  ChangedBy: hobbs
  RelatedBugIDs: 1954
  OS: Windows NT
  ClosedDate: '1999-12-22'


  I am developing now database applications with tcl and I should have the
  possibility to print from wish, like in other programs (MS-Access) with full
  printer support.  At the moment, I print the data in a file and later I type the file to the printer.  I think this method is not very elegant !!!


tkt_uuid: 220008ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 48. Geometry Management
priority: 1 Zero
foundin: obsolete: 8.2b1
resolution: Duplicate
title: Hang if grid/packer used in same level
comment:
  OriginalBugID: 2444 RFE
  Version: 8.2b1
  SubmitDate: '1999-07-26'
  LastModified: '1999-08-13'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 677
  OS: Linux-Red Hat
  Machine: Other
  ClosedDate: '1999-08-13'


  Name:
  Dr. David Alan Gilbert

  ReproducibleScript:
  Sorry - no script; its a very touchy heisenbug this.  I had a script
      which used a lot of gridding to lay
      out a window, and then later I came along and packed a menu bar at the
      top.  OK - this is a bad
      thing to do - but see the symptom!  Obviously I didn't intend to mix the
      two.

  ObservedBehavior:
  Hang - no window appeared; putting some debugging 'puts' in freed it up
      - but this seemed to be fairly random
      - I'm guessing there is a dodgy interaction with the event loop.

  DesiredBehavior:
  Error: Pack and grid used on same level (some reference to where they
      are being used)



  Should probably report an error. 
  -- 07/27/1999 redman


tkt_uuid: 220009ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 56. [grab]
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: X windows error on destruction of modal dialog window
comment:
  OriginalBugID: 2492 Bug
  Version: 8.0.5
  SubmitDate: '1999-08-03'
  LastModified: '1999-08-14'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 716
  OS: Solaris
  OSVersion: version 2.6
  Machine: Other
  ClosedDate: '1999-08-14'


  Name:
  David Tillman

  Extensions:
  BLT, Tix

  CustomShell:
  No

  Comments:
  The work-around is to delete all grab and grab release commands.
      Unfortunately, the program user can put the program in an unstable state
      if he takes actions on the main window while the dialog is open.

  ReproducibleScript:
  The scripts that create the main window and the dialog window are
      embedded in a C program using Embedded Tk.
      
      The main window is not modal; the dialog window is.  Both are toplevel
      windows with the dialog window being of -class Dialog.  It makes no
      difference whether the dialog is declared transient or not.
      
      Modality is specified by:
      
      set oldFocus [focus]
      focus $w
      grab $w
      tkwait variable $globalVar
      grab release $w
      focus $oldFocus
      destroy $w

  ObservedBehavior:
  Running on a Sun Ultrasparc II workstation (512 MB, Solaris 2.6, X11R6),
      and using the X-server resident on the Sun, the application quits and
      the main window blows away when the dialog window is destroyed (e.g.,
      following clicking on the OK button).  This error occurs a lot but not
      every time.  Accessing the application from an X-server on a PC (XVision
      X server) has never resulted in this behavior.  But accessing it on the
      Sun or on another Unix workstation (e.g., HP-UX 10.20) using that
      workstation's X server but running the application on the Sun will
      exhibit the problem.  The error message given in the terminal window is:
      
      X Error of failed request:  BadWindow (invalid Window parameter)
        Major opcode of failed request:  40 (X_TranslateCoords)
       Resource id in failed request:  0x3800156
      Serial number of failed request:  15898
        Current serial number in output stream:  15898
      
      If I delete the grab and grab release commands, the problem goes away
      (as does the window modality).

  DesiredBehavior:
  I should be able to construct modal windows per the instructions in B.B.
      Welch's book and not have the application crash following the
      destruction of the dialog window.  Note that all of the aforementioned
      steps (focus, grab, etc.) are wrapped in catch statements and no Tk
      error is reported.


tkt_uuid: 220010ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: arc_stippling on Win NT port or TK
comment:
  OriginalBugID: 2494 RFE
  Version: 8.0.5
  SubmitDate: '1999-08-03'
  LastModified: '1999-08-04'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2495
  OS: Windows NT
  Machine: X86
  ClosedDate: '1999-08-04'


  Name:
  Gary L. Snyder

  CVS:
  7/30/1999 4:00 PM EDT

  Extensions:
  BLT

  DesiredBehavior:
  Arc_Stippling support for filled circles, ovals, and polygons on Win NT
      port of
      TK.  We are still stuck on Tcl7.3/Tk3.6 WinNT port written by Gordon
      Chaffee 
      because of this limitation in later releases by Sun and Scriptics
      Corporation.


tkt_uuid: 220011ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 08. [(label)frame] and [toplevel]
priority: 1 Zero
foundin: obsolete: 8.2b2
resolution: Duplicate
title: garbage pixels left in very narrow frames
comment:
  OriginalBugID: 2519 Bug
  Version: 8.2b2
  SubmitDate: '1999-08-10'
  LastModified: '1999-11-12'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3596
  OS: Windows NT
  OSVersion: 4.0sp5
  Machine: X86
  ClosedDate: '1999-11-12'


  Name:
  vince darley

  ReproducibleScript:
  Source the following script into Tk (any version 8.x should show the
      bug, at least on Windows)
      
      frame .in
      set in .in
      
      proc prettify str {
          set a [string toupper [string index $str 0]]
          regsub -all { *([A-Z])} [string range $str 1 end] { \1} b
          append a $b
      }
      
      foreach {label vars} {
          Customers {deathProbability selfMotivatedChoiceProb}
          Sellers {sellerOptimism atLeastAdvise}
      } {
          set frame "${in}.[string tolower $label]"
          frame $frame -relief flat -bd 3
          grid $frame -sticky ew -columnspan 2
          grid columnconfigure $frame 0 -weight 1
          label $frame.l$label -text $label -font bold -anchor w
          entry $frame.e$label -textvariable [string tolower $label]
          grid $frame.l$label $frame.e$label -sticky ew
          eval lappend allLabels $vars
          lappend allLabels [string tolower $label]
          foreach label $vars {
      label $frame.l$label -text [prettify $label] -anchor e
      entry $frame.e$label -textvariable $label
      grid $frame.l$label $frame.e$label -sticky ew
          }
          frame $frame.blah -width 200 -height 3 -relief groove -bd 3
          grid $frame.blah -columnspan 2 
      }
      foreach label Iterations {
          label ${in}.l$label -text $label -anchor w
          entry ${in}.e$label -textvariable [string tolower $label]
          grid ${in}.l$label ${in}.e$label -sticky ew
      }
      frame ${in}.c
      grid ${in}.c -columnspan 2 
      pack .in
      update

  ObservedBehavior:
  Now, notice how the 'wish' window contains two long but narrow
      separators: thin grooves separating different parts of the contents.
      The bug is that garbage pixels are left behind in the middle of those
      grooves.  To show the bug, grab any other window (e.g. the Tk console)
      and wave it around over the 'wish' window.  Notice how in the middle of
      those grooves, individual pixels are left behind when the window moves
      away (they should presumably be redrawn by Tk). 
      
      I assume somewhere in Tk, there's an 'off by 1' bug causing Tk to make
      the decision not to redraw the middle of the groove (which is only of
      width 3 pixels).

  DesiredBehavior:
  The groove should not accumulate random pixels from whatever used to be
      on top of it.



  Bug verified with 8.2.0.  It appears that the frame may not be
  properly doing redraws, or catching the redraw request. 
  -- 08/20/1999 hobbs


tkt_uuid: 220012ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 33. Generic Dialog Support
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Misbehaviour of common dialog boxes on Windows 9x/NT if multiple toplevels are used.
comment:
  OriginalBugID: 2589 RFE
  Version: 8.2
  SubmitDate: '1999-08-20'
  LastModified: '2000-01-29'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 602
  OS: Other
  Machine: NA
  ClosedDate: '2000-01-29'


  Name:
  Christian Werner

  Comments:
  I think this is a long standing bug which appeared in Tcl/Tk 8.0 when
      native look-and-feel was invented.
      
      The problem  would disappear if the call of
      Tcl_SetServiceMode(TCL_SERVICE_ALL) would be removed before
      the Win32 API function MessageBox() is called (but then no redraws of
      other windows take place while the dialog
      box is open).
      
      An (IMHO unacceptable) workaround on Win32 is not to have more than one
      toplevel per application.

  ReproducibleScript:
  proc mktop w {
          if {[string length $w]} {
              set top [toplevel $w]
          } else {
              set top .
          }
          set bar [menu $w.menu]
          $top configure -menu $bar
          set m [menu $bar.menu]
          $bar add cascade -menu $m -label File
          $m add command -label "Hit Me" -command [list hitme $top]
          $m add command -label "Exit" -command [list destroy $top]
          button $w.button -text "Hit Me" -command [list hitme $top]
          pack $w.button -padx 20 -pady 20
      }
      proc hitme w {
          tk_messageBox -parent $w -type ok -title "Hit Me" -message "You hit
      me!"
      }
      foreach w {{} .t0 .t1 .t2 .t0.t1 .t0.t2 .t1.t1 .t2.t1} {
          mktop $w
      }
      
      # Invocation; (UNIX)           wish this-script
      #                   (Windows)     double-click in explorer
      #
      # Opens some toplevel windows where you can press a button or activate a
      menu item
      # in order to get a standard "ok" type dialog box. The dialog box should
      be application
      # modal which is not the case if run on windows.

  ObservedBehavior:
  UNIX: the script behaves as expected, ie the dialog boxes are modal
      (local grab).
      
      Windows 9X/NT:  the modality is restricted to the toplevel on whose
      behalf the dialog box is popped up.
      If a menu is torn off before the "Hit Me" button is pressed, another
      dialog box can be opened by activating the
      tear off menu. Sometimes an application crash happens if the main
      toplevel window (= .) is closed.
      
      MacOS: not tested

  DesiredBehavior:
  As the documentation of "tk_dialog" states:
      
      While waiting for the user to respond, tk_dialog sets a local grab.
      This prevents the user from interacting with the application in any way
      except to invoke the dialog box.



  The user cites the tk_dialog docs when complaining about the
  tk_messageBox.  Indeed, tk_dialog does set an application level
  grab, as the docs say, but tk_messageBox does not, nor do the
  docs for it claim to.  I am dup'ing this to 602, which is an
  RFE for a -modal switch on Windows that would take care of this. 
  -- 01/29/2000 hobbs


tkt_uuid: 220013ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 16. [scrollbar]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Scrollbars under windows don't have correct size if created with sizes other than default
comment:
  OriginalBugID: 2621 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-12-14'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3593
  OS: Windows NT
  OSVersion: 4.0 SP4
  Machine: X86
  ClosedDate: '1999-12-14'


  Name:
  Giorgos Petasis

  ReproducibleScript:
  scrollbar .s -width 300
      pack .s

  ObservedBehavior:
  When the scrollbar gets packed, the . window gets resized to the correct
      size (arround 300) but the scrollbar remains 
      to its default size. Only when you resize the main window horizonatlly
      gets the requested size. The same behaviour occurs
      in the vertical derection, using -height in the scrollbar creation
      command....
      This happen under all windows (95, 98, NT 4.0 SP5)

  DesiredBehavior:
  When the scrollbar gets displayed, should have the requested size.


tkt_uuid: 220014ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 12. Unix Menus
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Tk crashes if you keep resizing menu bars with mouse
comment:
  OriginalBugID: 2622 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '2000-01-07'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3377
  OS: Solaris
  Machine: Other
  ClosedDate: '2000-01-07'


  Name:
  Giorgos Petasis

  ReproducibleScript:
  Just start the Tk demo, and select the menu demo. Try to minimise the
      menu bar. If you keep for a while, enlarging and minimasing the 
      menu bar, at the end will get the following X error:
      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:  14043
        Current serial number in output stream:  14044 
      
      This happen under Solaris 2.6 and Redhat Linux 6.0, although it is far
      easier to get this error under linux than solaris...


tkt_uuid: 220015ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: wish82 + operating system crash on NT
comment:
  OriginalBugID: 2644 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-08-31'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2645
  OS: Windows NT
  OSVersion: 4.0 SP5
  Machine: X86
  ClosedDate: '1999-08-31'


  Name:
  Markus Maier

  ReproducibleScript:
  this more a Windows-NT bug then a wish82 bug:
      The following TCL Application will crash wish81/82 on Windows 9x and
      will cause a bluescreen (!) on Windows-NT 4.0 (Service Pack 5).
      
      Instructions:
      (Warning: Save all your files before trying it on NT!)
      
      - save the attached script in a file "crash.tcl"
      - open a wish console and type in "source crash.tcl"
      - open the "crash ..." cascade menu on the upper left border of the
      screen.
      - An Error Message Dialog Window will occur,
        on NT you'll not be able to press the OK button.
      - Click on the background or on any other (non-wish) Window.
      - Click on the Error Message Window again, press the OK button, till the
        Error Message Dialog Window disappears.
      - Save all your files
      - Change to the wish console window and type in "exit"
      
      here is the script:
      
      set m .crash
      catch { destroy $m }
      set m [menu $m -tearoff 0]
      set submenu $m.sub
      $m add cascade -label "Crash..." -menu $submenu
      menu $submenu -tearoff 0
      
      bind $m <<MenuSelect>> { 
          yes-it-is-just-an-invalid-command
      }
      
      tk_popup $m 0 0

  ObservedBehavior:
  on Win95 wish82 crashes (sometimes)
      on WinNT the operating system crashes (bluescreen), I was able to
      reproduce that on 2 different NT machines.

  DesiredBehavior:
  Error Message (without system crash :-))


tkt_uuid: 220016ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Rotating Text in Canvas Widget
comment:
  OriginalBugID: 2652 RFE
  Version: 8.0p2
  SubmitDate: '1999-08-31'
  LastModified: '2000-01-12'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 971
  OS: Windows NT
  OSVersion: 4.0 SP-4
  Machine: X86
  ClosedDate: '2000-01-12'


  Name:
  Burl Goree

  DesiredBehavior:
  I would like the ability to rotate test and have it displayed
      vertically.  The only way I'm able to accomplish this currently is to
      create a trasparent gif (using other software) of the text I would want
      to rotate.  Are there any plans to add the ability to display text
      vertically or rotate a text object?


tkt_uuid: 220017ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: GetCursorFromObj called with non-existent cursor!
comment:
  OriginalBugID: 2675 Bug
  Version: 8.2
  SubmitDate: '1999-08-31'
  LastModified: '1999-08-31'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2562
  OS: All
  Machine: X86
  FixedInVersion: 8.2.1
  ClosedDate: '1999-08-31'


  Name:
  Nick Reingold

  Comments:
  This behavior occurs on UNIX (SGI) and NT.  It does not happen for 8.1
      on SGI.

  ReproducibleScript:
  Start Wish and execute these lines:
      
        menu .mb
        string length [.mb cget -cursor]
        exit
      
      Wish aborts with error message "GetCursorFromObj called with
      non-existent cursor!"

  ObservedBehavior:
  Wish crashes on exit.

  DesiredBehavior:
  Wish should not crash on exit.



  Already fixed by previous bug report, set for 8.2.1/8.3 release. 
  -- 08/31/1999 hobbs


tkt_uuid: 220018ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 1 Zero
foundin: obsolete: 8.0p2
resolution: Duplicate
title: Numeric Key Pad bindings do not work as expected
comment:
  OriginalBugID: 2680 Bug
  Version: 8.0p2
  SubmitDate: '1999-09-01'
  LastModified: '2000-04-03'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 1810
  OS: Solaris
  OSVersion: 2.5.1 (SunOS 5.5.1 Generic_103640-24)
  Machine: Other
  ClosedDate: '2000-04-03'


  Name:
  Raymond Steele

  Comments:
  Please review all funtions related to the numeric Key Pad and its
      interface.  If this turns out to be an
      OS bug please let me know.  I've asked for the auto post for the news
      group.  If anyone else has an
      answer to this please email me directly since I will probably not visit
      the news group posting often
      enough to catch a posting.  Thanks in advance.

  ReproducibleScript:
  #!/usr/local/bin/wish
      #########################################################################
      ##
      ##
      ##      This is a utility that displays keysyms to stdout.
      ##      The KeyRelease is needed because of a bug.
      ##      The bug also does not allow keysyms for KP_4, Left, KP_6,
      ##      and Right to be displayed. Furthermore, NumLock doesn't 
      ##      work as expected.  
      ##
      ##      This code was submitted as a bug report at the end of Aug `99
      ##
      ##      Raymond Steele 
      ##      rsteele@ieee.org
      ##
      #########################################################################
      ##

      set help_msg {
      This is a keysym generation test.
      }
      #########################################################################
      ##
      ## Display window
      #########################################################################
      ##
      frame    .msg         -bg lightblue -borderwidth 5 -relief ridge  
      message  .msg.helpmsg -justify left -text $help_msg -bg lightblue  -font {fixed 12 bold } -aspect 1000
      pack     .msg         -fill both -side top 
      pack     .msg.helpmsg

      frame    .control     -bg lightblue -borderwidth 10 
      pack     .control     -side bottom -fill both  -expand true

      button   .control.exit   -text exit -command Quit  -font {fixed 12 bold}  -bg lightblue -activebackground lightblue

      entry    .control.entry1 -textvariable typed -background white  -borderwidth 2 -relief sunken  -width 40  -font "fixed 12"
      bind     .control.entry1 <Left> {%W insert insert 4} 
      bind     .control.entry1 <KeyRelease> {%W icursor end} 
      bind     .control.entry1 <Key> {
  puts stdout {keycode: %k}; 
  puts stdout {printing character: %A}; puts stdout {keysym: %K};
  puts stdout {}
      } 
      bind     .control.entry1 <Right> {%W insert insert 6} 
      pack     .control.entry1 -expand true 
      pack     .control.exit   -expand false 

      focus .control.entry1
      #########################################################################
      ##
      ## Window Mangager Directives 
      #########################################################################
      ##
      wm protocol . WM_DELETE_WINDOW Quit
      wm title . "Keysym Utility"
      wm geometry . +500+400

      proc Quit {} {
          global typed

          puts stdout "You typed the following line:"
          puts stdout $typed
          exit
      }

      Run this script.  Type every button on the numeric key pad.  Observe
      entry and stdout.  If you remove
      the key bindings for Left, Right and . , you cannot enter 4, 6 or . in
      the entry using the numeric key pad.
      even if NumLock in on.

  ObservedBehavior:
  Although it is possible to edit the entry with the numeric key pad,
      there are unexpected results.  No
      keysym is generated for what should be Left, KP_4, Right, KP_6.  Keysyms
      generated for all key pad
      keys remain the same regardless of the NumLock key.  The most annoying
      thing is the Left key.  It 
      insists on moving the cursor back one character after a 4 is typed.
      This is the reason for the
      <KeyRelease> binding in the sample script.  When running the script,
      notice that the cursor jumps
      back and forth when a 4 is typed on the numeric key pad.  This works
      well enough, but I believe that
      future applications I write will have conflicts because of this strange
      behavior and lack of keysym 
      generation.

  DesiredBehavior:
  I should get KP_4 as a keysym when NumLock is on and the 4 of the
      numeric keypad is pressed.
      Furthermore, the cursor should not move back one character under these
      conditions.

      Also, note that besides no KP_6 keysym.  a Delete keysym should change
      to a . when NumLocks
      is on.  This same behavior is a problem for other keys as well but this
      bug report is primarily for 
      KP_4 and KP_6.

      The sample script includes a work around.  If the Left , Right and
      Delete key bindings are removed
      You cannot type a 4, 6 or . on the keypad and see a 4, 6 or a .  being
      entered in the entry.


tkt_uuid: 220019ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: ldAix
comment:
  OriginalBugID: 2685 Bug
  Version: 8.2
  SubmitDate: '1999-09-01'
  LastModified: '1999-09-15'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2624
  OS: AIX
  OSVersion: 4.3
  Machine: RS6000
  ClosedDate: '1999-09-15'


  Name:
  LE FUR Jean-Francois

  Extensions:
  tcl8.2.0

  CustomShell:
  no

  ReproducibleScript:
  ./configure is O.K
      
      make

  ObservedBehavior:
  /export/produits/.../tk8.2.0/unix/ldAix :  not found
       when trying to create libtk8.2.so


tkt_uuid: 220020ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Duplicate
title: icon appears in 'tk_messageBox' even if not specifed
comment:
  OriginalBugID: 2690 Bug
  Version: 8.1
  SubmitDate: '1999-09-02'
  LastModified: '1999-10-22'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2219
  OS: Windows NT
  OSVersion: V4 SP4
  Machine: X86
  ClosedDate: '1999-10-22'


  Name: mike bradshaw

  ReproducibleScript:
  using the 1 line script under wish8.1 on Win NT4 SP4, when executed it
      produces a dialog as expected, but with the information icon present,
      when according to the online help ther should be no icon. This also
      occurs with a one line script launched using a double click in explorer.
       tk_messageBox -message test

  DesiredBehavior:
  the message box to appear with no icon


tkt_uuid: 220021ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Tk text widget doesn't correctly handle multi-byte chars in regexp searches
comment:
  OriginalBugID: 2708 Bug
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: '1999-12-09'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3839 2582
  OS: Windows NT
  OSVersion: 4.0sp5
  Machine: X86
  ClosedDate: '1999-12-09'


  Name:
  Vince Darley

  ReproducibleScript:
  text .t
      pack .t
      # inserts 5 a's, a bullet, an X and 5 more a's (on Windows at least)
      .t insert 1.0 "aaaaa\u2022Xaaaaa\n"
      # same thing but without a multi-byte char
      .t insert 2.0 "aaaaauXaaaaa"
      set res [.t search -backwards -count count -regexp {.X} 2.0]
      set got [.t get $res "$res + ${count}c"]
      puts stdout "Found $count chars at $res, which were '$got'"
      set res [.t search -backwards -count count -regexp {.X} 3.0]
      set got [.t get $res "$res + ${count}c"]
      puts stdout "Found $count chars at $res, which were '$got'"

  ObservedBehavior:
  The result on stdout is:
      
      Found 2 chars at 1.6, which were 'Xa'
      Found 2 chars at 2.5, which were 'uX'
      
      since the regexp in question is {.X} the first of these two results is
      clearly wrong.

  DesiredBehavior:
  I expect to see (where '*' is a bullet on Windows):
      
      Found 2 chars at 1.5, which were '*X'
      Found 2 chars at 2.5, which were 'uX'


tkt_uuid: 220022ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: "wm transient" maps a toplevel
comment:
  OriginalBugID: 2710 Bug
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: '1999-10-22'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 572
  OS: Windows 98
  Machine: X86
  ClosedDate: '1999-10-22'


  Name:
  Tim Baker

  ReproducibleScript:
  % toplevel .topa
      % wm withdraw .topa
      % toplevel .topb
      % wm withdraw .topb
      % update
      % wm transient .topb .topa

  ObservedBehavior:
  The second toplevel .topb becomes mapped, even  though the master window
      .topa is unmapped.
      This is with Tk 8.2.0 on Windows 98.

  DesiredBehavior:
  The transient window should be mapped or unmapped like the master
      window, in this cased unmapped.


tkt_uuid: 220023ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Inserting to text widget core dumps
comment:
  OriginalBugID: 2716 Bug
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: '1999-09-10'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2316
  OS: AIX
  OSVersion: 4.3
  Machine: RS6000
  ClosedDate: '1999-09-10'


  Name:
  Adrian Wallaschek

  Extensions:
  None Just Tcl/Tk

  CustomShell:
  None

  Comments:
  AIX clsdev 3 4 000928804C00
      
      I am using xlC_r7 or cc, but it does not make a difference!
      So consider the compiler to be xlC 3.6 (IBM C & C++ Set)

  ReproducibleScript:
  text .t
      pack .t
      .t insert end "bldfl"

  ObservedBehavior:
  Segmentation fault in TkTextPixelIndex at 0x100f3cf8 ($t1)
      0x100f3cf8 (TkTextPixelIndex+0x140) 901c0008        stw   r0,0x8(r28)
      (dbx) where
      TkTextPixelIndex() at 0x100f3cf8
      TkTextPickCurrent() at 0x100f61f8
      DisplayText() at 0x100f0f74
      TclServiceIdle() at 0x100472fc
      Tcl_DoOneEvent() at 0x10047fdc
      Tk_MainLoop() at 0x1007afec
      Tk_MainEx() at 0x10079950
      main() at 0x10000344

  DesiredBehavior:
  When making use of the text widget (insert) under whatever condition the
      program crashes. Tried with constant, variables, etc. but the stacktrace
      seems to show there is a problem with a lower level routine (display)
      ?!?
      
      I had something like this already before but obviously it persists also
      in 8.2!
      
      I'd consider any suggestion, because like this Tk is not usable for me!



  This is a known problem with some configurations of AIX, and
  may have something to do with the ckalloc(0) problem on AIX.
   
  -- 09/10/1999 hobbs


tkt_uuid: 220024ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Destroying a scale widget in which the cursor has been configured causes Tk to panic.
comment:
  OriginalBugID: 2725 Bug
  Version: 8.2
  SubmitDate: '1999-09-10'
  LastModified: '1999-12-20'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3897 2959 3374
  OS: All
  OSVersion: UnixWare 2.1.2, Windows 95
  Machine: NA
  ClosedDate: '1999-12-20'


  Name: Chris Reuter

  Comments:
  The bug is reproducable under windows 95 (binary distribution
      from Scriptics) and UnixWare 2.1.2.  Under UnixWare, it occurs
      on both version 8.2.0 and 8.1.1 of Tcl/Tk.
      
      The UnixWare debugger gives the following stack trace:
      
      [9] _kill(0x6791, 0x6)  [0xbffb3783]
      [8] abort(0xbfffd434, 0xbfffd434, 0xbff850c0, 0xbfffd434, 0x80d98bc,
      0x80e4ec8, 0x82f8e98, 0x83035b0, 0xbff30e28, 0x8044a90, 0x806a9e7, 0,
      0x4c00022) [0xbffe3523]
      [7] Tcl_PanicVA(presumed: 0x80d98bc, 0x8044a5c, 0x80e4ec8)
      [0xbff67782]
      [6] Tcl_Panic(0x80d98bc)        [0xbff677d8]
      [5] Tk_FreeCursor(display=0x0, cursor=0x4c00022)
      [./../generic/tkCursor.c@526]
      [4] FreeResources(optionPtr=0x82b1e20, objPtr=0x0, internalPtr=""",
      tkwin=0x0)  [./../generic/tkConfig.c@1593]
      [3] Tk_FreeConfigOptions(recordPtr="", optionTable=0x82b1d68, tkwin=0x0)
             [./../generic/tkConfig.c@1496]
      [2] DestroyScale(memPtr="", presumed: 0x8044b28, 0x80e4ec8)
      [./../generic/tkScale.c@551]
      [1] Tcl_EventuallyFree(0x82f8db8, 0x8094a84)    [0xbff6eaa9]
      [0] ScaleEventProc()    [./../generic/tkScale.c@1032]

  ReproducibleScript:
  scale ._check_
      ._check_ configure -cursor arrow
      destroy ._check_

  ObservedBehavior:
  Under UnixWare, the error message is:
      
      Tk_FreeCursor called before Tk_GetCursor
      ABORT instruction
      
      Under Windows95, it reports a page fault.  The stack trace doesn't
      look like the page fault was produced by the abort() function.

  DesiredBehavior:
  Sucessful destruction of the widget.



  This comes from line 1592/3 of tkConfig.c, where tkwin is NULL,
  but we want to pass the display for it in.  You can check against
  NULL, but that might not be appropriate (might leave a mem leak). 
  -- 09/21/1999 hobbs
  However, it happens for scales, but not entries.  Reproducable
  on NT and Solaris. 
  -- 09/21/1999 hobbs
  Further evaluation shows that it seems to be in the way that
  scale set up for destruction.  They set scalePtr->tkwin to NULL,
  whereas entries set a flag that they are being deleted. 
  -- 09/21/1999 hobbs


tkt_uuid: 220025ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: performance signifcantly degraded as toplevel windows are created and destroyed
comment:
  OriginalBugID: 2824 Bug
  Version: 1.2
  SubmitDate: '1999-09-17'
  LastModified: '2000-01-25'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3220
  OS: IRIX
  OSVersion: IRIX64 Release 6.5
  Machine: Other
  ClosedDate: '2000-01-25'


  Name:
  Jamie Hecker

  ReproducibleScript:
  prowish80

      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"

      }
      test

  ObservedBehavior:
  some numbers from test case, plus other tests:
      in ProWish:

      canvas + canvas window w/widgets

      with update idletasks:

       0: 261930 microseconds per iteration
      99: 1830730 microseconds per iteration

      without update idletasks:

       0: 218885 microseconds per iteration
      99: 667507 microseconds per iteration

      -------------------------------------

      canvas

      with update idletasks:
       0: 91939 microseconds per iteration
      99: 100183 microseconds per iteration

      without update idletasks:
       0: 29581 microseconds per iteration
      99: 23144 microseconds per iteration

      -------------------------------------

      frame w/widgets

      with update idletasks:

       0: 197152 microseconds per iteration
      99: 750818 microseconds per iteration

      without update idletasks:

       0: 86721 microseconds per iteration
      99: 656355 microseconds per iteration

      -------------------------------------

      the numbers indicate that it is taking around 7 times as long to
      construct and destroy the window when using Prowish80.  The 100th window
      also fells (from a user standpoint) around 7 times slower when using.
      In more complicated examples with scrolling canvases, multiple widgets
      etc, it is nearly impossible to scroll without multiple second update
      times (when these windows are first created they work interactively).
      It should be noted that Wish80 and itkwish3.0 do not exibit this
      behavior.  On some of our apps, they become unusable after an hour or so
      of real world usage.  This is unacceptable.

  DesiredBehavior:
  In both Wish8.0 and itkwish3.0 there is little if any performance
      degredation.   Even when the windows take slightly longer to create,
      there appears to be no perfomance hit when interacting with the widgets.
       Is there any fixes for these problems?  The problems also exist in our
      wrapped applications


tkt_uuid: 220026ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: wm geometry Unix/Windows discrepancy
comment:
  OriginalBugID: 2856 Bug
  Version: 8.2
  SubmitDate: '1999-09-21'
  LastModified: '2000-01-06'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3687
  OS: Other
  Machine: NA
  FixedInVersion: 8.3b1
  ClosedDate: '2000-01-06'


  Name: Hume Smith

  ReproducibleScript:
  #!/usr/bin/env wish
      
      # this window appears in the upper-left corner on my Win'95 machine,
      # and (almost) centered in Unix
      # wish 8.2
      
      wm overrideredirect . 1
      wm withdraw .
      button .close -text Close -command exit
      pack .close
      update
      wm geometry . +[expr {[winfo screenwidth .]/2}]+[expr {[winfo
      screenheight .]/2}]
      wm deiconify .
      
      # eof

  ObservedBehavior:
  did different things on the two platforms

  DesiredBehavior:
  ought to do the same thing on both platforms

  Patch:


  PatchFiles:




  The patch for this was in 3687 and was applied for 8.3b1. 
  -- 01/06/2000 hobbs


tkt_uuid: 220027ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.0p2
resolution: Duplicate
title: Memory Problem while running the Tcl/Tk script
comment:
  OriginalBugID: 2875 RFE
  Version: 8.0p2
  SubmitDate: '1999-09-23'
  LastModified: '2000-01-25'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3220
  OS: Linux-SuSE
  Machine: Other
  ClosedDate: '2000-01-25'


  Name:
  Kulkarni Vivek

  DesiredBehavior:
  Can you tell me about - how to manage memory in Tcl/Tk as I am having a
      lot of procedures in the 
      Tcl/Tk. It creates problem while running it. I am building GUI and I am
      showing some moving things in that. As number of moving objects on the
      screen increases the GUI slows down considerably.
      What can be done in this case? Shall I send the script to you so that
      you can have a look at it.


tkt_uuid: 220028ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Duplicate
title: tk_messageBox freezes on Windows
comment:
  OriginalBugID: 2892 Bug
  Version: 8.2
  SubmitDate: '1999-09-24'
  LastModified: '2000-01-29'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1212
  OS: Windows 98
  Machine: X86
  ClosedDate: '2000-01-29'


  Name:
  Frederic BONNET

  Comments:
  This script was picked on the french Tcl newsgroup (fr.comp.lang.tcl). I
      am not the original author.
      The workaround is to call update just before tk_messageBox. So I believe
      it is something related to Tk's event loop.

  ReproducibleScript:
  wm title . "Test"
      frame .frame
      pack .frame 
      button .frame.quit -text "Quit" -command exit
      pack .frame.quit
      tk_messageBox -message "So?" -type ok

  ObservedBehavior:
  On Windows, Tk correctly displays the message box, but after clicking ok
      the Tk window is frozen. It is reported to work on Unix.

  DesiredBehavior:
  Tk doesn't freeze ;-)



  The work-around is to do an 'update' before the messageBox call.
  The suspected problem is that, in this situation where a native
  Windows dialog box is called, the Windows event loop kicks in
  first and causes Tk's to choke.  The 'update' prevents this. 
  -- 09/28/1999 hobbs


tkt_uuid: 220029ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 84. Unix Build
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title:
  Tk8.2.0/unix  ldAix-script does not exist for RS6000. After configure tk8.2, then run make will produce the error no idAix file found

comment:
  OriginalBugID: 2916 Bug
  Version: 8.2
  SubmitDate: '1999-09-27'
  LastModified: '1999-09-28'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2917
  OS: Other
  Machine: NA
  ClosedDate: '1999-09-28'


  Name:
  Sang-Lung CHAN

  CustomShell:
  Aix 4.2.1


tkt_uuid: 220030ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: segfault when you call destroy
comment:
  OriginalBugID: 2959 Bug
  Version: 8.2
  SubmitDate: '1999-09-28'
  LastModified: '1999-11-04'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hershey
  RelatedBugIDs: 2725
  OS: Solaris
  OSVersion: 5.5.1 Generic_103640-24 sun4u sparc SUNW,Ultra-1
  Machine: Other
  ClosedDate: '1999-11-04'


  Name:
  Philippe KERLIRZIN

  ReproducibleScript:
  > /usr/local/packages/tcltk8.2/bin/wish8.2
      % scale .s -cursor watch
      .s
      % destroy .s
      Segmentation fault (core dumped)
      >


tkt_uuid: 220031ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.1
resolution: Invalid
title: a
comment:
  OriginalBugID: 2961 Bug
  Version: 8.1
  SubmitDate: '1999-09-28'
  LastModified: '1999-11-03'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2962
  OS: Other
  Machine: NA
  ClosedDate: '1999-11-03'


  Name:
  Hermann G. Striecks


tkt_uuid: 220032ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: Tk crashes on exit when menus are deleted/recreated
comment:
  OriginalBugID: 3237 Bug
  Version: 8.0.5
  SubmitDate: '1999-10-28'
  LastModified: '1999-10-29'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3236
  OS: Windows NT
  Machine: X86
  ClosedDate: '1999-10-29'


  Name:
  Sammy Nachimuthu

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

  CustomShell:
  Refer to section 9.

  Comments:
  The fix only removes the NULL crash. It is better to fix the place where
      the NULL pointer is generated.

  ReproducibleScript:
  When the menu entries which has sub-menus are deleted and recreated on
      the same name, the TK crashes on exit.

  ObservedBehavior:
  The error message says: "The instruction at "0x0045bda" referenced
      memory at "0x00000000". The memory could not be "read"". When I ran with
      the tk8.0.5 debug version of the source code, the error was located in
      the following location of DoConfig function in tkConfig.c file.

      if ((*value == 0) && (specPtr->specFlags & TK_CONFIG_NULL_OK)) {
      nullValue = 1;
          }

  DesiredBehavior:
  Fix the error where the NULL value is created.

  Patch:
  The following fix in DoConfig function of tkConfig.c removed the NULL pointer crash.

      if ((value == NULL) && (specPtr->specFlags & TK_CONFIG_NULL_OK)) {
  nullValue = 1;
      } else if ((*value == 0) && (specPtr->specFlags & TK_CONFIG_NULL_OK)) {
  nullValue = 1;
      }

  PatchFiles:
  generic\tkConfig.c


tkt_uuid: 220033ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Tk make test failure report
comment:
  OriginalBugID: 3340 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-23'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: jenn
  RelatedBugIDs: 2181
  OS: Solaris
  OSVersion: 2.6
  ClosedDate: '1999-11-23'


  Name: Larry W. Virden

  Comments:
  I have ran these tests several times and get the same error each time.
      
      This is the version of Tk from the tar file on Scriptic's ftp site.

  ReproducibleScript:
  make test

  ObservedBehavior:
  Two test suite entries report failures:
      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

  DesiredBehavior:
  all tests pass


tkt_uuid: 220034ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Windows static libraries
comment:
  OriginalBugID: 3358 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-25'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3647
  OS: Windows 95
  ClosedDate: '2000-01-25'


  Name:

  Jan Nijtmans



  ReproducibleScript:

  When compiling Tk8.2.1 as static library on Windows, a few problems show

      up.

      

      - The function TkWinXInit() needs to be called upon initialization. Of

      course it

        is possible to add this call to tclAppInit.c, but it would be more

      consistant

        (read: platform-independant) if the library took care of that (as Tcl

      does).

      - The function DllMain() is included in the static library, which is a

      problem

        when trying to link the library in another dll. Taking it out is not

        possible, because TkWinGetPlatformId() is in the same file.

        Solution: move TkWinGetPlatformID() to tkWinX.c, which would

        be a more logical place anyway. Then tkWin32Dll.c can be

        left out of the static library.

      - gcc 2.95 uses the DllMain function, not DllEntryPoint (as VC++).

        Why not combine  the DllMain and DllEntryPoint functions to a

        single one? For Borland, a macro suffices to handle the name

      difference.



  Patch:

  *** generic/tkWindow.c.origWed Apr 21 23:53:28 1999

  --- generic/tkWindow.cSat Sep 25 19:39:12 1999

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

  *** 21,26 ****

  --- 21,29 ----

    #if !defined(__WIN32__) && !defined(MAC_TCL)

    #include "tkUnixInt.h"

    #endif

  + #if defined(__WIN32__)

  + #include "tkWinInt.h"

  + #endif

    

    

    typedef struct ThreadSpecificData {

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

  *** 2709,2714 ****

  --- 2712,2727 ----

        Tcl_DString class;

        ThreadSpecificData *tsdPtr;

        

  + #if defined(__WIN32__) && defined(STATIC_BUILD) && !defined(NO_STATIC_INIT)

  +     /*

  +      * If we are in a statically linked executable, then we need to

  +      * explicitly initialize the Windows function tables here since

  +      * DllMain() will not be invoked.

  +      */

  + 

  +     TkWinXInit(GetModuleHandle(NULL));

  + #endif

  + 

        /*

         * Ensure that we are getting the matching version of Tcl.  This is

         * really only an issue when Tk is loaded dynamically.

  *** win/tkWin32Dll.c.origFri Apr 16 03:51:48 1999

  --- win/tkWin32Dll.cSat Sep 25 19:33:35 1999

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

  *** 13,26 ****

    

    #include "tkWinInt.h"

    

  ! static int tkPlatformId;

    

  - /*

  -  * The following declaration is for the VC++ DLL entry point.

  -  */

  - 

  - BOOL APIENTRYDllMain _ANSI_ARGS_((HINSTANCE hInst,

  -     DWORD reason, LPVOID reserved));

    

    /*

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

  --- 13,22 ----

    

    #include "tkWinInt.h"

    

  ! #if defined(_MSC_VER) || defined(__GNUC__)

  ! #define DllEntryPoint DllMain

  ! #endif

    

    

    /*

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

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

  *** 32,63 ****

     *routine.

     *

     * Results:

  !  *See DllMain.

  !  *

  !  * Side effects:

  !  *See DllMain.

  !  *

  !  *----------------------------------------------------------------------

  !  */

  ! 

  ! BOOL APIENTRY

  ! DllEntryPoint(hInst, reason, reserved)

  !     HINSTANCE hInst;/* Library instance handle. */

  !     DWORD reason;/* Reason this function is being called. */

  !     LPVOID reserved;/* Not used. */

  ! {

  !     return DllMain(hInst, reason, reserved);

  ! }

  ! 

  ! /*

  !  *----------------------------------------------------------------------

  !  *

  !  * DllMain --

  !  *

  !  *DLL entry point.

  !  *

  !  * Results:

  !  *TRUE on sucess, FALSE on failure.

     *

     * Side effects:

     *None.

  --- 28,34 ----

     *routine.

     *

     * Results:

  !  *TRUE on success, FALSE otherwise.

     *

     * Side effects:

     *None.

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

  *** 66,77 ****

     */

    

    BOOL APIENTRY

  ! DllMain(hInstance, reason, reserved)

  !     HINSTANCE hInstance;

  !     DWORD reason;

  !     LPVOID reserved;

    {

  -     OSVERSIONINFO os;

    

        /*

         * If we are attaching to the DLL from a new process, tell Tk about

  --- 37,47 ----

     */

    

    BOOL APIENTRY

  ! DllEntryPoint (

  !     HINSTANCE hInstance,/* Library instance handle. */

  !     DWORD reason,/* Reason this function is being called. */

  !     LPVOID reserved)/* Not used. */

    {

    

        /*

         * If we are attaching to the DLL from a new process, tell Tk about

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

  *** 80,119 ****

         */

        

        if (reason == DLL_PROCESS_ATTACH) {

  - os.dwOSVersionInfoSize = sizeof(os);

  - GetVersionEx(&os);

  - tkPlatformId = os.dwPlatformId;

  - 

            TkWinXInit(hInstance);

        } else if (reason == DLL_PROCESS_DETACH) {

            TkWinXCleanup(hInstance);

        }

        return(TRUE);

    }

  - 

  - /*

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

  -  *

  -  * TkWinGetPlatformId --

  -  *

  -  *Determines whether running under NT, 95, or Win32s, to allow 

  -  *runtime conditional code.

  -  *

  -  * Results:

  -  *The return value is one of:

  -  *    VER_PLATFORM_WIN32sWin32s on Windows 3.1. 

  -  *    VER_PLATFORM_WIN32_WINDOWSWin32 on Windows 95.

  -  *    VER_PLATFORM_WIN32_NTWin32 on Windows NT

  -  *

  -  * Side effects:

  -  *None.

  -  *

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

  -  */

  - 

  - int

  - TkWinGetPlatformId()

  - {

  -     return tkPlatformId;

  - }

  - 

  --- 50,58 ----

  *** win/tkWinX.c.origFri Jul  9 04:10:07 1999

  --- win/tkWinX.cSat Sep 25 19:33:35 1999

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

  *** 26,31 ****

  --- 26,32 ----

     */

    

    int tkpIsWin32s = -1;

  + static int tkPlatformId;

    

    /*

     * Declarations of static variables used in this file.

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

  *** 142,148 ****

    

        info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

        GetVersionEx(&info);

  !     tkpIsWin32s = (info.dwPlatformId == VER_PLATFORM_WIN32s);

    

        if (childClassInitialized != 0) {

    return;

  --- 143,150 ----

    

        info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

        GetVersionEx(&info);

  !     tkPlatformId = info.dwPlatformId;

  !     tkpIsWin32s = (tkPlatformId == VER_PLATFORM_WIN32s);

    

        if (childClassInitialized != 0) {

    return;

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

  *** 1132,1132 ****

  --- 1134,1161 ----

    }

  + 

  + /*

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

  +  *

  +  * TkWinGetPlatformId --

  +  *

  +  *Determines whether running under NT, 95, or Win32s, to allow 

  +  *runtime conditional code.

  +  *

  +  * Results:

  +  *The return value is one of:

  +  *    VER_PLATFORM_WIN32sWin32s on Windows 3.1. 

  +  *    VER_PLATFORM_WIN32_WINDOWSWin32 on Windows 95.

  +  *    VER_PLATFORM_WIN32_NTWin32 on Windows NT

  +  *

  +  * Side effects:

  +  *None.

  +  *

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

  +  */

  + 

  + int

  + TkWinGetPlatformId()

  + {

  +     return tkPlatformId;

  + }

  +



  PatchFiles:

  tkWindow.c tkWin32Dll.c tkWinX.c


tkt_uuid: 220035ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: application error depends on scripts file name
comment:
  OriginalBugID: 3372 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-12-22'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2691
  OS: Windows 95
  ClosedDate: '1999-12-22'


  Name:
  Jianmang Li

  Comments:
  8.2.1 compiles fine on Linux (with gcc, thread, share lib option), but
      it hang after a while. (I start widget demo, about a couple of seconds
      it hangs)

  ReproducibleScript:
  #!/bin/sh
      #exec wish "$0" "$@"
      eval destroy [winfo child .]
      wm title . "Demo"
      menu .menuBar -tearoff 0
      .menuBar add cascade -label "File" -menu .menuBar.file -underline 0
      menu .menuBar.file -tearoff 0
      .menuBar.file add command -label "Quit" -command "exit" -underline 0
      . configure -menu .menuBar

  ObservedBehavior:
  Name the above script to menu.tcl (other name won't product the error).
      start the program and place your place pointer at the bottom boundary
      then you will see a dialog with Error unkown option "-type"

  DesiredBehavior:
  This is on Windows 95 platform.  I can never imagine that an error is
      depends on the program's name.



  The problem occurs when confusion arises over class names.
  A script takes the root filename of the script as the class
  name for the primary toplevel.  Tk will then tie that in
  to known classes when creating the toplevel, so a toplevel
  will try to be configured with class Menu...

  As for the threaded Tk, this is known to cause problems, and
  8.2.3 has added a warning about this. 
  -- 12/22/1999 hobbs


tkt_uuid: 220036ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title:
  create a scale widget using -cursor attribute, core dump with panic "Tk_FreeCursor called before Tk_GetCursor"

comment:
  OriginalBugID: 3374 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-12'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2725
  OS: HP-UX
  OSVersion: HPUX 10.20
  ClosedDate: '1999-11-12'


  Name:
  Hormoz Rebati

  CVS:
  8/October/1999 10 am

  Extensions:
  BLT

  CustomShell:
  Have not modified anything

  Comments:
  Please resolve this as soon as possible.

  ReproducibleScript:
  toplevel .popup
      scale .popup.scale -label "No Of Repetitions" -from 0 -to 10000  -length 6c -width .3c  -resolution 1  -font {Helvetica -12 bold} -orient horizontal -tickinterval
      2000  -cursor crosshair

              pack .popup.scale -padx 1 -side top -fill x
      ...
              destroy .popup

      panics and aborts

  ObservedBehavior:
  Tk_FreeCursor called before Tk_GetCursor
      ABORT instruction

  DesiredBehavior:
  Expected to destroy the popup widget just like how it was with TK8.0.4


tkt_uuid: 220037ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Resized window grows smaller
comment:
  OriginalBugID: 3375 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-04-07'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4464 4353
  OS: Macintosh
  OSVersion: Swedish MacOS 8.6
  ClosedDate: '2000-04-07'


  Name:
  Johan Dahl

  Extensions:
  Tclapplescript

  ReproducibleScript:
  make a new toplevel window. Restrict resizing in one dimension
      
      % toplevel .w
      % wm resizable .w 0 1

  ObservedBehavior:
  If I know resizes it the nonresizable dimension grows one pixel smaller
      each time.

  DesiredBehavior:
  The nonresizable dimension should stay the same


tkt_uuid: 220038ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: Scale widget property -cursor hand2 is fatal
comment:
  OriginalBugID: 3403 Bug
  Version: 8.2
  SubmitDate: '1999-11-05'
  LastModified: '1999-11-12'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2725
  OS: Windows 95
  ClosedDate: '1999-11-12'


  Name:
  Jurge van Eijck

  ReproducibleScript:
  proc ScaleNoCurWindow {} {
      if [ winfo exists .demonocur ] {
      switch -exact -- [wm state .demonocur] {
      normal {
      wm iconify .demonocur
      wm deiconify .demonocur
       }
      iconic -
      withdrawn { wm deiconify .demonocur }
      }
      } else {
      toplevel .demonocur
      frame .demonocur.scale
      wm title .demonocur "Demo Scale WITHOUT -cursor hand2"

      scale .demonocur.scale.scale1 -from 1 -to 25 -length 200 -orient horizontal -label "Scale"
      pack .demonocur.scale.scale1 -side top -fill both -expand true 
      pack .demonocur.scale -side top -fill x 
      }
      }

      proc ScaleCurWindow {} {
      if [ winfo exists .democur ] {
      switch -exact -- [wm state .democur] {
      normal {
      wm iconify .democur
      wm deiconify .democur
       }
      iconic -
      withdrawn { wm deiconify .democur }
      }
      } else {
      toplevel .democur
      frame .democur.scale
      wm title .democur "Demo Scale WITH -cursor hand2"

      scale .democur.scale.scale1 -from 1 -to 25 -length 200 -orient horizontal -label "Scale" -cursor hand2

      pack .democur.scale.scale1 -side top -fill both -expand true 
      pack .democur.scale -side top -fill x 
      }
      }

      ## MAIN WINDOW
      # window title
      wm title . "Demonstrating Scale -cursor hand2 problem"

      # Top fram with Quit button
      frame .toprow -borderwidth 5 
      button .toprow.quit -text Quit  -borderwidth 2 -padx 1 -pady 1  -command
      exit
      pack .toprow.quit

      # buttons for calling the submenu's
      frame .submenus -borderwidth 5
      button .submenus.scale_cur -text "Scale Cursor" -width 20 -borderwidth 2
      -padx 1 -pady 1  -command ScaleCurWindow
      button .submenus.scale_nocur -text "Scale No Cursor" -width 20
      -borderwidth 2  -padx 1 -pady 1  -command ScaleNoCurWindow
      pack .submenus.scale_cur .submenus.scale_nocur -side top -pady 4

      # assemble the frame's
      pack .toprow 
      pack .submenus -side left

  ObservedBehavior:
  The script is giving a window with two buttons.
      Each button is opening a window with a scale widget on it.
      Only in one window the scale has the property cursor set to hand2.
      When closing this window a fatal error occurs and tcl/tk 8.2 crashes.
      This happens under Win95 and Solaris.

  DesiredBehavior:
  Window should be closed without any crash.


tkt_uuid: 220039ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Increasing times for function call 'update'
comment:
  OriginalBugID: 3410 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-25'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3220
  OS: Linux-SuSE
  ClosedDate: '2000-01-25'


  Name:
  Monika Holzammer

  CVS:
  27-Oct-1999

  ReproducibleScript:
  The following script can show you the increasing update times - you
      should call it from a terminal window to see the time measurement
      lines:

      #!/bin/sh
      # the next line restarts using wish  exec wish "$0" "$@"

      #
      -----------------------------------------------------------------------
      proc showWin {} {
          wm title . UPDATE-TEST

          set ftop [frame .ftop]
          pack $ftop -side top -expand yes
            set b_refresh [button $ftop.refresh -text "Refresh"  -command [list doRefresh .fbott]]
            set b_dlg [button $ftop.bdlg -text "Dialog" -command Show_Dialog]
            pack $b_refresh $b_dlg -padx 20 -pady 10

          set fbott [frame .fbott -width 300 -height 200]
          pack $fbott -side top -expand yes

          addFrames $fbott
      }

      #
      -----------------------------------------------------------------------
      proc addFrames {f} {
      global counter color

        # Add some element frames
        for {set i 0} {$i < 5} {incr i} {
          set fg [frame $f.fg$i -relief solid -bd 2]

          for {set j 0} {$j < 3} {incr j} {
            set fp [frame $fg.fp$j]
              set lab  [label $fp.lab -text "Name:" -anchor w]
              set ent  [entry $fp.ent -width 20]
              set butt [button $fp.butt -relief raised -bd 2 -text "?"]
              pack $lab $ent $butt -side left
            pack $fp -side top -padx 2 -pady 2
          }
          pack $fg -side top -padx 5 -pady 3
        }
      }

      #
      -----------------------------------------------------------------------
      proc doRefresh {f} {

        # Destroy all element frames
        foreach groupFrame [winfo children $f] {
          foreach paraFrame [winfo children $groupFrame] {
            foreach elem [winfo children $paraFrame] {
              destroy $elem
            }
            destroy $paraFrame
          }
          destroy $groupFrame
        }

        # Add the frames again
        addFrames $f
      }

      #
      -----------------------------------------------------------------------
      proc Show_Dialog {} {
      global dialogClosed

        set oldfocus [focus]

        set w .myDialog 
        toplevel $w
        wm title    $w Test-Dialog
        wm transient $w $oldfocus

        # Label
        set lab [label $w.lab -text "Hallo"]
        pack $lab -side top -padx 30 -pady 20

        # Button Area
        set buttArea [frame $w.barea]
        pack $buttArea -side bottom -fill x -padx 5 -pady 15
        set b_close [button $buttArea.close -text Close  -command [list set dialogClosed 1] ]
        pack $b_close -side left -expand yes -padx 10

        # Check update time
        set t0 [clock clicks]
        update idletasks
        puts "Dlg: [expr [clock clicks] - $t0]"

        # Wait on closing dialog
        set dialogClosed 0
        bind $w <Destroy> [list set dialogClosed 1]
        tkwait variable dialogClosed

        catch {destroy $w}
      }

      ##########################
      ####### MAIN #############
      ##########################
      showWin

  ObservedBehavior:
  Handle the little test application in the following way:
      - Click button 'Dialog' to call a little dialog widget - the time used
      for 'update idletasks' call will be outputted - close it
      - Now click on button `Refresh' - all elements in the lower part of the
      widget will be destroyed and then created again.
      - Click button 'Dialog' again - close it
      - Click button 'Refresh'
      - and so on ...

      You will see that the time needed for 'update idletasks' is growing

      In our real application many little widgets (labels, entry fields and
      buttons) are dynamically build up and destroyed again. The upper
      described behaviour results in our application became slower and slower.
      Finally only restart the application can be done.

  DesiredBehavior:
  We expect that dynamically creating and destroying widgets is possible
      without getting a slow application.


tkt_uuid: 220040ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: TK menus don't respond to event bindings
comment:
  OriginalBugID: 3462 RFE
  Version: 8.0.5
  SubmitDate: '1999-11-05'
  LastModified: '2000-01-05'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 3222
  OS: All Windows
  ClosedDate: '2000-01-05'


  Name:
  Dionisios Pothos

  DesiredBehavior:
  1. TK menus in WindowsNT/9x platforms to respond to event bindings
      (currently
      this is possible only to Unix implementations).
      2. Make Tk menus scrollable (similar to IE5 Favorites menu). This
      feature is usefull when menus have large number of entries.



  Duplicate of #3222.

  - eric
   
  -- 01/05/2000 ericm


tkt_uuid: 220041ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 10. Generic Menus
priority: 1 Zero
foundin: obsolete: 8.2
resolution: Duplicate
title: menu: command item does not fire on top level menus on unix
comment:
  OriginalBugID: 3479 Bug
  Version: 8.2
  SubmitDate: '1999-11-05'
  LastModified: '2000-04-26'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 630
  OS: SunOS
  OSVersion: 2.6
  ClosedDate: '2000-04-26'


  Name: tom poindexter

  ReproducibleScript:
  catch {console show}
      menu .menu
      . configure -menu .menu
      .menu add cascade -label File -menu .menu.file
      
      menu .menu.file
      .menu.file add command -label "File stuff" -command {puts "File stuff"}
      .menu.file add command -label "Quit" -command {exit}
      
      .menu add cascade -label Edit -menu .menu.edit
      menu .menu.edit
      .menu.edit add command -label "Edit stuff" -command {puts "Edit stuff"}
      
      ####################################################
      #  next line works on windows, but not on unix
      
      .menu add command -label "Do it"  -command {puts "Do it"}
      
      label .l -text "demonstration of menu commands\nunder windows and unix"
      pack .l

  ObservedBehavior:
  a command item in a menu bar does not fire the command on unix.  it does
      
      work under windows.
      
      previously, menu were packed into frames, and ordinary 'button' could be
      packed in the frame, appearing as any other menu button.  i'm trying to
      update some of my code to a newer style of menu handling, using a single
      menu and using ' . configure -menu .menubar '.  unfortunately, a command
      menu item doesn't fire under unix;  when i revert to 'old -style' menus
      using a frame, the resulting menubar doesn't respond quite correctly
      under windows :(

  DesiredBehavior:
  command menu items are invoked on all platforms



  This is a duplicate of bug #630, which was fixed for 8.3.1.  Command entries on menubars now function on Unix.

  - eric

  -- 04/26/2000 ericm


tkt_uuid: 220042ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 09. [listbox]
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: <<ListboxSelect>> not documented
comment:
  OriginalBugID: 3499 Bug
  Version: 8.2.2
  SubmitDate: '1999-11-08'
  LastModified: '1999-11-12'
  Severity: LOW
  Status: Closed
  Submitter: hobbs
  ChangedBy: hobbs
  RelatedBugIDs: 3500
  OS: All
  ClosedDate: '1999-11-12'


  Should also make examples of using it.


tkt_uuid: 220043ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 1 Zero
foundin: obsolete: 8.2.1
resolution: Duplicate
title: Filename Browser displays cryptic file names
comment:
  OriginalBugID: 3514 Bug
  Version: 8.2.1
  SubmitDate: '1999-11-08'
  LastModified: '1999-11-16'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3554
  OS: All Unix
  OSVersion: PowerMax OS 4.3 SVR4 Unix
  Machine: Concurrent PowerHawk
  ClosedDate: '1999-11-16'


  Name:
  Bob Yunk

  CustomShell:
  no changes

  ReproducibleScript:
  The tk filename browser is displaying cryptic symbols for the file names.  I built tcl and tk 8.2.1 on a Unix SVR4 operating system (PowerMax OS 4.3 from Concurrent).  I had to change some parameters in the Makefile to get a successful build.  Where can I start looking to narrow down the problem.  I can debug if possible.


tkt_uuid: 220044ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: Tk scale widget segfaults when destroyed.
comment:
  OriginalBugID: 3522 Bug
  Version: 8.2.2
  SubmitDate: '1999-11-08'
  LastModified: '1999-11-11'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2725
  OS: All
  ClosedDate: '1999-11-11'


  Name:

  George A. Howlett


  CustomShell:

  none.


  Comments:

  This problem stems from the fact that the Tcl_Obj-based and old string-based

  Tk resource handling routines are not consistent.


  For example, the old string-based routine Tk_FreeOptions used a Display

  argument to free resources.  


  Tk_FreeOptions(specs, widgRec, display, flags);


  The display was passed in preference to the Tk_Window, because the tkwin

  field would become invalid once the widget was destroyed. Widgets would

  mark destroyed windows by setting their tkwin fields to NULL.  It was

  expected that widget writers should save a copy of the display field ahead

  of time.


  The new Tcl_Obj-based routine Tk_FreeConfigOptions takes a tkwin argument.


  Tk_FreeConfigOptions(widgRec, optionTable, tkwin);


  Apparently a Tk_Window is now valid even after a Destroy event.


  The error in tkScale.c is that it still uses the old paradigm.  It sets the

  widget's tkwin field to NULL when it is destroyed.  But the same tkwin 

  field is later passed to Tk_FreeConfigOptions in DestroyScale.


  ReproducibleScript:

  This bug has been reported and described for previous releases. 


  http://x46.deja.com/getdoc.xp?AN=540232516&CONTEXT=942110139.108068949&hitnum=0


  http://x21.deja.com/getdoc.xp?AN=523147602&CONTEXT=942110204.899940567&hitnum=3


  The scale widget coredumps when destroyed.  


  scale .s

  destroy .s


  ObservedBehavior:

  Tk_FreeConfigOptions is passed scalePtr->tkwin.  This has been previous set

  the NULL in the scale widget event handler routine. 


              FreeResources  [tkConfig.c:1594]

                             if (internalFormExists) {

                                 if (*((Tk_Cursor *) internalPtr) != None) {

                                     Tk_FreeCursor(Tk_Display(tkwin),

              =>                             *((Tk_Cursor *) internalPtr));

                                     *((Tk_Cursor *) internalPtr) = None;

                                 }

                             } else if (objPtr != NULL) {

              Tk_FreeConfigOptions [tkConfig.c:1496]

                                 oldInternalPtr = NULL;

                             }

                             if (optionPtr->flags & OPTION_NEEDS_FREEING) {

              =>                 FreeResources(optionPtr, oldPtr, oldInternalPtr, tkwin);

                             }

                             if (oldPtr != NULL) {

                                 Tcl_DecrRefCount(oldPtr);

              DestroyScale   [tkScale.c:552]

                         Tk_FreeGC(scalePtr->display, scalePtr->textGC);

                     }

                     Tk_FreeConfigOptions((char *) scalePtr, scalePtr->optionTable,

              =>             scalePtr->tkwin);

                     TkpDestroyScale(scalePtr);

                 }


              Tcl_EventuallyFree [tclPreserve.c:313]

                             || (freeProc == (Tcl_FreeProc *) free)) {

                         ckfree((char *) clientData);

                     } else {

              =>         (*freeProc)((char *)clientData);

                     }

                 }


              ScaleEventProc [tkScale.c:1032]

                         if (scalePtr->flags & REDRAW_ALL) {

                             Tcl_CancelIdleCall(TkpDisplayScale, (ClientData) scalePtr);

                         }

              =>         Tcl_EventuallyFree((ClientData) scalePtr, DestroyScale);

                     } else if (eventPtr->type == ConfigureNotify) {

                         ComputeScaleGeometry(scalePtr);

                         TkEventuallyRedrawScale(scalePtr, REDRAW_ALL);

              Tk_HandleEvent [tkEvent.c:694]

                         for (handlerPtr = winPtr->handlerList; handlerPtr != NULL; ) {

                             if ((handlerPtr->mask & mask) != 0) {

                                 ip.nextHandler = handlerPtr->nextPtr;

              =>                 (*(handlerPtr->proc))(handlerPtr->clientData, eventPtr);

                                 handlerPtr = ip.nextHandler;

                             } else {

                                 handlerPtr = handlerPtr->nextPtr;

        Reading 4 bytes from 0x0


tkt_uuid: 220045ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: 147 test suite errors due to mismatches in geometry & pixel values
comment:
  OriginalBugID: 3555 Bug
  Version: 8.2.2
  SubmitDate: '1999-11-11'
  LastModified: '2000-01-27'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 1970 3720
  OS: Linux-Red Hat
  OSVersion: RedHat Linux 5.1 + updates
  Machine: Compaq Alpha XL 300
  ClosedDate: '2000-01-27'


  Name:
  Don Porter

  Comments:
  Errors available on request.  All of them appear to be
  minor mismatches in geometry and pixel values.

  Window manager is fvwm2

  ObservedBehavior:
  $ make test
  ...
  all.tcl:Total6351Passed5807Skipped397Failed147
  Sourced 84 Test Files.
  Files with failing tests: listbox.test text.test textDisp.test textWind.test

  DesiredBehavior:
  all tests pass


tkt_uuid: 220046ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Expect_tk doesn't initialize Tk's stub table
comment:
  OriginalBugID: 3646 Bug
  Version: 8.3b1
  SubmitDate: '1999-11-23'
  LastModified: '2000-01-20'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4029
  OS: All
  ClosedDate: '2000-01-20'


  Name:

  Jan Nijtmans


  CVS:

  6 Nov 1999


  Extensions:

  Expect (from Scriptics CVS), Img 1.2.2


  Comments:

  The function TkCreateFrame needs to be called by any extension, therefore this is

  the most appropriate place to do the Tk stub table initialization. The Tcl stub table

  needs to be initialized in the first Tk function called, which could be either

  Tk_ParseArgv() or TkCreateFrame(). In order to be sure in all situations,

  better do it in both of them.


  Because more extensions than Expect might have the same

  problem the best place to fix this is in Tk, even though Expect

  is the actual cause of this problem.


  The same problem is present in Tk 8.1.x and 8.2.x as well.


  ReproducibleScript:

  Try to load any stub-enabled extension based on Tk (e.g. Img) in expect_tk. The

  result of this is either a crash, either a message that this version of Tk doesn't

  support Stubs.

  Explanation: Expect_tk doesn't call Tk_Init() nor Tk_MainEx(), which do the

  main work of initializing the Stub tables. Solution: Add the required initialization

  to the function TkCreateFrame() and Tk_ParseArgv() too.


  Patch:

  *** generic/tkArgv.c.origFri Apr 16 03:51:10 1999

  --- generic/tkArgv.cSun Nov 14 16:27:00 1999

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

  *** 91,96 ****

  --- 91,100 ----

        size_t length;/* Number of characters in current argument. */

        int i;


  +     if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {

  + return TCL_ERROR;

  +     }

  + 

        if (flags & TK_ARGV_DONT_SKIP_FIRST_ARG) {

    srcIndex = dstIndex = 0;

    argc = *argcPtr;

  *** generic/tkFrame.c.origTue Aug 10 07:06:01 1999

  --- generic/tkFrame.cSun Nov 14 16:32:27 1999

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

  *** 223,229 ****

    /*

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

     *

  !  * TkFrameCreate --

     *

     *This procedure is invoked to process the "frame" and "toplevel"

     *Tcl commands;  it is also invoked directly by Tk_Init to create

  --- 223,229 ----

    /*

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

     *

  !  * TkCreateFrame --

     *

     *This procedure is invoked to process the "frame" and "toplevel"

     *Tcl commands;  it is also invoked directly by Tk_Init to create

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

  *** 238,243 ****

  --- 238,244 ----

     *

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

     */

  + extern TkStubs tkStubs;


    int

    TkCreateFrame(clientData, interp, argc, argv, toplevel, appName)

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

  *** 261,264 ****

  --- 262,269 ----

        unsigned int mask;

        Colormap colormap;

        Visual *visual;

  +     if ((Tcl_InitStubs(interp, "8.1", 0) == NULL) ||

  +     (Tcl_PkgProvideEx(interp, "Tk", TK_VERSION, (ClientData) &tkStubs) != TCL_OK)) {

  + return TCL_ERROR;

  +     }


  PatchFiles:

  tkArgv.c tkFrame.c


tkt_uuid: 220047ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 38. [tk_messageBox]
priority: 5 Medium
foundin: obsolete: 8.2.1
resolution: Duplicate
title: button text of tk_messageBox
comment:
  OriginalBugID: 3656 RFE
  Version: 8.2
  SubmitDate: '1999-11-23'
  LastModified: '2000-02-01'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2671
  OS: Linux-SuSE
  OSVersion: none
  Machine: PC
  ClosedDate: '2000-02-01'


  Name:
  Holger Jakobs

  Extensions:
  none

  DesiredBehavior:
  In Windows the operating system takes care of presenting the button text of tk_messageBox
  in the native language of the user. X doesn't do it. Unfortunately, the texts are hard coded
  in some .tcl file in lib/tk8.2. Actually several files are affected, since similar texts exist in
  other dialog boxes as well. 

  My idea is that this should at least be coded only once in one file, whether it's an X resource
  or a sourceable file, so that everybody can easily move this file from one Tk version to the
  next.


tkt_uuid: 220048ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 15. [scale]
priority: 1 Zero
foundin: final: 8.0.5
resolution: Duplicate
title: scale widget occasionally rounds numbers
comment:
  OriginalBugID: 3689 Bug
  Version: 8.0.5
  SubmitDate: '1999-11-24'
  LastModified: '2000-01-29'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4099
  OS: All
  ClosedDate: '2000-01-29'


  Name:
  john donahue

  ReproducibleScript:
  The scale widget usually doesn't change the value of its variable if its in the allowable range.
  I was counting for a latitude scale, until I picked a spot in South America, where the input value was
  changed. It only does this for negative numbers less than 1 with decimal fractions between .9 and .95

  % scale .s  -to  90 -from -90 -resolution  .1 -variable x
  .s
  % pack .s
  % set x -21.914
  -21.9
  % set x -21.956
  -21.956

  DesiredBehavior:
  Either round all number to the specified resolution, or leave the values as they are. I need consistancy.



  Verified on NT and Sol7 with 8.2.2. 
  -- 11/29/1999 hobbs
  See 4099 for bug that fixed this (for 8.3.0). 
  -- 01/29/2000 hobbs


tkt_uuid: 220049ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 69. Events
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: 'Dead key' + SHIFT entry/text widget problem
comment:
  OriginalBugID: 3695 Bug
  Version: 8.2.2
  SubmitDate: '1999-11-29'
  LastModified: '1999-11-30'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3359
  OS: Windows 98
  ClosedDate: '1999-11-30'


  Name:
  Ludek Smid

  Extensions:
  BWidgets 1.2.1

  ReproducibleScript:
  When entering text into entry or text widget I cannot enter special national characters. These characters are entered using so called 'dead key' ie you have to press two keys to produce one character. This dead key can be user with modifier  (SHIFT) to produce different character. So if you press 'Dead key' and then E then this is not equal when you press SHIF+'Dead key' and then E. Tk does not recognize SHIFT modifier with 'Dead key' and produces the same character as without SHIFT modifier. Character set is cp1250. This bug prevents to use Tk with national character set.

  ObservedBehavior:
  See above.

  DesiredBehavior:
  See above.


tkt_uuid: 220050ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: final: 8.2.3
resolution: Duplicate
title: Cannot type in text/entry widgets when toplevel uses -use option
comment:
  OriginalBugID: 3798 Bug
  Version: 8.2.3
  SubmitDate: '1999-12-07'
  LastModified: '2000-01-27'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2262
  OS: Windows NT
  ClosedDate: '2000-01-27'


  Name:
  Michael Githens

  CustomShell:
  Dash patch

  ReproducibleScript:
  #Start a wish and give the following commands
      frame .one -container 1
      grid .one -row 0 -column 0
      # Get the winfo id of .one

  #Start a second wish and give the following commands
      toplevel .two -use 0x?????   # You got this from the other wish
      text .two.txt -width 20 -height 2
      grid .two.txt -row 0 -column 0

  # Try to type in the text widget.

  ObservedBehavior:
  Cannot type in the text widget that is in the toplevel using the -use option.

  DesiredBehavior:
  You should get a cursor and be able to type in the widget



  Verified, although this might not be exactly what the intended
  use for the given design was. 
  -- 12/22/1999 hobbs


tkt_uuid: 220051ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: Thread compile option seriously slows down redraw
comment:
  OriginalBugID: 3833 Bug
  Version: 8.2.2
  SubmitDate: '1999-12-09'
  LastModified: '1999-12-09'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2438
  OS: Linux-Red Hat
  OSVersion: Redhat 6.1
  Machine: dual PII Xeon 256M Matrox G200
  ClosedDate: '1999-12-09'


  Name: Tim Wallace

  ReproducibleScript:
  My colleague recently compiled tcl/tk 8.2.2 and BLT 2.4m as shared
  libraries under Linux (Redhat 6.1).  Comparing to our previous versions
  showed that the BLT zoom with the dotted box was very slow and jerky.
  It almost seemed that it waited until the motion events were done
  and the mouse stopped for some time before it updated the box.
  (His machine is a dual 450 MHz PII Xeon with 256 M.) 
  Rolling back to a previous BLT shared library didn't help.  I suggested 
  re-compiling tcl/tk without threads, and that cured the problem.
  We don't need threads, but this is a bug that should be fixed.
  If this was his first exposure to tcl/tk, that might have been enough
  to get him to decide that it just wasn't fast enough for serious work!

  ObservedBehavior:
  BLT zoom ( from bltGraph.tcl script) very jumpy

  DesiredBehavior:
  Smooth zoom



  Tk has not yet been condoned for use in a threaded environment.
  There are still issues about handling the X stuff to work out.
  This is not expected to work right now, but we do expect to make
  it work sometime in the future (Tcl was first priority, and is
  very stable with threads in 8.2.2). 
  -- 12/09/1999 hobbs


tkt_uuid: 220052ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 67. Unix Window Operations
priority: 1 Zero
foundin: obsolete: 8.2.2
resolution: Duplicate
title: Patch still required for Tk 8.2.2 to avoid crashing when deleting top level windows using Tix
comment:
  OriginalBugID: 3872 Bug
  Version: 8.2.2
  SubmitDate: '1999-12-13'
  LastModified: '1999-12-21'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 716
  OS: IRIX
  OSVersion: IRIX 6.5
  Machine: Origin 2000, Octanes
  ClosedDate: '1999-12-21'


  Name:

  Rob Ratcliff


  Extensions:

  Tix, Incr Tcl/Tk, sox


  CustomShell:

  Only the patch described above


  ReproducibleScript:

  The tixwish interpretter crashed sometimes when a toplevel window

  (popup) is deleted.


  I haven't been able to duplicate the problem in a small application

  to attach, but it does happen reliably, sometimes after deleting

  the problematic popup window 2-3 times.


  ObservedBehavior:

  Sometimes, when a toplevel window is deleted tixwish crashes

  with the error: 


  X Error of failed request:  BadWindow (invalid Window parameter)

    Major opcode of failed request:  40 (X_TranslateCoords)

    Resource id in failed request:  0x1c002b6

    Serial number of failed request:  34982

    Current serial number in output stream:  34982


  DesiredBehavior:

  Toplevel window is destroyed without crashing interpretter


  Patch:

  *** tkUnixWm.c.origThu Apr 15 18:51:47 1999

  --- tkUnixWm.cMon Dec 13 13:49:55 1999

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

  *** 3489,3494 ****

  --- 3489,3495 ----

        int x, y, childX, childY, tmpx, tmpy, bd;

        WmInfo *wmPtr;

        TkWindow *winPtr, *childPtr, *nextPtr;

  +     Tk_ErrorHandler handler;

        TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;


        /*

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

  *** 3528,3539 ****

         *    the toplevel.

         */


        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; 

  --- 3529,3546 ----

         *    the toplevel.

         */


  +     handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1,

  +     (Tk_ErrorProc *) NULL, (ClientData) NULL);

        while (1) {

    if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,

    x, y, &childX, &childY, &child) == False) {

  !     fprintf (stderr, "Tk_CoordsToWindow got False return from XTranslateCoordinates\n");

  !     fflush (stderr);

  !     return NULL;

  !     /* panic("Tk_CoordsToWindow got False return from XTranslateCoordinates"); */

    }

    if (child == None) {

  +     Tk_DeleteErrorHandler(handler);

        return NULL;

    }

    for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL; 

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

  *** 3556,3561 ****

  --- 3563,3569 ----

        }


        gotToplevel:

  +     Tk_DeleteErrorHandler(handler);

        winPtr = wmPtr->winPtr;

        if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {

    return NULL;


  PatchFiles:

  unix/tkUnixWm.c


tkt_uuid: 220053ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 39. Image Basics
priority: 1 Zero
foundin: obsolete: 8.3b1
resolution: Duplicate
title: Backwards compatibility problem in images
comment:
  OriginalBugID: 3967 Bug
  Version: 8.3b1
  SubmitDate: '2000-01-03'
  LastModified: '2000-02-08'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4060
  OS: All
  ClosedDate: '2000-02-08'


  Name:

  Jan Nijtmans


  Comments:

  It is true that the new Image interface is not 100% binary comparible with the old Image interface in all possible

  situations. But with help of the above Tk_InitImageArgs() function, the remaining gap can be closed, resulting

  in Stub-enabled old-style loadable image extensions which runs with Tk8.1 and higher.

  When not using Stubs, only the flag -DUSE_OLD_IMAGE needs to be used to make it source compatible. When

  using Stubs, an additional function call is needed. That's all.


  ReproducibleScript:

  Comple tkTest.c as loadable extension using Stubs, using the Tk8.2 header files, then load it dynamically

  into Tk8.3: The test image then doesn't work.


  ObservedBehavior:

  The problem only occurs when using Stubs, and also only when using the old Image interface. In all

  other situations the patch below has no effect.

  This patch introduces a new function Tk_InitImageArgs(), which checks at runtime if Tk

  provides the old or the new Image interface. If Tk turns out to be version 8.2 or older,

  then Tk_InitImageArgs() just behaves as a NOP. Otherwise, the arguments are

  converted from objects to strings automatically. The Tk_InitImageArgs() function

  is placed in the stub table, thereby making sure that the extension can use

  it even when running under an older Tk version.

  Porting an old-style image type to Tk 8.3 becomes very simple, while still

  assuring that it works in all situations:

  - Compile it with the -DUSE_OLD_IMAGE flag

  - Add a call to the function Tk_InitImageArgs() in the beginning of the CreateImage

    function (this call is a NOP in most cases, only not in the problematic situation

    described above).

  In tkTest.c, the test image is modified to server as an example how to do this.


  Patch:

  *** generic/tk.h.origWed Dec 29 22:34:30 1999

  --- generic/tk.hSun Jan  2 22:27:01 2000

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

  *** 1273,1279 ****

    EXTERN voidTk_CreateOldPhotoImageFormat _ANSI_ARGS_((

    Tk_PhotoImageFormat *formatPtr));


  ! #ifdef USE_OLD_IMAGE

    #define Tk_CreateImageType Tk_CreateOldImageType

    #define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat

    #endif

  --- 1273,1279 ----

    EXTERN voidTk_CreateOldPhotoImageFormat _ANSI_ARGS_((

    Tk_PhotoImageFormat *formatPtr));


  ! #if !defined(USE_TK_STUBS) && defined(USE_OLD_IMAGE)

    #define Tk_CreateImageType Tk_CreateOldImageType

    #define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat

    #endif

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

  *** 1334,1339 ****

  --- 1334,1347 ----


    #define Tk_InitStubs(interp, version, exact) \

        Tcl_PkgRequire(interp, "Tk", version, exact)

  + 

  + #endif

  + 

  + void Tk_InitImageArgs _ANSI_ARGS_((Tcl_Interp *interp, int argc, char ***argv));

  + 

  + #if !defined(USE_TK_STUBS) || !defined(USE_OLD_IMAGE)

  + 

  + #define Tk_InitImageArgs(interp, argc, argv) /**/


    #endif


  *** generic/tkStubImg.c.origSun Jan  2 22:31:19 2000

  --- generic/tkStubImg.cSun Jan  2 22:17:41 2000

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

  *** 0 ****

  --- 1,70 ----

  + /* 

  +  * tkStubImg.c --

  +  *

  +  *Stub object that will be statically linked into extensions that wish

  +  *to access Tk.

  +  *

  +  * Copyright (c) 1999 Jan Nijtmans.

  +  * Copyright (c) 1998-1999 by Scriptics Corporation.

  +  *

  +  * See the file "license.terms" for information on usage and redistribution

  +  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.

  +  *

  +  * RCS: @(#) $Id: tkStubImg.c,v 1.0 2000/01/03 01:31:06 nijtmans Exp $

  +  */

  + 

  + #include "tcl.h"

  + 

  + 

  + /*

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

  +  *

  +  * Tk_InitImageArgs --

  +  *

  +  *Checks that the correct version of Tk is loaded and that it

  +  *supports stubs. It then initialises the stub table pointers.

  +  *

  +  * Results:

  +  *The actual version of Tk that satisfies the request, or

  +  *NULL to indicate that an error occurred.

  +  *

  +  * Side effects:

  +  *Sets the stub table pointers.

  +  *

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

  +  */

  + 

  + #ifdef Tk_InitImageArgs

  + #undef Tk_InitImageArgs

  + #endif

  + 

  + void

  + Tk_InitImageArgs(interp, argc, argvPtr)

  +     Tcl_Interp *interp;

  +     int argc;

  +     char ***argvPtr;

  + {

  +     static useNewImage = -1;

  +     static char **argv = NULL;

  + 

  +     if (useNewImage < 0) {

  + Tcl_CmdInfo cmdInfo;

  + if (!tclStubsPtr->tcl_GetCommandInfo(interp,"image", &cmdInfo)) {

  +     tclStubsPtr->tcl_Panic("cannot find the \"image\" command");

  + }

  + if (cmdInfo.isNativeObjectProc == 1) {

  +     useNewImage = 1; /* Tk uses the new image interface */

  + }

  +     }

  +     if (useNewImage) {

  + int i;

  + if (argv) {

  +     tclStubsPtr->tcl_Free((char *) argv);

  + }

  + argv = (char **) tclStubsPtr->tcl_Alloc(argc * sizeof(char *));

  + for (i = 0; i < argc; i++) {

  +     argv[i] = tclStubsPtr->tcl_GetString((Tcl_Obj *)(*argvPtr)[i]);

  + }

  + *argvPtr = (char **) argv;

  +     }

  + }

  *** tkTest.c.origSun Jan  2 22:33:29 2000

  --- tkTest.cSun Jan  2 22:41:14 2000

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

  *** 16,21 ****

  --- 16,25 ----

     * RCS: @(#) $Id: tkTest.c,v 1.9 1999/12/14 06:52:31 hobbs Exp $

     */


  + #ifdef MAC_TCL

  + #define USE_OLD_IMAGE

  + #endif

  + 

    #include "tkInt.h"

    #include "tkPort.h"

    #include "tkText.h"

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

  *** 61,70 ****

  --- 65,81 ----

     * The type record for test images:

     */


  + #ifdef USE_OLD_IMAGE

  + static intImageCreate _ANSI_ARGS_((Tcl_Interp *interp,

  +     char *name, int argc, char **argv,

  +     Tk_ImageType *typePtr, Tk_ImageMaster master,

  +     ClientData *clientDataPtr));

  + #else

    static intImageCreate _ANSI_ARGS_((Tcl_Interp *interp,

        char *name, int argc, Tcl_Obj *CONST objv[],

        Tk_ImageType *typePtr, Tk_ImageMaster master,

        ClientData *clientDataPtr));

  + #endif

    static ClientDataImageGet _ANSI_ARGS_((Tk_Window tkwin,

        ClientData clientData));

    static voidImageDisplay _ANSI_ARGS_((ClientData clientData,

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

  *** 78,84 ****


    static Tk_ImageType imageType = {

        "test",/* name */

  !     ImageCreate,/* createProc */

        ImageGet,/* getProc */

        ImageDisplay,/* displayProc */

        ImageFree,/* freeProc */

  --- 89,95 ----


    static Tk_ImageType imageType = {

        "test",/* name */

  !     (Tk_ImageCreateProc *) ImageCreate, /* createProc */

        ImageGet,/* getProc */

        ImageDisplay,/* displayProc */

        ImageFree,/* freeProc */

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

  *** 1557,1562 ****

  --- 1568,1608 ----

     */


    /* ARGSUSED */

  + #ifdef USE_OLD_IMAGE

  + static int

  + ImageCreate(interp, name, argc, argv, typePtr, master, clientDataPtr)

  +     Tcl_Interp *interp;/* Interpreter for application containing

  +  * image. */

  +     char *name;/* Name to use for image. */

  +     int argc;/* Number of arguments. */

  +     char **argv;/* Argument strings for options (doesn't

  +  * include image name or type). */

  +     Tk_ImageType *typePtr;/* Pointer to our type record (not used). */

  +     Tk_ImageMaster master;/* Token for image, to be used by us in

  +  * later callbacks. */

  +     ClientData *clientDataPtr;/* Store manager's token for image here;

  +  * it will be returned in later callbacks. */

  + {

  +     TImageMaster *timPtr;

  +     char *varName;

  +     int i;

  + 

  +     Tk_InitImageArgs(interp, argc, &argv);

  +     varName = "log";

  +     for (i = 0; i < argc; i += 2) {

  + if (strcmp(argv[i], "-variable") != 0) {

  +     Tcl_AppendResult(interp, "bad option name \"",

  +     argv[i], "\"", (char *) NULL);

  +     return TCL_ERROR;

  + }

  + if ((i+1) == argc) {

  +     Tcl_AppendResult(interp, "no value given for \"",

  +     argv[i], "\" option", (char *) NULL);

  +     return TCL_ERROR;

  + }

  + varName = argv[i+1];

  +     }

  + #else

    static int

    ImageCreate(interp, name, objc, objv, typePtr, master, clientDataPtr)

        Tcl_Interp *interp;/* Interpreter for application containing

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

  *** 1589,1594 ****

  --- 1635,1641 ----

    }

    varName = Tcl_GetString(objv[i+1]);

        }

  + #endif

        timPtr = (TImageMaster *) ckalloc(sizeof(TImageMaster));

        timPtr->master = master;

        timPtr->interp = interp;

  *** unix/Makefile.in.origSun Jan  2 21:42:16 2000

  --- unix/Makefile.inSun Jan  2 22:28:43 2000

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

  *** 270,276 ****

    tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o \

    tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o


  ! STUB_LIB_OBJS = tkStubLib.o


    OBJS =  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 \

  --- 270,276 ----

    tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o \

    tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o


  ! STUB_LIB_OBJS = tkStubLib.o tkStubImg.o


    OBJS =  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 \

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

  *** 799,804 ****

  --- 799,807 ----


    tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c

    $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c

  + 

  + tkStubImg.o: $(GENERIC_DIR)/tkStubImg.c

  + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubImg.c


    tkUnix.o: $(UNIX_DIR)/tkUnix.c

    $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c

  *** win/Makefile.in.origSun Jan  2 21:43:36 2000

  --- win/Makefile.inSun Jan  2 21:44:28 2000

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

  *** 331,337 ****

    tkWindow.$(OBJEXT)


    STUB_OBJS = \

  ! tkStubLib.$(OBJEXT)


    TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/../doc/*.[13n]

    TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]

  --- 331,338 ----

    tkWindow.$(OBJEXT)


    STUB_OBJS = \

  ! tkStubLib.$(OBJEXT) \

  ! tkStubImg.$(OBJEXT)


    TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/../doc/*.[13n]

    TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]

  *** win/makefile.vc.origSun Jan  2 21:43:46 2000

  --- win/makefile.vcSun Jan  2 21:45:42 2000

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

  *** 216,221 ****

  --- 216,222 ----

    $(TMPDIR)\tkWindow.obj


    TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj \

  + $(TMPDIR)\tkStubImg.obj


    cc32= "$(TOOLS32)\bin\cl.exe"


  PatchFiles:

  tk.h tkStubImg.c (new file) tkTest.c Makefile.in (for UNIX and WIN)

      makefile.vc




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


tkt_uuid: 220054ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 68. Win Window Operations
priority: 1 Zero
foundin: obsolete: 8.3b1
resolution: Duplicate
title: Give control of the appearance of a toplevel in the window list.
comment:
  OriginalBugID: 4017 RFE
  Version: 8.3b1
  SubmitDate: '2000-01-13'
  LastModified: '2000-05-27'
  Severity: LOW
  Status: Closed
  Submitter: sven
  ChangedBy: hobbs
  RelatedBugIDs: 4745 4016
  OS: All Windows
  ClosedDate: '2000-05-27'


  Instead of just having transient windows not show up in the Windows window list, it would be nice to have the ability to explicitly turn that off for any toplevel.



  when/if this bug/rfe is addressed, then bug 4745 needs to be integrated 
  -- 04/12/2000 key


tkt_uuid: 220055ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
subsystem: None
priority: 1 Zero
foundin: None
resolution: Duplicate
title: Expecttk doesn't register Tk's stub table
comment:
  OriginalBugID: 4029 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-17'
  LastModified: '2000-05-09'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3646 5341
  OS: All
  ClosedDate: '2000-05-09'


  Name:

  Jan Nijtmans


  Comments:

  Although this problem only occurs in expectk (and possibly other extensions which

  use Tk without calling Tk_Init), the best place to fix it is in Tk. That's what this patch does.


  ReproducibleScript:

  Expecttk cannot load stub-enabled libraries such as Tktable and Img. The cause

  for this problem is that Expecttk doesn't call Tk_Init(), which is the only

  function that registers Tk's stub table in the package database. The

  soltution is straightforward: Just add the necesary initalization to other

  functions, which are called first from Expecttk. Those are Tk_ParseArgv()

  and Tk_CreateFrame(); which of these is called first depends on if Expecttk

  is started with arguments or not.


  ObservedBehavior:

  Try to load a stub-enabled version of Tktable or Img in expectk. The result

  is the error-message: This version of Tk doesn't support stubs.


  Patch:

  *** generic/tkArgv.c.origFri Apr 16 03:51:10 1999

  --- generic/tkArgv.cSun Jan 16 21:05:11 2000

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

  *** 91,96 ****

  --- 91,100 ----

        size_t length;/* Number of characters in current argument. */

        int i;


  +     if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {

  + return TCL_ERROR;

  +     }

  + 

        if (flags & TK_ARGV_DONT_SKIP_FIRST_ARG) {

    srcIndex = dstIndex = 0;

    argc = *argcPtr;

  *** generic/tkFrame.c.origTue Dec 14 07:52:28 1999

  --- generic/tkFrame.cSun Jan 16 21:05:22 2000

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

  *** 241,246 ****

  --- 241,247 ----

     *

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

     */

  + extern TkStubs tkStubs;


    int

    TkCreateFrame(clientData, interp, argc, argv, toplevel, appName)

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

  *** 294,299 ****

  --- 295,304 ----

        unsigned int mask;

        Colormap colormap;

        Visual *visual;

  +     if ((Tcl_InitStubs(interp, "8.1", 0) == NULL) ||

  +     (Tcl_PkgProvideEx(interp, "Tk", TK_VERSION, (ClientData) &tkStubs) != TCL_OK)) {

  + return TCL_ERROR;

  +     }


        if (objc < 2) {

    Tcl_WrongNumArgs(interp, 1, objv, "pathName ?options?");


  PatchFiles:

  tkArgv,c tkFrame.c




  This seems like something that extensions like Expect should fix
  to work with stubs properly, rather than Tk worrying about what
  extensions might otherwise call first and placing hooks there. 
  -- 02/08/2000 hobbs


tkt_uuid: 220056ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 18. [text]
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: Wrong index returned by "dump" text widget sub-command in case of non-ascii characters
comment:
  OriginalBugID: 4043 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-19'
  LastModified: '2000-01-19'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2582
  OS: Linux
  OSVersion: Linux (also observed under Windows)
  Machine: PC/x86
  ClosedDate: '2000-01-19'


  Name: Claude Barras

  ReproducibleScript:
  wish 8.3
  % set t [text .t]; pack $t
  % $t insert insert "d\xE9j\xE0 loin"
  % $t dump 1.8

  ObservedBehavior:
  Result:
     text n 1.10
  instead of:
    text n 1.8
  (each non-ascii char is counted twice in the index)
  This seems to occur for any Tk version 8.1-8.3b2 and does have a severe
  impact in a real application for non-english text edition.
  It did work correctly with Tk 8.0.


tkt_uuid: 220057ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 37. [tk_get*File]
priority: 5 Medium
foundin: obsolete: 8.3
resolution: Duplicate
title: double-clicking in tk_get*File dialog generates click in the window underneath
comment:
  OriginalBugID: 4050 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-20'
  LastModified: '2000-01-31'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4107
  OS: Windows NT
  ClosedDate: '2000-01-31'


  Name:
  Jonas Beskow

  ReproducibleScript:
  pack [button .a -text Junk -command {tk_messageBox -message Click} -width 80 -height 20]
  pack [button .b -text Open -command tk_getOpenFile]

  # click open to bring up a file selection dialog. Double-clicking on any file causes the underlying button "Junk" to be invoked

  ObservedBehavior:
  The underlying button recieves a click-event when a file is selected by double-clicking

  DesiredBehavior:
  the underlying button should not be affected by double-clicking in the file selection dialog.


tkt_uuid: 220058ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: Canvas -stipple and -outline stipple options have no effect with $w create oval
comment:
  OriginalBugID: 4077 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-24'
  LastModified: '2000-03-27'
  Severity: LOW
  Status: Closed
  Submitter: shawn
  ChangedBy: hobbs
  RelatedBugIDs: 1274 4081
  OS: Windows NT
  ClosedDate: '2000-03-27'


  Canvas -stipple and -outline stipple options have no effect with $w create oval.  

  Reproducible script: 

  canvas .a 
  pack .a 
  .a create oval  0 40 20 20 -fill red -stipple gray75 -outline red  -outlinestipple gray75
  .a create rectangle   0 80 20 100 -fill red -stipple gray75 -outline red  -outlinestipple gray75

  expected results: 

  I expect both the rectangle and the oval to be the same - and show the bitmap stipple.


tkt_uuid: 220059ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 05. Canvas Items
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: -outline stipple option doesn't work with create rectangle
comment:
  OriginalBugID: 4081 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-24'
  LastModified: '2000-03-27'
  Severity: LOW
  Status: Closed
  Submitter: shawn
  ChangedBy: hobbs
  RelatedBugIDs: 1274
  OS: Windows NT
  ClosedDate: '2000-03-27'


  -outline stipple option doesn't work with create rectangle  -  outline is not different with -outlinestipple option applied - 

  reproducible script: 

  .a create rectangle  0 0 500 500 -fill brown 

  .a create rectangle 20 20 200 200  -fill green -stipple gray50 -outline green -outlinestipple gray50

  .a create rectangle 220 20  400  200 -fill green -stipple gray50 -outline green 

  Expected results: 

  I expect the outline of the first rectangle to be stippled according to the bitmap gray50 -  both rectangles are the same. 


tkt_uuid: 220060ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 63. Tk_Win Functions
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: naming a TCL script "button.tcl" causes run time error
comment:
  OriginalBugID: 4094 Bug
  Version: 8.3b2
  SubmitDate: '2000-01-26'
  LastModified: '2000-01-26'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2691
  OS: Windows 95
  ClosedDate: '2000-01-26'


  Name:
  paul battersby

  ReproducibleScript:
  I place the following text in a file called "button.tcl"

    .button myButton -text "hello"
     pack .button

  I run this by typing 

     wish83 button.tcl

  When I move the mouse in to the window continaing the button, I get the following error:

     Error: unknown option "-state"

  What I have discovered is that the problem is the name of the TCL script. I cannot name the file "button.tcl" If I rename it to something else, there is no error.

  ObservedBehavior:
  Stack trace:

  unknown option "-state"
      while executing
  "$w cget -state"
      (procedure "tkButtonEnter" line 3)
      invoked from within
  "tkButtonEnter .
  "
      (command bound to event)

  DesiredBehavior:
  I don't expect to see any error simply because of the name of my ".tcl" script.



  The problem occurs when confusion arises over class names.
  A script takes the root filename of the script as the class
  name for the primary toplevel.  Tk will then tie that in
  to known classes when creating the toplevel, so a toplevel
  will try to be configured with class Radiobutton... 
   
  -- 01/26/2000 hobbs


tkt_uuid: 220061ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 41. Photo Images
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: Img support in Tk fails to display JPG file
comment:
  OriginalBugID: 4125 Bug
  Version: 8.3b2
  SubmitDate: '2000-02-04'
  LastModified: '2000-02-07'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 4127
  OS: Windows NT
  OSVersion: Windows NT V4.0 SP3
  Machine: Gateway Pentium II 166Mhz
  ClosedDate: '2000-02-07'


  Name:
  David Burns

  Extensions:
  Proper behavior under wish82 w/"Img12.exe" installed.

  CustomShell:
  Unvarnished binary Tcl/Tk 8.3b2 downloaded 2/3/2000 from Scriptics site

  Comments:
  The following approach used to attempt to load the "image" widget won't
      work either under 8.3b2:

      set pixlen [file size "image.jpg"]
      open "image.jpg" ifile
      fconfigure $ifile -translation binary -encoding binary
      image create photo -data [read $ifile $pixlen] -format JPEG]

      This results in an empty image (no error message).

  ReproducibleScript:
  >From NT MS-DOS box, issue "wish83", at the % prompt, type "source canvas.tcl"
  where "canvas.tcl" is the following script:
  #======================================
  # "canvas.tcl" - Canvas/Image test

  global tk_version
  if {$tk_version == "8.2" } {
      package require Img
      }

  global Image_cds

    set fullfname "image.jpg"

    set Image_cds(ww) "."

    set image [image create photo -file $fullfname]

      set Image_cds(can) [canvas $Image_cds(ww).c  -borderwidth 0 -highlightthickness 0]
      pack $Image_cds(can) -side top

      # Create an 'image' canvas item to receive the actual image
      set Image_cds(ib) [$Image_cds(can) create image 0 0 -anchor nw]

      $Image_cds(can) itemconfigure $Image_cds(ib) -image $image
      set Image_cds(image) $image
  #=====================================end of script

  ObservedBehavior:
  When run under "wish82" with the "Img" package installed from "Img12.exe",
  the response is:

  image1
  %

  When run under Tcl/Tk 8.3b2, the response is:

  couldn't recognize data in image file "image.jpg"
  %

  DesiredBehavior:
  The proper behavior is that seen under "wish82"  (V8.2.0) with Img12.exe distributed Img extension installed.


tkt_uuid: 220062ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 65. Generic Window Operations
priority: 1 Zero
foundin: obsolete: 8.3b2
resolution: Duplicate
title: XIM is not working on Tcl/Tk8.3b2
comment:
  OriginalBugID: 4143 Bug
  Version: 8.3b2
  SubmitDate: '2000-02-08'
  LastModified: '2000-04-16'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4280
  OS: Linux-Red Hat
  OSVersion: RedHat Linux 6.1 Japanese Edition
  Machine: Pentium II
  ClosedDate: '2000-04-16'


  Name:
  Keiichi Takahashi

  Comments:
  Jan Nijtmans Plus Patches for 8.1.1, 8.2.X supported XIM.

  DesiredBehavior:
  With the command,

  tk useinputmethods 1

  It is expected to use XIM on text input widgets such as text or entry, but it isn't working.
  Lack of this feature affects on people who use multi-byte character, Chinese, Korean, Japanese and so on.


tkt_uuid: 220063ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 13. Win Menus
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: I have to click twice to bring up a menubar menu when another window has focus
comment:
  OriginalBugID: 4164 Bug
  Version: 8.3
  SubmitDate: '2000-02-14'
  LastModified: '2000-02-25'
  Severity: LOW
  Status: Closed
  Submitter: sven
  ChangedBy: hobbs
  RelatedBugIDs: 2272
  OS: All Windows
  ClosedDate: '2000-02-25'


  In the SCAuthor IDE, the user has to click twice to bring up a menu from the menubar when another window than the menu window has the focus.

  To reproduce:
  1. Start the IDE
  2. click on the project window to get the focus there
  3. Click on the file menubutton in the main window

  Result:
  The window gets the focus, but I have to click again to bring up the menu

  Expected behavior:
  The window gets the focus, and the menu pops up


tkt_uuid: 220064ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 1 Zero
foundin: obsolete: 8.3b1
resolution: Duplicate
title: Menu items check-marks are initally drawn incompletely.
comment:
  OriginalBugID: 4175 Bug
  Version: 8.3b1
  SubmitDate: '2000-02-14'
  LastModified: '2000-02-22'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4178
  OS: Windows 98
  Machine: Micron P2-450, 256MB RAM, Guillemot Prophet DDR GeForce video ca
  ClosedDate: '2000-02-22'


  Name:
  Brian Schmidt

  Extensions:
  Tk

  CustomShell:
  none

  ReproducibleScript:
  Run the Widget demonstration, Menu demonstration, and bring up the Cascades - Check buttons menu.

  ObservedBehavior:
  Tcl/Tk 8.3, menus with checkbuttons on them (check-marks next to the menu items), check-marks are initally drawn incompletely.  Just a couple specks.  However, when the mouse passes over that menu item, the check-mark is redrawn correctly.

  This is with Tcl/Tk 8.3 final, your version list on this form only has 8.3b1.

  DesiredBehavior:
  Correctly formed check-marks when menu first displayed.


tkt_uuid: 220065ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 09. [listbox]
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: listbox destroy crashes tcl/tk
comment:
  OriginalBugID: 4218 Bug
  Version: 8.3
  SubmitDate: '2000-02-22'
  LastModified: '2000-02-22'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4207
  OS: Windows NT
  Machine: Dell 300 P3
  ClosedDate: '2000-02-22'


  Name:
  Robert Embleton

  Extensions:
  none

  CustomShell:
  no modifications

  ReproducibleScript:
  from the wish console enter the following

  listbox .l -cursor arrow
  pack .l
  destroy .l

  ObservedBehavior:
  wish crashes attempting to read an illegal address


tkt_uuid: 220066ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: Test suite failure report
comment:
  OriginalBugID: 4231 Bug
  Version: 8.3
  SubmitDate: '2000-02-23'
  LastModified: '2000-02-25'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2181
  OS: Solaris
  OSVersion: Solaris 2.6
  Machine: UltraSPARC 5
  ClosedDate: '2000-02-25'


  Name:
  Larry W. Virden

  CVS:
  Feb. 23, 2000

  Extensions:
  Tk

  CustomShell:
  I have tcl and tk built with the

  ReproducibleScript:
  configure --prefix=/usr/tcl83
  make all test

  ObservedBehavior:
  choosedir.test
  can't set "err(usage)": variable isn't array
  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

  clrpick.test
  cmds.test
  color.test
  config.test
  cursor.test
  entry.test
  event.test
  filebox.test
  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

  DesiredBehavior:
  Test suite pass all tests


tkt_uuid: 220068ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 85. Win Build
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: mingw support for Tk
comment:
  OriginalBugID: 4235 RFE
  Version: 8.3
  SubmitDate: '2000-02-23'
  LastModified: '2000-06-13'
  Severity: MED
  Status: Closed
  Submitter: techsupp
  ChangedBy: ericm
  RelatedBugIDs: 5844
  OS: All Windows
  FixedDate: '2000-06-13'


  Name:
  Jan Nijtmans

  DesiredBehavior:
  Here are the patches from  Mumit Khan <khan@NanoTech.Wisc.EDU> submitted through the official bug form.

  Patch:
  *** win/Makefile.in.origThu Feb 10 12:11:05 2000
  --- win/Makefile.inWed Feb 23 20:21:11 2000
  ***************
  *** 85,93 ****
    # names based on the platform.
    PATHTYPE= @PATHTYPE@

    # The name of the Tcl library.
  ! TCL_LIB_FILE  = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')"
  ! TCL_STUB_LIB_FILE = "$(shell cygpath $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')"

    SRC_DIR= @srcdir@
    ROOT_DIR= $(SRC_DIR)/..
  --- 85,96 ----
    # names based on the platform.
    PATHTYPE= @PATHTYPE@

  + # This program converts between Windows native and Cygwin POSIX pathnames.
  + CYGPATH= @CYGPATH@
  + 
    # The name of the Tcl library.
  ! TCL_LIB_FILE  = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')"
  ! TCL_STUB_LIB_FILE = "$(shell $(CYGPATH) $(PATHTYPE) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')"

    SRC_DIR= @srcdir@
    ROOT_DIR= $(SRC_DIR)/..
  ***************
  *** 98,111 ****
    XLIB_DIR= $(ROOT_DIR)/xlib
    RC_DIR= $(WIN_DIR)/rc

  ! ROOT_DIR_NATIVE   = $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)')
  ! WIN_DIR_NATIVE   = $(shell cygpath $(PATHTYPE) '$(WIN_DIR)')
  ! GENERIC_DIR_NATIVE = $(shell cygpath $(PATHTYPE) '$(GENERIC_DIR)')
  ! BITMAP_DIR_NATIVE= $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/bitmaps')
  ! XLIB_DIR_NATIVE= $(shell cygpath $(PATHTYPE) '$(ROOT_DIR)/xlib')
  ! TCL_GENERIC_NATIVE= $(shell cygpath $(PATHTYPE) '$(TCL_GENERIC_DIR)')
  ! TCL_SRC_DIR_NATIVE      = $(shell cygpath $(PATHTYPE) '$(TCL_SRC_DIR)')
  ! TCL_BIN_DIR_NATIVE      = $(shell cygpath $(PATHTYPE) '$(TCL_BIN_DIR)')

    DLLSUFFIX= @DLLSUFFIX@
    LIBSUFFIX= @LIBSUFFIX@
  --- 101,114 ----
    XLIB_DIR= $(ROOT_DIR)/xlib
    RC_DIR= $(WIN_DIR)/rc

  ! ROOT_DIR_NATIVE   = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)')
  ! WIN_DIR_NATIVE   = $(shell $(CYGPATH) $(PATHTYPE) '$(WIN_DIR)')
  ! GENERIC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(GENERIC_DIR)')
  ! BITMAP_DIR_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/bitmaps')
  ! XLIB_DIR_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)/xlib')
  ! TCL_GENERIC_NATIVE= $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_GENERIC_DIR)')
  ! TCL_SRC_DIR_NATIVE      = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_SRC_DIR)')
  ! TCL_BIN_DIR_NATIVE      = $(shell $(CYGPATH) $(PATHTYPE) '$(TCL_BIN_DIR)')

    DLLSUFFIX= @DLLSUFFIX@
    LIBSUFFIX= @LIBSUFFIX@
  ***************
  *** 120,126 ****

    WISH= wish$(VER)${EXESUFFIX}
    TKTEST= tktest${EXEEXT}
  ! CAT32= cat32
    MAN2TCL= man2tcl$(EXEEXT)

    @SET_MAKE@
  --- 123,129 ----

    WISH= wish$(VER)${EXESUFFIX}
    TKTEST= tktest${EXEEXT}
  ! CAT32= cat32${EXEEXT}
    MAN2TCL= man2tcl$(EXEEXT)

    @SET_MAKE@
  ***************
  *** 128,140 ****
    # Macro that expands to the first dependency argument with the appropriate
    # path type already resolved.

  ! DEPARG = "$(shell cygpath $(PATHTYPE) $<)"

    # Setting the VPATH variable to a list of paths will cause the 
    # makefile to look into these paths when resolving .c to .obj
  ! # dependencies.

  ! VPATH = $(GENERIC_DIR);$(WIN_DIR);$(UNIX_DIR);$(XLIB_DIR);$(RC_DIR)

    # warning flags
    CFLAGS_WARNING= @CFLAGS_WARNING@
  --- 131,144 ----
    # Macro that expands to the first dependency argument with the appropriate
    # path type already resolved.

  ! DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)"

    # Setting the VPATH variable to a list of paths will cause the 
    # makefile to look into these paths when resolving .c to .obj
  ! # dependencies. Note the ':' to avoid autoconf's habit of deleting
  ! # all VPATH lines without an explicit ':' in it. 

  ! VPATH = $(GENERIC_DIR)@VPSEP@$(WIN_DIR)@VPSEP@$(UNIX_DIR)@VPSEP@$(XLIB_DIR)@VPSEP@$(RC_DIR) # :

    # warning flags
    CFLAGS_WARNING= @CFLAGS_WARNING@
  ***************
  *** 168,179 ****
    EXEEXT= @EXEEXT@
    OBJEXT= @OBJEXT@
    SHLIB_LD= @SHLIB_LD@
  ! SHLIB_LD_LIBS= @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) gdi32.lib comdlg32.lib
    SHLIB_CFLAGS= @SHLIB_CFLAGS@
    SHLIB_SUFFIX= @SHLIB_SUFFIX@
    VER= @TK_MAJOR_VERSION@@TK_MINOR_VERSION@
    DOTVER= @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@
  ! LIBS= @LIBS@ gdi32.lib comdlg32.lib
    RMDIR= rm -rf
    MKDIR= mkdir -p
    SHELL= @SHELL@
  --- 172,183 ----
    EXEEXT= @EXEEXT@
    OBJEXT= @OBJEXT@
    SHLIB_LD= @SHLIB_LD@
  ! SHLIB_LD_LIBS= @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) @LIBS_GUI@
    SHLIB_CFLAGS= @SHLIB_CFLAGS@
    SHLIB_SUFFIX= @SHLIB_SUFFIX@
    VER= @TK_MAJOR_VERSION@@TK_MINOR_VERSION@
    DOTVER= @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@
  ! LIBS= @LIBS@ @LIBS_GUI@
    RMDIR= rm -rf
    MKDIR= mkdir -p
    SHELL= @SHELL@
  ***************
  *** 474,492 ****

    $(WISH): $(TK_LIB_FILE) $(WISH_OBJS) wish.res
  ! $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS)  ! wish.res $(CC_EXENAME) -link $(LDFLAGS_WINDOW)

    tktest : $(TKTEST)

    $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.res $(CAT32)
  ! $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TCL_LIB_FILE)  ! $(TK_LIB_FILE) $(LIBS)  ! wish.res $(CC_EXENAME) -link $(LDFLAGS_WINDOW)

  ! $(CAT32): $(TCL_SRC_DIR)/cat.c
    $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
  ! $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) -link $(LDFLAGS_CONSOLE)

    # The following targets are configured by autoconf to generate either
    # a shared library or static library
  --- 478,498 ----

    $(WISH): $(TK_LIB_FILE) $(WISH_OBJS) wish.res
  ! $(CC) $(CFLAGS) $(WISH_OBJS) wish.res $(CC_EXENAME)  ! $(TK_LIB_FILE) $(TCL_LIB_FILE) $(LIBS) $(LDFLAGS_WINDOW)

    tktest : $(TKTEST)

    $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.res $(CAT32)
  ! $(CC) $(CFLAGS) $(TKTEST_OBJS_NATIVE) $(TK_LIB_FILE)  ! $(TCL_LIB_FILE) $(LIBS)  ! wish.res $(CC_EXENAME) $(LDFLAGS_WINDOW)

  ! cat32.${OBJEXT}: $(TCL_SRC_DIR)/cat.c
    $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
  ! 
  ! $(CAT32): cat32.${OBJEXT}
  ! $(CC) $(CFLAGS) cat32.${OBJEXT} $(CC_EXENAME) $(LDFLAGS_CONSOLE)

    # The following targets are configured by autoconf to generate either
    # a shared library or static library
  ***************
  *** 497,503 ****

    ${TK_DLL_FILE}: ${TK_OBJS} tk.res
    @$(RM) ${TK_DLL_FILE}
  ! @MAKE_DLL@ ${TK_OBJS} tk.res

    ${TK_LIB_FILE}: ${TK_OBJS}
    @$(RM) ${TK_LIB_FILE}
  --- 503,509 ----

    ${TK_DLL_FILE}: ${TK_OBJS} tk.res
    @$(RM) ${TK_DLL_FILE}
  ! @MAKE_DLL@ ${TK_OBJS} tk.res ${SHLIB_LD_LIBS}

    ${TK_LIB_FILE}: ${TK_OBJS}
    @$(RM) ${TK_LIB_FILE}
  ***************
  *** 532,538 ****
  --- 538,548 ----
    $(CC) -c $(STUB_CC_SWITCHES) -DBUILD_tk ${DEPARG} $(CC_OBJNAME)

    .rc.res:
  + ifeq "$(findstring windres, $(RC))" ""
    $(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" -i "$(TCL_GENERIC_NATIVE)" $(DEPARG)
  + else
  + $(RC) -O coff -o $@ --include "$(GENERIC_DIR_NATIVE)" --include "$(TCL_GENERIC_NATIVE)" --include "$(RC_DIR)" $(DEPARG)
  + endif

    depend:

  *** win/Makefile.mingw.origWed Feb 23 20:21:11 2000
  --- win/Makefile.mingwWed Feb 23 20:21:11 2000
  ***************
  *** 0 ****
  --- 1,600 ----
  + # GCC/MinGW makefile
  + #
  + # See the file "license.terms" for information on usage and redistribution
  + # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  + # 
  + # Copyright (c) 1995-1997 Sun Microsystems, Inc.
  + # RCS: @(#) $Id: Makefile.mingw,v 1.1 2000/02/17 20:23:24 khan Exp $
  + 
  + # Does not depend on the presence of any environment variables in
  + # order to compile tcl; all needed information is derived from 
  + # location of the compiler directories.
  + 
  + #
  + # Project directories
  + #
  + # ROOT    = top of source tree
  + #
  + # TMPDIR  = location where .o files should be stored during build
  + #
  + # TOOLS32 = location of VC++ 32-bit development tools. Note that the
  + #    VC++ 2.0 header files are broken, so you need to use the
  + #    ones that come with the developer network CD's, or later
  + #    versions of VC++.
  + #
  + # TCLDIR = location of top of Tcl source heirarchy
  + #
  + 
  + VPATH = .:$(XLIBDIR):$(WINDIR):$(GENERICDIR):$(ROOT)/unix:$(RCDIR)
  + 
  + ROOT= ..
  + TCLDIR= ../../tcl8.3
  + INSTALLDIR      = c:/progra~1/tcl
  + 
  + # Set this to the appropriate value of /MACHINE: for your platform
  + MACHINE= IX86
  + 
  + # Yes, Mingw will support IA64!
  + #!IF "$(MACHINE)" == "IA64"
  + #TOOLS32= c:/mingw64
  + #TOOLS32_rc= c:/mingw64
  + #!ELSE
  + TOOLS32= c:/mingw32
  + TOOLS32_rc= c:/mingw32
  + #!ENDIF
  + 
  + # Uncomment the following line to compile with thread support
  + #THREADDEFINES = -DTCL_THREADS=1
  + 
  + # Set NODEBUG to 0 to compile with symbols
  + NODEBUG = 1
  + 
  + # uncomment the following two lines to compile with TCL_MEM_DEBUG
  + #DEBUGDEFINES=-DTCL_MEM_DEBUG
  + 
  + ######################################################################
  + # Do not modify below this line
  + ######################################################################
  + 
  + TCLNAMEPREFIX = tcl
  + TKNAMEPREFIX = tk
  + WISHNAMEPREFIX = wish
  + VERSION = 83
  + DOTVERSION = 8.3
  + 
  + TCLSTUBPREFIX = $(TCLNAMEPREFIX)stub
  + TKSTUBPREFIX  = $(TKNAMEPREFIX)stub
  + 
  + 
  + BINROOT= .
  + #!IF "$(NODEBUG)" == "1"
  + #TMPDIRNAME= Release
  + #DBGX=
  + #!ELSE
  + #TMPDIRNAME= Debug
  + #DBGX= d
  + #!ENDIF
  + TMPDIR= $(BINROOT)/$(TMPDIRNAME)
  + OUTDIRNAME= $(TMPDIRNAME)
  + OUTDIR= $(TMPDIR)
  + 
  + TCLLIB = lib$(TCLNAMEPREFIX)$(VERSION)$(DBGX).a
  + TCLPLUGINLIB = lib$(TCLNAMEPREFIX)$(VERSION)p.a
  + TCLSTUBLIB= lib$(TCLSTUBPREFIX)$(VERSION)$(DBGX).a
  + TKDLLNAME= $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
  + TKDLL = $(OUTDIR)/$(TKDLLNAME)
  + TKLIB = $(OUTDIR)/lib$(TKNAMEPREFIX)$(VERSION)$(DBGX).a
  + TKSTUBLIBNAME= lib$(TKSTUBPREFIX)$(VERSION)$(DBGX).a
  + TKSTUBLIB= $(OUTDIR)/$(TKSTUBLIBNAME)
  + TKPLUGINDLLNAME= $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
  + TKPLUGINDLL = $(OUTDIR)/$(TKPLUGINDLLNAME)
  + TKPLUGINLIB = $(OUTDIR)/lib$(TKNAMEPREFIX)$(VERSION)p$(DBGX).a
  + 
  + WISH = $(OUTDIR)/$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
  + WISHC = $(OUTDIR)/$(WISHNAMEPREFIX)c$(VERSION)$(DBGX).exe
  + WISHP = $(OUTDIR)/$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
  + TKTEST = $(OUTDIR)/$(TKNAMEPREFIX)test.exe
  + CAT32           = $(TMPDIR)/cat32.exe
  + 
  + #RMDIR= ./rmd.bat
  + #MKDIR= ./mkd.bat
  + #RM= del
  + #XCOPY= xcopy
  + RMDIR= rm -rf
  + MKDIR= mkdir -p
  + RM= rm -f
  + COPY= cp
  + XCOPY= cp -r
  + 
  + BIN_INSTALL_DIR = $(INSTALLDIR)/bin
  + INCLUDE_INSTALL_DIR = $(INSTALLDIR)/include
  + LIB_INSTALL_DIR = $(INSTALLDIR)/lib
  + SCRIPT_INSTALL_DIR = $(LIB_INSTALL_DIR)/tk$(DOTVERSION)
  + 
  + WISHOBJS =  + $(TMPDIR)/winMain.o
  + 
  + TKTESTOBJS =  + $(TMPDIR)/tkTest.o  + $(TMPDIR)/tkSquare.o  + $(TMPDIR)/testMain.o  + $(TCLLIBDIR)/tclThreadTest.o
  + 
  + XLIBOBJS =  + $(TMPDIR)/xcolors.o  + $(TMPDIR)/xdraw.o  + $(TMPDIR)/xgc.o  + $(TMPDIR)/ximage.o  + $(TMPDIR)/xutil.o
  + 
  + TKOBJS =  + $(TMPDIR)/tkConsole.o  + $(TMPDIR)/tkUnixMenubu.o  + $(TMPDIR)/tkUnixScale.o  + $(XLIBOBJS)  + $(TMPDIR)/tkWin3d.o  + $(TMPDIR)/tkWin32Dll.o  + $(TMPDIR)/tkWinButton.o  + $(TMPDIR)/tkWinClipboard.o  + $(TMPDIR)/tkWinColor.o  + $(TMPDIR)/tkWinConfig.o  + $(TMPDIR)/tkWinCursor.o  + $(TMPDIR)/tkWinDialog.o  + $(TMPDIR)/tkWinDraw.o  + $(TMPDIR)/tkWinEmbed.o  + $(TMPDIR)/tkWinFont.o  + $(TMPDIR)/tkWinImage.o  + $(TMPDIR)/tkWinInit.o  + $(TMPDIR)/tkWinKey.o  + $(TMPDIR)/tkWinMenu.o  + $(TMPDIR)/tkWinPixmap.o  + $(TMPDIR)/tkWinPointer.o  + $(TMPDIR)/tkWinRegion.o  + $(TMPDIR)/tkWinScrlbr.o  + $(TMPDIR)/tkWinSend.o  + $(TMPDIR)/tkWinTest.o  + $(TMPDIR)/tkWinWindow.o  + $(TMPDIR)/tkWinWm.o  + $(TMPDIR)/tkWinX.o  + $(TMPDIR)/stubs.o  + $(TMPDIR)/tk3d.o  + $(TMPDIR)/tkArgv.o  + $(TMPDIR)/tkAtom.o  + $(TMPDIR)/tkBind.o  + $(TMPDIR)/tkBitmap.o  + $(TMPDIR)/tkButton.o  + $(TMPDIR)/tkCanvArc.o  + $(TMPDIR)/tkCanvBmap.o  + $(TMPDIR)/tkCanvImg.o  + $(TMPDIR)/tkCanvLine.o  + $(TMPDIR)/tkCanvPoly.o  + $(TMPDIR)/tkCanvPs.o  + $(TMPDIR)/tkCanvText.o  + $(TMPDIR)/tkCanvUtil.o  + $(TMPDIR)/tkCanvWind.o  + $(TMPDIR)/tkCanvas.o  + $(TMPDIR)/tkClipboard.o  + $(TMPDIR)/tkCmds.o  + $(TMPDIR)/tkColor.o  + $(TMPDIR)/tkConfig.o  + $(TMPDIR)/tkCursor.o  + $(TMPDIR)/tkEntry.o  + $(TMPDIR)/tkError.o  + $(TMPDIR)/tkEvent.o  + $(TMPDIR)/tkFileFilter.o  + $(TMPDIR)/tkFocus.o  + $(TMPDIR)/tkFont.o  + $(TMPDIR)/tkFrame.o  + $(TMPDIR)/tkGC.o  + $(TMPDIR)/tkGeometry.o  + $(TMPDIR)/tkGet.o  + $(TMPDIR)/tkGrab.o  + $(TMPDIR)/tkGrid.o  + $(TMPDIR)/tkImage.o  + $(TMPDIR)/tkImgBmap.o  + $(TMPDIR)/tkImgGIF.o  + $(TMPDIR)/tkImgPPM.o  + $(TMPDIR)/tkImgPhoto.o  + $(TMPDIR)/tkImgUtil.o  + $(TMPDIR)/tkListbox.o  + $(TMPDIR)/tkMacWinMenu.o  + $(TMPDIR)/tkMain.o  + $(TMPDIR)/tkMenu.o  + $(TMPDIR)/tkMenubutton.o  + $(TMPDIR)/tkMenuDraw.o  + $(TMPDIR)/tkMessage.o  + $(TMPDIR)/tkObj.o  + $(TMPDIR)/tkOldConfig.o  + $(TMPDIR)/tkOption.o  + $(TMPDIR)/tkPack.o  + $(TMPDIR)/tkPlace.o  + $(TMPDIR)/tkPointer.o  + $(TMPDIR)/tkRectOval.o  + $(TMPDIR)/tkScale.o  + $(TMPDIR)/tkScrollbar.o  + $(TMPDIR)/tkSelect.o  + $(TMPDIR)/tkText.o  + $(TMPDIR)/tkTextBTree.o  + $(TMPDIR)/tkTextDisp.o  + $(TMPDIR)/tkTextImage.o  + $(TMPDIR)/tkTextIndex.o  + $(TMPDIR)/tkTextMark.o  + $(TMPDIR)/tkTextTag.o  + $(TMPDIR)/tkTextWind.o  + $(TMPDIR)/tkTrig.o  + $(TMPDIR)/tkUtil.o  + $(TMPDIR)/tkVisual.o  + $(TMPDIR)/tkStubInit.o  + $(TMPDIR)/tkStubLib.o  + $(TMPDIR)/tkWindow.o
  + 
  + TKSTUBOBJS = $(TMPDIR)/tkStubLib.o  + $(TMPDIR)/tkStubImg.o
  + 
  + 
  + #cc32= "$(TOOLS32)/bin/cl.exe"
  + #link32= "$(TOOLS32)/bin/link.exe"
  + #lib32= "$(TOOLS32)/bin/lib.exe"
  + #rc32= "$(TOOLS32_rc)/bin/rc.exe"
  + #include32= -I"$(TOOLS32)/include"
  + 
  + # Say yes if you have gcc-2.95.2-1 and binutils-19990818-1 or later, which
  + # contains support for `gcc -shared' and `ld --shared'.
  + LD_SUPPORTS_SHARED = no
  + 
  + cc32= $(CROSS)gcc
  + link32= $(cc32)
  + rc32= $(CROSS)windres
  + include32= 
  + libpath32= 
  + lib32= $(CROSS)ar
  + # Needed if LD_SUPPORTS_SHARED is "no". GNU ld supports --shared on 
  + # x86-windows starting from binutils-19990818-1 release. 
  + dllwrap= $(CROSS)dllwrap
  + 
  + # Needed for cross-compilation only.
  + ifneq "$(strip $(CROSS))" ""
  + rc32_flags= --preprocessor "$(cc32) -c -E -xc-header -DRC_INVOKED"
  + dllwrap_flags= --as=$(CROSS)as --dlltool-name=$(CROSS)dlltool  +   --driver-name=$(cc32)
  + endif
  + 
  + WINDIR          = $(ROOT)/win
  + GENERICDIR= $(ROOT)/generic
  + XLIBDIR= $(ROOT)/xlib
  + BITMAPDIR= $(ROOT)/bitmaps
  + TCLLIBDIR       = $(TCLDIR)/win/$(OUTDIRNAME)
  + RCDIR= $(WINDIR)/rc
  + 
  + TK_INCLUDES= -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR)  + -I$(TCLDIR)/generic
  + TK_DEFINES= -D__WIN32__ $(DEBUGDEFINES) $(THREADDEFINES)
  + 
  + ######################################################################
  + # Compile flags
  + ######################################################################
  + 
  + #!IF "$(NODEBUG)" == "1"
  + #!IF "$(MACHINE)" == "ALPHA"
  + ## MSVC on Alpha doesn't understand -Ot
  + #cdebug= -O2i -Gs -GD
  + #!ELSE
  + ## NOTE: Due to a bug in MSVC, we cannot use -O2 here or Tk starts to misbehave.
  + #cdebug= -Oti -Gs -GD
  + #!ENDIF
  + #!ELSE
  + #!IF "$(MACHINE)" == "IA64"
  + #cdebug= -Od -Zi
  + #!ELSE
  + #cdebug= -Z7 -Od -WX
  + #!ENDIF
  + #!ENDIF
  + 
  + ifeq "$(NODEBUG)" "1"
  + # This cranks the optimization level to maximize speed
  + cdebug = -O2
  + else
  + ifeq "$(MACHINE)" "IA64"
  + cdebug = -g
  + else
  + cdebug = -g
  + endif
  + endif
  + 
  + # declarations common to all compiler options
  + #cflags= -c -W3 -nologo -Fp$(TMPDIR)/ -YX
  + #cvarsdll = -MD$(DBGX)
  + cflags = -c -Wall
  + cvarsdll = 
  + 
  + CON_CFLAGS= $(cdebug) $(cflags) $(include32) -DCONSOLE
  + TK_CFLAGS= $(cdebug) $(cflags) $(cvarsdll) $(include32)  + $(TK_INCLUDES) $(TK_DEFINES) -DUSE_TCL_STUBS
  + WISH_CFLAGS= $(cdebug) $(cflags) $(cvarsdll) $(include32)  + $(TK_INCLUDES) $(TK_DEFINES)
  + 
  + ######################################################################
  + # Link flags
  + ######################################################################
  + 
  + #!IF "$(NODEBUG)" == "1"
  + #ldebug= /RELEASE
  + #!ELSE
  + #ldebug= -debug:full -debugtype:cv
  + #!ENDIF
  + 
  + # declarations common to all linker options
  + #lcommon= /NODEFAULTLIB /RELEASE /NOLOGO
  + #lflags= $(lcommon) /MACHINE:$(MACHINE)
  + lcommon= 
  + lflags= $(lcommon)
  + 
  + # declarations for use on Intel i386, i486, and Pentium systems
  + #!IF "$(MACHINE)" == "IX86"
  + #DLLENTRY = @12
  + #!ENDIF
  + 
  + #conlflags= $(lflags) -subsystem:console -entry:mainCRTStartup
  + #guilflags= $(lflags) -subsystem:windows -entry:WinMainCRTStartup
  + #dlllflags= $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
  + conlflags= $(lflags) 
  + guilflags= $(lflags) -mwindows
  + 
  + ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
  + dlllflags = $(lflags) -shared
  + else
  + dlllflags = $(lflags) 
  + endif
  + 
  + #!IF "$(MACHINE)" == "PPC"
  + #libc = libc$(DBGX).lib
  + #libcdll = crtdll$(DBGX).lib
  + #!ELSE
  + #libc = libc$(DBGX).lib oldnames.lib
  + #libcdll = msvcrt$(DBGX).lib oldnames.lib
  + #!ENDIF
  + 
  + #baselibs   = kernel32.lib $(optlibs) advapi32.lib
  + #winlibs    = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
  + 
  + baselibs   = 
  + winlibs    = -mwindows -lwinspool 
  + 
  + guilibs   = $(libc) $(winlibs)
  + conlibs    = $(libc) $(baselibs)
  + guilibsdll = $(libcdll) $(winlibs)
  + 
  + ######################################################################
  + # Project specific targets
  + ######################################################################
  + 
  + all:    setup $(WISH) $(CAT32)
  + install: install-binaries install-libraries
  + plugin:setup $(TKPLUGINDLL) $(WISHP)
  + tktest: setup $(TKTEST) $(CAT32)
  + test:setup $(TKTEST) $(TKLIB) $(CAT32)
  + set TCL_LIBRARY=$(TCLDIR)/library
  + set PATH=$(TCLDIR)\\win\\$(TMPDIRNAME);$(PATH)
  + $(TKTEST) $(ROOT)/tests/all.tcl | $(CAT32)
  + 
  + runtest: setup $(TKTEST) $(TKLIB) $(CAT32)
  + set TCL_LIBRARY=$(TCLDIR)/library
  + set PATH=$(TCLDIR)\\win\\$(TMPDIRNAME);$(PATH)
  + $(TKTEST) 
  + 
  + console-wish : all $(WISHC)
  + 
  + stubs:
  + $(TCLDIR)/win/$(TMPDIRNAME)/tclsh$(VERSION)$(DBGX)  + $(TCLDIR)/tools/genStubs.tcl $(GENERICDIR)  + $(GENERICDIR)/tk.decls $(GENERICDIR)/tkInt.decls
  + 
  + setup:
  + @$(MKDIR) $(TMPDIR)
  + @$(MKDIR) $(OUTDIR)
  + 
  + install-binaries:
  + @$(MKDIR) "$(BIN_INSTALL_DIR)"
  + $(COPY) $(TKDLL) "$(BIN_INSTALL_DIR)"
  + $(COPY) $(WISH) "$(BIN_INSTALL_DIR)"
  + @$(MKDIR) "$(LIB_INSTALL_DIR)"
  + $(COPY) $(TKLIB) "$(LIB_INSTALL_DIR)"
  + 
  + install-libraries:
  + @$(MKDIR) "$(INCLUDE_INSTALL_DIR)"
  + @$(MKDIR) "$(INCLUDE_INSTALL_DIR)/X11"
  + $(COPY) "$(ROOT)/generic/tk.h"             "$(INCLUDE_INSTALL_DIR)"
  + $(COPY) "$(ROOT)/generic/tkDecls.h"        "$(INCLUDE_INSTALL_DIR)"
  + $(COPY) "$(ROOT)/generic/tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)"
  + ifeq "$(findstring xcopy, $(XCOPY))" ""
  + -$(MKDIR) "$(INCLUDE_INSTALL_DIR)/X11"
  + $(COPY) "$(ROOT)"/xlib/X11/*.h            "$(INCLUDE_INSTALL_DIR)/X11"
  + else
  + $(XCOPY) "$(ROOT)"/xlib/X11/*.h            "$(INCLUDE_INSTALL_DIR)/X11"
  + endif
  + @$(MKDIR) "$(SCRIPT_INSTALL_DIR)"
  + @$(MKDIR) "$(SCRIPT_INSTALL_DIR)/images"
  + @$(MKDIR) "$(SCRIPT_INSTALL_DIR)/demos"
  + @$(MKDIR) "$(SCRIPT_INSTALL_DIR)/demos/images"
  + ifneq "$(findstring xcopy, $(XCOPY))" ""
  + $(XCOPY) "$(ROOT)/library"              "$(SCRIPT_INSTALL_DIR)"
  + else
  + $(COPY) "$(ROOT)"/library/*.tcl         "$(SCRIPT_INSTALL_DIR)"
  + $(COPY) "$(ROOT)"/library/tclIndex      "$(SCRIPT_INSTALL_DIR)"
  + $(COPY) "$(GENERICDIR)"/prolog.ps       "$(SCRIPT_INSTALL_DIR)"
  + $(COPY) "$(ROOT)"/unix/tkAppInit.c      "$(SCRIPT_INSTALL_DIR)"
  + $(XCOPY) "$(ROOT)/library/images"       "$(SCRIPT_INSTALL_DIR)"
  + $(XCOPY) "$(ROOT)/library/demos"        "$(SCRIPT_INSTALL_DIR)"
  + endif
  + 
  + $(TKLIB): $(TKDLL) $(TKSTUBLIB)
  + 
  + #$(TKSTUBLIB): $(TKSTUBOBJS)
  + #        $(lib32) /out:$@ $(TKSTUBOBJS)
  + 
  + $(TKSTUBLIB): $(TKSTUBOBJS)
  + $(lib32) crv $@ $(TKSTUBOBJS)
  + 
  + #$(TKDLL): $(TKOBJS) $(TMPDIR)/tk.res
  + #set LIB=$(TOOLS32)/lib
  + #       $(link32) $(ldebug) $(dlllflags)  + #-out:$@ $(TMPDIR)/tk.res $(TCLLIBDIR)/$(TCLSTUBLIB)  + #$(guilibsdll) @<<
  + #$(TKOBJS)
  + #<<
  + 
  + ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes"
  + $(TKDLL): $(TKOBJS) $(TMPDIR)/tk.res.o
  + $(link32) $(ldebug) $(dlllflags)  + -o $@ $(TMPDIR)/tk.res.o  + -Wl,--out-implib,$(TKLIB)  + -Wl,--output-def,tk83.def  + $(TKOBJS)  + $(TCLLIBDIR)/$(TCLSTUBLIB)  + $(guilibsdll)
  + else
  + $(TKDLL): $(TKOBJS) $(TMPDIR)/tk.res.o
  + $(dllwrap) $(dllwrap_flags) $(ldebug) $(dlllflags)  + -o $@ $(TMPDIR)/tk.res.o  + --output-lib $(TKLIB)  + --output-def tk83.def  + $(TKOBJS)  + $(TCLLIBDIR)/$(TCLSTUBLIB)  + $(guilibsdll)
  + endif
  + 
  + $(TKPLUGINLIB): $(TKPLUGINDLL)
  + 
  + #$(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)/tk.res
  + #set LIB=$(TOOLS32)/lib
  + #        $(link32) $(ldebug) $(dlllflags)  + #-out:$@ $(TMPDIR)/tk.res $(TCLLIBDIR)/$(TCLPLUGINLIB)  + #$(guilibsdll) @<<
  + #$(TKOBJS)
  + #<<
  + 
  + $(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)/wish.res.o
  + $(link32) $(ldebug) $(guilflags) $(TMPDIR)/wish.res.o -o $@  + $(WISHOBJS) $(TCLLIBDIR)/$(TCLLIB) $(TKLIB) $(guilibsdll) 
  + 
  + $(WISHC): $(WISHOBJS) $(TKLIB) $(TMPDIR)/wish.res.o
  + $(link32) $(ldebug) $(conlflags) $(TMPDIR)/wish.res.o -o $@  + $(WISHOBJS) $(TCLLIBDIR)/$(TCLLIB) $(TKLIB) $(guilibsdll) 
  + 
  + $(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)/wish.res.o
  + $(link32) $(ldebug) $(guilflags) $(TMPDIR)/wish.res.o -o $@  + $(guilibsdll) $(TCLLIBDIR)/$(TCLPLUGINLIB)  + $(TKPLUGINLIB) $(WISHOBJS) 
  + 
  + $(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)/wish.res.o
  + $(link32) $(ldebug) $(guilflags) $(TMPDIR)/wish.res.o -o $@  + $(guilibsdll) $(TCLLIBDIR)/$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
  + 
  + $(CAT32): $(TCLDIR)/win/cat.c
  + $(cc32) $(CON_CFLAGS) -o $(TMPDIR)/cat.o $?
  + $(link32) $(conlflags) -o $@ -Wl,--stack,0x16384  + $(TMPDIR)/cat.o $(conlibs)
  + 
  + #
  + # Regenerate the stubs files.
  + #
  + 
  + genstubs:
  + tclsh$(VERSION) $(TCLDIR)/tools/genStubs.tcl $(GENERICDIR)  + $(GENERICDIR)/tk.decls $(GENERICDIR)/tkInt.decls
  + 
  + #
  + # Special case object file targets
  + #
  + 
  + $(TMPDIR)/testMain.o: $(ROOT)/win/winMain.c
  + $(cc32) $(WISH_CFLAGS) -DTK_TEST -o $@ $?
  + 
  + $(TMPDIR)/tkTest.o: $(ROOT)/generic/tkTest.c
  + $(cc32) $(WISH_CFLAGS) -o $@ $?
  + 
  + $(TMPDIR)/tkSquare.o: $(ROOT)/generic/tkSquare.c
  + $(cc32) $(WISH_CFLAGS) -o $@ $?
  + 
  + $(TMPDIR)/winMain.o: $(ROOT)/win/winMain.c
  + $(cc32) $(WISH_CFLAGS) -o $@ $?
  + 
  + $(TMPDIR)/tkStubLib.o : $(GENERICDIR)/tkStubLib.c
  + $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -o $@ $?
  + 
  + #
  + # Implicit rules
  + #
  + 
  + #{$(XLIBDIR)}.c{$(TMPDIR)}.o:
  + #$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)/ $<
  + #
  + #{$(GENERICDIR)}.c{$(TMPDIR)}.o:
  + #$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)/ $<
  + #
  + #{$(WINDIR)}.c{$(TMPDIR)}.o:
  + #$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)/ $<
  + #
  + #{$(ROOT)/unix}.c{$(TMPDIR)}.o:
  + #$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)/ $<
  + #
  + #{$(RCDIR)}.rc{$(TMPDIR)}.res:
  + #$(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)/include"  + #-i "$(TCLDIR)/generic" $<
  + 
  + %.o : %.c
  + $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o $@ $<
  + 
  + %.res.o : %.rc
  + $(rc32) $(rc32_flags) -o $@ --include "$(GENERICDIR)"  + --include $(RCDIR)  + --include "$(TCLDIR)/generic" $<
  + 
  + clean:
  + -@$(RM) $(OUTDIR)/*.exp 
  + -@$(RM) $(OUTDIR)/*.lib 
  + -@$(RM) $(OUTDIR)/*.dll 
  + -@$(RM) $(OUTDIR)/*.exe
  + -@$(RM) $(OUTDIR)/*.pdb
  + -@$(RM) $(TMPDIR)/*.pch
  + -@$(RM) $(TMPDIR)/*.o
  + -@$(RM) $(TMPDIR)/*.res.o
  + -@$(RM) $(TMPDIR)/*.exe
  + 
  + # dependencies
  + 
  + $(TMPDIR)/tk.res.o:  +     $(RCDIR)/buttons.bmp  +     $(RCDIR)/cursor*.cur  +     $(RCDIR)/tk.ico
  + 
  + $(GENERICDIR)/default.h: $(WINDIR)/tkWinDefault.h
  + $(GENERICDIR)/tkButton.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkCanvas.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkEntry.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkFrame.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkListbox.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkMenu.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkMenubutton.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkMessage.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkScale.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkScrollbar.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkText.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/default.h
  + $(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/default.h
  + 
  + $(GENERICDIR)/tkText.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextBTree.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextImage.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextMark.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/tkText.h
  + $(GENERICDIR)/tkTextWind.c: $(GENERICDIR)/tkText.h
  + 
  + $(GENERICDIR)/tkMacWinMenu.c: $(GENERICDIR)/tkMenu.h
  + $(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h
  + $(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h
  + $(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h
  + 
  *** win/aclocal.m4.origThu Feb 10 12:11:05 2000
  --- win/aclocal.m4Wed Feb 23 20:21:11 2000
  ***************
  *** 171,177 ****
        AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available [--disable-gcc]],
    [ok=$enableval], [ok=no])
        if test "$ok" = "yes"; then
  ! CC=gcc
    AC_PROG_CC
        else
    CC=cl
  --- 171,180 ----
        AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available [--disable-gcc]],
    [ok=$enableval], [ok=no])
        if test "$ok" = "yes"; then
  ! # Let user override.
  ! if test -z "$CC"; then
  !     CC=gcc
  ! fi
    AC_PROG_CC
        else
    CC=cl
  ***************
  *** 297,303 ****
        fi
    ])

  - 
    #--------------------------------------------------------------------
    # SC_CONFIG_CFLAGS
    #
  --- 300,305 ----
  ***************
  *** 320,339 ****
    #    CFLAGS_WARNING
    #    LDFLAGS_DEBUG
    #    LDFLAGS_OPTIMIZE
  ! #    PATHTYPE
    #    CC_OBJNAME
    #    CC_EXENAME
    #
  - #Defines the following vars for non-gcc compilers
    #    SHLIB_LD
    #    SHLIB_LD_LIBS
    #    LIBS
    #    AR
    #    MAKE_LIB
    #    MAKE_EXE
    #    MAKE_DLL
    #
    #    LIBSUFFIX
    #    LIBRARIES
    #    EXESUFFIX
    #    DLLSUFFIX
  --- 322,346 ----
    #    CFLAGS_WARNING
    #    LDFLAGS_DEBUG
    #    LDFLAGS_OPTIMIZE
  ! #LDFLAGS_CONSOLE
  ! #LDFLAGS_WINDOW
    #    CC_OBJNAME
    #    CC_EXENAME
  + #    PATHTYPE
  + #VPSEP
  + #CYGPATH
    #
    #    SHLIB_LD
    #    SHLIB_LD_LIBS
    #    LIBS
  + #LIBS_GUI
    #    AR
    #    MAKE_LIB
    #    MAKE_EXE
    #    MAKE_DLL
    #
    #    LIBSUFFIX
  + #    LIBPREFIX
    #    LIBRARIES
    #    EXESUFFIX
    #    DLLSUFFIX
  ***************
  *** 346,369 ****
        # set various compiler flags depending on whether we are using gcc or cl

        if test "${GCC}" = "yes" ; then
    CFLAGS_DEBUG=-g
  ! CFLAGS_OPTIMIZE=-O
    CFLAGS_WARNING="-Wall -Wconversion"
    LDFLAGS_DEBUG=-g
  ! LDFLAGS_OPTIMIZE=-O
  ! PATHTYPE=-u

    # Specify the CC output file names based on the target name
    CC_OBJNAME="-o \[$]@"
    CC_EXENAME="-o \[$]@"
        else
    SHLIB_LD="link -dll -nologo"
    SHLIB_LD_LIBS="user32.lib advapi32.lib"
    LIBS="user32.lib advapi32.lib"
    AR="lib -nologo"
    RC="rc"
    MAKE_LIB="\${AR} -out:\[$]@"
    MAKE_EXE="\${CC} -Fe\[$]@"

    if test "${SHARED_BUILD}" = "0" ; then
        # static
  --- 353,466 ----
        # set various compiler flags depending on whether we are using gcc or cl

        if test "${GCC}" = "yes" ; then
  + SHLIB_LD=""
  + SHLIB_LD_LIBS=""
  + LIBS=""
  + LIBS_GUI="-lgdi32 -lcomdlg32"
  + AR="${AR-ar}"
  + STLIB_LD="${AR-ar}"
  + RC="${WINDRES-windres}"
  + MAKE_LIB="\${AR} crv \[$]@"
  + MAKE_EXE="\${CC} -o \[$]@"
  + LIBPREFIX="lib"
  + 
  + if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[[3-6]]86[[^\/]]*-cygwin' >/dev/null; then
  +     mno_cygwin="yes"
  +     extra_cflags="-mno-cygwin"
  +     extra_ldflags="-mno-cygwin"
  + else
  +     mno_cygwin="no"
  +     extra_cflags=""
  +     extra_ldflags=""
  + fi
  + 
  + if test "$cross_compiling" = "yes" -o "$mno_cygwin" = "yes"; then
  +     PATHTYPE=''
  +     CYGPATH='echo '
  +     VPSEP=':'
  + else
  +     PATHTYPE='-w'
  +     CYGPATH='cygpath'
  +     VPSEP=';'
  + fi
  + 
  + if test "${SHARED_BUILD}" = "0" ; then
  +     # static
  +             AC_MSG_RESULT([using static flags])
  +     runtime=
  +     MAKE_DLL="echo "
  +     LIBSUFFIX="s\${DBGX}.a"
  +     LIBRARIES="\${STATIC_LIBRARIES}"
  +     EXESUFFIX="s\${DBGX}.exe"
  +     DLLSUFFIX=""
  + else
  +     # dynamic
  +             AC_MSG_RESULT([using shared flags])
  + 
  +     # check to see if ld supports --shared. Libtool does a much
  +     # more extensive test, but not really needed in this case.
  +     if test -z "$LD"; then
  + ld_prog="`(${CC} -print-prog-name=ld) 2>/dev/null`"
  + if test -z "$ld_prog"; then
  +   ld_prog=ld
  + else
  +   # get rid of the potential '\r' from ld_prog.
  +   ld_prog="`(echo $ld_prog | tr -d '\015' | sed 's,\\\\,\\/,g')`"
  + fi
  + LD="$ld_prog"
  +     fi
  + 
  +     AC_MSG_CHECKING([whether $ld_prog supports -shared option])
  + 
  +     # now the ad-hoc check to see if GNU ld supports --shared.
  +     if "$LD" --shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
  + ld_supports_shared="no"
  + SHLIB_LD="${DLLWRAP-dllwrap}"
  +     else
  + ld_supports_shared="yes"
  + SHLIB_LD="${CC} -shared"
  +     fi
  +     AC_MSG_RESULT([$ld_supports_shared])
  + 
  +     runtime=
  +     # Add SHLIB_LD_LIBS to the Make rule, not here.
  +     MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags}"
  +     if test "${ld_supports_shared}" = "yes"; then
  +         MAKE_DLL="${MAKE_DLL} -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
  +     else
  +         MAKE_DLL="${MAKE_DLL} --output-lib \$(patsubst %.dll,lib%.a,\[$]@)"
  +     fi
  +     LIBSUFFIX="\${DBGX}.a"
  +     DLLSUFFIX="\${DBGX}.dll"
  +     EXESUFFIX="\${DBGX}.exe"
  +     LIBRARIES="\${SHARED_LIBRARIES}"
  + fi
  + 
  + EXTRA_CFLAGS="${extra_cflags}"
    CFLAGS_DEBUG=-g
  ! CFLAGS_OPTIMIZE=-O2
    CFLAGS_WARNING="-Wall -Wconversion"
    LDFLAGS_DEBUG=-g
  ! LDFLAGS_OPTIMIZE=

    # Specify the CC out

  PatchFiles:
  Makefile.in Makefile.ming (new file) aclocal.m4 configure.in



  I'm marking this RFE as duplicate with respect to 5844.

  - eric
   
  -- 06/13/2000 ericm


tkt_uuid: 220069ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: 99. Other
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: Please bring back link to "options" on all Tk widget help pages.
comment:
  OriginalBugID: 4250 RFE
  Version: 8.3
  SubmitDate: '2000-02-28'
  LastModified: '2000-02-28'
  Severity: LOW
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 4156
  OS: All Windows
  ClosedDate: '2000-02-28'


  Name:
  Brian Schmidt

  DesiredBehavior:
  In previous versions of Tcl/Tk on Windows, in the Tcl/Tk reference help file there was a clickable link to "options" that explained the details of all Standard Options.  This clickable link is now gone and we have to do an index search for "options" or define a bookmark.  The clickable link we had before was handier.
  Thanks!


tkt_uuid: 220070ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
subsystem: None
priority: 1 Zero
foundin: final: 8.2.3
resolution: Duplicate
title: --enable-threads slows down all Tcl/Tk apps
comment:
  OriginalBugID: 4261 Bug
  Version: 8.2.3
  SubmitDate: '2000-02-28'
  LastModified: '2000-02-28'
  Severity: SER
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 2438
  OS: Linux
  OSVersion: Slackware Linus v7.0 (problem als present under Slackware v4.0 w
  Machine: Cyrix 6x86L-PR200 (home-built)
  ClosedDate: '2000-02-28'


  Name:
  Kevin D. Knerr, Sr.

  Extensions:
  TclX v8.2.0

  CustomShell:
  none

  Comments:
  I raised this issue on the TkRat list and was advised to compile Tcl w/o
      --enable-threads. One of the responses included the following
      confirmation:

      On 28 Feb, Robert Newcater wrote:
      > Kevin,
      > 
      > I can confirm that this also works for Tc/Tk 8.3 -- mainly for the
      benefit of others, but it's your thread  :-)
      > 
      > I also noticed this slowness when using Tcl/Tk 8.3 and TkRat 2.0b9.
      When I had TkRat running, I noticed that CPU usage by TkRat was between
      40% and 60% and that letters appeared on screen quite slowly (on a PII
      350 with 128 MB RAM).  I had also compiled Tcl/Tk with --enable-threads
      at the configure stage.
      > 
      > Recompiling Tcl/Tk without the --enable-threads parameter and then
      recompiling TkRat soved the problem.
      > 

      A further reply noted that threads are not supported in wish and that a
      bug-report should be filed with Scriptics. (Hence this bug report ;-)

      In the stupid question department, if wish doesn't support threads, why
      is there an "enable-treads" option in the first place? Nor is there
      anything that I found in reading the INSTALL/README items that would
      suggest that enabling threads would be a bad idea, even if I had a
      kernel which supported threads.

      If this is not an easily fixable bug (and I suspect that it's not--it
      might well have been present throughout the 8.x series), could you at
      least update the installation info regarding the circumstances under
      which it is advisable to use --enable-threads? TIA

  ReproducibleScript:
  compile tcl 8.2.x/8.3 with --enable-threads on a system w/ thread-safe Xlibs, such as XFree86 3.3.x or better.
  invoke just about any tcl/tk app that uses extensive text input -- such as TkRat v2.0bx

  ObservedBehavior:
  watch your system slow to a crawl as you try to type a simple 4 line email :-(

  DesiredBehavior:
  system responsiveness commesurate with my system specs, as modified by cpu load


tkt_uuid: 220071ffffffffffffffffffffffffffffffffff
type: Bug
status: Deleted
subsystem: 06. Canvas Postscript
priority: 1 Zero
foundin: obsolete: 8.3
resolution: Duplicate
title: patch to enable Poscript creation for photo images
comment:
  OriginalBugID: 4268 RFE
  Version: 8.3
  SubmitDate: '2000-02-29'
  LastModified: '2000-04-14'
  Severity: CRIT
  Status: Closed
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 5030
  OS: Windows 98
  Machine: Pentium // 300Mhz 32 MB RAM 24 bit color screen
  ClosedDate: '2000-04-14'


  Name:

  Alberto Biancardi



  Comments:

  The Postscript created handles transparency (due to a bug in some

      hp printers a pixel is transparent when alpha is equal to zero or one)

      The Postscript created is Level 2 only, but I think that handling

      transparencies is a big bonus.

      

      On the C code side.

      There is a kind of deadlock owing to TkPostscriptInfo and Image

      structures being opaque outside their respective files; I did not

      change anything, but I had to make the decision of passsing

      the masterData pointer to the postscriptProc and then bounce

      back to the tkImgPhoto.c after getting the colorLevel info ...

      

      I tried my best to test the code, but, even if I need to run wish

      on Windows, I can only compile on linux.

      Anyway I think my patch works on other platforms as well ...



  ReproducibleScript:

  cd $tk_library/images

  pack [canvas .c -width 600 -height 800]

  .c create image 300 400 -image \

  [image create photo -file pwrdLogo75.gif]

  .c postscript -file test.ps



  ObservedBehavior:

  Wish crashes because XGetImage is not implemented.



  DesiredBehavior:

  In my opinion using XGetImage is not necessary, it is not

  portable and links the color level of the output to the visual

  of the canvas (which is something unusual).



  By looking at the sources I think that most of the neccessary changes

  are already in place: any image type should provide its own

  image-to-postscript function.

  Moreover it would benefit from working directly on the master data

  avoiding any dithering or, at any rate, letting the postscript

  device do whatever it thinks optimal.





  Now, what I do not understand is why the function Tk_PostscriptImage

  does not check whether a Tk_ImagePostscriptProc is defined or not

  for the current image.

  Secondly, I would define a TkPostscriptPhoto which specialises

  postscript generation for photo images.



  Patch:

  *** tkCanvPs.c.origTue Dec 14 07:52:26 1999

  --- tkCanvPs.cMon Feb 28 11:26:33 2000

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

  *** 1681,1683 ****

  --- 1681,1856 ----

        ckfree((char *) cdata.colors);

        return TCL_OK;

    }

  + 

  + 

  + 

  + 

  + /*

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

  +  *

  +  * TkPostscriptPhoto --

  +  *

  +  *This procedure is called to output the contents of a

  +  *photo image in Postscript by calling the AppendPhotoPsData

  +  *      function.

  +  *

  +  * Results:

  +  *Returns a standard Tcl return value.

  +  *

  +  * Side effects:

  +  *None.

  +  *

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

  +  */

  + 

  + int

  + TkPostscriptPhoto(clientData, interp, tkwin, psInfo,

  +         x, y, width, height, prepass)

  +     ClientData clientData;      /* photo image pointer*/

  +     Tcl_Interp *interp;

  +     Tk_Window tkwin;

  +     Tk_PostscriptInfo psInfo;/* postscript info */

  +     int x, y;/* First pixel to output */

  +     int width, height;/* Width and height of area */

  +     int prepass;

  + {

  +     

  +     TkPostscriptInfo *psInfoPtr = (TkPostscriptInfo *) psInfo;

  +     static int codeIncluded = 0;

  +     int level = psInfoPtr->colorLevel;

  + 

  + 

  +     if (psInfoPtr->prepass) {

  + codeIncluded = 0;

  + return TCL_OK;

  +     }

  + 

  + 

  +     /*

  +      * Define the "colTrImage" function, which is a modified version

  +      * of the original "transparentimage" function posted

  +      * by ian@five-d.com (Ian Kemmish) to comp.lang.postscript.

  +      */

  + 

  +     if( !codeIncluded && level!=0) {

  + codeIncluded = !0;

  + Tcl_AppendResult( interp,

  + "/TkPhoto { \n",

  + "  gsave \n",

  + "  32 dict begin \n",

  + "  /tinteger exch def \n",

  + "  /transparent 1 string def \n",

  + "  transparent 0 tinteger put \n",

  + "  /olddict exch def \n",

  + "  olddict /DataSource get dup type /filetype ne { \n",

  + "    olddict /DataSource 3 -1 roll \n",

  + "    0 () /SubFileDecode filter put \n",

  + "  } { \n",

  + "    pop \n",

  + "  } ifelse \n",

  + "  /newdict olddict maxlength dict def \n",

  + "  olddict newdict copy pop \n",

  + "  /w newdict /Width get def \n",

  + "  /crpp newdict /Decode get length 2 idiv def \n",

  + "  /str w string def \n",

  + "  /pix w crpp mul string def \n",

  + "  /substrlen 2 w log 2 log div floor exp cvi def \n",

  + "  /substrs [ \n",

  + "  { \n",

  + "     substrlen string \n",

  + "     0 1 substrlen 1 sub { \n",

  + "       1 index exch tinteger put \n",

  + "     } for \n",

  + "     /substrlen substrlen 2 idiv def \n",

  + "     substrlen 0 eq {exit} if \n",

  + "  } loop \n",

  + "  ] def \n",

  + "  /h newdict /Height get def \n",

  + "  1 w div 1 h div matrix scale \n",

  + "  olddict /ImageMatrix get exch matrix concatmatrix \n",

  + "  matrix invertmatrix concat \n",

  + "  newdict /Height 1 put \n",

  + "  newdict /DataSource pix put \n",

  + "  /mat [w 0 0 h 0 0] def \n",

  + "  newdict /ImageMatrix mat put \n",

  + "  0 1 h 1 sub { \n",

  + "    mat 5 3 -1 roll neg put \n",

  + "    olddict /DataSource get str readstring pop pop \n",

  + "    /tail str def \n",

  + "    /x 0 def \n",

  + "    olddict /DataSource get pix readstring pop pop \n",

  + "    { \n",

  + "      tail transparent search dup /done exch not def \n",

  + "      {exch pop exch pop} if \n",

  + "      /w1 exch length def \n",

  + "      w1 0 ne { \n",

  + "        newdict /DataSource ",

  +           " pix x crpp mul w1 crpp mul getinterval put \n",

  + "        newdict /Width w1 put \n",

  + "        mat 4 x neg put \n",

  + "        /x x w1 add def \n",

  + "        newdict image \n",

  + "        /tail tail w1 tail length w1 sub getinterval def \n",

  + "      } if \n",

  + "      done {exit} if \n",

  + "      tail substrs { \n",

  + "        anchorsearch {pop} if \n",

  + "      } forall \n",

  + "      /tail exch def \n",

  + "      tail length 0 eq {exit} if \n",

  + "      /x w tail length sub def \n",

  + "    } loop \n",

  + "  } for \n",

  + "  end \n",

  + "  grestore \n",

  + "} bind def \n\n\n", (char *) NULL);

  +     } else if( !codeIncluded ) {

  + /*

  +  * Append monochrome-only code

  +  */

  + codeIncluded = !0;

  + Tcl_AppendResult( interp,

  + "/TkPhoto { \n",

  + "  gsave \n",

  + "  32 dict begin \n",

  + "  /dummyInteger exch def \n",

  + "  /olddict exch def \n",

  + "  olddict /DataSource get dup type /filetype ne { \n",

  + "    olddict /DataSource 3 -1 roll \n",

  + "    0 () /SubFileDecode filter put \n",

  + "  } { \n",

  + "    pop \n",

  + "  } ifelse \n",

  + "  /newdict olddict maxlength dict def \n",

  + "  olddict newdict copy pop \n",

  + "  /w newdict /Width get def \n",

  + "  /pix w 7 add 8 idiv string def \n",

  + "  /h newdict /Height get def \n",

  + "  1 w div 1 h div matrix scale \n",

  + "  olddict /ImageMatrix get exch matrix concatmatrix \n",

  + "  matrix invertmatrix concat \n",

  + "  newdict /Height 1 put \n",

  + "  newdict /DataSource pix put \n",

  + "  /mat [w 0 0 h 0 0] def \n",

  + "  newdict /ImageMatrix mat put \n",

  + "  0 1 h 1 sub { \n",

  + "    mat 5 3 -1 roll neg put \n",

  + "    0.000 0.000 0.000 setrgbcolor \n",

  + "    olddict /DataSource get pix readstring pop pop \n",

  + "    newdict /DataSource pix put \n",

  + "    newdict imagemask \n",

  + "    1.000 1.000 1.000 setrgbcolor \n",

  + "    olddict /DataSource get pix readstring pop pop \n",

  + "    newdict /DataSource pix put \n",

  + "    newdict imagemask \n",

  + "  } for \n",

  + "  end \n",

  + "  grestore \n",

  + "} bind def \n\n\n", (char *) NULL);

  +     }

  + 

  + 

  + 

  +     return TkAppendPhotoPsData( clientData, interp,

  +     x, y, width, height, level);

  + }

  *** tkImage.c.origTue Dec 14 07:52:28 1999

  --- tkImage.cThu Feb 24 14:54:58 2000

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

  *** 634,644 ****

  --- 634,669 ----

        int width, height;/* Dimensions of region to redraw. */

        int prepass;

    {

  +     Image *imagePtr = (Image *) image;

        int result;

        XImage *ximage;

        Pixmap pmap;

        GC newGC;

        XGCValues gcValues;

  + 

  + 

  +     if (imagePtr->masterPtr->typePtr == NULL) {

  + /*

  +  * No master for image, so nothing to display on postscript.

  +  */

  + 

  + return TCL_OK;

  +     }

  + 

  + 

  +     /*

  +      * Check if an image specific postscript-generation function

  +      * exists; otherwise go on with generic code.

  +      */

  + 

  +     if (imagePtr->masterPtr->typePtr->postscriptProc != NULL) {

  +         return (*imagePtr->masterPtr->typePtr->postscriptProc)(

  +         imagePtr->masterPtr->masterData, interp, tkwin, psinfo,

  + x, y, width, height, prepass);

  +     }

  + 

  + 

  + 

        if (prepass) {

    return TCL_OK;

        }

  *** tkImgPhoto.c.origTue Feb  8 12:31:33 2000

  --- tkImgPhoto.cMon Feb 28 11:31:45 2000

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

  *** 31,37 ****

     * Declaration for internal Xlib function used here:

     */

    

  ! extern _XInitImageFuncPtrs _ANSI_ARGS_((XImage *image));

    

    /*

     * A signed 8-bit integral type.  If chars are unsigned and the compiler

  --- 31,37 ----

     * Declaration for internal Xlib function used here:

     */

    

  ! extern void _XInitImageFuncPtrs _ANSI_ARGS_((XImage *image));

    

    /*

     * A signed 8-bit integral type.  If chars are unsigned and the compiler

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

  *** 301,307 ****

        ImgPhotoDisplay,/* displayProc */

        ImgPhotoFree,/* freeProc */

        ImgPhotoDelete,/* deleteProc */

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

        (Tk_ImageType *) NULL/* nextPtr */

    };

    

  --- 301,307 ----

        ImgPhotoDisplay,/* displayProc */

        ImgPhotoFree,/* freeProc */

        ImgPhotoDelete,/* deleteProc */

  !     TkPostscriptPhoto,          /* postscriptProc */

        (Tk_ImageType *) NULL/* nextPtr */

    };

    

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

  *** 5111,5114 ****

  --- 5111,5411 ----

        ptr->nextPtr = list;

        Tcl_SetAssocData(interp, "photoOption", PhotoOptionCleanupProc,

    (ClientData) ptr);

  + }

  + 

  + 

  + 

  + 

  + /*

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

  +  *

  +  * TkAppendPostscriptData --

  +  *

  +  *This procedure is called to output the contents of a

  +  *photo image in Postscript, using a format appropriate for 

  +  *      the requested postscript color mode (i.e. one byte per pixel

  +  *      in gray, and three bytes per pixel in color).

  +  *

  +  * Results:

  +  *Returns a standard Tcl return value.  If an error occurs

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

  +  *If no error occurs, then additional Postscript will be

  +  *appended to interp->result.

  +  *

  +  * Side effects:

  +  *None.

  +  *

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

  +  */

  + 

  + 

  + int

  + TkAppendPhotoPsData( clientData, interp, x, y, width, height, colorLevel)

  +     ClientData clientData;      /* photo image pointer*/

  +     Tcl_Interp *interp;

  +     int x, y;/* First pixel to output */

  +     int width, height;/* Width and height of area */

  +     int colorLevel;

  + {

  +     PhotoMaster *masterPtr = (PhotoMaster *)  clientData;

  +     unsigned char *pixelPtr;

  +     char buffer[256], cspace[40], decode[40];

  +     int bpc;

  +     int xx, yy, lineLen;

  +     float red, green, blue;

  +     int alpha;

  +     int bytesPerLine=0, maxWidth=0;

  + 

  + 

  +     /*

  +      * Check that at least one row of the image can be represented

  +      * with a string less than 64 KB long (this is a limit in the 

  +      * Postscript interpreter).

  +      */

  + 

  +     switch (colorLevel)

  +     {

  + case 0: bytesPerLine = (width + 7) / 8;  maxWidth = 240000;  break;

  + case 1: bytesPerLine = 2 * width;  maxWidth = 30000;  break;

  + default: bytesPerLine = 4 * width;  maxWidth = 15000;  break;

  +     }

  + 

  +     if (bytesPerLine > 60000) {

  + Tcl_ResetResult(interp);

  + sprintf(buffer,

  + "Can't generate Postscript for images more than %d pixels wide",

  + maxWidth);

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

  + return TCL_ERROR;

  +     }

  + 

  + 

  + #if 0

  +     if (colorLevel!=0) {

  + sprintf(buffer, "0 %d translate\n", height);

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

  +     }

  + #endif

  + 

  + 

  +     switch (colorLevel) {

  + case 0: 

  +     strcpy( cspace, "/DeviceGray");

  +     strcpy( decode, "[1 0]");

  +     bpc = 1;

  +     break;

  + case 1: 

  +     strcpy( cspace, "/DeviceGray");

  +     strcpy( decode, "[0 1]");

  +     bpc = 8;

  +     break;

  + default:

  +     strcpy( cspace, "/DeviceRGB");

  +     strcpy( decode, "[0 1 0 1 0 1]");

  +     bpc = 8;

  +     break;

  +     }

  + 

  + 

  +     sprintf(buffer,

  +     "\n%%%%0 -%d translate\ngsave\n%d  %d scale\n",

  +     height, width, height);

  + 

  +     Tcl_AppendResult(interp, buffer,

  +     cspace, " setcolorspace\n\n",

  +     (char *) NULL);

  + 

  +     sprintf(buffer,

  +     "  /Width %d\n  /Height %d\n  /BitsPerComponent %d\n",

  +     width, height,  bpc);

  + 

  +     Tcl_AppendResult(interp,

  +     "<<\n  /ImageType 1\n", buffer,

  +     "  /DataSource currentfile /ASCIIHexDecode filter\n",

  +     (char *) NULL);

  + 

  + 

  +     sprintf(buffer,

  +     "  /ImageMatrix [%d 0 0 -%d 0 %d]\n",  width, height, height);

  + 

  + 

  + 

  +     /* per le immagini mono devo generare 2 set di pixel

  +      * uno per i pixel bianchi e 1 x quelli neri ed usare imagemask!

  +      */

  + 

  +     Tcl_AppendResult(interp, buffer,

  +     "  /Decode ", decode,

  +     "\n>>\n1 TkPhoto\n",

  +     (char *) NULL);

  + 

  +     for (yy = y, lineLen=0; yy < y+height; yy++) {

  + switch (colorLevel) {

  +     case 0: {

  + /*

  +  * Generate data for image in monochrome mode.

  +  * No attempt at dithering is made--instead, just

  +  * set a threshold.

  +  * To handle transparecies we need to output two lines:

  +  * one for the black pixels, one for the white ones.

  +  */

  + 

  + unsigned char mask=0x80;

  + unsigned char data=0x00;

  + for (xx = x; xx< x+width; xx++) {

  +     pixelPtr = masterPtr->pix24 + 

  + (yy * masterPtr->width + xx) * 4;

  +     red = *(pixelPtr++);

  +     green = *(pixelPtr++);

  +     blue = *(pixelPtr++);

  +     alpha = *(pixelPtr++);

  + 

  +     /*

  +      * If pixel is than threshold, then it is black.

  +      */

  + 

  +     if ((alpha != 0) && 

  + ( 0.3086 * red + 0.6094 * green + 0.082 * blue < 128))

  + data |= mask;

  +     mask >>= 1;

  +     if (mask == 0) {

  + sprintf(buffer, "%02X", data);

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

  + lineLen += 2;

  + if (lineLen >= 60) {

  +     lineLen = 0;

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

  + }

  + mask=0x80;

  + data=0x00;

  +     }

  + }

  + if ((width % 8) != 0) {

  +     sprintf(buffer, "%02X", data);

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

  +     mask=0x80;

  +     data=0x00;

  + }

  + 

  + mask=0x80;

  + data=0x00;

  + for (xx = x; xx< x+width; xx++) {

  +     pixelPtr = masterPtr->pix24 + 

  + (yy * masterPtr->width + xx) * 4;

  +     red = *(pixelPtr++);

  +     green = *(pixelPtr++);

  +     blue = *(pixelPtr++);

  +     alpha = *(pixelPtr++);

  + 

  +     /*

  +      * If pixel is than threshold, then it is black.

  +      */

  + 

  +     if ((alpha != 0) && 

  + ( 0.3086 * red + 0.6094 * green + 0.082 * blue >= 128))

  + data |= mask;

  +     mask >>= 1;

  +     if (mask == 0) {

  + sprintf(buffer, "%02X", data);

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

  + lineLen += 2;

  + if (lineLen >= 60) {

  +     lineLen = 0;

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

  + }

  + mask=0x80;

  + data=0x00;

  +     }

  + }

  + if ((width % 8) != 0) {

  +     sprintf(buffer, "%02X", data);

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

  +     mask=0x80;

  +     data=0x00;

  + }

  + break;

  +     }

  +     case 1: {

  + /*

  +  * Generate transparency data.

  +  */

  + for (xx = x; xx < x+width; xx ++) {

  +     pixelPtr = masterPtr->pix24 + 

  +     (yy * masterPtr->width + xx) * 4;

  +     sprintf(buffer, "%02X", pixelPtr[3] | 0x01);

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

  +     lineLen += 2;

  +     if (lineLen >= 60) {

  + lineLen = 0;

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

  +     }

  + }

  + 

  + 

  + /*

  +  * Generate data in gray mode--in this case, take a 

  +  * weighted sum of the red, green, and blue values.

  +  */

  + 

  + for (xx = x; xx < x+width; xx ++) {

  +     pixelPtr = masterPtr->pix24 + 

  +     (yy * masterPtr->width + xx) * 4;

  +     red = *(pixelPtr++);

  +     green = *(pixelPtr++);

  +     blue = *(pixelPtr++);

  +     sprintf(buffer, "%02X", (int) floor(0.5 +

  +     ( 0.3086 * red 

  +     + 0.6094 * green 

  +     + 0.0820 * blue)));

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

  +     lineLen += 2;

  +     if (lineLen >= 60) {

  + lineLen = 0;

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

  +     }

  + }

  + break;

  +     }

  +     default: {

  + /*

  +  * Generate transparency data.

  +  */

  + for (xx = x; xx < x+width; xx ++) {

  +     pixelPtr = masterPtr->pix24 + 

  +     (yy * masterPtr->width + xx) * 4;

  +     sprintf(buffer, "%02X", pixelPtr[3] | 0x01);

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

  +     lineLen += 2;

  +     if (lineLen >= 60) {

  + lineLen = 0;

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

  +     }

  + }

  + 

  + 

  + /*

  +  * Finally, color mode.  Here, just output the red, green,

  +  * and blue values directly.

  +  */

  + 

  + for (xx = x; xx < x+width; xx++) {

  +     pixelPtr = masterPtr->pix24 + 

  +     (yy * masterPtr->width + xx) * 4;

  +     sprintf(buffer, "%02X%02X%02X",

  +     pixelPtr[0], pixelPtr[1], pixelPtr[2]);

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

  +     lineLen += 6;

  +     if (lineLen >= 60) {

  + lineLen = 0;

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

  +     }

  + }

  + break;

  +     }

  + }

  +     }

  + 

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

  +     return TCL_OK;

  + 

    }

  *** tkInt.h.origFri Jan 21 04:54:41 2000

  --- tkInt.hThu Feb 24 14:21:54 2000

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

  *** 999,1004 ****

  --- 999,1009 ----

    EXTERN intTk_WmCmd _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, int argc, char **argv));

    

  + EXTERN int              TkAppendPhotoPsData _ANSI_ARGS_((

  +                             ClientData clientData, Tcl_Interp *interp,

  +     int x, int y, int width, int height,

  +     int colorLevel));

  + 

    voidTkConsolePrint _ANSI_ARGS_((Tcl_Interp *interp,

        int devId, char *buffer, long size));

    

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

  *** 1052,1057 ****

  --- 1057,1067 ----

        Tk_Window tkwin, Tk_PostscriptInfo psInfo,

        XImage *ximage, int x, int y, int width,

        int height));

  + EXTERN intTkPostscriptPhoto _ANSI_ARGS_((

  +     ClientData clientData, Tcl_Interp *interp,

  +     Tk_Window tkwin, Tk_PostscriptInfo psInfo,

  +     int x, int y, int width, int height,

  +     int prepass));

    EXTERN intTkSmoothParseProc _ANSI_ARGS_((ClientData clientData,

        Tcl_Interp *interp, Tk_Window tkwin,

        CONST char *value, char *recordPtr, int offset));



  PatchFiles:

  tkInt.h tkCanvPs.c tkImage.c tkImgPhoto.c


