diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 4 | ||||
-rw-r--r-- | generic/tkInt.decls | 7 | ||||
-rw-r--r-- | generic/tkInt.h | 6 | ||||
-rw-r--r-- | generic/tkIntPlatDecls.h | 8 | ||||
-rw-r--r-- | generic/tkIntXlibDecls.h | 9 | ||||
-rw-r--r-- | generic/tkMenu.c | 16 | ||||
-rw-r--r-- | generic/tkStubInit.c | 3 | ||||
-rw-r--r-- | generic/tkTest.c | 56 | ||||
-rw-r--r-- | generic/tkTextBTree.c | 4 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 5 |
10 files changed, 61 insertions, 57 deletions
diff --git a/generic/tk.h b/generic/tk.h index 88ba717..a11d207 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.74.2.12 2005/11/16 22:07:37 dgp Exp $ + * RCS: @(#) $Id: tk.h,v 1.74.2.13 2005/11/27 02:44:25 das Exp $ */ #ifndef _TK @@ -36,8 +36,6 @@ extern "C" { * win/makefile.vc (not patchlevel) * README (sections 0 and 1) * mac/README (not patchlevel) - * macosx/Wish.pbproj/project.pbxproj - * (14 LOC total, 4 LOC patch) * win/README (not patchlevel) * unix/README (not patchlevel) * unix/tk.spec (3 LOC Major/Minor, 2 LOC patch) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 1d756f3..cb82468 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -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: tkInt.decls,v 1.33.2.5 2005/08/09 07:39:51 das Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.33.2.6 2005/11/27 02:44:25 das Exp $ library tk @@ -1229,7 +1229,7 @@ declare 17 aqua { } declare 18 aqua { - void TkMacOSXHandleMenuSelect (long mResult, int optionKeyPressed) + void TkMacOSXHandleMenuSelect(MenuID theMenu, MenuItemIndex theItem, int optionKeyPressed) } # removed duplicates from tkPlat table (tk.decls) @@ -2273,3 +2273,6 @@ declare 90 {mac aqua} { Status XQueryTree (Display* d, Window w1, Window* w2, Window* w3, \ Window** w4, unsigned int* ui) } +declare 91 {aqua} { + int XSync(Display *display, Bool flag) +} diff --git a/generic/tkInt.h b/generic/tkInt.h index b263d10..1d779b4 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.56.2.6 2005/10/10 21:27:33 hobbs Exp $ + * RCS: $Id: tkInt.h,v 1.56.2.7 2005/11/27 02:44:25 das Exp $ */ #ifndef _TKINT @@ -24,13 +24,13 @@ #include "tcl.h" #endif #ifndef _TKPORT -#include <tkPort.h> +#include "tkPort.h" #endif /* * Ensure WORDS_BIGENDIAN is defined correcly: * Needs to happen here in addition to configure to work with fat compiles on - * Darwin (i.e. ppc and i386 at the same time). + * Darwin (where configure runs only once for multiple architectures). */ #ifdef HAVE_SYS_TYPES_H diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 33bfc98..9c68194 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15.2.3 2005/08/09 07:39:51 das Exp $ + * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15.2.4 2005/11/27 02:44:25 das Exp $ */ #ifndef _TKINTPLATDECLS @@ -302,8 +302,8 @@ EXTERN Window TkMacOSXGetXWindow _ANSI_ARGS_((WindowRef macWinPtr)); EXTERN int TkMacOSXGrowToplevel _ANSI_ARGS_(( WindowRef whichWindow, Point start)); /* 18 */ -EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((long mResult, - int optionKeyPressed)); +EXTERN void TkMacOSXHandleMenuSelect _ANSI_ARGS_((MenuID theMenu, + MenuItemIndex theItem, int optionKeyPressed)); /* Slot 19 is reserved */ /* Slot 20 is reserved */ /* 21 */ @@ -553,7 +553,7 @@ typedef struct TkIntPlatStubs { void *reserved15; Window (*tkMacOSXGetXWindow) _ANSI_ARGS_((WindowRef macWinPtr)); /* 16 */ int (*tkMacOSXGrowToplevel) _ANSI_ARGS_((WindowRef whichWindow, Point start)); /* 17 */ - void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((long mResult, int optionKeyPressed)); /* 18 */ + void (*tkMacOSXHandleMenuSelect) _ANSI_ARGS_((MenuID theMenu, MenuItemIndex theItem, int optionKeyPressed)); /* 18 */ void *reserved19; void *reserved20; void (*tkMacOSXInvalidateWindow) _ANSI_ARGS_((MacDrawable * macWin, int flag)); /* 21 */ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index 829741f..3b8a78b 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.16 2002/10/09 11:56:33 das Exp $ + * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.16.2.1 2005/11/27 02:44:25 das Exp $ */ #ifndef _TKINTXLIBDECLS @@ -945,6 +945,8 @@ EXTERN void XQueryColors _ANSI_ARGS_((Display * display, EXTERN Status XQueryTree _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, Window** w4, unsigned int* ui)); +/* 91 */ +EXTERN int XSync _ANSI_ARGS_((Display * display, Bool flag)); #endif /* MAC_OSX_TK */ typedef struct TkIntXlibStubs { @@ -1245,6 +1247,7 @@ typedef struct TkIntXlibStubs { void (*xQueryColor) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * def_in_out)); /* 88 */ void (*xQueryColors) _ANSI_ARGS_((Display * display, Colormap colormap, XColor * defs_in_out, int ncolors)); /* 89 */ Status (*xQueryTree) _ANSI_ARGS_((Display* d, Window w1, Window* w2, Window* w3, Window** w4, unsigned int* ui)); /* 90 */ + int (*xSync) _ANSI_ARGS_((Display * display, Bool flag)); /* 91 */ #endif /* MAC_OSX_TK */ } TkIntXlibStubs; @@ -2420,6 +2423,10 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XQueryTree \ (tkIntXlibStubsPtr->xQueryTree) /* 90 */ #endif +#ifndef XSync +#define XSync \ + (tkIntXlibStubsPtr->xSync) /* 91 */ +#endif #endif /* MAC_OSX_TK */ #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 42fec13..e272ee1 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.20.2.5 2005/05/31 05:05:35 hobbs Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.20.2.6 2005/11/27 02:44:25 das Exp $ */ /* @@ -119,7 +119,7 @@ static char *compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; -Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { +static 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}, @@ -168,14 +168,14 @@ Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_END} }; -Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = { +static 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} }; -Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { +static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -198,7 +198,7 @@ Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { +static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -218,7 +218,7 @@ Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { +static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { {TK_OPTION_STRING, "-menu", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_MENU, Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK}, @@ -226,7 +226,7 @@ Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { +static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-background", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_BG, Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK}, @@ -248,7 +248,7 @@ static Tk_OptionSpec *specsArray[] = { static CONST char *menuTypeStrings[] = {"normal", "tearoff", "menubar", (char *) NULL}; -Tk_OptionSpec tkMenuConfigSpecs[] = { +static Tk_OptionSpec tkMenuConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_MENU_ACTIVE_BG_COLOR, Tk_Offset(TkMenu, activeBorderPtr), -1, 0, diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 495a509..373c73e 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.41.2.3 2005/07/28 04:57:38 hobbs Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.41.2.4 2005/11/27 02:44:25 das Exp $ */ #include "tkInt.h" @@ -815,6 +815,7 @@ TkIntXlibStubs tkIntXlibStubs = { XQueryColor, /* 88 */ XQueryColors, /* 89 */ XQueryTree, /* 90 */ + XSync, /* 91 */ #endif /* MAC_OSX_TK */ }; diff --git a/generic/tkTest.c b/generic/tkTest.c index 320d5a3..fc91e6c 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTest.c,v 1.21.2.1 2005/05/24 04:21:01 das Exp $ + * RCS: @(#) $Id: tkTest.c,v 1.21.2.2 2005/11/27 02:44:25 das Exp $ */ #include "tkInt.h" @@ -179,8 +179,10 @@ static int TestfontObjCmd _ANSI_ARGS_((ClientData dummy, Tcl_Obj *CONST objv[])); static int TestmakeexistCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); +#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) static int TestmenubarCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); +#endif #if defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK) static int TestmetricsCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); @@ -201,8 +203,10 @@ static void CustomOptionFree _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, char *internalPtr)); static int TestpropCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); +#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) static int TestsendCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); +#endif static int TesttextCmd _ANSI_ARGS_((ClientData dummy, Tcl_Interp *interp, int argc, CONST char **argv)); #if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) @@ -1959,6 +1963,7 @@ TestmakeexistCmd(clientData, interp, argc, argv) */ /* ARGSUSED */ +#if !(defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) static int TestmenubarCmd(clientData, interp, argc, argv) ClientData clientData; /* Main window for application. */ @@ -2008,6 +2013,7 @@ TestmenubarCmd(clientData, interp, argc, argv) return TCL_ERROR; #endif } +#endif /* *---------------------------------------------------------------------- @@ -2026,7 +2032,7 @@ TestmenubarCmd(clientData, interp, argc, argv) *---------------------------------------------------------------------- */ -#ifdef __WIN32__ +#if defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK) static int TestmetricsCmd(clientData, interp, argc, argv) ClientData clientData; /* Main window for application. */ @@ -2035,38 +2041,17 @@ TestmetricsCmd(clientData, interp, argc, argv) CONST char **argv; /* Argument strings. */ { char buf[TCL_INTEGER_SPACE]; + int val; +#ifdef __WIN32__ if (argc < 2) { Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0], " option ?arg ...?\"", (char *) NULL); return TCL_ERROR; } - - if (strcmp(argv[1], "cyvscroll") == 0) { - sprintf(buf, "%d", GetSystemMetrics(SM_CYVSCROLL)); - Tcl_AppendResult(interp, buf, (char *) NULL); - } else if (strcmp(argv[1], "cxhscroll") == 0) { - sprintf(buf, "%d", GetSystemMetrics(SM_CXHSCROLL)); - Tcl_AppendResult(interp, buf, (char *) NULL); - } else { - Tcl_AppendResult(interp, "bad option \"", argv[1], - "\": must be cxhscroll or cyvscroll", (char *) NULL); - return TCL_ERROR; - } - return TCL_OK; -} -#endif -#if defined(MAC_TCL) || defined(MAC_OSX_TK) -static int -TestmetricsCmd(clientData, interp, argc, argv) - ClientData clientData; /* Main window for application. */ - Tcl_Interp *interp; /* Current interpreter. */ - int argc; /* Number of arguments. */ - CONST char **argv; /* Argument strings. */ -{ +#else Tk_Window tkwin = (Tk_Window) clientData; TkWindow *winPtr; - char buf[TCL_INTEGER_SPACE]; if (argc != 3) { Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0], @@ -2078,18 +2063,27 @@ TestmetricsCmd(clientData, interp, argc, argv) if (winPtr == NULL) { return TCL_ERROR; } - +#endif + if (strcmp(argv[1], "cyvscroll") == 0) { - sprintf(buf, "%d", ((TkScrollbar *) winPtr->instanceData)->width); - Tcl_AppendResult(interp, buf, (char *) NULL); +#ifdef __WIN32__ + val = GetSystemMetrics(SM_CYVSCROLL); +#else + val = ((TkScrollbar *) winPtr->instanceData)->width; +#endif } else if (strcmp(argv[1], "cxhscroll") == 0) { - sprintf(buf, "%d", ((TkScrollbar *) winPtr->instanceData)->width); - Tcl_AppendResult(interp, buf, (char *) NULL); +#ifdef __WIN32__ + val = GetSystemMetrics(SM_CXHSCROLL); +#else + val = ((TkScrollbar *) winPtr->instanceData)->width; +#endif } else { Tcl_AppendResult(interp, "bad option \"", argv[1], "\": must be cxhscroll or cyvscroll", (char *) NULL); return TCL_ERROR; } + sprintf(buf, "%d", val); + Tcl_AppendResult(interp, buf, (char *) NULL); return TCL_OK; } #endif diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 4f8ac7d..5c5fb86 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.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: tkTextBTree.c,v 1.6 2002/08/05 04:30:40 dgp Exp $ + * RCS: @(#) $Id: tkTextBTree.c,v 1.6.2.1 2005/11/27 02:44:25 das Exp $ */ #include "tkInt.h" @@ -2466,7 +2466,7 @@ TkTextIsElided(textPtr, indexPtr) register Node *nodePtr; register TkTextLine *siblingLinePtr; register TkTextSegment *segPtr; - register TkTextTag *tagPtr; + register TkTextTag *tagPtr = NULL; /* silence gcc 4 warning */ register int i, index; /* almost always avoid malloc, so stay out of system calls */ diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index c541c32..4866cfa 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.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: tkTextDisp.c,v 1.14 2002/11/22 23:25:19 hobbs Exp $ + * RCS: @(#) $Id: tkTextDisp.c,v 1.14.2.1 2005/11/27 02:44:26 das Exp $ */ #include "tkPort.h" @@ -3210,7 +3210,8 @@ MeasureUp(textPtr, srcPtr, distance, dstPtr) int lineNum; /* Number of current line. */ int bytesToCount; /* Maximum number of bytes to measure in * current line. */ - TkTextIndex bestIndex; /* Best candidate seen so far for result. */ + TkTextIndex bestIndex = {NULL, NULL, 0}; /* Best candidate seen so far for + * result. Silence gcc 4 warning */ TkTextIndex index; DLine *dlPtr, *lowestPtr; int noBestYet; /* 1 means bestIndex hasn't been set. */ |