From 3998cf77ee9513d59f553516618187a6bccb697f Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 22 Jan 2010 14:17:53 +0000 Subject: fix more gcc warnings: missing initializer Eliminate use of __argc and __argv for CYGWIN Make cygwin configuration error into a warning: CYGWIN compilation works although there still are test failures. --- ChangeLog | 26 +++++++ generic/tkInt.h | 3 +- generic/tkOldConfig.c | 4 +- generic/ttk/ttkClamTheme.c | 16 ++-- generic/ttk/ttkClassicTheme.c | 10 +-- generic/ttk/ttkDefaultTheme.c | 20 ++--- generic/ttk/ttkElements.c | 30 +++---- generic/ttk/ttkEntry.c | 5 +- generic/ttk/ttkInit.c | 4 +- generic/ttk/ttkLabel.c | 9 +-- generic/ttk/ttkNotebook.c | 4 +- generic/ttk/ttkPanedwindow.c | 4 +- generic/ttk/ttkSquare.c | 4 +- generic/ttk/ttkTreeview.c | 7 +- win/configure | 177 ++++++++++++++++++++++-------------------- win/configure.in | 71 ++++++++--------- win/tcl.m4 | 16 ++++ win/tkWinMenu.c | 4 +- win/tkWinPort.h | 28 ++++--- win/tkWinSend.c | 6 +- win/tkWinSendCom.c | 6 +- win/tkWinTest.c | 5 +- win/ttkWinTheme.c | 16 ++-- win/winMain.c | 138 +++++++++++++++++++++++++++++++- 24 files changed, 395 insertions(+), 218 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e0d879..dff1749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2010-01-19 Jan Nijtmans + + * generic/tkInt.h Don't depend on from tcl.h any more + * generic/tkOldConfig.c + * generic/ttk/ttkClamTheme.c fix more gcc warnings: missing initializer + * generic/ttk/ttkClassicTheme.c + * generic/ttk/ttkDefaultTheme.c + * generic/ttk/ttkElements.c + * generic/ttk/ttkEntry.c + * generic/ttk/ttkInit.c + * generic/ttk/ttkLabel.c + * generic/ttk/ttkNotebook.c + * generic/ttk/ttkPanedwindow.c + * generic/ttk/ttkSquare.c + * generic/ttk/ttkTreeview.c + * win/ttkWinTheme.c + * win/tkWinMenu.c Add missing #include + * win/tkWinPort.h Fix include files for CYGWIN + * win/tkWinSend.c + * win/tkWinSendCom.c + * win/tkWinTest.c Fix gcc warning + * win/winMain.c: Eliminate use of __argc and __argv for CYGWIN + * win/tcl.m4 Make cygwin configuration error into + * win/configure.in a warning: CYGWIN compilation works + * win/configure although there still are test failures. + 2010-01-19 Donal K. Fellows * generic/tkCanvas.c (TagSearchScanExpr): [Bug 2931374]: Stop overflow diff --git a/generic/tkInt.h b/generic/tkInt.h index 322f66a..f0bf85d 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.119 2010/01/10 20:27:23 nijtmans Exp $ + * RCS: $Id: tkInt.h,v 1.120 2010/01/22 14:17:53 nijtmans Exp $ */ #ifndef _TKINT @@ -33,6 +33,7 @@ * Darwin (where configure runs only once for multiple architectures). */ +#include #ifdef HAVE_SYS_TYPES_H # include #endif diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index a8cc050..7ce1c36 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -11,10 +11,10 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkOldConfig.c,v 1.28 2008/11/27 23:26:05 nijtmans Exp $ + * RCS: @(#) $Id: tkOldConfig.c,v 1.29 2010/01/22 14:17:53 nijtmans Exp $ */ -#include "tkPort.h" +#include "tkInt.h" /* * Values for "flags" field of Tk_ConfigSpec structures. Be sure to coordinate diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index cde8ef7..95ce5d1 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkClamTheme.c,v 1.10 2008/07/04 19:05:04 jenglish Exp $ + * $Id: ttkClamTheme.c,v 1.11 2010/01/22 14:17:53 nijtmans Exp $ * * Copyright (C) 2004 Joe English * @@ -119,7 +119,7 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = { Tk_Offset(BorderElement,reliefObj), "flat" }, { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(BorderElement,borderWidthObj), "2" }, - {0,0,0} + { NULL, 0, 0, NULL } }; /* @@ -207,7 +207,7 @@ static Ttk_ElementOptionSpec FieldElementOptions[] = { Tk_Offset(FieldElement,darkColorObj), DARK_COLOR }, { "-fieldbackground", TK_OPTION_BORDER, Tk_Offset(FieldElement,backgroundObj), "white" }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void FieldElementSize( @@ -293,7 +293,7 @@ static Ttk_ElementOptionSpec IndicatorElementOptions[] = { Tk_Offset(IndicatorElement,upperColorObj), DARKEST_COLOR }, { "-lowerbordercolor", TK_OPTION_COLOR, Tk_Offset(IndicatorElement,lowerColorObj), DARK_COLOR }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void IndicatorElementSize( @@ -412,7 +412,7 @@ static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] = { "-arrowpadding",TK_OPTION_STRING, Tk_Offset(MenuIndicatorElement,paddingObj), "3" }, - { NULL } + { NULL, 0, 0, NULL } }; static void MenuIndicatorElementSize( @@ -478,7 +478,7 @@ static Ttk_ElementOptionSpec GripElementOptions[] = { Tk_Offset(GripElement,borderColorObj), DARKEST_COLOR }, { "-gripcount", TK_OPTION_INT, Tk_Offset(GripElement,gripCountObj), "5" }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void GripElementSize( @@ -577,7 +577,7 @@ static Ttk_ElementOptionSpec ScrollbarElementOptions[] = { Tk_Offset(ScrollbarElement,gripCountObj), "5" }, { "-sliderlength", TK_OPTION_INT, Tk_Offset(ScrollbarElement,sliderlengthObj), "30" }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void TroughElementDraw( @@ -803,7 +803,7 @@ static Ttk_ElementOptionSpec NotebookElementOptions[] = { Tk_Offset(NotebookElement,lightColorObj), LIGHT_COLOR }, { "-darkcolor", TK_OPTION_COLOR, Tk_Offset(NotebookElement,darkColorObj), DARK_COLOR }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void TabElementSize( diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index 94178a5..d81d204 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -1,5 +1,5 @@ /* - * $Id: ttkClassicTheme.c,v 1.7 2008/07/04 19:05:04 jenglish Exp $ + * $Id: ttkClassicTheme.c,v 1.8 2010/01/22 14:17:53 nijtmans Exp $ * * Copyright (c) 2004, Joe English * @@ -30,7 +30,7 @@ static Ttk_ElementOptionSpec HighlightElementOptions[] = { Tk_Offset(HighlightElement,highlightColorObj), DEFAULT_BACKGROUND }, { "-highlightthickness",TK_OPTION_PIXELS, Tk_Offset(HighlightElement,highlightThicknessObj), "0" }, - {NULL} + { NULL, 0, 0, NULL } }; static void HighlightElementSize( @@ -95,7 +95,7 @@ static Ttk_ElementOptionSpec ButtonBorderElementOptions[] = Tk_Offset(ButtonBorderElement,reliefObj), "flat" }, { "-default", TK_OPTION_ANY, Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" }, - {NULL} + { NULL, 0, 0, NULL } }; static void ButtonBorderElementSize( @@ -208,7 +208,7 @@ static Ttk_ElementOptionSpec ArrowElementOptions[] = { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(ArrowElement,borderWidthObj), DEFAULT_BORDERWIDTH }, { "-relief", TK_OPTION_RELIEF, Tk_Offset(ArrowElement,reliefObj),"raised" }, - { NULL } + { NULL, 0, 0, NULL } }; static void ArrowElementSize( @@ -320,7 +320,7 @@ static Ttk_ElementOptionSpec SashOptions[] = { Tk_Offset(SashElement,handleSizeObj), "8" }, { "-handlepad", TK_OPTION_PIXELS, Tk_Offset(SashElement,handlePadObj), "8" }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void SashElementSize( diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 2d7d8d0..4cc05a4 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1,4 +1,4 @@ -/* $Id: ttkDefaultTheme.c,v 1.14 2008/12/31 21:25:34 jenglish Exp $ +/* $Id: ttkDefaultTheme.c,v 1.15 2010/01/22 14:17:53 nijtmans Exp $ * * Copyright (c) 2003, Joe English * @@ -251,7 +251,7 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = { STRINGIFY(BORDERWIDTH) }, { "-relief", TK_OPTION_RELIEF, Tk_Offset(BorderElement,reliefObj), "flat" }, - {NULL} + { NULL, 0, 0, NULL } }; static void BorderElementSize( @@ -325,7 +325,7 @@ static Ttk_ElementOptionSpec FieldElementOptions[] = { "white" }, { "-bordercolor",TK_OPTION_COLOR, Tk_Offset(FieldElement,borderColorObj), "black" }, - {NULL} + { NULL, 0, 0, NULL } }; static void FieldElementSize( @@ -476,7 +476,7 @@ static Ttk_ElementOptionSpec IndicatorElementOptions[] = { Tk_Offset(IndicatorElement,borderColorObj), "black" }, { "-indicatormargin", TK_OPTION_STRING, Tk_Offset(IndicatorElement,marginObj), "0 2 4 2" }, - {NULL} + { NULL, 0, 0, NULL } }; static void IndicatorElementSize( @@ -614,7 +614,7 @@ static Ttk_ElementOptionSpec ArrowElementOptions[] = { Tk_Offset(ArrowElement,reliefObj),"raised"}, { "-arrowcolor", TK_OPTION_COLOR, Tk_Offset(ArrowElement,colorObj),"black"}, - { NULL } + { NULL, 0, 0, NULL } }; /* @@ -694,7 +694,7 @@ static Ttk_ElementOptionSpec MenubuttonArrowElementOptions[] = { Tk_Offset(MenubuttonArrowElement,sizeObj), STRINGIFY(MENUBUTTON_ARROW_SIZE)}, { "-arrowcolor",TK_OPTION_COLOR, Tk_Offset(MenubuttonArrowElement,colorObj), "black"}, - { NULL } + { NULL, 0, 0, NULL } }; static Ttk_Padding MenubuttonArrowPadding = { 3, 0, 3, 0 }; @@ -782,7 +782,7 @@ static Ttk_ElementOptionSpec TroughElementOptions[] = { Tk_Offset(TroughElement,reliefObj), "sunken" }, { "-groovewidth", TK_OPTION_PIXELS, Tk_Offset(TroughElement,grooveWidthObj), "-1" }, - { NULL } + { NULL, 0, 0, NULL } }; static void TroughElementSize( @@ -860,7 +860,7 @@ static Ttk_ElementOptionSpec ThumbElementOptions[] = { "black" }, { "-relief", TK_OPTION_RELIEF,Tk_Offset(ThumbElement,reliefObj),"raised" }, { "-orient", TK_OPTION_ANY,Tk_Offset(ThumbElement,orientObj),"horizontal"}, - { NULL } + { NULL, 0, 0, NULL } }; static void ThumbElementSize( @@ -949,7 +949,7 @@ static Ttk_ElementOptionSpec SliderElementOptions[] = { "black" }, { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj), "horizontal" }, - { NULL } + { NULL, 0, 0, NULL } }; static void SliderElementSize( @@ -1023,7 +1023,7 @@ static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { Tk_Offset(TreeitemIndicator,diameterObj), "9" }, { "-indicatormargins", TK_OPTION_STRING, Tk_Offset(TreeitemIndicator,marginObj), "2 2 4 2" }, - {NULL} + { NULL, 0, 0, NULL } }; static void TreeitemIndicatorSize( diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 56bdccb..ba0034a 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1,4 +1,4 @@ -/* $Id: ttkElements.c,v 1.11 2008/07/04 19:05:04 jenglish Exp $ +/* $Id: ttkElements.c,v 1.12 2010/01/22 14:17:53 nijtmans Exp $ * * Copyright (c) 2003, Joe English * @@ -22,7 +22,7 @@ * and may be used in other engines. */ -/* public */ Ttk_ElementOptionSpec TtkNullElementOptions[] = { {NULL} }; +/* public */ Ttk_ElementOptionSpec TtkNullElementOptions[] = { { NULL, 0, 0, NULL } }; /* public */ void TtkNullElementSize( @@ -62,7 +62,7 @@ typedef struct { static Ttk_ElementOptionSpec BackgroundElementOptions[] = { { "-background", TK_OPTION_BORDER, Tk_Offset(BackgroundElement,backgroundObj), DEFAULT_BACKGROUND }, - {NULL} + { NULL, 0, 0, NULL } }; static void FillElementDraw( @@ -119,7 +119,7 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = { Tk_Offset(BorderElement,borderWidthObj), DEFAULT_BORDERWIDTH }, { "-relief", TK_OPTION_RELIEF, Tk_Offset(BorderElement,reliefObj), "flat" }, - {NULL} + { NULL, 0, 0, NULL } }; static void BorderElementSize( @@ -172,7 +172,7 @@ static Ttk_ElementOptionSpec FieldElementOptions[] = { Tk_Offset(FieldElement,borderObj), "white" }, { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(FieldElement,borderWidthObj), "2" }, - {NULL} + { NULL, 0, 0, NULL } }; static void FieldElementSize( @@ -230,7 +230,7 @@ static Ttk_ElementOptionSpec PaddingElementOptions[] = { Tk_Offset(PaddingElement,reliefObj), "flat" }, { "-shiftrelief", TK_OPTION_INT, Tk_Offset(PaddingElement,shiftreliefObj), "0" }, - {NULL} + { NULL, 0, 0, NULL } }; static void PaddingElementSize( @@ -294,7 +294,7 @@ static Ttk_ElementOptionSpec FocusElementOptions[] = { Tk_Offset(FocusElement,focusColorObj), "black" }, { "-focusthickness",TK_OPTION_PIXELS, Tk_Offset(FocusElement,focusThicknessObj), "1" }, - {NULL} + { NULL, 0, 0, NULL } }; static void FocusElementSize( @@ -346,7 +346,7 @@ static Ttk_ElementOptionSpec SeparatorElementOptions[] = { Tk_Offset(SeparatorElement, orientObj), "horizontal" }, { "-background", TK_OPTION_BORDER, Tk_Offset(SeparatorElement,borderObj), DEFAULT_BACKGROUND }, - {NULL} + { NULL, 0, 0, NULL } }; static void SeparatorElementSize( @@ -507,7 +507,7 @@ static Ttk_ElementOptionSpec IndicatorElementOptions[] = { Tk_Offset(IndicatorElement,marginObj), "0 2 4 2" }, { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(IndicatorElement,borderWidthObj), DEFAULT_BORDERWIDTH }, - {NULL} + { NULL, 0, 0, NULL } }; /* @@ -653,7 +653,7 @@ static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] = { Tk_Offset(MenuIndicatorElement,reliefObj),"raised" }, { "-indicatormargin", TK_OPTION_STRING, Tk_Offset(MenuIndicatorElement,marginObj), "5 0" }, - { NULL } + { NULL, 0, 0, NULL } }; static void MenuIndicatorElementSize( @@ -720,7 +720,7 @@ static Ttk_ElementOptionSpec ArrowElementOptions[] = { Tk_Offset(ArrowElement,colorObj),"black"}, { "-arrowsize", TK_OPTION_PIXELS, Tk_Offset(ArrowElement,sizeObj), "14" }, - { NULL } + { NULL, 0, 0, NULL } }; static Ttk_Padding ArrowMargins = { 3,3,3,3 }; @@ -787,7 +787,7 @@ static Ttk_ElementOptionSpec TroughElementOptions[] = { Tk_Offset(TroughElement,colorObj), DEFAULT_BACKGROUND }, { "-troughrelief",TK_OPTION_RELIEF, Tk_Offset(TroughElement,reliefObj), "sunken" }, - { NULL } + { NULL, 0, 0, NULL } }; static void TroughElementSize( @@ -851,7 +851,7 @@ static Ttk_ElementOptionSpec ThumbElementOptions[] = { Tk_Offset(ThumbElement,borderObj), DEFAULT_BACKGROUND }, { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(ThumbElement,borderWidthObj), DEFAULT_BORDERWIDTH }, - { NULL } + { NULL, 0, 0, NULL } }; static void ThumbElementSize( @@ -924,7 +924,7 @@ static Ttk_ElementOptionSpec SliderElementOptions[] = { DEFAULT_BACKGROUND }, { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj), "horizontal" }, - { NULL } + { NULL, 0, 0, NULL } }; static void SliderElementSize( @@ -1035,7 +1035,7 @@ static Ttk_ElementOptionSpec PbarElementOptions[] = { DEFAULT_BORDERWIDTH }, { "-background", TK_OPTION_BORDER, Tk_Offset(PbarElement,borderObj), DEFAULT_BACKGROUND }, - { NULL } + { NULL, 0, 0, NULL } }; static void PbarElementSize( diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 95c596f..8656e5b 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1,5 +1,5 @@ /* - * $Id: ttkEntry.c,v 1.17 2009/02/08 19:35:35 jenglish Exp $ + * $Id: ttkEntry.c,v 1.18 2010/01/22 14:17:53 nijtmans Exp $ * * DERIVED FROM: tk/generic/tkEntry.c r1.35. * @@ -11,6 +11,7 @@ */ #include +#include #include #include @@ -1946,7 +1947,7 @@ static Ttk_ElementOptionSpec TextareaElementOptions[] = { Tk_Offset(TextareaElement,fontObj), DEF_ENTRY_FONT }, { "-width", TK_OPTION_INT, Tk_Offset(TextareaElement,widthObj), "20" }, - {0,0,0} + { NULL, 0, 0, NULL } }; static void TextareaElementSize( diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 4294a9e..1bdf0dd 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -1,4 +1,4 @@ -/* $Id: ttkInit.c,v 1.9 2009/08/09 21:20:34 nijtmans Exp $ +/* $Id: ttkInit.c,v 1.10 2010/01/22 14:17:53 nijtmans Exp $ * Copyright (c) 2003, Joe English * * Ttk package: initialization routine and miscellaneous utilities. @@ -185,7 +185,7 @@ Tk_OptionSpec ttkCoreOptionSpecs[] = Tk_Offset(WidgetCore,styleObj), -1, 0,0,STYLE_CHANGED}, {TK_OPTION_STRING, "-class", "", "", NULL, Tk_Offset(WidgetCore,classObj), -1, 0,0,READONLY_OPTION}, - {TK_OPTION_END} + {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; /*------------------------------------------------------------------------ diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 3c7902e..3f1d7c7 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -1,4 +1,4 @@ -/* $Id: ttkLabel.c,v 1.12 2008/05/23 17:58:33 jenglish Exp $ +/* $Id: ttkLabel.c,v 1.13 2010/01/22 14:17:53 nijtmans Exp $ * * text, image, and label elements. * @@ -67,7 +67,7 @@ static Ttk_ElementOptionSpec TextElementOptions[] = { Tk_Offset(TextElement,wrapLengthObj), "0" }, { "-embossed", TK_OPTION_INT, Tk_Offset(TextElement,embossedObj), "0"}, - {NULL} + { NULL, 0, 0, NULL } }; static int TextSetup(TextElement *text, Tk_Window tkwin) @@ -236,7 +236,7 @@ static Ttk_ElementOptionSpec ImageElementOptions[] = { Tk_Offset(ImageElement,stippleObj), "gray50" }, { "-background", TK_OPTION_COLOR, Tk_Offset(ImageElement,backgroundObj), DEFAULT_BACKGROUND }, - {NULL} + { NULL, 0, 0, NULL } }; /* @@ -452,8 +452,7 @@ static Ttk_ElementOptionSpec LabelElementOptions[] = { Tk_Offset(LabelElement,image.stippleObj), "gray50" }, { "-background", TK_OPTION_COLOR, Tk_Offset(LabelElement,image.backgroundObj), DEFAULT_BACKGROUND }, - - {NULL} + { NULL, 0, 0, NULL } }; /* diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index e59801b..96797d7 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1,4 +1,4 @@ -/* $Id: ttkNotebook.c,v 1.21 2009/11/01 18:12:44 jenglish Exp $ +/* $Id: ttkNotebook.c,v 1.22 2010/01/22 14:17:53 nijtmans Exp $ * Copyright (c) 2004, Joe English */ @@ -73,7 +73,7 @@ static Tk_OptionSpec TabOptionSpecs[] = 0,(ClientData)ttkCompoundStrings,GEOMETRY_CHANGED }, {TK_OPTION_INT, "-underline", "underline", "Underline", "-1", Tk_Offset(Tab,underlineObj), -1, 0,0,GEOMETRY_CHANGED }, - {TK_OPTION_END} + {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 } }; static Tk_OptionSpec PaneOptionSpecs[] = diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index bd550a5..2fa7953 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -1,4 +1,4 @@ -/* $Id: ttkPanedwindow.c,v 1.18 2009/11/01 18:12:44 jenglish Exp $ +/* $Id: ttkPanedwindow.c,v 1.19 2010/01/22 14:17:53 nijtmans Exp $ * * Copyright (c) 2005, Joe English. Freely redistributable. * @@ -924,7 +924,7 @@ typedef struct { static Ttk_ElementOptionSpec SashElementOptions[] = { { "-sashthickness", TK_OPTION_INT, Tk_Offset(SashElement,thicknessObj), "5" }, - {NULL} + { NULL, 0, 0, NULL } }; static void SashElementSize( diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c index 2b2ac59..1229b9f 100644 --- a/generic/ttk/ttkSquare.c +++ b/generic/ttk/ttkSquare.c @@ -2,7 +2,7 @@ * * Minimal sample ttk widget. * - * $Id: ttkSquare.c,v 1.7 2009/02/08 19:35:35 jenglish Exp $ + * $Id: ttkSquare.c,v 1.8 2010/01/22 14:17:53 nijtmans Exp $ */ #include @@ -192,7 +192,7 @@ static Ttk_ElementOptionSpec SquareElementOptions[] = "raised" }, { "-width", TK_OPTION_PIXELS, Tk_Offset(SquareElement,widthObj), "20"}, { "-height", TK_OPTION_PIXELS, Tk_Offset(SquareElement,heightObj), "20"}, - { NULL } + { NULL, 0, 0, NULL } }; /* diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 0be29fb..a5b823f 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,10 +1,11 @@ -/* $Id: ttkTreeview.c,v 1.32 2009/02/08 19:35:35 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.33 2010/01/22 14:17:53 nijtmans Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. */ #include +#include #include #include "ttkTheme.h" #include "ttkWidget.h" @@ -3212,7 +3213,7 @@ static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { Tk_Offset(TreeitemIndicator,sizeObj), "12" }, { "-indicatormargins", TK_OPTION_STRING, Tk_Offset(TreeitemIndicator,marginsObj), "2 2 4 2" }, - {NULL} + { NULL, 0, 0, NULL } }; static void TreeitemIndicatorSize( @@ -3279,7 +3280,7 @@ static Ttk_ElementOptionSpec RowElementOptions[] = { Tk_Offset(RowElement,backgroundObj), DEFAULT_BACKGROUND }, { "-rownumber", TK_OPTION_INT, Tk_Offset(RowElement,rowNumberObj), "0" }, - {NULL} + { NULL, 0, 0, NULL } }; static void RowElementDraw( diff --git a/win/configure b/win/configure index afa8c91..3174022 100755 --- a/win/configure +++ b/win/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS BUILD_TCLSH TCLSH_PROG TK_WIN_VERSION MACHINE TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX TK_SHARED_BUILD DEPARG EXTRA_CFLAGS STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES TK_RES RES LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS BUILD_TCLSH TCLSH_PROG TK_WIN_VERSION MACHINE TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW TK_RES STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TK_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1322,7 +1322,7 @@ fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi -# libdir must be a fully qualified path and (not ${exec_prefix}/lib) +# libdir must be a fully qualified path (not ${exec_prefix}/lib) eval libdir="$libdir" #------------------------------------------------------------------------ @@ -2886,7 +2886,7 @@ echo "$as_me: error: Required resource tool 'windres' not found on PATH." >&2;} fi #-------------------------------------------------------------------- -# Checks to see if the make progeam sets the $MAKE variable. +# Checks to see if the make progam sets the $MAKE variable. #-------------------------------------------------------------------- echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 @@ -2924,74 +2924,6 @@ fi #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 -echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 -if test "${ac_cv_cygwin+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#ifdef __CYGWIN__ -#error cygwin -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_cygwin=no -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_cygwin=yes -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 -echo "${ECHO_T}$ac_cv_cygwin" >&6 -if test "$ac_cv_cygwin" = "yes" ; then - { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&5 -echo "$as_me: error: Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw." >&2;} - { (exit 1); exit 1; }; } -fi - #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- @@ -3270,6 +3202,72 @@ echo "${ECHO_T}yes" >&6 cyg_conftest= fi + echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5 +echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6 +if test "${ac_cv_cygwin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef __CYGWIN__ + #error cygwin + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cygwin=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cygwin=yes +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5 +echo "${ECHO_T}$ac_cv_cygwin" >&6 + if test "$ac_cv_cygwin" = "yes" ; then + { echo "$as_me:$LINENO: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&5 +echo "$as_me: WARNING: Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw." >&2;} + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else @@ -4236,7 +4234,7 @@ CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX} # on symbols and static vs. shared. #-------------------------------------------------------------------- -if test "$SHARED_BUILD" = 0 -o "$TCL_NEEDS_EXP_FILE" = 0; then +if test ${SHARED_BUILD} = 0 -o "$TCL_NEEDS_EXP_FILE" = 0; then if test "${DBGX}" = "d"; then RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG" else @@ -4297,6 +4295,7 @@ TK_WIN_VERSION="$TK_VERSION.$TK_RELEASE_LEVEL.`echo $TK_PATCH_LEVEL | tr -d ab.` +# win/tcl.m4 doesn't set (LDFLAGS) @@ -4332,10 +4331,15 @@ TK_WIN_VERSION="$TK_VERSION.$TK_RELEASE_LEVEL.`echo $TK_PATCH_LEVEL | tr -d ab.` +# undefined at this point for win + + + + + -# undefined at this point for win @@ -5032,27 +5036,21 @@ s,@TCL_DBGX@,$TCL_DBGX,;t t s,@CFG_TK_SHARED_LIB_SUFFIX@,$CFG_TK_SHARED_LIB_SUFFIX,;t t s,@CFG_TK_UNSHARED_LIB_SUFFIX@,$CFG_TK_UNSHARED_LIB_SUFFIX,;t t s,@CFG_TK_EXPORT_FILE_SUFFIX@,$CFG_TK_EXPORT_FILE_SUFFIX,;t t -s,@TK_SHARED_BUILD@,$TK_SHARED_BUILD,;t t -s,@DEPARG@,$DEPARG,;t t s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t -s,@STLIB_LD@,$STLIB_LD,;t t -s,@SHLIB_LD@,$SHLIB_LD,;t t -s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t -s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t -s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@DEPARG@,$DEPARG,;t t s,@CC_OBJNAME@,$CC_OBJNAME,;t t s,@CC_EXENAME@,$CC_EXENAME,;t t s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t -s,@RC_OUT@,$RC_OUT,;t t -s,@RC_TYPE@,$RC_TYPE,;t t -s,@RC_INCLUDE@,$RC_INCLUDE,;t t -s,@RC_DEFINE@,$RC_DEFINE,;t t -s,@RC_DEFINES@,$RC_DEFINES,;t t s,@TK_RES@,$TK_RES,;t t -s,@RES@,$RES,;t t +s,@STLIB_LD@,$STLIB_LD,;t t +s,@SHLIB_LD@,$SHLIB_LD,;t t +s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t +s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@TK_SHARED_BUILD@,$TK_SHARED_BUILD,;t t s,@LIBS_GUI@,$LIBS_GUI,;t t s,@DLLSUFFIX@,$DLLSUFFIX,;t t s,@LIBPREFIX@,$LIBPREFIX,;t t @@ -5071,6 +5069,12 @@ s,@TK_STUB_LIB_PATH@,$TK_STUB_LIB_PATH,;t t s,@TK_BUILD_STUB_LIB_PATH@,$TK_BUILD_STUB_LIB_PATH,;t t s,@TK_CC_SEARCH_FLAGS@,$TK_CC_SEARCH_FLAGS,;t t s,@TK_LD_SEARCH_FLAGS@,$TK_LD_SEARCH_FLAGS,;t t +s,@RC_OUT@,$RC_OUT,;t t +s,@RC_TYPE@,$RC_TYPE,;t t +s,@RC_INCLUDE@,$RC_INCLUDE,;t t +s,@RC_DEFINE@,$RC_DEFINE,;t t +s,@RC_DEFINES@,$RC_DEFINES,;t t +s,@RES@,$RES,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -5336,3 +5340,4 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi + diff --git a/win/configure.in b/win/configure.in index f29e05e..31c653f 100644 --- a/win/configure.in +++ b/win/configure.in @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.87 2009/08/09 21:20:34 nijtmans Exp $ +# RCS: @(#) $Id: configure.in,v 1.88 2010/01/22 14:17:53 nijtmans Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.59) @@ -29,7 +29,7 @@ fi if test "${exec_prefix}" = "NONE"; then exec_prefix=$prefix fi -# libdir must be a fully qualified path and (not ${exec_prefix}/lib) +# libdir must be a fully qualified path (not ${exec_prefix}/lib) eval libdir="$libdir" #------------------------------------------------------------------------ @@ -73,7 +73,7 @@ if test "${GCC}" = "yes" ; then fi #-------------------------------------------------------------------- -# Checks to see if the make progeam sets the $MAKE variable. +# Checks to see if the make progam sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET @@ -87,23 +87,6 @@ dnl under autoconf 2.5X. dnl dnl AC_CYGWIN -AC_CACHE_CHECK(for Cygwin version of gcc, - ac_cv_cygwin, -AC_TRY_COMPILE([ -#ifdef __CYGWIN__ -#error cygwin -#endif -], -[], - ac_cv_cygwin=no, - ac_cv_cygwin=yes) -) -if test "$ac_cv_cygwin" = "yes" ; then - AC_MSG_ERROR([Compiling under Cygwin is not currently supported. -A maintainer for the Cygwin port of Tcl/Tk is needed. See the README -file for information about building with Mingw.]) -fi - #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- @@ -125,7 +108,7 @@ SC_ENABLE_THREADS SC_ENABLE_SHARED #-------------------------------------------------------------------- -# The statements below define a collection of compile flags. This +# The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called # after SC_ENABLE_SHARED checks the configure switches. #-------------------------------------------------------------------- @@ -151,7 +134,7 @@ AC_CHECK_HEADER([vssym32.h], [AC_DEFINE(HAVE_VSSYM32_H)], [], #include ]) #-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols +# Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- @@ -218,7 +201,7 @@ CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX} # on symbols and static vs. shared. #-------------------------------------------------------------------- -if test "$SHARED_BUILD" = 0 -o "$TCL_NEEDS_EXP_FILE" = 0; then +if test ${SHARED_BUILD} = 0 -o "$TCL_NEEDS_EXP_FILE" = 0; then if test "${DBGX}" = "d"; then RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG" else @@ -264,25 +247,22 @@ AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_PATCH_LEVEL) + AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_DBGX) AC_SUBST(CFG_TK_SHARED_LIB_SUFFIX) AC_SUBST(CFG_TK_UNSHARED_LIB_SUFFIX) AC_SUBST(CFG_TK_EXPORT_FILE_SUFFIX) -AC_SUBST(TK_SHARED_BUILD) -AC_SUBST(CYGPATH) -AC_SUBST(DEPARG) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(EXTRA_CFLAGS) -AC_SUBST(STLIB_LD) -AC_SUBST(SHLIB_LD) -AC_SUBST(SHLIB_LD_LIBS) -AC_SUBST(SHLIB_CFLAGS) -AC_SUBST(SHLIB_SUFFIX) +AC_SUBST(CYGPATH) +AC_SUBST(DEPARG) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) + +# win/tcl.m4 doesn't set (LDFLAGS) AC_SUBST(LDFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) @@ -290,14 +270,15 @@ AC_SUBST(LDFLAGS_CONSOLE) AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) AC_SUBST(RANLIB) -AC_SUBST(RC) -AC_SUBST(RC_OUT) -AC_SUBST(RC_TYPE) -AC_SUBST(RC_INCLUDE) -AC_SUBST(RC_DEFINE) -AC_SUBST(RC_DEFINES) AC_SUBST(TK_RES) -AC_SUBST(RES) + +AC_SUBST(STLIB_LD) +AC_SUBST(SHLIB_LD) +AC_SUBST(SHLIB_LD_LIBS) +AC_SUBST(SHLIB_CFLAGS) +AC_SUBST(SHLIB_SUFFIX) +AC_SUBST(TK_SHARED_BUILD) + AC_SUBST(LIBS) AC_SUBST(LIBS_GUI) AC_SUBST(DLLSUFFIX) @@ -321,4 +302,16 @@ AC_SUBST(TK_BUILD_STUB_LIB_PATH) AC_SUBST(TK_CC_SEARCH_FLAGS) AC_SUBST(TK_LD_SEARCH_FLAGS) -AC_OUTPUT([Makefile tkConfig.sh wish.exe.manifest]) +AC_SUBST(RC) +AC_SUBST(RC_OUT) +AC_SUBST(RC_TYPE) +AC_SUBST(RC_INCLUDE) +AC_SUBST(RC_DEFINE) +AC_SUBST(RC_DEFINES) +AC_SUBST(RES) + +AC_OUTPUT(Makefile tkConfig.sh wish.exe.manifest) + +dnl Local Variables: +dnl mode: autoconf; +dnl End: diff --git a/win/tcl.m4 b/win/tcl.m4 index dbd89d3..39e4fe1 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -432,6 +432,22 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ cyg_conftest= fi + AC_CACHE_CHECK(for Cygwin version of gcc, + ac_cv_cygwin, + AC_TRY_COMPILE([ + #ifdef __CYGWIN__ + #error cygwin + #endif + ], + [], + ac_cv_cygwin=no, + ac_cv_cygwin=yes) + ) + if test "$ac_cv_cygwin" = "yes" ; then + AC_MSG_WARN([Compiling under Cygwin is not currently supported. +If you are not sure you want this, see the README +file for information about building with Mingw.]) + fi if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then DEPARG='"$<"' else diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 4426546..8beac62 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinMenu.c,v 1.71 2010/01/03 19:50:59 patthoyts Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.72 2010/01/22 14:17:53 nijtmans Exp $ */ #define WINVER 0x0500 /* Requires Windows 2K definitions */ @@ -19,8 +19,6 @@ #include "tkWinInt.h" #include "tkMenu.h" -#include - /* * The class of the window for popup menus. */ diff --git a/win/tkWinPort.h b/win/tkWinPort.h index 8069f46..3a99c43 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPort.h,v 1.12 2008/08/28 18:13:36 dgp Exp $ + * RCS: @(#) $Id: tkWinPort.h,v 1.13 2010/01/22 14:17:53 nijtmans Exp $ */ #ifndef _WINPORT @@ -30,7 +30,12 @@ #include #include #include -#include +#ifdef __CYGWIN__ +# include +# include +#else +# include +#endif /* * Need to block out this include for building extensions with MetroWerks @@ -52,7 +57,15 @@ # define hypot _hypot #endif /* _MSC_VER */ -#ifndef __GNUC__ +#ifdef __CYGWIN__ +# ifdef _UNICODE +# define _tcsrchr wcsrchr +# else +# define _tcsrchr strrchr + +# endif +#else +# define wcscasecmp _wcsicmp # define strncasecmp strnicmp # define strcasecmp stricmp #endif @@ -117,13 +130,4 @@ #define TkpCreateNativeBitmap(display, source) None #define TkpGetNativeAppBitmap(display, name, w, h) None -/* - * Define timezone for gettimeofday. - */ - -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - #endif /* _WINPORT */ diff --git a/win/tkWinSend.c b/win/tkWinSend.c index a6951af..addcad6 100644 --- a/win/tkWinSend.c +++ b/win/tkWinSend.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinSend.c,v 1.21 2010/01/13 23:08:11 nijtmans Exp $ + * RCS: @(#) $Id: tkWinSend.c,v 1.22 2010/01/22 14:17:53 nijtmans Exp $ */ #include "tkInt.h" @@ -843,7 +843,7 @@ Win32ErrorObj( if (lpBuffer == NULL) { lpBuffer = sBuffer; - wsprintf(sBuffer, _T("Error Code: %08lX"), hrError); + wsprintf(sBuffer, (const char *)_T("Error Code: %08lX"), hrError); } if ((p = _tcsrchr(lpBuffer, _T('\r'))) != NULL) { @@ -1034,7 +1034,7 @@ SendTrace( static char buffer[1024]; va_start(args, format); - _vsnprintf(buffer, 1023, format, args); + vsnprintf(buffer, 1023, format, args); OutputDebugString(buffer); va_end(args); } diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c index f07259e..f3de005 100644 --- a/win/tkWinSendCom.c +++ b/win/tkWinSendCom.c @@ -18,7 +18,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinSendCom.c,v 1.9 2008/10/05 18:22:22 dkf Exp $ + * RCS: @(#) $Id: tkWinSendCom.c,v 1.10 2010/01/22 14:17:53 nijtmans Exp $ */ #include "tkInt.h" @@ -252,9 +252,9 @@ WinSendCom_GetIDsOfNames( if (rgDispId) { hr = DISP_E_UNKNOWNNAME; - if (_wcsicmp(*rgszNames, L"Send") == 0) { + if (wcscasecmp(*rgszNames, L"Send") == 0) { *rgDispId = TKWINSENDCOM_DISPID_SEND, hr = S_OK; - } else if (_wcsicmp(*rgszNames, L"Async") == 0) { + } else if (wcscasecmp(*rgszNames, L"Async") == 0) { *rgDispId = TKWINSENDCOM_DISPID_ASYNC, hr = S_OK; } } diff --git a/win/tkWinTest.c b/win/tkWinTest.c index d44bf38..b71fefa 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinTest.c,v 1.29 2010/01/13 23:08:11 nijtmans Exp $ + * RCS: @(#) $Id: tkWinTest.c,v 1.30 2010/01/22 14:17:53 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -366,9 +366,6 @@ TestwineventCmd( } } message = TkFindStateNum(NULL, NULL, messageMap, argv[3]); - if (message < 0) { - message = strtol(argv[3], NULL, 0); - } wParam = 0; lParam = 0; diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c index e224f57..022fb62 100644 --- a/win/ttkWinTheme.c +++ b/win/ttkWinTheme.c @@ -1,6 +1,6 @@ /* winTheme.c - Copyright (C) 2004 Pat Thoyts * - * $Id: ttkWinTheme.c,v 1.14 2008/11/01 15:34:24 patthoyts Exp $ + * $Id: ttkWinTheme.c,v 1.15 2010/01/22 14:17:53 nijtmans Exp $ */ #ifdef _MSC_VER @@ -109,7 +109,7 @@ typedef struct { #define FIXEDSIZE(id) (id|_FIXEDSIZE) #define HALFMETRIC(id) (id|_HALFMETRIC) #define GETMETRIC(m) \ - ((m) & _FIXEDSIZE ? (m) & ~_FIXEDSIZE : GetSystemMetrics((m)&0x0fffffff)) + ((m) & _FIXEDSIZE ? (int)((m) & ~_FIXEDSIZE) : GetSystemMetrics((m)&0x0fffffff)) static FrameControlElementData FrameControlElements[] = { { "Checkbutton.indicator", @@ -191,7 +191,7 @@ typedef struct { static Ttk_ElementOptionSpec BorderElementOptions[] = { { "-relief",TK_OPTION_RELIEF,Tk_Offset(BorderElement,reliefObj), "flat" }, - {NULL} + {NULL, 0, 0, NULL} }; static void BorderElementSize( @@ -242,7 +242,7 @@ typedef struct { static Ttk_ElementOptionSpec FieldElementOptions[] = { { "-fieldbackground", TK_OPTION_BORDER, Tk_Offset(FieldElement,backgroundObj), "white" }, - {NULL} + { NULL, 0, 0, NULL } }; static void FieldElementSize( @@ -297,7 +297,7 @@ static Ttk_ElementOptionSpec ButtonBorderElementOptions[] = { Tk_Offset(ButtonBorderElement,highlightColorObj), "black" }, { "-default", TK_OPTION_ANY, Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" }, - {NULL} + {NULL, 0, 0, NULL} }; static void ButtonBorderElementSize( @@ -421,7 +421,7 @@ typedef struct { static Ttk_ElementOptionSpec FillFocusElementOptions[] = { { "-focusfill", TK_OPTION_COLOR, Tk_Offset(FillFocusElement,fillColorObj), "white" }, - { NULL } + {NULL, 0, 0, NULL} }; /* @@@ FIX THIS */ @@ -545,7 +545,7 @@ typedef struct { static Ttk_ElementOptionSpec ThumbElementOptions[] = { { "-orient", TK_OPTION_ANY,Tk_Offset(ThumbElement,orientObj),"horizontal"}, - { NULL } + { NULL, 0, 0, NULL } }; static void ThumbElementSize( @@ -602,7 +602,7 @@ typedef struct { static Ttk_ElementOptionSpec SliderElementOptions[] = { { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj), "horizontal" }, - { NULL } + { NULL, 0, 0, NULL } }; static void SliderElementSize( diff --git a/win/winMain.c b/win/winMain.c index 5b914b1..b42e05e 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: winMain.c,v 1.28 2009/10/21 20:28:52 nijtmans Exp $ + * RCS: @(#) $Id: winMain.c,v 1.29 2010/01/22 14:17:53 nijtmans Exp $ */ /* Make sure this file is never compiled with Stubs! */ @@ -36,6 +36,10 @@ static void WishPanic(const char *format, ...); extern int Tktest_Init(Tcl_Interp *interp); #endif /* TK_TEST */ +#if defined(__CYGWIN__) +static void setargv(int *argcPtr, char ***argvPtr); +#endif /* __CYGWIN__ */ + static BOOL consoleRequired = TRUE; /* @@ -107,8 +111,12 @@ WinMain( * Get our args from the c-runtime. Ignore lpszCmdLine. */ +#if defined(__CYGWIN__) + setargv(&argc, &argv); +#else argc = __argc; argv = __argv; +#endif /* * Forward slashes substituted for backslashes. @@ -287,6 +295,134 @@ main( return 0; } #endif /* !__GNUC__ || TK_TEST */ + + +/* + *------------------------------------------------------------------------- + * + * setargv -- + * + * Parse the Windows command line string into argc/argv. Done here + * because we don't trust the builtin argument parser in crt0. Windows + * applications are responsible for breaking their command line into + * arguments. + * + * 2N backslashes + quote -> N backslashes + begin quoted string + * 2N + 1 backslashes + quote -> literal + * N backslashes + non-quote -> literal + * quote + quote in a quoted string -> single quote + * quote + quote not in quoted string -> empty string + * quote -> begin quoted string + * + * Results: + * Fills argcPtr with the number of arguments and argvPtr with the array + * of arguments. + * + * Side effects: + * Memory allocated. + * + *-------------------------------------------------------------------------- + */ + +#if defined(__CYGWIN__) +static void +setargv( + int *argcPtr, /* Filled with number of argument strings. */ + char ***argvPtr) /* Filled with argument strings (malloc'd). */ +{ + char *cmdLine, *p, *arg, *argSpace; + char **argv; + int argc, size, inquote, copy, slashes; + + cmdLine = GetCommandLine(); /* INTL: BUG */ + + /* + * Precompute an overly pessimistic guess at the number of arguments in + * the command line by counting non-space spans. + */ + + size = 2; + for (p = cmdLine; *p != '\0'; p++) { + if ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */ + size++; + while ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */ + p++; + } + if (*p == '\0') { + break; + } + } + } + argSpace = (char *) ckalloc( + (unsigned) (size * sizeof(char *) + strlen(cmdLine) + 1)); + argv = (char **) argSpace; + argSpace += size * sizeof(char *); + size--; + + p = cmdLine; + for (argc = 0; argc < size; argc++) { + argv[argc] = arg = argSpace; + while ((*p == ' ') || (*p == '\t')) { /* INTL: ISO space. */ + p++; + } + if (*p == '\0') { + break; + } + + inquote = 0; + slashes = 0; + while (1) { + copy = 1; + while (*p == '\\') { + slashes++; + p++; + } + if (*p == '"') { + if ((slashes & 1) == 0) { + copy = 0; + if ((inquote) && (p[1] == '"')) { + p++; + copy = 1; + } else { + inquote = !inquote; + } + } + slashes >>= 1; + } + + while (slashes) { + *arg = '\\'; + arg++; + slashes--; + } + + if ((*p == '\0') || (!inquote && + ((*p == ' ') || (*p == '\t')))) { /* INTL: ISO space. */ + break; + } + if (copy != 0) { + *arg = *p; + arg++; + } + p++; + } + *arg = '\0'; + argSpace = arg + 1; + } + argv[argc] = NULL; + + *argcPtr = argc; + *argvPtr = argv; +} +#endif /* __CYGWIN__ */ + +/* + * Local Variables: + * mode: c + * c-basic-offset: 4 + * fill-column: 78 + * End: + */ /* * Local Variables: -- cgit v0.12