diff options
Diffstat (limited to 'generic')
133 files changed, 351 insertions, 264 deletions
diff --git a/generic/nanosvg.h b/generic/nanosvg.h index 3f3e38e..5142bf3 100644 --- a/generic/nanosvg.h +++ b/generic/nanosvg.h @@ -1547,8 +1547,8 @@ static int nsvg__isCoordinate(const char* s) /* optional sign */ if (*s == '-' || *s == '+') s++; - /* must have at least one digit */ - return nsvg__isdigit(*s); + /* must have at least one digit, or start by a dot */ + return (nsvg__isdigit(*s) || *s == '.'); } static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) diff --git a/generic/tk.decls b/generic/tk.decls index 4a4f01d..d9b136c 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -5,8 +5,8 @@ # This file is used to generate the tkDecls.h, tkPlatDecls.h, # tkStub.c, and tkPlatStub.c files. # -# Copyright (c) 1998-2000 Ajuba Solutions. -# Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net> +# Copyright © 1998-2000 Ajuba Solutions. +# Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net> # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tk3d.c b/generic/tk3d.c index 155f6ae..249d62c 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -4,8 +4,8 @@ * This module provides procedures to draw borders in the * three-dimensional Motif style. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tk3d.h b/generic/tk3d.h index d36b95e..7c22398 100644 --- a/generic/tk3d.h +++ b/generic/tk3d.h @@ -3,7 +3,7 @@ * * Declarations of types and functions shared by the 3d border module. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkArgv.c b/generic/tkArgv.c index 81e7a44..e16dd3c 100644 --- a/generic/tkArgv.c +++ b/generic/tkArgv.c @@ -4,8 +4,8 @@ * This file contains a function that handles table-based argv-argc * parsing. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkArray.h b/generic/tkArray.h index 81f3198..dbb43ba 100644 --- a/generic/tkArray.h +++ b/generic/tkArray.h @@ -5,7 +5,7 @@ * Random access to any item is very fast. New items can be either appended * or prepended. An array may be traversed in the forward or backward direction. * - * Copyright (c) 2018-2019 by Gregor Cramer. + * Copyright © 2018-2019 Gregor Cramer. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkAtom.c b/generic/tkAtom.c index a4e1e11..0f86b0b 100644 --- a/generic/tkAtom.c +++ b/generic/tkAtom.c @@ -6,8 +6,8 @@ * cleaner interface (caller doesn't have to provide permanent storage * for atom names, for example). * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkBind.c b/generic/tkBind.c index f3cc0b2..09e5a8e 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -4,10 +4,10 @@ * This file provides functions that associate Tcl commands with X events * or sequences of X events. * - * Copyright (c) 1989-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. - * Copyright (c) 2018-2019 by Gregor Cramer. + * Copyright © 1989-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998 Scriptics Corporation. + * Copyright © 2018-2019 Gregor Cramer. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 36fb382..9c2fccc 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -5,8 +5,8 @@ * toolkit. This allows bitmaps to be shared between widgets and also * avoids interactions with the X server. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkButton.c b/generic/tkButton.c index 69d4b12..04c9d78 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -5,8 +5,8 @@ * toolkit. The widgets implemented include buttons, checkbuttons, * radiobuttons, and labels. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkButton.h b/generic/tkButton.h index edf7efe..fb45bb0 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.h @@ -4,7 +4,7 @@ * Declarations of types and functions used to implement button-like * widgets. * - * Copyright (c) 1996-1998 by Sun Microsystems, Inc. + * Copyright © 1996-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 257dcfc..b9cc335 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -3,8 +3,8 @@ * * This file implements arc items for canvas widgets. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index b2dc012..18618b3 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -3,8 +3,8 @@ * * This file implements bitmap items for canvas widgets. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 53e9c25..fcdebf0 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -3,8 +3,8 @@ * * This file implements image items for canvas widgets. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 378e6ed..eab1813 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -3,9 +3,9 @@ * * This file implements line items for canvas widgets. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index a827fdb..cafd7ae 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -3,9 +3,9 @@ * * This file implements polygon items for canvas widgets. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 Ajuba Solutions. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-2000 Ajuba Solutions. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index a8ce9de..b1e7b72 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -5,8 +5,8 @@ * the "postscript" widget command plus a few utility functions used for * generating Postscript. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index e597434..873c2eb 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -3,8 +3,8 @@ * * This file implements text items for canvas widgets. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index b092df6..121bfe8 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -4,7 +4,7 @@ * This file contains a collection of utility functions used by the * implementations of various canvas item types. * - * Copyright (c) 1994 Sun Microsystems, Inc. + * Copyright © 1994 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 37530dd..9de843a 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -3,8 +3,8 @@ * * This file implements window items for canvas widgets. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 3dd1403..125c762 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -5,9 +5,9 @@ * displays a background and a collection of graphical objects such as * rectangles, lines, and texts. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h index f1adbc4..e4fb8fc 100644 --- a/generic/tkCanvas.h +++ b/generic/tkCanvas.h @@ -3,9 +3,9 @@ * * Declarations shared among all the files that implement canvas widgets. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1995 Sun Microsystems, Inc. + * Copyright © 1998 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 67b91a2..89e8df3 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -5,8 +5,8 @@ * collection of data buffers that will be supplied on demand to * requesting applications. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCmds.c b/generic/tkCmds.c index a8d72fc..2b02f93 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -4,9 +4,9 @@ * This file contains a collection of Tk-related Tcl commands that didn't * fit in any particular file of the toolkit. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2000 Scriptics Corporation. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkColor.c b/generic/tkColor.c index cf5c5f6..0f57b8c 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -5,8 +5,8 @@ * order to avoid round-trips to the server to map color names to pixel * values. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkColor.h b/generic/tkColor.h index bcd71fe..59344c1 100644 --- a/generic/tkColor.h +++ b/generic/tkColor.h @@ -3,7 +3,7 @@ * * Declarations of data types and functions used by the Tk color module. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 925cb72..b590ab9 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -4,7 +4,7 @@ * This file contains functions that manage configuration options for * widgets and other things. * - * Copyright (c) 1997-1998 Sun Microsystems, Inc. + * Copyright © 1997-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 345c937..15f4490 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -5,7 +5,7 @@ * have access to a console. It uses the Text widget and provides special * access via a console command. * - * Copyright (c) 1995-1996 Sun Microsystems, Inc. + * Copyright © 1995-1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 98f018a..5849706 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -5,8 +5,8 @@ * toolkit. This allows cursors to be shared between widgets and also * avoids round-trips to the X server. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkDList.h b/generic/tkDList.h index 57af7d8..f6c70d9 100644 --- a/generic/tkDList.h +++ b/generic/tkDList.h @@ -7,7 +7,7 @@ * before or after an existing element or at the head/tail of the list. * A list may be traversed in the forward or backward direction. * - * Copyright (c) 2018 by Gregor Cramer. + * Copyright © 2018 Gregor Cramer. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 2d89b30..dee52bd 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -3,7 +3,7 @@ * * Declarations of functions in the platform independent public Tcl API. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkEntry.c b/generic/tkEntry.c index fbb7e29..e3a6048 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -6,10 +6,10 @@ * spinbox expands on the entry by adding up/down buttons that control * the value of the entry widget. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2000 Ajuba Solutions. - * Copyright (c) 2002 ActiveState Corporation. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2000 Ajuba Solutions. + * Copyright © 2002 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkEntry.h b/generic/tkEntry.h index 293a9db..fe0f2f7 100644 --- a/generic/tkEntry.h +++ b/generic/tkEntry.h @@ -6,7 +6,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * Copyright (c) 2002 Apple Inc. + * Copyright © 2002 Apple Inc. */ #ifndef _TKENTRY diff --git a/generic/tkError.c b/generic/tkError.c index 938afc3..ec72d1b 100644 --- a/generic/tkError.c +++ b/generic/tkError.c @@ -6,8 +6,8 @@ * useful, for example, when communicating with a window that may not * exist. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkEvent.c b/generic/tkEvent.c index ea7b282..bb9b12d 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -4,10 +4,10 @@ * This file provides basic low-level facilities for managing X events in * Tk. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 Ajuba Solutions. - * Copyright (c) 2004 George Peter Staplin + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1995 Sun Microsystems, Inc. + * Copyright © 1998-2000 Ajuba Solutions. + * Copyright © 2004 George Peter Staplin * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFileFilter.c b/generic/tkFileFilter.c index 038129f..32f6d06 100644 --- a/generic/tkFileFilter.c +++ b/generic/tkFileFilter.c @@ -4,7 +4,7 @@ * Process the -filetypes option for the file dialogs on Windows and the * Mac. * - * Copyright (c) 1996 Sun Microsystems, Inc. + * Copyright © 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFileFilter.h b/generic/tkFileFilter.h index 22db9e8..07d4d33 100644 --- a/generic/tkFileFilter.h +++ b/generic/tkFileFilter.h @@ -4,7 +4,7 @@ * Declarations for the file filter processing routines needed by the * file selection dialogs. * - * Copyright (c) 1996 Sun Microsystems, Inc. + * Copyright © 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFocus.c b/generic/tkFocus.c index f6afcd8..5dc542a 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -3,8 +3,8 @@ * * This file contains functions that manage the input focus for Tk. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFont.c b/generic/tkFont.c index 2788b2e..2838e22 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -4,8 +4,8 @@ * This file maintains a database of fonts for the Tk toolkit. It also * provides several utility functions for measuring and displaying text. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFont.h b/generic/tkFont.h index ceabee3..892d8da 100644 --- a/generic/tkFont.h +++ b/generic/tkFont.h @@ -5,7 +5,7 @@ * parts of the font package. This information is not visible outside of * the font package. * - * Copyright (c) 1996-1997 Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 696d2f5..9db25ce 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -5,8 +5,8 @@ * for the Tk toolkit. Frames are windows with a background color and * possibly a 3-D effect, but not much else in the way of attributes. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -839,7 +839,7 @@ FrameWidgetObjCmd( || ((c == 'v') && (strncmp(arg, "-visual", length) == 0))) { -#ifdef SUPPORT_CONFIG_EMBEDDED +#ifdef _WIN32 if (c == 'u') { const char *string = Tcl_GetString(objv[i+1]); diff --git a/generic/tkGC.c b/generic/tkGC.c index 47931a6..591e887 100644 --- a/generic/tkGC.c +++ b/generic/tkGC.c @@ -4,8 +4,8 @@ * This file maintains a database of read-only graphics contexts for the * Tk toolkit, in order to allow GC's to be shared. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c index cd2c2c0..35bf58e 100644 --- a/generic/tkGeometry.c +++ b/generic/tkGeometry.c @@ -4,8 +4,8 @@ * This file contains generic Tk code for geometry management (stuff * that's used by all geometry managers). * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkGet.c b/generic/tkGet.c index 989584e..ec3641f 100644 --- a/generic/tkGet.c +++ b/generic/tkGet.c @@ -6,8 +6,8 @@ * functions, like Tk_GetDirection and Tk_GetUid. The more complex * functions like Tk_GetColor are in separate files. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkGrab.c b/generic/tkGrab.c index db51c96..93e3550 100644 --- a/generic/tkGrab.c +++ b/generic/tkGrab.c @@ -3,8 +3,8 @@ * * This file provides functions that implement grabs for Tk. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkGrid.c b/generic/tkGrid.c index dc4db82..1c55274 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -3,7 +3,7 @@ * * Grid based geometry manager. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImage.c b/generic/tkImage.c index 97d0702..ca9dac6 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -4,8 +4,8 @@ * This module implements the image protocol, which allows lots of * different kinds of images to be used in lots of different widgets. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 4cc98b5..023c14b 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -3,9 +3,9 @@ * * This procedure implements images of type "bitmap" for Tk. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1999 by Scriptics Corporation. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index cece744..825d446 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -8,10 +8,10 @@ * encoded ascii. Derived from the giftoppm code found in the pbmplus * package and tkImgFmtPPM.c in the tk4.0b2 distribution. * - * Copyright (c) Reed Wade (wade@cs.utk.edu), University of Tennessee - * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 1997 Australian National University - * Copyright (c) 2005-2010 Donal K. Fellows + * Copyright © Reed Wade (wade@cs.utk.edu), University of Tennessee + * Copyright © 1995-1997 Sun Microsystems, Inc. + * Copyright © 1997 Australian National University + * Copyright © 2005-2010 Donal K. Fellows * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgListFormat.c b/generic/tkImgListFormat.c index 70efc96..5505ae9 100644 --- a/generic/tkImgListFormat.c +++ b/generic/tkImgListFormat.c @@ -12,10 +12,10 @@ * data only. * * - * Copyright (c) 1994 The Australian National University. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2002-2003 Donal K. Fellows - * Copyright (c) 2003 ActiveState Corporation. + * Copyright © 1994 The Australian National University. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2002-2003 Donal K. Fellows + * Copyright © 2003 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index c8b2125..a7ee743 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -3,8 +3,8 @@ * * A Tk photo image file handler for PNG files. * - * Copyright (c) 2006-2008 Muonics, Inc. - * Copyright (c) 2008 Donal K. Fellows + * Copyright © 2006-2008 Muonics, Inc. + * Copyright © 2008 Donal K. Fellows * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgPPM.c b/generic/tkImgPPM.c index 4a771ed..53e4f92 100644 --- a/generic/tkImgPPM.c +++ b/generic/tkImgPPM.c @@ -3,8 +3,8 @@ * * A photo image file handler for PPM (Portable PixMap) files. * - * Copyright (c) 1994 The Australian National University. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Australian National University. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c index 55cc226..d8244de 100644 --- a/generic/tkImgPhInstance.c +++ b/generic/tkImgPhInstance.c @@ -5,10 +5,10 @@ * images are stored in full color (32 bits per pixel including alpha * channel) and displayed using dithering if necessary. * - * Copyright (c) 1994 The Australian National University. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2002-2008 Donal K. Fellows - * Copyright (c) 2003 ActiveState Corporation. + * Copyright © 1994 The Australian National University. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2002-2008 Donal K. Fellows + * Copyright © 2003 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 89dbb4c..e7b367e 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -5,10 +5,10 @@ * full color (32 bits per pixel including alpha channel) and displayed * using dithering if necessary. * - * Copyright (c) 1994 The Australian National University. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2002-2003 Donal K. Fellows - * Copyright (c) 2003 ActiveState Corporation. + * Copyright © 1994 The Australian National University. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2002-2003 Donal K. Fellows + * Copyright © 2003 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgPhoto.h b/generic/tkImgPhoto.h index d7283b3..e30ba8b 100644 --- a/generic/tkImgPhoto.h +++ b/generic/tkImgPhoto.h @@ -3,10 +3,10 @@ * * Declarations for images of type "photo" for Tk. * - * Copyright (c) 1994 The Australian National University. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2002-2008 Donal K. Fellows - * Copyright (c) 2003 ActiveState Corporation. + * Copyright © 1994 The Australian National University. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2002-2008 Donal K. Fellows + * Copyright © 2003 ActiveState Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c index 4cdb648..db4cc61 100644 --- a/generic/tkImgSVGnano.c +++ b/generic/tkImgSVGnano.c @@ -3,10 +3,10 @@ * * A photo file handler for SVG files. * - * Copyright (c) 2013-14 Mikko Mononen memon@inside.org - * Copyright (c) 2018 Christian Gollwitzer auriocus@gmx.de - * Copyright (c) 2018 Christian Werner https://www.androwish.org/ - * Copyright (c) 2018 Rene Zaumseil r.zaumseil@freenet.de + * Copyright © 2013-14 Mikko Mononen memon@inside.org + * Copyright © 2018 Christian Gollwitzer auriocus@gmx.de + * Copyright © 2018 Christian Werner https://www.androwish.org/ + * Copyright © 2018 Rene Zaumseil r.zaumseil@freenet.de * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -52,6 +52,8 @@ typedef struct { RastOpts ropts; } NSVGcache; +static const void * MemMem(const void *haystack, size_t haysize, + const void *needle, size_t needlen); static int FileMatchSVG(Tcl_Channel chan, const char *fileName, Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp); @@ -101,6 +103,46 @@ Tk_PhotoImageFormat tkImgFmtSVGnano = { /* *---------------------------------------------------------------------- * + * MemMem -- + * + * Like strstr() but operating on memory buffers with sizes. + * + *---------------------------------------------------------------------- + */ + +static const void * +MemMem(const void *haystack, size_t haylen, + const void *needle, size_t needlen) +{ + const void *hayend, *second, *p; + unsigned char first; + + if ((needlen <= 0) || (haylen < needlen)) { + return NULL; + } + hayend = (const void *) ((char *) haystack + haylen - needlen); + first = ((char *) needle)[0]; + second = (const void *) ((char *) needle + 1); + needlen -= 1; + while (haystack < hayend) { + p = memchr(haystack, first, (char *) hayend - (char *) haystack); + if (p == NULL) { + break; + } + if (needlen == 0) { + return p; + } + haystack = (const void *) ((char *) p + 1); + if (memcmp(second, haystack, needlen) == 0) { + return p; + } + } + return NULL; +} + +/* + *---------------------------------------------------------------------- + * * FileMatchSVG -- * * This function is invoked by the photo image type to see if a file @@ -132,7 +174,19 @@ FileMatchSVG( (void)fileName; CleanCache(interp); - if (Tcl_ReadChars(chan, dataObj, -1, 0) == TCL_IO_FAILURE) { + if (Tcl_ReadChars(chan, dataObj, 4096, 0) == TCL_IO_FAILURE) { + /* in case of an error reading the file */ + Tcl_DecrRefCount(dataObj); + return 0; + } + data = TkGetStringFromObj(dataObj, &length); + /* should have a '<svg' and a '>' in the first 4k */ + if ((memchr(data, '>', length) == NULL) || + (MemMem(data, length, "<svg", 4) == NULL)) { + Tcl_DecrRefCount(dataObj); + return 0; + } + if (!Tcl_Eof(chan) && (Tcl_ReadChars(chan, dataObj, -1, 1) == TCL_IO_FAILURE)) { /* in case of an error reading the file */ Tcl_DecrRefCount(dataObj); return 0; @@ -237,13 +291,19 @@ StringMatchSVG( int *widthPtr, int *heightPtr, Tcl_Interp *interp) { - TkSizeT length; + TkSizeT length, testLength; const char *data; RastOpts ropts; NSVGimage *nsvgImage; CleanCache(interp); data = TkGetStringFromObj(dataObj, &length); + /* should have a '<svg' and a '>' in the first 4k */ + testLength = (length > 4096) ? 4096 : length; + if ((memchr(data, '>', testLength) == NULL) || + (MemMem(data, testLength, "<svg", 4) == NULL)) { + return 0; + } nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj, &ropts); if (nsvgImage != NULL) { GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr); diff --git a/generic/tkImgUtil.c b/generic/tkImgUtil.c index 6a43fbe..e1b9c38 100644 --- a/generic/tkImgUtil.c +++ b/generic/tkImgUtil.c @@ -3,7 +3,7 @@ * * This file contains image related utility functions. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 7886355..3f91d5e 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -4,8 +4,8 @@ # are exported by the Tk library. This file is used to generate the # tkIntDecls.h, tkIntPlatDecls.h, tkIntStub.c, and tkPlatStub.c files. # -# Copyright (c) 1998-1999 by Scriptics Corporation. -# Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net> +# Copyright © 1998-1999 Scriptics Corporation. +# Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net> # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkInt.h b/generic/tkInt.h index ac3667b..be1fa7b 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -6,7 +6,7 @@ * * Copyright (c) 1990-1994 The Regents of the University of California. * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998 by Scriptics Corporation. + * Copyright (c) 1998 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -901,7 +901,7 @@ typedef struct { char trans_chars[XMaxTransChars]; /* translated characters */ unsigned char nbytes; -#elif !defined(MAC_OSC_TK) +#elif !defined(MAC_OSX_TK) char *charValuePtr; /* A pointer to a string that holds the key's * %A substitution text (before backslash * adding), or NULL if that has not been diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 6741704..2e96807 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -6,7 +6,7 @@ * interfaces are not guaranteed to remain the same between * versions. Use at your own risk. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 348868b..0b770a1 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -6,7 +6,7 @@ * interfaces are not guaranteed to remain the same between * versions. Use at your own risk. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * All rights reserved. */ diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index fe11c09..7e86d52 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -6,7 +6,7 @@ * interfaces are not guaranteed to remain the same between * versions. Use at your own risk. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * All rights reserved. */ diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 7bca20e..dc15b8f 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -5,8 +5,8 @@ * displays a collection of strings, one per line, and provides scrolling * and selection. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMacWinMenu.c b/generic/tkMacWinMenu.c index 40a5ea8..eb8eb2f 100644 --- a/generic/tkMacWinMenu.c +++ b/generic/tkMacWinMenu.c @@ -4,7 +4,7 @@ * This module implements the common elements of the Mac and Windows * specific features of menus. This file is not used for UNIX. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMenu.c b/generic/tkMenu.c index a67be21..db95f09 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -6,8 +6,8 @@ * supplemented by platform-specific files. The geometry calculation and * drawing code for menus is in the file tkMenuDraw.c * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1998 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMenu.h b/generic/tkMenu.h index ee7405a..16ea507 100644 --- a/generic/tkMenu.h +++ b/generic/tkMenu.h @@ -4,7 +4,7 @@ * Declarations shared among all of the files that implement menu * widgets. * - * Copyright (c) 1996-1998 by Sun Microsystems, Inc. + * Copyright © 1996-1998 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 2512f7c..fd059bf 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -4,7 +4,7 @@ * This module implements the platform-independent drawing and geometry * calculations of menu widgets. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index b12e0eb..dbf6208 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -4,8 +4,8 @@ * This module implements button-like widgets that are used to invoke * pull-down menus. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h index 1dbacb3..1dc0f75 100644 --- a/generic/tkMenubutton.h +++ b/generic/tkMenubutton.h @@ -4,7 +4,7 @@ * Declarations of types and functions used to implement the menubutton * widget. * - * Copyright (c) 1996-1997 by Sun Microsystems, Inc. + * Copyright © 1996-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 8bd8573..c0b9963 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -5,9 +5,9 @@ * widget displays a multi-line string in a window according to a * particular aspect ratio. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 by Ajuba Solutions. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-2000 Ajuba Solutions. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkObj.c b/generic/tkObj.c index 3f623f6..53ef86a 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -3,7 +3,7 @@ * * This file contains functions that implement the common Tk object types * - * Copyright (c) 1997 Sun Microsystems, Inc. + * Copyright © 1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -116,7 +116,13 @@ extern const struct TclIntStubs *tclIntStubsPtr; ((int (*)(Tcl_Interp*, Tcl_Obj *, int, int*))(void *)((&(tclStubsPtr->tcl_PkgProvideEx))[645]))((interp), (obj), (max), (ptr)): \ tclIntStubsPtr->tclGetIntForIndex((interp), (obj), (max), (ptr))) #elif TCL_MINOR_VERSION < 7 +#ifdef __cplusplus +extern "C" { +#endif extern int TclGetIntForIndex(Tcl_Interp*, Tcl_Obj *, int, int*); +#ifdef __cplusplus +} +#endif # define Tcl_GetIntForIndex(interp, obj, max, ptr) TclGetIntForIndex(interp, obj, max, ptr) #endif #endif diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 49c576a..63b65d6 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -5,8 +5,8 @@ * FOR BACKWARD COMPATIBILITY; THE NEW CONFIGURATION PACKAGE SHOULD BE * USED FOR NEW PROJECTS. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c index 22522d8..b64b6cc 100644 --- a/generic/tkOldTest.c +++ b/generic/tkOldTest.c @@ -6,9 +6,9 @@ * interfaces. These commands are not normally included in Tcl/Tk * applications; they're only used for testing. * - * Copyright (c) 1993-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1993-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-1999 Scriptics Corporation. * Contributions by Don Porter, NIST, 2007. (not subject to US copyright) * * See the file "license.terms" for information on usage and redistribution of diff --git a/generic/tkOption.c b/generic/tkOption.c index a8c9f62..4668f28 100644 --- a/generic/tkOption.c +++ b/generic/tkOption.c @@ -5,8 +5,8 @@ * allows various strings to be associated with windows either by name or * by class or both. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPack.c b/generic/tkPack.c index 239b00a..18f3107 100644 --- a/generic/tkPack.c +++ b/generic/tkPack.c @@ -4,8 +4,8 @@ * This file contains code to implement the "packer" geometry manager for * Tk. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index c15236d..60d4fc0 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -6,8 +6,8 @@ * of other widgets, placing a movable "sash" between them, which can be * used to alter the relative sizes of adjacent widgets. * - * Copyright (c) 1997 Sun Microsystems, Inc. - * Copyright (c) 2000 Ajuba Solutions. + * Copyright © 1997 Sun Microsystems, Inc. + * Copyright © 2000 Ajuba Solutions. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c index ed8fb0b..d9e5981 100644 --- a/generic/tkPkgConfig.c +++ b/generic/tkPkgConfig.c @@ -4,8 +4,8 @@ * This file contains the configuration information to embed into the tcl * binary library. * - * Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net> - * Copyright (c) 2017 Stuart Cassoff <stwo@users.sourceforge.net> + * Copyright © 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net> + * Copyright © 2017 Stuart Cassoff <stwo@users.sourceforge.net> * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 8d6b87e..8e26c71 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -4,8 +4,8 @@ * This file contains code to implement a simple geometry manager for Tk * based on absolute placement or "rubber-sheet" placement. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index 902e73d..422407f 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -3,7 +3,7 @@ * * Declarations of functions in the platform-specific public Tcl API. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkPointer.c b/generic/tkPointer.c index addfd0e..607939d 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -6,7 +6,7 @@ * to generate appropriate enter/leave events, and to update the global * grab window information. * - * Copyright (c) 1996 by Sun Microsystems, Inc. + * Copyright © 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index 76bf03b..bf83453 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -3,8 +3,8 @@ * * This file implements rectangle and oval items for canvas widgets. * - * Copyright (c) 1991-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1991-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkScale.c b/generic/tkScale.c index f1e2cec..c67e35c 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -9,9 +9,9 @@ * implementation by Paul Mackerras. The -variable option is due to * Henning Schulzrinne. All of these are used with permission. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 by Scriptics Corporation. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkScale.h b/generic/tkScale.h index 4e4a3e7..6320e3e 100644 --- a/generic/tkScale.h +++ b/generic/tkScale.h @@ -4,8 +4,8 @@ * Declarations of types and functions used to implement the scale * widget. * - * Copyright (c) 1996 by Sun Microsystems, Inc. - * Copyright (c) 1999-2000 by Scriptics Corporation. + * Copyright © 1996 Sun Microsystems, Inc. + * Copyright © 1999-2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index d646434..e4d6dac 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -5,8 +5,8 @@ * scrollbar displays a slider and two arrows; mouse clicks on features * within the scrollbar cause scrolling commands to be invoked. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h index f7c39c8..2108a00 100644 --- a/generic/tkScrollbar.h +++ b/generic/tkScrollbar.h @@ -4,7 +4,7 @@ * Declarations of types and functions used to implement the scrollbar * widget. * - * Copyright (c) 1996 by Sun Microsystems, Inc. + * Copyright © 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkSelect.c b/generic/tkSelect.c index 7cf62c2..a100121 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -4,8 +4,8 @@ * This file manages the selection for the Tk toolkit, translating * between the standard X ICCCM conventions and Tcl commands. * - * Copyright (c) 1990-1993 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1993 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkSelect.h b/generic/tkSelect.h index c2d153b..ceff8cb 100644 --- a/generic/tkSelect.h +++ b/generic/tkSelect.h @@ -4,7 +4,7 @@ * Declarations of types shared among the files that implement selection * support. * - * Copyright (c) 1995 Sun Microsystems, Inc. + * Copyright © 1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 04c51fa..c78edc7 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -7,7 +7,7 @@ * build a widget; it isn't included in the normal wish, but it is * included in "tktest". * - * Copyright (c) 1997 Sun Microsystems, Inc. + * Copyright © 1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index f459fbd..2839f66 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -3,7 +3,7 @@ * * This file contains the initializers for the Tk stub vectors. * - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c index aed0b80..8b669db 100644 --- a/generic/tkStubLib.c +++ b/generic/tkStubLib.c @@ -4,8 +4,8 @@ * Stub object that will be statically linked into extensions that want * to access Tk. * - * Copyright (c) 1998-1999 by Scriptics Corporation. - * Copyright (c) 1998 Paul Duffin. + * Copyright © 1998-1999 Scriptics Corporation. + * Copyright © 1998 Paul Duffin. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -75,15 +75,19 @@ Tk_InitStubs( const char *version, int exact) { - const char *packageName = "Tk"; + const char *packageName = "tk"; const char *errMsg = NULL; void *clientData = NULL; const char *actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp, packageName, version, 0, &clientData); - const TkStubs *stubsPtr = (const TkStubs *)clientData; if (actualVersion == NULL) { - return NULL; + packageName = "Tk"; + actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp, + packageName, version, 0, &clientData); + if (actualVersion == NULL) { + return NULL; + } } if (exact) { @@ -113,15 +117,15 @@ Tk_InitStubs( } } } - if (stubsPtr == NULL) { + if (clientData == NULL) { errMsg = "missing stub table pointer"; } else { - tkStubsPtr = stubsPtr; - if (stubsPtr->hooks) { - tkPlatStubsPtr = stubsPtr->hooks->tkPlatStubs; - tkIntStubsPtr = stubsPtr->hooks->tkIntStubs; - tkIntPlatStubsPtr = stubsPtr->hooks->tkIntPlatStubs; - tkIntXlibStubsPtr = stubsPtr->hooks->tkIntXlibStubs; + tkStubsPtr = (const TkStubs *)clientData; + if (tkStubsPtr->hooks) { + tkPlatStubsPtr = tkStubsPtr->hooks->tkPlatStubs; + tkIntStubsPtr = tkStubsPtr->hooks->tkIntStubs; + tkIntPlatStubsPtr = tkStubsPtr->hooks->tkIntPlatStubs; + tkIntXlibStubsPtr = tkStubsPtr->hooks->tkIntXlibStubs; } else { tkPlatStubsPtr = NULL; tkIntStubsPtr = NULL; diff --git a/generic/tkStyle.c b/generic/tkStyle.c index e845ad8..418f74f 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -3,8 +3,8 @@ * * This file implements the widget styles and themes support. * - * Copyright (c) 1990-1993 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1990-1993 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTest.c b/generic/tkTest.c index 4347600..b5ab868 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -6,9 +6,9 @@ * commands are not normally included in Tcl applications; they're only * used for testing. * - * Copyright (c) 1993-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright © 1993-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -247,7 +247,7 @@ Tktest_Init( * Create additional commands for testing Tk. */ - if (Tcl_PkgProvideEx(interp, "Tktest", TK_PATCH_LEVEL, NULL) == TCL_ERROR) { + if (Tcl_PkgProvideEx(interp, "tk::test", TK_PATCH_LEVEL, NULL) == TCL_ERROR) { return TCL_ERROR; } diff --git a/generic/tkText.c b/generic/tkText.c index ce4f976..c1e2129 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -6,9 +6,9 @@ * command interfaces to text widgets. The B-tree representation of text * and its actual display are implemented elsewhere. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1996 Sun Microsystems, Inc. - * Copyright (c) 1999 by Scriptics Corporation. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1996 Sun Microsystems, Inc. + * Copyright © 1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 8feb2a2..f242328 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.c @@ -5,8 +5,8 @@ * for Tk's text widget and implements character and toggle segment * types. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1995 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1995 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 2454665..11f741b 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -6,8 +6,8 @@ * widgets. (Well, strictly, each TkTextLine and B-tree node caches its * last observed pixel height, but that information originates here). * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index 3657fa6..aeb5681 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -4,7 +4,7 @@ * This file contains code that allows images to be nested inside text * widgets. It also implements the "image" widget command for texts. * - * Copyright (c) 1997 Sun Microsystems, Inc. + * Copyright © 1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index d9bf299..eea8f50 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -4,8 +4,8 @@ * This module provides functions that manipulate indices for text * widgets. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index 141e2e5..5b30448 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -4,8 +4,8 @@ * This file contains the functions that implement marks for text * widgets. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 2bd321d..c9d111a 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -5,8 +5,8 @@ * text widgets, plus most of the other high-level functions related to * tags. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index 89f7f2a..adf1ad5 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -5,8 +5,8 @@ * inside text widgets. It also implements the "window" widget command * for texts. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkTrig.c b/generic/tkTrig.c index c0691a5..c3549a3 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -5,8 +5,8 @@ * are used by Tk and in particular by the canvas code. It also has * miscellaneous geometry functions used by canvases. * - * Copyright (c) 1992-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1992-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkUndo.c b/generic/tkUndo.c index 7494332..97ac25b 100644 --- a/generic/tkUndo.c +++ b/generic/tkUndo.c @@ -3,8 +3,8 @@ * * This module provides the implementation of an undo stack. * - * Copyright (c) 2002 by Ludwig Callewaert. - * Copyright (c) 2003-2004 by Vincent Darley. + * Copyright © 2002 Ludwig Callewaert. + * Copyright © 2003-2004 Vincent Darley. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkUndo.h b/generic/tkUndo.h index 490ede9..c5cc37e 100644 --- a/generic/tkUndo.h +++ b/generic/tkUndo.h @@ -3,7 +3,7 @@ * * Declarations shared among the files that implement an undo stack. * - * Copyright (c) 2002 Ludwig Callewaert. + * Copyright © 2002 Ludwig Callewaert. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 9377cf2..701df53 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -4,8 +4,8 @@ * This file contains miscellaneous utility functions that are used by * the rest of Tk, such as a function for drawing a focus highlight. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkVisual.c b/generic/tkVisual.c index 04afcbc..09d1fa1 100644 --- a/generic/tkVisual.c +++ b/generic/tkVisual.c @@ -5,8 +5,8 @@ * visuals and colormaps. This code is based on a prototype * implementation by Paul Mackerras. * - * Copyright (c) 1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/tkWindow.c b/generic/tkWindow.c index eb8e928..2c69215 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -5,8 +5,8 @@ * equivalent to functions in Xlib (and even invoke them) but also * maintain the local Tk_Window structure. * - * Copyright (c) 1989-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. + * Copyright © 1989-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -3283,10 +3283,14 @@ Initialize( } /* - * Provide Tk and its stub table. + * Provide "tk" and its stub table. */ - code = Tcl_PkgProvideEx(interp, "Tk", TK_PATCH_LEVEL, +#ifndef TK_NO_DEPRECATED + Tcl_PkgProvideEx(interp, "Tk", TK_PATCH_LEVEL, + (ClientData) &tkStubs); +#endif + code = Tcl_PkgProvideEx(interp, "tk", TK_PATCH_LEVEL, (ClientData) &tkStubs); if (code != TCL_OK) { goto done; @@ -3381,7 +3385,7 @@ Tk_PkgInitStubsCheck( const char * version, int exact) { - const char *actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0, NULL); + const char *actualVersion = Tcl_PkgRequireEx(interp, "tk", version, 0, NULL); if (exact && actualVersion) { const char *p = version; @@ -3393,11 +3397,11 @@ Tk_PkgInitStubsCheck( if (count == 1) { if (0 != strncmp(version, actualVersion, strlen(version))) { /* Construct error message */ - Tcl_PkgPresentEx(interp, "Tk", version, 1, NULL); + Tcl_PkgPresentEx(interp, "tk", version, 1, NULL); return NULL; } } else { - return Tcl_PkgPresentEx(interp, "Tk", version, 1, NULL); + return Tcl_PkgPresentEx(interp, "tk", version, 1, NULL); } } return actualVersion; diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index 0b3d0b1..5c5e353 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003, Joe English * * label, button, checkbutton, radiobutton, and menubutton widgets. */ diff --git a/generic/ttk/ttkCache.c b/generic/ttk/ttkCache.c index 9059c55..412a1a1 100644 --- a/generic/ttk/ttkCache.c +++ b/generic/ttk/ttkCache.c @@ -1,7 +1,7 @@ /* * Theme engine resource cache. * - * Copyright (c) 2004, Joe English + * Copyright © 2004, Joe English * * The problem: * diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 035cabc..60e9df3 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Joe English + * Copyright © 2004 Joe English * * "clam" theme; inspired by the XFCE family of Gnome themes. */ diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c index be7d74b..c3aaee8 100644 --- a/generic/ttk/ttkClassicTheme.c +++ b/generic/ttk/ttkClassicTheme.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004, Joe English * * "classic" theme; implements the classic Motif-like Tk look. * diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index 5f76634..2b074ac 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -13,7 +13,11 @@ extern const char *TtkInitializeStubs( interp, TTK_VERSION, TTK_STUBS_EPOCH, TTK_STUBS_REVISION) #else -#define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL) +#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 +# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "Ttk", TTK_VERSION, 0, NULL) +#else +# define Ttk_InitStubs(interp) Tcl_PkgRequireEx(interp, "ttk", TTK_VERSION, 0, NULL) +#endif #endif diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index a614894..1acdcbc 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003 Joe English * * Tk alternate theme, intended to match the MSUE and Gtk's (old) default theme */ diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index a1cac4d..e2626e5 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003 Joe English * * Default implementation for themed elements. * diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 65b0935..6e4a3f0 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1,11 +1,11 @@ /* * DERIVED FROM: tk/generic/tkEntry.c r1.35. * - * Copyright (c) 1990-1994 The Regents of the University of California. - * Copyright (c) 1994-1997 Sun Microsystems, Inc. - * Copyright (c) 2000 Ajuba Solutions. - * Copyright (c) 2002 ActiveState Corporation. - * Copyright (c) 2004 Joe English + * Copyright © 1990-1994 The Regents of the University of California. + * Copyright © 1994-1997 Sun Microsystems, Inc. + * Copyright © 2000 Ajuba Solutions. + * Copyright © 2002 ActiveState Corporation. + * Copyright © 2004 Joe English */ #include "tkInt.h" diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c index 8ae249b..59a576e 100644 --- a/generic/ttk/ttkFrame.c +++ b/generic/ttk/ttkFrame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004 Joe English * * ttk::frame and ttk::labelframe widgets. */ diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c index d745b74..6609651 100644 --- a/generic/ttk/ttkImage.c +++ b/generic/ttk/ttkImage.c @@ -1,8 +1,8 @@ /* * Image specifications and image element factory. * - * Copyright (C) 2004 Pat Thoyts <patthoyts@users.sf.net> - * Copyright (C) 2004 Joe English + * Copyright © 2004 Pat Thoyts <patthoyts@users.sf.net> + * Copyright © 2004 Joe English * * An imageSpec is a multi-element list; the first element * is the name of the default image to use, the remainder of the diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 4a43253..2672a0b 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003 Joe English * * Ttk package: initialization routine and miscellaneous utilities. */ @@ -271,7 +271,10 @@ Ttk_Init(Tcl_Interp *interp) Ttk_PlatformInit(interp); +#ifndef TK_NO_DEPRECATED Tcl_PkgProvideEx(interp, "Ttk", TTK_PATCH_LEVEL, (void *)&ttkStubs); +#endif + Tcl_PkgProvideEx(interp, "ttk", TTK_PATCH_LEVEL, (void *)&ttkStubs); return TCL_OK; } diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c index a971d23..b91c24d 100644 --- a/generic/ttk/ttkLayout.c +++ b/generic/ttk/ttkLayout.c @@ -3,7 +3,7 @@ * * Generic layout processing. * - * Copyright (c) 2003 Joe English. Freely redistributable. + * Copyright © 2003 Joe English. Freely redistributable. */ #include "tkInt.h" diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h index 07b0ade..cf07dfc 100644 --- a/generic/ttk/ttkManager.h +++ b/generic/ttk/ttkManager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Joe English. Freely redistributable. + * Copyright © 2005 Joe English. Freely redistributable. * * Geometry manager utilities. */ diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 5de4e22..5664be5 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004 Joe English */ #include "tkInt.h" diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 97a1b6c..c072f97 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Joe English. Freely redistributable. + * Copyright © 2005 Joe English. Freely redistributable. * * ttk::panedwindow widget implementation. * diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index 9095c89..cea6948 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -1,5 +1,5 @@ /* - * Copyright (c) Joe English, Pat Thoyts, Michael Kirkham + * Copyright © Joe English, Pat Thoyts, Michael Kirkham * * ttk::progressbar widget. */ diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c index 2913ace..761e890 100644 --- a/generic/ttk/ttkScale.c +++ b/generic/ttk/ttkScale.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> + * Copyright © 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * ttk::scale widget. */ diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c index a16186d..a3f1594 100644 --- a/generic/ttk/ttkScrollbar.c +++ b/generic/ttk/ttkScrollbar.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003 Joe English * * ttk::scrollbar widget. */ diff --git a/generic/ttk/ttkSeparator.c b/generic/ttk/ttkSeparator.c index 85fdd02..9b712fd 100644 --- a/generic/ttk/ttkSeparator.c +++ b/generic/ttk/ttkSeparator.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004 Joe English * * ttk::separator and ttk::sizegrip widgets. */ diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c index be5512e..9250b4b 100644 --- a/generic/ttk/ttkSquare.c +++ b/generic/ttk/ttkSquare.c @@ -1,4 +1,4 @@ -/* square.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> +/* square.c - Copyright © 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * Minimal sample ttk widget. */ diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c index a704fa4..3da9531 100644 --- a/generic/ttk/ttkState.c +++ b/generic/ttk/ttkState.c @@ -1,7 +1,7 @@ /* * Tk widget state utilities. * - * Copyright (c) 2003 Joe English. Freely redistributable. + * Copyright © 2003 Joe English. Freely redistributable. * */ diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c index faeabe8..a3b3376 100644 --- a/generic/ttk/ttkStubLib.c +++ b/generic/ttk/ttkStubLib.c @@ -34,17 +34,23 @@ TtkInitializeStubs( Tcl_Interp *interp, const char *version, int epoch, int revision) { int exact = 0; - const char *packageName = "Ttk"; + const char *packageName = "ttk"; const char *errMsg = NULL; void *pkgClientData = NULL; const char *actualVersion = Tcl_PkgRequireEx( interp, packageName, version, exact, &pkgClientData); - const TtkStubs *stubsPtr = (const TtkStubs *)pkgClientData; + const TtkStubs *stubsPtr; if (!actualVersion) { - return NULL; + packageName = "Ttk"; + actualVersion = Tcl_PkgRequireEx( + interp, packageName, version, exact, &pkgClientData); + if (!actualVersion) { + return NULL; + } } + stubsPtr = (const TtkStubs *)pkgClientData; if (!stubsPtr) { errMsg = "missing stub table pointer"; goto error; diff --git a/generic/ttk/ttkTagSet.c b/generic/ttk/ttkTagSet.c index e99c76f..c1ec4c2 100644 --- a/generic/ttk/ttkTagSet.c +++ b/generic/ttk/ttkTagSet.c @@ -1,7 +1,7 @@ /* * Tag tables. 3/4-baked, work in progress. * - * Copyright (C) 2005, Joe English. Freely redistributable. + * Copyright © 2005, Joe English. Freely redistributable. */ #include "tkInt.h" diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c index cdabe32..a4ad79b 100644 --- a/generic/ttk/ttkTheme.c +++ b/generic/ttk/ttkTheme.c @@ -3,8 +3,8 @@ * * This file implements the widget styles and themes support. * - * Copyright (c) 2002 Frederic Bonnet - * Copyright (c) 2003 Joe English + * Copyright © 2002 Frederic Bonnet + * Copyright © 2003 Joe English * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. diff --git a/generic/ttk/ttkTrack.c b/generic/ttk/ttkTrack.c index b9aa776..43a7644 100644 --- a/generic/ttk/ttkTrack.c +++ b/generic/ttk/ttkTrack.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004, Joe English * * TtkTrackElementState() -- helper routine for widgets * like scrollbars in which individual elements may diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 06bd2b8..4e212d8 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Joe English + * Copyright © 2004, Joe English * * ttk::treeview widget implementation. */ diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 1a5b158..083a242 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Joe English + * Copyright © 2003, Joe English * * Core widget utilities. */ |