diff options
-rw-r--r-- | generic/tkCanvLine.c | 7 | ||||
-rw-r--r-- | generic/tkInt.h | 7 | ||||
-rw-r--r-- | generic/tkListbox.c | 18 | ||||
-rw-r--r-- | generic/tkPack.c | 5 | ||||
-rw-r--r-- | generic/tkText.c | 12 |
5 files changed, 28 insertions, 21 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 328d184..59c936e 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvLine.c,v 1.5 1999/12/14 06:52:26 hobbs Exp $ + * RCS: @(#) $Id: tkCanvLine.c,v 1.6 2000/01/21 03:54:41 hobbs Exp $ */ #include <stdio.h> @@ -416,6 +416,11 @@ LineCoords(interp, canvas, itemPtr, argc, argv) "odd number of coordinates specified for line", (char *) NULL); return TCL_ERROR; + } else if (argc < 4) { + Tcl_AppendResult(interp, + "too few coordinates specified for line", + (char *) NULL); + return TCL_ERROR; } else { numPoints = argc/2; if (linePtr->numPoints != numPoints) { diff --git a/generic/tkInt.h b/generic/tkInt.h index bf747f5..3532475 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -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: tkInt.h,v 1.20 1999/12/16 21:57:36 hobbs Exp $ + * RCS: $Id: tkInt.h,v 1.21 2000/01/21 03:54:41 hobbs Exp $ */ #ifndef _TKINT @@ -482,7 +482,6 @@ typedef struct TkDisplay { #ifdef TK_USE_INPUT_METHODS XIM inputMethod; /* Input method for this display */ #endif /* TK_USE_INPUT_METHODS */ - int useInputMethods; /* Whether to use input methods */ Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */ int refCount; /* Reference count of how many Tk applications @@ -490,12 +489,16 @@ typedef struct TkDisplay { * the display when we no longer have any * Tk applications using it. */ + /* + * The following field were all added for Tk8.3 + */ int mouseButtonState; /* current mouse button state for this * display */ int warpInProgress; Window warpWindow; int warpX; int warpY; + int useInputMethods; /* Whether to use input methods */ } TkDisplay; /* diff --git a/generic/tkListbox.c b/generic/tkListbox.c index fd16994..2c587ed 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.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: tkListbox.c,v 1.14 1999/11/29 18:16:21 hobbs Exp $ + * RCS: @(#) $Id: tkListbox.c,v 1.15 2000/01/21 03:54:42 hobbs Exp $ */ #include "tkPort.h" @@ -231,13 +231,13 @@ static Tk_OptionSpec optionSpecs[] = { Tk_Offset(Listbox, highlightWidth), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_LISTBOX_RELIEF, -1, Tk_Offset(Listbox, relief), 0, 0, 0}, - {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Background", + {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_LISTBOX_SELECT_COLOR, -1, Tk_Offset(Listbox, selBorder), 0, (ClientData) DEF_LISTBOX_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_LISTBOX_SELECT_BD, -1, Tk_Offset(Listbox, selBorderWidth), 0, 0, 0}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Foreground", + {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_LISTBOX_SELECT_FG_COLOR, -1, Tk_Offset(Listbox, selFgColorPtr), 0, (ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0}, {TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode", @@ -279,11 +279,11 @@ static Tk_OptionSpec itemAttrOptionSpecs[] = { {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", (char *) NULL, -1, Tk_Offset(ItemAttr, fgColor), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, - {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Background", + {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", (char *) NULL, -1, Tk_Offset(ItemAttr, selBorder), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, (ClientData) DEF_LISTBOX_SELECT_MONO, 0}, - {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Foreground", + {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", (char *) NULL, -1, Tk_Offset(ItemAttr, selFgColor), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, (ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0}, @@ -2513,16 +2513,16 @@ GetListboxIndex(interp, listPtr, indexObj, endIsSize, indexPtr) strtol(start, &end, 0); if ((start == end) || (*end != ',')) { Tcl_AppendResult(interp, "bad listbox index \"", stringRep, - "\": must be active, anchor, end, @x,y, or a " - "number", (char *)NULL); + "\": must be active, anchor, end, @x,y, or a number", + (char *)NULL); return TCL_ERROR; } start = end+1; y = strtol(start, &end, 0); if ((start == end) || (*end != '\0')) { Tcl_AppendResult(interp, "bad listbox index \"", stringRep, - "\": must be active, anchor, end, @x,y, or a " - "number", (char *)NULL); + "\": must be active, anchor, end, @x,y, or a number", + (char *)NULL); return TCL_ERROR; } *indexPtr = NearestListboxElement(listPtr, y); diff --git a/generic/tkPack.c b/generic/tkPack.c index b5bb7be..b1ac35d 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPack.c,v 1.4 1999/09/21 06:42:30 hobbs Exp $ + * RCS: @(#) $Id: tkPack.c,v 1.5 2000/01/21 03:54:42 hobbs Exp $ */ #include "tkPort.h" @@ -1313,7 +1313,6 @@ PackStructureProc(clientData, eventPtr) XEvent *eventPtr; /* Describes what just happened. */ { register Packer *packPtr = (Packer *) clientData; - TkDisplay *dispPtr; if (eventPtr->type == ConfigureNotify) { if ((packPtr->slavePtr != NULL) @@ -1345,7 +1344,7 @@ PackStructureProc(clientData, eventPtr) slavePtr->nextPtr = NULL; } if (packPtr->tkwin != NULL) { - dispPtr = ((TkWindow *) packPtr->tkwin)->dispPtr; + TkDisplay *dispPtr = ((TkWindow *) packPtr->tkwin)->dispPtr; Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->packerHashTable, (char *) packPtr->tkwin)); } diff --git a/generic/tkText.c b/generic/tkText.c index 393a0a9..cc3db83 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.11 2000/01/12 11:45:03 hobbs Exp $ + * RCS: @(#) $Id: tkText.c,v 1.12 2000/01/21 03:54:42 hobbs Exp $ */ #include "default.h" @@ -771,8 +771,8 @@ TextWidgetCmd(clientData, interp, argc, argv) } else { Tcl_AppendResult(interp, "bad option \"", argv[1], "\": must be bbox, cget, compare, configure, debug, delete, ", - "dlineinfo, get, image, index, insert, mark, scan, search, see, ", - "tag, window, xview, or yview", + "dlineinfo, dump, get, image, index, insert, mark, scan, ", + "search, see, tag, window, xview, or yview", (char *) NULL); result = TCL_ERROR; } @@ -1695,8 +1695,8 @@ TextSearchCmd(textPtr, interp, argc, argv) if (length < 2) { badSwitch: Tcl_AppendResult(interp, "bad switch \"", arg, - "\": must be -forward, -backward, -exact, -regexp, ", - "-nocase, -count, -elide, or --", (char *) NULL); + "\": must be --, -backward, -count, -elide, -exact, ", + "-forward, -nocase, or -regexp", (char *) NULL); return TCL_ERROR; } c = arg[1]; @@ -1738,7 +1738,7 @@ TextSearchCmd(textPtr, interp, argc, argv) argsLeft = argc - (i+2); if ((argsLeft != 0) && (argsLeft != 1)) { Tcl_AppendResult(interp, "wrong # args: should be \"", - argv[0], " search ?switches? pattern index ?stopIndex?", + argv[0], " search ?switches? pattern index ?stopIndex?\"", (char *) NULL); return TCL_ERROR; } |