summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 14:11:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 14:11:14 (GMT)
commit76eb475a1c171000446b21fb488202f2b1a124db (patch)
tree8b054d2dc9f1ba3071bd8194ece265b0445d0f8b
parent8fb4a031ef0229ae94bd43a06ac1779baab3049e (diff)
parent46f4476afd4803621152594669922f4d8b8afc3d (diff)
downloadtk-76eb475a1c171000446b21fb488202f2b1a124db.zip
tk-76eb475a1c171000446b21fb488202f2b1a124db.tar.gz
tk-76eb475a1c171000446b21fb488202f2b1a124db.tar.bz2
Merge 8.7
-rw-r--r--.github/workflows/linux-build.yml154
-rw-r--r--.github/workflows/mac-build.yml152
-rw-r--r--.github/workflows/onefiledist.yml229
-rw-r--r--.github/workflows/win-build.yml158
-rw-r--r--.travis.yml1
-rw-r--r--README.md13
-rw-r--r--doc/AddOption.32
-rw-r--r--doc/GetHINSTANCE.32
-rw-r--r--doc/GetHWND.32
-rw-r--r--doc/Grab.32
-rw-r--r--doc/HWNDToWindow.32
-rw-r--r--doc/Inactive.32
-rw-r--r--doc/bind.n2
-rw-r--r--doc/chooseDirectory.n2
-rw-r--r--doc/colors.n2
-rw-r--r--doc/console.n2
-rw-r--r--doc/cursors.n2
-rw-r--r--doc/keysyms.n214
-rw-r--r--doc/menu.n18
-rw-r--r--doc/tkvars.n2
-rw-r--r--generic/nanosvg.h4
-rw-r--r--generic/tk.decls4
-rw-r--r--generic/tk3d.c4
-rw-r--r--generic/tk3d.h2
-rw-r--r--generic/tkArgv.c4
-rw-r--r--generic/tkArray.h2
-rw-r--r--generic/tkAtom.c4
-rw-r--r--generic/tkBind.c8
-rw-r--r--generic/tkBitmap.c4
-rw-r--r--generic/tkButton.c4
-rw-r--r--generic/tkButton.h2
-rw-r--r--generic/tkCanvArc.c4
-rw-r--r--generic/tkCanvBmap.c4
-rw-r--r--generic/tkCanvImg.c4
-rw-r--r--generic/tkCanvLine.c6
-rw-r--r--generic/tkCanvPoly.c6
-rw-r--r--generic/tkCanvPs.c4
-rw-r--r--generic/tkCanvText.c4
-rw-r--r--generic/tkCanvUtil.c2
-rw-r--r--generic/tkCanvWind.c4
-rw-r--r--generic/tkCanvas.c6
-rw-r--r--generic/tkCanvas.h6
-rw-r--r--generic/tkClipboard.c4
-rw-r--r--generic/tkCmds.c6
-rw-r--r--generic/tkColor.c4
-rw-r--r--generic/tkColor.h2
-rw-r--r--generic/tkConfig.c2
-rw-r--r--generic/tkConsole.c2
-rw-r--r--generic/tkCursor.c4
-rw-r--r--generic/tkDList.h2
-rw-r--r--generic/tkDecls.h2
-rw-r--r--generic/tkEntry.c8
-rw-r--r--generic/tkEntry.h2
-rw-r--r--generic/tkError.c4
-rw-r--r--generic/tkEvent.c8
-rw-r--r--generic/tkFileFilter.c2
-rw-r--r--generic/tkFileFilter.h2
-rw-r--r--generic/tkFocus.c4
-rw-r--r--generic/tkFont.c4
-rw-r--r--generic/tkFont.h2
-rw-r--r--generic/tkFrame.c6
-rw-r--r--generic/tkGC.c4
-rw-r--r--generic/tkGeometry.c4
-rw-r--r--generic/tkGet.c4
-rw-r--r--generic/tkGrab.c4
-rw-r--r--generic/tkGrid.c2
-rw-r--r--generic/tkImage.c4
-rw-r--r--generic/tkImgBmap.c6
-rw-r--r--generic/tkImgGIF.c8
-rw-r--r--generic/tkImgListFormat.c8
-rw-r--r--generic/tkImgPNG.c4
-rw-r--r--generic/tkImgPPM.c4
-rw-r--r--generic/tkImgPhInstance.c8
-rw-r--r--generic/tkImgPhoto.c8
-rw-r--r--generic/tkImgPhoto.h8
-rw-r--r--generic/tkImgSVGnano.c72
-rw-r--r--generic/tkImgUtil.c2
-rw-r--r--generic/tkInt.decls4
-rw-r--r--generic/tkInt.h4
-rw-r--r--generic/tkIntDecls.h2
-rw-r--r--generic/tkIntPlatDecls.h2
-rw-r--r--generic/tkIntXlibDecls.h2
-rw-r--r--generic/tkListbox.c4
-rw-r--r--generic/tkMacWinMenu.c2
-rw-r--r--generic/tkMenu.c4
-rw-r--r--generic/tkMenu.h2
-rw-r--r--generic/tkMenuDraw.c2
-rw-r--r--generic/tkMenubutton.c4
-rw-r--r--generic/tkMenubutton.h2
-rw-r--r--generic/tkMessage.c6
-rw-r--r--generic/tkObj.c8
-rw-r--r--generic/tkOldConfig.c4
-rw-r--r--generic/tkOldTest.c6
-rw-r--r--generic/tkOption.c4
-rw-r--r--generic/tkPack.c4
-rw-r--r--generic/tkPanedWindow.c4
-rw-r--r--generic/tkPkgConfig.c4
-rw-r--r--generic/tkPlace.c4
-rw-r--r--generic/tkPlatDecls.h2
-rw-r--r--generic/tkPointer.c2
-rw-r--r--generic/tkRectOval.c4
-rw-r--r--generic/tkScale.c6
-rw-r--r--generic/tkScale.h4
-rw-r--r--generic/tkScrollbar.c4
-rw-r--r--generic/tkScrollbar.h2
-rw-r--r--generic/tkSelect.c4
-rw-r--r--generic/tkSelect.h2
-rw-r--r--generic/tkSquare.c2
-rw-r--r--generic/tkStubInit.c2
-rw-r--r--generic/tkStubLib.c28
-rw-r--r--generic/tkStyle.c4
-rw-r--r--generic/tkTest.c8
-rw-r--r--generic/tkText.c6
-rw-r--r--generic/tkTextBTree.c4
-rw-r--r--generic/tkTextDisp.c4
-rw-r--r--generic/tkTextImage.c2
-rw-r--r--generic/tkTextIndex.c4
-rw-r--r--generic/tkTextMark.c4
-rw-r--r--generic/tkTextTag.c4
-rw-r--r--generic/tkTextWind.c4
-rw-r--r--generic/tkTrig.c4
-rw-r--r--generic/tkUndo.c4
-rw-r--r--generic/tkUndo.h2
-rw-r--r--generic/tkUtil.c4
-rw-r--r--generic/tkVisual.c4
-rw-r--r--generic/tkWindow.c18
-rw-r--r--generic/ttk/ttkButton.c2
-rw-r--r--generic/ttk/ttkCache.c2
-rw-r--r--generic/ttk/ttkClamTheme.c2
-rw-r--r--generic/ttk/ttkClassicTheme.c2
-rw-r--r--generic/ttk/ttkDecls.h6
-rw-r--r--generic/ttk/ttkDefaultTheme.c2
-rw-r--r--generic/ttk/ttkElements.c2
-rw-r--r--generic/ttk/ttkEntry.c10
-rw-r--r--generic/ttk/ttkFrame.c2
-rw-r--r--generic/ttk/ttkImage.c4
-rw-r--r--generic/ttk/ttkInit.c5
-rw-r--r--generic/ttk/ttkLayout.c2
-rw-r--r--generic/ttk/ttkManager.h2
-rw-r--r--generic/ttk/ttkNotebook.c2
-rw-r--r--generic/ttk/ttkPanedwindow.c2
-rw-r--r--generic/ttk/ttkProgress.c2
-rw-r--r--generic/ttk/ttkScale.c2
-rw-r--r--generic/ttk/ttkScrollbar.c2
-rw-r--r--generic/ttk/ttkSeparator.c2
-rw-r--r--generic/ttk/ttkSquare.c2
-rw-r--r--generic/ttk/ttkState.c2
-rw-r--r--generic/ttk/ttkStubLib.c12
-rw-r--r--generic/ttk/ttkTagSet.c2
-rw-r--r--generic/ttk/ttkTheme.c4
-rw-r--r--generic/ttk/ttkTrack.c2
-rw-r--r--generic/ttk/ttkTreeview.c2
-rw-r--r--generic/ttk/ttkWidget.c2
-rw-r--r--library/bgerror.tcl4
-rw-r--r--library/choosedir.tcl2
-rw-r--r--library/demos/menu.tcl21
-rw-r--r--library/demos/square4
-rw-r--r--library/demos/systray.tcl2
-rw-r--r--library/fontchooser.tcl4
-rw-r--r--library/iconlist.tcl2
-rw-r--r--library/listbox.tcl2
-rw-r--r--library/megawidget.tcl2
-rw-r--r--library/menu.tcl2
-rw-r--r--library/text.tcl2
-rw-r--r--library/tk.tcl2
-rw-r--r--library/ttk/notebook.tcl14
-rw-r--r--library/ttk/scale.tcl2
-rw-r--r--library/ttk/spinbox.tcl23
-rw-r--r--macosx/GNUmakefile2
-rw-r--r--macosx/tkMacOSXBitmap.c6
-rw-r--r--macosx/tkMacOSXButton.c12
-rw-r--r--macosx/tkMacOSXClipboard.c6
-rw-r--r--macosx/tkMacOSXColor.c24
-rw-r--r--macosx/tkMacOSXColor.h2
-rw-r--r--macosx/tkMacOSXConfig.c4
-rw-r--r--macosx/tkMacOSXConstants.h2
-rw-r--r--macosx/tkMacOSXCursor.c6
-rw-r--r--macosx/tkMacOSXCursors.h6
-rw-r--r--macosx/tkMacOSXDebug.c4
-rw-r--r--macosx/tkMacOSXDebug.h4
-rw-r--r--macosx/tkMacOSXDefault.h23
-rw-r--r--macosx/tkMacOSXDialog.c8
-rw-r--r--macosx/tkMacOSXDraw.c8
-rw-r--r--macosx/tkMacOSXEmbed.c6
-rw-r--r--macosx/tkMacOSXEntry.c6
-rw-r--r--macosx/tkMacOSXEvent.c6
-rw-r--r--macosx/tkMacOSXFont.c6
-rw-r--r--macosx/tkMacOSXFont.h8
-rw-r--r--macosx/tkMacOSXHLEvents.c10
-rw-r--r--macosx/tkMacOSXImage.c8
-rw-r--r--macosx/tkMacOSXInit.c44
-rw-r--r--macosx/tkMacOSXKeyEvent.c8
-rw-r--r--macosx/tkMacOSXKeyboard.c8
-rw-r--r--macosx/tkMacOSXKeysyms.h10
-rw-r--r--macosx/tkMacOSXMenu.c114
-rw-r--r--macosx/tkMacOSXMenubutton.c10
-rw-r--r--macosx/tkMacOSXMenus.c6
-rw-r--r--macosx/tkMacOSXMouseEvent.c4
-rw-r--r--macosx/tkMacOSXNotify.c8
-rw-r--r--macosx/tkMacOSXPrivate.h6
-rw-r--r--macosx/tkMacOSXRegion.c6
-rw-r--r--macosx/tkMacOSXScale.c8
-rw-r--r--macosx/tkMacOSXScrlbr.c10
-rw-r--r--macosx/tkMacOSXSend.c8
-rw-r--r--macosx/tkMacOSXServices.c6
-rw-r--r--macosx/tkMacOSXSubwindows.c6
-rw-r--r--macosx/tkMacOSXSysTray.c6
-rw-r--r--macosx/tkMacOSXTest.c6
-rw-r--r--macosx/tkMacOSXWindowEvent.c8
-rw-r--r--macosx/tkMacOSXWm.c28
-rw-r--r--macosx/tkMacOSXWm.h4
-rw-r--r--macosx/tkMacOSXXCursors.h6
-rw-r--r--macosx/tkMacOSXXStubs.c8
-rw-r--r--macosx/ttkMacOSXTheme.c46
-rw-r--r--tests/all.tcl4
-rw-r--r--tests/bell.test2
-rw-r--r--tests/bgerror.test2
-rw-r--r--tests/bind.test4
-rw-r--r--tests/bitmap.test2
-rw-r--r--tests/border.test2
-rw-r--r--tests/busy.test2
-rw-r--r--tests/button.test2
-rw-r--r--tests/canvImg.test2
-rw-r--r--tests/canvMoveto.test2
-rw-r--r--tests/canvPs.test2
-rw-r--r--tests/canvRect.test2
-rw-r--r--tests/canvText.test4
-rw-r--r--tests/canvWind.test2
-rw-r--r--tests/choosedir.test2
-rw-r--r--tests/clipboard.test2
-rw-r--r--tests/clrpick.test2
-rw-r--r--tests/cmds.test2
-rw-r--r--tests/color.test2
-rw-r--r--tests/config.test2
-rw-r--r--tests/constraints.tcl2
-rw-r--r--tests/cursor.test2
-rw-r--r--tests/embed.test2
-rw-r--r--tests/entry.test4
-rw-r--r--tests/event.test2
-rw-r--r--tests/filebox.test2
-rw-r--r--tests/focus.test4
-rw-r--r--tests/focusTcl.test2
-rw-r--r--tests/font.test8
-rw-r--r--tests/fontchooser.test2
-rw-r--r--tests/frame.test2
-rw-r--r--tests/geometry.test2
-rw-r--r--tests/get.test2
-rw-r--r--tests/grab.test2
-rw-r--r--tests/grid.test2
-rw-r--r--tests/image.test2
-rw-r--r--tests/imgBmap.test2
-rw-r--r--tests/imgPNG.test2
-rw-r--r--tests/imgPPM.test2
-rw-r--r--tests/imgPhoto.test2
-rw-r--r--tests/imgSVGnano.test54
-rw-r--r--tests/listbox.test2
-rw-r--r--tests/main.test6
-rw-r--r--tests/menu.test2
-rw-r--r--tests/menuDraw.test2
-rw-r--r--tests/menubut.test2
-rw-r--r--tests/message.test2
-rw-r--r--tests/msgbox.test2
-rw-r--r--tests/obj.test2
-rw-r--r--tests/oldpack.test2
-rw-r--r--tests/option.test2
-rw-r--r--tests/pack.test4
-rw-r--r--tests/panedwindow.test2
-rw-r--r--tests/pkgconfig.test4
-rw-r--r--tests/place.test4
-rw-r--r--tests/raise.test2
-rw-r--r--tests/safe.test2
-rw-r--r--tests/safePrimarySelection.test4
-rw-r--r--tests/scale.test2
-rw-r--r--tests/scrollbar.test4
-rw-r--r--tests/select.test4
-rw-r--r--tests/send.test6
-rw-r--r--tests/spinbox.test4
-rw-r--r--tests/text.test2
-rw-r--r--tests/textBTree.test2
-rw-r--r--tests/textDisp.test4
-rw-r--r--tests/textImage.test2
-rw-r--r--tests/textIndex.test2
-rw-r--r--tests/textMark.test2
-rw-r--r--tests/textTag.test4
-rw-r--r--tests/textWind.test4
-rw-r--r--tests/tk.test2
-rw-r--r--tests/ttk/all.tcl4
-rw-r--r--tests/ttk/checkbutton.test2
-rw-r--r--tests/ttk/combobox.test2
-rw-r--r--tests/ttk/entry.test4
-rw-r--r--tests/ttk/image.test2
-rw-r--r--tests/ttk/labelframe.test2
-rw-r--r--tests/ttk/layout.test2
-rw-r--r--tests/ttk/notebook.test2
-rw-r--r--tests/ttk/panedwindow.test2
-rw-r--r--tests/ttk/progressbar.test2
-rw-r--r--tests/ttk/radiobutton.test2
-rw-r--r--tests/ttk/scale.test2
-rw-r--r--tests/ttk/scrollbar.test2
-rw-r--r--tests/ttk/spinbox.test2
-rw-r--r--tests/ttk/treetags.test2
-rw-r--r--tests/ttk/treeview.test2
-rw-r--r--tests/ttk/ttk.test2
-rw-r--r--tests/ttk/validate.test2
-rw-r--r--tests/ttk/vsapi.test2
-rw-r--r--tests/unixButton.test2
-rw-r--r--tests/unixEmbed.test4
-rw-r--r--tests/unixFont.test4
-rw-r--r--tests/unixMenu.test2
-rw-r--r--tests/unixSelect.test2
-rw-r--r--tests/unixWm.test4
-rw-r--r--tests/util.test2
-rw-r--r--tests/visual.test2
-rw-r--r--tests/winButton.test2
-rw-r--r--tests/winClipboard.test4
-rwxr-xr-xtests/winDialog.test19
-rw-r--r--tests/winFont.test2
-rw-r--r--tests/winMenu.test2
-rw-r--r--tests/winSend.test2
-rw-r--r--tests/winWm.test4
-rw-r--r--tests/window.test2
-rw-r--r--tests/winfo.test4
-rw-r--r--tests/wm.test4
-rw-r--r--tests/xmfbox.test2
-rw-r--r--unix/Makefile.in11
-rwxr-xr-xunix/configure25
-rw-r--r--unix/configure.ac2
-rw-r--r--unix/tcl.m420
-rw-r--r--unix/tkAppInit.c6
-rw-r--r--unix/tkUnix.c2
-rw-r--r--unix/tkUnix3d.c2
-rw-r--r--unix/tkUnixButton.c2
-rw-r--r--unix/tkUnixColor.c2
-rw-r--r--unix/tkUnixConfig.c2
-rw-r--r--unix/tkUnixCursor.c2
-rw-r--r--unix/tkUnixDialog.c2
-rw-r--r--unix/tkUnixDraw.c2
-rw-r--r--unix/tkUnixEmbed.c2
-rw-r--r--unix/tkUnixEvent.c2
-rw-r--r--unix/tkUnixFocus.c2
-rw-r--r--unix/tkUnixFont.c2
-rw-r--r--unix/tkUnixInit.c2
-rw-r--r--unix/tkUnixKey.c2
-rw-r--r--unix/tkUnixMenu.c2
-rw-r--r--unix/tkUnixMenubu.c2
-rw-r--r--unix/tkUnixRFont.c2
-rw-r--r--unix/tkUnixScale.c4
-rw-r--r--unix/tkUnixScrlbr.c2
-rw-r--r--unix/tkUnixSelect.c2
-rw-r--r--unix/tkUnixSend.c6
-rwxr-xr-xunix/tkUnixSysNotify.c2
-rw-r--r--unix/tkUnixSysTray.c6
-rw-r--r--unix/tkUnixWm.c4
-rw-r--r--unix/tkUnixXId.c4
-rw-r--r--win/Makefile.in5
-rwxr-xr-xwin/configure12
-rw-r--r--win/makefile.vc6
-rw-r--r--win/nmakehlp.c4
-rw-r--r--win/rc/tk.rc2
-rw-r--r--win/rc/wish.rc2
-rw-r--r--win/rules-ext.vc2
-rw-r--r--win/rules.vc282
-rw-r--r--win/tcl.m415
-rw-r--r--win/tkWin.h2
-rw-r--r--win/tkWin32Dll.c2
-rw-r--r--win/tkWin3d.c2
-rw-r--r--win/tkWinButton.c2
-rw-r--r--win/tkWinClipboard.c4
-rw-r--r--win/tkWinColor.c4
-rw-r--r--win/tkWinConfig.c2
-rw-r--r--win/tkWinCursor.c2
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinDraw.c4
-rw-r--r--win/tkWinEmbed.c2
-rw-r--r--win/tkWinFont.c6
-rw-r--r--win/tkWinIco.c4
-rw-r--r--win/tkWinIco.h4
-rw-r--r--win/tkWinImage.c4
-rw-r--r--win/tkWinInit.c2
-rw-r--r--win/tkWinInt.h2
-rw-r--r--win/tkWinKey.c2
-rw-r--r--win/tkWinMenu.c4
-rw-r--r--win/tkWinPixmap.c2
-rw-r--r--win/tkWinPointer.c4
-rw-r--r--win/tkWinRegion.c2
-rw-r--r--win/tkWinScrlbr.c2
-rw-r--r--win/tkWinSend.c4
-rw-r--r--win/tkWinSendCom.c2
-rw-r--r--win/tkWinSendCom.h2
-rw-r--r--win/tkWinSysTray.c14
-rw-r--r--win/tkWinTest.c6
-rw-r--r--win/tkWinWindow.c2
-rw-r--r--win/tkWinWm.c4
-rw-r--r--win/tkWinX.c6
-rw-r--r--win/ttkWinTheme.c2
-rw-r--r--win/ttkWinXPTheme.c6
-rw-r--r--win/winMain.c24
-rw-r--r--xlib/xcolors.c4
398 files changed, 2028 insertions, 1130 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
new file mode 100644
index 0000000..927a78b
--- /dev/null
+++ b/.github/workflows/linux-build.yml
@@ -0,0 +1,154 @@
+name: Linux
+on: [push]
+defaults:
+ run:
+ shell: bash
+ working-directory: tk/unix
+env:
+ ERROR_ON_FAILURES: 1
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ compiler:
+ - "gcc"
+ - "g++"
+ - "clang"
+ cfgopt:
+ - ""
+ - "--enable-symbols"
+ - "--disable-shared"
+ - "--disable-xft"
+ - "--disable-xss"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Checkout Tcl
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-6-branch
+ path: tcl
+ - name: Setup Environment (compiler=${{ matrix.compiler }})
+ run: |
+ sudo apt-get install tcl8.6-dev libxss-dev
+ mkdir "$HOME/install dir"
+ touch tk/doc/man.macros tk/generic/tkStubInit.c
+ echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
+ echo "CC=$COMPILER" >> $GITHUB_ENV
+ echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV
+ echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
+ working-directory: "."
+ env:
+ CFGOPT: ${{ matrix.cfgopt }}
+ COMPILER: ${{ matrix.compiler }}
+ OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }}
+ - name: Configure (opts=${{ matrix.cfgopt }})
+ run: |
+ ./configure $CFGOPT "--prefix=$HOME/install dir" || {
+ cat config.log
+ echo "::error::Failure during Configure"
+ exit 1
+ }
+ - name: Build
+ run: |
+ make binaries libraries || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ - name: Build Test Harness
+ run: |
+ make tktest || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ - name: Test-Drive Installation
+ run: |
+ make install || {
+ echo "::error::Failure during Install"
+ exit 1
+ }
+ - name: Create Distribution Package
+ run: |
+ make dist || {
+ echo "::error::Failure during Distribute"
+ exit 1
+ }
+ - name: Convert Documentation to HTML
+ run: |
+ make html-tk TOOL_DIR=$TOOL_DIR || {
+ echo "::error::Failure during Distribute"
+ exit 1
+ }
+ - name: Discover Version ID
+ if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }}
+ run: |
+ cd /tmp/dist
+ echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV
+ - name: Upload Source Distribution
+ if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tk ${{ env.VERSION }} Source distribution (unofficial)
+ path: |
+ /tmp/dist/tk*
+ !/tmp/dist/tk*/html/**
+ - name: Upload Documentation Distribution
+ if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tk ${{ env.VERSION }} HTML documentation (unofficial)
+ path: /tmp/dist/tk*/html
+ test:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ compiler:
+ - "gcc"
+ cfgopt:
+ - ""
+ - "--enable-symbols"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Setup Environment (compiler=${{ matrix.compiler }})
+ run: |
+ sudo apt-get install tcl8.6-dev libxss-dev xvfb
+ mkdir "$HOME/install dir"
+ touch tk/doc/man.macros tk/generic/tkStubInit.c
+ echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV
+ echo "CC=$COMPILER" >> $GITHUB_ENV
+ working-directory: "."
+ env:
+ CFGOPT: ${{ matrix.cfgopt }}
+ COMPILER: ${{ matrix.compiler }}
+ - name: Configure ${{ matrix.cfgopt }}
+ run: |
+ ./configure $CFGOPT "--prefix=$HOME/install dir" || {
+ cat config.log
+ echo "::error::Failure during Configure"
+ exit 1
+ }
+ - name: Build
+ run: |
+ make binaries libraries tktest || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ - name: Run Tests
+ run: |
+ xvfb-run --auto-servernum make test-classic | tee out-classic.txt
+ xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt
+ grep -q "Failed 0" out-classic.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ grep -q "Failed 0" out-ttk.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
new file mode 100644
index 0000000..874d529
--- /dev/null
+++ b/.github/workflows/mac-build.yml
@@ -0,0 +1,152 @@
+name: macOS
+on: [push]
+env:
+ ERROR_ON_FAILURES: 1
+jobs:
+ xcode:
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ working-directory: tk/macosx
+ steps:
+ - name: Check out Tk
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Check out Tcl
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-6-branch
+ path: tcl
+ - name: Prepare checked out repositories
+ run: |
+ touch tk/generic/tkStubInit.c
+ mkdir build
+ echo "BUILD_DIR=`cd build && pwd`" >> $GITHUB_ENV
+ echo "DESTDIR=`cd build && pwd`" >> $GITHUB_ENV
+ working-directory: .
+ - name: Build Tcl
+ run: |
+ make all
+ working-directory: tcl/macosx
+ - name: Build
+ run: |
+ make all install || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ clang:
+ runs-on: macos-11.0
+ strategy:
+ matrix:
+ symbols:
+ - 'no'
+ - 'mem'
+ options:
+ - '--enable-aqua'
+ - '--disable-aqua'
+ defaults:
+ run:
+ shell: bash
+ working-directory: tk/unix
+ steps:
+ - name: Check out Tk
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Check out Tcl
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-6-branch
+ path: tcl
+ - name: Prepare checked out repositories
+ run: |
+ touch tkStubInit.c
+ mkdir "$HOME/install dir"
+ echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV
+ working-directory: tk/generic
+ env:
+ SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }}
+ - name: Add X11 (if required)
+ if: ${{ env.USE_XVFB }}
+ # This involves black magic
+ run: |
+ brew cask install xquartz
+ sudo /opt/X11/lib/X11/xinit/privileged_startx.d/10-tmpdirs || true
+ working-directory: .
+ - name: Build Tcl
+ # Note that macOS is always a 64 bit platform
+ run: |
+ ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || {
+ cat config.log
+ echo "::error::Failure during Tcl Configure"
+ exit 1
+ }
+ make all || {
+ echo "::error::Failure during Tcl Build"
+ exit 1
+ }
+ make install || {
+ echo "::error::Failure during Tcl Install"
+ exit 1
+ }
+ working-directory: tcl/unix
+ env:
+ CFGOPT: --enable-symbols=${{ matrix.symbols }}
+ - name: Configure (symbols=${{ matrix.symbols }} ${{matrix.options }})
+ # Note that macOS is always a 64 bit platform
+ run: |
+ ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || {
+ cat config.log
+ echo "::error::Failure during Configure"
+ exit 1
+ }
+ env:
+ CFGOPT: --enable-symbols=${{ matrix.symbols }} ${{matrix.options }}
+ - name: Build
+ run: |
+ make all tktest || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ - name: Run Tests
+ run: |
+ if [ $USE_XVFB == true ]; then
+ function runXvfb {
+ PATH=$PATH:/opt/X11/bin
+ Xvfb $1 &
+ XVFB_PID=$!
+ echo Launched Xvfb $1 as process $XVFB_PID >&2
+ trap "echo killing process $XVFB_PID... >&2; kill $XVFB_PID" 0
+ export DISPLAY=$1
+ sleep 2
+ }
+ else
+ function runXvfb {
+ : do nothing
+ }
+ fi
+ ( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ ( runXvfb :0; make test-ttk; exit $? ) | tee out-ttk.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ cat out-classic.txt out-ttk.txt | grep -q "Failed[[:space:]][[:space:]]*[1-9]" && {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ env:
+ MAC_CI: 1
+ - name: Carry out trial installation
+ run: |
+ make install || {
+ cat config.log
+ echo "::error::Failure during Install"
+ exit 1
+ }
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
new file mode 100644
index 0000000..c0a221e
--- /dev/null
+++ b/.github/workflows/onefiledist.yml
@@ -0,0 +1,229 @@
+name: Build Binaries
+on: [push]
+jobs:
+ linux:
+ name: Linux
+ runs-on: ubuntu-16.04
+ defaults:
+ run:
+ shell: bash
+ env:
+ CC: gcc
+ CFGOPT: --disable-symbols --disable-shared
+ steps:
+ - name: Checkout Tk
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Checkout Tcl 8.7
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-branch
+ path: tcl
+ - name: Setup Environment
+ run: |
+ sudo apt-get install libxss-dev
+ mkdir -p install/1dist.vfs
+ touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
+ touch tk/generic/tkStubInit.c
+ echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV
+ echo "VER_PATH=$(cd tcl/tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ working-directory: "."
+ - name: Configure Tcl
+ run: |
+ ./configure $CFGOPT --enable-zipfs --prefix=$INST_DIR
+ working-directory: tcl/unix
+ - name: Build & Install Tcl
+ run: |
+ make binaries libraries tclzipfile install
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ working-directory: tcl/unix
+ - name: Configure Tk
+ run: |
+ ./configure $CFGOPT --with-tcl=$INST_DIR/lib --prefix=$INST_DIR
+ working-directory: tk/unix
+ - name: Build & Install Tk
+ run: |
+ make binaries libraries install
+ working-directory: tk/unix
+ # TODO: need the Tk version separately for distro naming below
+ - name: Pack Tk Library Files into Library Zip
+ run: |
+ unzip ../lib/libtcl*.zip
+ cp -a ../lib/tk[0-9]* .
+ zip -r ../1dist.zip .
+ working-directory: ${{ env.INST_DIR }}/1dist.vfs
+ - name: Package
+ run: |
+ cat ../tk/unix/wish 1dist.zip >> ${BUILD_NAME}
+ chmod +x ${BUILD_NAME}
+ tar -cf ${BUILD_NAME}.tar ${BUILD_NAME}
+ working-directory: ${{ env.INST_DIR }}
+ env:
+ BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_unofficial
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Wish ${{ env.TCL_PATCHLEVEL }} Linux single-file build (unofficial)
+ path: ${{ env.INST_DIR }}/*.tar
+ - name: Describe Installation Zip Contents
+ if: ${{ always() }}
+ run: |
+ unzip -l 1dist.zip || true
+ working-directory: ${{ env.INST_DIR }}
+ macos:
+ name: macOS
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ env:
+ CC: gcc
+ CFGOPT: --disable-symbols --disable-shared --enable-64bit
+ steps:
+ - name: Checkout Tk
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Checkout Tcl 8.7
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-branch
+ path: tcl
+ - name: Checkout create-dmg
+ uses: actions/checkout@v2
+ with:
+ repository: create-dmg/create-dmg
+ ref: v1.0.8
+ path: create-dmg
+ - name: Setup Environment
+ run: |
+ mkdir -p install/1dist.vfs install/contents
+ touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
+ touch tk/generic/tkStubInit.c
+ echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV
+ echo "VER_PATH=$(cd tcl/tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV
+ working-directory: "."
+ - name: Configure Tcl
+ run: |
+ ./configure $CFGOPT --enable-zipfs --prefix=$INST_DIR
+ working-directory: tcl/unix
+ - name: Build & Install Tcl
+ run: |
+ make binaries libraries tclzipfile install
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ working-directory: tcl/unix
+ - name: Configure Tk
+ run: |
+ ./configure $CFGOPT --with-tcl=$INST_DIR/lib --prefix=$INST_DIR \
+ --enable-aqua
+ working-directory: tk/unix
+ - name: Build & Install Tk
+ run: |
+ make binaries libraries install
+ working-directory: tk/unix
+ # TODO: need the Tk version separately for distro naming below
+ - name: Pack Tk Library Files into Library Zip
+ run: |
+ unzip ../lib/libtcl*.zip
+ cp -a ../lib/tk[0-9]* .
+ zip -r ../1dist.zip .
+ working-directory: ${{ env.INST_DIR }}/1dist.vfs
+ - name: Package
+ run: |
+ cat ../tk/unix/wish 1dist.zip >> contents/${BUILD_NAME}
+ chmod +x contents/${BUILD_NAME}
+ cat > contents/README.txt <<EOF
+ This is a single-file executable developer preview of Tcl/Tk $TCL_PATCHLEVEL
+
+ It is not intended as an official release at all, so it is unsigned and unnotarized.
+ Use strictly at your own risk.
+
+ To run it, you need to copy the executable out and run:
+ xattr -d com.apple.quarantine ${BUILD_NAME}
+ to mark the executable as runnable on your machine.
+ EOF
+ $CREATE_DMG \
+ --volname "TclTk $TCL_PATCHLEVEL (unofficial)" \
+ --window-pos 200 120 \
+ --window-size 800 400 \
+ "TclTk-$TCL_PATCHLEVEL-(unofficial).dmg" \
+ "contents/"
+ working-directory: ${{ env.INST_DIR }}
+ env:
+ BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_unofficial
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Wish ${{ env.TCL_PATCHLEVEL }} macOS single-file build (unofficial)
+ path: ${{ env.INST_DIR }}/*.dmg
+ win:
+ name: Windows
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+ env:
+ CC: gcc
+ CFGOPT: --disable-symbols --disable-shared
+ steps:
+ - name: Checkout Tk
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Checkout Tcl 8.7
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-branch
+ path: tcl
+ - name: Setup Environment
+ run: |
+ mkdir -p install/1dist
+ mkdir -p install/combined
+ touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c
+ touch tk/generic/tkStubInit.c
+ echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV
+ echo "VER_PATH=$(cd tcl/tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ working-directory: "."
+ - name: Configure Tcl
+ run: |
+ ./configure $CFGOPT --enable-zipfs --prefix=$INST_DIR
+ working-directory: tcl/win
+ - name: Build & Install Tcl
+ run: |
+ make binaries libraries tclzipfile install
+ echo "ZIP_BIN=`pwd`/minizip.exe" >> $GITHUB_ENV
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ $INST_DIR/bin/tclsh* $VER_PATH $GITHUB_ENV
+ working-directory: tcl/win
+ - name: Configure Tk
+ run: |
+ ./configure $CFGOPT --with-tcl=$INST_DIR/lib --prefix=$INST_DIR
+ working-directory: tk/win
+ - name: Build & Install Tk
+ run: |
+ make all install
+ echo "TK_BIN=`pwd`/`echo wish*.exe`" >> $GITHUB_ENV
+ working-directory: tk/win
+ # TODO: need the Tk version separately for distro naming below
+ - name: Pack Tk Library Files into Library Zip
+ run: |
+ unzip $TCL_ZIP
+ cp -R ../lib/tk[0-9]* .
+ $ZIP_BIN -o -r ../1dist.zip *
+ working-directory: install/1dist
+ - name: Package
+ run: |
+ cat ${TK_BIN} 1dist.zip > combined/${BUILD_NAME}.exe
+ working-directory: install
+ env:
+ BUILD_NAME: wish${{ env.TCL_PATCHLEVEL }}_unofficial
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Wish ${{ env.TCL_PATCHLEVEL }} Windows single-file build (unofficial)
+ path: install/combined/wish${{ env.TCL_PATCHLEVEL }}_unofficial.exe
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
new file mode 100644
index 0000000..3bfd130
--- /dev/null
+++ b/.github/workflows/win-build.yml
@@ -0,0 +1,158 @@
+name: Windows
+on: [push]
+env:
+ ERROR_ON_FAILURES: 1
+jobs:
+ msvc:
+ runs-on: windows-2019
+ defaults:
+ run:
+ shell: powershell
+ working-directory: tk/win
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ path: tk
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-6-branch
+ path: tcl
+ - name: Make Install Location
+ working-directory: tcl
+ run: |
+ echo "TCLDIR=`pwd`" >> $GITHUB_ENV
+ cd ..
+ mkdir install
+ cd install
+ echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV
+ - name: Init MSVC
+ uses: ilammy/msvc-dev-cmd@v1
+ - name: Build Tcl
+ run: |
+ &nmake -f makefile.vc release install
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ working-directory: tcl/win
+ - name: Build
+ run: |
+ &nmake -f makefile.vc all
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Build Test Harness
+ run: |
+ &nmake -f makefile.vc tktest
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Run Tests
+ run: |
+ nmake -f makefile.vc test-classic | tee out-classic.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ nmake -f makefile.vc test-ttk | tee out-ttk.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ grep -q "Failed 0" out-classic.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ grep -q "Failed 0" out-ttk.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ env:
+ CI_BUILD_WITH_MSVC: 1
+ shell: bash
+ - name: Build Help
+ run: |
+ &nmake -f makefile.vc htmlhelp
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Install
+ run: |
+ &nmake -f makefile.vc install
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ gcc:
+ runs-on: windows-2019
+ defaults:
+ run:
+ shell: bash
+ working-directory: win
+ strategy:
+ matrix:
+ symbols:
+ - "no"
+ - "mem"
+ - "all"
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ repository: tcltk/tcl
+ ref: core-8-6-branch
+ path: tcl
+ - name: Install MSYS2, Make
+ run: choco install -y msys2 make
+ - name: Prepare
+ run: |
+ touch tkStubInit.c
+ touch "${HOME}/forWinDialog-5.12.7"
+ mkdir "${HOME}/install_dir"
+ echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV
+ working-directory: generic
+ - name: Configure and Build Tcl
+ run: |
+ ./configure ${CFGOPT} "--prefix=$INSTALL_DIR" || {
+ cat config.log
+ echo "::warning::Failure during Tcl Configure"
+ exit 1
+ }
+ make all install || {
+ echo "::warning::Failure during Tcl Build"
+ exit 1
+ }
+ echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
+ env:
+ CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }}
+ working-directory: tcl/win
+ - name: Configure (symbols=${{ matrix.symbols }})
+ run: |
+ ./configure ${CFGOPT} "--prefix=$HOME/INSTALL_DIR" "--with-tcl=$TCL_CONFIG_PATH" || {
+ cat config.log
+ echo "::error::Failure during Configure"
+ exit 1
+ }
+ env:
+ CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }}
+ - name: Build
+ run: |
+ make all tktest || {
+ echo "::error::Failure during Build"
+ exit 1
+ }
+ - name: Run Tests
+ run: |
+ make test-classic | tee out-classic.txt
+ make test-ttk | tee out-ttk.txt
+ grep -q "Failed 0" out-classic.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
+ grep -q "Failed 0" out-ttk.txt || {
+ echo "::error::Failure during Test"
+ exit 1
+ }
diff --git a/.travis.yml b/.travis.yml
index f8cd9e2..1767ecb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,6 +15,7 @@ addons:
- libx11-dev
- libnotify-dev
- libglib2.0-dev
+ - libxss-dev
- xvfb
homebrew:
packages:
diff --git a/README.md b/README.md
index 4787aaf..2c68e9d 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,15 @@ This is the **Tk 8.7a4** source distribution.
You can get any source release of Tk from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
+8.6 (production release, daily build)
+[![Build Status](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch)
+[![Build Status](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch)
+<br>
+8.7 (in development, daily build))
+[![Build Status](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Amain)
+[![Build Status](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Amain)
+[![Build Status](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Amain)
## <a id="intro">1.</a> Introduction
@@ -18,13 +27,13 @@ historical record of all changes to Tk.
Tk is maintained, enhanced, and distributed freely by the Tcl community.
Source code development and tracking of bug reports and feature requests
-takes place at [core.tcl-lang.org](https://core.tcl-lang.org/).
+take place at [core.tcl-lang.org](https://core.tcl-lang.org/).
Tcl/Tk release and mailing list services are [hosted by
SourceForge](https://sourceforge.net/projects/tcl/)
with the Tcl Developer Xchange hosted at
[www.tcl-lang.org](https://www.tcl-lang.org).
-Tk is a freely available open source package. You can do virtually
+Tk is a freely available open-source package. You can do virtually
anything you like with it, such as modifying it, redistributing it,
and selling it either in whole or in part. See the file
`license.terms` for complete information.
diff --git a/doc/AddOption.3 b/doc/AddOption.3
index 2368f09..c1c116a 100644
--- a/doc/AddOption.3
+++ b/doc/AddOption.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tk_AddOption 3 "" Tk "Tk Library Procedures"
diff --git a/doc/GetHINSTANCE.3 b/doc/GetHINSTANCE.3
index 980b374..8f82ee9 100644
--- a/doc/GetHINSTANCE.3
+++ b/doc/GetHINSTANCE.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures"
diff --git a/doc/GetHWND.3 b/doc/GetHWND.3
index 15d2ff0..1e8cdc9 100644
--- a/doc/GetHWND.3
+++ b/doc/GetHWND.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH HWND 3 8.0 Tk "Tk Library Procedures"
diff --git a/doc/Grab.3 b/doc/Grab.3
index 2741220..4966edb 100644
--- a/doc/Grab.3
+++ b/doc/Grab.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tk_Grab 3 "" Tk "Tk Library Procedures"
diff --git a/doc/HWNDToWindow.3 b/doc/HWNDToWindow.3
index a2e5a6c..c5dafdd 100644
--- a/doc/HWNDToWindow.3
+++ b/doc/HWNDToWindow.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures"
diff --git a/doc/Inactive.3 b/doc/Inactive.3
index 42ae5b8..ea8d735 100644
--- a/doc/Inactive.3
+++ b/doc/Inactive.3
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures"
diff --git a/doc/bind.n b/doc/bind.n
index 9210357..fc1427e 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1990 The Regents of the University of California.
'\" Copyright (c) 1994-1996 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.
diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n
index e441d78..a5b30f5 100644
--- a/doc/chooseDirectory.n
+++ b/doc/chooseDirectory.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH tk_chooseDirectory n 8.3 Tk "Tk Built-In Commands"
diff --git a/doc/colors.n b/doc/colors.n
index 9d8d653..9c64b1d 100644
--- a/doc/colors.n
+++ b/doc/colors.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" Copyright (c) 2003 ActiveState Corporation.
'\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
'\" Copyright (c) 2008 Donal K. Fellows
diff --git a/doc/console.n b/doc/console.n
index 40b7426..0a9a794 100644
--- a/doc/console.n
+++ b/doc/console.n
@@ -23,7 +23,7 @@ the \fBconsole\fR command. The behaviour of the console window is
defined mainly through the contents of the \fIconsole.tcl\fR file in
the Tk library. Except for TkAqua, this command is not available when
Tk is loaded into a tclsh interpreter with
-.QW "\fBpackage require Tk\fR" ,
+.QW "\fBpackage require tk\fR" ,
as a conventional terminal is expected to be present in that case.
In TkAqua, this command is disabled when there is a startup script
and stdin is \fB/dev/null\fR (as is the case e.g. when a bundled application
diff --git a/doc/cursors.n b/doc/cursors.n
index a728755..bf8a05e 100644
--- a/doc/cursors.n
+++ b/doc/cursors.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
'\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
diff --git a/doc/keysyms.n b/doc/keysyms.n
index 8d0eae9..a7447db 100644
--- a/doc/keysyms.n
+++ b/doc/keysyms.n
@@ -1,5 +1,5 @@
'\"
-'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
.TH keysyms n 8.3 Tk "Tk Built-In Commands"
@@ -119,101 +119,103 @@ braceleft 123 0x7B
braceright 125 0x7D
~ (asciitilde) 126 0x7E
nobreakspace 160 0xA0
-\[r!] (exclamdown) 161 0xA1
-\[ct] (cent) 162 0xA2
-\[Po] (sterling) 163 0xA3
-\[Cs] (currency) 164 0xA4
-\[Ye] (yen) 165 0xA5
-\[bb] (brokenbar) 166 0xA6
-\[sc] (section) 167 0xA7
-\[ad] (diaeresis) 168 0xA8
-\[co] (copyright) 169 0xA9
-\[Of] (ordfeminine) 170 0xAA
-\[Fo] (guillemotleft) 171 0xAB
-\[no] (notsign) 172 0xAC
+\(r! (exclamdown) 161 0xA1
+\(ct (cent) 162 0xA2
+\(Po (sterling) 163 0xA3
+\(Cs (currency) 164 0xA4
+\(Ye (yen) 165 0xA5
+\(bb (brokenbar) 166 0xA6
+\(sc (section) 167 0xA7
+\(ad (diaeresis) 168 0xA8
+\(co (copyright) 169 0xA9
+\(Of (ordfeminine) 170 0xAA
+\(Fo (guillemotleft) 171 0xAB
+\(no (notsign) 172 0xAC
hyphen 173 0xAD
-\[rg] (registered) 174 0xAE
-\[a-] (macron) 175 0xAF
-\[de] (degree) 176 0xB0
-\[+-] (plusminus) 177 0xB1
-[S2] (twosuperior) 178 0xB2
-\[S3] (threesuperior) 179 0xB3
-\[aa] (acute) 180 0xB4
-\[mc] (mu) 181 0xB5
-\[ps] (paragraph) 182 0xB6
-\[pc] (periodcentered) 183 0xB7
-\[ac] (cedilla) 184 0xB8
-\[S1] (onesuperior) 185 0xB9
-\[Om] (masculine) 186 0xBA
-\[Fc] (guillemotright) 187 0xBB
-\[14] (onequarter) 188 0xBC
-\[12] (onehalf) 189 0xBD
-\[34] (threequarters) 190 0xBE
-\[r?] (questiondown) 191 0xBF
-\[`A] (Agrave) 192 0xC0
-\['A] (Aacute) 193 0xC1
-\[^A] (Acircumflex) 194 0xC2
-\[~A] (Atilde) 195 0xC3
-\[:A] (Adiaeresis) 196 0xC4
-\[oA] (Aring) 197 0xC5
-\[AE] (AE) 198 0xC6
-\[,C] (Ccedilla) 199 0xC7
-\[`E] (Egrave) 200 0xC8
-\['E] (Eacute) 201 0xC9
-\[^E] (Ecircumflex) 202 0xCA
-\[:E] (Ediaeresis) 203 0xCB
-\[`I] (Igrave) 204 0xCC
-\['I] (Iacute) 205 0xCD
-\[^I] (Icircumflex) 206 0xCE
-\[:I] (Idiaeresis) 207 0xCF
-\[-D] (ETH) 208 0xD0
-\[~N] (Ntilde) 209 0xD1
-\[`O] (Ograve) 210 0xD2
-\['O] (Oacute) 211 0xD3
-\[^O] (Ocircumflex) 212 0xD4
-\[~O] (Otilde) 213 0xD5
-\[:O] (Odiaeresis) 214 0xD6
-\[mu] (multiply) 215 0xD7
-\[/O] (Oslash) 216 0xD8
-\[`U] (Ugrave) 217 0xD9
-\['U] (Uacute) 218 0xDA
-\[^U] (Ucircumflex) 219 0xDB
-\[:U] (Udiaeresis) 220 0xDC
-\['Y] (Yacute) 221 0xDD
-\[TP] (THORN) 222 0xDE
-\[ss] (ssharp) 223 0xDF
-\[`a] (agrave) 224 0xE0
-\['a] (aacute) 225 0xE1
-\[^a] (acircumflex) 226 0xE2
-\[~a] (atilde) 227 0xE3
-\[:a] (adiaeresis) 228 0xE4
-\[oa] (aring) 229 0xE5
-\[ae] (ae) 230 0xE6
-\[,c] (ccedilla) 231 0xE7
-\[`e] (egrave) 232 0xE8
-\['e] (eacute) 233 0xE9
-\[^e] (ecircumflex) 234 0xEA
-\[:e] (ediaeresis) 235 0xEB
-\[`i] (igrave) 236 0xEC
-\['i] (iacute) 237 0xED
-\[^i] (icircumflex) 238 0xEE
-\[:i] (idiaeresis) 239 0xEF
-\[Sd] (eth) 240 0xF0
-\[~n] (ntilde) 241 0xF1
-\[`o] (ograve) 242 0xF2
-\['o] (oacute) 243 0xF3
-\[^o] (ocircumflex) 244 0xF4
-\[~o] (otilde) 245 0xF5
-\[:o] (odiaeresis) 246 0xF6
-\[di] (division) 247 0xF7
-\[/o] (oslash) 248 0xF8
-\[`u] (ugrave) 249 0xF9
-\['u] (uacute) 250 0xFA
-\[^u] (ucircumflex) 251 0xFB
-\[:u] (udiaeresis) 252 0xFC
-\['y] (yacute) 253 0xFD
-\[Tp] (thorn) 254 0xFE
-\[:y] (ydiaeresis) 255 0xFF
+\(rg (registered) 174 0xAE
+\(a- (macron) 175 0xAF
+\(de (degree) 176 0xB0
+\(+- (plusminus) 177 0xB1
+\(S2 (twosuperior) 178 0xB2
+\(S3 (threesuperior) 179 0xB3
+\(aa (acute) 180 0xB4
+\(mc (mu) 181 0xB5
+\(ps (paragraph) 182 0xB6
+\(pc (periodcentered) 183 0xB7
+\(ac (cedilla) 184 0xB8
+\(S1 (onesuperior) 185 0xB9
+\(Om (masculine) 186 0xBA
+\(Fc (guillemotright) 187 0xBB
+\(14 (onequarter) 188 0xBC
+\(12 (onehalf) 189 0xBD
+\(34 (threequarters) 190 0xBE
+\(r? (questiondown) 191 0xBF
+\(`A (Agrave) 192 0xC0
+\('A (Aacute) 193 0xC1
+\(^A (Acircumflex) 194 0xC2
+\(~A (Atilde) 195 0xC3
+\(:A (Adiaeresis) 196 0xC4
+\(oA (Aring) 197 0xC5
+\(AE (AE) 198 0xC6
+\(,C (Ccedilla) 199 0xC7
+\(`E (Egrave) 200 0xC8
+\('E (Eacute) 201 0xC9
+\(^E (Ecircumflex) 202 0xCA
+\(:E (Ediaeresis) 203 0xCB
+\(`I (Igrave) 204 0xCC
+\('I (Iacute) 205 0xCD
+\(^I (Icircumflex) 206 0xCE
+\(:I (Idiaeresis) 207 0xCF
+\(-D (ETH) 208 0xD0
+\(~N (Ntilde) 209 0xD1
+\(`O (Ograve) 210 0xD2
+\('O (Oacute) 211 0xD3
+\(^O (Ocircumflex) 212 0xD4
+\(~O (Otilde) 213 0xD5
+\(:O (Odiaeresis) 214 0xD6
+\(mu (multiply) 215 0xD7
+\(/O (Oslash) 216 0xD8
+\(`U (Ugrave) 217 0xD9
+\('U (Uacute) 218 0xDA
+\(^U (Ucircumflex) 219 0xDB
+\(:U (Udiaeresis) 220 0xDC
+\('Y (Yacute) 221 0xDD
+\(TP (THORN) 222 0xDE
+\(ss (ssharp) 223 0xDF
+\(`a (agrave) 224 0xE0
+\('a (aacute) 225 0xE1
+\(^a (acircumflex) 226 0xE2
+\(~a (atilde) 227 0xE3
+\(:a (adiaeresis) 228 0xE4
+\(oa (aring) 229 0xE5
+\(ae (ae) 230 0xE6
+\(,c (ccedilla) 231 0xE7
+\(`e (egrave) 232 0xE8
+\('e (eacute) 233 0xE9
+\(^e (ecircumflex) 234 0xEA
+\(:e (ediaeresis) 235 0xEB
+\(`i (igrave) 236 0xEC
+\('i (iacute) 237 0xED
+\(^i (icircumflex) 238 0xEE
+\(:i (idiaeresis) 239 0xEF
+\(Sd (eth) 240 0xF0
+\(~n (ntilde) 241 0xF1
+\(`o (ograve) 242 0xF2
+\('o (oacute) 243 0xF3
+\(^o (ocircumflex) 244 0xF4
+\(~o (otilde) 245 0xF5
+\(:o (odiaeresis) 246 0xF6
+\(di (division) 247 0xF7
+\(/o (oslash) 248 0xF8
+\(`u (ugrave) 249 0xF9
+\('u (uacute) 250 0xFA
+\(^u (ucircumflex) 251 0xFB
+\(:u (udiaeresis) 252 0xFC
+\('y (yacute) 253 0xFD
+\(Tp (thorn) 254 0xFE
+\(:y (ydiaeresis) 255 0xFF
+.CE
+.CS
Aogonek 417 0x1A1
breve 418 0x1A2
Lstroke 419 0x1A3
@@ -223,8 +225,6 @@ Scaron 425 0x1A9
Scedilla 426 0x1AA
Tcaron 427 0x1AB
Zacute 428 0x1AC
-.CE
-.CS
Zcaron 430 0x1AE
Zabovedot 431 0x1AF
aogonek 433 0x1B1
@@ -394,6 +394,8 @@ kana_WA 1244 0x4DC
kana_N 1245 0x4DD
voicedsound 1246 0x4DE
semivoicedsound 1247 0x4DF
+.CE
+.CS
Arabic_comma 1452 0x5AC
Arabic_semicolon 1467 0x5BB
Arabic_question_mark 1471 0x5BF
@@ -429,8 +431,6 @@ Arabic_qaf 1506 0x5E2
Arabic_kaf 1507 0x5E3
Arabic_lam 1508 0x5E4
Arabic_meem 1509 0x5E5
-.CE
-.CS
Arabic_noon 1510 0x5E6
Arabic_ha 1511 0x5E7
Arabic_waw 1512 0x5E8
@@ -610,6 +610,8 @@ Greek_phi 2038 0x7F6
Greek_chi 2039 0x7F7
Greek_psi 2040 0x7F8
Greek_omega 2041 0x7F9
+.CE
+.CS
leftradical 2209 0x8A1
topleftradical 2210 0x8A2
horizconnector 2211 0x8A3
@@ -633,8 +635,6 @@ botvertsummationconnector 2228 0x8B4
toprightsummation 2229 0x8B5
botrightsummation 2230 0x8B6
rightmiddlesummation 2231 0x8B7
-.CE
-.CS
lessthanequal 2236 0x8BC
notequal 2237 0x8BD
greaterthanequal 2238 0x8BE
@@ -816,6 +816,8 @@ hebrew_qoph 3319 0xCF7
hebrew_resh 3320 0xCF8
hebrew_shin 3321 0xCF9
hebrew_taw 3322 0xCFA
+.CE
+.CS
Thai_kokai 3489 0xDA1
Thai_khokhai 3490 0xDA2
Thai_khokhuat 3491 0xDA3
@@ -994,7 +996,9 @@ Korean_Won 3839 0xEFF
OE 5052 0x13BC
oe 5053 0x13BD
Ydiaeresis 5054 0x13BE
-€ (EuroSign) 8364 0x20AC
+\(eu (EuroSign) 8364 0x20AC
+.CE
+.CS
3270_Duplicate 64769 0xFD01
3270_FieldMark 64770 0xFD02
3270_Right2 64771 0xFD03
@@ -1165,6 +1169,8 @@ Pointer_Accelerate 65274 0xFEFA
Pointer_DfltBtnNext 65275 0xFEFB
Pointer_DfltBtnPrev 65276 0xFEFC
Pointer_Drag5 65277 0xFEFD
+.CE
+.CS
BackSpace 65288 0xFF08
Tab 65289 0xFF09
Linefeed 65290 0xFF0A
@@ -1217,8 +1223,6 @@ End 65367 0xFF57
Begin 65368 0xFF58
Win_L 65371 0xFF5B
Win_R 65372 0xFF5C
-.CE
-.CS
App 65373 0xFF5D
Select 65376 0xFF60
Print 65377 0xFF61
@@ -1328,6 +1332,8 @@ braille_dot_8 65528 0xFFF8
braille_dot_9 65529 0xFFF9
braille_dot_10 65530 0xFFFA
Delete 65535 0xFFFF
+.CE
+.CS
SunFA_Grave 268828416 0x1005FF00
SunFA_Circum 268828417 0x1005FF01
SunFA_Tilde 268828418 0x1005FF02
diff --git a/doc/menu.n b/doc/menu.n
index 7568820..0af21b3 100644
--- a/doc/menu.n
+++ b/doc/menu.n
@@ -40,7 +40,7 @@ entry at the top. If so, it will exist as entry 0 of the menu and
the other entries will number starting at 1. The default menu
bindings arrange for the menu to be torn off when the tear-off entry
is invoked.
-This option is ignored under Aqua/Mac OS X, where menus cannot
+This option is ignored under Aqua/MacOS, where menus cannot
be torn off.
.OP \-tearoffcommand tearOffCommand TearOffCommand
If this option has a non-empty value, then it specifies a Tcl command
@@ -54,7 +54,7 @@ and menu \fB.x.y\fR is torn off to
create a new menu \fB.x.tearoff1\fR, then the command
.QW "\fBa b .x.y .x.tearoff1\fR"
will be invoked.
-This option is ignored under Aqua/Mac OS X, where menus cannot
+This option is ignored under Aqua/MacOS, where menus cannot
be torn off.
.OP \-title title Title
The string will be used to title the window created when this menu is
@@ -523,8 +523,8 @@ supported by all entry types.
\fB\-activebackground \fIvalue\fR
.
Specifies a background color to use for displaying this entry when it
-is active.
-If this option is specified as an empty string (the default), then the
+is active. This option is ignored on Aqua/MacOS.
+If it is specified as an empty string (the default), then the
\fB\-activebackground\fR option for the overall menu is used.
If the \fBtk_strictMotif\fR variable has been set to request strict
Motif compliance, then this option is ignored and the \fB\-background\fR
@@ -534,7 +534,7 @@ This option is not available for separator or tear-off entries.
\fB\-activeforeground \fIvalue\fR
.
Specifies a foreground color to use for displaying this entry when it
-is active.
+is active. This option is ignored on Aqua/macOS.
If this option is specified as an empty string (the default), then the
\fB\-activeforeground\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
@@ -552,7 +552,8 @@ for separator or tear-off entries.
.
Specifies a background color to use for displaying this entry when it
is in the normal state (neither active nor disabled).
-If this option is specified as an empty string (the default), then the
+This option is ignored on Aqua/macOS.
+If it is specified as an empty string (the default), then the
\fB\-background\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
.TP
@@ -573,7 +574,7 @@ This option is not available for separator or tear-off entries.
When this option is zero, the entry appears below the previous entry. When
this option is one, the entry appears at the top of a new column in the
menu.
-This option is ignored on Aqua/Mac OS X, where menus are always a single
+This option is ignored on Aqua/macOS, where menus are always a single
column.
.TP
\fB\-command \fIvalue\fR
@@ -603,7 +604,8 @@ This option is not available for separator or tear-off entries.
.
Specifies a foreground color to use for displaying this entry when it
is in the normal state (neither active nor disabled).
-If this option is specified as an empty string (the default), then the
+This option is ignored on Aqua/macOS.
+If it is specified as an empty string (the default), then the
\fB\-foreground\fR option for the overall menu is used.
This option is not available for separator or tear-off entries.
.TP
diff --git a/doc/tkvars.n b/doc/tkvars.n
index f872d1f..8a0b11d 100644
--- a/doc/tkvars.n
+++ b/doc/tkvars.n
@@ -50,7 +50,7 @@ it uniquely identifies an official version of Tk.
.RS
.PP
This value is normally the same as the result of
-.QW "\fBpackage require\fR \fBTk\fR" .
+.QW "\fBpackage require\fR \fBtk\fR" .
.RE
.TP
\fBtk_strictMotif\fR
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.
*/
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 526d791..b5c28c4 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -6,8 +6,8 @@
# trace (like save it to a log). This is adapted from work done by
# Donal K. Fellows.
#
-# Copyright © 1998-2000 by Ajuba Solutions.
-# Copyright © 2007 by ActiveState Software Inc.
+# Copyright © 1998-2000 Ajuba Solutions.
+# Copyright © 2007 ActiveState Software Inc.
# Copyright © 2007 Daniel A. Steffen <das@users.sourceforge.net>
# Copyright © 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
diff --git a/library/choosedir.tcl b/library/choosedir.tcl
index ef90468..6b4f15e 100644
--- a/library/choosedir.tcl
+++ b/library/choosedir.tcl
@@ -2,7 +2,7 @@
#
# Choose directory dialog implementation for Unix/Mac.
#
-# Copyright © 1998-2000 by Scriptics Corporation.
+# Copyright © 1998-2000 Scriptics Corporation.
# All rights reserved.
# Make sure the tk::dialog namespace, in which all dialogs should live, exists
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl
index a76bd54..fbb0069 100644
--- a/library/demos/menu.tcl
+++ b/library/demos/menu.tcl
@@ -151,9 +151,24 @@ $m entryconfigure "Does almost nothing also" -image lilearth -compound left \
set m $w.menu.colors
$w.menu add cascade -label "Colors" -menu $m -underline 1
menu $m -tearoff 1
-foreach i {red orange yellow green blue} {
- $m add command -label $i -background $i -command [list \
- puts "You invoked \"$i\"" ]
+if {[tk windowingsystem] eq "aqua"} {
+ # Aqua ignores the -background and -foreground options, but a compound
+ # button can be used for selecting colors.
+ foreach i {red orange yellow green blue} {
+ image create photo image_$i -height 16 -width 16
+ image_$i put black -to 0 0 16 1
+ image_$i put black -to 0 1 1 16
+ image_$i put black -to 0 15 16 16
+ image_$i put black -to 15 1 16 16
+ image_$i put $i -to 1 1 15 15
+ $m add command -label $i -image image_$i -compound left -command [list \
+ puts "You invoked \"$i\"" ]
+ }
+} else {
+ foreach i {red orange yellow green blue} {
+ $m add command -label $i -background $i -command [list \
+ puts "You invoked \"$i\"" ]
+ }
}
$w configure -menu $w.menu
diff --git a/library/demos/square b/library/demos/square
index 9f200ba..ee6dd31 100644
--- a/library/demos/square
+++ b/library/demos/square
@@ -11,8 +11,8 @@ exec wish "$0" ${1+"$@"}
# Button-1 press/drag: moves square to mouse
# "a": toggle size animation on/off
-package require Tk ;# We use Tk generally, and...
-package require Tktest ;# ... we use the square widget too.
+package require tk ;# We use Tk generally, and...
+package require tk::test ;# ... we use the square widget too.
square .s
pack .s -expand yes -fill both
diff --git a/library/demos/systray.tcl b/library/demos/systray.tcl
index a5dc79e..05315bb 100644
--- a/library/demos/systray.tcl
+++ b/library/demos/systray.tcl
@@ -1,7 +1,7 @@
# systray.tcl --
#
# This demonstration script showcases the tk systray and tk sysnotify commands.
-#
+#
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl
index 9d49c57..a9a8f51 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -2,8 +2,8 @@
#
# A themeable Tk font selection dialog. See TIP #324.
#
-# Copyright (C) 2008 Keith Vetter
-# Copyright (C) 2008 Pat Thoyts <patthoyts@users.sourceforge.net>
+# Copyright © 2008 Keith Vetter
+# Copyright © 2008 Pat Thoyts <patthoyts@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/library/iconlist.tcl b/library/iconlist.tcl
index 0dddebc..fb372a3 100644
--- a/library/iconlist.tcl
+++ b/library/iconlist.tcl
@@ -26,7 +26,7 @@
# <path> selection includes <item>
# <path> selection set <first> ?<last>?
-package require Tk
+package require tk
::tk::Megawidget create ::tk::IconList ::tk::FocusableWidget {
variable w canvas sbar accel accelCB fill font index \
diff --git a/library/listbox.tcl b/library/listbox.tcl
index 9038890..e92a30d 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -5,7 +5,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998 by Scriptics Corporation.
+# 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/library/megawidget.tcl b/library/megawidget.tcl
index c09d0da..ff7b2ce 100644
--- a/library/megawidget.tcl
+++ b/library/megawidget.tcl
@@ -10,7 +10,7 @@
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-package require Tk
+package require tk
::oo::class create ::tk::Megawidget {
superclass ::oo::class
diff --git a/library/menu.tcl b/library/menu.tcl
index 6728131..a80e0a2 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -6,7 +6,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# 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
diff --git a/library/text.tcl b/library/text.tcl
index aa6c3f5..576d592 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -5,7 +5,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998 by Scriptics Corporation.
+# 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/library/tk.tcl b/library/tk.tcl
index 66997c8..2ced087 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -11,7 +11,7 @@
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
# Verify that we have Tk binary and script components from the same release
-package require -exact Tk 8.7a4
+package require -exact tk 8.7a4
# Create a ::tk namespace
namespace eval ::tk {
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index a871081..07dbe0c 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -16,6 +16,8 @@ bind TNotebook <Control-ISO_Left_Tab> { ttk::notebook::CycleTab %W -1; break }
}
bind TNotebook <Destroy> { ttk::notebook::Cleanup %W }
+ttk::bindMouseWheel TNotebook [list ttk::notebook::CycleTab %W]
+
# ActivateTab $nb $tab --
# Select the specified tab and set focus.
#
@@ -56,12 +58,16 @@ proc ttk::notebook::Press {w x y} {
# CycleTab --
# Select the next/previous tab in the list.
#
-proc ttk::notebook::CycleTab {w dir} {
+proc ttk::notebook::CycleTab {w dir {factor 1.0}} {
if {[$w index end] != 0} {
set current [$w index current]
- set select [expr {($current + $dir) % [$w index end]}]
- while {[$w tab $select -state] != "normal" && ($select != $current)} {
- set select [expr {($select + $dir) % [$w index end]}]
+ set d [expr {$dir/$factor}]
+ set d [expr {int($d > 0 ? ceil($d) : floor($d))}]
+ set tabCount [$w index end]
+ set select [expr {($current + $d) % $tabCount}]
+ set step [expr {$dir > 0 ? 1 : -1}]
+ while {[$w tab $select -state] ne "normal" && ($select != $current)} {
+ set select [expr {($select + $step) % $tabCount}]
}
if {$select != $current} {
ActivateTab $w $select
diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl
index 61c4136..a97440d 100644
--- a/library/ttk/scale.tcl
+++ b/library/ttk/scale.tcl
@@ -1,4 +1,4 @@
-# scale.tcl - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
+# scale.tcl - Copyright © 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Bindings for the TScale widget
diff --git a/library/ttk/spinbox.tcl b/library/ttk/spinbox.tcl
index 7b5d416..9f002cd 100644
--- a/library/ttk/spinbox.tcl
+++ b/library/ttk/spinbox.tcl
@@ -23,7 +23,7 @@ bind TSpinbox <Down> { event generate %W <<Decrement>> }
bind TSpinbox <<Increment>> { ttk::spinbox::Spin %W +1 }
bind TSpinbox <<Decrement>> { ttk::spinbox::Spin %W -1 }
-ttk::bindMouseWheel TSpinbox [list ttk::spinbox::MouseWheel %W]
+ttk::bindMouseWheel TSpinbox [list ttk::spinbox::Spin %W]
## Motion --
# Sets cursor.
@@ -79,13 +79,16 @@ proc ttk::spinbox::Release {w} {
}
## MouseWheel --
-# Mousewheel callback.
+# Mousewheel callback. Turn these into <<Increment>> (-1, up)
+# or <<Decrement> (+1, down) events. Not used any more.
#
-proc ttk::spinbox::MouseWheel {w dir {factor 1}} {
+proc ttk::spinbox::MouseWheel {w dir {factor 1.0}} {
if {[$w instate disabled]} { return }
- set d [expr {-($dir/$factor)}]
- set d [expr {int($d > 0 ? ceil($d) : floor($d))}]
- ttk::spinbox::Spin $w $d
+ if {($dir < 0) ^ ($factor < 0)} {
+ event generate $w <<Increment>>
+ } elseif {$dir != 0} {
+ event generate $w <<Decrement>>
+ }
}
## SelectAll --
@@ -131,7 +134,7 @@ proc ttk::spinbox::Adjust {w v min max} {
# Otherwise cycle through numeric range based on
# -from, -to, and -increment.
#
-proc ttk::spinbox::Spin {w dir} {
+proc ttk::spinbox::Spin {w dir {factor -1.0}} {
variable State
if {[$w instate disabled]} { return }
@@ -143,6 +146,8 @@ proc ttk::spinbox::Spin {w dir} {
set State($w,values) [$w cget -values]
set State($w,values.length) [llength $State($w,values)]
+ set d [expr {-($dir/$factor)}]
+ set d [expr {int($d > 0 ? ceil($d) : floor($d))}]
if {$State($w,values.length) > 0} {
set value [$w get]
set current $State($w,values.index)
@@ -150,13 +155,13 @@ proc ttk::spinbox::Spin {w dir} {
set current [lsearch -exact $State($w,values) $value]
if {$current < 0} {set current -1}
}
- set State($w,values.index) [Adjust $w [expr {$current + $dir}] 0 \
+ set State($w,values.index) [Adjust $w [expr {$current + $d}] 0 \
[expr {$State($w,values.length) - 1}]]
set State($w,values.last) [lindex $State($w,values) $State($w,values.index)]
$w set $State($w,values.last)
} else {
if {[catch {
- set v [expr {[scan [$w get] %f] + $dir * [$w cget -increment]}]
+ set v [expr {[scan [$w get] %f] + $d * [$w cget -increment]}]
}]} {
set v [$w cget -from]
}
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 2451e5c..cf76ac0 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -100,7 +100,7 @@ space := ${empty} ${empty}
objdir = $(subst ${space},\ ,${OBJ_DIR})
develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols
-deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip
+deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install
embedded_make_args := EMBEDDED_BUILD=1
install_make_args := INSTALL_BUILD=1
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 29bb163..2e7230e 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -3,9 +3,9 @@
*
* This file handles the implementation of native bitmaps.
*
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 857ce34..f96acc7 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -4,12 +4,12 @@
* This file implements the Macintosh specific portion of the button
* widgets.
*
- * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
- * Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2007 Revar Desmera.
- * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
- * Copyright 2015 Marc Culler.
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001 Apple Computer, Inc.
+ * Copyright © 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2007 Revar Desmera.
+ * Copyright © 2015 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2015 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 47203e2..8e2b4a4 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -3,9 +3,9 @@
*
* This file manages the clipboard for the Tk toolkit.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index f11e660..3c155f6 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -5,11 +5,11 @@
* toolkit, in 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-1996 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2020 Marc Culler
+ * Copyright © 1990-1994 The Regents of the University of California.
+ * Copyright © 1994-1996 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2020 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -177,7 +177,7 @@ TkMacOSXRGBPixel(
unsigned long green,
unsigned long blue)
{
- MacPixel p;
+ MacPixel p = {0};
p.pixel.colortype = rgbColor;
p.pixel.value = ((red & 0xff) << 16) |
((green & 0xff) << 8) |
@@ -207,7 +207,7 @@ MODULE_SCOPE
unsigned long TkMacOSXClearPixel(
void)
{
- MacPixel p;
+ MacPixel p = {0};
p.pixel.value = 0;
p.pixel.colortype = clearColor;
return p.ulong;
@@ -236,7 +236,7 @@ SystemColorDatum*
GetEntryFromPixel(
unsigned long pixel)
{
- MacPixel p;
+ MacPixel p = {0};
int index = rgbColorIndex;
p.ulong = pixel;
@@ -314,6 +314,10 @@ GetRGBA(
}
}
break;
+ case clearColor:
+ rgba[0] = rgba[1] = rgba[2] = 1.0;
+ rgba[3] = 0;
+ break;
case semantic:
if (entry->index == controlAccentIndex && useFakeAccentColor) {
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
@@ -332,8 +336,6 @@ GetRGBA(
}
[color getComponents: rgba];
break;
- case clearColor:
- rgba[3] = 0;
default:
break;
}
@@ -598,7 +600,7 @@ TkpGetColor(
if (strncasecmp(name, "system", 6) == 0) {
Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&systemColors, name + 6);
- MacPixel p;
+ MacPixel p = {0};
if (hPtr != NULL) {
SystemColorDatum *entry = (SystemColorDatum *)Tcl_GetHashValue(hPtr);
diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h
index a030589..1b4bab6 100644
--- a/macosx/tkMacOSXColor.h
+++ b/macosx/tkMacOSXColor.h
@@ -87,7 +87,7 @@ typedef struct {
static SystemColorDatum systemColorData[] = {
{"Pixel", rgbColor, 0, NULL, 0, NULL },
-{"Transparent", clearColor, 0, NULL, 0, NULL },
+{"Transparent", clearColor, 0, NULL, 0, NULL },
{"Highlight", HIBrush, kThemeBrushPrimaryHighlightColor, NULL, 0, NULL },
{"HighlightSecondary", HIBrush, kThemeBrushSecondaryHighlightColor, NULL, 0, NULL },
diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c
index 34a1fc9..1588d21 100644
--- a/macosx/tkMacOSXConfig.c
+++ b/macosx/tkMacOSXConfig.c
@@ -4,8 +4,8 @@
* This module implements the Macintosh system defaults for
* the configuration package.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- * Copyright 2001, Apple Inc.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 2001, Apple 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/macosx/tkMacOSXConstants.h b/macosx/tkMacOSXConstants.h
index 0b6ae2b..8ab6a80 100644
--- a/macosx/tkMacOSXConstants.h
+++ b/macosx/tkMacOSXConstants.h
@@ -6,7 +6,7 @@
* operating system. (Each new OS release seems to come with a new
* naming convention for the same old constants.)
*
- * Copyright (c) 2017 Marc Culler
+ * Copyright © 2017 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 9371889..4e899f2 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -3,9 +3,9 @@
*
* This file contains Macintosh specific cursor related routines.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXCursors.h b/macosx/tkMacOSXCursors.h
index 2cf00fb..9434cc3 100644
--- a/macosx/tkMacOSXCursors.h
+++ b/macosx/tkMacOSXCursors.h
@@ -4,9 +4,9 @@
* This file defines a set of Macintosh cursor resources that
* are only available on the Macintosh platform.
*
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- * Copyright 2008-2009, Apple Inc.
- * Copyright (c) 2008-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1996 Sun Microsystems, Inc.
+ * Copyright © 2008-2009 Apple Inc.
+ * Copyright © 2008-2009 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/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c
index fc01ef4..b2022b9 100644
--- a/macosx/tkMacOSXDebug.c
+++ b/macosx/tkMacOSXDebug.c
@@ -4,8 +4,8 @@
* Implementation of Macintosh specific functions for debugging MacOS
* events, regions, etc...
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXDebug.h b/macosx/tkMacOSXDebug.h
index ab37187..18cf9b4 100644
--- a/macosx/tkMacOSXDebug.h
+++ b/macosx/tkMacOSXDebug.h
@@ -4,8 +4,8 @@
* Declarations of Macintosh specific functions for debugging MacOS events,
* regions, etc...
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index 0dc9db9..1df20f7 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -46,6 +46,7 @@
#define TROUGH "#c3c3c3"
#define INDICATOR "#b03060"
#define DISABLED "systemDisabledControlTextColor"
+#define IGNORED "#abcdef"
/*
* Defaults for labels, buttons, checkbuttons, and radiobuttons:
@@ -301,24 +302,24 @@
* Defaults for menus overall:
*/
-#define DEF_MENU_ACTIVE_BG_COLOR NORMAL_BG /*ignored*/
-#define DEF_MENU_ACTIVE_BG_MONO NORMAL_BG /*ignored*/
+#define DEF_MENU_ACTIVE_BG_COLOR IGNORED
+#define DEF_MENU_ACTIVE_BG_MONO IGNORED
#define DEF_MENU_ACTIVE_BORDER_WIDTH "0"
-#define DEF_MENU_ACTIVE_FG_COLOR NORMAL_FG
-#define DEF_MENU_ACTIVE_FG_MONO NORMAL_FG
+#define DEF_MENU_ACTIVE_FG_COLOR IGNORED
+#define DEF_MENU_ACTIVE_FG_MONO IGNORED
#define DEF_MENU_ACTIVE_RELIEF "flat"
-#define DEF_MENU_BG_COLOR NORMAL_BG /*ignored*/
-#define DEF_MENU_BG_MONO NORMAL_BG /*ignored*/
+#define DEF_MENU_BG_COLOR "#000001" /* Detects custom bg. */
+#define DEF_MENU_BG_MONO IGNORED
#define DEF_MENU_BORDER_WIDTH "0"
#define DEF_MENU_CURSOR "arrow"
-#define DEF_MENU_DISABLED_FG_COLOR DISABLED
-#define DEF_MENU_DISABLED_FG_MONO DISABLED
+#define DEF_MENU_DISABLED_FG_COLOR IGNORED
+#define DEF_MENU_DISABLED_FG_MONO ""
#define DEF_MENU_FONT "menu" /* special: see tkMacOSXMenu.c */
-#define DEF_MENU_FG NORMAL_FG
+#define DEF_MENU_FG "#010000" /* Detects custom fg. */
#define DEF_MENU_POST_COMMAND ""
#define DEF_MENU_RELIEF "flat"
-#define DEF_MENU_SELECT_COLOR "systemSelectedMenuItemTextColor"
-#define DEF_MENU_SELECT_MONO "systemSelectedMenuItemTextColor"
+#define DEF_MENU_SELECT_COLOR IGNORED
+#define DEF_MENU_SELECT_MONO IGNORED
#define DEF_MENU_TAKE_FOCUS "0"
#define DEF_MENU_TEAROFF "0"
#define DEF_MENU_TEAROFF_CMD NULL
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 91383d2..757bcea 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -3,10 +3,10 @@
*
* Contains the Mac implementation of the common dialog boxes.
*
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2017 Christian Gollwitzer.
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2017 Christian Gollwitzer.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index a7314f1..7685837 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -4,10 +4,10 @@
* This file contains functions that draw to windows. Many of thees
* functions emulate Xlib functions.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 2001-2009 Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2014-2020 Marc Culler.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2014-2020 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index f275815..98a40e6 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -7,9 +7,9 @@
* other application). Currently only Toplevel embedding within the same
* Tk application is allowed on the Macintosh.
*
- * Copyright (c) 1996-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index 75cd198..66c4bce 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -3,9 +3,9 @@
*
* This file implements the native aqua entry widget.
*
- * Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2008-2009, Apple Inc.
+ * Copyright © 2001 Apple Computer, Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple 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/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index 66ca964..6ed7dbf 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -3,9 +3,9 @@
*
* This file contains the basic Mac OS X Event handling routines.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index c062b16..50ef287 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -4,9 +4,9 @@
* Contains the Macintosh implementation of the platform-independent font
* package interface.
*
- * Copyright 2002-2004 Benjamin Riefenstahl, Benjamin.Riefenstahl@epost.de
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2008-2009, Apple Inc.
+ * Copyright © 2002-2004 Benjamin Riefenstahl, Benjamin.Riefenstahl@epost.de
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple 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/macosx/tkMacOSXFont.h b/macosx/tkMacOSXFont.h
index 7fc9265..5babfa8 100644
--- a/macosx/tkMacOSXFont.h
+++ b/macosx/tkMacOSXFont.h
@@ -4,10 +4,10 @@
* Contains the Macintosh implementation of the platform-independent
* font package interface.
*
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1990-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index 6d53634..7cd8344 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -3,11 +3,11 @@
*
* Implements high level event support for the Macintosh.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2015-2019 Marc Culler
- * Copyright (c) 2019 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2015-2019 Marc Culler
+ * Copyright © 2019 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 0df23d9..60183f4 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -3,10 +3,10 @@
*
* The code in this file provides an interface for XImages,
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2017-2020 Marc Culler.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2017-2020 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index da2ea61..bd6ca7d 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -4,10 +4,10 @@
* This file contains Mac OS X -specific interpreter initialization
* functions.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2017 Marc Culler
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2017 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -109,17 +109,15 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
#endif
[self _setupWindowNotifications];
[self _setupApplicationNotifications];
+}
- /*
- * Construct the menu bar.
- */
-
- _defaultMainMenu = nil;
- [self _setupMenus];
+-(void)applicationDidFinishLaunching:(NSNotification *)notification
+{
+ (void)notification;
- /*
- * Initialize event processing.
- */
+ /*
+ * Initialize event processing.
+ */
TkMacOSXInitAppleEvents(_eventInterp);
@@ -131,25 +129,11 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
TkMacOSXInitCGDrawing(_eventInterp, TRUE, 0);
/*
- * Check if the app has been signed.
+ * Construct the menu bar.
*/
- mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle());
- errorCode = SecStaticCodeCreateWithPath(mainBundleURL, kSecCSDefaultFlags,
- &staticCode);
- CFRelease(mainBundleURL);
- if (staticCode != nil && errorCode == noErr) {
- errorCode = SecStaticCodeCheckValidity(staticCode, kSecCSBasicValidateOnly, nil);
- if (errorCode == noErr) {
- [NSApp setIsSigned:YES];
- }
- CFRelease(staticCode);
- }
-}
-
--(void)applicationDidFinishLaunching:(NSNotification *)notification
-{
- (void)notification;
+ _defaultMainMenu = nil;
+ [self _setupMenus];
/*
* It is not safe to force activation of the NSApp until this method is
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 6e4a764..e41d7e6 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -4,10 +4,10 @@
* This file implements functions that decode & handle keyboard events on
* MacOS X.
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2012 Adrian Robert.
- * Copyright 2015-2020 Marc Culler.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2012 Adrian Robert.
+ * Copyright © 2015-2020 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index 60d1d0d..e6f51d8 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -3,10 +3,10 @@
*
* Routines to support keyboard events on the Macintosh.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2020 Marc Culler
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2020 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXKeysyms.h b/macosx/tkMacOSXKeysyms.h
index da364ea..7bd250b 100644
--- a/macosx/tkMacOSXKeysyms.h
+++ b/macosx/tkMacOSXKeysyms.h
@@ -4,11 +4,11 @@
* Contains data used for processing key events, some of which was
* moved from tkMacOSXKeyboard.c.
*
- * Copyright (c) 1990-1994 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2020 Marc Culler
+ * Copyright © 1990-1994 The Regents of the University of California.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2020 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 8970109..2a9ca0b 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -3,10 +3,10 @@
*
* This module implements the Mac-platform specific features of menus.
*
- * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2012 Adrian Robert.
+ * Copyright © 1996-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2012 Adrian Robert.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -316,12 +316,6 @@ TKBackgroundLoop *backgroundLoop = nil;
if (menuPtr && mePtr) {
Tcl_Interp *interp = menuPtr->interp;
- /*
- * Add time for errors to fire if necessary. This is sub-optimal
- * but avoids issues with Tcl/Cocoa event loop integration.
- */
-
- //Tcl_Sleep(100);
Tcl_Preserve(interp);
Tcl_Preserve(menuPtr);
@@ -685,7 +679,6 @@ TkpConfigureMenuEntry(
NSString *keyEquivalent = @"";
NSUInteger modifierMask = NSCommandKeyMask;
NSMenu *submenu = nil;
- NSDictionary *attributes;
int imageWidth, imageHeight;
GC gc = (mePtr->textGC ? mePtr->textGC : mePtr->menuPtr->textGC);
Tcl_Obj *fontPtr = (mePtr->fontPtr ?
@@ -714,9 +707,7 @@ TkpConfigureMenuEntry(
&imageHeight);
image = TkMacOSXGetNSImageFromBitmap(mePtr->menuPtr->display, bitmap,
gc, imageWidth, imageHeight);
- if (gc->foreground == defaultFg) {
- [image setTemplate:YES];
- }
+ [image setTemplate:YES];
}
[menuItem setImage:image];
if ((!image || mePtr->compound != COMPOUND_NONE) && mePtr->labelPtr &&
@@ -730,25 +721,50 @@ TkpConfigureMenuEntry(
}
}
[menuItem setTitle:title];
- if (strcmp(Tcl_GetString(fontPtr), "menu") || gc->foreground != defaultFg
- || gc->background != defaultBg) {
- attributes = TkMacOSXNSFontAttributesForFont(Tk_GetFontFromObj(
- mePtr->menuPtr->tkwin, fontPtr));
- if (gc->foreground != defaultFg || gc->background != defaultBg) {
- NSColor *color = TkMacOSXGetNSColor(gc,
- gc->foreground!=defaultFg? gc->foreground:gc->background);
-
- attributes = [[attributes mutableCopy] autorelease];
- [(NSMutableDictionary *) attributes setObject:color
- forKey:NSForegroundColorAttributeName];
- }
- if (attributes) {
- attributedTitle = [[[NSAttributedString alloc]
- initWithString:title attributes:attributes] autorelease];
- }
+
+#if 0
+
+ /*
+ * The -background and -foreground options are now ignored in Aqua.
+ * See ticket [635167af14].
+ */
+
+ NSDictionary fontAttributes = TkMacOSXNSFontAttributesForFont(
+ Tk_GetFontFromObj(mePtr->menuPtr->tkwin, fontPtr));
+ NSMutableDictionary *attributes = [fontAttributes mutableCopy];
+ static unsigned long defaultBg = 0, defaultFg = 0;
+ if (defaultBg == 0) {
+ tkColor *tkColPtr = TkpGetColor(NULL, DEF_MENU_BG_COLOR);
+ defaultBg = tkColPtr->color.pixel;
+ ckfree(tkColPtr);
+ }
+ if (defaultFg == 0) {
+ tkColor *tkColPtr = TkpGetColor(NULL, DEF_MENU_FG);
+ defaultFg = tkColPtr->color.pixel;
+ ckfree(tkColPtr);
+ }
+ if (gc->foreground != defaultFg) {
+ NSColor *fgcolor = TkMacOSXGetNSColor(gc, gc->foreground);
+ [attributes setObject:fgcolor
+ forKey:NSForegroundColorAttributeName];
+ }
+ if (gc->background != defaultBg) {
+ NSColor *bgcolor = TkMacOSXGetNSColor(gc, gc->background);
+ [attributes setObject:bgcolor
+ forKey:NSBackgroundColorAttributeName];
}
+
+#else
+
+ NSDictionary *attributes = TkMacOSXNSFontAttributesForFont(
+ Tk_GetFontFromObj(mePtr->menuPtr->tkwin, fontPtr));
+
+#endif
+
+ attributedTitle = [[NSAttributedString alloc] initWithString:title
+ attributes:attributes];
[menuItem setAttributedTitle:attributedTitle];
- [menuItem setEnabled:!(mePtr->state == ENTRY_DISABLED)];
+ [menuItem setEnabled:(mePtr->state != ENTRY_DISABLED)];
[menuItem setState:((mePtr->type == CHECK_BUTTON_ENTRY ||
mePtr->type == RADIO_BUTTON_ENTRY) && mePtr->indicatorOn &&
(mePtr->entryFlags & ENTRY_SELECTED) ? NSOnState : NSOffState)];
@@ -781,27 +797,17 @@ TkpConfigureMenuEntry(
if ([menuItem isEnabled]) {
/*
- * This menuItem might have been previously disabled (XXX:
- * track this), which would have disabled entries; we must
- * re-enable the entries here.
+ * This menuItem might have been previously disabled which
+ * would have disabled all of its entries; we must re-enable the
+ * entries here. It is important to iterate though the Tk
+ * entries, not the NSMenuItems, since some NSMenuItems may
+ * have been added by the system. See [7185d26cf4].
*/
- int i = 0;
- NSArray *itemArray = [submenu itemArray];
-
- for (NSMenuItem *item in itemArray) {
+ for (int i = 0; i < menuRefPtr->menuPtr->numEntries; i++) {
TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i];
-
- /*
- * Work around an apparent bug where itemArray can have
- * more items than the menu's entries[] array.
- */
-
- if (i >= (int) menuRefPtr->menuPtr->numEntries) {
- break;
- }
- [item setEnabled: !(submePtr->state == ENTRY_DISABLED)];
- i++;
+ NSMenuItem *item = (NSMenuItem *) submePtr->platformEntryData;
+ [item setEnabled:(submePtr->state != ENTRY_DISABLED)];
}
}
}
@@ -1674,8 +1680,6 @@ TkMacOSXClearMenubarActive(void)
void
TkpMenuInit(void)
{
- // TkColor *tkColPtr;
-
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
#define observe(n, s) \
@@ -1815,13 +1819,17 @@ TkpComputeMenubarGeometry(
* TkpDrawMenuEntry --
*
* Draws the given menu entry at the given coordinates with the given
- * attributes.
+ * attributes. This is a no-op on macOS since the menus are drawn by
+ * the Apple window manager, which also handles all events related to
+ * selecting menu items. This function is only called for tearoff
+ * menus, which are not supported on macOS but do get drawn as nearly
+ * invisible 1 pixel wide windows on macOS
*
* Results:
* None.
*
* Side effects:
- * X Server commands are executed to display the menu entry.
+ * None
*
*----------------------------------------------------------------------
*/
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index 2fad3cb..7de2b46 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -4,11 +4,11 @@
* This file implements the Macintosh specific portion of the menubutton
* widget.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
- * Copyright 2001, Apple Computer, Inc.
- * Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2007 Revar Desmera.
- * Copyright 2015 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 2001 Apple Computer, Inc.
+ * Copyright © 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2007 Revar Desmera.
+ * Copyright © 2015 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index fe53f25..31429d4 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -3,9 +3,9 @@
*
* These calls set up the default menus for Tk.
*
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1996 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 83eef3d..c4ba1bd 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -4,8 +4,8 @@
* This file implements functions that decode & handle mouse events on
* MacOS X.
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index e169a7d..854e241 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -4,10 +4,10 @@
* This file contains the implementation of a tcl event source
* for the AppKit event loop.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2015 Marc Culler.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2015 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index ef2bd1d..5b8ea14 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -3,9 +3,9 @@
*
* Macros and declarations that are purely internal & private to TkAqua.
*
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2008-2009 Apple Inc.
- * Copyright (c) 2020 Marc Culler
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple Inc.
+ * Copyright © 2020 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c
index 6cb61dd..f78aa79 100644
--- a/macosx/tkMacOSXRegion.c
+++ b/macosx/tkMacOSXRegion.c
@@ -3,9 +3,9 @@
*
* Implements X window calls for manipulating regions
*
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1996 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index 2bbd795..c226aeb 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -4,10 +4,10 @@
* This file implements the Macintosh specific portion of the
* scale widget.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2008-2009, Apple Inc.
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Scriptics Corporation.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple 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/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 3149b15..5cd1f56 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -4,11 +4,11 @@
* This file implements the Macintosh specific portion of the scrollbar
* widget.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2015 Kevin Walzer/WordTech Commununications LLC.
- * Copyright (c) 2018-2019 Marc Culler
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2015 Kevin Walzer/WordTech Commununications LLC.
+ * Copyright © 2018-2019 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index 8cc00d3..5b97923 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -22,10 +22,10 @@
* may not get done for awhile. So this sketch is offered for the brave
* to attempt if they need the functionality...
*
- * Copyright (c) 1989-1994 The Regents of the University of California.
- * Copyright (c) 1994-1998 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1989-1994 The Regents of the University of California.
+ * Copyright © 1994-1998 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c
index 6e1a9a1..c9a46f5 100644
--- a/macosx/tkMacOSXServices.c
+++ b/macosx/tkMacOSXServices.c
@@ -3,9 +3,9 @@
*\
* This file allows the integration of Tk and the Cocoa NSServices API.
*
- * Copyright (c) 2010-2019 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2019 Marc Culler.
- * Copyright (c) 2010 Adrian Robert.
+ * Copyright © 2010-2019 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2019 Marc Culler.
+ * Copyright © 2010 Adrian Robert.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index d2979f6..a3cf7b0 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -3,9 +3,9 @@
*
* Implements subwindows for the macintosh version of Tk.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c
index b6d8253..563b58f 100644
--- a/macosx/tkMacOSXSysTray.c
+++ b/macosx/tkMacOSXSysTray.c
@@ -6,9 +6,9 @@
* window and a "sysnotify" command to post system notifications.
* In macOS the icon appears on the right hand side of the menu bar.
*
- * Copyright (c) 2020 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2020 Jan Nijtmans.
- * Copyright (c) 2020 Marc Culler.
+ * Copyright © 2020 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2020 Jan Nijtmans.
+ * Copyright © 2020 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index 4ded4de..730b8a4 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -4,9 +4,9 @@
* Contains commands for platform specific tests for
* the Macintosh platform.
*
- * Copyright (c) 1996 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 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/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 30a2d57..d6923db 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -4,10 +4,10 @@
* This file defines the routines for both creating and handling Window
* Manager class events for Tk.
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2015 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2015 Marc Culler.
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2015 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2015 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 0b8ef81..d647b46 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5,11 +5,11 @@
* application and the window manager. Among other things, it implements
* the "wm" command and passes geometry information to the window manager.
*
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2010 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2017-2019 Marc Culler.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2010 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2017-2019 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2868,9 +2868,9 @@ WmIconwindowCmd(
static int
WmManageCmd(
- TCL_UNUSED(Tk_Window), /* Main window of the application. */
- TkWindow *winPtr, /* Toplevel or Frame to work with */
- Tcl_Interp *interp, /* Current interpreter. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
+ TkWindow *winPtr, /* Toplevel or Frame to work with */
+ Tcl_Interp *interp, /* Current interpreter. */
TCL_UNUSED(int), /* Number of arguments. */
TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */
{
@@ -2888,6 +2888,18 @@ WmManageCmd(
Tcl_SetErrorCode(interp, "TK", "WM", "MANAGE", NULL);
return TCL_ERROR;
}
+
+ /*
+ * Draw the managed widget at the top left corner of its toplevel.
+ * See [4a40c6cace].
+ */
+
+ if (macWin) {
+ winPtr->changes.x -= macWin->xOff;
+ winPtr->changes.y -= macWin->yOff;
+ XMoveWindow(winPtr->display, winPtr->window, 0, 0);
+ }
+
TkFocusSplit(winPtr);
Tk_UnmapWindow(frameWin);
if (wmPtr == NULL) {
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h
index c648292..6b0ee69 100644
--- a/macosx/tkMacOSXWm.h
+++ b/macosx/tkMacOSXWm.h
@@ -3,8 +3,8 @@
*
* Declarations of Macintosh specific window manager structures.
*
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2001-2009 Apple Inc.
+ * Copyright © 2006-2009 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/macosx/tkMacOSXXCursors.h b/macosx/tkMacOSXXCursors.h
index 1363bee..9beda5e 100644
--- a/macosx/tkMacOSXXCursors.h
+++ b/macosx/tkMacOSXXCursors.h
@@ -5,9 +5,9 @@
* emulate the X cursor set. All of these cursors were
* constructed and donated by Grant Neufeld. (gneufeld@ccs.carleton.ca)
*
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- * Copyright 2008-2009, Apple Inc.
- * Copyright (c) 2008-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 1995-1996 Sun Microsystems, Inc.
+ * Copyright © 2008-2009 Apple Inc.
+ * Copyright © 2008-2009 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/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 25d9f96..208bb45 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -6,10 +6,10 @@
* their implementation just doesn't do anything. Other calls will
* eventually be moved into other files.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2014 Marc Culler.
+ * Copyright © 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2014 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 8437aa6..ea40a97 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -3,12 +3,12 @@
*
* Tk theme engine for Mac OSX, using the Appearance Manager API.
*
- * Copyright (c) 2004 Joe English
- * Copyright (c) 2005 Neil Madden
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright 2008-2009, Apple Inc.
- * Copyright 2009 Kevin Walzer/WordTech Communications LLC.
- * Copyright 2019 Marc Culler
+ * Copyright © 2004 Joe English
+ * Copyright © 2005 Neil Madden
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2008-2009 Apple Inc.
+ * Copyright © 2009 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2019 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1872,19 +1872,24 @@ static Ttk_ElementSpec EntryElementSpec = {
* 1 pixel to account for the fact that the button is not centered.
*/
-static Ttk_Padding ComboboxPadding = {4, 2, 20, 2};
+static Ttk_Padding ComboboxPadding = {4, 4, 20, 4};
+static Ttk_Padding DarkComboboxPadding = {6, 6, 22, 6};
static void ComboboxElementSize(
TCL_UNUSED(void *),
TCL_UNUSED(void *),
- TCL_UNUSED(Tk_Window),
+ Tk_Window tkwin,
int *minWidth,
int *minHeight,
Ttk_Padding *paddingPtr)
{
*minWidth = 24;
*minHeight = 23;
- *paddingPtr = ComboboxPadding;
+ if (TkMacOSXInDarkMode(tkwin)) {
+ *paddingPtr = DarkComboboxPadding;
+ } else {
+ *paddingPtr = ComboboxPadding;
+ }
}
static void ComboboxElementDraw(
@@ -1905,19 +1910,24 @@ static void ComboboxElementDraw(
};
BEGIN_DRAWING(d)
- bounds.origin.y += 1;
if (TkMacOSXInDarkMode(tkwin)) {
- bounds.size.height += 1;
+ bounds = CGRectInset(bounds, 3, 3);
+ if (state & TTK_STATE_FOCUS) {
+ DrawDarkFocusRing(bounds, dc.context);
+ }
DrawDarkButton(bounds, info.kind, state, dc.context);
- } else if ([NSApp macOSVersion] > 100800) {
- if ((state & TTK_STATE_BACKGROUND) &&
- !(state & TTK_STATE_DISABLED)) {
- NSColor *background = [NSColor textBackgroundColor];
- CGRect innerBounds = CGRectInset(bounds, 1, 2);
- SolidFillRoundedRectangle(dc.context, innerBounds, 4, background);
+ } else {
+ if ([NSApp macOSVersion] > 100800) {
+ if ((state & TTK_STATE_BACKGROUND) &&
+ !(state & TTK_STATE_DISABLED)) {
+ NSColor *background = [NSColor textBackgroundColor];
+ CGRect innerBounds = CGRectInset(bounds, 1, 4);
+ bounds.origin.y += 1;
+ SolidFillRoundedRectangle(dc.context, innerBounds, 4, background);
+ }
}
+ ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL);
}
- ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL);
END_DRAWING
}
diff --git a/tests/all.tcl b/tests/all.tcl
index 46721a2..99e6d0c 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -4,12 +4,12 @@
# tests. Execute it by invoking "source all.tcl" when running tktest
# in this directory.
#
-# Copyright © 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.
-package require Tk ;# This is the Tk test suite; fail early if no Tk!
+package require tk ;# This is the Tk test suite; fail early if no Tk!
package require tcltest 2.2
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
diff --git a/tests/bell.test b/tests/bell.test
index da264d7..4cf7596 100644
--- a/tests/bell.test
+++ b/tests/bell.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1994 The Regents of the University of California.
-# Copyright © 1998-2000 by Scriptics Corporation.
+# Copyright © 1998-2000 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/bgerror.test b/tests/bgerror.test
index a69fceb..bd38310 100644
--- a/tests/bgerror.test
+++ b/tests/bgerror.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/bind.test b/tests/bind.test
index db25870..ede1108 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -2224,7 +2224,7 @@ test bind-16.46 {ExpandPercents procedure} -setup {
bind all <Key> $savedBind(All)
unset savedBind
} -result {0 1 2}
-test bind-16.47 {ExpandPercents procedure} -constraints aquaOrWin32 -setup {
+test bind-16.47 {ExpandPercents procedure} -constraints {aquaOrWin32 needsTcl87} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
focus -force .t.f
diff --git a/tests/bitmap.test b/tests/bitmap.test
index 6ad0213..02c0f40 100644
--- a/tests/bitmap.test
+++ b/tests/bitmap.test
@@ -3,7 +3,7 @@
# Tcl tests.
#
# Copyright © 1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/border.test b/tests/border.test
index f0d0efd..96ebdcf 100644
--- a/tests/border.test
+++ b/tests/border.test
@@ -2,7 +2,7 @@
# tkBorder.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/busy.test b/tests/busy.test
index 6c110a9..e4f5165 100644
--- a/tests/busy.test
+++ b/tests/busy.test
@@ -4,7 +4,7 @@
# commands. Sourcing this file runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright © 1998-2000 by Jos Decoster. All rights reserved.
+# Copyright © 1998-2000 Jos Decoster. All rights reserved.
package require tcltest 2.2
tcltest::configure {*}$argv
diff --git a/tests/button.test b/tests/button.test
index 41cf290..25df606 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/canvImg.test b/tests/canvImg.test
index 0e4acd7..db72219 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/canvMoveto.test b/tests/canvMoveto.test
index 0344db7..187a56d 100644
--- a/tests/canvMoveto.test
+++ b/tests/canvMoveto.test
@@ -2,7 +2,7 @@
# derived from canvRect.test.
#
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 2004 Neil McKay.
# All rights reserved.
diff --git a/tests/canvPs.test b/tests/canvPs.test
index 1c90b12..ffebd21 100644
--- a/tests/canvPs.test
+++ b/tests/canvPs.test
@@ -3,7 +3,7 @@
# TkCanvPostscriptCmd in generic/tkCanvPs.c
#
# Copyright © 1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/canvRect.test b/tests/canvRect.test
index 0b59230..33e5d18 100644
--- a/tests/canvRect.test
+++ b/tests/canvRect.test
@@ -3,7 +3,7 @@
# in the standard fashion for Tcl tests.
#
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/canvText.test b/tests/canvText.test
index d68e60f..f6b5e4b 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -3,7 +3,7 @@
# fashion for Tcl tests.
#
# Copyright © 1996-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Canvas used in 1.* - 17.* tests
diff --git a/tests/canvWind.test b/tests/canvWind.test
index 2d7a470..cef0cb8 100644
--- a/tests/canvWind.test
+++ b/tests/canvWind.test
@@ -3,7 +3,7 @@
# fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/choosedir.test b/tests/choosedir.test
index b90cea8..7e66756 100644
--- a/tests/choosedir.test
+++ b/tests/choosedir.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 1b6b4ca..aa8f148 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -3,7 +3,7 @@
# fashion for Tcl tests.
#
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
#
diff --git a/tests/clrpick.test b/tests/clrpick.test
index 1aeb18b..13d43dc 100644
--- a/tests/clrpick.test
+++ b/tests/clrpick.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/cmds.test b/tests/cmds.test
index 88cf0c0..3ccd587 100644
--- a/tests/cmds.test
+++ b/tests/cmds.test
@@ -2,7 +2,7 @@
# tkCmds.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/color.test b/tests/color.test
index fa43765..798e6b9 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -2,7 +2,7 @@
# tkColor.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1995-1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/config.test b/tests/config.test
index 2128020..ff06a22 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -3,7 +3,7 @@
# organized in the standard "white-box" fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index ee073cf..a89605a 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -5,7 +5,7 @@ if {[namespace exists tk::test]} {
return
}
-package require Tk
+package require tk
tk appname tktest
wm title . tktest
# If the main window isn't already mapped (e.g. because the tests are
diff --git a/tests/cursor.test b/tests/cursor.test
index eb4f168..f84232c 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -3,7 +3,7 @@
# Tcl tests.
#
# Copyright © 1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/embed.test b/tests/embed.test
index ed1abdd..92b8be9 100644
--- a/tests/embed.test
+++ b/tests/embed.test
@@ -1,7 +1,7 @@
# This file is a Tcl script to test out embedded Windows.
#
# Copyright © 1996-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/entry.test b/tests/entry.test
index fecae74..aef509c 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
diff --git a/tests/event.test b/tests/event.test
index 179dd32..01e3b7b 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/filebox.test b/tests/filebox.test
index c6cc69b..d7d051e 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -3,7 +3,7 @@
# for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/focus.test b/tests/focus.test
index 626576d..1a318c3 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -3,7 +3,7 @@
# standard fashion for Tcl tests.
#
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
proc focusSetup {} {
diff --git a/tests/focusTcl.test b/tests/focusTcl.test
index e1a36a3..6cfc230 100644
--- a/tests/focusTcl.test
+++ b/tests/focusTcl.test
@@ -4,7 +4,7 @@
# standard fashion for Tcl tests.
#
# Copyright © 1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/font.test b/tests/font.test
index e58de1e..d490c64 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -3,7 +3,7 @@
# standard white-box fashion for Tcl tests.
#
# Copyright © 1996-1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -14,7 +14,7 @@ tcltest::loadTestedCommands
# Some tests require support for 4-byte UTF-8 sequences
testConstraint fullutf [expr {[format %c 0x010000] != "\uFFFD"}]
testConstraint utfcompat [expr {([string length "\U10000"] == 2) && [package vsatisfies [package provide Tcl] 8]}]
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
set defaultfontlist [font names]
@@ -2340,7 +2340,7 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body {
} -result [font actual {times 0} -family]
-test font-44.1 {TkFontGetPixels: size < 0} -constraints failsOnUbuntuNoXft -setup {
+test font-44.1 {TkFontGetPixels: size < 0} -constraints failsOnUbuntu -setup {
set oldscale [tk scaling]
} -body {
tk scaling 0.5
@@ -2364,7 +2364,7 @@ test font-45.1 {TkFontGetAliasList: no match} -body {
test font-45.2 {TkFontGetAliasList: match} -constraints win -body {
font actual {times 10} -family
} -result {times}
-test font-45.3 {TkFontGetAliasList: match} -constraints {noExceed} -body {
+test font-45.3 {TkFontGetAliasList: match} -constraints {noExceed failsOnUbuntu} -body {
if {[font actual {{times new roman} 10} -family] eq "Times New Roman"} {
# avoid test failure on systems that have a real "times new roman" font
set res 1
diff --git a/tests/fontchooser.test b/tests/fontchooser.test
index a149ccb..8fb9059 100644
--- a/tests/fontchooser.test
+++ b/tests/fontchooser.test
@@ -6,7 +6,7 @@ package require tcltest 2.2
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
# the following helper functions are related to the functions used
diff --git a/tests/frame.test b/tests/frame.test
index 7d8dce2..d2f9d69 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/geometry.test b/tests/geometry.test
index da9e77b..6576331 100644
--- a/tests/geometry.test
+++ b/tests/geometry.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
proc getsize w {
diff --git a/tests/get.test b/tests/get.test
index 5ea2af3..51b6b94 100644
--- a/tests/get.test
+++ b/tests/get.test
@@ -3,7 +3,7 @@
# white-box tests.
#
# Copyright © 1998 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/grab.test b/tests/grab.test
index ae53673..ea8e992 100644
--- a/tests/grab.test
+++ b/tests/grab.test
@@ -4,7 +4,7 @@
# built-in commands. Sourcing this file runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1998-2000 by Ajuba Solutions.
+# Copyright © 1998-2000 Ajuba Solutions.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/grid.test b/tests/grid.test
index 62f6ff6..627b4e7 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -2,7 +2,7 @@
# (almost) organized in the standard fashion for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/image.test b/tests/image.test
index aa3bab8..c7b6511 100644
--- a/tests/image.test
+++ b/tests/image.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/imgBmap.test b/tests/imgBmap.test
index 975210b..1beafac 100644
--- a/tests/imgBmap.test
+++ b/tests/imgBmap.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/imgPNG.test b/tests/imgPNG.test
index 1f3c8e8..f68ba01 100644
--- a/tests/imgPNG.test
+++ b/tests/imgPNG.test
@@ -3,7 +3,7 @@
# in the standard fashion for Tcl tests.
#
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 1998 Willem van Schaik (images only)
# Copyright © 2008 Donal K. Fellows
# All rights reserved.
diff --git a/tests/imgPPM.test b/tests/imgPPM.test
index b9dfe12..dfabd62 100644
--- a/tests/imgPPM.test
+++ b/tests/imgPPM.test
@@ -3,7 +3,7 @@
# The files is organized in the standard fashion for Tcl tests.
#
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 8acf2bc..759c87d 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Australian National University
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 2002-2008 Donal K. Fellows
# All rights reserved.
#
diff --git a/tests/imgSVGnano.test b/tests/imgSVGnano.test
index e2789c2..1dad3a5 100644
--- a/tests/imgSVGnano.test
+++ b/tests/imgSVGnano.test
@@ -12,20 +12,23 @@ tcltest::loadTestedCommands
imageInit
namespace eval svgnano {
+
variable data
- set data(plus) {<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
-<path fill="none" stroke="#000000" d="M0 0 h16 v16 h-16 z"/>
-<path fill="none" stroke="#000000" d="M8 4 v 8 M4 8 h 8"/>
-<circle fill="yellow" stroke="red" cx="10" cy="80" r="10" />
-<ellipse fill="none" stroke="blue" stroke-width="3" cx="60" cy="60" rx="10" ry="20" />
-<line x1="10" y1="90" x2="50" y2="99"/>
-<rect fill="none" stroke="green" x="20" y="20" width="60" height="50" rx="3" ry="3"/>
-<polyline fill="red" stroke="purple" points="80,10 90,20 85,40"/>
-<polygon fill ="yellow" points="80,80 70,85 90,90"/>
-</svg>}
- set data(bad) {<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0:w
-">
-</svg>}
+
+ set data(plus) {\
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
+ <path fill="none" stroke="#000000" d="M0 0 h16 v16 h-16 z"/>
+ <path fill="none" stroke="#000000" d="M8 4 v 8 M4 8 h 8"/>
+ <circle fill="yellow" stroke="red" cx="10" cy="80" r="10" />
+ <ellipse fill="none" stroke="blue" stroke-width="3" cx="60" cy="60" rx="10" ry="20" />
+ <line x1="10" y1="90" x2="50" y2="99"/>
+ <rect fill="none" stroke="green" x="20" y="20" width="60" height="50" rx="3" ry="3"/>
+ <polyline fill="red" stroke="purple" points="80,10 90,20 85,40"/>
+ <polygon fill ="yellow" points="80,80 70,85 90,90"/>
+ </svg>}
+ set data(bad) {<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0:w">
+ </svg>\
+ }
tcltest::makeFile $data(plus) plus.svg
set data(plusFilePath) [file join [tcltest::configure -tmpdir] plus.svg]
@@ -33,6 +36,7 @@ namespace eval svgnano {
tcltest::makeFile $data(bad) bad.svg
set data(badFilePath) [file join [tcltest::configure -tmpdir] bad.svg]
+
test imgSVGnano-1.1 {reading simple image} -setup {
catch {rename foo ""}
} -body {
@@ -72,6 +76,7 @@ test imgSVGnano-1.4 {image options} -setup {
} -cleanup {
rename foo ""
} -result {100 100}
+
test imgSVGnano-1.5 {reading simple image from file} -setup {
catch {rename foo ""}
} -body {
@@ -80,8 +85,7 @@ test imgSVGnano-1.5 {reading simple image from file} -setup {
} -cleanup {
rename foo ""
} -result {100 100}
-
-test imgSVGnano-1.6 {simple image with options} -setup {
+test imgSVGnano-1.6 {simple image from file with options} -setup {
catch {rename foo ""}
} -body {
image create photo foo -file $data(plusFilePath) -format {svg -dpi 100 -scale 3}
@@ -89,14 +93,15 @@ test imgSVGnano-1.6 {simple image with options} -setup {
} -cleanup {
rename foo ""
} -result {300 300}
-test imgSVGnano-1.7 {Very small scale gives 1x1 image} -body {
+
+test imgSVGnano-1.7 {very small scale gives 1x1 image} -body {
image create photo foo -format "svg -scale 0.000001"\
-data $data(plus)
list [image width foo] [image height foo]
} -cleanup {
rename foo ""
} -result {1 1}
-test imgSVGnano-1.8 {Very small scale gives 1x1 image from file} -body {
+test imgSVGnano-1.8 {very small scale gives 1x1 image, from file} -body {
image create photo foo -format "svg -scale 0.000001"\
-file $data(plusFilePath)
list [image width foo] [image height foo]
@@ -152,7 +157,7 @@ test imgSVGnano-3.6 {no number parameter to -scaletoheight} -body {
-data $data(plus)
} -returnCodes error -result {expected integer but got "invalid"}
-test imgSVGnano-3.7 {Option -scaletowidth} -body {
+test imgSVGnano-3.7 {option -scaletowidth} -body {
image create photo foo -format "svg -scaletowidth 20"\
-data $data(plus)
image width foo
@@ -160,7 +165,7 @@ test imgSVGnano-3.7 {Option -scaletowidth} -body {
rename foo ""
} -result 20
-test imgSVGnano-3.8 {Option -scaletoheight} -body {
+test imgSVGnano-3.8 {option -scaletoheight} -body {
image create photo foo -format "svg -scaletoheight 20"\
-data $data(plus)
image height foo
@@ -194,7 +199,6 @@ test imgSVGnano-4.1 {reread file on configure -scale} -setup {
unset res
} -result {100 100 200 200}
-
test imgSVGnano-4.2 {error on file not accessible on reread due to configure} -setup {
catch {rename foo ""}
tcltest::makeFile $data(plus) tmpplus.svg
@@ -235,6 +239,16 @@ test imgSVGnano-5.1 {bug ea665e08f3 - too many values in parameters of the trans
rename foo ""
} -result {foo}
+test imgSVGnano-5.2 {bug d6e9b4db40 - "<svg" and ">" must be present} -body {
+ image create photo foo -format svg -data\
+ {<?xml version="1.0"?><!DOCTYPE svg PUBLIC\
+ "-//W3C//DTD SVG 1.0//EN\" \
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\
+ <sERRORvBADFILEg xmlns="http://www.w3.org/2000/svg">\
+ <circle cx="6.5cm" cy="2cm" r="100" transform="skewX(1 1)"/>\
+ </g></svg>}
+} -returnCodes error -result {couldn't recognize image data}
+
};# end of namespace svgnano
namespace delete svgnano
diff --git a/tests/listbox.test b/tests/listbox.test
index 5afeddd..a17146f 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -3,7 +3,7 @@
#
# Copyright © 1993-1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/main.test b/tests/main.test
index ef97338..29725de 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -4,8 +4,8 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1997 by Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -91,7 +91,7 @@ test main-2.3 {Tk_MainEx: -encoding option} -constraints stdio -setup {
test main-3.1 {Tk_ParseArgv: -help option} -constraints unix -body {
# Run only on unix as Win32 pops up native dialog
exec [interpreter] -help
-} -returnCodes error -match glob -result {% application-specific initialization failed: Command-specific options:*}
+} -returnCodes error -match glob -result {*application-specific initialization failed: Command-specific options:*}
test main-3.2 {Tk_ParseArgv: -help option} -setup {
set maininterp [interp create]
diff --git a/tests/menu.test b/tests/menu.test
index fee5079..5055e5c 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -2,7 +2,7 @@
# organized in the standard fashion for Tcl tests.
#
# Copyright © 1995-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index fd79a8c..2507a0e 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -2,7 +2,7 @@
# organized in the standard fashion for Tcl tests.
#
# Copyright © 1996-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/menubut.test b/tests/menubut.test
index 92c16b3..f8bd175 100644
--- a/tests/menubut.test
+++ b/tests/menubut.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
# XXX This test file is woefully incomplete right now. If any part
diff --git a/tests/message.test b/tests/message.test
index a547e4e..941d8c8 100644
--- a/tests/message.test
+++ b/tests/message.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-2000 by Ajuba Solutions.
+# Copyright © 1998-2000 Ajuba Solutions.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/msgbox.test b/tests/msgbox.test
index 465df05..91e52a7 100644
--- a/tests/msgbox.test
+++ b/tests/msgbox.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/obj.test b/tests/obj.test
index a2a9148..87e4a95 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/oldpack.test b/tests/oldpack.test
index 68a56a0..a1ba276 100644
--- a/tests/oldpack.test
+++ b/tests/oldpack.test
@@ -4,7 +4,7 @@
#
# Copyright © 1991-1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/option.test b/tests/option.test
index ba5f38c..5e29344 100644
--- a/tests/option.test
+++ b/tests/option.test
@@ -3,7 +3,7 @@
#
# Copyright © 1991-1993 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/pack.test b/tests/pack.test
index e69dd69..bdc6dd6 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -3,7 +3,7 @@
#
# Copyright © 1993 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Create some test windows.
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index 7e07762..f8fb3ae 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/pkgconfig.test b/tests/pkgconfig.test
index 47a9c0e..a68b5ac 100644
--- a/tests/pkgconfig.test
+++ b/tests/pkgconfig.test
@@ -7,7 +7,7 @@
#
# Copyright © 1991-1993 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 2017 Stuart Cassoff <stwo@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
@@ -20,7 +20,7 @@ tcltest::loadTestedCommands
testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}]
-test pkgconfig-1.1 {query keys} nodeprecated {
+test pkgconfig-1.1 {query keys} {nonwin nodeprecated} {
lsort [::tk::pkgconfig list]
} [list \
64bit bindir,install bindir,runtime debug demodir,install demodir,runtime \
diff --git a/tests/place.test b/tests/place.test
index e60b706..25871df 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -2,7 +2,7 @@
# organized in the standard fashion for Tcl tests.
#
# Copyright © 1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -13,7 +13,7 @@ tcltest::loadTestedCommands
# Used for constraining memory leak tests
testConstraint memory [llength [info commands memory]]
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# XXX - This test file is woefully incomplete. At present, only a
diff --git a/tests/raise.test b/tests/raise.test
index 56a41eb..7a3a063 100644
--- a/tests/raise.test
+++ b/tests/raise.test
@@ -5,7 +5,7 @@
#
# Copyright © 1993-1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/safe.test b/tests/safe.test
index 627d242..aeed361 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/safePrimarySelection.test b/tests/safePrimarySelection.test
index 713eedc..fd237f0 100644
--- a/tests/safePrimarySelection.test
+++ b/tests/safePrimarySelection.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -63,7 +63,7 @@ proc ::_test_tmp::unsafeInterp {name} {
set ::_test_tmp::script {
- package require Tk
+ package require tk
namespace eval ::_test_tmp {}
proc ::_test_tmp::getPrimarySelection {} {
diff --git a/tests/scale.test b/tests/scale.test
index 055762f..9c1ab21 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index e366c40..24c6f43 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -4,14 +4,14 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}]
diff --git a/tests/select.test b/tests/select.test
index b1d5d56..55f9184 100644
--- a/tests/select.test
+++ b/tests/select.test
@@ -3,7 +3,7 @@
# for Tcl tests.
#
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
#
@@ -23,7 +23,7 @@ if {![catch {selection get -selection CLIPBOARD_MANAGER -type TARGETS}]} {
testConstraint cliboardManagerPresent 1
}
}
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
global longValue selValue selInfo
diff --git a/tests/send.test b/tests/send.test
index 33d3d7c..a71f137 100644
--- a/tests/send.test
+++ b/tests/send.test
@@ -4,8 +4,8 @@
#
# Copyright © 1994 Sun Microsystems, Inc.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
-# Copyright © 2001 by ActiveState Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
+# Copyright © 2001 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -15,7 +15,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
testConstraint xhost [llength [auto_execok xhost]]
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
# Compute a script that will load Tk into a child interpreter.
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 89d8ade..f1cb3fa 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
# For xscrollcommand
diff --git a/tests/text.test b/tests/text.test
index 19b19a9..3778a12 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3,7 +3,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/textBTree.test b/tests/textBTree.test
index fa69f48..467e8dd 100644
--- a/tests/textBTree.test
+++ b/tests/textBTree.test
@@ -5,7 +5,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/textDisp.test b/tests/textDisp.test
index c1cae00..fee8bd4 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# Platform specific procedure for updating the text widget.
diff --git a/tests/textImage.test b/tests/textImage.test
index b4f80d7..9c40045 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -4,7 +4,7 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 195c1e1..2d42b8e 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/textMark.test b/tests/textMark.test
index 3046f67..938ce7f 100644
--- a/tests/textMark.test
+++ b/tests/textMark.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/textTag.test b/tests/textTag.test
index 1edfcb2..1eefbc4 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -26,7 +26,7 @@ testConstraint haveFontSizes [expr {
[font actual $bigFont -size] == 24 }
]
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
destroy .t
diff --git a/tests/textWind.test b/tests/textWind.test
index ee634af..55128be 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
deleteWindows
diff --git a/tests/tk.test b/tests/tk.test
index 35c9c4c..6a9d1e9 100644
--- a/tests/tk.test
+++ b/tests/tk.test
@@ -2,7 +2,7 @@
# It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 2002 ActiveState Corporation.
package require tcltest 2.2
diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl
index 8a75ba7..8f0234d 100644
--- a/tests/ttk/all.tcl
+++ b/tests/ttk/all.tcl
@@ -4,12 +4,12 @@
# tests. Execute it by invoking "source all.tcl" when running tktest
# in this directory.
#
-# Copyright © 2007 by the Tk developers.
+# Copyright © 2007 the Tk developers.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require Tk ;# This is the Tk test suite; fail early if no Tk!
+package require tk ;# This is the Tk test suite; fail early if no Tk!
package require tcltest 2.2
tcltest::configure {*}$argv
tcltest::configure -testdir [file normalize [file dirname [info script]]]
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index ab84bf9..248db96 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -2,7 +2,7 @@
# ttk::checkbutton widget tests.
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test
index 89e4bc5..a5627d2 100644
--- a/tests/ttk/combobox.test
+++ b/tests/ttk/combobox.test
@@ -2,7 +2,7 @@
# ttk::combobox widget tests
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test
index 68cf9f7..8f47483 100644
--- a/tests/ttk/entry.test
+++ b/tests/ttk/entry.test
@@ -2,12 +2,12 @@
# Tile package: entry widget tests
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
variable scrollInfo
proc scroll args {
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index bb593fc..51f0f00 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test
index 0033752..d81d33d 100644
--- a/tests/ttk/labelframe.test
+++ b/tests/ttk/labelframe.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/layout.test b/tests/ttk/layout.test
index 5dfce9b..31ef1f5 100644
--- a/tests/ttk/layout.test
+++ b/tests/ttk/layout.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test
index 91eaae4..8c2e186 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index ca638e4..d9909c0 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test
index f5d4565..80e51ea 100644
--- a/tests/ttk/progressbar.test
+++ b/tests/ttk/progressbar.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/radiobutton.test b/tests/ttk/radiobutton.test
index 6d2f341..6de5b5e 100644
--- a/tests/ttk/radiobutton.test
+++ b/tests/ttk/radiobutton.test
@@ -2,7 +2,7 @@
# ttk::radiobutton widget tests.
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/scale.test b/tests/ttk/scale.test
index ddbb7b3..0851cb6 100644
--- a/tests/ttk/scale.test
+++ b/tests/ttk/scale.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index ba75678..e4b2959 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -1,4 +1,4 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 70c0fc6..abd2a0f 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -2,7 +2,7 @@
# ttk::spinbox widget tests
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test
index d7fa23a..428212b 100644
--- a/tests/ttk/treetags.test
+++ b/tests/ttk/treetags.test
@@ -1,5 +1,5 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index 3df0c63..3d186e1 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -3,7 +3,7 @@
# what it currently does)
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index 53a232b..e8093a9 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -1,5 +1,5 @@
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/validate.test b/tests/ttk/validate.test
index 5430903..8b48d2a 100644
--- a/tests/ttk/validate.test
+++ b/tests/ttk/validate.test
@@ -3,7 +3,7 @@
## Derived from core test suite entry-19.1 through entry-19.20
##
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test
index ec4e9e7..076a815 100644
--- a/tests/ttk/vsapi.test
+++ b/tests/ttk/vsapi.test
@@ -1,7 +1,7 @@
# -*- tcl -*-
#
-package require Tk
+package require tk
package require tcltest 2.2
namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/unixButton.test b/tests/unixButton.test
index 5a55c5e..1b1ff04 100644
--- a/tests/unixButton.test
+++ b/tests/unixButton.test
@@ -5,7 +5,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index 8315ae3..ea0063f 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -3,7 +3,7 @@
# tests.
#
# Copyright © 1996-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
namespace eval ::_test_tmp {}
diff --git a/tests/unixFont.test b/tests/unixFont.test
index 0684bc5..ee3d36a 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -9,14 +9,14 @@
# at all sites.
#
# Copyright © 1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
eval tcltest::configure $argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnUbuntuNoXft [expr {[testConstraint failsOnUbuntu] || (![catch {tk::pkgconfig get fontsystem} fs] && ($fs eq "xft"))}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
diff --git a/tests/unixMenu.test b/tests/unixMenu.test
index 3acffcc..dafae08 100644
--- a/tests/unixMenu.test
+++ b/tests/unixMenu.test
@@ -4,7 +4,7 @@
# system.
#
# Copyright © 1995-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/unixSelect.test b/tests/unixSelect.test
index 75e16e4..cb1908b 100644
--- a/tests/unixSelect.test
+++ b/tests/unixSelect.test
@@ -4,7 +4,7 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1999 by Scriptics Corporation.
+# 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/tests/unixWm.test b/tests/unixWm.test
index dd1aa22..9cb3ab6 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -4,7 +4,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -13,7 +13,7 @@ tcltest::loadTestedCommands
namespace import -force ::tk::test:loadTkCommand
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
proc sleep ms {
diff --git a/tests/util.test b/tests/util.test
index d88ee57..c2baa38 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/visual.test b/tests/visual.test
index f6ad376..da6c41a 100644
--- a/tests/visual.test
+++ b/tests/visual.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winButton.test b/tests/winButton.test
index 50906c8..a19f4e7 100644
--- a/tests/winButton.test
+++ b/tests/winButton.test
@@ -5,7 +5,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index 7240fa6..28e508b 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -6,8 +6,8 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1997 by Sun Microsystems, Inc.
-# Copyright © 1998-2000 by Scriptics Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-2000 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winDialog.test b/tests/winDialog.test
index e0daf24..a2414ec 100755
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -4,7 +4,7 @@
# fashion for Tcl tests.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Copyright © 1998-1999 ActiveState Corporation.
package require tcltest 2.2
@@ -591,7 +591,18 @@ test winDialog-5.12.6 {tk_getSaveFile: initial directory: relative} -constraints
string equal $x [file join $dir testfile]
} -result 1
-test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -constraints {
+test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -setup {
+ # Ensure there's at least one file in the home directory in CI environments
+ set makeEmpty [expr {![llength [glob -nocomplain -type f -directory ~ *]]}]
+ if {$makeEmpty} {
+ for {set i 1} {$i < 1000} {incr i} {
+ # Technically a race condition...
+ set actualFilename [format "~/tkWinDialog5_12_7_%03d" $i]
+ if {![file exists $actualFilename]} break
+ }
+ close [open $actualFilename w]
+ }
+} -constraints {
nt testwinevent
} -body {
set fn [file tail [lindex [glob -types f ~/*] 0]]
@@ -603,6 +614,10 @@ test winDialog-5.12.7 {tk_getOpenFile: initial directory: ~} -constraints {
Click ok
}
string equal $x [file normalize [file join ~ $fn]]
+} -cleanup {
+ if {$makeEmpty} {
+ file delete $actualFilename
+ }
} -result 1
test winDialog-5.12.8 {tk_getOpenFile: initial directory: .} -constraints {
diff --git a/tests/winFont.test b/tests/winFont.test
index 1a8c115..bddc69e 100644
--- a/tests/winFont.test
+++ b/tests/winFont.test
@@ -7,7 +7,7 @@
# but there are no results that can be checked.
#
# Copyright © 1996-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winMenu.test b/tests/winMenu.test
index d3e7f83..3b7dbec 100644
--- a/tests/winMenu.test
+++ b/tests/winMenu.test
@@ -4,7 +4,7 @@
# system.
#
# Copyright © 1995-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winSend.test b/tests/winSend.test
index e8186df..4a7f81d 100644
--- a/tests/winSend.test
+++ b/tests/winSend.test
@@ -4,7 +4,7 @@
#
# Copyright © 1994 Sun Microsystems, Inc.
# Copyright © 1994-1996 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winWm.test b/tests/winWm.test
index f4183cd..a08bcfd 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -5,8 +5,8 @@
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
-# Copyright © 1996 by Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/window.test b/tests/window.test
index 44f0b2a..dec2cc4 100644
--- a/tests/window.test
+++ b/tests/window.test
@@ -2,7 +2,7 @@
# tkWindow.c. It is organized in the standard fashion for Tcl tests.
#
# Copyright © 1995 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
diff --git a/tests/winfo.test b/tests/winfo.test
index ff3d6b5..c9280cf 100644
--- a/tests/winfo.test
+++ b/tests/winfo.test
@@ -3,7 +3,7 @@
#
# Copyright © 1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -11,7 +11,7 @@ namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# eatColors --
diff --git a/tests/wm.test b/tests/wm.test
index 5fd5ee1..6338c6b 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -4,7 +4,7 @@
#
# Copyright © 1992-1994 The Regents of the University of California.
# Copyright © 1994-1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
# This file tests window manager interactions that work across platforms.
@@ -27,7 +27,7 @@ proc stdWindow {} {
update
}
-testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}]
+testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}]
testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }]
# [raise] and [lower] may return before the window manager has completed the
diff --git a/tests/xmfbox.test b/tests/xmfbox.test
index 8d6dbeb..a6426ec 100644
--- a/tests/xmfbox.test
+++ b/tests/xmfbox.test
@@ -6,7 +6,7 @@
# to call the internal Tcl procedures in xmfbox.tcl directly.
#
# Copyright © 1997 Sun Microsystems, Inc.
-# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 Scriptics Corporation.
# Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
# All rights reserved.
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 18ebb93..ada98c1 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -737,15 +737,16 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
echo "if {[catch {package present Tcl 8.6-}]} return";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \
- echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\
+ echo "package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]]]";\
else \
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]] Tk]";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]]]";\
echo "} else {";\
- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]] Tk]";\
+ echo " package ifneeded tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]]]";\
echo "}";\
- fi \
+ fi; \
+ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list package require -exact tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)]"\
) > "$(PKG_INDEX)"; \
fi
@echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/"
@@ -755,7 +756,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
$(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\
chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\
$(INSTALL_LIBRARY) "../win/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a" "$(LIB_INSTALL_DIR)";\
- chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.a";\
+ chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a";\
fi
@echo "Installing ${WISH_EXE} as $(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}"
@$(INSTALL_PROGRAM) ${WISH_EXE} "$(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}"
diff --git a/unix/configure b/unix/configure
index 584d7d6..47aafdd 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1437,8 +1437,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-tcl directory containing tcl configuration
(tclConfig.sh)
- --with-encoding encoding for configuration values (default:
- iso8859-1)
+ --with-encoding encoding for configuration values (default: utf-8)
--with-x use the X Window System
Some influential environment variables:
@@ -3518,7 +3517,7 @@ _ACEOF
else
-$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h
+$as_echo "#define TCL_CFGVAL_ENCODING \"utf-8\"" >>confdefs.h
fi
@@ -3533,14 +3532,6 @@ else
tcl_ok=yes
fi
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
$as_echo "shared" >&6; }
@@ -4246,12 +4237,12 @@ fi
if test "$GCC" = yes; then :
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
case "${CC}" in
*++|*++-*)
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
;;
esac
@@ -4520,7 +4511,7 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*)
+ CYGWIN_*|MINGW32_*|MSYS_*)
SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -5769,7 +5760,7 @@ fi
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*) ;;
+ CYGWIN_*|MINGW32_*|MSYS_*) ;;
HP_UX*) ;;
Darwin-*) ;;
IRIX*) ;;
@@ -6611,10 +6602,10 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Different --prefix selected for Tk and Tcl!
- [package require Tk] may not work correctly in tclsh." >&5
+ [package require tk] may not work correctly in tclsh." >&5
$as_echo "$as_me: WARNING:
Different --prefix selected for Tk and Tcl!
- [package require Tk] may not work correctly in tclsh." >&2;}
+ [package require tk] may not work correctly in tclsh." >&2;}
fi
#--------------------------------------------------------------------
diff --git a/unix/configure.ac b/unix/configure.ac
index 2012394..97adff1 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -145,7 +145,7 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
AC_MSG_WARN([
Different --prefix selected for Tk and Tcl!
- [[package require Tk]] may not work correctly in tclsh.])
+ [[package require tk]] may not work correctly in tclsh.])
fi
#--------------------------------------------------------------------
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 8ee17e1..01ccead 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -511,14 +511,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [
AC_HELP_STRING([--enable-shared],
[build and link with shared libraries (default: on)]),
[tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
AC_MSG_RESULT([shared])
SHARED_BUILD=1
@@ -966,12 +958,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
case "${CC}" in
*++|*++-*)
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
;;
esac
@@ -1083,7 +1075,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*)
+ CYGWIN_*|MINGW32_*|MSYS_*)
SHLIB_CFLAGS="-fno-common"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -1783,7 +1775,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*) ;;
+ CYGWIN_*|MINGW32_*|MSYS_*) ;;
HP_UX*) ;;
Darwin-*) ;;
IRIX*) ;;
@@ -2445,14 +2437,14 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
AC_DEFUN([SC_TCL_CFG_ENCODING], [
AC_ARG_WITH(encoding,
AC_HELP_STRING([--with-encoding],
- [encoding for configuration values (default: iso8859-1)]),
+ [encoding for configuration values (default: utf-8)]),
with_tcencoding=${withval})
if test x"${with_tcencoding}" != x ; then
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}",
[What encoding should be used for embedded configuration info?])
else
- AC_DEFINE(TCL_CFGVAL_ENCODING,"iso8859-1",
+ AC_DEFINE(TCL_CFGVAL_ENCODING,"utf-8",
[What encoding should be used for embedded configuration info?])
fi
])
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index db44bb7..1406f3d 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -37,7 +37,11 @@ extern Tcl_PackageInitProc Tktest_Init;
#define TK_LOCAL_APPINIT Tcl_AppInit
#endif
#ifndef MODULE_SCOPE
-# define MODULE_SCOPE extern
+# ifdef __cplusplus
+# define MODULE_SCOPE extern "C"
+# else
+# define MODULE_SCOPE extern
+# endif
#endif
MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *);
MODULE_SCOPE int main(int, char **);
diff --git a/unix/tkUnix.c b/unix/tkUnix.c
index 633b057..545e37a 100644
--- a/unix/tkUnix.c
+++ b/unix/tkUnix.c
@@ -5,7 +5,7 @@
* probably have to be written differently for Windows or Macintosh
* platforms.
*
- * 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/unix/tkUnix3d.c b/unix/tkUnix3d.c
index dfa08fb..13bbf06 100644
--- a/unix/tkUnix3d.c
+++ b/unix/tkUnix3d.c
@@ -4,7 +4,7 @@
* This file contains the platform specific routines for drawing 3d
* borders in the Motif style.
*
- * 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/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 8d293f6..0c752ce 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.c
@@ -3,7 +3,7 @@
*
* This file implements the Unix specific portion of the button 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/unix/tkUnixColor.c b/unix/tkUnixColor.c
index a909fb3..9bcba0e 100644
--- a/unix/tkUnixColor.c
+++ b/unix/tkUnixColor.c
@@ -4,7 +4,7 @@
* This file contains the platform specific color routines needed for X
* support.
*
- * 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/unix/tkUnixConfig.c b/unix/tkUnixConfig.c
index acd8bb5..922f127 100644
--- a/unix/tkUnixConfig.c
+++ b/unix/tkUnixConfig.c
@@ -4,7 +4,7 @@
* This module implements the Unix system defaults for the configuration
* package.
*
- * Copyright (c) 1997 by 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/unix/tkUnixCursor.c b/unix/tkUnixCursor.c
index bcd7cc3..30948bd 100644
--- a/unix/tkUnixCursor.c
+++ b/unix/tkUnixCursor.c
@@ -3,7 +3,7 @@
*
* This file contains X specific cursor manipulation routines.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/unix/tkUnixDialog.c b/unix/tkUnixDialog.c
index 2f1f079..66f88dc 100644
--- a/unix/tkUnixDialog.c
+++ b/unix/tkUnixDialog.c
@@ -3,7 +3,7 @@
*
* Contains the Unix implementation of the common dialog boxes:
*
- * 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/unix/tkUnixDraw.c b/unix/tkUnixDraw.c
index fec05ee..a9d6d73 100644
--- a/unix/tkUnixDraw.c
+++ b/unix/tkUnixDraw.c
@@ -3,7 +3,7 @@
*
* This file contains X specific drawing routines.
*
- * 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/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index d4654a8..231ec3d 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -6,7 +6,7 @@
* application can use as its main window an internal window from some
* other application). Also includes code to support busy windows.
*
- * 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/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index d31b5c1..5c0f311 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -4,7 +4,7 @@
* This file implements an event source for X displays for the UNIX
* version of Tk.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/unix/tkUnixFocus.c b/unix/tkUnixFocus.c
index 0767618..7ab6e3e 100644
--- a/unix/tkUnixFocus.c
+++ b/unix/tkUnixFocus.c
@@ -4,7 +4,7 @@
* This file contains platform specific functions that manage focus for
* Tk.
*
- * 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/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 60da06b..e30c07a 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -4,7 +4,7 @@
* Contains the Unix implementation of the platform-independent font
* package interface.
*
- * 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/unix/tkUnixInit.c b/unix/tkUnixInit.c
index ea3f2c8..1c716f4 100644
--- a/unix/tkUnixInit.c
+++ b/unix/tkUnixInit.c
@@ -3,7 +3,7 @@
*
* This file contains Unix-specific interpreter initialization functions.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/unix/tkUnixKey.c b/unix/tkUnixKey.c
index f774a2d..fe0a9a9 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -4,7 +4,7 @@
* This file contains routines for dealing with international keyboard
* input.
*
- * Copyright (c) 1997 by 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/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index a36effa..08df309 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -3,7 +3,7 @@
*
* This module implements the UNIX platform-specific features of menus.
*
- * 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/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c
index 062d18e..5bb82f1 100644
--- a/unix/tkUnixMenubu.c
+++ b/unix/tkUnixMenubu.c
@@ -4,7 +4,7 @@
* This file implements the Unix specific portion of 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/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 41ba938..237c741 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -3,7 +3,7 @@
*
* Alternate implementation of tkUnixFont.c using Xft.
*
- * Copyright (c) 2002-2003 Keith Packard
+ * Copyright © 2002-2003 Keith Packard
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index a603432..feab521 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -3,8 +3,8 @@
*
* This file implements the X specific portion of the scrollbar widget.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright © 1996 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/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c
index 69843db..5a1896f 100644
--- a/unix/tkUnixScrlbr.c
+++ b/unix/tkUnixScrlbr.c
@@ -4,7 +4,7 @@
* This file implements the Unix specific portion of 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/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 527bc4c..92c30c9 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -3,7 +3,7 @@
*
* This file contains X specific routines for manipulating selections.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 92fd8bb..de9eadf 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -4,9 +4,9 @@
* This file provides functions that implement the "send" command,
* allowing commands to be passed from interpreter to interpreter.
*
- * Copyright (c) 1989-1994 The Regents of the University of California.
- * Copyright (c) 1994-1996 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1989-1994 The Regents of the University of California.
+ * Copyright © 1994-1996 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/unix/tkUnixSysNotify.c b/unix/tkUnixSysNotify.c
index bf0d7ea..0d7b85c 100755
--- a/unix/tkUnixSysNotify.c
+++ b/unix/tkUnixSysNotify.c
@@ -4,7 +4,7 @@
* tkUnixSysNotify.c implements a "sysnotify" Tcl command which
* permits one to post system notifications based on the libnotify API.
*
- * Copyright (c) 2020 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2020 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c
index 1962bb8..03414e7 100644
--- a/unix/tkUnixSysTray.c
+++ b/unix/tkUnixSysTray.c
@@ -5,8 +5,8 @@
* change the system tray/taskbar icon of a Tk toplevel window and
* to post system notifications.
*
- * Copyright (c) 2005 Anton Kovalenko.
- * Copyright (c) 2020 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2005 Anton Kovalenko.
+ * Copyright © 2020 Kevin Walzer/WordTech Communications LLC.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -1168,7 +1168,7 @@ TrayIconEvent(
}
RetargetEvent(icon,ev);
break;
-
+
case MotionNotify: /* fall through */
case ButtonPress: /* fall through */
case ButtonRelease: /* fall through */
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 13a599e..d9a4322 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -6,8 +6,8 @@
* the "wm" command and passes geometry information to the window
* manager.
*
- * 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/unix/tkUnixXId.c b/unix/tkUnixXId.c
index c6873a1..5788881 100644
--- a/unix/tkUnixXId.c
+++ b/unix/tkUnixXId.c
@@ -1,8 +1,8 @@
/*
* tkUnixXId.c --
*
- * Copyright (c) 1993 The Regents of the University of California.
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 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/win/Makefile.in b/win/Makefile.in
index 172e15b..6cc58a2 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -490,10 +490,11 @@ install-binaries: binaries
echo "if {[catch {package present Tcl 8.6-}]} return";\
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
- echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]] Tk]";\
+ echo " package ifneeded tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]]]";\
echo "} else {";\
- echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin $(TK_DLL_FILE)]] Tk]";\
+ echo " package ifneeded tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin $(TK_DLL_FILE)]]]";\
echo "}";\
+ echo "package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list package require -exact tk $(VERSION)$(PATCH_LEVEL)]";\
) > $(PKG_INDEX);
@for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \
do \
diff --git a/win/configure b/win/configure
index c7c59ef..015c729 100755
--- a/win/configure
+++ b/win/configure
@@ -3655,14 +3655,6 @@ else
tcl_ok=yes
fi
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
$as_echo "shared" >&6; }
@@ -4256,7 +4248,7 @@ $as_echo "using shared flags" >&6; }
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -4265,7 +4257,7 @@ $as_echo "using shared flags" >&6; }
CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format"
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
;;
esac
diff --git a/win/makefile.vc b/win/makefile.vc
index 099b6f1..1fec8f6 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -319,7 +319,6 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)"
CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
/DHAVE_STRINGS_H=1 \
- /DSUPPORT_CONFIG_EMBEDDED \
!if $(HAVE_UXTHEME_H)
/DHAVE_UXTHEME_H=1 \
!endif
@@ -670,10 +669,11 @@ install-binaries:
if {[catch {package present Tcl 8.6-}]} { return }
if {($$::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)]
|| ([info exists ::argv] && ("-display" in $$::argv)))} {
- package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin libtk$(DOTVERSION).dll] Tk]
+ package ifneeded tk $(TK_PATCH_LEVEL) [list load [file normalize [file join $$dir .. .. bin libtk$(DOTVERSION).dll]]]
} else {
- package ifneeded Tk $(TK_PATCH_LEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk]
+ package ifneeded tk $(TK_PATCH_LEVEL) [list load [file normalize [file join $$dir .. .. bin $(TKLIBNAME)]]]
}
+package ifneeded Tk $(TK_PATCH_LEVEL) [list package require -exact tk $(TK_PATCH_LEVEL)]
<<
@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\"
!endif
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 4e3d792..e1def7b 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -4,8 +4,8 @@
*
* This is used to fix limitations within nmake and the environment.
*
- * Copyright (c) 2002 by David Gravereaux.
- * Copyright (c) 2006 by Pat Thoyts
+ * Copyright (c) 2002 David Gravereaux.
+ * Copyright (c) 2006 Pat Thoyts
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/win/rc/tk.rc b/win/rc/tk.rc
index 35a9a8a..57f75dc 100644
--- a/win/rc/tk.rc
+++ b/win/rc/tk.rc
@@ -38,7 +38,7 @@ BEGIN
VALUE "OriginalFilename", "tk" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) SUFFIX ".dll\0"
VALUE "CompanyName", "ActiveState Corporation\0"
VALUE "FileVersion", TK_PATCH_LEVEL
- VALUE "LegalCopyright", "Copyright \251 2001 by ActiveState Corporation, et al\0"
+ VALUE "LegalCopyright", "Copyright \251 2001 ActiveState Corporation, et al\0"
VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
VALUE "ProductVersion", TK_PATCH_LEVEL
END
diff --git a/win/rc/wish.rc b/win/rc/wish.rc
index 4a889f4..0f9391c 100644
--- a/win/rc/wish.rc
+++ b/win/rc/wish.rc
@@ -44,7 +44,7 @@ BEGIN
VALUE "OriginalFilename", "wish" STRINGIFY(TK_MAJOR_VERSION) STRINGIFY(TK_MINOR_VERSION) SUFFIX ".exe\0"
VALUE "CompanyName", "ActiveState Corporation\0"
VALUE "FileVersion", TK_PATCH_LEVEL
- VALUE "LegalCopyright", "Copyright \251 2000 by ActiveState Corporation, et al\0"
+ VALUE "LegalCopyright", "Copyright \251 2000 ActiveState Corporation, et al\0"
VALUE "ProductName", "Tk " TK_VERSION " for Windows\0"
VALUE "ProductVersion", TK_PATCH_LEVEL
END
diff --git a/win/rules-ext.vc b/win/rules-ext.vc
index 531e070..6da5689 100644
--- a/win/rules-ext.vc
+++ b/win/rules-ext.vc
@@ -31,7 +31,7 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
-!if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul]
+!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
# First locate the Tcl directory that we are working with.
diff --git a/win/rules.vc b/win/rules.vc
index f3e5439..a076edc 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -6,7 +6,7 @@
# compiler switches, defining common targets and macros. The Tcl makefile
# directly includes this. Extensions include it via "rules-ext.vc".
#
-# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for
+# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for
# detailed documentation.
#
# See the file "license.terms" for information on usage and redistribution
@@ -24,7 +24,7 @@ _RULES_VC = 1
# For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 6
+RULES_VERSION_MINOR = 8
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -652,8 +652,130 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
!endif
!endif
+
+################################################################
+# 6. Extract various version numbers from headers
+# For Tcl and Tk, version numbers are extracted from tcl.h and tk.h
+# respectively. For extensions, versions are extracted from the
+# configure.in or configure.ac from the TEA configuration if it
+# exists, and unset otherwise.
+# Sets the following macros:
+# TCL_MAJOR_VERSION
+# TCL_MINOR_VERSION
+# TCL_RELEASE_SERIAL
+# TCL_PATCH_LEVEL
+# TCL_PATCH_LETTER
+# TCL_VERSION
+# TK_MAJOR_VERSION
+# TK_MINOR_VERSION
+# TK_RELEASE_SERIAL
+# TK_PATCH_LEVEL
+# TK_PATCH_LETTER
+# TK_VERSION
+# DOTVERSION - set as (for example) 2.5
+# VERSION - set as (for example 25)
+#--------------------------------------------------------------
+
+!if [echo REM = This file is generated from rules.vc > versions.vc]
+!endif
+!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_RELEASE_SERIAL = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_RELEASE_SERIAL >> versions.vc]
+!endif
+!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
+!endif
+
+!if defined(_TK_H)
+!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
+!endif
+!if [echo TK_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
+!endif
+!if [echo TK_RELEASE_SERIAL = \>> versions.vc] \
+ && [nmakehlp -V "$(_TK_H)" TK_RELEASE_SERIAL >> versions.vc]
+!endif
+!if [echo TK_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
+!endif
+!endif # _TK_H
+
+!include versions.vc
+
+TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
+TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
+!if [nmakehlp -f $(TCL_PATCH_LEVEL) "a"]
+TCL_PATCH_LETTER = a
+!elseif [nmakehlp -f $(TCL_PATCH_LEVEL) "b"]
+TCL_PATCH_LETTER = b
+!else
+TCL_PATCH_LETTER = .
+!endif
+
+!if defined(_TK_H)
+
+TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
+TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
+!if [nmakehlp -f $(TK_PATCH_LEVEL) "a"]
+TK_PATCH_LETTER = a
+!elseif [nmakehlp -f $(TK_PATCH_LEVEL) "b"]
+TK_PATCH_LETTER = b
+!else
+TK_PATCH_LETTER = .
+!endif
+
+!endif
+
+# Set DOTVERSION and VERSION
+!if $(DOING_TCL)
+
+DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
+VERSION = $(TCL_VERSION)
+
+!elseif $(DOING_TK)
+
+DOTVERSION = $(TK_DOTVERSION)
+VERSION = $(TK_VERSION)
+
+!else # Doing a non-Tk extension
+
+# If parent makefile has not defined DOTVERSION, try to get it from TEA
+# first from a configure.in file, and then from configure.ac
+!ifndef DOTVERSION
+!if [echo DOTVERSION = \> versions.vc] \
+ || [nmakehlp -V $(ROOT)\configure.in ^[$(PROJECT)^] >> versions.vc]
+!if [echo DOTVERSION = \> versions.vc] \
+ || [nmakehlp -V $(ROOT)\configure.ac ^[$(PROJECT)^] >> versions.vc]
+!error *** Could not figure out extension version. Please define DOTVERSION in parent makefile before including rules.vc.
+!endif
+!endif
+!include versions.vc
+!endif # DOTVERSION
+VERSION = $(DOTVERSION:.=)
+
+!endif # $(DOING_TCL) ... etc.
+
+# Windows RC files have 3 version components. Ensure this irrespective
+# of how many components the package has specified. Basically, ensure
+# minimum 4 components by appending 4 0's and then pick out the first 4.
+# Also take care of the fact that DOTVERSION may have "a" or "b" instead
+# of "." separating the version components.
+DOTSEPARATED=$(DOTVERSION:a=.)
+DOTSEPARATED=$(DOTSEPARATED:b=.)
+!if [echo RCCOMMAVERSION = \> versions.vc] \
+ || [for /f "tokens=1,2,3,4,5* delims=." %a in ("$(DOTSEPARATED).0.0.0.0") do echo %a,%b,%c,%d >> versions.vc]
+!error *** Could not generate RCCOMMAVERSION ***
+!endif
+!include versions.vc
+
########################################################################
-# 6. Parse the OPTS macro to work out the requested build configuration.
+# 7. Parse the OPTS macro to work out the requested build configuration.
# Based on this, we will construct the actual switches to be passed to the
# compiler and linker using the macros defined in the previous section.
# The following macros are defined by this section based on OPTS
@@ -667,9 +789,10 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build
# 0 -> link to static C runtime for static Tcl build.
# Does not impact shared Tcl builds (STATIC_BUILD == 0)
+# Default: 1 for Tcl 8.7 and up, 0 otherwise.
# TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions
-# in the Tcl shell. 0 -> keep them as shared libraries
-# Does not impact shared Tcl builds.
+# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does
+# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7.
# USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation.
# 0 -> Use the non-thread allocator.
# UNCHECKED - 1 -> when doing a debug build with symbols, use the release
@@ -724,7 +847,7 @@ MSVCRT = 0
!if [nmakehlp -f $(OPTS) "msvcrt"]
!message *** Doing msvcrt
!else
-!if $(STATIC_BUILD)
+!if $(TCL_MAJOR_VERSION) == 8 && $(TCL_MINOR_VERSION) < 7 && $(STATIC_BUILD)
MSVCRT = 0
!endif
!endif
@@ -741,7 +864,7 @@ TCL_THREADS = 0
USE_THREAD_ALLOC= 0
!endif
-!if "$(TCL_MAJOR_VERSION)" == "8"
+!if $(TCL_MAJOR_VERSION) == 8
!if [nmakehlp -f $(OPTS) "time64bit"]
!message *** Force 64-bit time_t
_USE_64BIT_TIME_T = 1
@@ -836,7 +959,7 @@ This compiler does not support profile guided optimization.
!endif
################################################################
-# 7. Parse the STATS macro to configure code instrumentation
+# 8. Parse the STATS macro to configure code instrumentation
# The following macros are set by this section:
# TCL_MEM_DEBUG - 1 -> enables memory allocation instrumentation
# 0 -> disables
@@ -866,7 +989,7 @@ TCL_COMPILE_DEBUG = 0
!endif
####################################################################
-# 8. Parse the CHECKS macro to configure additional compiler checks
+# 9. Parse the CHECKS macro to configure additional compiler checks
# The following macros are set by this section:
# WARNINGS - compiler switches that control the warnings level
# TCL_NO_DEPRECATED - 1 -> disable support for deprecated functions
@@ -898,99 +1021,6 @@ WARNINGS = $(WARNINGS) -Wp64
!endif
-################################################################
-# 9. Extract various version numbers
-# For Tcl and Tk, version numbers are extracted from tcl.h and tk.h
-# respectively. For extensions, versions are extracted from the
-# configure.in or configure.ac from the TEA configuration if it
-# exists, and unset otherwise.
-# Sets the following macros:
-# TCL_MAJOR_VERSION
-# TCL_MINOR_VERSION
-# TCL_PATCH_LEVEL
-# TCL_VERSION
-# TK_MAJOR_VERSION
-# TK_MINOR_VERSION
-# TK_PATCH_LEVEL
-# TK_VERSION
-# DOTVERSION - set as (for example) 2.5
-# VERSION - set as (for example 25)
-#--------------------------------------------------------------
-
-!if [echo REM = This file is generated from rules.vc > versions.vc]
-!endif
-!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
-!endif
-!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
-!endif
-!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
-!endif
-
-!if defined(_TK_H)
-!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
-!endif
-!if [echo TK_MINOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
-!endif
-!if [echo TK_PATCH_LEVEL = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
-!endif
-!endif # _TK_H
-
-!include versions.vc
-
-TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
-TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
-!if defined(_TK_H)
-TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
-TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
-!endif
-
-# Set DOTVERSION and VERSION
-!if $(DOING_TCL)
-
-DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
-VERSION = $(TCL_VERSION)
-
-!elseif $(DOING_TK)
-
-DOTVERSION = $(TK_DOTVERSION)
-VERSION = $(TK_VERSION)
-
-!else # Doing a non-Tk extension
-
-# If parent makefile has not defined DOTVERSION, try to get it from TEA
-# first from a configure.in file, and then from configure.ac
-!ifndef DOTVERSION
-!if [echo DOTVERSION = \> versions.vc] \
- || [nmakehlp -V $(ROOT)\configure.in ^[$(PROJECT)^] >> versions.vc]
-!if [echo DOTVERSION = \> versions.vc] \
- || [nmakehlp -V $(ROOT)\configure.ac ^[$(PROJECT)^] >> versions.vc]
-!error *** Could not figure out extension version. Please define DOTVERSION in parent makefile before including rules.vc.
-!endif
-!endif
-!include versions.vc
-!endif # DOTVERSION
-VERSION = $(DOTVERSION:.=)
-
-!endif # $(DOING_TCL) ... etc.
-
-# Windows RC files have 3 version components. Ensure this irrespective
-# of how many components the package has specified. Basically, ensure
-# minimum 4 components by appending 4 0's and then pick out the first 4.
-# Also take care of the fact that DOTVERSION may have "a" or "b" instead
-# of "." separating the version components.
-DOTSEPARATED=$(DOTVERSION:a=.)
-DOTSEPARATED=$(DOTSEPARATED:b=.)
-!if [echo RCCOMMAVERSION = \> versions.vc] \
- || [for /f "tokens=1,2,3,4,5* delims=." %a in ("$(DOTSEPARATED).0.0.0.0") do echo %a,%b,%c,%d >> versions.vc]
-!error *** Could not generate RCCOMMAVERSION ***
-!endif
-!include versions.vc
################################################################
# 10. Construct output directory and file paths
@@ -1087,14 +1117,29 @@ OUT_DIR = $(TMP_DIR)
# The name of the stubs library for the project being built
STUBPREFIX = $(PROJECT)stub
+#
# Set up paths to various Tcl executables and libraries needed by extensions
-!if $(DOING_TCL)
+#
+
+# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
+!if "$(TCL_PATCH_LETTER)" == "."
+TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip
+!else
+TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
+!endif
+!if "$(TK_PATCH_LETTER)" == "."
+TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_RELEASE_SERIAL).zip
+!else
+TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
+!endif
+!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
TCLSH = $(OUT_DIR)\$(TCLSHNAME)
TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
TCLLIB = $(OUT_DIR)\$(TCLLIBNAME)
+TCLSCRIPTZIP = $(OUT_DIR)\$(TCLSCRIPTZIPNAME)
TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME)
@@ -1122,6 +1167,7 @@ TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib
TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = $(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib
+TCLSCRIPTZIP = $(_TCLDIR)\lib\$(TCLSCRIPTZIPNAME)
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
@@ -1141,6 +1187,7 @@ TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib
TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib
TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib
+TCLSCRIPTZIP = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLSCRIPTZIPNAME)
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
@@ -1173,7 +1220,8 @@ WISH = $(OUT_DIR)\$(WISHNAME)
TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME)
TKIMPLIB = $(OUT_DIR)\$(TKIMPLIBNAME)
TKLIB = $(OUT_DIR)\$(TKLIBNAME)
-TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
+TK_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
+TKSCRIPTZIP = $(OUT_DIR)\$(TKSCRIPTZIPNAME)
!else # effectively NEED_TK
@@ -1188,7 +1236,10 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
!endif
TK_INCLUDES = -I"$(_TKDIR)\include"
+TKSCRIPTZIP = $(_TKDIR)\lib\$(TKSCRIPTZIPNAME)
+
!else # Building against Tk sources
+
WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME)
TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME)
TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
@@ -1199,7 +1250,10 @@ TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
!endif
TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
+TKSCRIPTZIP = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSCRIPTZIPNAME)
+
!endif # TKINSTALL
+
tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)"
!endif # $(DOING_TK)
@@ -1481,18 +1535,6 @@ lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
lflags = $(lflags) -nodefaultlib:libucrt.lib
!endif
-# Old linkers (Visual C++ 6 in particular) will link for fast loading
-# on Win98. Since we do not support Win98 any more, we specify nowin98
-# as recommended for NT and later. However, this is only required by
-# IX86 on older compilers and only needed if we are not doing a static build.
-
-!if "$(MACHINE)" == "IX86" && !$(STATIC_BUILD)
-!if [nmakehlp -l -opt:nowin98 $(LINKER_TESTFLAGS)]
-# Align sections for PE size savings.
-lflags = $(lflags) -opt:nowin98
-!endif
-!endif
-
dlllflags = $(lflags) -dll
conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows
@@ -1550,11 +1592,11 @@ default-target: $(DEFAULT_BUILD_TARGET)
!if $(MULTIPLATFORM_INSTALL)
default-pkgindex:
@echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \
- [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl
+ [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl
!else
default-pkgindex:
@echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \
- [list load [file join $$dir $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl
+ [list load [file join $$dir $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl
!endif
default-pkgindex-tea:
@@ -1600,6 +1642,8 @@ default-install-pdbs:
@if not exist "$(LIB_INSTALL_DIR)" mkdir "$(LIB_INSTALL_DIR)"
@$(CPY) "$(OUT_DIR)\*.pdb" "$(LIB_INSTALL_DIR)\"
+# "emacs font-lock highlighting fix
+
default-install-docs-html:
@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
@if not exist "$(DOC_INSTALL_DIR)" mkdir "$(DOC_INSTALL_DIR)"
@@ -1765,7 +1809,7 @@ TCLNMAKECONFIG = "$(_TCLDIR)\lib\nmake\tcl.nmake"
!endif
!else # !$(TCLINSTALL) - building against Tcl source
!if exist("$(OUT_DIR)\tcl.nmake")
-TCLNMAKECONFIG = "$(OUT_DIR)\tcl.nmake"
+TCLNMAKECONFIG = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl.nmake""
!endif
!endif # TCLINSTALL
diff --git a/win/tcl.m4 b/win/tcl.m4
index 8c2228d..ec1442b 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -358,14 +358,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [
AC_ARG_ENABLE(shared,
[ --enable-shared build and link with shared libraries (default: on)],
[tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
-
if test "$tcl_ok" = "yes" ; then
AC_MSG_RESULT([shared])
SHARED_BUILD=1
@@ -673,7 +665,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -682,7 +674,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_WARNING="${CFLAGS_WARNING} -Wno-format"
;;
*)
- CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -Wdeclaration-after-statement"
+ CFLAGS_WARNING="${CFLAGS_WARNING} -Wc++-compat -fextended-identifiers -Wdeclaration-after-statement"
;;
esac
@@ -1085,8 +1077,7 @@ AC_DEFUN([SC_TCL_CFG_ENCODING], [
if test x"${with_tcencoding}" != x ; then
AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}")
else
- # Default encoding on windows is not "iso8859-1"
- AC_DEFINE(TCL_CFGVAL_ENCODING,"cp1252")
+ AC_DEFINE(TCL_CFGVAL_ENCODING,"utf-8")
fi
])
diff --git a/win/tkWin.h b/win/tkWin.h
index ef579fe..e407897 100644
--- a/win/tkWin.h
+++ b/win/tkWin.h
@@ -4,7 +4,7 @@
* Declarations of public types and interfaces that are only
* available under Windows.
*
- * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
+ * Copyright (c) 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/win/tkWin32Dll.c b/win/tkWin32Dll.c
index 9ff374e..a761ee1 100644
--- a/win/tkWin32Dll.c
+++ b/win/tkWin32Dll.c
@@ -3,7 +3,7 @@
*
* This file contains a stub dll entry point.
*
- * 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/win/tkWin3d.c b/win/tkWin3d.c
index 3684400..2c2181b 100644
--- a/win/tkWin3d.c
+++ b/win/tkWin3d.c
@@ -4,7 +4,7 @@
* This file contains the platform specific routines for drawing 3D
* borders in the Windows 95 style.
*
- * 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/win/tkWinButton.c b/win/tkWinButton.c
index adcaa04..68aef38 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -4,7 +4,7 @@
* This file implements the Windows specific portion of the button
* 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/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 2b009af..61c6b36 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -3,8 +3,8 @@
*
* This file contains functions for managing the clipboard.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright © 1995-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/win/tkWinColor.c b/win/tkWinColor.c
index ab43304..d4a0d59 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.c
@@ -3,8 +3,8 @@
*
* Functions to map color names to system color values.
*
- * Copyright (c) 1995 Sun Microsystems, Inc.
- * Copyright (c) 1994 Software Research Associates, Inc.
+ * Copyright © 1995 Sun Microsystems, Inc.
+ * Copyright © 1994 Software Research Associates, 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/win/tkWinConfig.c b/win/tkWinConfig.c
index aeb9405..1c93e12 100644
--- a/win/tkWinConfig.c
+++ b/win/tkWinConfig.c
@@ -4,7 +4,7 @@
* This module implements the Windows system defaults for the
* configuration package.
*
- * Copyright (c) 1997 by 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/win/tkWinCursor.c b/win/tkWinCursor.c
index a8abb77..0a984f9 100644
--- a/win/tkWinCursor.c
+++ b/win/tkWinCursor.c
@@ -3,7 +3,7 @@
*
* This file contains Win32 specific cursor related routines.
*
- * 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/win/tkWinDialog.c b/win/tkWinDialog.c
index 54fb4d0..331a7d6 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -3,7 +3,7 @@
*
* Contains the Windows implementation of the common dialog boxes.
*
- * 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/win/tkWinDraw.c b/win/tkWinDraw.c
index 41e9672..d2faa90 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -4,8 +4,8 @@
* This file contains the Xlib emulation functions pertaining to actually
* drawing objects on a window.
*
- * Copyright (c) 1995 Sun Microsystems, Inc.
- * Copyright (c) 1994 Software Research Associates, Inc.
+ * Copyright © 1995 Sun Microsystems, Inc.
+ * Copyright © 1994 Software Research Associates, 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/win/tkWinEmbed.c b/win/tkWinEmbed.c
index ce77414..d653713 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -6,7 +6,7 @@
* one application can use as its main window an internal window from
* another application).
*
- * 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/win/tkWinFont.c b/win/tkWinFont.c
index 50f2f3b..9f5a42b 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -4,9 +4,9 @@
* Contains the Windows implementation of the platform-independent font
* package interface.
*
- * Copyright (c) 1994 Software Research Associates, Inc.
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1994 Software Research Associates, Inc.
+ * Copyright © 1995-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/win/tkWinIco.c b/win/tkWinIco.c
index 46a068c..d667c23 100644
--- a/win/tkWinIco.c
+++ b/win/tkWinIco.c
@@ -4,8 +4,8 @@
* This file contains declarations for icon-manipulation routines
* in Windows.
*
- * Copyright (c) 1995-1996 Microsoft Corp.
- * Copyright (c) 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
+ * Copyright © 1995-1996 Microsoft Corp.
+ * Copyright © 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/win/tkWinIco.h b/win/tkWinIco.h
index a3bf509..16cbb77 100644
--- a/win/tkWinIco.h
+++ b/win/tkWinIco.h
@@ -4,8 +4,8 @@
* This file contains declarations for icon-manipulation routines
* in Windows.
*
- * Copyright (c) 1995-1996 Microsoft Corp.
- * Copyright (c) 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
+ * Copyright © 1995-1996 Microsoft Corp.
+ * Copyright © 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/win/tkWinImage.c b/win/tkWinImage.c
index 8cfcc55..fc48b95 100644
--- a/win/tkWinImage.c
+++ b/win/tkWinImage.c
@@ -3,7 +3,7 @@
*
* This file contains routines for manipulation full-color images.
*
- * 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.
@@ -277,7 +277,7 @@ XCreateImage(
* None.
*
* This procedure is adapted from the XGetImage implementation in TkNT. That
- * code is Copyright (c) 1994 Software Research Associates, Inc.
+ * code is Copyright © 1994 Software Research Associates, Inc.
*
*----------------------------------------------------------------------
*/
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index 54167b0..28ba81d 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -4,7 +4,7 @@
* This file contains Windows-specific interpreter initialization
* functions.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/win/tkWinInt.h b/win/tkWinInt.h
index a8a6265..d25ff0a 100644
--- a/win/tkWinInt.h
+++ b/win/tkWinInt.h
@@ -5,7 +5,7 @@
* Windows-specific parts of Tk, but aren't used by the rest of Tk.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright (c) 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/win/tkWinKey.c b/win/tkWinKey.c
index 57c1d32..0ce860f 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -4,7 +4,7 @@
* This file contains X emulation routines for keyboard related
* 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/win/tkWinMenu.c b/win/tkWinMenu.c
index 40a7b97..d6ce571 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -4,8 +4,8 @@
* This module implements the Windows platform-specific features of
* menus.
*
- * Copyright (c) 1996-1998 by Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1996-1998 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/win/tkWinPixmap.c b/win/tkWinPixmap.c
index d189245..d87fb34 100644
--- a/win/tkWinPixmap.c
+++ b/win/tkWinPixmap.c
@@ -4,7 +4,7 @@
* This file contains the Xlib emulation functions pertaining to creating
* and destroying pixmaps.
*
- * 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/win/tkWinPointer.c b/win/tkWinPointer.c
index 222d938..00c2bae 100644
--- a/win/tkWinPointer.c
+++ b/win/tkWinPointer.c
@@ -3,8 +3,8 @@
*
* Windows specific mouse tracking code.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-1999 by Scriptics Corporation.
+ * Copyright © 1995-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/win/tkWinRegion.c b/win/tkWinRegion.c
index 1eff839..95ddc8b 100644
--- a/win/tkWinRegion.c
+++ b/win/tkWinRegion.c
@@ -3,7 +3,7 @@
*
* Tk Region emulation code.
*
- * 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/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index d00b324..4557bca 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -4,7 +4,7 @@
* This file implements the Windows specific portion of 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/win/tkWinSend.c b/win/tkWinSend.c
index d1d6777..f21af01 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -4,8 +4,8 @@
* This file provides functions that implement the "send" command,
* allowing commands to be passed from interpreter to interpreter.
*
- * Copyright (c) 1997 by Sun Microsystems, Inc.
- * Copyright (c) 2003 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 2003 Pat Thoyts <patthoyts@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/win/tkWinSendCom.c b/win/tkWinSendCom.c
index 2d66862..b783ee3 100644
--- a/win/tkWinSendCom.c
+++ b/win/tkWinSendCom.c
@@ -13,7 +13,7 @@
* In other words the Send methods takes a string and evaluates this in the
* Tcl interpreter. The result is returned as another string.
*
- * Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * Copyright © 2002 Pat Thoyts <patthoyts@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/win/tkWinSendCom.h b/win/tkWinSendCom.h
index cd6ec18..d20b48c 100644
--- a/win/tkWinSendCom.h
+++ b/win/tkWinSendCom.h
@@ -5,7 +5,7 @@
* command, allowing commands to be passed from interpreter to
* interpreter.
*
- * Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * Copyright © 2002 Pat Thoyts <patthoyts@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/win/tkWinSysTray.c b/win/tkWinSysTray.c
index 01455e0..c09694d 100644
--- a/win/tkWinSysTray.c
+++ b/win/tkWinSysTray.c
@@ -5,11 +5,11 @@
* change the system tray/taskbar icon of a Tk toplevel window and
* a "sysnotify" command to post system notifications.
*
- * Copyright (c) 1995-1996 Microsoft Corp.
- * Copyright (c) 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
- * Copyright (c) 2020 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2020 Eric Boudaillier.
- * Copyright (c) 2020 Francois Vogel.
+ * Copyright © 1995-1996 Microsoft Corp.
+ * Copyright © 1998 Brueckner & Jarosch Ing.GmbH, Erfurt, Germany
+ * Copyright © 2020 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2020 Eric Boudaillier.
+ * Copyright © 2020 Francois Vogel.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -677,7 +677,7 @@ TaskbarEval(
int result;
HWND hwnd = NULL;
- /* See http://support.microsoft.com/kb/q135788/
+ /* See http://support.microsoft.com/kb/q135788/
* Seems to have moved to https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/135788 */
if (fixup) {
if (icoPtr->hwndFocus != NULL && IsWindow(icoPtr->hwndFocus)) {
@@ -696,7 +696,7 @@ TaskbarEval(
result = Tcl_GlobalEval(icoPtr->interp, expanded);
if (hwnd != NULL) {
- /* See http://support.microsoft.com/kb/q135788/
+ /* See http://support.microsoft.com/kb/q135788/
* Seems to have moved to https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/135788 */
PostMessageW(hwnd, WM_NULL, 0, 0);
}
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index c419be8..105ee72 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -4,9 +4,9 @@
* Contains commands for platform specific tests for the Windows
* platform.
*
- * Copyright (c) 1997 Sun Microsystems, Inc.
- * Copyright (c) 2000 by Scriptics Corporation.
- * Copyright (c) 2001 by ActiveState Corporation.
+ * Copyright © 1997 Sun Microsystems, Inc.
+ * Copyright © 2000 Scriptics Corporation.
+ * Copyright © 2001 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/win/tkWinWindow.c b/win/tkWinWindow.c
index f868a06..572bccd 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -4,7 +4,7 @@
* Xlib emulation routines for Windows related to creating, displaying
* and destroying windows.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright © 1995-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/win/tkWinWm.c b/win/tkWinWm.c
index 20d68ea..4649191 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -6,8 +6,8 @@
* the "wm" command and passes geometry information to the window
* manager.
*
- * Copyright (c) 1995-1997 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright © 1995-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/win/tkWinX.c b/win/tkWinX.c
index de1e0ee..5fd5086 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -3,9 +3,9 @@
*
* This file contains Windows emulation procedures for X routines.
*
- * Copyright (c) 1995-1996 Sun Microsystems, Inc.
- * Copyright (c) 1994 Software Research Associates, Inc.
- * Copyright (c) 1998-2000 by Scriptics Corporation.
+ * Copyright © 1995-1996 Sun Microsystems, Inc.
+ * Copyright © 1994 Software Research Associates, 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/win/ttkWinTheme.c b/win/ttkWinTheme.c
index aa4dc24..d3277f2 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -1,4 +1,4 @@
-/* winTheme.c - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sf.net>
+/* winTheme.c - Copyright © 2004 Pat Thoyts <patthoyts@users.sf.net>
*/
#ifdef _MSC_VER
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index df04d86..1d61186 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -2,9 +2,9 @@
* Tk theme engine which uses the Windows XP "Visual Styles" API
* Adapted from Georgios Petasis' XP theme patch.
*
- * Copyright (c) 2003 by Georgios Petasis, petasis@iit.demokritos.gr.
- * Copyright (c) 2003 by Joe English
- * Copyright (c) 2003 by Pat Thoyts
+ * Copyright © 2003 Georgios Petasis, petasis@iit.demokritos.gr.
+ * Copyright © 2003 Joe English
+ * Copyright © 2003 Pat Thoyts
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/win/winMain.c b/win/winMain.c
index 744a08b..ecb12cd 100644
--- a/win/winMain.c
+++ b/win/winMain.c
@@ -30,17 +30,25 @@ int _CRT_glob = 0;
extern "C" {
#endif
extern Tcl_PackageInitProc Tktest_Init;
-#ifdef __cplusplus
-}
-#endif
#endif /* TK_TEST */
-#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES
+#if !defined(TCL_USE_STATIC_PACKAGES)
+# if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
+# define TCL_USE_STATIC_PACKAGES 1
+# else
+# define TCL_USE_STATIC_PACKAGES 0
+# endif
+#endif
+
+#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES
extern Tcl_PackageInitProc Registry_Init;
extern Tcl_PackageInitProc Dde_Init;
extern Tcl_PackageInitProc Dde_SafeInit;
#endif
+#ifdef __cplusplus
+}
+#endif
#ifdef TCL_BROKEN_MAINARGS
static void setargv(int *argcPtr, TCHAR ***argvPtr);
#endif
@@ -61,7 +69,11 @@ static BOOL consoleRequired = TRUE;
#define TK_LOCAL_APPINIT Tcl_AppInit
#endif
#ifndef MODULE_SCOPE
-# define MODULE_SCOPE extern
+# ifdef __cplusplus
+# define MODULE_SCOPE extern "C"
+# else
+# define MODULE_SCOPE extern
+# endif
#endif
MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *interp);
@@ -208,7 +220,7 @@ Tcl_AppInit(
return TCL_ERROR;
}
}
-#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES
+#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES
if (Registry_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 73391fb..96f7c5a 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -4,8 +4,8 @@
* This file contains the routines used to map from X color names to RGB
* and pixel values.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
- * Copyright (c) 2012 by Jan Nijtmans
+ * Copyright (c) 1996 Sun Microsystems, Inc.
+ * Copyright (c) 2012 Jan Nijtmans
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.