From 39d72111959231b56e0527857bc2a5950f1301e7 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 12 Jun 2012 08:29:27 +0000 Subject: Fix text clipping when working with the Xft-based renderer. --- ChangeLog | 8 ++++++++ generic/tkInt.h | 3 +++ generic/ttk/ttkEntry.c | 13 ++++++++++++- generic/ttk/ttkLabel.c | 13 ++++++++++++- unix/tkUnixRFont.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ac76d5..c5bee52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-06-12 Donal K. Fellows + + * unix/tkUnixRFont.c (Tk_DrawChars, TkUnixSetXftClipRegion): Add some + * generic/ttk/ttkEntry.c (EntryDisplay): special magic to make the + * generic/ttk/ttkLabel.c (TextDraw): text clipping work right with the + Xft-based renderer (which doesn't use the standard Tk GC except to + supply the color). + 2012-06-11 Donal K. Fellows * generic/ttk/ttkLabel.c (TextDraw): [Bug 3294450]: Get the clipping diff --git a/generic/tkInt.h b/generic/tkInt.h index b152a7a..a95adf8 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1186,6 +1186,9 @@ MODULE_SCOPE Status TkParseColor (Display * display, Colormap map, CONST char* spec, XColor * colorPtr); #endif +#ifdef HAVE_XFT +MODULE_SCOPE void TkUnixSetXftClipRegion(Region clipRegion); +#endif /* * Unsupported commands. diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index e5d0ef2..a3d0179 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1221,7 +1221,8 @@ static void EntryDisplay(void *clientData, Drawable d) } } - /* Initialize the clip region: + /* Initialize the clip region. Note that Xft does _not_ derive its + * clipping area from the GC, so we have to supply that by other means. */ rect.x = textarea.x; @@ -1230,6 +1231,9 @@ static void EntryDisplay(void *clientData, Drawable d) rect.height = textarea.height; clipRegion = TkCreateRegion(); TkUnionRectWithRegion(&rect, clipRegion, clipRegion); +#ifdef HAVE_XFT + TkUnixSetXftClipRegion(clipRegion); +#endif /* Draw cursor: */ @@ -1272,6 +1276,13 @@ static void EntryDisplay(void *clientData, Drawable d) selFirst, selLast); Tk_FreeGC(Tk_Display(tkwin), gc); } + + /* Drop the region. Note that we have to manually remove the reference to + * it from the Xft guts (if they're being used). + */ +#ifdef HAVE_XFT + TkUnixSetXftClipRegion(None); +#endif TkDestroyRegion(clipRegion); } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index df6a686..52782ea 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -131,6 +131,7 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) XGCValues gcValues; GC gc1, gc2; Tk_Anchor anchor = TK_ANCHOR_CENTER; + TkRegion clipRegion = NULL; gcValues.font = Tk_FontId(text->tkfont); gcValues.foreground = color->pixel; @@ -148,9 +149,9 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) * Clip text if it's too wide: */ if (b.width < text->width) { - TkRegion clipRegion = TkCreateRegion(); XRectangle rect; + clipRegion = TkCreateRegion(); rect.x = b.x; rect.y = b.y; rect.width = b.width + (text->embossed ? 1 : 0); @@ -158,7 +159,11 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) TkUnionRectWithRegion(&rect, clipRegion, clipRegion); TkSetRegion(Tk_Display(tkwin), gc1, clipRegion); TkSetRegion(Tk_Display(tkwin), gc2, clipRegion); +#ifdef HAVE_XFT + TkUnixSetXftClipRegion(clipRegion); +#else TkDestroyRegion(clipRegion); +#endif } if (text->embossed) { @@ -180,6 +185,12 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) Tk_FreeGC(Tk_Display(tkwin), gc1); Tk_FreeGC(Tk_Display(tkwin), gc2); +#ifdef HAVE_XFT + if (clipRegion != NULL) { + TkUnixSetXftClipRegion(None); + TkDestroyRegion(clipRegion); + } +#endif } static void TextElementSize( diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 134bb45..deecceb 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -33,6 +33,16 @@ typedef struct { XftDraw *ftDraw; XftColor color; } UnixFtFont; + +/* + * Used to describe the current clipping box. Can't be passed normally because + * the information isn't retrievable from the GC. + */ + +typedef struct ThreadSpecificData { + Region clipRegion; /* The clipping region, or None. */ +} ThreadSpecificData; +static Tcl_ThreadDataKey dataKey; /* * Package initialization: @@ -712,6 +722,8 @@ Tk_DrawChars( int clen, nspec, xStart = x; XftGlyphFontSpec specs[NUM_SPEC]; XGlyphInfo metrics; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (fontPtr->ftDraw == 0) { #if DEBUG_FONTSEL @@ -738,6 +750,9 @@ Tk_DrawChars( fontPtr->color.color.alpha = 0xffff; fontPtr->color.pixel = values.foreground; } + if (tsdPtr->clipRegion != None) { + XftDrawSetClip(fontPtr->ftDraw, tsdPtr->clipRegion); + } nspec = 0; while (numBytes > 0 && x <= maxCoord && y <= maxCoord) { XftFont *ftFont; @@ -775,6 +790,9 @@ Tk_DrawChars( if (nspec) { XftDrawGlyphFontSpec(fontPtr->ftDraw, &fontPtr->color, specs, nspec); } + if (tsdPtr->clipRegion != None) { + XftDrawSetClip(fontPtr->ftDraw, None); + } doUnderlineStrikeout: if (fontPtr->font.fa.underline != 0) { @@ -789,3 +807,13 @@ Tk_DrawChars( (unsigned) fontPtr->font.underlineHeight); } } + +void +TkUnixSetXftClipRegion( + Region clipRegion) /* The clipping region to install. */ +{ + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + + tsdPtr->clipRegion = clipRegion; +} -- cgit v0.12 From 739ea6d042d44670447da816aab80f4e627f1135 Mon Sep 17 00:00:00 2001 From: andreask Date: Thu, 14 Jun 2012 16:53:03 +0000 Subject: Re-added PATCH_LEVEL to Tk's unix pkgIndex.tcl, lost by [60bd3f4fc5]. --- unix/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 52ad3be..9ae26e1 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -727,13 +727,13 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ - echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ + echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo "} else {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ echo "}";\ fi \ ) > "$(PKG_INDEX)"; \ -- cgit v0.12 From 058a1bb001dcf7f74b173d6afd4861a49495f2c4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 15 Jun 2012 05:43:29 +0000 Subject: Backport of [Bug 3532186] fix --- unix/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 8d4a77f..eb30d25 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -720,13 +720,13 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "if {[catch {package present Tcl 8.5.0}]} { return }";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ - echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ + echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo "} else {";\ - echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ + echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ echo "}";\ fi \ ) > "$(PKG_INDEX)"; \ -- cgit v0.12 From f36729c02b87911926bbdee14be380d49a314e94 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 15 Jun 2012 07:43:50 +0000 Subject: fix signature of XSynchronize to match X.org --- generic/tkInt.decls | 2 +- generic/tkIntXlibDecls.h | 8 ++++++-- generic/tkStubInit.c | 2 -- unix/tkUnixPort.h | 4 ++++ win/Makefile.in | 2 +- win/stubs.c | 4 ++-- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 03353ed..822d008 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1431,7 +1431,7 @@ declare 111 win { int XNoOp(Display *display) } declare 112 win { - int XSynchronize(Display *display, Bool onoff) + XAfterFunction XSynchronize(Display *display, Bool onoff) } declare 113 win { int XSync(Display *display, Bool discard) diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index fd6eb36..5b0f267 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -30,6 +30,10 @@ #define TCL_STORAGE_CLASS DLLEXPORT #endif +typedef int (*XAfterFunction) ( /* WARNING, this type not in Xlib spec */ + Display* /* display */ +); + /* !BEGIN!: Do not edit below this line. */ /* @@ -343,7 +347,7 @@ EXTERN int XFree(void *data); /* 111 */ EXTERN int XNoOp(Display *display); /* 112 */ -EXTERN int XSynchronize(Display *display, Bool onoff); +EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff); /* 113 */ EXTERN int XSync(Display *display, Bool discard); /* 114 */ @@ -731,7 +735,7 @@ typedef struct TkIntXlibStubs { int (*xUngrabServer) (Display *display); /* 109 */ int (*xFree) (void *data); /* 110 */ int (*xNoOp) (Display *display); /* 111 */ - int (*xSynchronize) (Display *display, Bool onoff); /* 112 */ + XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */ int (*xSync) (Display *display, Bool discard); /* 113 */ VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */ #endif /* WIN */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index cb87a58..4bdc955 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -75,8 +75,6 @@ TkCreateXEventSource(void) # ifdef __CYGWIN__ - TkIntStubs tkIntStubs; - /* * Trick, so we don't have to include here, which in any * case lacks this function anyway. diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index 331a6e5..222be88 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -126,6 +126,10 @@ # define WPARAM void * # define LPARAM void * # define LRESULT void * + +EXTERN int TkPutImage (unsigned long *, int, Display *, Drawable, GC, + XImage *, int, int, int, int, unsigned int, unsigned int); + #else /* !__CYGWIN__ */ /* * The TkPutImage macro strips off the color table information, which isn't diff --git a/win/Makefile.in b/win/Makefile.in index 89f57bc..35261b5 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -478,7 +478,7 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} { return }";\ + echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ diff --git a/win/stubs.c b/win/stubs.c index 0940752..1cf23ef 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -448,13 +448,13 @@ XNoOp( return 0; } -int +XAfterFunction XSynchronize( Display *display, Bool bool) { display->request++; - return 0; + return NULL; } int -- cgit v0.12 From 2765a470e02048d3bd73bf18d4cc7b5191faab0b Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 15 Jun 2012 07:55:16 +0000 Subject: [Bug 3535362]: Changed name of 'unshare' internal function to avoid clash with some libc versions. --- ChangeLog | 5 +++++ generic/ttk/ttkTreeview.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5bee52..17aaf28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-15 Donal K. Fellows + + * generic/ttk/ttkTreeview.c (unshareObj): [Bug 3535362]: Changed name + of 'unshare' internal function to avoid clash with some libc versions. + 2012-06-12 Donal K. Fellows * unix/tkUnixRFont.c (Tk_DrawChars, TkUnixSetXftClipRegion): Add some diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 222b280..6b9042f 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -485,11 +485,11 @@ static void foreachHashEntry(Tcl_HashTable *ht, HashEntryIterator func) } } -/* + unshare(objPtr) -- +/* + unshareObj(objPtr) -- * Ensure that a Tcl_Obj * has refcount 1 -- either return objPtr * itself, or a duplicated copy. */ -static Tcl_Obj *unshare(Tcl_Obj *objPtr) +static Tcl_Obj *unshareObj(Tcl_Obj *objPtr) { if (Tcl_IsShared(objPtr)) { Tcl_Obj *newObj = Tcl_DuplicateObj(objPtr); @@ -2525,7 +2525,7 @@ static int TreeviewSetCommand( } else { /* set column */ int length; - item->valuesObj = unshare(item->valuesObj); + item->valuesObj = unshareObj(item->valuesObj); /* Make sure -values is fully populated: */ @@ -2826,7 +2826,7 @@ static int TreeviewSeeCommand( */ for (parent = item->parent; parent; parent = parent->parent) { if (!(parent->state & TTK_STATE_OPEN)) { - parent->openObj = unshare(parent->openObj); + parent->openObj = unshareObj(parent->openObj); Tcl_SetBooleanObj(parent->openObj, 1); parent->state |= TTK_STATE_OPEN; TtkRedisplayWidget(&tv->core); -- cgit v0.12 From 24e56fa77ef2bcfeea56c8b56398b55bb5db686f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 15 Jun 2012 08:25:00 +0000 Subject: rfe-2636558 simplification --- generic/tk.decls | 19 ++++--------------- generic/tkBitmap.c | 22 ---------------------- generic/tkDecls.h | 34 ++++++++++------------------------ generic/tkInt.decls | 2 +- generic/tkStubInit.c | 6 ++---- 5 files changed, 17 insertions(+), 66 deletions(-) diff --git a/generic/tk.decls b/generic/tk.decls index e54b804..9ceb3af 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -207,8 +207,8 @@ declare 43 { const char *pathName, const char *screenName) } declare 44 { - int Tk_OldDefineBitmap(Tcl_Interp *interp, const char *name, - const char *source, int width, int height) + int Tk_DefineBitmap(Tcl_Interp *interp, const char *name, + const void *source, int width, int height) } declare 45 { void Tk_DefineCursor(Tk_Window window, Tk_Cursor cursor) @@ -359,8 +359,8 @@ declare 85 { Pixmap Tk_GetBitmap(Tcl_Interp *interp, Tk_Window tkwin, const char *str) } declare 86 { - Pixmap Tk_OldGetBitmapFromData(Tcl_Interp *interp, - Tk_Window tkwin, const char *source, int width, int height) + Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp, + Tk_Window tkwin, const void *source, int width, int height) } declare 87 { int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, int *capPtr) @@ -1069,17 +1069,6 @@ declare 273 { void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr) } -# See [Enhancement request 2636558] Tk_DefineBitmap and -# Tk_GetBitmapFromData signature problem -declare 274 { - int Tk_DefineBitmap(Tcl_Interp *interp, const char *name, - const void *source, int width, int height) -} -declare 275 { - Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp, - Tk_Window tkwin, const void *source, int width, int height) -} - # Define the platform specific public Tk interface. These functions are # only available on the designated platform. diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 675a42a..b0d1ecc 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -458,18 +458,6 @@ GetBitmap( */ int -Tk_OldDefineBitmap( - Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - const char *name, /* Name to use for bitmap. Must not already be - * defined as a bitmap. */ - const char *source, /* Address of bits for bitmap. */ - int width, /* Width of bitmap. */ - int height) /* Height of bitmap. */ -{ - return Tk_DefineBitmap(interp, name, source, width, height); -} - -int Tk_DefineBitmap( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ const char *name, /* Name to use for bitmap. Must not already be @@ -814,16 +802,6 @@ DupBitmapObjProc( /* ARGSUSED */ Pixmap -Tk_OldGetBitmapFromData( - Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - Tk_Window tkwin, /* Window in which bitmap will be used. */ - const char *source, /* Bitmap data for bitmap shape. */ - int width, int height) /* Dimensions of bitmap. */ -{ - return Tk_GetBitmapFromData(interp, tkwin, source, width, height); -} - -Pixmap Tk_GetBitmapFromData( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ Tk_Window tkwin, /* Window in which bitmap will be used. */ diff --git a/generic/tkDecls.h b/generic/tkDecls.h index fb949b2..5edbffe 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -181,9 +181,8 @@ EXTERN Tk_Window Tk_CreateWindowFromPath(Tcl_Interp *interp, Tk_Window tkwin, const char *pathName, const char *screenName); /* 44 */ -EXTERN int Tk_OldDefineBitmap(Tcl_Interp *interp, - const char *name, const char *source, - int width, int height); +EXTERN int Tk_DefineBitmap(Tcl_Interp *interp, const char *name, + const void *source, int width, int height); /* 45 */ EXTERN void Tk_DefineCursor(Tk_Window window, Tk_Cursor cursor); /* 46 */ @@ -304,8 +303,8 @@ EXTERN CONST84_RETURN char * Tk_GetBinding(Tcl_Interp *interp, EXTERN Pixmap Tk_GetBitmap(Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 86 */ -EXTERN Pixmap Tk_OldGetBitmapFromData(Tcl_Interp *interp, - Tk_Window tkwin, const char *source, +EXTERN Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp, + Tk_Window tkwin, const void *source, int width, int height); /* 87 */ EXTERN int Tk_GetCapStyle(Tcl_Interp *interp, const char *str, @@ -861,13 +860,6 @@ EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr); /* 273 */ EXTERN void Tk_CreateOldPhotoImageFormat( const Tk_PhotoImageFormat *formatPtr); -/* 274 */ -EXTERN int Tk_DefineBitmap(Tcl_Interp *interp, const char *name, - const void *source, int width, int height); -/* 275 */ -EXTERN Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp, - Tk_Window tkwin, const void *source, - int width, int height); typedef struct TkStubHooks { const struct TkPlatStubs *tkPlatStubs; @@ -924,7 +916,7 @@ typedef struct TkStubs { void (*tk_CreateSelHandler) (Tk_Window tkwin, Atom selection, Atom target, Tk_SelectionProc *proc, ClientData clientData, Atom format); /* 41 */ Tk_Window (*tk_CreateWindow) (Tcl_Interp *interp, Tk_Window parent, const char *name, const char *screenName); /* 42 */ Tk_Window (*tk_CreateWindowFromPath) (Tcl_Interp *interp, Tk_Window tkwin, const char *pathName, const char *screenName); /* 43 */ - int (*tk_OldDefineBitmap) (Tcl_Interp *interp, const char *name, const char *source, int width, int height); /* 44 */ + int (*tk_DefineBitmap) (Tcl_Interp *interp, const char *name, const void *source, int width, int height); /* 44 */ void (*tk_DefineCursor) (Tk_Window window, Tk_Cursor cursor); /* 45 */ void (*tk_DeleteAllBindings) (Tk_BindingTable bindingTable, ClientData object); /* 46 */ int (*tk_DeleteBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 47 */ @@ -966,7 +958,7 @@ typedef struct TkStubs { CONST84_RETURN char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */ CONST84_RETURN char * (*tk_GetBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 84 */ Pixmap (*tk_GetBitmap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 85 */ - Pixmap (*tk_OldGetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const char *source, int width, int height); /* 86 */ + Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 86 */ int (*tk_GetCapStyle) (Tcl_Interp *interp, const char *str, int *capPtr); /* 87 */ XColor * (*tk_GetColor) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name); /* 88 */ XColor * (*tk_GetColorByValue) (Tk_Window tkwin, XColor *colorPtr); /* 89 */ @@ -1154,8 +1146,6 @@ typedef struct TkStubs { Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */ void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */ - int (*tk_DefineBitmap) (Tcl_Interp *interp, const char *name, const void *source, int width, int height); /* 274 */ - Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 275 */ } TkStubs; #ifdef __cplusplus @@ -1260,8 +1250,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_CreateWindow) /* 42 */ #define Tk_CreateWindowFromPath \ (tkStubsPtr->tk_CreateWindowFromPath) /* 43 */ -#define Tk_OldDefineBitmap \ - (tkStubsPtr->tk_OldDefineBitmap) /* 44 */ +#define Tk_DefineBitmap \ + (tkStubsPtr->tk_DefineBitmap) /* 44 */ #define Tk_DefineCursor \ (tkStubsPtr->tk_DefineCursor) /* 45 */ #define Tk_DeleteAllBindings \ @@ -1344,8 +1334,8 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_GetBinding) /* 84 */ #define Tk_GetBitmap \ (tkStubsPtr->tk_GetBitmap) /* 85 */ -#define Tk_OldGetBitmapFromData \ - (tkStubsPtr->tk_OldGetBitmapFromData) /* 86 */ +#define Tk_GetBitmapFromData \ + (tkStubsPtr->tk_GetBitmapFromData) /* 86 */ #define Tk_GetCapStyle \ (tkStubsPtr->tk_GetCapStyle) /* 87 */ #define Tk_GetColor \ @@ -1718,10 +1708,6 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_CreateOldImageType) /* 272 */ #define Tk_CreateOldPhotoImageFormat \ (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ -#define Tk_DefineBitmap \ - (tkStubsPtr->tk_DefineBitmap) /* 274 */ -#define Tk_GetBitmapFromData \ - (tkStubsPtr->tk_GetBitmapFromData) /* 275 */ #endif /* defined(USE_TK_STUBS) */ diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 822d008..f1ea867 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -854,7 +854,7 @@ declare 0 aqua { # removed duplicates from tkInt table #declare 1 aqua { -# Pixmap TkpCreateNativeBitmap(Display *display, const void *source) +# Pixmap TkpCreateNativeBitmap(Display *display, const char *source) #} # #declare 2 aqua { diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 4bdc955..e5c0a3b 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -873,7 +873,7 @@ const TkStubs tkStubs = { Tk_CreateSelHandler, /* 41 */ Tk_CreateWindow, /* 42 */ Tk_CreateWindowFromPath, /* 43 */ - Tk_OldDefineBitmap, /* 44 */ + Tk_DefineBitmap, /* 44 */ Tk_DefineCursor, /* 45 */ Tk_DeleteAllBindings, /* 46 */ Tk_DeleteBinding, /* 47 */ @@ -915,7 +915,7 @@ const TkStubs tkStubs = { Tk_GetAtomName, /* 83 */ Tk_GetBinding, /* 84 */ Tk_GetBitmap, /* 85 */ - Tk_OldGetBitmapFromData, /* 86 */ + Tk_GetBitmapFromData, /* 86 */ Tk_GetCapStyle, /* 87 */ Tk_GetColor, /* 88 */ Tk_GetColorByValue, /* 89 */ @@ -1103,8 +1103,6 @@ const TkStubs tkStubs = { Tk_Interp, /* 271 */ Tk_CreateOldImageType, /* 272 */ Tk_CreateOldPhotoImageFormat, /* 273 */ - Tk_DefineBitmap, /* 274 */ - Tk_GetBitmapFromData, /* 275 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From ba7d85e82ace09b150bdc7468dfa5d22f089a4ff Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 16 Jun 2012 16:06:06 +0000 Subject: improving backwards compatibility --- generic/tk.decls | 7 +++++++ generic/tkDecls.h | 10 ++++++++++ generic/tkStubInit.c | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/generic/tk.decls b/generic/tk.decls index 9ceb3af..11b4f87 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -1069,6 +1069,13 @@ declare 273 { void Tk_CreateOldPhotoImageFormat(const Tk_PhotoImageFormat *formatPtr) } +declare 274 { + void reserved274(void) +} +declare 275 { + void reserved275(void) +} + # Define the platform specific public Tk interface. These functions are # only available on the designated platform. diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 5edbffe..d080e93 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -860,6 +860,10 @@ EXTERN void Tk_CreateOldImageType(const Tk_ImageType *typePtr); /* 273 */ EXTERN void Tk_CreateOldPhotoImageFormat( const Tk_PhotoImageFormat *formatPtr); +/* 274 */ +EXTERN void reserved274(void); +/* 275 */ +EXTERN void reserved275(void); typedef struct TkStubHooks { const struct TkPlatStubs *tkPlatStubs; @@ -1146,6 +1150,8 @@ typedef struct TkStubs { Tcl_Interp * (*tk_Interp) (Tk_Window tkwin); /* 271 */ void (*tk_CreateOldImageType) (const Tk_ImageType *typePtr); /* 272 */ void (*tk_CreateOldPhotoImageFormat) (const Tk_PhotoImageFormat *formatPtr); /* 273 */ + void (*reserved274) (void); /* 274 */ + void (*reserved275) (void); /* 275 */ } TkStubs; #ifdef __cplusplus @@ -1708,6 +1714,10 @@ extern const TkStubs *tkStubsPtr; (tkStubsPtr->tk_CreateOldImageType) /* 272 */ #define Tk_CreateOldPhotoImageFormat \ (tkStubsPtr->tk_CreateOldPhotoImageFormat) /* 273 */ +#define reserved274 \ + (tkStubsPtr->reserved274) /* 274 */ +#define reserved275 \ + (tkStubsPtr->reserved275) /* 275 */ #endif /* defined(USE_TK_STUBS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index e5c0a3b..271243e 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -226,6 +226,9 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # endif #endif /* !__WIN32__ */ +#define reserved274 (void (*)(void)) Tk_DefineBitmap +#define reserved275 (void (*)(void)) Tk_GetBitmapFromData + /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations @@ -1103,6 +1106,8 @@ const TkStubs tkStubs = { Tk_Interp, /* 271 */ Tk_CreateOldImageType, /* 272 */ Tk_CreateOldPhotoImageFormat, /* 273 */ + reserved274, /* 274 */ + reserved275, /* 275 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From 23abd217c7df90a80ee411cfe2090d75942cf750 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 19 Jun 2012 09:55:18 +0000 Subject: SetOptions.3: minor doc fix make various other tables CONST (All backported from Tk 8.6) --- doc/SetOptions.3 | 187 +++++++++++++++++++++++------------------------- generic/tkButton.c | 20 +++--- generic/tkConsole.c | 4 +- generic/tkEntry.c | 8 +-- generic/tkFrame.c | 12 ++-- generic/tkImgGIF.c | 2 +- generic/tkListbox.c | 8 +-- generic/tkMenu.c | 18 ++--- generic/tkMenubutton.c | 8 +-- generic/tkMessage.c | 2 +- generic/tkOldConfig.c | 6 +- generic/tkPanedWindow.c | 14 ++-- generic/tkPlace.c | 2 +- generic/tkScale.c | 6 +- generic/tkSquare.c | 2 +- generic/tkTest.c | 20 +++--- generic/tkTextDisp.c | 8 +-- unix/tkUnixSelect.c | 2 +- unix/tkUnixWm.c | 8 +-- 19 files changed, 165 insertions(+), 172 deletions(-) diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index f0d5fba..0679432 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -45,7 +45,7 @@ A Tcl interpreter. Most procedures use this only for returning error messages; if it is NULL then no error messages are returned. For \fBTk_CreateOptionTable\fR the value cannot be NULL; it gives the interpreter in which the option table will be used. -.AP Tk_OptionSpec *templatePtr in +.AP "CONST Tk_OptionSpec" *templatePtr in Points to an array of static information that describes the configuration options that are supported. Used to build a Tk_OptionTable. The information pointed to by this argument must exist for the lifetime of the Tk_OptionTable. @@ -57,7 +57,7 @@ Points to structure in which values of configuration options are stored; fields of this record are modified by procedures such as \fBTk_SetOptions\fR and read by procedures such as \fBTk_GetOptionValue\fR. .AP Tk_Window tkwin in -For options such as TK_OPTION_COLOR, this argument indicates +For options such as \fBTK_OPTION_COLOR\fR, this argument indicates the window in which the option will be used. If \fIoptionTable\fR uses no window-dependent options, then a NULL value may be supplied for this argument. @@ -101,7 +101,7 @@ which information about a particular widget or object is stored. .PP Note: the easiest way to learn how to use these procedures is to look at a working example. In Tk, the simplest example is the code -that implements the button family of widgets, which is an \fBtkButton.c\fR. +that implements the button family of widgets, which is in \fBtkButton.c\fR. Other examples are in \fBtkSquare.c\fR and \fBtkMenu.c\fR. .PP In order to use these procedures, the code that implements the widget @@ -136,10 +136,10 @@ uses the information in the option table to choose an appropriate default for each option, then it stores the default value directly into the widget record, overwriting any information that was already present in the widget record. \fBTk_InitOptions\fR normally -returns TCL_OK. If an error occurred while setting the default values -(e.g., because a default value was erroneous) then TCL_ERROR is returned +returns \fBTCL_OK\fR. If an error occurred while setting the default values +(e.g., because a default value was erroneous) then \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's result if \fIinterp\fR -isn't NULL. +is not NULL. .PP \fBTk_SetOptions\fR is invoked to modify configuration options based on information specified in a Tcl command. The command might be one that @@ -151,13 +151,13 @@ an option and the second object gives the new value for that option. \fBTk_SetOptions\fR looks up each name in \fIoptionTable\fR, checks that the new value of the option conforms to the type in \fIoptionTable\fR, and stores the value of the option into the widget record given by -\fIrecordPtr\fR. \fBTk_SetOptions\fR normally returns TCL_OK. If +\fIrecordPtr\fR. \fBTk_SetOptions\fR normally returns \fBTCL_OK\fR. If an error occurred (such as an unknown option name or an illegal option -value) then TCL_ERROR is returned and an error message is left in -\fIinterp\fR's result if \fIinterp\fR isn't NULL. +value) then \fBTCL_ERROR\fR is returned and an error message is left in +\fIinterp\fR's result if \fIinterp\fR is not NULL. .PP \fBTk_SetOptions\fR has two additional features. First, if the -\fImaskPtr\fR argument isn't NULL then it points to an integer +\fImaskPtr\fR argument is not NULL then it points to an integer value that is filled in with information about the options that were modified. For each option in the template passed to \fBTk_CreateOptionTable\fR there is a \fItypeMask\fR field. The @@ -170,8 +170,8 @@ that bit set. Another bit might indicate that the geometry of the widget must be recomputed, and so on. \fBTk_SetOptions\fR OR's together the \fItypeMask\fR fields from all the options that were modified and returns this value at *\fImaskPtr\fR; the caller can then use this information -to optimize itself so that, for example, it doesn't redisplay the widget -if the modified options don't affect the widget's appearance. +to optimize itself so that, for example, it does not redisplay the widget +if the modified options do not affect the widget's appearance. .PP The second additional feature of \fBTk_SetOptions\fR has to do with error recovery. If an error occurs while processing configuration options, this @@ -241,7 +241,6 @@ The \fBTk_Offset\fR macro is provided as a safe way of generating the Tk_OptionSpec structures. It takes two arguments: the name of a type of record, and the name of a field in that record. It returns the byte offset of the named field in records of the given type. - .SH "TEMPLATES" .PP The array of Tk_OptionSpec structures passed to \fBTk_CreateOptionTable\fR @@ -250,20 +249,20 @@ supported by a particular class of widgets. Each structure specifies one configuration option and has the following fields: .CS typedef struct { - Tk_OptionType \fItype\fR; - char *\fIoptionName\fR; - char *\fIdbName\fR; - char *\fIdbClass\fR; - char *\fIdefValue\fR; - int \fIobjOffset\fR; - int \fIinternalOffset\fR; - int \fIflags\fR; - ClientData \fIclientData\fR; - int \fItypeMask\fR; -} Tk_OptionSpec; + Tk_OptionType \fItype\fR; + char *\fIoptionName\fR; + char *\fIdbName\fR; + char *\fIdbClass\fR; + char *\fIdefValue\fR; + int \fIobjOffset\fR; + int \fIinternalOffset\fR; + int \fIflags\fR; + ClientData \fIclientData\fR; + int \fItypeMask\fR; +} \fBTk_OptionSpec\fR; .CE The \fItype\fR field indicates what kind of configuration option this is -(e.g. TK_OPTION_COLOR for a color value, or TK_OPTION_INT for +(e.g. \fBTK_OPTION_COLOR\fR for a color value, or \fBTK_OPTION_INT\fR for an integer value). \fIType\fR determines how the value of the option is parsed (more on this below). The \fIoptionName\fR field is a string such as \fB\-font\fR or \fB\-bg\fR; @@ -283,7 +282,7 @@ The \fIflags\fR field contains additional information to control the processing of this configuration option (see below for details). \fIClientData\fR provides additional type-specific data needed -by certain types. For instance, for TK_OPTION_COLOR types, +by certain types. For instance, for \fBTK_OPTION_COLOR\fR types, \fIclientData\fR is a string giving the default value to use on monochrome displays. See the descriptions of the different types below for details. @@ -300,22 +299,22 @@ If the \fIinternalOffset\fR field of the Tk_OptionSpec is greater than or equal to zero, then the value of the option is stored in a type-specific internal form at the location in the widget record given by \fIinternalOffset\fR. For example, if the option's type is -TK_OPTION_INT then the internal form is an integer. If the +\fBTK_OPTION_INT\fR then the internal form is an integer. If the \fIobjOffset\fR or \fIinternalOffset\fR field is negative then the value is not stored in that form. At least one of the offsets must be greater than or equal to zero. .PP The \fIflags\fR field consists of one or more bits ORed together. At -present only a single flag is supported: TK_OPTION_NULL_OK. If +present only a single flag is supported: \fBTK_OPTION_NULL_OK\fR. If this bit is set for an option then an empty string will be accepted as the value for the option and the resulting internal form will be a NULL pointer, a zero value, or \fBNone\fR, depending on the type of the option. If the flag is not set then empty strings will result in errors. -TK_OPTION_NULL_OK is typically used to allow a +\fBTK_OPTION_NULL_OK\fR is typically used to allow a feature to be turned off entirely, e.g. set a cursor value to \fBNone\fR so that a window simply inherits its parent's cursor. -Not all option types support the TK_OPTION_NULL_OK +Not all option types support the \fBTK_OPTION_NULL_OK\fR flag; for those that do, there is an explicit indication of that fact in the descriptions below. .PP @@ -337,7 +336,7 @@ returned by \fBTk_GetAnchorFromObj\fR. The value must be a standard Tk bitmap name. The internal form is a Pixmap token like the ones returned by \fBTk_AllocBitmapFromObj\fR. This option type requires \fItkwin\fR to be supplied to procedures -such as \fBTk_SetOptions\fR, and it supports the TK_OPTION_NULL_OK flag. +such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_BOOLEAN\fR The value must be a standard boolean value such as \fBtrue\fR or @@ -348,14 +347,14 @@ The value must be a standard color name such as \fBred\fR or \fB#ff8080\fR. The internal form is a Tk_3DBorder token like the ones returned by \fBTk_Alloc3DBorderFromObj\fR. This option type requires \fItkwin\fR to be supplied to procedures -such as \fBTk_SetOptions\fR, and it supports the TK_OPTION_NULL_OK flag. +such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_COLOR\fR The value must be a standard color name such as \fBred\fR or \fB#ff8080\fR. The internal form is an (XColor *) token like the ones returned by \fBTk_AllocColorFromObj\fR. This option type requires \fItkwin\fR to be supplied to procedures -such as \fBTk_SetOptions\fR, and it supports the TK_OPTION_NULL_OK flag. +such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_CURSOR\fR The value must be a standard cursor name such as \fBcross\fR or \fB@foo\fR. @@ -364,25 +363,25 @@ The internal form is a Tk_Cursor token like the ones returned by This option type requires \fItkwin\fR to be supplied to procedures such as \fBTk_SetOptions\fR, and when the option is set the cursor for the window is changed by calling \fBXDefineCursor\fR. This -option type also supports the TK_OPTION_NULL_OK flag. +option type also supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_CUSTOM\fR This option allows applications to define new option types. The clientData field of the entry points to a structure defining the new -option type. See the section CUSTOM OPTION TYPES below for details. +option type. See the section \fBCUSTOM OPTION TYPES\fR below for details. .TP \fBTK_OPTION_DOUBLE\fR The string value must be a floating-point number in the format accepted by \fBstrtol\fR. The internal form is a C -\fBdouble\fR value. This option type supports the TK_OPTION_NULL_OK +\fBdouble\fR value. This option type supports the \fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the internal representation is set to zero. .TP \fBTK_OPTION_END\fR Marks the end of the template. There must be a Tk_OptionSpec structure -with \fItype\fR TK_OPTION_END at the end of each template. If the -\fIclientData\fR field of this structure isn't NULL, then it points to +with \fItype\fR \fBTK_OPTION_END\fR at the end of each template. If the +\fIclientData\fR field of this structure is not NULL, then it points to an additional array of Tk_OptionSpec's, which is itself terminated by -another TK_OPTION_END entry. Templates may be chained arbitrarily +another \fBTK_OPTION_END\fR entry. Templates may be chained arbitrarily deeply. This feature allows common options to be shared by several widget classes. .TP @@ -391,7 +390,7 @@ The value must be a standard font name such as \fBTimes 16\fR. The internal form is a Tk_Font handle like the ones returned by \fBTk_AllocFontFromObj\fR. This option type requires \fItkwin\fR to be supplied to procedures -such as \fBTk_SetOptions\fR, and it supports the TK_OPTION_NULL_OK flag. +such as \fBTk_SetOptions\fR, and it supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_INT\fR The string value must be an integer in the format accepted by @@ -408,23 +407,23 @@ The internal form is a Tk_Justify like the values returned by The value must specify a screen distance such as \fB2i\fR or \fB6.4\fR. The internal form is an integer value giving a distance in pixels, like the values returned by -\fBTk_GetPixelsFromObj\fR. Note: if the \fIobjOffset\fR field isn't +\fBTk_GetPixelsFromObj\fR. Note: if the \fIobjOffset\fR field is not used then information about the original value of this option will be lost. See \fBOBJOFFSET VS. INTERNALOFFSET\fR below for details. This option -type supports the TK_OPTION_NULL_OK flag; if a NULL value is set, the +type supports the \fBTK_OPTION_NULL_OK\fR flag; if a NULL value is set, the internal representation is set to zero. .TP \fBTK_OPTION_RELIEF\fR The value must be standard relief such as \fBraised\fR. The internal form is an integer relief value such as -TK_RELIEF_RAISED. This option type supports the TK_OPTION_NULL_OK +\fBTK_RELIEF_RAISED\fR. This option type supports the \fBTK_OPTION_NULL_OK\fR flag; if the empty string is specified as the value for the option, -the integer relief value is set to TK_RELIEF_NULL. +the integer relief value is set to \fBTK_RELIEF_NULL\fR. .TP \fBTK_OPTION_STRING\fR The value may be any string. The internal form is a (char *) pointer that points to a dynamically allocated copy of the value. -This option type supports the TK_OPTION_NULL_OK flag. +This option type supports the \fBTK_OPTION_NULL_OK\fR flag. .TP \fBTK_OPTION_STRING_TABLE\fR For this type, \fIclientData\fR is a pointer to an array of strings @@ -432,23 +431,21 @@ suitable for passing to \fBTcl_GetIndexFromObj\fR. The value must be one of the strings in the table, or a unique abbreviation of one of the strings. The internal form is an integer giving the index into the table of the matching string, like the return value -from \fBTcl_GetStringFromObj\fR. +from \fBTcl_GetStringFromObj\fR. .TP \fBTK_OPTION_SYNONYM\fR This type is used to provide alternative names for an option (for example, \fB\-bg\fR is often used as a synonym for \fB\-background\fR). -The \fBclientData\fR field is a (char *) pointer that gives -the name of another option in the same table. Whenever the -synonym option is used, the information from the other option -will be used instead. +The \fBclientData\fR field is a string that gives the name of another +option in the same table. Whenever the synonym option is used, the +information from the other option will be used instead. .TP \fBTK_OPTION_WINDOW\fR The value must be a window path name. The internal form is a \fBTk_Window\fR token for the window. This option type requires \fItkwin\fR to be supplied to procedures such as \fBTk_SetOptions\fR (in order to identify the application), -and it supports the TK_OPTION_NULL_OK flag. - +and it supports the \fBTK_OPTION_NULL_OK\fR flag. .SH "STORAGE MANAGEMENT ISSUES" .PP If a field of a widget record has its offset stored in the \fIobjOffset\fR @@ -457,8 +454,8 @@ procedures described here will handle all of the storage allocation and resource management issues associated with the field. When the value of an option is changed, \fBTk_SetOptions\fR (or \fBTk_FreeSavedOptions\fR) will automatically free any resources associated with the old value, such as -Tk_Fonts for TK_OPTION_FONT options or dynamically allocated memory for -TK_OPTION_STRING options. For an option stored as an object using the +Tk_Fonts for \fBTK_OPTION_FONT\fR options or dynamically allocated memory for +\fBTK_OPTION_STRING\fR options. For an option stored as an object using the \fIobjOffset\fR field of a Tk_OptionSpec, the widget record shares the object pointed to by the \fIobjv\fR value from the call to \fBTk_SetOptions\fR. The reference count for this object is incremented @@ -472,38 +469,36 @@ However, the widget code is responsible for storing NULL or \fBNone\fR in all pointer and token fields before invoking \fBTk_InitOptions\fR. This is needed to allow proper cleanup in the rare case where an error occurs in \fBTk_InitOptions\fR. - .SH "OBJOFFSET VS. INTERNALOFFSET" .PP In most cases it is simplest to use the \fIinternalOffset\fR field of a Tk_OptionSpec structure and not the \fIobjOffset\fR field. This makes the internal form of the value immediately available to the -widget code so the value doesn't have to be extracted from an object +widget code so the value does not have to be extracted from an object each time it is used. However, there are two cases where the \fIobjOffset\fR field is useful. The first case is for -TK_OPTION_PIXELS options. In this case, the internal form is +\fBTK_OPTION_PIXELS\fR options. In this case, the internal form is an integer pixel value that is valid only for a particular screen. If the value of the option is retrieved, it will be returned as a simple number. For example, after the command \fB.b configure \-borderwidth 2m\fR, the command \fB.b configure \-borderwidth\fR might return 7, which is the integer pixel value corresponding to \fB2m\fR. Unfortunately, this loses -the original screen-independent value. Thus for TK_OPTION_PIXELS options +the original screen-independent value. Thus for \fBTK_OPTION_PIXELS\fR options it is better to use the \fIobjOffset\fR field. In this case the original value of the option is retained in the object and can be returned when the option is retrieved. In most cases it is convenient to use the -\fIinternalOffset\fR field field as well, so that the integer value is +\fIinternalOffset\fR field as well, so that the integer value is immediately available for use in the widget code (alternatively, \fBTk_GetPixelsFromObj\fR can be used to extract the integer value from the object whenever it is needed). Note: the problem of losing information -on retrievals exists only for TK_OPTION_PIXELS options. +on retrievals exists only for \fBTK_OPTION_PIXELS\fR options. .PP The second reason to use the \fIobjOffset\fR field is in order to implement new types of options not supported by these procedures. -To implement a new type of option, you can use TK_OPTION_STRING as +To implement a new type of option, you can use \fBTK_OPTION_STRING\fR as the type in the Tk_OptionSpec structure and set the \fIobjOffset\fR field but not the \fIinternalOffset\fR field. Then, after calling \fBTk_SetOptions\fR, convert the object to internal form yourself. - .SH "CUSTOM OPTION TYPES" .PP Applications can extend the built-in configuration types with @@ -512,40 +507,40 @@ free, and restore saved copies of the type and creating a structure pointing to those procedures: .CS typedef struct Tk_ObjCustomOption { - char *name; - Tk_CustomOptionSetProc *\fIsetProc\fR; - Tk_CustomOptionGetProc *\fIgetProc\fR; - Tk_CustomOptionRestoreProc *\fIrestoreProc\fR; - Tk_CustomOptionFreeProc *\fIfreeProc\fR; - ClientData \fIclientData\fR; -} Tk_ObjCustomOption; + char *name; + Tk_CustomOptionSetProc *\fIsetProc\fR; + Tk_CustomOptionGetProc *\fIgetProc\fR; + Tk_CustomOptionRestoreProc *\fIrestoreProc\fR; + Tk_CustomOptionFreeProc *\fIfreeProc\fR; + ClientData \fIclientData\fR; +} \fBTk_ObjCustomOption\fR; -typedef int Tk_CustomOptionSetProc( - ClientData \fIclientData\fR, - Tcl_Interp *\fIinterp\fR, - Tk_Window \fItkwin\fR, - Tcl_Obj **\fIvaluePtr\fR, - char *\fIrecordPtr\fR, - int \fIinternalOffset\fR, - char *\fIsaveInternalPtr\fR, - int \fIflags\fR); +typedef int \fBTk_CustomOptionSetProc\fR( + ClientData \fIclientData\fR, + Tcl_Interp *\fIinterp\fR, + Tk_Window \fItkwin\fR, + Tcl_Obj **\fIvaluePtr\fR, + char *\fIrecordPtr\fR, + int \fIinternalOffset\fR, + char *\fIsaveInternalPtr\fR, + int \fIflags\fR); -typedef Tcl_Obj *Tk_CustomOptionGetProc( - ClientData \fIclientData\fR, - Tk_Window \fItkwin\fR, - char *\fIrecordPtr\fR, - int \fIinternalOffset\fR); +typedef Tcl_Obj *\fBTk_CustomOptionGetProc\fR( + ClientData \fIclientData\fR, + Tk_Window \fItkwin\fR, + char *\fIrecordPtr\fR, + int \fIinternalOffset\fR); -typedef void Tk_CustomOptionRestoreProc( - ClientData \fIclientData\fR, - Tk_Window \fItkwin\fR, - char *\fIinternalPtr\fR, - char *\fIsaveInternalPtr\fR); +typedef void \fBTk_CustomOptionRestoreProc\fR( + ClientData \fIclientData\fR, + Tk_Window \fItkwin\fR, + char *\fIinternalPtr\fR, + char *\fIsaveInternalPtr\fR); -typedef void Tk_CustomOptionFreeProc( - ClientData \fIclientData\fR, - Tk_Window \fItkwin\fR, - char *\fIinternalPtr\fR); +typedef void \fBTk_CustomOptionFreeProc\fR( + ClientData \fIclientData\fR, + Tk_Window \fItkwin\fR, + char *\fIinternalPtr\fR); .CE .PP The Tk_ObjCustomOption structure contains six fields: a name @@ -581,7 +576,7 @@ value is stored as a (Tcl_Obj *) in the widget record), the Tcl_Obj pointer referenced by \fIvaluePtr\fR is the pointer that will be stored at the objOffset for the option. \fISetProc\fR may modify the value if necessary; for example, \fIsetProc\fR may change the value to -NULL to support the TK_OPTION_NULL_OK flag. +NULL to support the \fBTK_OPTION_NULL_OK\fR flag. .TP \fIrecordPtr\fR A pointer to the start of the widget record to modify. @@ -602,8 +597,8 @@ A copy of the \fIflags\fR field in the Tk_OptionSpec structure for the option .RE .PP -\fISetProc\fR returns a standard Tcl result: TCL_OK to indicate successful -processing, or TCL_ERROR to indicate a failure of any kind. An error +\fISetProc\fR returns a standard Tcl result: \fBTCL_OK\fR to indicate successful +processing, or \fBTCL_ERROR\fR to indicate a failure of any kind. An error message may be left in the Tcl interpreter given by \fIinterp\fR in the case of an error. .PP @@ -643,8 +638,6 @@ structure. \fITkwin\fR is a copy of the \fItkwin\fR argument to is a pointer to the location where the internal representation of the option value is stored. The \fIfreeProc\fR must free any storage associated with the option. \fIFreeProc\fR has no return value. - - .SH KEYWORDS anchor, bitmap, boolean, border, color, configuration option, cursor, double, font, integer, justify, diff --git a/generic/tkButton.c b/generic/tkButton.c index e844cec..9a261e9 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -25,14 +25,14 @@ static Tcl_ThreadDataKey dataKey; * in tkButton.h. */ -static CONST char *classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"}; +static CONST char *CONST classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"}; /* * The following table defines the legal values for the -default option. * It is used together with the "enum defaultValue" declaration in tkButton.h. */ -static CONST char *defaultStrings[] = { +static CONST char *CONST defaultStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -41,7 +41,7 @@ static CONST char *defaultStrings[] = { * It is used together with the "enum state" declaration in tkButton.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -50,7 +50,7 @@ static CONST char *stateStrings[] = { * It is used with the "enum compound" declaration in tkButton.h */ -static CONST char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; @@ -61,7 +61,7 @@ char tkDefButtonBorderWidth[TCL_INTEGER_SPACE] = DEF_BUTTON_BORDER_WIDTH; * separate table for each of the four widget classes. */ -static Tk_OptionSpec labelOptionSpecs[] = { +static CONST Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -147,7 +147,7 @@ static Tk_OptionSpec labelOptionSpecs[] = { (char *) NULL, 0, 0, 0, 0} }; -static Tk_OptionSpec buttonOptionSpecs[] = { +static CONST Tk_OptionSpec buttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -249,7 +249,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = { (char *) NULL, 0, -1, 0, 0, 0} }; -static Tk_OptionSpec checkbuttonOptionSpecs[] = { +static CONST Tk_OptionSpec checkbuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -358,7 +358,7 @@ static Tk_OptionSpec checkbuttonOptionSpecs[] = { (char *) NULL, 0, -1, 0, 0, 0} }; -static Tk_OptionSpec radiobuttonOptionSpecs[] = { +static CONST Tk_OptionSpec radiobuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -472,7 +472,7 @@ static Tk_OptionSpec radiobuttonOptionSpecs[] = { * class of widgets. */ -static Tk_OptionSpec *optionSpecs[] = { +static CONST Tk_OptionSpec *CONST optionSpecs[] = { labelOptionSpecs, buttonOptionSpecs, checkbuttonOptionSpecs, @@ -631,7 +631,7 @@ ButtonCreate(clientData, interp, objc, objv, type) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!tsdPtr->defaultsInitialized) { - TkpButtonSetDefaults(optionSpecs[type]); + TkpButtonSetDefaults(NULL); tsdPtr->defaultsInitialized = 1; } diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 307b9b5..af6e76a 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -351,9 +351,9 @@ Tk_CreateConsoleWindow(interp) int haveConsoleChannel = 1; #ifdef MAC_TCL - static const char *initCmd = "if {[catch {source $tk_library:console.tcl}]} {source -rsrc console}"; + static CONST char *initCmd = "if {[catch {source $tk_library:console.tcl}]} {source -rsrc console}"; #else - static const char *initCmd = "source $tk_library/console.tcl"; + static CONST char *initCmd = "source $tk_library/console.tcl"; #endif /* Init an interp with Tcl and Tk */ diff --git a/generic/tkEntry.c b/generic/tkEntry.c index c6eed1b..996af63 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -35,7 +35,7 @@ #define DOUBLES_EQ(d1, d2) (fabs((d1) - (d2)) < MIN_DBL_VAL) -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "disabled", "normal", "readonly", (char *) NULL }; @@ -43,7 +43,7 @@ static CONST char *stateStrings[] = { * Definitions for -validate option values: */ -static CONST char *validateStrings[] = { +static CONST char *CONST validateStrings[] = { "all", "key", "focus", "focusin", "focusout", "none", (char *) NULL }; enum validateType { @@ -61,7 +61,7 @@ enum validateType { * Information used for Entry objv parsing. */ -static Tk_OptionSpec entryOptSpec[] = { +static CONST Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder), 0, (ClientData) DEF_ENTRY_BG_MONO, 0}, @@ -189,7 +189,7 @@ static Tk_OptionSpec entryOptSpec[] = { #define DEF_SPINBOX_VALUES "" #define DEF_SPINBOX_WRAP "0" -static Tk_OptionSpec sbOptSpec[] = { +static CONST Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(Spinbox, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, diff --git a/generic/tkFrame.c b/generic/tkFrame.c index a416b22..e7a6dbe 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -170,7 +170,7 @@ enum labelanchor { LABELANCHOR_W, LABELANCHOR_WN, LABELANCHOR_WS }; -static CONST char *labelAnchorStrings[] = { +static CONST char *CONST labelAnchorStrings[] = { "e", "en", "es", "n", "ne", "nw", "s", "se", "sw", "w", "wn", "ws", (char *) NULL }; @@ -180,7 +180,7 @@ static CONST char *labelAnchorStrings[] = { * one common table used by all and one table for each widget class. */ -static Tk_OptionSpec commonOptSpec[] = { +static CONST Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_FRAME_BG_COLOR, -1, Tk_Offset(Frame, border), TK_OPTION_NULL_OK, (ClientData) DEF_FRAME_BG_MONO, 0}, @@ -226,7 +226,7 @@ static Tk_OptionSpec commonOptSpec[] = { (char *) NULL, 0, 0, 0, 0, 0} }; -static Tk_OptionSpec frameOptSpec[] = { +static CONST Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -242,7 +242,7 @@ static Tk_OptionSpec frameOptSpec[] = { (char *) NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} }; -static Tk_OptionSpec toplevelOptSpec[] = { +static CONST Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -267,7 +267,7 @@ static Tk_OptionSpec toplevelOptSpec[] = { (char *) NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} }; -static Tk_OptionSpec labelframeOptSpec[] = { +static CONST Tk_OptionSpec labelframeOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -309,7 +309,7 @@ static CONST char *classNames[] = {"Frame", "Toplevel", "Labelframe"}; * that class of widgets. */ -static Tk_OptionSpec *optionSpecs[] = { +static CONST Tk_OptionSpec *CONST optionSpecs[] = { frameOptSpec, toplevelOptSpec, labelframeOptSpec diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index bbb3178..d46f9f9 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -2096,7 +2096,7 @@ compress(init_bits, handle, readValue) out_clear_init = (init_bits <= 3) ? 9 : (out_bump_init-1); #ifdef MIGIF_DEBUGGING_ENVARS { - const char *ocienv; + CONST char *ocienv; ocienv = getenv("MIGIF_OUT_CLEAR_INIT"); if (ocienv) { out_clear_init = atoi(ocienv); diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 6f8156f..103cd9d 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -210,7 +210,7 @@ enum state { STATE_DISABLED, STATE_NORMAL }; -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "disabled", "normal", (char *) NULL }; @@ -218,7 +218,7 @@ enum activeStyle { ACTIVE_STYLE_DOTBOX, ACTIVE_STYLE_NONE, ACTIVE_STYLE_UNDERLINE }; -static CONST char *activeStyleStrings[] = { +static CONST char *CONST activeStyleStrings[] = { "dotbox", "none", "underline", (char *) NULL }; @@ -226,7 +226,7 @@ static CONST char *activeStyleStrings[] = { * The optionSpecs table defines the valid configuration options for the * listbox widget */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle", DEF_LISTBOX_ACTIVE_STYLE, -1, Tk_Offset(Listbox, activeStyle), 0, (ClientData) activeStyleStrings, 0}, @@ -307,7 +307,7 @@ static Tk_OptionSpec optionSpecs[] = { * The itemAttrOptionSpecs table defines the valid configuration options for * listbox items */ -static Tk_OptionSpec itemAttrOptionSpecs[] = { +static CONST Tk_OptionSpec itemAttrOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", (char *)NULL, -1, Tk_Offset(ItemAttr, border), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 19031c5..4bcc46f 100755 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -113,11 +113,11 @@ static CONST char *menuEntryTypeStrings[] = { * It is used with the "enum compound" declaration in tkMenu.h */ -static const char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; -static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1, TK_OPTION_NULL_OK}, @@ -166,14 +166,14 @@ static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-background", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_BG, Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK}, {TK_OPTION_END} }; -static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -196,7 +196,7 @@ static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -216,7 +216,7 @@ static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { {TK_OPTION_STRING, "-menu", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_MENU, Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK}, @@ -224,7 +224,7 @@ static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-background", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_BG, Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK}, @@ -234,7 +234,7 @@ static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec *specsArray[] = { +static CONST Tk_OptionSpec *CONST specsArray[] = { tkCascadeEntryConfigSpecs, tkCheckButtonEntryConfigSpecs, tkBasicMenuEntryConfigSpecs, tkRadioButtonEntryConfigSpecs, tkSeparatorEntryConfigSpecs, tkTearoffEntryConfigSpecs}; @@ -246,7 +246,7 @@ static Tk_OptionSpec *specsArray[] = { static CONST char *menuTypeStrings[] = {"normal", "tearoff", "menubar", (char *) NULL}; -static Tk_OptionSpec tkMenuConfigSpecs[] = { +static CONST Tk_OptionSpec tkMenuConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_MENU_ACTIVE_BG_COLOR, Tk_Offset(TkMenu, activeBorderPtr), -1, 0, diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 7e9a11a..0e85308 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -21,7 +21,7 @@ * in tkMenubutton.h. */ -static CONST char *directionStrings[] = { +static CONST char *CONST directionStrings[] = { "above", "below", "flush", "left", "right", (char *) NULL }; @@ -30,7 +30,7 @@ static CONST char *directionStrings[] = { * It is used together with the "enum state" declaration in tkMenubutton.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -39,7 +39,7 @@ static CONST char *stateStrings[] = { * It is used with the "enum compound" declaration in tkMenuButton.h */ -static CONST char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; @@ -47,7 +47,7 @@ static CONST char *compoundStrings[] = { * Information used for parsing configuration specs: */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_MENUBUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkMenuButton, activeBorder), 0, diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 8fb5c36..0b3f36d 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -108,7 +108,7 @@ typedef struct { * Information used for argv parsing. */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR, -1, Tk_Offset(Message, anchor), 0, 0, 0}, {TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT, diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index bbb673f..6c6303d 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -44,7 +44,7 @@ static CONST char * FormatConfigValue _ANSI_ARGS_((Tcl_Interp *interp, char *widgRec, char *buffer, Tcl_FreeProc **freeProcPtr)); static Tk_ConfigSpec * GetCachedSpecs _ANSI_ARGS_((Tcl_Interp *interp, - const Tk_ConfigSpec *staticSpecs)); + CONST Tk_ConfigSpec *staticSpecs)); static void DeleteSpecCacheTable _ANSI_ARGS_(( ClientData clientData, Tcl_Interp *interp)); @@ -1074,7 +1074,7 @@ Tk_FreeOptions(specs, widgRec, display, needFlags) static Tk_ConfigSpec * GetCachedSpecs(interp, staticSpecs) Tcl_Interp *interp; /* Interpreter in which to store the cache. */ - const Tk_ConfigSpec *staticSpecs; + CONST Tk_ConfigSpec *staticSpecs; /* Value to cache a copy of; it is also used * as a key into the cache. */ { @@ -1107,7 +1107,7 @@ GetCachedSpecs(interp, staticSpecs) &isNew); if (isNew) { unsigned int entrySpace = sizeof(Tk_ConfigSpec); - const Tk_ConfigSpec *staticSpecPtr; + CONST Tk_ConfigSpec *staticSpecPtr; Tk_ConfigSpec *specPtr; /* diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 09106dd..a876ae8 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -34,7 +34,7 @@ * The following table defines the legal values for the -orient option. */ -static CONST char *orientStrings[] = { +static CONST char *CONST orientStrings[] = { "horizontal", "vertical", (char *) NULL }; @@ -234,7 +234,7 @@ static Tk_ObjCustomOption stickyOption = { 0 }; -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, background), 0, (ClientData) DEF_PANEDWINDOW_BG_MONO}, @@ -286,7 +286,7 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec slaveOptionSpecs[] = { +static CONST Tk_OptionSpec slaveOptionSpecs[] = { {TK_OPTION_WINDOW, "-after", (char *) NULL, (char *) NULL, DEF_PANEDWINDOW_PANE_AFTER, -1, Tk_Offset(Slave, after), TK_OPTION_NULL_OK, 0, 0}, @@ -1368,7 +1368,7 @@ DisplayPanedWindow(clientData) Pixmap pixmap; Tk_Window tkwin = pwPtr->tkwin; int i, sashWidth, sashHeight; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags &= ~REDRAW_PENDING; if ((pwPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -1639,7 +1639,7 @@ ArrangePanes(clientData) int internalBW; int paneDynSize, paneDynMinSize, pwHeight, pwWidth, pwSize; int stretchReserve, stretchAmount; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags &= ~(REQUESTED_RELAYOUT|RESIZE_PENDING); @@ -2039,7 +2039,7 @@ ComputeGeometry(pwPtr) int sashWidth, sashOffset, handleOffset; int reqWidth, reqHeight, dim; Slave *slavePtr; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags |= REQUESTED_RELAYOUT; @@ -2447,7 +2447,7 @@ MoveSash(pwPtr, sash, diff) Slave *slavePtr; int stretchReserve = 0; int nextSash = sash + 1; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); if (diff == 0) return; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 6178d26..4c7f0f4 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -79,7 +79,7 @@ typedef struct Slave { */ #define IN_MASK 1 -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1, Tk_Offset(Slave, anchor), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1, diff --git a/generic/tkScale.c b/generic/tkScale.c index 9b582fe..1c5c6f3 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -30,7 +30,7 @@ * It is used together with the "enum orient" declaration in tkScale.h. */ -static CONST char *orientStrings[] = { +static CONST char *CONST orientStrings[] = { "horizontal", "vertical", (char *) NULL }; @@ -39,11 +39,11 @@ static CONST char *orientStrings[] = { * It is used together with the "enum state" declaration in tkScale.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_COLOR, -1, Tk_Offset(TkScale, activeBorder), 0, (ClientData) DEF_SCALE_ACTIVE_BG_MONO, 0}, diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 435b841..9f07b27 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -58,7 +58,7 @@ typedef struct { * Information used for argv parsing. */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", "#d9d9d9", Tk_Offset(Square, bgBorderPtr), -1, 0, (ClientData) "white"}, diff --git a/generic/tkTest.c b/generic/tkTest.c index fdd70b7..6cb776c 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -649,7 +649,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) * created by commands below; indexed * with same values as "options" * array. */ - static Tk_ObjCustomOption CustomOption = { + static CONST Tk_ObjCustomOption CustomOption = { "custom option", CustomOptionSet, CustomOptionGet, @@ -674,7 +674,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *extension4ObjPtr; Tcl_Obj *extension5ObjPtr; } ExtensionWidgetRecord; - static Tk_OptionSpec baseSpecs[] = { + static CONST Tk_OptionSpec baseSpecs[] = { {TK_OPTION_STRING, "-one", "one", "One", "one", Tk_Offset(ExtensionWidgetRecord, base1ObjPtr), -1}, @@ -717,9 +717,9 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *customPtr; } TypesRecord; TypesRecord *recordPtr; - static CONST char *stringTable[] = {"one", "two", "three", "four", + static CONST char *CONST stringTable[] = {"one", "two", "three", "four", (char *) NULL}; - static Tk_OptionSpec typesSpecs[] = { + static CONST Tk_OptionSpec typesSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", Tk_Offset(TypesRecord, booleanPtr), -1, 0, 0, 0x1}, @@ -893,7 +893,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) case CHAIN2: { ExtensionWidgetRecord *recordPtr; - static Tk_OptionSpec extensionSpecs[] = { + static CONST Tk_OptionSpec extensionSpecs[] = { {TK_OPTION_STRING, "-three", "three", "Three", "three", Tk_Offset(ExtensionWidgetRecord, extension3ObjPtr), @@ -961,7 +961,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *intPtr; } ErrorWidgetRecord; ErrorWidgetRecord widgetRecord; - static Tk_OptionSpec errorSpecs[] = { + static CONST Tk_OptionSpec errorSpecs[] = { {TK_OPTION_INT, "-int", "integer", "Integer", "bogus", Tk_Offset(ErrorWidgetRecord, intPtr)}, @@ -1035,7 +1035,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) static CONST char *internalStringTable[] = { "one", "two", "three", "four", (char *) NULL }; - static Tk_OptionSpec internalSpecs[] = { + static CONST Tk_OptionSpec internalSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", -1, Tk_Offset(InternalRecord, boolean), 0, 0, 0x1}, @@ -1173,7 +1173,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *five; } FiveRecord; FiveRecord *recordPtr; - static Tk_OptionSpec smallSpecs[] = { + static CONST Tk_OptionSpec smallSpecs[] = { {TK_OPTION_INT, "-one", "one", "One", "1", @@ -1239,7 +1239,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *fooObjPtr; } NotEnoughRecord; NotEnoughRecord record; - static Tk_OptionSpec errorSpecs[] = { + static CONST Tk_OptionSpec errorSpecs[] = { {TK_OPTION_INT, "-foo", "foo", "Foo", "0", Tk_Offset(NotEnoughRecord, fooObjPtr)}, @@ -1274,7 +1274,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *windowPtr; } SlaveRecord; SlaveRecord *recordPtr; - static Tk_OptionSpec slaveSpecs[] = { + static CONST Tk_OptionSpec slaveSpecs[] = { {TK_OPTION_WINDOW, "-window", "window", "Window", ".bar", Tk_Offset(SlaveRecord, windowPtr), -1, diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index cd5d90f..4637b5c 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -1693,9 +1693,9 @@ DisplayDLine(textPtr, dlPtr, prevPtr, pixmap) Display *display; int height, x; #ifndef TK_NO_DOUBLE_BUFFERING - const int y = 0; + CONST int y = 0; #else - const int y = dlPtr->y; + CONST int y = dlPtr->y; #endif /* TK_NO_DOUBLE_BUFFERING */ if (dlPtr->chunkPtr == NULL) return; @@ -1875,9 +1875,9 @@ DisplayLineBackground(textPtr, dlPtr, prevPtr, pixmap) StyleValues *sValuePtr; Display *display; #ifndef TK_NO_DOUBLE_BUFFERING - const int y = 0; + CONST int y = 0; #else - const int y = dlPtr->y; + CONST int y = dlPtr->y; #endif /* TK_NO_DOUBLE_BUFFERING */ /* diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index 5eedd5d..17ba36c 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -1414,7 +1414,7 @@ SelCvtToX(string, type, tkwin, numLongsPtr) int *numLongsPtr; /* Number of 32-bit words contained in the * result. */ { - const char **field; + CONST char **field; int numFields, i; long *propPtr; diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 1ab5980..cb5b643 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -4487,7 +4487,7 @@ UpdateTitle(winPtr) { WmInfo *wmPtr = winPtr->wmInfoPtr; Atom XA_UTF8_STRING = Tk_InternAtom((Tk_Window) winPtr, "UTF8_STRING"); - const char *string; + CONST char *string; Tcl_DString ds; /* @@ -4502,7 +4502,7 @@ UpdateTitle(winPtr) XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_NAME"), XA_UTF8_STRING, 8, PropModeReplace, - (const unsigned char*)string, (signed int)strlen(string)); + (CONST unsigned char*)string, (signed int)strlen(string)); /* * Set icon name: @@ -4516,7 +4516,7 @@ UpdateTitle(winPtr) XChangeProperty(winPtr->display, wmPtr->wrapperPtr->window, Tk_InternAtom((Tk_Window) winPtr, "_NET_WM_ICON_NAME"), XA_UTF8_STRING, 8, PropModeReplace, - (const unsigned char*)wmPtr->iconName, + (CONST unsigned char*)wmPtr->iconName, (signed int)strlen(wmPtr->iconName)); } } @@ -4969,7 +4969,7 @@ GetNetWmType(winPtr) &bytesAfter, &propertyValue)) { atoms = (Atom *)propertyValue; for (n = 0; n < count; ++n) { - const char *name = Tk_GetAtomName(tkwin, atoms[n]); + CONST char *name = Tk_GetAtomName(tkwin, atoms[n]); if (strncmp("_NET_WM_WINDOW_TYPE_", name, 20) == 0) { Tcl_ExternalToUtfDString(NULL, name+20, -1, &ds); Tcl_UtfToLower(Tcl_DStringValue(&ds)); -- cgit v0.12 From fd77e02b49d0999826d554d47627a17fdd74c082 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 20 Jun 2012 07:10:50 +0000 Subject: frq-3536507: clientData field in Tk_OptionSpec should be "const void *" --- doc/SetOptions.3 | 2 +- generic/tk.h | 2 +- generic/tkButton.c | 70 ++++++++++++++++++++++++------------------------- generic/tkEntry.c | 48 ++++++++++++++++----------------- generic/tkFrame.c | 20 +++++++------- generic/tkListbox.c | 26 +++++++++--------- generic/tkMenu.c | 12 ++++----- generic/tkMenubutton.c | 10 +++---- generic/tkMessage.c | 8 +++--- generic/tkPanedWindow.c | 10 +++---- generic/tkPlace.c | 2 +- generic/tkScale.c | 18 ++++++------- generic/tkSquare.c | 10 +++---- generic/tkTest.c | 20 +++++++------- generic/tkText.c | 28 ++++++++++---------- generic/tkTextImage.c | 2 +- generic/tkTextTag.c | 4 +-- generic/tkTextWind.c | 2 +- 18 files changed, 147 insertions(+), 147 deletions(-) diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index bd1d8ab..1851f1f 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -259,7 +259,7 @@ typedef struct { int \fIobjOffset\fR; int \fIinternalOffset\fR; int \fIflags\fR; - ClientData \fIclientData\fR; + const void *\fIclientData\fR; int \fItypeMask\fR; } \fBTk_OptionSpec\fR; .CE diff --git a/generic/tk.h b/generic/tk.h index a44cfa8..23b17f8 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -181,7 +181,7 @@ typedef struct Tk_OptionSpec { * the record. */ int flags; /* Any combination of the values defined * below. */ - ClientData clientData; /* An alternate place to put option-specific + const void *clientData; /* An alternate place to put option-specific * data. Used for the monochrome default value * for colors, etc. */ int typeMask; /* An arbitrary bit mask defined by the class diff --git a/generic/tkButton.c b/generic/tkButton.c index 190165d..e2c754e 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -71,19 +71,19 @@ char tkDefLabelPady[TCL_INTEGER_SPACE] = DEF_LABCHKRAD_PADY; static const Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), - 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, + 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", DEF_BUTTON_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_ACTIVE_FG_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder), - 0, (ClientData) DEF_BUTTON_BG_MONO, 0}, + 0, DEF_BUTTON_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, @@ -92,7 +92,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { Tk_Offset(TkButton, borderWidth), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0, - (ClientData) compoundStrings, 0}, + compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, @@ -101,7 +101,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -134,7 +134,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_LABEL_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1, TK_OPTION_NULL_OK, 0, 0}, @@ -156,19 +156,19 @@ static const Tk_OptionSpec labelOptionSpecs[] = { static const Tk_OptionSpec buttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), - 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, + 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", DEF_BUTTON_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_ACTIVE_FG_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder), - 0, (ClientData) DEF_BUTTON_BG_MONO, 0}, + 0, DEF_BUTTON_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, @@ -180,19 +180,19 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0, - (ClientData) compoundStrings, 0}, + compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-default", "default", "Default", DEF_BUTTON_DEFAULT, -1, Tk_Offset(TkButton, defaultState), - 0, (ClientData) defaultStrings, 0}, + 0, defaultStrings, 0}, {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", "DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR, -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -235,7 +235,7 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1, TK_OPTION_NULL_OK, 0, 0}, @@ -257,19 +257,19 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { static const Tk_OptionSpec checkbuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), - 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, + 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", DEF_CHKRAD_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_ACTIVE_FG_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder), - 0, (ClientData) DEF_BUTTON_BG_MONO, 0}, + 0, DEF_BUTTON_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, @@ -281,7 +281,7 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0, - (ClientData) compoundStrings, 0}, + compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, @@ -290,7 +290,7 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -334,13 +334,13 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background", DEF_BUTTON_SELECT_COLOR, -1, Tk_Offset(TkButton, selectBorder), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_SELECT_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0}, {TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage", DEF_BUTTON_SELECT_IMAGE, Tk_Offset(TkButton, selectImagePtr), -1, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1, TK_OPTION_NULL_OK, 0, 0}, @@ -370,19 +370,19 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { static const Tk_OptionSpec radiobuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), - 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, + 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", DEF_CHKRAD_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_ACTIVE_FG_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder), - 0, (ClientData) DEF_BUTTON_BG_MONO, 0}, + 0, DEF_BUTTON_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap), TK_OPTION_NULL_OK, 0, 0}, @@ -394,7 +394,7 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0, - (ClientData) compoundStrings, 0}, + compoundStrings, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor), TK_OPTION_NULL_OK, 0, 0}, @@ -403,7 +403,7 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -444,13 +444,13 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background", DEF_BUTTON_SELECT_COLOR, -1, Tk_Offset(TkButton, selectBorder), - TK_OPTION_NULL_OK, (ClientData) DEF_BUTTON_SELECT_MONO, 0}, + TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0}, {TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage", DEF_BUTTON_SELECT_IMAGE, Tk_Offset(TkButton, selectImagePtr), -1, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1, TK_OPTION_NULL_OK, 0, 0}, diff --git a/generic/tkEntry.c b/generic/tkEntry.c index f32a03b..044a35b 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -64,11 +64,11 @@ enum validateType { static const Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder), - 0, (ClientData) DEF_ENTRY_BG_MONO, 0}, + 0, DEF_ENTRY_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_ENTRY_BORDER_WIDTH, -1, Tk_Offset(Entry, borderWidth), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", @@ -85,7 +85,7 @@ static const Tk_OptionSpec entryOptSpec[] = { "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1, Tk_Offset(Entry, exportSelection), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, -1, Tk_Offset(Entry, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -115,7 +115,7 @@ static const Tk_OptionSpec entryOptSpec[] = { DEF_ENTRY_INVALIDCMD, -1, Tk_Offset(Entry, invalidCmd), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-invalidcommand", 0}, + NULL, 0, -1, 0, "-invalidcommand", 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, -1, Tk_Offset(Entry, justify), 0, 0, 0}, {TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground", @@ -126,20 +126,20 @@ static const Tk_OptionSpec entryOptSpec[] = { DEF_ENTRY_RELIEF, -1, Tk_Offset(Entry, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_COLOR, -1, Tk_Offset(Entry, selBorder), - 0, (ClientData) DEF_ENTRY_SELECT_MONO, 0}, + 0, DEF_ENTRY_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1, Tk_Offset(Entry, selBorderWidth), - 0, (ClientData) DEF_ENTRY_SELECT_BD_MONO, 0}, + 0, DEF_ENTRY_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr), - TK_CONFIG_NULL_OK, (ClientData) DEF_ENTRY_SELECT_FG_MONO, 0}, + TK_CONFIG_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, {TK_OPTION_STRING, "-show", "show", "Show", DEF_ENTRY_SHOW, -1, Tk_Offset(Entry, showChar), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_ENTRY_STATE, -1, Tk_Offset(Entry, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus), TK_OPTION_NULL_OK, 0, 0}, @@ -148,11 +148,11 @@ static const Tk_OptionSpec entryOptSpec[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate", DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate), - 0, (ClientData) validateStrings, 0}, + 0, validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand", NULL, -1, Tk_Offset(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-validatecommand", 0}, + NULL, 0, -1, 0, "-validatecommand", 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, -1, Tk_Offset(Entry, prefWidth), 0, 0, 0}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", @@ -181,19 +181,19 @@ static const Tk_OptionSpec entryOptSpec[] = { static const Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(Spinbox, activeBorder), - 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, + 0, DEF_BUTTON_ACTIVE_BG_MONO, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder), - 0, (ClientData) DEF_ENTRY_BG_MONO, 0}, + 0, DEF_ENTRY_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_ENTRY_BORDER_WIDTH, -1, Tk_Offset(Entry, borderWidth), 0, 0, 0}, {TK_OPTION_BORDER, "-buttonbackground", "Button.background", "Background", DEF_BUTTON_BG_COLOR, -1, Tk_Offset(Spinbox, buttonBorder), - 0, (ClientData) DEF_BUTTON_BG_MONO, 0}, + 0, DEF_BUTTON_BG_MONO, 0}, {TK_OPTION_CURSOR, "-buttoncursor", "Button.cursor", "Cursor", DEF_BUTTON_CURSOR, -1, Tk_Offset(Spinbox, bCursor), TK_OPTION_NULL_OK, 0, 0}, @@ -218,7 +218,7 @@ static const Tk_OptionSpec sbOptSpec[] = { "ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1, Tk_Offset(Entry, exportSelection), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_ENTRY_FONT, -1, Tk_Offset(Entry, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -255,7 +255,7 @@ static const Tk_OptionSpec sbOptSpec[] = { DEF_ENTRY_INVALIDCMD, -1, Tk_Offset(Entry, invalidCmd), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-invcmd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-invalidcommand", 0}, + NULL, 0, -1, 0, "-invalidcommand", 0}, {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify", DEF_ENTRY_JUSTIFY, -1, Tk_Offset(Entry, justify), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", @@ -272,17 +272,17 @@ static const Tk_OptionSpec sbOptSpec[] = { 0, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_ENTRY_SELECT_COLOR, -1, Tk_Offset(Entry, selBorder), - 0, (ClientData) DEF_ENTRY_SELECT_MONO, 0}, + 0, DEF_ENTRY_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1, Tk_Offset(Entry, selBorderWidth), - 0, (ClientData) DEF_ENTRY_SELECT_BD_MONO, 0}, + 0, DEF_ENTRY_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr), - TK_CONFIG_NULL_OK, (ClientData) DEF_ENTRY_SELECT_FG_MONO, 0}, + TK_CONFIG_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_ENTRY_STATE, -1, Tk_Offset(Entry, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus), TK_CONFIG_NULL_OK, 0, 0}, @@ -293,14 +293,14 @@ static const Tk_OptionSpec sbOptSpec[] = { DEF_SPINBOX_TO, -1, Tk_Offset(Spinbox, toValue), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate", DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate), - 0, (ClientData) validateStrings, 0}, + 0, validateStrings, 0}, {TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand", NULL, -1, Tk_Offset(Entry, validateCmd), TK_CONFIG_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-values", "values", "Values", DEF_SPINBOX_VALUES, -1, Tk_Offset(Spinbox, valueStr), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-vcmd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-validatecommand", 0}, + NULL, 0, -1, 0, "-validatecommand", 0}, {TK_OPTION_INT, "-width", "width", "Width", DEF_ENTRY_WIDTH, -1, Tk_Offset(Entry, prefWidth), 0, 0, 0}, {TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap", diff --git a/generic/tkFrame.c b/generic/tkFrame.c index c7544a6..55f5d51 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -175,9 +175,9 @@ static const char *const labelAnchorStrings[] = { static const Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_FRAME_BG_COLOR, -1, Tk_Offset(Frame, border), - TK_OPTION_NULL_OK, (ClientData) DEF_FRAME_BG_MONO, 0}, + TK_OPTION_NULL_OK, DEF_FRAME_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_STRING, "-colormap", "colormap", "Colormap", DEF_FRAME_COLORMAP, -1, Tk_Offset(Frame, colormapName), TK_OPTION_NULL_OK, 0, 0}, @@ -220,7 +220,7 @@ static const Tk_OptionSpec commonOptSpec[] = { static const Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_FRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", @@ -228,12 +228,12 @@ static const Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_FRAME_RELIEF, -1, Tk_Offset(Frame, relief), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} + NULL, 0, 0, 0, commonOptSpec, 0} }; static const Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_FRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", @@ -250,26 +250,26 @@ static const Tk_OptionSpec toplevelOptSpec[] = { DEF_TOPLEVEL_USE, -1, Tk_Offset(Frame, useThis), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} + NULL, 0, 0, 0, commonOptSpec, 0} }; static const Tk_OptionSpec labelframeOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_LABELFRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", DEF_LABELFRAME_CLASS, -1, Tk_Offset(Frame, className), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_LABELFRAME_FONT, -1, Tk_Offset(Labelframe, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_LABELFRAME_FG, -1, Tk_Offset(Labelframe, textColorPtr), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-labelanchor", "labelAnchor", "LabelAnchor", DEF_LABELFRAME_LABELANCHOR, -1, Tk_Offset(Labelframe, labelAnchor), - 0, (ClientData) labelAnchorStrings, 0}, + 0, labelAnchorStrings, 0}, {TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL, -1, Tk_Offset(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", @@ -278,7 +278,7 @@ static const Tk_OptionSpec labelframeOptSpec[] = { DEF_LABELFRAME_TEXT, Tk_Offset(Labelframe, textPtr), -1, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} + NULL, 0, 0, 0, commonOptSpec, 0} }; /* diff --git a/generic/tkListbox.c b/generic/tkListbox.c index ada467f..7faa44b 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -231,14 +231,14 @@ static const char *const activeStyleStrings[] = { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle", DEF_LISTBOX_ACTIVE_STYLE, -1, Tk_Offset(Listbox, activeStyle), - 0, (ClientData) activeStyleStrings, 0}, + 0, activeStyleStrings, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_LISTBOX_BG_COLOR, -1, Tk_Offset(Listbox, normalBorder), - 0, (ClientData) DEF_LISTBOX_BG_MONO, 0}, + 0, DEF_LISTBOX_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_LISTBOX_BORDER_WIDTH, -1, Tk_Offset(Listbox, borderWidth), 0, 0, 0}, @@ -252,7 +252,7 @@ static const Tk_OptionSpec optionSpecs[] = { "ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, -1, Tk_Offset(Listbox, exportSelection), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_LISTBOX_FONT, -1, Tk_Offset(Listbox, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -272,13 +272,13 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_LISTBOX_RELIEF, -1, Tk_Offset(Listbox, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_LISTBOX_SELECT_COLOR, -1, Tk_Offset(Listbox, selBorder), - 0, (ClientData) DEF_LISTBOX_SELECT_MONO, 0}, + 0, 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", "Background", DEF_LISTBOX_SELECT_FG_COLOR, -1, Tk_Offset(Listbox, selFgColorPtr), - TK_CONFIG_NULL_OK, (ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0}, + TK_CONFIG_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0}, {TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode", DEF_LISTBOX_SELECT_MODE, -1, Tk_Offset(Listbox, selectMode), TK_OPTION_NULL_OK, 0, 0}, @@ -286,7 +286,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_LISTBOX_SET_GRID, -1, Tk_Offset(Listbox, setGrid), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_LISTBOX_STATE, -1, Tk_Offset(Listbox, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_LISTBOX_TAKE_FOCUS, -1, Tk_Offset(Listbox, takeFocus), TK_OPTION_NULL_OK, 0, 0}, @@ -313,22 +313,22 @@ static const Tk_OptionSpec itemAttrOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", NULL, -1, Tk_Offset(ItemAttr, border), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - (ClientData) DEF_LISTBOX_BG_MONO, 0}, + DEF_LISTBOX_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", NULL, -1, Tk_Offset(ItemAttr, fgColor), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", NULL, -1, Tk_Offset(ItemAttr, selBorder), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - (ClientData) DEF_LISTBOX_SELECT_MONO, 0}, + DEF_LISTBOX_SELECT_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", NULL, -1, Tk_Offset(ItemAttr, selFgColor), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, - (ClientData) DEF_LISTBOX_SELECT_FG_MONO, 0}, + DEF_LISTBOX_SELECT_FG_MONO, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0} }; diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 18eae0a..49f49ad 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -188,7 +188,7 @@ static const Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { DEF_MENU_ENTRY_CHECK_VARIABLE, Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs, 0} + NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0} }; static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { @@ -208,7 +208,7 @@ static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { DEF_MENU_ENTRY_RADIO_VARIABLE, Tk_Offset(TkMenuEntry, namePtr), -1, 0, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs, 0} + NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0} }; static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { @@ -216,7 +216,7 @@ static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { DEF_MENU_ENTRY_MENU, Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0}, {TK_OPTION_END, NULL, NULL, NULL, - NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs, 0} + NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0} }; static const Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { @@ -259,9 +259,9 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = { DEF_MENU_BG_COLOR, Tk_Offset(TkMenu, borderPtr), -1, 0, (ClientData) DEF_MENU_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_MENU_BORDER_WIDTH, Tk_Offset(TkMenu, borderWidthPtr), -1, 0, NULL, 0}, @@ -273,7 +273,7 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = { Tk_Offset(TkMenu, disabledFgPtr), -1, TK_OPTION_NULL_OK, (ClientData) DEF_MENU_DISABLED_FG_MONO, 0}, {TK_OPTION_SYNONYM, "-fg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_MENU_FONT, Tk_Offset(TkMenu, fontPtr), -1, 0, NULL, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index e540224..31dbfbb 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -66,13 +66,13 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background", DEF_MENUBUTTON_ACTIVE_FG_COLOR, -1, Tk_Offset(TkMenuButton, activeFg), - 0, (ClientData) DEF_MENUBUTTON_ACTIVE_FG_MONO, 0}, + 0, DEF_MENUBUTTON_ACTIVE_FG_MONO, 0}, {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MENUBUTTON_ANCHOR, -1, Tk_Offset(TkMenuButton, anchor), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MENUBUTTON_BG_COLOR, -1, Tk_Offset(TkMenuButton, normalBorder), - 0, (ClientData) DEF_MENUBUTTON_BG_MONO, 0}, + 0, DEF_MENUBUTTON_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0, @@ -88,7 +88,7 @@ static const Tk_OptionSpec optionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction", DEF_MENUBUTTON_DIRECTION, -1, Tk_Offset(TkMenuButton, direction), - 0, (ClientData) directionStrings, 0}, + 0, directionStrings, 0}, {TK_OPTION_COLOR, "-disabledforeground", "disabledForeground", "DisabledForeground", DEF_MENUBUTTON_DISABLED_FG_COLOR, -1, Tk_Offset(TkMenuButton, disabledFg), TK_OPTION_NULL_OK, @@ -133,10 +133,10 @@ static const Tk_OptionSpec optionSpecs[] = { 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound", DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkMenuButton, compound), 0, - (ClientData) compoundStrings, 0}, + compoundStrings, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_MENUBUTTON_STATE, -1, Tk_Offset(TkMenuButton, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_MENUBUTTON_TAKE_FOCUS, -1, Tk_Offset(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0}, diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 5df3875..0787efc 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -114,11 +114,11 @@ static const Tk_OptionSpec optionSpecs[] = { -1, Tk_Offset(Message, aspect), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_MESSAGE_BG_COLOR, -1, Tk_Offset(Message, border), 0, - (ClientData) DEF_MESSAGE_BG_MONO, 0}, + DEF_MESSAGE_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, - 0, -1, 0, (ClientData) "-borderwidth", 0}, + 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, - 0, -1, 0, (ClientData) "-background", 0}, + 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_MESSAGE_BORDER_WIDTH, -1, Tk_Offset(Message, borderWidth), 0, 0, 0}, @@ -126,7 +126,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_MESSAGE_CURSOR, -1, Tk_Offset(Message, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, - 0, -1, 0, (ClientData) "-foreground", 0}, + 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_MESSAGE_FONT, -1, Tk_Offset(Message, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 34f91b7..23ecf5d 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -270,11 +270,11 @@ static const Tk_ObjCustomOption stickyOption = { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, background), 0, - (ClientData) DEF_PANEDWINDOW_BG_MONO, 0}, + DEF_PANEDWINDOW_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_PANEDWINDOW_BORDERWIDTH, -1, Tk_Offset(PanedWindow, borderWidth), 0, 0, GEOMETRY}, @@ -295,7 +295,7 @@ static const Tk_OptionSpec optionSpecs[] = { Tk_Offset(PanedWindow, resizeOpaque), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), - 0, (ClientData) orientStrings, GEOMETRY}, + 0, orientStrings, GEOMETRY}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0}, {TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor", @@ -339,7 +339,7 @@ static const Tk_OptionSpec slaveOptionSpecs[] = { DEF_PANEDWINDOW_PANE_PADY, -1, Tk_Offset(Slave, pady), 0, 0, 0}, {TK_OPTION_CUSTOM, "-sticky", NULL, NULL, DEF_PANEDWINDOW_PANE_STICKY, -1, Tk_Offset(Slave, sticky), 0, - (ClientData) &stickyOption, 0}, + &stickyOption, 0}, {TK_OPTION_STRING_TABLE, "-stretch", "stretch", "Stretch", DEF_PANEDWINDOW_PANE_STRETCH, -1, Tk_Offset(Slave, stretch), 0, (ClientData) stretchStrings, 0}, diff --git a/generic/tkPlace.c b/generic/tkPlace.c index c7f3a89..22072ce 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -84,7 +84,7 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1, Tk_Offset(Slave, anchor), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1, - Tk_Offset(Slave, borderMode), 0, (ClientData) borderModeStrings, 0}, + Tk_Offset(Slave, borderMode), 0, borderModeStrings, 0}, {TK_OPTION_PIXELS, "-height", NULL, NULL, "", Tk_Offset(Slave, heightPtr), Tk_Offset(Slave, height), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_WINDOW, "-in", NULL, NULL, "", -1, Tk_Offset(Slave, inTkwin), diff --git a/generic/tkScale.c b/generic/tkScale.c index 473904a..5e577e9 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -42,17 +42,17 @@ static const char *const stateStrings[] = { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_COLOR, -1, Tk_Offset(TkScale, activeBorder), - 0, (ClientData) DEF_SCALE_ACTIVE_BG_MONO, 0}, + 0, DEF_SCALE_ACTIVE_BG_MONO, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_SCALE_BG_COLOR, -1, Tk_Offset(TkScale, bgBorder), - 0, (ClientData) DEF_SCALE_BG_MONO, 0}, + 0, DEF_SCALE_BG_MONO, 0}, {TK_OPTION_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement", DEF_SCALE_BIG_INCREMENT, -1, Tk_Offset(TkScale, bigIncrement), 0, 0, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, + NULL, 0, -1, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", DEF_SCALE_BORDER_WIDTH, -1, Tk_Offset(TkScale, borderWidth), 0, 0, 0}, @@ -66,7 +66,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_DIGITS, -1, Tk_Offset(TkScale, digits), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_SCALE_FONT, -1, Tk_Offset(TkScale, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", @@ -77,7 +77,7 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", "HighlightBackground", DEF_SCALE_HIGHLIGHT_BG_COLOR, -1, Tk_Offset(TkScale, highlightBorder), - 0, (ClientData) DEF_SCALE_HIGHLIGHT_BG_MONO, 0}, + 0, DEF_SCALE_HIGHLIGHT_BG_MONO, 0}, {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", DEF_SCALE_HIGHLIGHT, -1, Tk_Offset(TkScale, highlightColorPtr), 0, 0, 0}, @@ -91,7 +91,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_LENGTH, -1, Tk_Offset(TkScale, length), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_SCALE_ORIENT, -1, Tk_Offset(TkScale, orient), - 0, (ClientData) orientStrings, 0}, + 0, orientStrings, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_SCALE_RELIEF, -1, Tk_Offset(TkScale, relief), 0, 0, 0}, {TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay", @@ -114,7 +114,7 @@ static const Tk_OptionSpec optionSpecs[] = { 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_SCALE_STATE, -1, Tk_Offset(TkScale, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_SCALE_TAKE_FOCUS, Tk_Offset(TkScale, takeFocusPtr), -1, TK_OPTION_NULL_OK, 0, 0}, @@ -125,7 +125,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_SCALE_TO, -1, Tk_Offset(TkScale, toValue), 0, 0, 0}, {TK_OPTION_COLOR, "-troughcolor", "troughColor", "Background", DEF_SCALE_TROUGH_COLOR, -1, Tk_Offset(TkScale, troughColorPtr), - 0, (ClientData) DEF_SCALE_TROUGH_MONO, 0}, + 0, DEF_SCALE_TROUGH_MONO, 0}, {TK_OPTION_STRING, "-variable", "variable", "Variable", DEF_SCALE_VARIABLE, Tk_Offset(TkScale, varNamePtr), -1, TK_OPTION_NULL_OK, 0, 0}, diff --git a/generic/tkSquare.c b/generic/tkSquare.c index e9b0081..787630d 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -67,20 +67,20 @@ typedef struct { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", "#d9d9d9", Tk_Offset(Square, bgBorderPtr), -1, 0, - (ClientData) "white", 0}, + "white", 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0, - (ClientData) "-borderwidth", 0}, + "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0, - (ClientData) "-background", 0}, + "-background", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", "2", Tk_Offset(Square, borderWidthPtr), -1, 0, NULL, 0}, {TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer", "1", Tk_Offset(Square, doubleBufferPtr), -1, 0 , NULL, 0}, {TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, -1, 0, - (ClientData) "-foreground", 0}, + "-foreground", 0}, {TK_OPTION_BORDER, "-foreground", "foreground", "Foreground", "#b03060", Tk_Offset(Square, fgBorderPtr), -1, 0, - (ClientData) "black", 0}, + "black", 0}, {TK_OPTION_PIXELS, "-posx", "posx", "PosX", "0", Tk_Offset(Square, xPtr), -1, 0, NULL, 0}, {TK_OPTION_PIXELS, "-posy", "posy", "PosY", "0", diff --git a/generic/tkTest.c b/generic/tkTest.c index 1df8ae8..bd15739 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -591,10 +591,10 @@ TestobjconfigObjCmd( {TK_OPTION_STRING_TABLE, "-stringtable", "StringTable", "stringTable", "one", Tk_Offset(TypesRecord, stringTablePtr), -1, - TK_CONFIG_NULL_OK, (ClientData) stringTable, 0x10}, + TK_CONFIG_NULL_OK, stringTable, 0x10}, {TK_OPTION_COLOR, "-color", "color", "Color", "red", Tk_Offset(TypesRecord, colorPtr), -1, - TK_CONFIG_NULL_OK, (ClientData) "black", 0x20}, + TK_CONFIG_NULL_OK, "black", 0x20}, {TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12", Tk_Offset(TypesRecord, fontPtr), -1, TK_CONFIG_NULL_OK, 0, 0x40}, @@ -603,7 +603,7 @@ TestobjconfigObjCmd( TK_CONFIG_NULL_OK, 0, 0x80}, {TK_OPTION_BORDER, "-border", "border", "Border", "blue", Tk_Offset(TypesRecord, borderPtr), -1, - TK_CONFIG_NULL_OK, (ClientData) "white", 0x100}, + TK_CONFIG_NULL_OK, "white", 0x100}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised", Tk_Offset(TypesRecord, reliefPtr), -1, TK_CONFIG_NULL_OK, 0, 0x200}, @@ -621,9 +621,9 @@ TestobjconfigObjCmd( TK_CONFIG_NULL_OK, 0, 0x2000}, {TK_OPTION_CUSTOM, "-custom", NULL, NULL, "", Tk_Offset(TypesRecord, customPtr), -1, - TK_CONFIG_NULL_OK, (ClientData)&CustomOption, 0x4000}, + TK_CONFIG_NULL_OK, &CustomOption, 0x4000}, {TK_OPTION_SYNONYM, "-synonym", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-color", 0x8000}, + NULL, 0, -1, 0, "-color", 0x8000}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0} }; Tk_OptionTable optionTable; @@ -862,10 +862,10 @@ TestobjconfigObjCmd( {TK_OPTION_STRING_TABLE, "-stringtable", "StringTable", "stringTable", "one", -1, Tk_Offset(InternalRecord, index), - TK_CONFIG_NULL_OK, (ClientData) internalStringTable, 0x10}, + TK_CONFIG_NULL_OK, internalStringTable, 0x10}, {TK_OPTION_COLOR, "-color", "color", "Color", "red", -1, Tk_Offset(InternalRecord, colorPtr), - TK_CONFIG_NULL_OK, (ClientData) "black", 0x20}, + TK_CONFIG_NULL_OK, "black", 0x20}, {TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12", -1, Tk_Offset(InternalRecord, tkfont), TK_CONFIG_NULL_OK, 0, 0x40}, @@ -874,7 +874,7 @@ TestobjconfigObjCmd( TK_CONFIG_NULL_OK, 0, 0x80}, {TK_OPTION_BORDER, "-border", "border", "Border", "blue", -1, Tk_Offset(InternalRecord, border), - TK_CONFIG_NULL_OK, (ClientData) "white", 0x100}, + TK_CONFIG_NULL_OK, "white", 0x100}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised", -1, Tk_Offset(InternalRecord, relief), TK_CONFIG_NULL_OK, 0, 0x200}, @@ -895,9 +895,9 @@ TestobjconfigObjCmd( TK_CONFIG_NULL_OK, 0, 0}, {TK_OPTION_CUSTOM, "-custom", NULL, NULL, "", -1, Tk_Offset(InternalRecord, custom), - TK_CONFIG_NULL_OK, (ClientData)&CustomOption, 0x4000}, + TK_CONFIG_NULL_OK, &CustomOption, 0x4000}, {TK_OPTION_SYNONYM, "-synonym", NULL, NULL, - NULL, -1, -1, 0, (ClientData) "-color", 0x8000}, + NULL, -1, -1, 0, "-color", 0x8000}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0} }; Tk_OptionTable optionTable; diff --git a/generic/tkText.c b/generic/tkText.c index d1f489d..56a98e7 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -125,12 +125,12 @@ static const Tk_OptionSpec optionSpecs[] = { Tk_Offset(TkText, autoSeparators), 0, 0, 0}, {TK_OPTION_BORDER, "-background", "background", "Background", DEF_TEXT_BG_COLOR, -1, Tk_Offset(TkText, border), - 0, (ClientData) DEF_TEXT_BG_MONO, 0}, + 0, DEF_TEXT_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-borderwidth", + NULL, 0, -1, 0, "-borderwidth", TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, (ClientData) "-background", 0}, + NULL, 0, -1, 0, "-background", 0}, {TK_OPTION_BOOLEAN, "-blockcursor", "blockCursor", "BlockCursor", DEF_TEXT_BLOCK_CURSOR, -1, Tk_Offset(TkText, insertCursorType), 0, 0, 0}, @@ -142,12 +142,12 @@ static const Tk_OptionSpec optionSpecs[] = { TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_CUSTOM, "-endline", NULL, NULL, NULL, -1, Tk_Offset(TkText, end), TK_OPTION_NULL_OK, - (ClientData) &lineOption, TK_TEXT_LINE_RANGE}, + &lineOption, TK_TEXT_LINE_RANGE}, {TK_OPTION_BOOLEAN, "-exportselection", "exportSelection", "ExportSelection", DEF_TEXT_EXPORT_SELECTION, -1, Tk_Offset(TkText, exportSelection), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, (ClientData) "-foreground", 0}, + NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_TEXT_FONT, -1, Tk_Offset(TkText, tkfont), 0, 0, TK_TEXT_LINE_GEOMETRY}, @@ -170,7 +170,7 @@ static const Tk_OptionSpec optionSpecs[] = { "Foreground", DEF_TEXT_INACTIVE_SELECT_COLOR, -1, Tk_Offset(TkText, inactiveSelBorder), - TK_OPTION_NULL_OK, (ClientData) DEF_TEXT_SELECT_MONO, 0}, + TK_OPTION_NULL_OK, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_TEXT_INSERT_BG, -1, Tk_Offset(TkText, insertBorder), @@ -188,7 +188,7 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-insertunfocussed", "insertUnfocussed", "InsertUnfocussed", DEF_TEXT_INSERT_UNFOCUSSED, -1, Tk_Offset(TkText, insertUnfocussed), - 0, (ClientData) insertUnfocussedStrings, 0}, + 0, insertUnfocussedStrings, 0}, {TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", DEF_TEXT_INSERT_WIDTH, -1, Tk_Offset(TkText, insertWidth), 0, 0, 0}, @@ -203,15 +203,15 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_TEXT_RELIEF, -1, Tk_Offset(TkText, relief), 0, 0, 0}, {TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_TEXT_SELECT_COLOR, -1, Tk_Offset(TkText, selBorder), - 0, (ClientData) DEF_TEXT_SELECT_MONO, 0}, + 0, DEF_TEXT_SELECT_MONO, 0}, {TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_TEXT_SELECT_BD_COLOR, Tk_Offset(TkText, selBorderWidthPtr), Tk_Offset(TkText, selBorderWidth), - TK_OPTION_NULL_OK, (ClientData) DEF_TEXT_SELECT_BD_MONO, 0}, + TK_OPTION_NULL_OK, DEF_TEXT_SELECT_BD_MONO, 0}, {TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background", DEF_TEXT_SELECT_FG_COLOR, -1, Tk_Offset(TkText, selFgColorPtr), - TK_CONFIG_NULL_OK, (ClientData) DEF_TEXT_SELECT_FG_MONO, 0}, + TK_CONFIG_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0}, {TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid", DEF_TEXT_SET_GRID, -1, Tk_Offset(TkText, setGrid), 0, 0, 0}, {TK_OPTION_PIXELS, "-spacing1", "spacing1", "Spacing", @@ -225,16 +225,16 @@ static const Tk_OptionSpec optionSpecs[] = { TK_OPTION_DONT_SET_DEFAULT, 0 , TK_TEXT_LINE_GEOMETRY }, {TK_OPTION_CUSTOM, "-startline", NULL, NULL, NULL, -1, Tk_Offset(TkText, start), TK_OPTION_NULL_OK, - (ClientData) &lineOption, TK_TEXT_LINE_RANGE}, + &lineOption, TK_TEXT_LINE_RANGE}, {TK_OPTION_STRING_TABLE, "-state", "state", "State", DEF_TEXT_STATE, -1, Tk_Offset(TkText, state), - 0, (ClientData) stateStrings, 0}, + 0, stateStrings, 0}, {TK_OPTION_STRING, "-tabs", "tabs", "Tabs", DEF_TEXT_TABS, Tk_Offset(TkText, tabOptionPtr), -1, TK_OPTION_NULL_OK, 0, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_STRING_TABLE, "-tabstyle", "tabStyle", "TabStyle", DEF_TEXT_TABSTYLE, -1, Tk_Offset(TkText, tabStyle), - 0, (ClientData) tabStyleStrings, TK_TEXT_LINE_GEOMETRY}, + 0, tabStyleStrings, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", DEF_TEXT_TAKE_FOCUS, -1, Tk_Offset(TkText, takeFocus), TK_OPTION_NULL_OK, 0, 0}, @@ -245,7 +245,7 @@ static const Tk_OptionSpec optionSpecs[] = { TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_STRING_TABLE, "-wrap", "wrap", "Wrap", DEF_TEXT_WRAP, -1, Tk_Offset(TkText, wrapMode), - 0, (ClientData) wrapStrings, TK_TEXT_LINE_GEOMETRY}, + 0, wrapStrings, TK_TEXT_LINE_GEOMETRY}, {TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand", DEF_TEXT_XSCROLL_COMMAND, -1, Tk_Offset(TkText, xScrollCmd), TK_OPTION_NULL_OK, 0, 0}, diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index 83684c1..47ee49a 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -84,7 +84,7 @@ typedef enum { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-align", NULL, NULL, "center", -1, Tk_Offset(TkTextEmbImage, align), - 0, (ClientData) alignStrings, 0}, + 0, alignStrings, 0}, {TK_OPTION_PIXELS, "-padx", NULL, NULL, "0", -1, Tk_Offset(TkTextEmbImage, padX), 0, 0, 0}, {TK_OPTION_PIXELS, "-pady", NULL, NULL, diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 38a1c44..9afda0a 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -80,13 +80,13 @@ static const Tk_OptionSpec tagOptionSpecs[] = { NULL, Tk_Offset(TkTextTag, tabStringPtr), -1, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-tabstyle", NULL, NULL, NULL, -1, Tk_Offset(TkTextTag, tabStyle), - TK_OPTION_NULL_OK, (ClientData) tabStyleStrings, 0}, + TK_OPTION_NULL_OK, tabStyleStrings, 0}, {TK_OPTION_STRING, "-underline", NULL, NULL, NULL, -1, Tk_Offset(TkTextTag, underlineString), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING_TABLE, "-wrap", NULL, NULL, NULL, -1, Tk_Offset(TkTextTag, wrapMode), - TK_OPTION_NULL_OK, (ClientData) wrapStrings, 0}, + TK_OPTION_NULL_OK, wrapStrings, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index e54aeef..58d3198 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -100,7 +100,7 @@ typedef enum { static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-align", NULL, NULL, "center", -1, Tk_Offset(TkTextEmbWindow, align), - 0, (ClientData) alignStrings, 0}, + 0, alignStrings, 0}, {TK_OPTION_STRING, "-create", NULL, NULL, NULL, -1, Tk_Offset(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-padx", NULL, NULL, -- cgit v0.12 From 202130ef9cbf2e4f2f61b4737ce35f5223412fd1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 22 Jun 2012 12:32:35 +0000 Subject: [Bug 1844430]: cygwin make fails in 8.4.14-8.5b3 --- ChangeLog | 5 +++++ unix/tcl.m4 | 6 ++++++ win/Makefile.in | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ed87a4..51aa0ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-22 Jan Nijtmans + + * win/Makefile.in: [Bug 1844430]: cygwin make fails in 8.4.14-8.5b3 + * unix/tcl.m4: Sync with Tcl version. + 2012-06-10 Jan Nijtmans * library/*.tcl: [Bug 3534137]: $tcl_platform(platform) != diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 2391a41..7161c91 100755 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1226,6 +1226,12 @@ dnl AC_CHECK_TOOL(AR, ar) if test "$ac_cv_cygwin" = "no"; then AC_MSG_ERROR([${CC} is not a cygwin compiler.]) fi + if test "x${TCL_THREADS}" = "x0"; then + AC_MSG_ERROR([CYGWIN compile is only supported with --enable-threads]) + fi + if test ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then + AC_MSG_ERROR([Please configure and make the ../win directory first.]) + fi ;; dgux*) SHLIB_CFLAGS="-K PIC" diff --git a/win/Makefile.in b/win/Makefile.in index fad8a8d..752236f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -374,13 +374,13 @@ $(ROOT_DIR)/doc/man.macros: doc: $(ROOT_DIR)/doc/man.macros -winhelp: $(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl $(MAN2TCL) +winhelp: $(TCL_SRC_DIR)/tools/man2help.tcl $(MAN2TCL) $(TCL_EXE) "$(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl" tcl "$(VER)" $(CORE_DOCS) $(COPY) "$(TCL_BIN_DIR)/tcl.hpj" ./ hcw /c /e tcl.hpj $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)/tools/" -$(MAN2TCL): $(TCL_SRC_DIR_NATIVE)/tools/man2tcl.c +$(MAN2TCL): $(TCL_SRC_DIR)/tools/man2tcl.c $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)/tools/man2tcl.c" # Specifying TESTFLAGS on the command line is the standard way to pass -- cgit v0.12 From 357e2172dfd690dace8d5bfa8c10e07a740ff1df Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 23 Jun 2012 07:41:50 +0000 Subject: sync tcl.m4 with Tcl version autoconf-2.13 --- ChangeLog | 1 + unix/configure | 358 +++++++++++++++++++++++++++++---------------------------- win/configure | 85 +++++++------- win/tcl.m4 | 3 - 4 files changed, 224 insertions(+), 223 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51aa0ff..9a346d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * win/Makefile.in: [Bug 1844430]: cygwin make fails in 8.4.14-8.5b3 * unix/tcl.m4: Sync with Tcl version. + * unix/configure: autoconf-2.13 2012-06-10 Jan Nijtmans diff --git a/unix/configure b/unix/configure index 6a3a75b..ff61874 100755 --- a/unix/configure +++ b/unix/configure @@ -2382,6 +2382,12 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 if test "$ac_cv_cygwin" = "no"; then { echo "configure: error: ${CC} is not a cygwin compiler." 1>&2; exit 1; } fi + if test "x${TCL_THREADS}" = "x0"; then + { echo "configure: error: CYGWIN compile is only supported with --enable-threads" 1>&2; exit 1; } + fi + if test ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then + { echo "configure: error: Please configure and make the ../win directory first." 1>&2; exit 1; } + fi ;; dgux*) SHLIB_CFLAGS="-K PIC" @@ -2401,7 +2407,7 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 DL_OBJS="tclLoadDl.o" DL_LIBS="-lroot" echo $ac_n "checking for inet_ntoa in -lnetwork""... $ac_c" 1>&6 -echo "configure:2405: checking for inet_ntoa in -lnetwork" >&5 +echo "configure:2411: checking for inet_ntoa in -lnetwork" >&5 ac_lib_var=`echo network'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2409,7 +2415,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnetwork $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2459,7 +2465,7 @@ EOF SHLIB_SUFFIX=".sl" fi echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2463: checking for shl_load in -ldld" >&5 +echo "configure:2469: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2467,7 +2473,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2544,7 +2550,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2548: checking for shl_load in -ldld" >&5 +echo "configure:2554: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2552,7 +2558,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2690,17 +2696,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2694: checking for dld.h" >&5 +echo "configure:2700: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2732,7 +2738,7 @@ fi fi if test $do64bit = yes; then echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6 -echo "configure:2736: checking if compiler accepts -m64 flag" >&5 +echo "configure:2742: checking if compiler accepts -m64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2740,14 +2746,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_m64=yes else @@ -2798,17 +2804,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2802: checking for dld.h" >&5 +echo "configure:2808: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2877,17 +2883,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2881: checking for dlfcn.h" >&5 +echo "configure:2887: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2915,13 +2921,13 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2919: checking for ELF" >&5 +echo "configure:2925: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:3004: checking for ELF" >&5 +echo "configure:3010: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 case `arch` in ppc) echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6 -echo "configure:3112: checking if compiler accepts -arch ppc64 flag" >&5 +echo "configure:3118: checking if compiler accepts -arch ppc64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3116,14 +3122,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_ppc64=yes else @@ -3143,7 +3149,7 @@ echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6 fi;; i386) echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6 -echo "configure:3147: checking if compiler accepts -arch x86_64 flag" >&5 +echo "configure:3153: checking if compiler accepts -arch x86_64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3151,14 +3157,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_x86_64=yes else @@ -3187,7 +3193,7 @@ echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6 fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:3191: checking if ld accepts -single_module flag" >&5 +echo "configure:3197: checking if ld accepts -single_module flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3195,14 +3201,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_single_module=yes else @@ -3228,7 +3234,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 -echo "configure:3232: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:3238: checking if ld accepts -search_paths_first flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3236,14 +3242,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_search_paths_first=yes else @@ -3266,7 +3272,7 @@ echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6 PLAT_OBJS=\$\(MAC\_OSX_OBJS\) PLAT_SRCS=\$\(MAC\_OSX_SRCS\) echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6 -echo "configure:3270: checking whether to use CoreFoundation" >&5 +echo "configure:3276: checking whether to use CoreFoundation" >&5 # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then enableval="$enable_corefoundation" @@ -3278,7 +3284,7 @@ fi echo "$ac_t""$tcl_corefoundation" 1>&6 if test $tcl_corefoundation = yes; then echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6 -echo "configure:3282: checking for CoreFoundation.framework" >&5 +echo "configure:3288: checking for CoreFoundation.framework" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3292,14 +3298,14 @@ else done; fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3326,7 +3332,7 @@ EOF fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6 -echo "configure:3330: checking for 64-bit CoreFoundation" >&5 +echo "configure:3336: checking for 64-bit CoreFoundation" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3335,14 +3341,14 @@ else eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation_64=yes else @@ -3671,7 +3677,7 @@ EOF # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:3675: checking for ld accepts -Bexport flag" >&5 +echo "configure:3681: checking for ld accepts -Bexport flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3679,14 +3685,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -3736,13 +3742,13 @@ echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3740: checking sys/exec.h" >&5 +echo "configure:3746: checking sys/exec.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3760,7 +3766,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -3780,13 +3786,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3784: checking a.out.h" >&5 +echo "configure:3790: checking a.out.h" >&5 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3804,7 +3810,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -3824,13 +3830,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3828: checking sys/exec_aout.h" >&5 +echo "configure:3834: checking sys/exec_aout.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3848,7 +3854,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -3966,12 +3972,12 @@ fi # warning when initializing a union member. echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 -echo "configure:3970: checking for cast to union support" >&5 +echo "configure:3976: checking for cast to union support" >&5 if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_cast_to_union=yes else @@ -4036,7 +4042,7 @@ EOF echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:4040: checking for build with symbols" >&5 +echo "configure:4046: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -4101,21 +4107,21 @@ TK_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4105: checking for required early compiler flags" >&5 +echo "configure:4111: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4123,7 +4129,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4131,7 +4137,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4158,14 +4164,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4173,7 +4179,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4181,7 +4187,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4208,14 +4214,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4223,7 +4229,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4231,7 +4237,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4262,7 +4268,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4266: checking for 64-bit integer type" >&5 +echo "configure:4272: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4270,14 +4276,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4291,7 +4297,7 @@ rm -f conftest* # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4325,13 +4331,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4329: checking for struct dirent64" >&5 +echo "configure:4335: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4339,7 +4345,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4360,13 +4366,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4364: checking for struct stat64" >&5 +echo "configure:4370: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4374,7 +4380,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4397,12 +4403,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4401: checking for $ac_func" >&5 +echo "configure:4407: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4450,13 +4456,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4454: checking for off64_t" >&5 +echo "configure:4460: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4464,7 +4470,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4495,14 +4501,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4499: checking whether byte ordering is bigendian" >&5 +echo "configure:4505: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4513,11 +4519,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4528,7 +4534,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4548,7 +4554,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -4613,20 +4619,20 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:4617: checking for fd_set in sys/types" >&5 +echo "configure:4623: checking for fd_set in sys/types" >&5 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:4630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -4642,13 +4648,13 @@ echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 tk_ok=$tcl_cv_type_fd_set if test $tk_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:4646: checking for fd_mask in sys/select" >&5 +echo "configure:4652: checking for fd_mask in sys/select" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4688,17 +4694,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4692: checking for $ac_hdr" >&5 +echo "configure:4698: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4725,12 +4731,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4729: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4735: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4739,7 +4745,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4769,12 +4775,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4773: checking for strtod" >&5 +echo "configure:4779: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -4819,7 +4825,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4823: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4829: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4828,7 +4834,7 @@ else tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=ok else @@ -4882,12 +4888,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4886: checking for ANSI C header files" >&5 +echo "configure:4892: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4895,7 +4901,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4912,7 +4918,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4930,7 +4936,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4951,7 +4957,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4962,7 +4968,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4986,12 +4992,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4990: checking for mode_t" >&5 +echo "configure:4996: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5019,12 +5025,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5023: checking for pid_t" >&5 +echo "configure:5029: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5052,12 +5058,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5056: checking for size_t" >&5 +echo "configure:5062: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5085,12 +5091,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5089: checking for uid_t in sys/types.h" >&5 +echo "configure:5095: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5124,20 +5130,20 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:5128: checking pw_gecos in struct pwd" >&5 +echo "configure:5134: checking pw_gecos in struct pwd" >&5 if eval "test \"`echo '$''{'tcl_cv_pwd_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:5141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_pwd_pw_gecos=yes else @@ -5163,7 +5169,7 @@ fi if test "`uname -s`" = "Darwin" ; then echo $ac_n "checking whether to use Aqua""... $ac_c" 1>&6 -echo "configure:5167: checking whether to use Aqua" >&5 +echo "configure:5173: checking whether to use Aqua" >&5 # Check whether --enable-aqua or --disable-aqua was given. if test "${enable_aqua+set}" = set; then enableval="$enable_aqua" @@ -5190,7 +5196,7 @@ fi if test "$fat_32_64" = yes; then if test $tk_aqua = no; then echo $ac_n "checking for 64-bit X11""... $ac_c" 1>&6 -echo "configure:5194: checking for 64-bit X11" >&5 +echo "configure:5200: checking for 64-bit X11" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_x11_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5201,14 +5207,14 @@ else CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" cat > conftest.$ac_ext < int main() { XrmInitialize(); ; return 0; } EOF -if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_x11_64=yes else @@ -5268,7 +5274,7 @@ else # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5272: checking for X" >&5 +echo "configure:5278: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5330,12 +5336,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5404,14 +5410,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5501,12 +5507,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -5526,15 +5532,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:5530: checking for X11 header files" >&5 +echo "configure:5536: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5570,7 +5576,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:5574: checking for X11 libraries" >&5 +echo "configure:5580: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -5590,7 +5596,7 @@ echo "configure:5574: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:5594: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:5600: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5598,7 +5604,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5686,7 +5692,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" if test $tk_aqua = no; then echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5690: checking for main in -lXbsd" >&5 +echo "configure:5696: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5694,14 +5700,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5725,12 +5731,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5729: checking for connect" >&5 +echo "configure:5735: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5775,7 +5781,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:5779: checking for main in -lsocket" >&5 +echo "configure:5785: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5783,14 +5789,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5816,12 +5822,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:5820: checking for accept" >&5 +echo "configure:5826: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -5866,12 +5872,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5870: checking for gethostbyname" >&5 +echo "configure:5876: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5912,7 +5918,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:5916: checking for main in -lnsl" >&5 +echo "configure:5922: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5920,14 +5926,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5963,13 +5969,13 @@ fi if test -d /usr/include/mit -a $tk_aqua = no; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:5967: checking MIT X libraries" >&5 +echo "configure:5973: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -5980,7 +5986,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -6004,14 +6010,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:6008: checking whether char is unsigned" >&5 +echo "configure:6014: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -6104,7 +6110,7 @@ if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 -echo "configure:6108: checking how to package libraries" >&5 +echo "configure:6114: checking how to package libraries" >&5 # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then enableval="$enable_framework" diff --git a/win/configure b/win/configure index 9cacd06..824a754 100755 --- a/win/configure +++ b/win/configure @@ -1308,16 +1308,13 @@ fi if test "$GCC" = "yes"; then - if test "$TCL_CC" = "gcc"; then - CFLAGS="$CFLAGS -mwin32" - fi echo $ac_n "checking for cross-compile version of gcc""... $ac_c" 1>&6 -echo "configure:1316: checking for cross-compile version of gcc" >&5 +echo "configure:1313: checking for cross-compile version of gcc" >&5 if eval "test \"`echo '$''{'ac_cv_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cross=no else @@ -1377,9 +1374,9 @@ echo "$ac_t""$ac_cv_cross" 1>&6 echo "END" >> $conftest echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6 -echo "configure:1381: checking for Windows native path bug in windres" >&5 +echo "configure:1378: checking for Windows native path bug in windres" >&5 cyg_conftest=`$CYGPATH $conftest` - if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then + if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then echo "$ac_t""no" 1>&6 else echo "$ac_t""yes" 1>&6 @@ -1399,12 +1396,12 @@ echo "configure:1381: checking for Windows native path bug in windres" >&5 if test "${GCC}" = "yes" ; then echo $ac_n "checking for mingw32 version of gcc""... $ac_c" 1>&6 -echo "configure:1403: checking for mingw32 version of gcc" >&5 +echo "configure:1400: checking for mingw32 version of gcc" >&5 if eval "test \"`echo '$''{'ac_cv_win32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_win32=no else @@ -1435,7 +1432,7 @@ echo "$ac_t""$ac_cv_win32" 1>&6 fi echo $ac_n "checking compiler flags""... $ac_c" 1>&6 -echo "configure:1439: checking compiler flags" >&5 +echo "configure:1436: checking compiler flags" >&5 if test "${GCC}" = "yes" ; then SHLIB_LD="" SHLIB_LD_LIBS="" @@ -1534,7 +1531,7 @@ echo "configure:1439: checking compiler flags" >&5 ;; *) cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_win_64bit=yes else @@ -1785,7 +1782,7 @@ EOF if test "${GCC}" = "yes" ; then echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6 -echo "configure:1789: checking for SEH support in compiler" >&5 +echo "configure:1786: checking for SEH support in compiler" >&5 if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1793,7 +1790,7 @@ else tcl_cv_seh=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_seh=yes else @@ -1842,12 +1839,12 @@ EOF # sufficient for getting the current code to work. # echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6 -echo "configure:1846: checking for EXCEPTION_DISPOSITION support in include files" >&5 +echo "configure:1843: checking for EXCEPTION_DISPOSITION support in include files" >&5 if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_eh_disposition=yes else @@ -1886,12 +1883,12 @@ EOF # used by mingw and cygwin is known to do this. echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6 -echo "configure:1890: checking for winnt.h that ignores VOID define" >&5 +echo "configure:1887: checking for winnt.h that ignores VOID define" >&5 if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_winnt_ignore_void=yes else @@ -1933,12 +1930,12 @@ EOF # warning when initializing a union member. echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 -echo "configure:1937: checking for cast to union support" >&5 +echo "configure:1934: checking for cast to union support" >&5 if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_cast_to_union=yes else @@ -1982,7 +1979,7 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1986: checking how to run the C preprocessor" >&5 +echo "configure:1983: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1997,13 +1994,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2014,13 +2011,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2031,13 +2028,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2063,17 +2060,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:2067: checking for errno.h" >&5 +echo "configure:2064: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2103,20 +2100,20 @@ fi if test "${MACHINE}" = "X86" ; then echo $ac_n "checking availability of _strtoi64""... $ac_c" 1>&6 -echo "configure:2107: checking availability of _strtoi64" >&5 +echo "configure:2104: checking availability of _strtoi64" >&5 if eval "test \"`echo '$''{'tcl_have_strtoi64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { _strtoi64(0,0,0) ; return 0; } EOF -if { (eval echo configure:2120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_have_strtoi64=yes else @@ -2145,7 +2142,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:2149: checking for build with symbols" >&5 +echo "configure:2146: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -2210,7 +2207,7 @@ TK_DBGX=${DBGX} echo $ac_n "checking whether to embed manifest""... $ac_c" 1>&6 -echo "configure:2214: checking whether to embed manifest" >&5 +echo "configure:2211: checking whether to embed manifest" >&5 # Check whether --enable-embedded-manifest or --disable-embedded-manifest was given. if test "${enable_embedded_manifest+set}" = set; then enableval="$enable_embedded_manifest" @@ -2227,7 +2224,7 @@ fi -a "$GCC" != "yes" ; then # Add the magic to embed the manifest into the dll/exe cat > conftest.$ac_ext <= 1400 @@ -2260,14 +2257,14 @@ rm -f conftest* echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6 -echo "configure:2264: checking for tclsh in Tcl build directory" >&5 +echo "configure:2261: checking for tclsh in Tcl build directory" >&5 BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT} echo "$ac_t""$BUILD_TCLSH" 1>&6 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:2271: checking for tclsh" >&5 +echo "configure:2268: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/win/tcl.m4 b/win/tcl.m4 index 362b36c..708efc4 100755 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -414,9 +414,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ if test "$GCC" = "yes"; then - if test "$TCL_CC" = "gcc"; then - CFLAGS="$CFLAGS -mwin32" - fi AC_CACHE_CHECK(for cross-compile version of gcc, ac_cv_cross, AC_TRY_COMPILE([ -- cgit v0.12 From 80dce1507a225f823109333c59a8df63fb014212 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 26 Jun 2012 16:52:46 +0000 Subject: link cygwin wish8.6 with tk86.dll (configuration part) --- unix/configure.in | 7 +++++++ unix/tcl.m4 | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/unix/configure.in b/unix/configure.in index 3458dd0..34b3f51 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -709,6 +709,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then # can pick up a potential make override of VERSION. Also, don't put this # into CFLAGS as it should not go into tkConfig.sh EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"' + WISH_BUILD_LIB_SPEC="${TK_BUILD_LIB_SPEC} ${WISH_LIBS}" else if test $tk_aqua = yes; then EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)" && mkdir -p "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' @@ -721,6 +722,11 @@ else TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" + if test "${ac_cv_cygwin+set}" = set; then + WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk86 \${TCL_LIB_SPEC}" + else + WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}" + fi TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" fi @@ -793,6 +799,7 @@ AC_SUBST(TK_SHARED_BUILD) AC_SUBST(LD_LIBRARY_PATH_VAR) AC_SUBST(TK_BUILD_LIB_SPEC) +AC_SUBST(WISH_BUILD_LIB_SPEC) AC_SUBST(TCL_STUB_FLAGS) AC_SUBST(XINCLUDES) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index fbb86b3..44475c2 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2098,22 +2098,22 @@ dnl # preprocessing tests use only CPPFLAGS. AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} - MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' + MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${TCL_SHLIB_LD_EXTRAS} ${SHLIB_LD_LIBS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" ], [ - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' ]) ], [ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} AS_IF([test "$RANLIB" = ""], [ MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' ], [ MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' ]) ]) @@ -2123,7 +2123,7 @@ dnl # preprocessing tests use only CPPFLAGS. INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' ], [ MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)"/$(STUB_LIB_FILE) ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' ]) # Define TCL_LIBS now that we know what DL_LIBS is. -- cgit v0.12 From 818d6929360c505a331ac6711c9f81dc84d67f60 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 26 Jun 2012 19:52:53 +0000 Subject: link cygwin wish8.6 with tk86.dll (configuration part) --- unix/configure | 31 +++++++++++++++++++------------ unix/configure.in | 19 +++++++++++++------ unix/tcl.m4 | 12 ++++++------ 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/unix/configure b/unix/configure index ff61874..fc62cca 100755 --- a/unix/configure +++ b/unix/configure @@ -3940,20 +3940,20 @@ fi LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' if test "${SHLIB_SUFFIX}" = ".dll"; then - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" else - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} if test "$RANLIB" = "" ; then MAKE_LIB='$(STLIB_LD) $@ ${OBJS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' else MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' fi fi @@ -3961,10 +3961,10 @@ fi # Stub lib does not depend on shared/static configuration if test "$RANLIB" = "" ; then MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' else MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' fi # See if the compiler supports casting to a union type. @@ -6200,12 +6200,17 @@ else # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" - else - eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" - fi - TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" + else + eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" + fi + TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" + if test "${ac_cv_cygwin+set}" = set; then + WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk84 \${TCL_LIB_SPEC}" + else + WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}" + fi TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" else TK_BUILD_EXP_FILE="lib.exp" @@ -6213,9 +6218,11 @@ else if test "$GCC" = "yes" ; then TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" + WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`" else TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" + WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}" fi fi diff --git a/unix/configure.in b/unix/configure.in index b5f2770..677ce03 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -496,12 +496,17 @@ else # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" - else - eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" - fi - TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}" + else + eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" + fi + TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" + if test "${ac_cv_cygwin+set}" = set; then + WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk84 \${TCL_LIB_SPEC}" + else + WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}" + fi TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" else TK_BUILD_EXP_FILE="lib.exp" @@ -509,9 +514,11 @@ else if test "$GCC" = "yes" ; then TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" + WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`" else TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" + WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}" fi fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 7161c91..c86a3f2 100755 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2211,20 +2211,20 @@ dnl # preprocessing tests use only CPPFLAGS. LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' if test "${SHLIB_SUFFIX}" = ".dll"; then - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)"' DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" else - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} if test "$RANLIB" = "" ; then MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' else MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' fi fi @@ -2232,10 +2232,10 @@ dnl # preprocessing tests use only CPPFLAGS. # Stub lib does not depend on shared/static configuration if test "$RANLIB" = "" ; then MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"' else MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' - INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))' + INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(STUB_LIB_FILE))' fi # See if the compiler supports casting to a union type. -- cgit v0.12 From 978dd085c12ba2000e476dab6a6c83a1c2fbec8e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 27 Jun 2012 13:14:10 +0000 Subject: link cygwin wish with tk84.dll install tk84.dll --- unix/Makefile.in | 19 +++++++++++++------ unix/configure | 26 +++++++++++++++----------- unix/configure.in | 29 ++++++++++++++++------------- unix/tcl.m4 | 2 +- 4 files changed, 45 insertions(+), 31 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 2aff5cc..2559750 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -551,8 +551,11 @@ objs: ${OBJS} ${WISH_EXE}: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@ - ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \ - $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o ${WISH_EXE} + @if test -f "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ + cp "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \ + fi + ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @WISH_BUILD_LIB_SPEC@ \ + $(CC_SEARCH_FLAGS) -o ${WISH_EXE} # Resetting the LIB_RUNTIME_DIR below is required so that # the generated tktest executable gets the build directory @@ -674,6 +677,10 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) ${WISH @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" + @if test -f "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ + $(INSTALL_LIBRARY) "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\ + chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\ + fi @if test "$(TK_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \ @@ -728,7 +735,7 @@ install-libraries: libraries $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/images"; \ fi; \ done; - @echo "Installing translation directory"; + @echo "Installing message catalog files to $(SCRIPT_INSTALL_DIR)/msgs/"; @for i in $(TOP_DIR)/library/msgs/*.msg; \ do \ if [ -f $$i ] ; then \ @@ -748,7 +755,7 @@ install-demos: else true; \ fi; \ done; - @echo "Installing demos to $(DEMO_INSTALL_DIR)/"; + @echo "Installing demo files to $(DEMO_INSTALL_DIR)/"; @for i in $(TOP_DIR)/library/demos/*; \ do \ if [ -f $$i ] ; then \ @@ -764,7 +771,7 @@ install-demos: chmod 755 "$(DEMO_INSTALL_DIR)/$$i"; \ fi; \ done; - @echo "Installing demo images"; + @echo "Installing demo images to $(DEMO_INSTALL_DIR)/images/"; @for i in $(TOP_DIR)/library/demos/images/*; \ do \ if [ -f $$i ] ; then \ @@ -814,7 +821,7 @@ install-private-headers: libraries @if test ! -x $(SRC_DIR)/install-sh; then \ chmod +x $(SRC_DIR)/install-sh; \ fi - @echo "Installing private header files"; + @echo "Installing private header files to $(PRIVATE_INCLUDE_INSTALL_DIR)/"; @for i in $(PRIVATE_HDRS); \ do \ $(INSTALL_DATA) $$i "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ diff --git a/unix/configure b/unix/configure index fc62cca..8cac4c0 100755 --- a/unix/configure +++ b/unix/configure @@ -812,8 +812,8 @@ if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi # Make sure srcdir is fully qualified! -srcdir=`cd $srcdir ; pwd` -TK_SRC_DIR=`cd $srcdir/..; pwd` +srcdir="`cd "$srcdir" ; pwd`" +TK_SRC_DIR="`cd "$srcdir/.."; pwd`" #------------------------------------------------------------------------ # Compress and/or soft link the manpages? @@ -3953,7 +3953,7 @@ fi INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' else MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' fi fi @@ -6143,7 +6143,7 @@ fi fi TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' @@ -6168,7 +6168,8 @@ EOF fi TK_LIB_FILE="Tk" TK_LIB_FLAG="-framework Tk" - TK_BUILD_LIB_SPEC="-F`pwd` -framework Tk" + TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" + WISH_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk \${WISH_LIBS}" TK_LIB_SPEC="-F${libdir} -framework Tk" libdir="${libdir}/Tk.framework/Versions/\${VERSION}" TK_LIBRARY="${libdir}/Resources/Scripts" @@ -6218,11 +6219,11 @@ else if test "$GCC" = "yes" ; then TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" - WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" + WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd` \${WISH_LIBS}" TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`" else TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" - WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" + WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE} \${WISH_LIBS}" TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}" fi fi @@ -6235,9 +6236,10 @@ if test $tk_aqua = yes; then REZ=/Developer/Tools/Rez REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then - EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)' - TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}" - TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" + EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' + TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" + WISH_BUILD_LIB_SPEC="$WISH_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" + TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" else TK_SHLIB_LD_EXTRAS="$TK_SHLIB_LD_EXTRAS -sectcreate __TEXT __tk_rsrc \${TK_RSRC_FILE}" fi @@ -6258,7 +6260,7 @@ else eval TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TK_DBGX}" fi -TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}" +TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}" TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}" TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}" @@ -6326,6 +6328,7 @@ TK_SHARED_BUILD=${SHARED_BUILD} + CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS="" @@ -6537,6 +6540,7 @@ s%@TK_DBGX@%$TK_DBGX%g s%@TK_SHARED_BUILD@%$TK_SHARED_BUILD%g s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g +s%@WISH_BUILD_LIB_SPEC@%$WISH_BUILD_LIB_SPEC%g s%@TK_BUILD_EXP_FILE@%$TK_BUILD_EXP_FILE%g s%@TK_EXP_FILE@%$TK_EXP_FILE%g s%@TCL_STUB_FLAGS@%$TCL_STUB_FLAGS%g diff --git a/unix/configure.in b/unix/configure.in index 677ce03..1542638 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -40,8 +40,8 @@ if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi # Make sure srcdir is fully qualified! -srcdir=`cd $srcdir ; pwd` -TK_SRC_DIR=`cd $srcdir/..; pwd` +srcdir="`cd "$srcdir" ; pwd`" +TK_SRC_DIR="`cd "$srcdir/.."; pwd`" #------------------------------------------------------------------------ # Compress and/or soft link the manpages? @@ -181,12 +181,12 @@ if test $tk_ok = no; then AC_EGREP_HEADER(fd_mask, sys/select.h, tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)]) if test $tcl_cv_grep_fd_mask = present; then - AC_DEFINE(HAVE_SYS_SELECT_H) + AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Should we include ?]) tk_ok=yes fi fi if test $tk_ok = no; then - AC_DEFINE(NO_FD_SET) + AC_DEFINE(NO_FD_SET, 1, [Do we have fd_set?]) fi #------------------------------------------------------------------------------ @@ -224,7 +224,7 @@ AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos, [ [struct passwd pwd; pwd.pw_gecos;], tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no)]) if test $tcl_cv_pwd_pw_gecos = yes; then - AC_DEFINE(HAVE_PW_GECOS) + AC_DEFINE(HAVE_PW_GECOS, 1, [Does struct password have a pw_gecos field?]) fi #-------------------------------------------------------------------- @@ -434,7 +434,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc' if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' @@ -464,7 +464,8 @@ if test "$FRAMEWORK_BUILD" = "1" ; then fi TK_LIB_FILE="Tk" TK_LIB_FLAG="-framework Tk" - TK_BUILD_LIB_SPEC="-F`pwd` -framework Tk" + TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" + WISH_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk \${WISH_LIBS}" TK_LIB_SPEC="-F${libdir} -framework Tk" libdir="${libdir}/Tk.framework/Versions/\${VERSION}" TK_LIBRARY="${libdir}/Resources/Scripts" @@ -514,11 +515,11 @@ else if test "$GCC" = "yes" ; then TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" - WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`" + WISH_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd` \${WISH_LIBS}" TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`" else TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" - WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}" + WISH_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE} \${WISH_LIBS}" TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}" fi fi @@ -531,9 +532,10 @@ if test $tk_aqua = yes; then REZ=/Developer/Tools/Rez REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then - EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)' - TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}" - TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" + EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' + TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" + WISH_BUILD_LIB_SPEC="$WISH_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" + TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" else TK_SHLIB_LD_EXTRAS="$TK_SHLIB_LD_EXTRAS -sectcreate __TEXT __tk_rsrc \${TK_RSRC_FILE}" fi @@ -554,7 +556,7 @@ else eval TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TK_DBGX}" fi -TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}" +TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}" TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}" TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}" @@ -592,6 +594,7 @@ AC_SUBST(TK_SHARED_BUILD) AC_SUBST(LD_LIBRARY_PATH_VAR) AC_SUBST(TK_BUILD_LIB_SPEC) +AC_SUBST(WISH_BUILD_LIB_SPEC) AC_SUBST(TK_BUILD_EXP_FILE) AC_SUBST(TK_EXP_FILE) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c86a3f2..ac9b3bf 100755 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2224,7 +2224,7 @@ dnl # preprocessing tests use only CPPFLAGS. INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"' else MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)" ; (cd "$(LIB_INSTALL_DIR)" ; $(RANLIB) $(LIB_FILE))' fi fi -- cgit v0.12 From 2d5ec818918a168a3d0a5fed2d7465a434de8536 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 28 Jun 2012 11:13:54 +0000 Subject: Link cygwin wish.exe with win32 tk.dll, only in combination with --enable-shared --- ChangeLog | 7 +++++++ unix/Makefile.in | 5 +++-- unix/configure | 6 +++--- unix/configure.in | 4 ++-- unix/tcl.m4 | 2 +- unix/tkUnixPort.h | 4 ++++ 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a346d8..64e8bf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-26 Jan Nijtmans + + * unix/configure.in: Link cygwin wish.exe with win32 tk.dll, only + * unix/Makefile.in: in combination with --enable-shared. + * unix/tcl.m4: + * unix/configure: autoconf-2.13 + 2012-06-22 Jan Nijtmans * win/Makefile.in: [Bug 1844430]: cygwin make fails in 8.4.14-8.5b3 diff --git a/unix/Makefile.in b/unix/Makefile.in index 2559750..8388f1f 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -551,7 +551,8 @@ objs: ${OBJS} ${WISH_EXE}: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@ - @if test -f "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ + @if test "x$(TK_SHARED_BUILD)" = "x1" -a \ + -f "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ cp "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" .; \ fi ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @WISH_BUILD_LIB_SPEC@ \ @@ -677,7 +678,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) ${WISH @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ @chmod 555 "$(DLL_INSTALL_DIR)/$(LIB_FILE)" - @if test -f "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ + @if test -f "tk${MAJOR_VERSION}${MINOR_VERSION}.dll"; then \ $(INSTALL_LIBRARY) "${TOP_DIR}/win/tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\ chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\ fi diff --git a/unix/configure b/unix/configure index 8cac4c0..d7c3805 100755 --- a/unix/configure +++ b/unix/configure @@ -2385,7 +2385,7 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 if test "x${TCL_THREADS}" = "x0"; then { echo "configure: error: CYGWIN compile is only supported with --enable-threads" 1>&2; exit 1; } fi - if test ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then + if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then { echo "configure: error: Please configure and make the ../win directory first." 1>&2; exit 1; } fi ;; @@ -6207,8 +6207,8 @@ else eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" - if test "${ac_cv_cygwin+set}" = set; then - WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk84 \${TCL_LIB_SPEC}" + if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then + WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk\${MAJOR_VERSION}\${MINOR_VERSION} \${TCL_LIB_SPEC}" else WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}" fi diff --git a/unix/configure.in b/unix/configure.in index 1542638..a5fef0c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -503,8 +503,8 @@ else eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}" fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" - if test "${ac_cv_cygwin+set}" = set; then - WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk84 \${TCL_LIB_SPEC}" + if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then + WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk\${MAJOR_VERSION}\${MINOR_VERSION} \${TCL_LIB_SPEC}" else WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}" fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ac9b3bf..2dc6576 100755 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1229,7 +1229,7 @@ dnl AC_CHECK_TOOL(AR, ar) if test "x${TCL_THREADS}" = "x0"; then AC_MSG_ERROR([CYGWIN compile is only supported with --enable-threads]) fi - if test ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then + if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde12.dll" -a ! -f "../win/tk84.dll"; then AC_MSG_ERROR([Please configure and make the ../win directory first.]) fi ;; diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h index c4053b9..27787ce 100644 --- a/unix/tkUnixPort.h +++ b/unix/tkUnixPort.h @@ -138,6 +138,10 @@ # define WPARAM void * # define LPARAM void * # define LRESULT void * + + extern int TkPutImage(unsigned long *, int, Display *, Drawable, + GC, XImage *, int, int, int, int, unsigned int, unsigned int); + #else /* !__CYGWIN__ */ /* * The TkPutImage macro strips off the color table information, which isn't -- cgit v0.12 From a1819640c9e25f3f07e86d25c009dcf4c572a5c0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 28 Jun 2012 21:05:40 +0000 Subject: autoconf-2.59 --- unix/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/configure b/unix/configure index ac62a5a..c6209ac 100755 --- a/unix/configure +++ b/unix/configure @@ -4969,7 +4969,7 @@ echo "$as_me: error: ${CC} is not a cygwin compiler." >&2;} echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2;} { (exit 1); exit 1; }; } fi - if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde13.dll" -a ! -f "../win/tk85.dll"; then + if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde14.dll" -a ! -f "../win/tk86.dll"; then { { echo "$as_me:$LINENO: error: Please configure and make the ../win directory first." >&5 echo "$as_me: error: Please configure and make the ../win directory first." >&2;} { (exit 1); exit 1; }; } -- cgit v0.12 From 5d65c669981e6af1b31c24510901a7f5fe31736a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 1 Jul 2012 10:54:03 +0000 Subject: fix select-5.15 test case [Bug 2441988] --- tests/select.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/select.test b/tests/select.test index e4c512d..77bfb2e 100644 --- a/tests/select.test +++ b/tests/select.test @@ -628,7 +628,7 @@ test select-5.15 {Tk_GetSelection procedure} -setup { set ::bgerrors {} } -body { proc ::bgerror msg {lappend ::bgerrors $msg} - selection handle .f1 ERROR errHandler + selection handle -type ERROR .f1 errHandler list [catch {selection get ERROR} msg] $msg [update] {*}$::bgerrors } -cleanup { rename ::bgerror {} -- cgit v0.12 From 51c192d71c89343815510f453d25f163850e9341 Mon Sep 17 00:00:00 2001 From: jenglish Date: Mon, 2 Jul 2012 17:38:52 +0000 Subject: ttk::*: Ensure that all tables passed to Tcl_GetIndexFromObj{Struct} are statically allocated. Caught by Michael Kirkham. --- generic/ttk/ttkImage.c | 2 +- generic/ttk/ttkPanedwindow.c | 2 +- win/ttkWinXPTheme.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c index c3b55e9..2b12864 100644 --- a/generic/ttk/ttkImage.c +++ b/generic/ttk/ttkImage.c @@ -314,7 +314,7 @@ Ttk_CreateImageElement( const char *elementName, int objc, Tcl_Obj *const objv[]) { - const char *optionStrings[] = + static const char *optionStrings[] = { "-border","-height","-padding","-sticky","-width",NULL }; enum { O_BORDER, O_HEIGHT, O_PADDING, O_STICKY, O_WIDTH }; diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 065774e..b301372 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -713,7 +713,7 @@ static int PanedForgetCommand( static int PanedIdentifyCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - const char *whatTable[] = { "element", "sash", NULL }; + static const char *whatTable[] = { "element", "sash", NULL }; enum { IDENTIFY_ELEMENT, IDENTIFY_SASH }; int what = IDENTIFY_SASH; Paned *pw = recordPtr; diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index e2f916f..fda7b04 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1109,7 +1109,7 @@ Ttk_CreateVsapiElement( LPWSTR wname; Ttk_ElementSpec *elementSpec = &GenericElementSpec; - const char *optionStrings[] = + static const char *optionStrings[] = { "-padding","-width","-height","-margins", "-syssize", "-halfheight", "-halfwidth", NULL }; enum { O_PADDING, O_WIDTH, O_HEIGHT, O_MARGINS, O_SYSSIZE, -- cgit v0.12 From 320c10d3d423a300bcab6f28689dbfaa48b1cc02 Mon Sep 17 00:00:00 2001 From: jenglish Date: Mon, 2 Jul 2012 18:22:26 +0000 Subject: ttk::treeview('see' method): fix overscroll prevention [Bug 3530288] --- generic/ttk/ttkTreeview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 6b9042f..862c7f6 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -2832,9 +2832,9 @@ static int TreeviewSeeCommand( TtkRedisplayWidget(&tv->core); } } + tv->tree.yscroll.total = CountRows(tv->tree.root) - 1; /* Make sure item is visible: - * @@@ DOUBLE-CHECK THIS: */ rowNumber = RowNumber(tv, item); if (rowNumber < tv->tree.yscroll.first) { -- cgit v0.12 From 18967125544c5abe440c3aa00ba6359c5c63babc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 4 Jul 2012 06:41:18 +0000 Subject: Add various X11 stub functions, Cygwin only remove TkBindDeadWindow from Cygwin stub table --- generic/tkInt.decls | 26 ++++++++++++ generic/tkIntDecls.h | 5 +++ generic/tkIntXlibDecls.h | 103 ++++++++++++++++++++++++++++++++++++++++++++--- generic/tkStubInit.c | 41 +++++++++++++++++++ win/Makefile.in | 2 - win/tkWinPort.h | 13 ------ 6 files changed, 170 insertions(+), 20 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 6f5ff57..9d0595d 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -1435,6 +1435,32 @@ declare 106 win { int x, int y, unsigned int width, unsigned int height) } +# new for 8.4.20+/8.5.12+ Cygwin only +declare 107 win { + int XFlush(Display *display) +} +declare 108 win { + int XGrabServer(Display *display) +} +declare 109 win { + int XUngrabServer(Display *display) +} +declare 110 win { + int XFree(void *data) +} +declare 111 win { + int XNoOp(Display *display) +} +declare 112 win { + XAfterFunction XSynchronize(Display *display, Bool onoff) +} +declare 113 win { + int XSync(Display *display, Bool discard) +} +declare 114 win { + VisualID XVisualIDFromVisual(Visual *visual) +} + ################################ # X functions for Mac and Aqua diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 879c964..c9b86d3 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -1274,5 +1274,10 @@ extern TkIntStubs *tkIntStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT +#if defined(__CYGWIN__) && defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) +# undef TkBindDeadWindow +# define TkBindDeadWindow(winPtr) /* Removed from Cygwins stub table, just do nothing */ +#endif + #endif /* _TKINTDECLS */ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 30470ab..f5753c5 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -13,6 +13,12 @@ #ifndef _TKINTXLIBDECLS #define _TKINTXLIBDECLS +/* + * WARNING: This file is automatically generated by the tools/genStubs.tcl + * script. Any modifications to the function declarations below should be made + * in the generic/tkInt.decls script. + */ + #ifdef MAC_TCL #include "Xutil.h" #else @@ -24,11 +30,9 @@ #define TCL_STORAGE_CLASS DLLEXPORT #endif -/* - * WARNING: This file is automatically generated by the tools/genStubs.tcl - * script. Any modifications to the function declarations below should be made - * in the generic/tkInt.decls script. - */ +typedef int (*XAfterFunction) ( /* WARNING, this type not in Xlib spec */ + Display* /* display */ +); /* !BEGIN!: Do not edit below this line. */ @@ -363,6 +367,23 @@ EXTERN int XWarpPointer _ANSI_ARGS_((Display *d, Window s, EXTERN int XFillRectangle _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); +/* 107 */ +EXTERN int XFlush _ANSI_ARGS_((Display *display)); +/* 108 */ +EXTERN int XGrabServer _ANSI_ARGS_((Display *display)); +/* 109 */ +EXTERN int XUngrabServer _ANSI_ARGS_((Display *display)); +/* 110 */ +EXTERN int XFree _ANSI_ARGS_((VOID *data)); +/* 111 */ +EXTERN int XNoOp _ANSI_ARGS_((Display *display)); +/* 112 */ +EXTERN XAfterFunction XSynchronize _ANSI_ARGS_((Display *display, + Bool onoff)); +/* 113 */ +EXTERN int XSync _ANSI_ARGS_((Display *display, Bool discard)); +/* 114 */ +EXTERN VisualID XVisualIDFromVisual _ANSI_ARGS_((Visual *visual)); #endif /* WIN */ #ifdef MAC_TCL /* 0 */ @@ -1059,6 +1080,14 @@ typedef struct TkIntXlibStubs { int (*xDrawLine) _ANSI_ARGS_((Display *d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 104 */ int (*xWarpPointer) _ANSI_ARGS_((Display *d, Window s, Window dw, int sx, int sy, unsigned int sw, unsigned int sh, int dx, int dy)); /* 105 */ int (*xFillRectangle) _ANSI_ARGS_((Display *display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)); /* 106 */ + int (*xFlush) _ANSI_ARGS_((Display *display)); /* 107 */ + int (*xGrabServer) _ANSI_ARGS_((Display *display)); /* 108 */ + int (*xUngrabServer) _ANSI_ARGS_((Display *display)); /* 109 */ + int (*xFree) _ANSI_ARGS_((VOID *data)); /* 110 */ + int (*xNoOp) _ANSI_ARGS_((Display *display)); /* 111 */ + XAfterFunction (*xSynchronize) _ANSI_ARGS_((Display *display, Bool onoff)); /* 112 */ + int (*xSync) _ANSI_ARGS_((Display *display, Bool discard)); /* 113 */ + VisualID (*xVisualIDFromVisual) _ANSI_ARGS_((Visual *visual)); /* 114 */ #endif /* WIN */ #ifdef MAC_TCL int (*xSetDashes) _ANSI_ARGS_((Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n)); /* 0 */ @@ -1689,6 +1718,38 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XFillRectangle \ (tkIntXlibStubsPtr->xFillRectangle) /* 106 */ #endif +#ifndef XFlush +#define XFlush \ + (tkIntXlibStubsPtr->xFlush) /* 107 */ +#endif +#ifndef XGrabServer +#define XGrabServer \ + (tkIntXlibStubsPtr->xGrabServer) /* 108 */ +#endif +#ifndef XUngrabServer +#define XUngrabServer \ + (tkIntXlibStubsPtr->xUngrabServer) /* 109 */ +#endif +#ifndef XFree +#define XFree \ + (tkIntXlibStubsPtr->xFree) /* 110 */ +#endif +#ifndef XNoOp +#define XNoOp \ + (tkIntXlibStubsPtr->xNoOp) /* 111 */ +#endif +#ifndef XSynchronize +#define XSynchronize \ + (tkIntXlibStubsPtr->xSynchronize) /* 112 */ +#endif +#ifndef XSync +#define XSync \ + (tkIntXlibStubsPtr->xSync) /* 113 */ +#endif +#ifndef XVisualIDFromVisual +#define XVisualIDFromVisual \ + (tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */ +#endif #endif /* WIN */ #ifdef MAC_TCL #ifndef XSetDashes @@ -2434,4 +2495,36 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT +#if defined(__WIN32__) + +#undef XFlush +#undef XGrabServer +#undef XUngrabServer +#undef XFree +#undef XNoOp +#undef XSynchronize +#undef XSync +#undef XVisualIDFromVisual + +/* + * The following stubs implement various calls that don't do anything + * under Windows. + */ + +#define XFlush(display) +#define XGrabServer(display) +#define XUngrabServer(display) + +/* + * The following functions are implemented as macros under Windows. + */ + +#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));} +#define XNoOp(display) {display->request++;} +#define XSynchronize(display, bool) {display->request++;} +#define XSync(display, bool) {display->request++;} +#define XVisualIDFromVisual(visual) (visual->visualid) + +#endif + #endif /* _TKINTXLIBDECLS */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 24478e4..b9198d0 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -53,11 +53,36 @@ TkCreateXEventSource(void) TkWinXInit(Tk_GetHINSTANCE()); } +#undef XFree +#define XFree TkPlatXFree +static int +XFree(void *data) +{ + if (data != NULL) { + ckfree((char *) data); + } + return 0; +} + +#undef XVisualIDFromVisual +#define XVisualIDFromVisual TkPlatXVisualIDFromVisual +static VisualID +XVisualIDFromVisual(Visual *visual) +{ + return visual->visualid; +} + /* * Remove macros that will interfere with the definitions below. */ # undef TkpCmapStressed # undef TkpSync +# undef XFlush +# undef XGrabServer +# undef XUngrabServer +# undef XNoOp +# undef XSynchronize +# undef XSync # define TkpCmapStressed (int (*) (Tk_Window, Colormap)) doNothing # define TkpSync (void (*) (Display *)) doNothing @@ -66,6 +91,12 @@ TkCreateXEventSource(void) # define TkUnixSetMenubar 0 # define TkWmCleanup (void (*) (TkDisplay *)) doNothing # define TkSendCleanup (void (*) (TkDisplay *)) doNothing +# define XFlush (int (*) (Display *)) doNothing +# define XGrabServer (int (*) (Display *)) doNothing +# define XUngrabServer (int (*) (Display *)) doNothing +# define XNoOp (int (*) (Display *)) doNothing +# define XSynchronize (XAfterFunction (*) (Display *, Bool)) doNothing +# define XSync (int (*) (Display *, Bool)) doNothing #else /* !__WIN32__ */ @@ -208,6 +239,8 @@ void TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c) # define TkWinGetPlatformTheme 0 # define TkWinChildProc 0 +# define TkBindDeadWindow 0 /* On purpose not in Cygwin's stub table */ + # elif !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */ # undef TkClipBox @@ -732,6 +765,14 @@ TkIntXlibStubs tkIntXlibStubs = { XDrawLine, /* 104 */ XWarpPointer, /* 105 */ XFillRectangle, /* 106 */ + XFlush, /* 107 */ + XGrabServer, /* 108 */ + XUngrabServer, /* 109 */ + XFree, /* 110 */ + XNoOp, /* 111 */ + XSynchronize, /* 112 */ + XSync, /* 113 */ + XVisualIDFromVisual, /* 114 */ #endif /* WIN */ #ifdef MAC_TCL XSetDashes, /* 0 */ diff --git a/win/Makefile.in b/win/Makefile.in index 752236f..871f0af 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -562,7 +562,6 @@ $(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.$(RES) $(CAT32) $(CC) $(CFLAGS) $(TKTEST_OBJS) $(TCL_LIB_FILE) \ $(TK_LIB_FILE) $(LIBS) \ wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW) - @VC_MANIFEST_EMBED_EXE@ # Msys make requires this next rule for some reason. $(TCL_SRC_DIR)/win/cat.c: @@ -584,7 +583,6 @@ ${TK_STUB_LIB_FILE}: ${STUB_OBJS} ${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) @$(RM) ${TK_DLL_FILE} @MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS) - @VC_MANIFEST_EMBED_DLL@ ${TK_LIB_FILE}: ${TK_OBJS} @$(RM) ${TK_LIB_FILE} diff --git a/win/tkWinPort.h b/win/tkWinPort.h index 77408dc..d1d7b58 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -98,22 +98,9 @@ #define TkFreeWindowId(dispPtr,w) #define TkInitXId(dispPtr) #define TkpCmapStressed(tkwin,colormap) (0) -#define XFlush(display) -#define XGrabServer(display) -#define XUngrabServer(display) #define TkpSync(display) /* - * The following functions are implemented as macros under Windows. - */ - -#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));} -#define XNoOp(display) {display->request++;} -#define XSynchronize(display, bool) {display->request++;} -#define XSync(display, bool) {display->request++;} -#define XVisualIDFromVisual(visual) (visual->visualid) - -/* * The following Tk functions are implemented as macros under Windows. */ -- cgit v0.12 From 973bf6c237c08795e5e1a7b28d694f9019f705c3 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 4 Jul 2012 12:54:57 +0000 Subject: [Bug 3540127]: Clean up the tables of options for the file dialogs so that there's no longer any need to have mysterious increments. --- ChangeLog | 6 ++++++ win/tkWinDialog.c | 63 +++++++++++++++++++++++++++---------------------------- 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64e8bf1..7a7b56d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-04 Donal K. Fellows + + * win/tkWinDialog.c (GetFileNameW): [Bug 3540127]: Clean up the tables + of options for the file dialogs so that there's no longer any need to + have mysterious increments. + 2012-06-26 Jan Nijtmans * unix/configure.in: Link cygwin wish.exe with win32 tk.dll, only diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 06f5a99..dda86a1 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -564,28 +564,41 @@ GetFileNameW(clientData, interp, objc, objv, open) Tcl_Encoding unicodeEncoding = TkWinGetUnicodeEncoding(); ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - static CONST char *saveOptionStrings[] = { - "-defaultextension", "-filetypes", "-initialdir", "-initialfile", - "-parent", "-title", NULL - }; - static CONST char *openOptionStrings[] = { - "-defaultextension", "-filetypes", "-initialdir", "-initialfile", - "-multiple", "-parent", "-title", NULL - }; - CONST char **optionStrings; - enum options { FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE, FILE_MULTIPLE, FILE_PARENT, FILE_TITLE }; - - result = TCL_ERROR; - file[0] = '\0'; + struct Options { + CONST char *name; + enum options value; + }; + CONST struct Options *options; + static CONST struct Options saveOptions[] = { + {"-defaultextension", FILE_DEFAULT}, + {"-filetypes", FILE_TYPES}, + {"-initialdir", FILE_INITDIR}, + {"-initialfile", FILE_INITFILE}, + {"-parent", FILE_PARENT}, + {"-title", FILE_TITLE}, + {NULL, FILE_DEFAULT/*ignored*/ } + }; + static CONST struct Options openOptions[] = { + {"-defaultextension", FILE_DEFAULT}, + {"-filetypes", FILE_TYPES}, + {"-initialdir", FILE_INITDIR}, + {"-initialfile", FILE_INITFILE}, + {"-multiple", FILE_MULTIPLE}, + {"-parent", FILE_PARENT}, + {"-title", FILE_TITLE}, + {NULL, FILE_DEFAULT/*ignored*/ } + }; /* * Parse the arguments. */ + result = TCL_ERROR; + file[0] = '\0'; extension = NULL; filter = NULL; Tcl_DStringInit(&utfFilterString); @@ -594,9 +607,9 @@ GetFileNameW(clientData, interp, objc, objv, open) title = NULL; if (open) { - optionStrings = openOptionStrings; + options = openOptions; } else { - optionStrings = saveOptionStrings; + options = saveOptions; } for (i = 1; i < objc; i += 2) { @@ -607,24 +620,10 @@ GetFileNameW(clientData, interp, objc, objv, open) optionPtr = objv[i]; valuePtr = objv[i + 1]; - if (Tcl_GetIndexFromObj(interp, optionPtr, optionStrings, - "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, optionPtr, options, + sizeof(struct Option), "option", 0, &index) != TCL_OK) { goto end; } - /* - * We want to maximize code sharing between the open and save file - * dialog implementations; in particular, the switch statement below. - * We use different sets of option strings from the GetIndexFromObj - * call above, but a single enumeration for both. The save file - * dialog doesn't support -multiple, but it falls in the middle of - * the enumeration. Ultimately, this means that when the index found - * by GetIndexFromObj is >= FILE_MULTIPLE, when doing a save file - * dialog, we have to increment the index, so that it matches the - * open file dialog enumeration. - */ - if (!open && index >= FILE_MULTIPLE) { - index++; - } if (i + 1 == objc) { string = Tcl_GetStringFromObj(optionPtr, NULL); Tcl_AppendResult(interp, "value for \"", string, "\" missing", @@ -633,7 +632,7 @@ GetFileNameW(clientData, interp, objc, objv, open) } string = Tcl_GetStringFromObj(valuePtr, NULL); - switch ((enum options) index) { + switch (options[index].value) { case FILE_DEFAULT: { if (string[0] == '.') { string++; -- cgit v0.12 From e3aecac082779869b4164dbb51cbc1bf69b65cb5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 4 Jul 2012 13:48:27 +0000 Subject: typo --- win/tkWinDialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index dda86a1..382c454 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -621,7 +621,7 @@ GetFileNameW(clientData, interp, objc, objv, open) valuePtr = objv[i + 1]; if (Tcl_GetIndexFromObjStruct(interp, optionPtr, options, - sizeof(struct Option), "option", 0, &index) != TCL_OK) { + sizeof(struct Options), "option", 0, &index) != TCL_OK) { goto end; } if (i + 1 == objc) { -- cgit v0.12 From c3bc1ba553d117972ca0ad585d21366db3cebbc4 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 5 Jul 2012 09:49:40 +0000 Subject: [Bug 3538401]: Better description of the key difference between [wm geometry] and [winfo geometry] --- ChangeLog | 6 ++++++ doc/wm.n | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7a7b56d..c74f093 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-05 Donal K. Fellows + + * doc/wm.n (geometry): [Bug 3538401]: Better description of the key + difference between [wm geometry] and [winfo geometry]; the former + represents the window manager's understanding, not Tk's. + 2012-07-04 Donal K. Fellows * win/tkWinDialog.c (GetFileNameW): [Bug 3540127]: Clean up the tables diff --git a/doc/wm.n b/doc/wm.n index f234b6d..59aa624 100644 --- a/doc/wm.n +++ b/doc/wm.n @@ -227,6 +227,14 @@ If \fInewGeometry\fR is specified as an empty string then any existing user-specified geometry for \fIwindow\fR is cancelled, and the window will revert to the size requested internally by its widgets. +Note that this is related to \fBwinfo geometry\fR, but not the same. That can +only query the geometry, and always reflects Tk's current understanding of the +actual size and location of \fIwindow\fR, whereas \fBwm geometry\fR allows +both setting and querying of the \fIwindow manager\fR's understanding of the +size and location of the window. This can vary significantly, for example to +reflect the addition of decorative elements to \fIwindow\fR such as title +bars, and window managers are not required to precisely follow the requests +made through this command. .TP \fBwm grid \fIwindow\fR ?\fIbaseWidth baseHeight widthInc heightInc\fR? This command indicates that \fIwindow\fR is to be managed as a -- cgit v0.12 From 13cdef78b3f5112e87b835f22f7687824fb6cee5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 5 Jul 2012 10:05:02 +0000 Subject: [Bug 3540127]: Better solution, using Tcl_GetIndexFromObj in stead of Tcl_GetIndexFromObjStruct --- ChangeLog | 5 +++++ win/tkWinDialog.c | 53 +++++++++++++++++++---------------------------------- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9948725..969ebc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-05 Jan Nijtmans + + * win/tkWinDialog.c (GetFileNameW): [Bug 3540127]: Better solution, + using Tcl_GetIndexFromObj in stead of Tcl_GetIndexFromObjStruct + 2012-07-05 Donal K. Fellows * doc/wm.n (geometry): [Bug 3538401]: Better description of the key diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index a09980a..4d60105 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -585,37 +585,18 @@ GetFileName( Tcl_DString extString, filterString, dirString, titleString; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - enum options { - FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE, FILE_PARENT, - FILE_TITLE, FILE_TYPEVARIABLE, FILE_MULTIPLE, FILE_CONFIRMOW - }; - struct Options { - const char *name; - enum options value; + static const char *const saveOptionStrings[] = { + "-confirmoverwrite", "-defaultextension", "-filetypes", "-initialdir", + "-initialfile", "", "-parent", "-title", "-typevariable", NULL }; - static const struct Options saveOptions[] = { - {"-confirmoverwrite", FILE_CONFIRMOW}, - {"-defaultextension", FILE_DEFAULT}, - {"-filetypes", FILE_TYPES}, - {"-initialdir", FILE_INITDIR}, - {"-initialfile", FILE_INITFILE}, - {"-parent", FILE_PARENT}, - {"-title", FILE_TITLE}, - {"-typevariable", FILE_TYPEVARIABLE}, - {NULL, FILE_DEFAULT/*ignored*/ } + static const char *const openOptionStrings[] = { + "", "-defaultextension", "-filetypes", "-initialdir", "-initialfile", + "-multiple", "-parent", "-title", "-typevariable", NULL }; - static const struct Options openOptions[] = { - {"-defaultextension", FILE_DEFAULT}, - {"-filetypes", FILE_TYPES}, - {"-initialdir", FILE_INITDIR}, - {"-initialfile", FILE_INITFILE}, - {"-multiple", FILE_MULTIPLE}, - {"-parent", FILE_PARENT}, - {"-title", FILE_TITLE}, - {"-typevariable", FILE_TYPEVARIABLE}, - {NULL, FILE_DEFAULT/*ignored*/ } + enum options { + FILE_CONFIRMOW, FILE_DEFAULT, FILE_TYPES, FILE_INITDIR, FILE_INITFILE, + FILE_MULTIPLE, FILE_PARENT, FILE_TITLE, FILE_TYPEVARIABLE }; - const struct Options *const options = open ? openOptions : saveOptions; file[0] = '\0'; ZeroMemory(&ofnData, sizeof(OFNData)); @@ -631,17 +612,21 @@ GetFileName( const char *string; Tcl_Obj *valuePtr = objv[i + 1]; - if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, - sizeof(struct Options), "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], + open ? openOptionStrings : saveOptionStrings, + "option", 0, &index) != TCL_OK) { goto end; - } else if (i + 1 == objc) { - Tcl_AppendResult(interp, "value for \"", options[index].name, - "\" missing", NULL); + } + + if (i + 1 == objc) { + string = Tcl_GetString(objv[i]); + Tcl_AppendResult(interp, "value for \"", string, "\" missing", + NULL); goto end; } string = Tcl_GetString(valuePtr); - switch (options[index].value) { + switch ((enum options) index) { case FILE_DEFAULT: if (string[0] == '.') { string++; -- cgit v0.12 From 1c58b6c675335b5cdd57de967a4231943fae4dd7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 8 Jul 2012 04:29:12 +0000 Subject: [Bug 3541305]: Xfree/Xsync... should not be macros --- ChangeLog | 5 +++++ generic/tkIntXlibDecls.h | 31 ++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c74f093..82e10b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-08 Jan Nijtmans + + * generic/tkIntXlibDecls.h: [Bug 3541305]: Xfree/Xsync... + should not be macros + 2012-07-05 Donal K. Fellows * doc/wm.n (geometry): [Bug 3538401]: Better description of the key diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index f5753c5..fb2738f 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -2506,6 +2506,33 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #undef XSync #undef XVisualIDFromVisual +#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) +/* + * The following stubs implement various calls that don't do anything + * under Windows. In win32 tclsh 8.4 and 8.5 holds: + * tkIntStubsPtr->tkBindDeadWindow != NULL + * Then the following macros don't do anything. But when running Tcl win32 + * version 8.6 or Cygwin (8.4, 8.5 or 8.6) then the functions are available in + * the stub table. The real function from the stub table will be called, + * even though it might be doing nothing. + */ + +#define XFlush(display) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xFlush(display)) +#define XGrabServer(display) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xGrabServer(display)) +#define XUngrabServer(display) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xUngrabServer(display)) + +/* + * The following functions are implemented as macros under Windows. + */ + + +#define XFree(data) (tkIntStubsPtr->tkBindDeadWindow? ((data)? (ckfree((char *) (data)), 0): 0): tkIntXlibStubsPtr->xFree(data)) +#define XNoOp(display) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xNoOp(display)) +#define XSynchronize(display, bool) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xSynchronize(display, bool)) +#define XSync(display, bool) (tkIntStubsPtr->tkBindDeadWindow? 0: tkIntXlibStubsPtr->xSync(display, bool)) +#define XVisualIDFromVisual(visual) (tkIntStubsPtr->tkBindDeadWindow? ((visual)->visualid): tkIntXlibStubsPtr->xVisualIDFromVisual(visual)) + +#else /* !USE_TK_STUBS */ /* * The following stubs implement various calls that don't do anything * under Windows. @@ -2525,6 +2552,8 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XSync(display, bool) {display->request++;} #define XVisualIDFromVisual(visual) (visual->visualid) -#endif +#endif /* !USE_TK_STUBS */ + +#endif /* __WIN32__ */ #endif /* _TKINTXLIBDECLS */ -- cgit v0.12 From a5d69ce91b44a9dca1d079330a7d7eaa29fb4805 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 8 Jul 2012 08:17:10 +0000 Subject: [Bug 3532186]: pkgIndex.tcl file complexity that's unwarranted: Test for ::argv variable before trying to use it --- unix/Makefile.in | 4 ++-- win/Makefile.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 8388f1f..637f6f4 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -666,8 +666,8 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) ${WISH if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ else \ - echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ - echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ + echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ + echo " || ([info exists ::argv] && [lsearch -exact \$$::argv -display] > -1))} {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ diff --git a/win/Makefile.in b/win/Makefile.in index 871f0af..19670c7 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -435,8 +435,8 @@ install-binaries: binaries @$(RM) $(PKG_INDEX); @(\ echo "if {[package vcompare [package provide Tcl] $(TCLVERSION)] != 0} { return }";\ - echo "if {(\$$::tcl_platform(platform) eq \"unix\")";\ - echo " && ([info exists ::env(DISPLAY)] || [lsearch -exact \$$::argv -display] > -1)} {";\ + echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ + echo " || ([info exists ::argv] && [lsearch -exact \$$::argv -display] > -1))} {";\ echo " package ifneeded Tk $(VERSION) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(VERSION) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ -- cgit v0.12 From 956d9e9ba0c48ea47db300d262cf9d5ac7eda3dc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 8 Jul 2012 08:29:59 +0000 Subject: use "in" operator in stead --- unix/Makefile.in | 2 +- win/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 08192b9..7dc543d 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -727,7 +727,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ - echo " || ([info exists ::argv] && [lsearch -exact \$$::argv -display] > -1))} {";\ + echo " || ([info exists ::argv] && ("-display" in \$$::argv)))} {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ diff --git a/win/Makefile.in b/win/Makefile.in index 1f92ebb..46fb4dd 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -479,7 +479,7 @@ install-binaries: binaries @(\ echo "if {[catch {package present Tcl 8.5.0}]} { return }";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ - echo " || ([info exists ::argv] && [lsearch -exact \$$::argv -display] > -1))} {";\ + echo " || ([info exists ::argv] && ("-display" in \$$::argv)))} {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ -- cgit v0.12 From 358047d8059fb3a6df83cb7b13a192c3690ba198 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 8 Jul 2012 08:40:28 +0000 Subject: don't forget to excape quotes --- unix/Makefile.in | 2 +- win/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 7dc543d..9c8082b 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -727,7 +727,7 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ else \ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ - echo " || ([info exists ::argv] && ("-display" in \$$::argv)))} {";\ + echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\ diff --git a/win/Makefile.in b/win/Makefile.in index 46fb4dd..adfb20a 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -479,7 +479,7 @@ install-binaries: binaries @(\ echo "if {[catch {package present Tcl 8.5.0}]} { return }";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ - echo " || ([info exists ::argv] && ("-display" in \$$::argv)))} {";\ + echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\ echo "} else {";\ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ -- cgit v0.12 From 112dca2069f2104ad3f9ce75755e14de286eea89 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 12 Jul 2012 12:29:42 +0000 Subject: Type correctness fix, to stop compiler complaint. --- generic/tkInt.h | 2 +- unix/tkUnixRFont.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index a95adf8..c30eceb 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1187,7 +1187,7 @@ MODULE_SCOPE Status TkParseColor (Display * display, XColor * colorPtr); #endif #ifdef HAVE_XFT -MODULE_SCOPE void TkUnixSetXftClipRegion(Region clipRegion); +MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion); #endif /* diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index deecceb..c3ece5e 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -810,10 +810,10 @@ Tk_DrawChars( void TkUnixSetXftClipRegion( - Region clipRegion) /* The clipping region to install. */ + TkRegion clipRegion) /* The clipping region to install. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - tsdPtr->clipRegion = clipRegion; + tsdPtr->clipRegion = (Region) clipRegion; } -- cgit v0.12 From d2340a0346b170afcb39b664286ac75c32846fbe Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 12 Jul 2012 18:36:56 +0000 Subject: Type correctness fix, to stop compiler complaint --- generic/tkInt.h | 2 +- unix/tkUnixRFont.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index bc0e0a3..88e0c25 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1219,7 +1219,7 @@ MODULE_SCOPE Status TkParseColor (Display * display, XColor * colorPtr); #endif #ifdef HAVE_XFT -MODULE_SCOPE void TkUnixSetXftClipRegion(Region clipRegion); +MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion); #endif /* diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index a8f5289..4203ff9 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -1124,12 +1124,12 @@ TkDrawAngledChars( void TkUnixSetXftClipRegion( - Region clipRegion) /* The clipping region to install. */ + TkRegion clipRegion) /* The clipping region to install. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - tsdPtr->clipRegion = clipRegion; + tsdPtr->clipRegion = (Region) clipRegion; } /* -- cgit v0.12