diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.decls | 8 | ||||
-rw-r--r-- | generic/tkBusy.c | 4 | ||||
-rw-r--r-- | generic/tkFrame.c | 4 | ||||
-rw-r--r-- | generic/tkImgPNG.c | 4 | ||||
-rw-r--r-- | generic/tkImgPhoto.h | 6 | ||||
-rw-r--r-- | generic/tkStubInit.c | 33 | ||||
-rw-r--r-- | generic/tkStubLib.c | 21 | ||||
-rw-r--r-- | generic/tkWindow.c | 6 |
8 files changed, 39 insertions, 47 deletions
diff --git a/generic/tk.decls b/generic/tk.decls index 7031c0f..a68864c 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -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: tk.decls,v 1.50 2010/01/29 18:07:31 nijtmans Exp $ +# RCS: @(#) $Id: tk.decls,v 1.51 2010/02/05 22:45:03 nijtmans Exp $ library tk @@ -128,7 +128,7 @@ declare 24 generic { void Tk_ClearSelection(Tk_Window tkwin, Atom selection) } declare 25 generic { - int Tk_ClipboardAppend(Tcl_Interp *interp,Tk_Window tkwin, + int Tk_ClipboardAppend(Tcl_Interp *interp, Tk_Window tkwin, Atom target, Atom format, const char *buffer) } declare 26 generic { @@ -831,11 +831,11 @@ declare 217 generic { } #declare 218 generic { -# void Tk_CreateCanvasVisitor(Tcl_Interp *interp, VOID *typePtr) +# void Tk_CreateCanvasVisitor(Tcl_Interp *interp, void *typePtr) #} #declare 219 generic { -# VOID *Tk_GetCanvasVisitor(Tcl_Interp *interp, const char *name) +# void *Tk_GetCanvasVisitor(Tcl_Interp *interp, const char *name) #} declare 220 generic { diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 6f200c3..1275e81 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.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: tkBusy.c,v 1.7 2010/01/13 23:08:09 nijtmans Exp $ + * RCS: @(#) $Id: tkBusy.c,v 1.8 2010/02/05 22:45:03 nijtmans Exp $ */ #include "tkInt.h" @@ -791,7 +791,7 @@ Tk_BusyObjCmd( Busy *busyPtr; Tcl_Obj *objPtr; int index, result = TCL_OK; - static const char *optionStrings[] = { + static const char *const optionStrings[] = { "cget", "configure", "current", "forget", "hold", "status", NULL }; enum options { diff --git a/generic/tkFrame.c b/generic/tkFrame.c index eea7e9d..eaccd58 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.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: tkFrame.c,v 1.40 2010/01/13 23:08:08 nijtmans Exp $ + * RCS: @(#) $Id: tkFrame.c,v 1.41 2010/02/05 22:45:03 nijtmans Exp $ */ #include "default.h" @@ -164,7 +164,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", NULL }; diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index f00c9dd..0468ca9 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.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: tkImgPNG.c,v 1.4 2010/01/18 20:43:38 nijtmans Exp $ + * RCS: @(#) $Id: tkImgPNG.c,v 1.5 2010/02/05 22:45:03 nijtmans Exp $ */ #include "tkInt.h" @@ -2212,7 +2212,7 @@ ParseFormat( { Tcl_Obj **objv = NULL; int objc = 0; - static const char *fmtOptions[] = { + static const char *const fmtOptions[] = { "png", "-alpha", NULL }; enum fmtOptions { diff --git a/generic/tkImgPhoto.h b/generic/tkImgPhoto.h index fc1a444..bcbd67f 100644 --- a/generic/tkImgPhoto.h +++ b/generic/tkImgPhoto.h @@ -15,7 +15,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.h,v 1.1 2008/08/25 11:44:04 dkf Exp $ + * RCS: @(#) $Id: tkImgPhoto.h,v 1.2 2010/02/05 22:45:03 nijtmans Exp $ */ #include "tkInt.h" @@ -223,9 +223,9 @@ struct PhotoInstance { * Implementation of the Porter-Duff Source-Over compositing rule. */ -#define PD_SRC_OVER(srcColor,srcAlpha,dstColor,dstAlpha) \ +#define PD_SRC_OVER(srcColor, srcAlpha, dstColor, dstAlpha) \ (srcColor*srcAlpha/255) + dstAlpha*(255-srcAlpha)/255*dstColor/255 -#define PD_SRC_OVER_ALPHA(srcAlpha,dstAlpha) \ +#define PD_SRC_OVER_ALPHA(srcAlpha, dstAlpha) \ (srcAlpha + (255-srcAlpha)*dstAlpha/255) #undef MIN diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index c9739e8..dae166d 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.71 2009/12/02 21:16:45 nijtmans Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.72 2010/02/05 22:45:03 nijtmans Exp $ */ #include "tkInt.h" @@ -47,9 +47,11 @@ * below should be made in the generic/tk.decls script. */ +MODULE_SCOPE const TkStubs tkConstStubs; + /* !BEGIN!: Do not edit below this line. */ -static const TkIntStubs tkIntStubs = { +static const TkIntStubs tkIntConstStubs = { TCL_STUB_MAGIC, NULL, TkAllocWindow, /* 0 */ @@ -334,7 +336,7 @@ static const TkIntStubs tkIntStubs = { TkSmoothPrintProc, /* 180 */ }; -static const TkIntPlatStubs tkIntPlatStubs = { +static const TkIntPlatStubs tkIntPlatConstStubs = { TCL_STUB_MAGIC, NULL, #ifdef __WIN32__ /* WIN */ @@ -450,7 +452,7 @@ static const TkIntPlatStubs tkIntPlatStubs = { #endif /* X11 */ }; -static const TkIntXlibStubs tkIntXlibStubs = { +static const TkIntXlibStubs tkIntXlibConstStubs = { TCL_STUB_MAGIC, NULL, #ifdef __WIN32__ /* WIN */ @@ -658,7 +660,7 @@ static const TkIntXlibStubs tkIntXlibStubs = { #endif /* AQUA */ }; -static const TkPlatStubs tkPlatStubs = { +static const TkPlatStubs tkPlatConstStubs = { TCL_STUB_MAGIC, NULL, #ifdef __WIN32__ /* WIN */ @@ -685,13 +687,13 @@ static const TkPlatStubs tkPlatStubs = { }; static const TkStubHooks tkStubHooks = { - &tkPlatStubs, - &tkIntStubs, - &tkIntPlatStubs, - &tkIntXlibStubs + &tkPlatConstStubs, + &tkIntConstStubs, + &tkIntPlatConstStubs, + &tkIntXlibConstStubs }; -static const TkStubs tkStubs = { +const TkStubs tkConstStubs = { TCL_STUB_MAGIC, &tkStubHooks, Tk_MainLoop, /* 0 */ @@ -973,14 +975,3 @@ static const TkStubs tkStubs = { }; /* !END!: Do not edit above this line. */ - -/* - * Module-scope pointer to the main static stubs table, used for package - * initialization via Tcl_PkgProvideEx(). - */ - -MODULE_SCOPE const TkStubs * const tkConstStubsPtr; - -const TkStubs * const tkConstStubsPtr = &tkStubs; - -#undef UNIX_TK diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c index ce47028..66fdb11 100644 --- a/generic/tkStubLib.c +++ b/generic/tkStubLib.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: tkStubLib.c,v 1.25 2008/04/27 22:38:58 dkf Exp $ + * RCS: @(#) $Id: tkStubLib.c,v 1.26 2010/02/05 22:45:03 nijtmans Exp $ */ /* @@ -90,11 +90,11 @@ Tk_InitStubs( const char *version, int exact) { - const char *actualVersion; - const TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */ + ClientData pkgClientData = NULL; + const char *actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0, + &pkgClientData); + const TkStubs *stubsPtr = pkgClientData; - actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0, - (ClientData *) stubsPtrPtr); if (!actualVersion) { return NULL; } @@ -125,17 +125,18 @@ Tk_InitStubs( } } - if (!tkStubsPtr) { + if (!stubsPtr) { Tcl_SetResult(interp, "This implementation of Tk does not support stubs", TCL_STATIC); return NULL; } - tkPlatStubsPtr = tkStubsPtr->hooks->tkPlatStubs; - tkIntStubsPtr = tkStubsPtr->hooks->tkIntStubs; - tkIntPlatStubsPtr = tkStubsPtr->hooks->tkIntPlatStubs; - tkIntXlibStubsPtr = tkStubsPtr->hooks->tkIntXlibStubs; + tkPlatStubsPtr = stubsPtr->hooks->tkPlatStubs; + tkIntStubsPtr = stubsPtr->hooks->tkIntStubs; + tkIntPlatStubsPtr = stubsPtr->hooks->tkIntPlatStubs; + tkIntXlibStubsPtr = stubsPtr->hooks->tkIntXlibStubs; + tkStubsPtr = stubsPtr; return actualVersion; } diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 6dd8165..9a26d69 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.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: tkWindow.c,v 1.108 2010/01/10 20:27:23 nijtmans Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.109 2010/02/05 22:45:03 nijtmans Exp $ */ #include "tkInt.h" @@ -2923,7 +2923,7 @@ Tk_SafeInit( return Initialize(interp); } -MODULE_SCOPE const TkStubs * const tkConstStubsPtr; +MODULE_SCOPE const TkStubs tkConstStubs; /* *---------------------------------------------------------------------- @@ -3200,7 +3200,7 @@ Initialize( */ code = Tcl_PkgProvideEx(interp, "Tk", TK_PATCH_LEVEL, - (ClientData) tkConstStubsPtr); + (ClientData) &tkConstStubs); if (code != TCL_OK) { goto done; } |