diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-10 10:07:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-01-10 10:07:19 (GMT) |
commit | ef50c3a8b950562b14a7fd5677492c3deaf1bf8f (patch) | |
tree | 7e3ba7422180dab95eadaa951af2978df714c3c6 /generic/ttk | |
parent | 65b61144b87cb08978118bcc11ddbf96768c02f4 (diff) | |
parent | 7b3b30d439640b2474a81ff1b97c8ae264811165 (diff) | |
download | tk-ef50c3a8b950562b14a7fd5677492c3deaf1bf8f.zip tk-ef50c3a8b950562b14a7fd5677492c3deaf1bf8f.tar.gz tk-ef50c3a8b950562b14a7fd5677492c3deaf1bf8f.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkClassicTheme.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkEntry.c | 12 | ||||
-rw-r--r-- | generic/ttk/ttkLabel.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkState.c | 6 |
5 files changed, 9 insertions, 15 deletions
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index 117d928..48e856e 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -6,8 +6,6 @@ */ #include "tkInt.h" -#include <X11/Xlib.h> -#include <X11/Xutil.h> #include "ttkTheme.h" #define DEFAULT_BORDERWIDTH "2" diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 6d0b29b..e4bfeca 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -5,8 +5,6 @@ */ #include "tkInt.h" -#include <X11/Xlib.h> -#include <X11/Xutil.h> #include "ttkTheme.h" #if defined(_WIN32) diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 32491dd..49b6553 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -9,8 +9,6 @@ */ #include "tkInt.h" -#include <X11/Xatom.h> - #include "ttkTheme.h" #include "ttkWidget.h" @@ -357,7 +355,7 @@ EntryFetchSelection( ClientData clientData, int offset, char *buffer, int maxBytes) { Entry *entryPtr = clientData; - size_t byteCount; + int byteCount; const char *string; const char *selStart, *selEnd; @@ -371,7 +369,7 @@ EntryFetchSelection( selEnd = Tcl_UtfAtIndex(selStart, entryPtr->entry.selectLast - entryPtr->entry.selectFirst); byteCount = selEnd - selStart - offset; - if (byteCount > (size_t)maxBytes) { + if (byteCount > maxBytes) { /* @@@POSSIBLE BUG: Can transfer partial UTF-8 sequences. Is this OK? */ byteCount = maxBytes; } @@ -1179,7 +1177,7 @@ static GC EntryGetGC(Entry *entryPtr, Tcl_Obj *colorObj, TkRegion clip) mask |= GCForeground; } gc = Tk_GetGC(entryPtr->core.tkwin, mask, &gcValues); - if (clip != None) { + if (clip != NULL) { TkSetRegion(Tk_Display(entryPtr->core.tkwin), gc, clip); } return gc; @@ -1290,7 +1288,7 @@ static void EntryDisplay(void *clientData, Drawable d) cursorX = field.x + field.width - cursorWidth; } - gc = EntryGetGC(entryPtr, es.insertColorObj, None); + gc = EntryGetGC(entryPtr, es.insertColorObj, NULL); XFillRectangle(Tk_Display(tkwin), d, gc, cursorX, cursorY, cursorWidth, cursorHeight); Tk_FreeGC(Tk_Display(tkwin), gc); @@ -1336,7 +1334,7 @@ static void EntryDisplay(void *clientData, Drawable d) * it from the Xft guts (if they're being used). */ #ifdef HAVE_XFT - TkUnixSetXftClipRegion(None); + TkUnixSetXftClipRegion(NULL); #endif TkDestroyRegion(clipRegion); } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 91be033..d7a1f93 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -182,7 +182,7 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) if (clipRegion != NULL) { #ifdef HAVE_XFT - TkUnixSetXftClipRegion(None); + TkUnixSetXftClipRegion(NULL); #endif XSetClipMask(Tk_Display(tkwin), gc1, None); XSetClipMask(Tk_Display(tkwin), gc2, None); diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c index 7ac6740..9e5cf4b 100644 --- a/generic/ttk/ttkState.c +++ b/generic/ttk/ttkState.c @@ -129,7 +129,7 @@ static void StateSpecUpdateString(Tcl_Obj *objPtr) unsigned int mask = onbits | offbits; Tcl_DString result; int i; - size_t len; + int len; Tcl_DStringInit(&result); @@ -145,14 +145,14 @@ static void StateSpecUpdateString(Tcl_Obj *objPtr) len = Tcl_DStringLength(&result); if (len) { /* 'len' includes extra trailing ' ' */ - objPtr->bytes = Tcl_Alloc(len); + objPtr->bytes = ckalloc(len); objPtr->length = len-1; strncpy(objPtr->bytes, Tcl_DStringValue(&result), len-1); objPtr->bytes[len-1] = '\0'; } else { /* empty string */ objPtr->length = 0; - objPtr->bytes = Tcl_Alloc(1); + objPtr->bytes = ckalloc(1); *objPtr->bytes = '\0'; } |