summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-11-19 23:35:41 (GMT)
committerhobbs <hobbs>1999-11-19 23:35:41 (GMT)
commita96628d114a8e503ed853a5f3fe3e688e48ffe99 (patch)
treebab16325331c2814a6103653db7742e43579d817
parenta0aea84bcfa5f2c75e799cbd2b9c3a4511865feb (diff)
downloadtk-a96628d114a8e503ed853a5f3fe3e688e48ffe99.zip
tk-a96628d114a8e503ed853a5f3fe3e688e48ffe99.tar.gz
tk-a96628d114a8e503ed853a5f3fe3e688e48ffe99.tar.bz2
* README:
* unix/configure.in: * win/configure.in: * generic/tk.h: updated to patchlevel 3 * generic/tkColor.c: * generic/tkColor.h: fixed Tk_NameOfColor to work correctly, with minor change to TkColor struct. * generic/tkEntry.c: fixed C expr error in destroy of entry that could lead to 'malformed bucket chain' error
-rw-r--r--ChangeLog13
-rw-r--r--README4
-rw-r--r--generic/tk.h6
-rw-r--r--generic/tkColor.c20
-rw-r--r--generic/tkColor.h8
-rw-r--r--generic/tkEntry.c4
6 files changed, 36 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 6272423..c4db457 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+1999-11-19 Jeff Hobbs <hobbs@scriptics.com>
+
+ * README:
+ * unix/configure.in:
+ * win/configure.in:
+ * generic/tk.h: updated to patchlevel 3
+
+ * generic/tkColor.c:
+ * generic/tkColor.h: fixed Tk_NameOfColor to work correctly,
+ with minor change to TkColor struct.
+ * generic/tkEntry.c: fixed C expr error in destroy of entry
+ that could lead to 'malformed bucket chain' error
+
1999-11-02 Jeff Hobbs <hobbs@scriptics.com>
* tagged 8.2.2 final
diff --git a/README b/README
index 3296a30..95dff39 100644
--- a/README
+++ b/README
@@ -4,14 +4,14 @@ README: Tk
service to the Tcl community by Scriptics Corporation.
http://www.scriptics.com/
-RCS: @(#) $Id: README,v 1.19.2.2 1999/10/30 09:35:41 hobbs Exp $
+RCS: @(#) $Id: README,v 1.19.2.3 1999/11/19 23:35:41 hobbs Exp $
1. Introduction
---------------
This directory contains the sources and documentation for Tk, an X11
toolkit implemented with the Tcl scripting language. The information
-here corresponds to release 8.2.2, which is the first patch release
+here corresponds to release 8.2.3, which is the first patch release
for Tk 8.2.
For details on features, incompatibilities, and potential problems with
diff --git a/generic/tk.h b/generic/tk.h
index 2e62d05..8d72323 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.30.2.2 1999/10/30 09:35:56 hobbs Exp $
+ * RCS: @(#) $Id: tk.h,v 1.30.2.3 1999/11/19 23:35:43 hobbs Exp $
*/
#ifndef _TK
@@ -46,10 +46,10 @@ extern "C" {
#define TK_MAJOR_VERSION 8
#define TK_MINOR_VERSION 2
#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
-#define TK_RELEASE_SERIAL 2
+#define TK_RELEASE_SERIAL 3
#define TK_VERSION "8.2"
-#define TK_PATCH_LEVEL "8.2.2"
+#define TK_PATCH_LEVEL "8.2.3"
/*
* The following definitions set up the proper options for Macintosh
diff --git a/generic/tkColor.c b/generic/tkColor.c
index 8c6b0be..e3025d3 100644
--- a/generic/tkColor.c
+++ b/generic/tkColor.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkColor.c,v 1.5 1999/04/21 21:53:25 rjohnson Exp $
+ * RCS: @(#) $Id: tkColor.c,v 1.5.6.1 1999/11/19 23:35:44 hobbs Exp $
*/
#include "tkColor.h"
@@ -254,7 +254,7 @@ Tk_GetColor(interp, tkwin, name)
tkColPtr->visual = Tk_Visual(tkwin);
tkColPtr->resourceRefCount = 1;
tkColPtr->objRefCount = 0;
- tkColPtr->tablePtr = &dispPtr->colorNameTable;
+ tkColPtr->type = TK_COLOR_BY_NAME;
tkColPtr->hashPtr = nameHashPtr;
tkColPtr->nextPtr = existingColPtr;
Tcl_SetHashValue(nameHashPtr, tkColPtr);
@@ -334,7 +334,7 @@ Tk_GetColorByValue(tkwin, colorPtr)
tkColPtr->visual = Tk_Visual(tkwin);
tkColPtr->resourceRefCount = 1;
tkColPtr->objRefCount = 0;
- tkColPtr->tablePtr = &dispPtr->colorValueTable;
+ tkColPtr->type = TK_COLOR_BY_VALUE;
tkColPtr->hashPtr = valueHashPtr;
tkColPtr->nextPtr = NULL;
Tcl_SetHashValue(valueHashPtr, tkColPtr);
@@ -368,15 +368,17 @@ Tk_NameOfColor(colorPtr)
XColor *colorPtr; /* Color whose name is desired. */
{
register TkColor *tkColPtr = (TkColor *) colorPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
- Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- if (tkColPtr->magic == COLOR_MAGIC) {
+ if ((tkColPtr->magic == COLOR_MAGIC) &&
+ (tkColPtr->type == TK_COLOR_BY_NAME)) {
return tkColPtr->hashPtr->key.string;
+ } else {
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
+ sprintf(tsdPtr->rgbString, "#%04x%04x%04x", colorPtr->red,
+ colorPtr->green, colorPtr->blue);
+ return tsdPtr->rgbString;
}
- sprintf(tsdPtr->rgbString, "#%04x%04x%04x", colorPtr->red,
- colorPtr->green, colorPtr->blue);
- return tsdPtr->rgbString;
}
/*
diff --git a/generic/tkColor.h b/generic/tkColor.h
index 7e1ab3b..fe1c01b 100644
--- a/generic/tkColor.h
+++ b/generic/tkColor.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkColor.h,v 1.5 1999/04/16 01:51:12 stanton Exp $
+ * RCS: @(#) $Id: tkColor.h,v 1.5.6.1 1999/11/19 23:35:44 hobbs Exp $
*/
#ifndef _TKCOLOR
@@ -28,6 +28,9 @@
* is a colormap entry allocated for each of these colors.
*/
+#define TK_COLOR_BY_NAME 1
+#define TK_COLOR_BY_VALUE 2
+
#define COLOR_MAGIC ((unsigned int) 0x46140277)
typedef struct TkColor {
@@ -55,8 +58,7 @@ typedef struct TkColor {
* are both 0. */
int objRefCount; /* The number of Tcl objects that reference
* this structure. */
- Tcl_HashTable *tablePtr; /* Hash table that indexes this structure
- * (needed when deleting structure). */
+ int type; /* TK_COLOR_BY_NAME or TK_COLOR_BY_VALUE */
Tcl_HashEntry *hashPtr; /* Pointer to hash table entry for this
* structure. (for use in deleting entry). */
struct TkColor *nextPtr; /* Points to the next TkColor structure with
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index fd46cb3..937f42f 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.5 1999/08/10 05:05:48 jingham Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.5.4.1 1999/11/19 23:35:44 hobbs Exp $
*/
#include "tkInt.h"
@@ -1946,7 +1946,7 @@ EntryCmdDeletedProc(clientData)
* destroys the widget.
*/
- if (! entryPtr->flags & ENTRY_DELETED) {
+ if (!(entryPtr->flags & ENTRY_DELETED)) {
Tk_DestroyWindow(entryPtr->tkwin);
}
}