summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.fossil-settings/encoding-glob2
-rw-r--r--.project2
-rw-r--r--ChangeLog.20022
-rw-r--r--ChangeLog.20042
-rw-r--r--README.md4
-rw-r--r--changes64
-rw-r--r--compat/stdlib.h40
-rw-r--r--compat/unistd.h80
-rw-r--r--doc/3DBorder.32
-rw-r--r--doc/BindTable.32
-rw-r--r--doc/CanvPsY.32
-rw-r--r--doc/CanvTkwin.32
-rw-r--r--doc/CanvTxtInfo.32
-rw-r--r--doc/Clipboard.32
-rw-r--r--doc/ClrSelect.32
-rw-r--r--doc/ConfigWidg.314
-rw-r--r--doc/ConfigWind.32
-rw-r--r--doc/CoordToWin.32
-rw-r--r--doc/CrtCmHdlr.32
-rw-r--r--doc/CrtConsoleChan.32
-rw-r--r--doc/CrtErrHdlr.32
-rw-r--r--doc/CrtGenHdlr.32
-rw-r--r--doc/CrtImgType.32
-rw-r--r--doc/CrtItemType.347
-rw-r--r--doc/CrtPhImgFmt.32
-rw-r--r--doc/DeleteImg.32
-rw-r--r--doc/DrawFocHlt.32
-rw-r--r--doc/EventHndlr.32
-rw-r--r--doc/FreeXId.322
-rw-r--r--doc/GeomReq.32
-rw-r--r--doc/GetAnchor.32
-rw-r--r--doc/GetBitmap.32
-rw-r--r--doc/GetCapStyl.32
-rw-r--r--doc/GetClrmap.32
-rw-r--r--doc/GetDash.32
-rw-r--r--doc/GetGC.32
-rw-r--r--doc/GetHINSTANCE.32
-rw-r--r--doc/GetHWND.32
-rw-r--r--doc/GetImage.32
-rw-r--r--doc/GetJoinStl.32
-rw-r--r--doc/GetJustify.32
-rw-r--r--doc/GetOption.32
-rw-r--r--doc/GetPixels.32
-rw-r--r--doc/GetPixmap.32
-rw-r--r--doc/GetRelief.32
-rw-r--r--doc/GetRootCrd.32
-rw-r--r--doc/GetScroll.310
-rw-r--r--doc/GetSelect.32
-rw-r--r--doc/GetUid.32
-rw-r--r--doc/GetVRoot.32
-rw-r--r--doc/GetVisual.32
-rw-r--r--doc/Grab.32
-rw-r--r--doc/HWNDToWindow.32
-rw-r--r--doc/HandleEvent.32
-rw-r--r--doc/IdToWindow.32
-rw-r--r--doc/ImgChanged.32
-rw-r--r--doc/Inactive.32
-rw-r--r--doc/InternAtom.32
-rw-r--r--doc/MainLoop.32
-rw-r--r--doc/MainWin.32
-rw-r--r--doc/MaintGeom.32
-rw-r--r--doc/ManageGeom.32
-rw-r--r--doc/MoveToplev.32
-rw-r--r--doc/Name.32
-rw-r--r--doc/OwnSelect.32
-rw-r--r--doc/ParseArgv.314
-rw-r--r--doc/QWinEvent.32
-rw-r--r--doc/Restack.32
-rw-r--r--doc/RestrictEv.32
-rw-r--r--doc/SetAppName.32
-rw-r--r--doc/SetCaret.32
-rw-r--r--doc/SetClass.32
-rw-r--r--doc/SetClassProcs.34
-rw-r--r--doc/SetGrid.32
-rw-r--r--doc/SetOptions.321
-rw-r--r--doc/SetVisual.32
-rw-r--r--doc/StrictMotif.32
-rw-r--r--doc/TkInitStubs.32
-rw-r--r--doc/Tk_Init.32
-rw-r--r--doc/bell.n2
-rw-r--r--doc/bind.n7
-rw-r--r--doc/bindtags.n2
-rw-r--r--doc/bitmap.n2
-rw-r--r--doc/busy.n84
-rw-r--r--doc/canvas.n108
-rw-r--r--doc/chooseColor.n2
-rw-r--r--doc/colors.n6
-rw-r--r--doc/console.n2
-rw-r--r--doc/cursors.n4
-rw-r--r--doc/destroy.n2
-rw-r--r--doc/dialog.n2
-rw-r--r--doc/entry.n15
-rw-r--r--doc/focus.n2
-rw-r--r--doc/focusNext.n2
-rw-r--r--doc/fontchooser.n2
-rw-r--r--doc/frame.n23
-rw-r--r--doc/grab.n2
-rw-r--r--doc/grid.n20
-rw-r--r--doc/image.n2
-rw-r--r--doc/keysyms.n1088
-rw-r--r--doc/label.n2
-rw-r--r--doc/listbox.n16
-rw-r--r--doc/lower.n2
-rw-r--r--doc/menu.n16
-rw-r--r--doc/menubar.n2
-rw-r--r--doc/menubutton.n2
-rw-r--r--doc/message.n2
-rw-r--r--doc/option.n2
-rw-r--r--doc/optionMenu.n2
-rw-r--r--doc/options.n11
-rw-r--r--doc/pack-old.n2
-rw-r--r--doc/pack.n10
-rw-r--r--doc/palette.n2
-rw-r--r--doc/photo.n377
-rw-r--r--doc/place.n2
-rw-r--r--doc/popup.n2
-rw-r--r--doc/raise.n2
-rw-r--r--doc/scale.n2
-rw-r--r--doc/scrollbar.n20
-rw-r--r--doc/send.n2
-rw-r--r--doc/spinbox.n19
-rw-r--r--doc/text.n44
-rw-r--r--doc/tk.n2
-rw-r--r--doc/tk4.0.ps550
-rw-r--r--doc/tk_mac.n18
-rw-r--r--doc/tkvars.n2
-rw-r--r--doc/tkwait.n2
-rw-r--r--doc/toplevel.n24
-rw-r--r--doc/ttk_Theme.32
-rw-r--r--doc/ttk_button.n2
-rw-r--r--doc/ttk_combobox.n2
-rw-r--r--doc/ttk_entry.n8
-rw-r--r--doc/ttk_label.n23
-rw-r--r--doc/ttk_progressbar.n14
-rw-r--r--doc/ttk_scrollbar.n16
-rw-r--r--doc/ttk_spinbox.n2
-rw-r--r--doc/ttk_widget.n48
-rw-r--r--doc/winfo.n2
-rw-r--r--doc/wish.14
-rw-r--r--doc/wm.n2
-rw-r--r--generic/ks_names.h1196
-rwxr-xr-xgeneric/nanosvg.h3088
-rw-r--r--generic/nanosvgrast.h1467
-rw-r--r--generic/tk.decls80
-rw-r--r--generic/tk.h139
-rw-r--r--generic/tk3d.c4
-rw-r--r--generic/tk3d.h4
-rw-r--r--generic/tkArgv.c4
-rw-r--r--generic/tkAtom.c4
-rw-r--r--generic/tkBind.c120
-rw-r--r--generic/tkBitmap.c10
-rw-r--r--generic/tkBusy.c35
-rw-r--r--generic/tkButton.c316
-rw-r--r--generic/tkCanvArc.c261
-rw-r--r--generic/tkCanvBmap.c60
-rw-r--r--generic/tkCanvImg.c49
-rw-r--r--generic/tkCanvLine.c99
-rw-r--r--generic/tkCanvPoly.c94
-rw-r--r--generic/tkCanvPs.c40
-rw-r--r--generic/tkCanvText.c91
-rw-r--r--generic/tkCanvUtil.c38
-rw-r--r--generic/tkCanvWind.c49
-rw-r--r--generic/tkCanvas.c1149
-rw-r--r--generic/tkCanvas.h2
-rw-r--r--generic/tkClipboard.c9
-rw-r--r--generic/tkCmds.c300
-rw-r--r--generic/tkColor.c10
-rw-r--r--generic/tkColor.h4
-rw-r--r--generic/tkConfig.c121
-rw-r--r--generic/tkConsole.c14
-rw-r--r--generic/tkCursor.c14
-rw-r--r--generic/tkDecls.h176
-rw-r--r--generic/tkEntry.c305
-rw-r--r--generic/tkEntry.h13
-rw-r--r--generic/tkError.c9
-rw-r--r--generic/tkEvent.c19
-rw-r--r--generic/tkFileFilter.c12
-rw-r--r--generic/tkFont.c53
-rw-r--r--generic/tkFont.h4
-rw-r--r--generic/tkFrame.c378
-rw-r--r--generic/tkGC.c7
-rw-r--r--generic/tkGeometry.c2
-rw-r--r--generic/tkGrab.c6
-rw-r--r--generic/tkGrid.c61
-rw-r--r--generic/tkImage.c4
-rw-r--r--generic/tkImgBmap.c21
-rw-r--r--generic/tkImgGIF.c56
-rw-r--r--generic/tkImgListFormat.c1142
-rw-r--r--generic/tkImgPNG.c67
-rw-r--r--generic/tkImgPPM.c19
-rw-r--r--generic/tkImgPhInstance.c17
-rw-r--r--generic/tkImgPhoto.c673
-rw-r--r--generic/tkImgPhoto.h17
-rw-r--r--generic/tkImgSVGnano.c805
-rw-r--r--generic/tkInt.decls451
-rw-r--r--generic/tkInt.h162
-rw-r--r--generic/tkIntDecls.h151
-rw-r--r--generic/tkIntPlatDecls.h15
-rw-r--r--generic/tkIntXlibDecls.h445
-rw-r--r--generic/tkListbox.c126
-rw-r--r--generic/tkMacWinMenu.c2
-rw-r--r--generic/tkMain.c24
-rw-r--r--generic/tkMenu.c253
-rw-r--r--generic/tkMenu.h21
-rw-r--r--generic/tkMenuDraw.c11
-rw-r--r--generic/tkMenubutton.c68
-rw-r--r--generic/tkMessage.c52
-rw-r--r--generic/tkObj.c14
-rw-r--r--generic/tkOldConfig.c25
-rw-r--r--generic/tkOption.c9
-rw-r--r--generic/tkPack.c38
-rw-r--r--generic/tkPanedWindow.c145
-rw-r--r--generic/tkPkgConfig.c166
-rw-r--r--generic/tkPlace.c46
-rw-r--r--generic/tkPointer.c3
-rw-r--r--generic/tkRectOval.c103
-rw-r--r--generic/tkScale.c76
-rw-r--r--generic/tkScale.h2
-rw-r--r--generic/tkScrollbar.c81
-rw-r--r--generic/tkScrollbar.h26
-rw-r--r--generic/tkSelect.c22
-rw-r--r--generic/tkSelect.h12
-rw-r--r--generic/tkSquare.c28
-rw-r--r--generic/tkStubInit.c245
-rw-r--r--generic/tkStyle.c74
-rw-r--r--generic/tkTest.c304
-rw-r--r--generic/tkText.c319
-rw-r--r--generic/tkText.h18
-rw-r--r--generic/tkTextBTree.c18
-rw-r--r--generic/tkTextDisp.c36
-rw-r--r--generic/tkTextImage.c18
-rw-r--r--generic/tkTextIndex.c10
-rw-r--r--generic/tkTextMark.c14
-rw-r--r--generic/tkTextTag.c73
-rw-r--r--generic/tkTextWind.c22
-rw-r--r--generic/tkUtil.c38
-rw-r--r--generic/tkVisual.c30
-rw-r--r--generic/tkWindow.c44
-rw-r--r--generic/ttk/ttkBlink.c4
-rw-r--r--generic/ttk/ttkButton.c63
-rw-r--r--generic/ttk/ttkCache.c3
-rw-r--r--generic/ttk/ttkClamTheme.c90
-rw-r--r--generic/ttk/ttkClassicTheme.c64
-rw-r--r--generic/ttk/ttkDefaultTheme.c86
-rw-r--r--generic/ttk/ttkElements.c110
-rw-r--r--generic/ttk/ttkEntry.c125
-rw-r--r--generic/ttk/ttkFrame.c21
-rw-r--r--generic/ttk/ttkGenStubs.tcl963
-rw-r--r--generic/ttk/ttkImage.c5
-rw-r--r--generic/ttk/ttkInit.c11
-rw-r--r--generic/ttk/ttkLabel.c66
-rw-r--r--generic/ttk/ttkLayout.c5
-rw-r--r--generic/ttk/ttkManager.c5
-rw-r--r--generic/ttk/ttkManager.h2
-rw-r--r--generic/ttk/ttkNotebook.c30
-rw-r--r--generic/ttk/ttkPanedwindow.c17
-rw-r--r--generic/ttk/ttkProgress.c77
-rw-r--r--generic/ttk/ttkScale.c28
-rw-r--r--generic/ttk/ttkScrollbar.c15
-rw-r--r--generic/ttk/ttkSeparator.c7
-rw-r--r--generic/ttk/ttkSquare.c54
-rw-r--r--generic/ttk/ttkState.c4
-rw-r--r--generic/ttk/ttkStubLib.c2
-rw-r--r--generic/ttk/ttkTagSet.c7
-rw-r--r--generic/ttk/ttkTheme.c27
-rw-r--r--generic/ttk/ttkTheme.h10
-rw-r--r--generic/ttk/ttkThemeInt.h4
-rw-r--r--generic/ttk/ttkTrace.c4
-rw-r--r--generic/ttk/ttkTrack.c2
-rw-r--r--generic/ttk/ttkTreeview.c92
-rw-r--r--generic/ttk/ttkWidget.c7
-rw-r--r--generic/ttk/ttkWidget.h8
-rw-r--r--library/demos/combo.tcl3
-rw-r--r--library/demos/cscroll.tcl30
-rw-r--r--library/demos/entry1.tcl2
-rw-r--r--library/demos/entry2.tcl1
-rw-r--r--library/demos/menu.tcl9
-rw-r--r--library/demos/tree.tcl1
-rw-r--r--library/demos/unicodeout.tcl4
-rw-r--r--library/iconlist.tcl8
-rw-r--r--library/images/logo.eps10
-rw-r--r--library/images/pwrdLogo.eps10
-rw-r--r--library/listbox.tcl16
-rw-r--r--library/msgs/cs.msg82
-rw-r--r--library/msgs/de.msg34
-rw-r--r--library/msgs/el.msg136
-rw-r--r--library/msgs/eo.msg22
-rw-r--r--library/msgs/es.msg18
-rw-r--r--library/msgs/fr.msg26
-rw-r--r--library/msgs/hu.msg124
-rw-r--r--library/msgs/it.msg8
-rw-r--r--library/msgs/nl.msg6
-rw-r--r--library/msgs/pl.msg56
-rw-r--r--library/msgs/pt.msg28
-rw-r--r--library/msgs/ru.msg138
-rw-r--r--library/msgs/sv.msg46
-rw-r--r--library/scrlbar.tcl8
-rw-r--r--library/tclIndex1
-rw-r--r--library/text.tcl99
-rw-r--r--library/tk.tcl2
-rw-r--r--library/ttk/aquaTheme.tcl6
-rw-r--r--library/ttk/button.tcl2
-rw-r--r--library/ttk/clamTheme.tcl2
-rw-r--r--library/ttk/cursors.tcl31
-rw-r--r--library/ttk/defaults.tcl2
-rw-r--r--library/ttk/menubutton.tcl14
-rw-r--r--library/ttk/notebook.tcl10
-rw-r--r--library/ttk/scrollbar.tcl2
-rw-r--r--library/ttk/treeview.tcl2
-rw-r--r--library/ttk/ttk.tcl2
-rw-r--r--library/ttk/utils.tcl54
-rw-r--r--library/ttk/vistaTheme.tcl11
-rw-r--r--library/xmfbox.tcl7
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/README4
-rw-r--r--macosx/Tk-Common.xcconfig6
-rw-r--r--macosx/Tk.xcode/project.pbxproj41
-rw-r--r--macosx/Tk.xcodeproj/project.pbxproj42
-rw-r--r--macosx/configure.ac2
-rw-r--r--macosx/tkMacOSX.h2
-rw-r--r--macosx/tkMacOSXClipboard.c37
-rw-r--r--macosx/tkMacOSXDefault.h5
-rw-r--r--macosx/tkMacOSXDialog.c6
-rw-r--r--macosx/tkMacOSXDraw.c56
-rw-r--r--macosx/tkMacOSXEmbed.c3
-rw-r--r--macosx/tkMacOSXEvent.c26
-rw-r--r--macosx/tkMacOSXEvent.h23
-rw-r--r--macosx/tkMacOSXFont.c153
-rw-r--r--macosx/tkMacOSXHLEvents.c13
-rw-r--r--macosx/tkMacOSXImage.c19
-rw-r--r--macosx/tkMacOSXInit.c71
-rw-r--r--macosx/tkMacOSXInt.h8
-rw-r--r--macosx/tkMacOSXKeyEvent.c48
-rw-r--r--macosx/tkMacOSXKeyboard.c6
-rw-r--r--macosx/tkMacOSXMenubutton.c2
-rw-r--r--macosx/tkMacOSXMenus.c15
-rw-r--r--macosx/tkMacOSXMouseEvent.c24
-rw-r--r--macosx/tkMacOSXNotify.c4
-rw-r--r--macosx/tkMacOSXPort.h31
-rw-r--r--macosx/tkMacOSXPrivate.h22
-rw-r--r--macosx/tkMacOSXRegion.c83
-rw-r--r--macosx/tkMacOSXScrlbr.c12
-rw-r--r--macosx/tkMacOSXServices.c5
-rw-r--r--macosx/tkMacOSXSubwindows.c15
-rw-r--r--macosx/tkMacOSXWindowEvent.c2
-rw-r--r--macosx/tkMacOSXWm.c118
-rw-r--r--macosx/tkMacOSXXStubs.c184
-rw-r--r--macosx/ttkMacOSXTheme.c26
-rw-r--r--tests/bell.test2
-rw-r--r--tests/bind.test120
-rw-r--r--tests/bitmap.test6
-rw-r--r--tests/border.test23
-rw-r--r--tests/busy.test64
-rw-r--r--tests/button.test184
-rw-r--r--tests/canvImg.test14
-rw-r--r--tests/canvMoveto.test2
-rw-r--r--tests/canvRect.test12
-rw-r--r--tests/canvas.test307
-rw-r--r--tests/clipboard.test2
-rw-r--r--tests/cmds.test2
-rw-r--r--tests/config.test34
-rw-r--r--tests/cursor.test2
-rw-r--r--tests/entry.test345
-rw-r--r--tests/event.test12
-rw-r--r--tests/filebox.test2
-rw-r--r--tests/focus.test22
-rw-r--r--tests/font.test6
-rw-r--r--tests/frame.test792
-rw-r--r--tests/geometry.test2
-rw-r--r--tests/grid.test116
-rw-r--r--tests/imgListFormat.test661
-rw-r--r--tests/imgPhoto.test721
-rw-r--r--tests/imgSVGnano.test220
-rw-r--r--tests/listbox.test8
-rw-r--r--tests/main.test2
-rw-r--r--tests/menu.test620
-rw-r--r--tests/menuDraw.test12
-rw-r--r--tests/menubut.test18
-rw-r--r--tests/message.test106
-rw-r--r--tests/msgbox.test90
-rw-r--r--tests/option.file12
-rwxr-xr-xtests/option.file32
-rw-r--r--tests/option.test2
-rw-r--r--tests/pack.test121
-rw-r--r--tests/panedwindow.test116
-rw-r--r--tests/pkgconfig.test66
-rw-r--r--tests/place.test2
-rw-r--r--tests/safe.test28
-rw-r--r--tests/scale.test2
-rw-r--r--tests/scrollbar.test28
-rw-r--r--tests/select.test8
-rw-r--r--tests/spinbox.test350
-rw-r--r--tests/teapotTransparent.pngbin0 -> 45519 bytes
-rw-r--r--tests/text.test223
-rw-r--r--tests/textDisp.test40
-rw-r--r--tests/textImage.test14
-rw-r--r--tests/textIndex.test20
-rw-r--r--tests/textMark.test2
-rw-r--r--tests/textTag.test651
-rw-r--r--tests/textWind.test2
-rw-r--r--tests/tk.test6
-rw-r--r--tests/ttk/combobox.test8
-rw-r--r--tests/ttk/entry.test18
-rw-r--r--tests/ttk/image.test2
-rw-r--r--tests/ttk/labelframe.test2
-rw-r--r--tests/ttk/panedwindow.test6
-rw-r--r--tests/ttk/progressbar.test39
-rw-r--r--tests/ttk/scrollbar.test8
-rw-r--r--tests/ttk/spinbox.test4
-rw-r--r--tests/ttk/treetags.test6
-rw-r--r--tests/ttk/treeview.test6
-rw-r--r--tests/ttk/ttk.test6
-rw-r--r--tests/ttk/validate.test2
-rw-r--r--tests/unixButton.test16
-rw-r--r--tests/unixMenu.test156
-rw-r--r--tests/util.test6
-rw-r--r--tests/visual_bb.test12
-rwxr-xr-xtests/winDialog.test12
-rw-r--r--tests/winFont.test28
-rw-r--r--tests/winMenu.test6
-rw-r--r--tests/winWm.test8
-rw-r--r--tests/wm.test6
-rw-r--r--unix/Makefile.in184
-rwxr-xr-xunix/configure11640
-rw-r--r--unix/configure.ac (renamed from unix/configure.in)42
-rw-r--r--unix/tcl.m4497
-rw-r--r--unix/tk.pc.in1
-rw-r--r--unix/tk.spec6
-rw-r--r--unix/tkAppInit.c3
-rw-r--r--unix/tkConfig.h.in6
-rw-r--r--unix/tkConfig.sh.in3
-rw-r--r--unix/tkUnixButton.c4
-rw-r--r--unix/tkUnixCursor.c2
-rw-r--r--unix/tkUnixDefault.h59
-rw-r--r--unix/tkUnixDraw.c25
-rw-r--r--unix/tkUnixEmbed.c4
-rw-r--r--unix/tkUnixEvent.c4
-rw-r--r--unix/tkUnixFont.c27
-rw-r--r--unix/tkUnixKey.c6
-rw-r--r--unix/tkUnixMenu.c17
-rw-r--r--unix/tkUnixMenubu.c4
-rw-r--r--unix/tkUnixPort.h22
-rw-r--r--unix/tkUnixRFont.c34
-rw-r--r--unix/tkUnixScale.c12
-rw-r--r--unix/tkUnixScrlbr.c12
-rw-r--r--unix/tkUnixSelect.c34
-rw-r--r--unix/tkUnixSend.c10
-rw-r--r--unix/tkUnixWm.c188
-rw-r--r--unix/tkUnixXId.c33
-rw-r--r--win/Makefile.in26
-rw-r--r--win/README2
-rwxr-xr-xwin/configure6400
-rw-r--r--win/configure.ac (renamed from win/configure.in)26
-rw-r--r--win/makefile.vc17
-rw-r--r--win/mkd.bat12
-rw-r--r--win/rc/tk.rc8
-rw-r--r--win/rc/wish.rc8
-rw-r--r--win/rmd.bat20
-rw-r--r--win/rules-ext.vc2
-rw-r--r--win/rules.vc42
-rw-r--r--win/stubs.c47
-rw-r--r--win/tcl.m4282
-rw-r--r--win/tkWin.h10
-rw-r--r--win/tkWinButton.c14
-rw-r--r--win/tkWinClipboard.c38
-rw-r--r--win/tkWinColor.c6
-rw-r--r--win/tkWinDefault.h59
-rw-r--r--win/tkWinDialog.c107
-rw-r--r--win/tkWinDraw.c10
-rw-r--r--win/tkWinEmbed.c8
-rw-r--r--win/tkWinFont.c41
-rw-r--r--win/tkWinInit.c14
-rw-r--r--win/tkWinMenu.c86
-rw-r--r--win/tkWinPort.h1
-rw-r--r--win/tkWinRegion.c7
-rw-r--r--win/tkWinScrlbr.c14
-rw-r--r--win/tkWinSend.c27
-rw-r--r--win/tkWinSendCom.c14
-rw-r--r--win/tkWinTest.c75
-rw-r--r--win/tkWinWindow.c33
-rw-r--r--win/tkWinWm.c221
-rw-r--r--win/tkWinX.c107
-rw-r--r--win/ttkWinMonitor.c2
-rw-r--r--win/ttkWinTheme.c16
-rw-r--r--win/ttkWinXPTheme.c39
-rw-r--r--win/winMain.c3
-rw-r--r--xlib/X11/X.h68
-rw-r--r--xlib/X11/Xfuncproto.h195
-rw-r--r--xlib/X11/Xlib.h3037
-rw-r--r--xlib/X11/Xutil.h452
-rw-r--r--xlib/X11/cursorfont.h34
-rw-r--r--xlib/X11/keysym.h49
-rw-r--r--xlib/X11/keysymdef.h3388
-rw-r--r--xlib/xcolors.c2
-rw-r--r--xlib/xgc.c228
495 files changed, 36575 insertions, 22057 deletions
diff --git a/.fossil-settings/encoding-glob b/.fossil-settings/encoding-glob
index d1fd9fc..ee633a7 100644
--- a/.fossil-settings/encoding-glob
+++ b/.fossil-settings/encoding-glob
@@ -1,5 +1,3 @@
win/buildall.vc.bat
win/makefile.vc
-win/mkd.bat
-win/rmd.bat
win/rules.vc
diff --git a/.project b/.project
index 1a176fb..cc5f605 100644
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>tk8.6</name>
+ <name>tk8.7</name>
<comment></comment>
<projects>
</projects>
diff --git a/ChangeLog.2002 b/ChangeLog.2002
index b27b92b..5bfc4f7 100644
--- a/ChangeLog.2002
+++ b/ChangeLog.2002
@@ -2238,7 +2238,7 @@
inputContext to null.
* win/Makefile.in: changed gdb and shell targets to properly build
- all binaries before running (otherwise an error often occured).
+ all binaries before running (otherwise an error often occurred).
2002-03-28 David Gravereaux <davygrvy@pobox.com>
diff --git a/ChangeLog.2004 b/ChangeLog.2004
index bf86629..b900e7b 100644
--- a/ChangeLog.2004
+++ b/ChangeLog.2004
@@ -811,7 +811,7 @@
2004-07-05 George Peter Staplin <GeorgePS@XMission.com>
* generic/tkEvent.c: TK_XIM_SPOT preprocessor usage was modified
- slightly to fix a bug that occured when TK_XIM_SPOT was defined as 0.
+ slightly to fix a bug that occurred when TK_XIM_SPOT was defined as 0.
Thanks to Joe Mistachkin for reporting this bug.
2004-07-05 Donal K. Fellows <donal.k.fellows@man.ac.uk>
diff --git a/README.md b/README.md
index c989637..9dfa2a6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# README: Tk
-This is the **Tk 8.6.10** source distribution.
+This is the **Tk 8.7a3** source distribution.
You can get any source release of Tk from [our distribution
site](https://sourceforge.net/projects/tcl/files/Tcl/).
@@ -12,7 +12,7 @@ This directory contains the sources and documentation for Tk, a
cross-platform GUI toolkit implemented with the Tcl scripting language.
For details on features, incompatibilities, and potential problems with
-this release, see [the Tcl/Tk 8.6 Web page](https://www.tcl.tk/software/tcltk/8.6.html)
+this release, see [the Tcl/Tk 8.7 Web page](https://www.tcl.tk/software/tcltk/8.7.html)
or refer to the "changes" file in this directory, which contains a
historical record of all changes to Tk.
diff --git a/changes b/changes
index aea39f3..ca6b7db 100644
--- a/changes
+++ b/changes
@@ -5099,7 +5099,7 @@ correctly. (hobbs)
2001-08-28 (bug fix) removed 2 second 'raise' delay seen by some Unix
window managers. (hobbs, baker)
-2001-09-14 (bug fix) fixed memory leaks that occured if errors were
+2001-09-14 (bug fix) fixed memory leaks that occurred if errors were
thrown while initializing the channel for an image. (darley)
2001-09-20 (new feature) --enable-64bit support was added for HP 11 when
@@ -7416,6 +7416,29 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
--- Released 8.6.7, August 9, 2017 --- https://core.tcl-lang.org/tk/ for details
+Changes to 8.7a1 include all changes to the 8.6 line through 8.6.7,
+plus the following, which focuses on the high-level feature changes
+in this changeset (new minor version) rather than bug fixes:
+
+2016-03-07 (feature)[841280] spinbox autoswap -to/-from to get ordering (vogel)
+
+2016-03-27 (feature)[38dc27] Support <Button-6> & <Button-7> (nijtmans)
+
+2016-08-29 (TIP 449) [text] undo/redo return character range (vogel)
+
+2016-11-02 (feature) Removed undocumented command [tk_getFileType] (vogel)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2017-02-05 (bug)[c0dbdd] Compatibility fonts shadowed system fonts (vogel)
+
+2017-03-21 (TIP 442) display text in a progressbar (zaumseil)
+
+2017-04-13 \u escaped content in msg files converted to true utf-8 (nijtmans)
+
+2017-08-28 (TIP 166) Extended color notation for alpha channel (bachmann)
+
+--- Released 8.7a1, September 8, 2017 --- http://core.tcl.tk/tk/ for details
+
2017-08-24 (bug)[f1a3ca] Memory leak in [text] B-tree (edhume3)
2017-08-24 (bug)[ee40fd] Report [console] init errors (the)
@@ -7540,7 +7563,7 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
2018-07-17 (bug)[1088825] fix frame-2.17,3.9,3.10 on Mac (vogel)
-2018-07-27 (bug)[fabed1] GIF photo support for "deferred clear code" (vogel)
+2018-07-27 (bug)[fbaed1] GIF photo support for "deferred clear code" (vogel)
2018-08-08 (feature) Modern full-screen support on Mac OSX (walzer)
@@ -7698,3 +7721,40 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
2019-11-19 (new) Partial Emoji support in text displays (nijtmans,culler)
- Released 8.6.10, Nov 21, 2019 - https://core.tcl-lang.org/tk/ for details
+
+Changes to 8.7a3 include all changes to the 8.6 line through 8.6.10,
+plus the following, which focuses on the high-level feature changes
+in this changeset (new minor version) rather than bug fixes:
+
+2017-11-25 [TIP 161] $menu -tearoff default changed to false (roseman,vogel)
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2017-12-07 [TIP 487] End support for pre-XP Windows (nijtmans)
+
+2018-03-04 [TIP 489] New subcommand [$canvas image] (pitcher,vogel)
+
+2018-05-13 [TIP 496] New options -placeholder* for entries (zaumseil,vogel)
+
+2018-09-23 [TIP 517] New option -activerelief for menus (vogel)
+
+2018-11-03 [TIP 512] Deprecate stub for Tk_MainEx() (nijtmans)
+
+2018-11-06 [TIP 415] New option -height for [$canvas create arc] (geard)
+
+2018-11-06 [TIP 518] New event <<NoMangedChild>> (oehlmann)
+
+2019-04-14 [TIP 164] New subcommand [$canvas rotate] (fellows)
+
+2019-04-14 [TIP 507] New photo image format 'svg' (zaumseil)
+
+2019-04-14 [TIP 483] Record more configuration items (cassoff)
+
+2019-04-14 [TIP 482] Record configured directory for demos (cassoff)
+
+2019-05-25 [TIP 262] New frame options -backgroundimage, -tile (fellows)
+
+2019-06-15 [TIP 528] Deprecate Tk_Offset() (nijtmans)
+
+2019-08-19 [TIP 545] Revised options for photo image format 'svg' (oehlmann)
+
+--- Released 8.7a3, November 25, 2019 --- http://core.tcl.tk/tk/ for details
diff --git a/compat/stdlib.h b/compat/stdlib.h
deleted file mode 100644
index 2c64890..0000000
--- a/compat/stdlib.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * stdlib.h --
- *
- * Declares facilities exported by the "stdlib" portion of the C library.
- * This file isn't complete in the ANSI-C sense; it only declares things
- * that are needed by Tk. This file is needed even on many systems with
- * their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare
- * all the procedures needed here (such as strtod).
- *
- * Copyright (c) 1991 The Regents of the University of California.
- * Copyright (c) 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.
- */
-
-#ifndef _STDLIB
-#define _STDLIB
-
-#ifndef _TCL
-# include <tcl.h>
-#endif
-
-extern void abort(void);
-extern double atof(const char *string);
-extern int atoi(const char *string);
-extern long atol(const char *string);
-extern char * calloc(unsigned int numElements, unsigned int size);
-extern void exit(int status);
-extern int free(char *blockPtr);
-extern char * getenv(const char *name);
-extern char * malloc(unsigned int numBytes);
-extern void qsort(void *base, int n, int size, int (*compar)(
- const void *element1, const void *element2));
-extern char * realloc(char *ptr, unsigned int numBytes);
-extern double strtod(const char *string, char **endPtr);
-extern long strtol(const char *string, char **endPtr, int base);
-extern unsigned long strtoul(const char *string, char **endPtr, int base);
-
-#endif /* _STDLIB */
diff --git a/compat/unistd.h b/compat/unistd.h
deleted file mode 100644
index be966cc..0000000
--- a/compat/unistd.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * unistd.h --
- *
- * Macros, constants and prototypes for Posix conformance.
- *
- * Copyright 1989 Regents of the University of California Permission to use,
- * copy, modify, and distribute this software and its documentation for any
- * purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies. The University of California makes
- * no representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _UNISTD
-#define _UNISTD
-
-#include <sys/types.h>
-#ifndef _TCL
-# include <tcl.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/*
- * Strict POSIX stuff goes here. Extensions go down below, in the ifndef
- * _POSIX_SOURCE section.
- */
-
-extern void _exit(int status);
-extern int access(const char *path, int mode);
-extern int chdir(const char *path);
-extern int chown(const char *path, uid_t owner, gid_t group);
-extern int close(int fd);
-extern int dup(int oldfd);
-extern int dup2(int oldfd, int newfd);
-extern int execl(const char *path, ...);
-extern int execle(const char *path, ...);
-extern int execlp(const char *file, ...);
-extern int execv(const char *path, char **argv);
-extern int execve(const char *path, char **argv, char **envp);
-extern int execvp(const char *file, char **argv);
-extern pid_t fork(void);
-extern char * getcwd(char *buf, size_t size);
-extern gid_t getegid(void);
-extern uid_t geteuid(void);
-extern gid_t getgid(void);
-extern int getgroups(int bufSize, int *buffer);
-extern pid_t getpid(void);
-extern uid_t getuid(void);
-extern int isatty(int fd);
-extern long lseek(int fd, long offset, int whence);
-extern int pipe(int *fildes);
-extern int read(int fd, char *buf, size_t size);
-extern int setgid(gid_t group);
-extern int setuid(uid_t user);
-extern unsigned sleep(unsigned seconds);
-extern char * ttyname(int fd);
-extern int unlink(const char *path);
-extern int write(int fd, const char *buf, size_t size);
-
-#ifndef _POSIX_SOURCE
-extern char * crypt(const char *, const char *);
-extern int fchown(int fd, uid_t owner, gid_t group);
-extern int flock(int fd, int operation);
-extern int ftruncate(int fd, unsigned long length);
-extern int ioctl(int fd, int request, ...);
-extern int readlink(const char *path, char *buf, int bufsize);
-extern int setegid(gid_t group);
-extern int seteuid(uid_t user);
-extern int setreuid(int ruid, int euid);
-extern int symlink(const char *, const char *);
-extern int ttyslot(void);
-extern int truncate(const char *path, unsigned long length);
-extern int vfork(void);
-#endif /* _POSIX_SOURCE */
-
-#endif /* _UNISTD */
-
diff --git a/doc/3DBorder.3 b/doc/3DBorder.3
index f2f0eb8..f589e66 100644
--- a/doc/3DBorder.3
+++ b/doc/3DBorder.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/BindTable.3 b/doc/BindTable.3
index 5130bfc..772f39f 100644
--- a/doc/BindTable.3
+++ b/doc/BindTable.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CanvPsY.3 b/doc/CanvPsY.3
index 5e104ce..f789d3c 100644
--- a/doc/CanvPsY.3
+++ b/doc/CanvPsY.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CanvasPs 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CanvTkwin.3 b/doc/CanvTkwin.3
index 3534989..5cb29fa 100644
--- a/doc/CanvTkwin.3
+++ b/doc/CanvTkwin.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CanvTxtInfo.3 b/doc/CanvTxtInfo.3
index 92a2bc3..1dd2354 100644
--- a/doc/CanvTxtInfo.3
+++ b/doc/CanvTxtInfo.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Clipboard.3 b/doc/Clipboard.3
index 3087777..cc09018 100644
--- a/doc/Clipboard.3
+++ b/doc/Clipboard.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/ClrSelect.3 b/doc/ClrSelect.3
index c56f63c..1b942b5 100644
--- a/doc/ClrSelect.3
+++ b/doc/ClrSelect.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3
index 92be073..927925c 100644
--- a/doc/ConfigWidg.3
+++ b/doc/ConfigWidg.3
@@ -107,7 +107,7 @@ typedef struct {
const char *\fIdbName\fR;
const char *\fIdbClass\fR;
const char *\fIdefValue\fR;
- int \fIoffset\fR;
+ size_t \fIoffset\fR;
int \fIspecFlags\fR;
const Tk_CustomOption *\fIcustomPtr\fR;
} \fBTk_ConfigSpec\fR;
@@ -161,9 +161,8 @@ contain information relevant to the manager of the widget; its exact
type is unknown to \fBTk_ConfigureWidget\fR. The \fIoffset\fR field
of each \fIspecs\fR entry indicates where in \fIwidgRec\fR to store
the information about this configuration option. You should use the
-\fBTk_Offset\fR macro to generate \fIoffset\fR values (see below for
-a description of \fBTk_Offset\fR). The location indicated by
-\fIwidgRec\fR and \fIoffset\fR will be referred to as the
+\fBoffsetof\fR macro to generate \fIoffset\fR values. The location
+indicated by \fIwidgRec\fR and \fIoffset\fR will be referred to as the
.QW target
in the descriptions below.
.PP
@@ -469,13 +468,6 @@ for which this entry is valid. When calling \fBTk_ConfigureWidget\fR,
\fIflags\fR will have a single one of these bits set to select the
entries for the desired widget type. For a working example of
this feature, see the code in tkButton.c.
-.SH TK_OFFSET
-.PP
-The \fBTk_Offset\fR macro is provided as a safe way of generating
-the \fIoffset\fR values for entries in Tk_ConfigSpec structures.
-It takes two arguments: the name of a type of record, and the
-name of a field in that record. It returns the byte offset of
-the named field in records of the given type.
.SH TK_CONFIGUREINFO
.PP
The \fBTk_ConfigureInfo\fR procedure may be used to obtain
diff --git a/doc/ConfigWind.3 b/doc/ConfigWind.3
index 7c7adab..3e83387 100644
--- a/doc/ConfigWind.3
+++ b/doc/ConfigWind.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CoordToWin.3 b/doc/CoordToWin.3
index 5fe96a6..1ebd681 100644
--- a/doc/CoordToWin.3
+++ b/doc/CoordToWin.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtCmHdlr.3 b/doc/CrtCmHdlr.3
index bcc9493..1ba6f63 100644
--- a/doc/CrtCmHdlr.3
+++ b/doc/CrtCmHdlr.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtConsoleChan.3 b/doc/CrtConsoleChan.3
index 7fd8a6a..d8e0740 100644
--- a/doc/CrtConsoleChan.3
+++ b/doc/CrtConsoleChan.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_InitConsoleChannels 3 8.5 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtErrHdlr.3 b/doc/CrtErrHdlr.3
index e506220..e6ebafe 100644
--- a/doc/CrtErrHdlr.3
+++ b/doc/CrtErrHdlr.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtGenHdlr.3 b/doc/CrtGenHdlr.3
index 671d105..1d6f3d5 100644
--- a/doc/CrtGenHdlr.3
+++ b/doc/CrtGenHdlr.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3
index cbbc11e..4949c50 100644
--- a/doc/CrtImgType.3
+++ b/doc/CrtImgType.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateImageType 3 8.5 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3
index 005d2e2..cd270f4 100644
--- a/doc/CrtItemType.3
+++ b/doc/CrtItemType.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateItemType 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -64,7 +64,7 @@ the standard procedures implemented by the type manager:
.CS
typedef struct Tk_ItemType {
const char *\fIname\fR;
- int \fIitemSize\fR;
+ size_t \fIitemSize\fR;
Tk_ItemCreateProc *\fIcreateProc\fR;
const Tk_ConfigSpec *\fIconfigSpecs\fR;
Tk_ItemConfigureProc *\fIconfigProc\fR;
@@ -83,6 +83,9 @@ typedef struct Tk_ItemType {
Tk_ItemInsertProc *\fIinsertProc\fR;
Tk_ItemDCharsProc *\fIdCharsProc\fR;
Tk_ItemType *\fInextPtr\fR;
+.VS "8.7, TIP164"
+ Tk_ItemRotateProc *\fIrotateProc\fR;
+.VE "8.7, TIP164"
} \fBTk_ItemType\fR;
.CE
.PP
@@ -549,6 +552,46 @@ and \fIdeltaX\fR and \fIdeltaY\fR give the amounts that should be
added to each x and y coordinate within the item.
The type manager should adjust the item's coordinates and
update the bounding box in the item's header.
+.SS ROTATEPROC
+.VS "8.7, TIP164"
+.PP
+\fItypePtr\->rotateProc\fR is invoked by Tk to rotate a canvas item
+during the \fBrotate\fR widget command.
+The procedure must match the following prototype:
+.PP
+.CS
+typedef void \fBTk_ItemRotateProc\fR(
+ Tk_Canvas \fIcanvas\fR,
+ Tk_Item *\fIitemPtr\fR,
+ double \fIoriginX\fR,
+ double \fIoriginY\fR,
+ double \fIangleRad\fR);
+.CE
+.PP
+The \fIcanvas\fR and \fIitemPtr\fR arguments have the usual meaning.
+\fIoriginX\fR and \fIoriginY\fR specify an origin relative to which
+the item is to be rotated, and \fIangleRad\fR gives the anticlockwise
+rotation to be applied in radians.
+The item should adjust the coordinates of its control points so that where
+they used to have coordinates \fIx\fR and \fIy\fR, they will have new
+coordinates \fIx\(fm\fR and \fIy\(fm\fR, where
+.PP
+.CS
+\fIrelX\fR = \fIx\fR - \fIoriginX\fR
+\fIrelY\fR = \fIy\fR - \fIoriginY\fR
+\fIx\(fm\fR = \fIoriginX\fR + \fIrelX\fR \(mu cos(\fIangleRad\fR) + \fIrelY\fR \(mu sin(\fIangleRad\fR)
+\fIy\(fm\fR = \fIoriginY\fR \(mi \fIrelX\fR \(mu sin(\fIangleRad\fR) + \fIrelY\fR \(mu cos(\fIangleRad\fR)
+.CE
+.PP
+The control points for an item are not necessarily the coordinates provided to
+the item when it is created (or via the \fItypePtr\->coordProc\fR), but could
+instead be derived from them.
+\fIrotateProc\fR must also update the bounding box in the item's header.
+.PP
+Item types do not need to provide a \fItypePtr\->rotateProc\fR. If the
+\fItypePtr\->rotateProc\fR is NULL, the \fItypePtr\->coordProc\fR will be
+used instead to retrieve and update the list of coordinates.
+.VE "8.7, TIP164"
.SS INDEXPROC
.PP
\fItypePtr\->indexProc\fR is invoked by Tk to translate a string
diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3
index c7e792a..92f2441 100644
--- a/doc/CrtPhImgFmt.3
+++ b/doc/CrtPhImgFmt.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
'\" Author: Paul Mackerras (paulus@cs.anu.edu.au),
'\" Department of Computer Science,
'\" Australian National University.
diff --git a/doc/DeleteImg.3 b/doc/DeleteImg.3
index 507be72..eb6db1e 100644
--- a/doc/DeleteImg.3
+++ b/doc/DeleteImg.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_DeleteImage 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/DrawFocHlt.3 b/doc/DrawFocHlt.3
index e2d1578..59cd069 100644
--- a/doc/DrawFocHlt.3
+++ b/doc/DrawFocHlt.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/EventHndlr.3 b/doc/EventHndlr.3
index d06de86..a2cbf8d 100644
--- a/doc/EventHndlr.3
+++ b/doc/EventHndlr.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_CreateEventHandler 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/FreeXId.3 b/doc/FreeXId.3
index dd1d141..84fef26 100644
--- a/doc/FreeXId.3
+++ b/doc/FreeXId.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -25,24 +25,6 @@ context, or colormap) that is no longer in use.
.BE
.SH DESCRIPTION
.PP
-The default allocator for resource identifiers provided by Xlib is very
-simple-minded and does not allow resource identifiers to be re-used.
-If a long-running application reaches the end of the resource id
-space, it will generate an X protocol error and crash.
-Tk replaces the default id allocator with its own allocator, which
-allows identifiers to be reused.
-In order for this to work, \fBTk_FreeXId\fR must be called to
-tell the allocator about resources that have been freed.
-Tk automatically calls \fBTk_FreeXId\fR whenever it frees a
-resource, so if you use procedures like \fBTk_GetFont\fR,
-\fBTk_GetGC\fR, and \fBTk_GetPixmap\fR then you need not call
-\fBTk_FreeXId\fR.
-However, if you allocate resources directly from Xlib, for example
-by calling \fBXCreatePixmap\fR, then you should call \fBTk_FreeXId\fR
-when you call the corresponding Xlib free procedure, such as
-\fBXFreePixmap\fR.
-If you do not call \fBTk_FreeXId\fR then the resource identifier will
-be lost, which could cause problems if the application runs long enough
-to lose all of the available identifiers.
+This function is deprecated, it doesn't do anything since 2008-08-19.
.SH KEYWORDS
resource identifier
diff --git a/doc/GeomReq.3 b/doc/GeomReq.3
index 895f683..7670521 100644
--- a/doc/GeomReq.3
+++ b/doc/GeomReq.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3
index 6526772..5d41ad6 100644
--- a/doc/GetAnchor.3
+++ b/doc/GetAnchor.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetBitmap.3 b/doc/GetBitmap.3
index c4ac44e..88418c7 100644
--- a/doc/GetBitmap.3
+++ b/doc/GetBitmap.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetCapStyl.3 b/doc/GetCapStyl.3
index 28f1a1c..4e5d1d5 100644
--- a/doc/GetCapStyl.3
+++ b/doc/GetCapStyl.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetClrmap.3 b/doc/GetClrmap.3
index 9e6da12..4b72b6c 100644
--- a/doc/GetClrmap.3
+++ b/doc/GetClrmap.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetDash.3 b/doc/GetDash.3
index d1eeb70..2087424 100644
--- a/doc/GetDash.3
+++ b/doc/GetDash.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetGC.3 b/doc/GetGC.3
index 44e06fb..6ee63a9 100644
--- a/doc/GetGC.3
+++ b/doc/GetGC.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetGC 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetHINSTANCE.3 b/doc/GetHINSTANCE.3
index de38051..980b374 100644
--- a/doc/GetHINSTANCE.3
+++ b/doc/GetHINSTANCE.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetHWND.3 b/doc/GetHWND.3
index 1a5ec2d..15d2ff0 100644
--- a/doc/GetHWND.3
+++ b/doc/GetHWND.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH HWND 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetImage.3 b/doc/GetImage.3
index f2407bc..744f9ac 100644
--- a/doc/GetImage.3
+++ b/doc/GetImage.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetJoinStl.3 b/doc/GetJoinStl.3
index a717b72..616719c 100644
--- a/doc/GetJoinStl.3
+++ b/doc/GetJoinStl.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetJustify.3 b/doc/GetJustify.3
index b51cb8d..2e871cb 100644
--- a/doc/GetJustify.3
+++ b/doc/GetJustify.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetOption.3 b/doc/GetOption.3
index 81846ad..799786d 100644
--- a/doc/GetOption.3
+++ b/doc/GetOption.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetOption 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetPixels.3 b/doc/GetPixels.3
index e7a9043..6c31af9 100644
--- a/doc/GetPixels.3
+++ b/doc/GetPixels.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetPixmap.3 b/doc/GetPixmap.3
index 927c75c..65fae2d 100644
--- a/doc/GetPixmap.3
+++ b/doc/GetPixmap.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetPixmap 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetRelief.3 b/doc/GetRelief.3
index 6e8681a..5979662 100644
--- a/doc/GetRelief.3
+++ b/doc/GetRelief.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetRootCrd.3 b/doc/GetRootCrd.3
index a9d2cd9..20520ea 100644
--- a/doc/GetRootCrd.3
+++ b/doc/GetRootCrd.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetScroll.3 b/doc/GetScroll.3
index a71986d..dd12cca 100644
--- a/doc/GetScroll.3
+++ b/doc/GetScroll.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -50,18 +50,18 @@ and parses the words starting with \fIobjv\fR[2].
The words starting with \fIobjv\fR[2] must have one of the following forms:
.CS
\fBmoveto \fIfraction\fR
-\fBscroll \fInumber\fB units\fR
\fBscroll \fInumber\fB pages\fR
+\fBscroll \fInumber\fB units\fR
.CE
.LP
-Any of the \fBmoveto\fR, \fBscroll\fR, \fBunits\fR, and \fBpages\fR
+Any of the \fBmoveto\fR, \fBscroll\fR, \fBpages\fR, and \fBunits\fR
keywords may be abbreviated.
If \fIobjv\fR has the \fBmoveto\fR form, \fBTK_SCROLL_MOVETO\fR
is returned as result and \fI*fractionPtr\fR is filled in with the
\fIfraction\fR argument to the command, which must be a proper real
value.
-If \fIobjv\fR has the \fBscroll\fR form, \fBTK_SCROLL_UNITS\fR
-or \fBTK_SCROLL_PAGES\fR is returned and \fI*stepsPtr\fR is filled
+If \fIobjv\fR has the \fBscroll\fR form, \fBTK_SCROLL_PAGES\fR
+or \fBTK_SCROLL_UNITS\fR is returned and \fI*stepsPtr\fR is filled
in with the \fInumber\fR value, which must be a proper integer.
If an error occurs in parsing the arguments, \fBTK_SCROLL_ERROR\fR
is returned and an error message is left in interpreter
diff --git a/doc/GetSelect.3 b/doc/GetSelect.3
index 8c30a2b..11e837e 100644
--- a/doc/GetSelect.3
+++ b/doc/GetSelect.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetUid.3 b/doc/GetUid.3
index 06b466a..2cd95ad 100644
--- a/doc/GetUid.3
+++ b/doc/GetUid.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetUid 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetVRoot.3 b/doc/GetVRoot.3
index a65ef78..7e6003a 100644
--- a/doc/GetVRoot.3
+++ b/doc/GetVRoot.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/GetVisual.3 b/doc/GetVisual.3
index fe3d50c..fc6b6f8 100644
--- a/doc/GetVisual.3
+++ b/doc/GetVisual.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Grab.3 b/doc/Grab.3
index 1dba2df..2741220 100644
--- a/doc/Grab.3
+++ b/doc/Grab.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH Tk_Grab 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/HWNDToWindow.3 b/doc/HWNDToWindow.3
index 9795099..a2e5a6c 100644
--- a/doc/HWNDToWindow.3
+++ b/doc/HWNDToWindow.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/HandleEvent.3 b/doc/HandleEvent.3
index 38b5660..af3fde6 100644
--- a/doc/HandleEvent.3
+++ b/doc/HandleEvent.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_HandleEvent 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/IdToWindow.3 b/doc/IdToWindow.3
index f6e397d..f8ce1f9 100644
--- a/doc/IdToWindow.3
+++ b/doc/IdToWindow.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_IdToWindow 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/ImgChanged.3 b/doc/ImgChanged.3
index f4d2c04..ccf0c11 100644
--- a/doc/ImgChanged.3
+++ b/doc/ImgChanged.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ImageChanged 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Inactive.3 b/doc/Inactive.3
index 0d2a1b7..42ae5b8 100644
--- a/doc/Inactive.3
+++ b/doc/Inactive.3
@@ -1,7 +1,7 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
.TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/InternAtom.3 b/doc/InternAtom.3
index a16eee1..e6756a5 100644
--- a/doc/InternAtom.3
+++ b/doc/InternAtom.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_InternAtom 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/MainLoop.3 b/doc/MainLoop.3
index ed4d0ea..770f254 100644
--- a/doc/MainLoop.3
+++ b/doc/MainLoop.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_MainLoop 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/MainWin.3 b/doc/MainWin.3
index c3af3e7..94bd7e2 100644
--- a/doc/MainWin.3
+++ b/doc/MainWin.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_MainWindow 3 7.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/MaintGeom.3 b/doc/MaintGeom.3
index d1c2d1c..b34e797 100644
--- a/doc/MaintGeom.3
+++ b/doc/MaintGeom.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/ManageGeom.3 b/doc/ManageGeom.3
index 520546f..ba12aca 100644
--- a/doc/ManageGeom.3
+++ b/doc/ManageGeom.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3
index 00bbaa5..f67627f 100644
--- a/doc/MoveToplev.3
+++ b/doc/MoveToplev.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Name.3 b/doc/Name.3
index 4b9c5bc..1653cf5 100644
--- a/doc/Name.3
+++ b/doc/Name.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_Name 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/OwnSelect.3 b/doc/OwnSelect.3
index ed9bcab..0e16eac 100644
--- a/doc/OwnSelect.3
+++ b/doc/OwnSelect.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/ParseArgv.3 b/doc/ParseArgv.3
index 7749d92..727dcfa 100644
--- a/doc/ParseArgv.3
+++ b/doc/ParseArgv.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -72,8 +72,8 @@ expected; each of its entries has the following structure:
typedef struct {
const char *\fIkey\fR;
int \fItype\fR;
- char *\fIsrc\fR;
- char *\fIdst\fR;
+ void *\fIsrc\fR;
+ void *\fIdst\fR;
const char *\fIhelp\fR;
} \fBTk_ArgvInfo\fR;
.CE
@@ -312,13 +312,13 @@ Boolean exec = FALSE;
* Define option descriptions.
*/
Tk_ArgvInfo argTable[] = {
- {"\-X", TK_ARGV_CONSTANT, (char *) 1, (char *) &debugFlag,
+ {"\-X", TK_ARGV_CONSTANT, (char *) 1, &debugFlag,
"Turn on debugging printfs"},
- {"\-N", TK_ARGV_INT, NULL, (char *) &numReps,
+ {"\-N", TK_ARGV_INT, NULL, &numReps,
"Number of repetitions"},
- {"\-of", TK_ARGV_STRING, NULL, (char *) &fileName,
+ {"\-of", TK_ARGV_STRING, NULL, &fileName,
"Name of file for output"},
- {"x", TK_ARGV_REST, NULL, (char *) &exec,
+ {"x", TK_ARGV_REST, NULL, &exec,
"File to exec, followed by any arguments (must be last argument)."},
{NULL, TK_ARGV_END, NULL, NULL,
NULL}
diff --git a/doc/QWinEvent.3 b/doc/QWinEvent.3
index caa5026..9c43ce5 100644
--- a/doc/QWinEvent.3
+++ b/doc/QWinEvent.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_QueueWindowEvent 3 7.5 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Restack.3 b/doc/Restack.3
index 2b9097f..5cd02eb 100644
--- a/doc/Restack.3
+++ b/doc/Restack.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_RestackWindow 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/RestrictEv.3 b/doc/RestrictEv.3
index 22014a7..8b3af07 100644
--- a/doc/RestrictEv.3
+++ b/doc/RestrictEv.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/SetAppName.3 b/doc/SetAppName.3
index 3978850..91516a0 100644
--- a/doc/SetAppName.3
+++ b/doc/SetAppName.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/SetCaret.3 b/doc/SetCaret.3
index fd63f18..24cc18c 100644
--- a/doc/SetCaret.3
+++ b/doc/SetCaret.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetCaretPos 3 8.4 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/SetClass.3 b/doc/SetClass.3
index 707975d..0ea81bb 100644
--- a/doc/SetClass.3
+++ b/doc/SetClass.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetClass 3 "" Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/SetClassProcs.3 b/doc/SetClassProcs.3
index 99eb81c..53f7cce 100644
--- a/doc/SetClassProcs.3
+++ b/doc/SetClassProcs.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetClassProcs 3 8.4 Tk "Tk Library Procedures"
.so man.macros
.BS
@@ -33,7 +33,7 @@ are used as callbacks in different places.
The structure pointed to by \fIprocs\fR contains the following:
.CS
typedef struct Tk_ClassProcs {
- unsigned int \fIsize\fR;
+ size_t \fIsize\fR;
Tk_ClassWorldChangedProc *\fIworldChangedProc\fR;
Tk_ClassCreateProc *\fIcreateProc\fR;
Tk_ClassModalProc *\fImodalProc\fR;
diff --git a/doc/SetGrid.3 b/doc/SetGrid.3
index 28e428b..ea32afb 100644
--- a/doc/SetGrid.3
+++ b/doc/SetGrid.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/SetOptions.3 b/doc/SetOptions.3
index b5f0782..f5966cb 100644
--- a/doc/SetOptions.3
+++ b/doc/SetOptions.3
@@ -3,12 +3,12 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetOptions 3 8.1 Tk "Tk Library Procedures"
.so man.macros
.BS
.SH NAME
-Tk_CreateOptionTable, Tk_DeleteOptionTable, Tk_InitOptions, Tk_SetOptions, Tk_FreeSavedOptions, Tk_RestoreSavedOptions, Tk_GetOptionValue, Tk_GetOptionInfo, Tk_FreeConfigOptions, Tk_Offset \- process configuration options
+Tk_CreateOptionTable, Tk_DeleteOptionTable, Tk_InitOptions, Tk_SetOptions, Tk_FreeSavedOptions, Tk_RestoreSavedOptions, Tk_GetOptionValue, Tk_GetOptionInfo, Tk_FreeConfigOptions \- process configuration options
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
@@ -35,9 +35,6 @@ Tcl_Obj *
\fBTk_GetOptionInfo(\fIinterp, recordPtr, optionTable, namePtr, tkwin\fB)\fR
.sp
\fBTk_FreeConfigOptions(\fIrecordPtr, optionTable, tkwin\fB)\fR
-.sp
-int
-\fBTk_Offset(\fItype, field\fB)\fR
.SH ARGUMENTS
.AS Tk_SavedOptions "*const objv[]" in/out
.AP Tcl_Interp *interp in
@@ -52,7 +49,7 @@ pointed to by this argument must exist for the lifetime of the Tk_OptionTable.
.AP Tk_OptionTable optionTable in
Token for an option table. Must have been returned by a previous call
to \fBTk_CreateOptionTable\fR.
-.AP char *recordPtr in/out
+.AP void *recordPtr in/out
Points to structure in which values of configuration options are stored;
fields of this record are modified by procedures such as \fBTk_SetOptions\fR
and read by procedures such as \fBTk_GetOptionValue\fR.
@@ -239,12 +236,6 @@ is returned and an error message is left in \fIinterp\fR's result unless
\fBTk_FreeConfigOptions\fR must be invoked when a widget is deleted.
It frees all of the resources associated with any of the configuration
options defined in \fIrecordPtr\fR by \fIoptionTable\fR.
-.PP
-The \fBTk_Offset\fR macro is provided as a safe way of generating the
-\fIobjOffset\fR and \fIinternalOffset\fR values for entries in
-Tk_OptionSpec structures. It takes two arguments: the name of a type
-of record, and the name of a field in that record. It returns the byte
-offset of the named field in records of the given type.
.SH "TEMPLATES"
.PP
The array of Tk_OptionSpec structures passed to \fBTk_CreateOptionTable\fR
@@ -258,8 +249,8 @@ typedef struct {
const char *\fIdbName\fR;
const char *\fIdbClass\fR;
const char *\fIdefValue\fR;
- int \fIobjOffset\fR;
- int \fIinternalOffset\fR;
+ size_t \fIobjOffset\fR;
+ size_t \fIinternalOffset\fR;
int \fIflags\fR;
const void *\fIclientData\fR;
int \fItypeMask\fR;
@@ -281,7 +272,7 @@ value is specified in the option database. The \fIobjOffset\fR and
\fIinternalOffset\fR fields indicate where to store the value of this
option in widget records (more on this below); values for the \fIobjOffset\fR
and \fIinternalOffset\fR fields should always be generated with the
-\fBTk_Offset\fR macro.
+\fBoffsetof\fR macro.
The \fIflags\fR field contains additional information
to control the processing of this configuration option (see below
for details).
diff --git a/doc/SetVisual.3 b/doc/SetVisual.3
index 6d3fd83..a5b9efd 100644
--- a/doc/SetVisual.3
+++ b/doc/SetVisual.3
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/StrictMotif.3 b/doc/StrictMotif.3
index 4319d53..ec9319f 100644
--- a/doc/StrictMotif.3
+++ b/doc/StrictMotif.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/TkInitStubs.3 b/doc/TkInitStubs.3
index 04f5611..57ec9e6 100644
--- a/doc/TkInitStubs.3
+++ b/doc/TkInitStubs.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_InitStubs 3 8.4 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/Tk_Init.3 b/doc/Tk_Init.3
index 7bc46dd..fc29318 100644
--- a/doc/Tk_Init.3
+++ b/doc/Tk_Init.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
.so man.macros
.BS
diff --git a/doc/bell.n b/doc/bell.n
index 21c4f1b..3e8d112 100644
--- a/doc/bell.n
+++ b/doc/bell.n
@@ -5,7 +5,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH bell n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/bind.n b/doc/bind.n
index 1ecae86..8703425 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -352,7 +352,7 @@ position in the stacking order.
.PP
The last part of a long event specification is \fIdetail\fR. In the
case of a \fBButtonPress\fR or \fBButtonRelease\fR event, it is the
-number of a button (1\-5). If a button number is given, then only an
+number of a button (1\-9). If a button number is given, then only an
event on that particular button will match; if no button number is
given, then an event on any button will match. Note: giving a
specific button number is different than specifying a button modifier;
@@ -633,8 +633,9 @@ several matching sequences is more specific:
an event pattern that specifies a specific button or key is more specific
than one that does not;
.IP (b)
-a longer sequence (in terms of number
-of events matched) is more specific than a shorter sequence;
+a sequence with the most highest-ordered patterns (in term of highest
+repetition count) is more specific than a sequence with less
+highest-ordered patterns;
.IP (c)
if the modifiers specified in one pattern are a subset of the
modifiers in another pattern, then the pattern with more modifiers
diff --git a/doc/bindtags.n b/doc/bindtags.n
index dc3973b..51c2ca9 100644
--- a/doc/bindtags.n
+++ b/doc/bindtags.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH bindtags n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/bitmap.n b/doc/bitmap.n
index ead3311..1751913 100644
--- a/doc/bitmap.n
+++ b/doc/bitmap.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH bitmap n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/busy.n b/doc/busy.n
index ab2fd8a..3274524 100644
--- a/doc/busy.n
+++ b/doc/busy.n
@@ -28,10 +28,12 @@
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
-busy \- confine pointer events to a window sub-tree
+busy \- Make Tk widgets busy, temporarily blocking user interactions
.SH SYNOPSIS
\fBtk busy\fR \fIwindow \fR?\fIoptions\fR?
.sp
+\fBtk busy busywindow \fIwindow\fR
+.sp
\fBtk busy hold\fR \fIwindow \fR?\fIoptions\fR?
.sp
\fBtk busy configure \fIwindow\fR ?\fIoption value\fR?...
@@ -44,8 +46,8 @@ busy \- confine pointer events to a window sub-tree
.BE
.SH DESCRIPTION
.PP
-The \fBtk busy\fR command provides a simple means to block pointer events from
-Tk widgets, while overriding the widget's cursor with a configurable busy
+The \fBtk busy\fR command provides a simple means to block mouse pointer events
+from Tk widgets, while overriding the widget's cursor with a configurable busy
cursor. Note this command does not prevent keyboard events from being sent to
the widgets made busy.
.SH INTRODUCTION
@@ -128,24 +130,11 @@ The following operations are available for the \fBtk busy\fR command:
.
Shortcut for \fBtk busy hold\fR command.
.TP
-\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?...
+\fBtk busy busywindow \fIwindow\fR
.
-Makes the specified \fIwindow\fR (and its descendants in the Tk window
-hierarchy) appear busy. \fIWindow\fR must be a valid path name of a Tk widget.
-A transparent window is put in front of the specified window. This transparent
-window is mapped the next time idle tasks are processed, and the specified
-window and its descendants will be blocked from user interactions. Normally
-\fBupdate\fR should be called immediately afterward to insure that the hold
-operation is in effect before the application starts its processing. The
-following configuration options are valid:
-.RS
-.TP
-\fB\-cursor \fIcursorName\fR
-.
-Specifies the cursor to be displayed when the widget is made busy.
-\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The
-default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms.
-.RE
+Returns the pathname of the busy window (i.e. the transparent window
+shielding the window appearing busy) created by the \fBtk busy hold\fR
+command for \fIwindow\fR, or the empty string if \fIwindow\fR is not busy.
.TP
\fBtk busy cget \fIwindow\fR \fIoption\fR
.
@@ -181,6 +170,12 @@ option add *Frame.BusyCursor gumby
.CE
.RE
.TP
+\fBtk busy current \fR?\fIpattern\fR?
+.
+Returns the pathnames of all widgets that are currently busy. If a
+\fIpattern\fR is given, only the path names of busy widgets matching
+\fIpattern\fR are returned.
+.TP
\fBtk busy forget \fIwindow\fR ?\fIwindow\fR?...
.
Releases resources allocated by the \fBtk busy\fR command for \fIwindow\fR,
@@ -189,11 +184,26 @@ including the transparent window. User events will again be received by
\fIWindow\fR must be the name of a widget specified in the \fBhold\fR
operation, otherwise an error is reported.
.TP
-\fBtk busy current \fR?\fIpattern\fR?
+\fBtk busy hold \fIwindow\fR ?\fIoption value\fR?...
.
-Returns the pathnames of all widgets that are currently busy. If a
-\fIpattern\fR is given, only the path names of busy widgets matching
-\fIpattern\fR are returned.
+Makes the specified \fIwindow\fR (and its descendants in the Tk window
+hierarchy) appear busy. \fIWindow\fR must be a valid path name of a Tk widget.
+A transparent window is put in front of the specified window. This transparent
+window is mapped the next time idle tasks are processed, and the specified
+window and its descendants will be blocked from user interactions. Normally
+\fBupdate\fR should be called immediately afterward to insure that the hold
+operation is in effect before the application starts its processing. The
+command returns the pathname of the busy window that was created (i.e. the
+transparent window shielding the window appearing busy). The following
+configuration options are valid:
+.RS
+.TP
+\fB\-cursor \fIcursorName\fR
+.
+Specifies the cursor to be displayed when the widget is made busy.
+\fICursorName\fR can be in any form accepted by \fBTk_GetCursor\fR. The
+default cursor is \fBwait\fR on Windows and \fBwatch\fR on other platforms.
+.RE
.TP
\fBtk busy status \fIwindow\fR
.
@@ -206,32 +216,18 @@ The event blocking feature is implemented by creating and mapping a
transparent window that completely covers the widget. When the busy window is
mapped, it invisibly shields the widget and its hierarchy from all events that
may be sent. Like Tk widgets, busy windows have widget names in the Tk window
-hierarchy. This means that you can use the \fBbind\fR command, to handle
-events in the busy window.
+hierarchy. This means that you can use the \fBbind\fR command to handle
+events in the busy window:
.PP
.CS
\fBtk busy\fR hold .frame.canvas
-bind .frame.canvas_Busy <Enter> { ... }
+bind [\fBtk busy\fR busywindow .frame.canvas] <Enter> { ... }
.CE
.PP
-Normally the busy window is a sibling of the widget. The name of the busy
-window is
-.QW \fIwidget\fB_Busy\fR
-where \fIwidget\fR is the name of the widget to be made busy. In the previous
-example, the pathname of the busy window is
-.QW \fB.frame.canvas_Busy\fR .
-The exception is when the widget is a toplevel widget (such as
-.QW . )
-where the busy window can't be made a sibling. The busy window is then a child
-of the widget named
-.QW \fIwidget\fB._Busy\fR
-where \fIwidget\fR is the name of the toplevel widget. In the following
-example, the pathname of the busy window is
-.QW \fB._Busy\fR .
-.PP
+or
.CS
-\fBtk busy\fR hold .
-bind ._Busy <Enter> { ... }
+set busyWin [\fBtk busy\fR hold .frame.canvas]
+bind $busyWin <Enter> { ... }
.CE
.SS "ENTER/LEAVE EVENTS"
.PP
diff --git a/doc/canvas.n b/doc/canvas.n
index 7dbfd19..8f98ff9 100644
--- a/doc/canvas.n
+++ b/doc/canvas.n
@@ -220,8 +220,12 @@ for scrolling.
Canvases do not support scaling or rotation of the canvas coordinate
system relative to the window coordinate system.
.PP
-Individual items may be moved or scaled using widget commands
-described below, but they may not be rotated.
+Individual items may be moved, scaled
+.VS "8.7, TIP164"
+or rotated
+.VE "8.7, TIP164"
+using widget commands
+described below.
.PP
Note that the default origin of the canvas's visible area is
coincident with the origin for the whole window as that makes bindings
@@ -313,6 +317,7 @@ The second possible syntax is a character list containing only
The space can be used
to enlarge the space between other line elements, and cannot
occur as the first position in the string. Some examples:
+.PP
.CS
\-dash . \(-> \-dash {2 4}
\-dash - \(-> \-dash {6 4}
@@ -658,14 +663,27 @@ command, above), but the cursor position may
be set even when the item does not have the focus.
This command returns an empty string.
.TP
+\fIpathName \fBimage \fIimagename\fR ?\fIsubsample\fR? ?\fIzoom\fR?
+.
+Draw the canvas into the Tk photo image named \fIimagename\fR. If a \fB-scrollregion\fR
+has been defined then this will be the boundaries of the canvas region drawn and the
+final size of the photo image. Otherwise the widget width and height with an origin
+of 0,0 will be the size of the canvas region drawn and the final size of the photo
+image. Optionally an integer \fIsubsample\fR factor may be given and the photo image
+will be reduced in size. In addition to the \fIsubsample\fR an integer \fIzoom\fR
+factor can also be given and the photo image will be enlarged. The image background
+will be filled with the canvas background colour. The canvas widget does not need to
+be mapped for this widget command to work, but at least one of it's ancestors must be
+mapped.
+This command returns an empty string.
+.TP
\fIpathName \fBimove \fItagOrId index x y\fR
-.VS 8.6
+.
This command causes the \fIindex\fR'th coordinate of each of the items
indicated by \fItagOrId\fR to be relocated to the location (\fIx\fR,\fIy\fR).
Each item interprets \fIindex\fR independently according to the rules
described in \fBINDICES\fR above. Out of the standard set of items, only line
and polygon items may have their coordinates relocated this way.
-.VE 8.6
.TP
\fIpathName \fBindex \fItagOrId index\fR
.
@@ -751,7 +769,7 @@ each point associated with the item.
This command returns an empty string.
.TP
\fIpathName \fBmoveto \fItagOrId xPos yPos\fR
-.VS 8.6
+.
Move the items given by \fItagOrId\fR in the canvas coordinate
space so that the first coordinate pair of the bottommost item with
tag \fItagOrId\fR is located at
@@ -760,7 +778,6 @@ the empty string, in which case the corresponding coordinate
will be unchanged. All items matching
\fItagOrId\fR remain in the same positions relative to each other.
This command returns an empty string.
-.VE 8.6
.TP
\fIpathName \fBpostscript \fR?\fIoption value option value ...\fR?
.
@@ -946,7 +963,7 @@ determined by the \fBraise\fR command and \fBlower\fR command, not the
.RE
.TP
\fIpathName \fBrchars \fItagOrId first last string\fR
-.VS 8.6
+.
This command causes the text or coordinates between \fIfirst\fR and \fIlast\fR
for each of the items indicated by \fItagOrId\fR to be replaced by
\fIstring\fR. Each item interprets \fIfirst\fR and \fIlast\fR independently
@@ -955,7 +972,27 @@ set of items, text items support this operation by altering their text as
directed, and line and polygon items support this operation by altering their
coordinate list (in which case \fIstring\fR should be a list of coordinates to
use as a replacement). The other items ignore this operation.
-.VE 8.6
+.TP
+\fIpathName \fBrotate \fItagOrId xOrigin yOrigin angle\fR
+.VS "8.7, TIP164"
+Rotate the coordinates of all of the items given by \fItagOrId\fR in canvas
+coordinate space.
+\fIXOrigin\fR and \fIyOrigin\fR identify the origin for the rotation
+operation and \fIangle\fR identifies the amount to rotate the coordinates
+anticlockwise, in degrees. (Negative values rotate clockwise.)
+This command returns an empty string.
+.RS
+.PP
+Implementation note: not all item types work the same with rotations. In
+particular,\fB bitmap\fR,\fB image\fR,\fB text\fR and\fB window\fR items only
+rotate their anchor points and do not rotate the items themselves about those
+points, and the \fBarc\fR, \fBoval\fR and \fBrectangle\fR types rotate about a
+computed center point instead of moving the bounding box coordinates directly.
+.PP
+Some items (currently \fBarc\fR and\fB text\fR) have angles in their options;
+this command \fIdoes not\fR affect those options.
+.RE
+.VE "8.7, TIP164"
.TP
\fIpathName \fBscale \fItagOrId xOrigin yOrigin xScale yScale\fR
.
@@ -1110,16 +1147,16 @@ total width of the canvas is off-screen to the left.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR or an abbreviation
of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right in units
-of the \fBxScrollIncrement\fR option, if it is greater than zero,
-or in units of one-tenth the window's width otherwise.
If \fIwhat is \fBpages\fR then the view
adjusts in units of nine-tenths the window's width.
If \fInumber\fR is negative then information farther to the left
becomes visible; if it is positive then information farther to the right
becomes visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts left or right in units
+of the \fBxScrollIncrement\fR option, if it is greater than zero,
+or in units of one-tenth the window's width otherwise.
.RE
.TP
\fIpathName \fByview \fI?args\fR?
@@ -1151,15 +1188,15 @@ area is off-screen to the top.
This command adjusts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down in units
-of the \fByScrollIncrement\fR option, if it is greater than zero,
-or in units of one-tenth the window's height otherwise.
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR.
If \fIwhat\fR is \fBpages\fR then
the view adjusts in units of nine-tenths the window's height.
If \fInumber\fR is negative then higher information becomes
visible; if it is positive then lower information
becomes visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts up or down in units
+of the \fByScrollIncrement\fR option, if it is greater than zero,
+or in units of one-tenth the window's height otherwise.
.RE
.SH "OVERVIEW OF ITEM TYPES"
.PP
@@ -1323,8 +1360,8 @@ arc's region.
.PP
Items of type \fBarc\fR appear on the display as arc-shaped regions.
An arc is a section of an oval delimited by two angles (specified
-by the \fB\-start\fR and \fB\-extent\fR options) and displayed in
-one of several ways (specified by the \fB\-style\fR option).
+by either the \fB\-start\fR and \fB\-extent\fR options or the \fB\-height\fR option)
+and displayed in one of several ways (specified by the \fB\-style\fR option).
Arcs are created with widget commands of the following form:
.CS
\fIpathName \fBcreate arc \fIx1 y1 x2 y2 \fR?\fIoption value ...\fR?
@@ -1332,7 +1369,9 @@ Arcs are created with widget commands of the following form:
.CE
The arguments \fIx1\fR, \fIy1\fR, \fIx2\fR, and \fIy2\fR or \fIcoordList\fR give
the coordinates of two diagonally opposite corners of a
-rectangular region enclosing the oval that defines the arc.
+rectangular region enclosing the oval that defines the arc (except when
+\fB\-height\fR is specified - see below).
+.
After the coordinates there may be any number of \fIoption\fR\-\fIvalue\fR
pairs, each of which sets one of the configuration options
for the item. These same \fIoption\fR\-\fIvalue\fR pairs may be
@@ -1373,6 +1412,34 @@ arc.
\fIDegrees\fR is given in units of degrees measured counter-clockwise
from the 3-o'clock position; it may be either positive or negative.
.TP
+\fB\-height \fIdistance\fR
+Provides a shortcut for creating a circular arc segment by defining the
+distance of the mid-point of the arc from its chord. When this option
+is used the coordinates are interpreted as the start and end coordinates
+of the chord, and the options \fB\-start\fR and \fB-extent\fR are ignored.
+The value of \fIdistance\fR has the following meaning:
+.RS
+.PP
+.RS
+\fIdistance\fR > 0 creates a clockwise arc
+.br
+\fIdistance\fR < 0 creates an counter-clockwise arc
+.br
+\fIdistance\fR = 0 creates an arc as if this option had not been specified
+.RE
+.PP
+If you want the arc to have a specific radius, \fIr\fR, use the formula:
+.PP
+.RS
+\fIdistance\fR = \fIr\fR \(+- sqrt(\fIr\fR**2 - (chordLength / 2)**2)
+.RE
+.PP
+choosing the minus sign for the minor arc and the plus sign for the major arc.
+.PP
+Note that \fBitemcget \-height\fR always returns 0 so that introspection code
+can be kept simple.
+.RE
+.TP
\fB\-style \fItype\fR
Specifies how to draw the arc. If \fItype\fR is \fBpieslice\fR
(the default) then the arc's region is defined by a section
@@ -1788,13 +1855,12 @@ The following standard options are supported by text items:
The following extra options are supported for text items:
.TP
\fB\-angle \fIrotationDegrees\fR
-.VS 8.6
+.
\fIRotationDegrees\fR tells how many degrees to rotate the text anticlockwise
about the positioning point for the text; it may have any floating-point value
from 0.0 to 360.0. For example, if \fIrotationDegrees\fR is \fB90\fR, then the
text will be drawn vertically from bottom to top.
This option defaults to \fB0.0\fR.
-.VE 8.6
.TP
\fB\-font \fIfontName\fR
Specifies the font to use for the text item.
diff --git a/doc/chooseColor.n b/doc/chooseColor.n
index 015b17d..3fa6de3 100644
--- a/doc/chooseColor.n
+++ b/doc/chooseColor.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_chooseColor n 4.2 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/colors.n b/doc/colors.n
index 7a7b5b3..0d3c162 100644
--- a/doc/colors.n
+++ b/doc/colors.n
@@ -943,11 +943,11 @@ predecessor.
systemControlAccentColor
systemControlTextColor
systemDisabledControlTextColor
-systemLabelColor
-systemSelectedTextBackgroundColor
+systemLabelColor
+systemSelectedTextBackgroundColor
systemSelectedTextColor
systemTextBackgroundColor
-systemTextColor
+systemTextColor
systemWindowBackgroundColor
systemWindowBackgroundColor1
systemWindowBackgroundColor2
diff --git a/doc/console.n b/doc/console.n
index 1313d3a..d4d8a74 100644
--- a/doc/console.n
+++ b/doc/console.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH console n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/cursors.n b/doc/cursors.n
index 1662de4..a728755 100644
--- a/doc/cursors.n
+++ b/doc/cursors.n
@@ -1,9 +1,9 @@
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
-'\"
+'\"
'\" Copyright (c) 2006-2007 Daniel A. Steffen <das@users.sourceforge.net>
-'\"
+'\"
.TH cursors n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/destroy.n b/doc/destroy.n
index 3d4743a..b10c679 100644
--- a/doc/destroy.n
+++ b/doc/destroy.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH destroy n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/dialog.n b/doc/dialog.n
index d2031d3..e4938d2 100644
--- a/doc/dialog.n
+++ b/doc/dialog.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_dialog n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/entry.n b/doc/entry.n
index ccfcd24..4589af0 100644
--- a/doc/entry.n
+++ b/doc/entry.n
@@ -5,7 +5,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH entry n 8.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -23,6 +23,7 @@ entry \- Create and manipulate 'entry' one-line text entry widgets
\-foreground \-insertwidth \-xscrollcommand
\-highlightbackground \-justify
\-highlightcolor \-relief
+\-placeholder \-placeholderforeground
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-disabledbackground disabledBackground DisabledBackground
@@ -403,14 +404,14 @@ way through the text appears at the left edge of the window.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR or an abbreviation
of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR average-width characters on the display; if it is
-\fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
-If \fInumber\fR is negative then characters farther to the left
-become visible; if it is positive then characters farther to the right
+If \fIwhat\fR is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
+If \fInumber\fR is negative then characters farther to the left become
+visible; if it is positive then characters farther to the right
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
+\fInumber\fR average-width characters on the display.
.RE
.SH "DEFAULT BINDINGS"
.PP
diff --git a/doc/focus.n b/doc/focus.n
index 4b8bb2a..e3efcd3 100644
--- a/doc/focus.n
+++ b/doc/focus.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH focus n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/focusNext.n b/doc/focusNext.n
index ffcf971..3283d4b 100644
--- a/doc/focusNext.n
+++ b/doc/focusNext.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_focusNext n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/fontchooser.n b/doc/fontchooser.n
index bdd51c7..65aa8e7 100644
--- a/doc/fontchooser.n
+++ b/doc/fontchooser.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH fontchooser n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/frame.n b/doc/frame.n
index f2fbd96..54e8e2f 100644
--- a/doc/frame.n
+++ b/doc/frame.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH frame n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -25,6 +25,16 @@ except that its value may also be specified as an empty string.
In this case, the widget will display no background or border, and
no colors will be consumed from its colormap for its background
and border.
+.VS "8.7, TIP262"
+An empty background will disable drawing the background image.
+.OP \-backgroundimage backgroundImage BackgroundImage
+This specifies an image to display on the frame's background within
+the border of the frame (i.e., the image will be clipped by the
+frame's highlight ring and border, if either are present); subwidgets
+of the frame will be drawn on top. The image must have been created
+with the \fBimage create\fR command. If specified as the empty string,
+no image will be displayed.
+.VE "8.7, TIP262"
.OP \-class class Class
Specifies a class for the window.
This class will be used when querying the option database for
@@ -62,6 +72,15 @@ sets the total height of the frame, any \fB\-borderwidth\fR or similar is
not added. Normally \fB\-height\fR should not be used if a propagating
geometry manager, such as \fBgrid\fR or \fBpack\fR, is used within the
frame since the geometry manager will override the height of the frame.
+.OP \-tile tile Tile
+.VS "8.7, TIP262"
+This specifies how to draw the background image (see
+\fB\-backgroundimage\fR) on the frame.
+If true (according to \fBTcl_GetBoolean\fR), the image will be tiled
+to fill the whole frame, with the origin of the first copy of the
+image being the top left of the interior of the frame.
+If false (the default), the image will be centered within the frame.
+.VE "8.7, TIP262"
.OP \-visual visual Visual
Specifies visual information for the new window in any of the
forms accepted by \fBTk_GetVisual\fR.
@@ -91,7 +110,7 @@ path name of the new window.
.PP
A frame is a simple widget. Its primary purpose is to act as a
spacer or container for complex window layouts. The only features
-of a frame are its background color and an optional 3-D border to make the
+of a frame are its background and an optional 3-D border to make the
frame appear raised or sunken.
.SH "WIDGET COMMAND"
.PP
diff --git a/doc/grab.n b/doc/grab.n
index c45e26a..cee3ce7 100644
--- a/doc/grab.n
+++ b/doc/grab.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH grab n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/grid.n b/doc/grid.n
index eb658e7..3da8cfb 100644
--- a/doc/grid.n
+++ b/doc/grid.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH grid n 8.5 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -177,7 +177,7 @@ If a slave's cell is larger than its requested dimensions, this
option may be used to position (or stretch) the slave within its cell.
\fIStyle\fR is a string that contains zero or more of the characters
\fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR.
-The string can optionally contains spaces or
+The string can optionally contain spaces or
commas, but they are ignored. Each letter refers to a side (north, south,
east, or west) that the slave will
.QW stick
@@ -202,6 +202,14 @@ The slaves will no longer be managed by the grid geometry manager.
The configuration options for that window are forgotten, so that if the
slave is managed once more by the grid geometry manager, the initial
default settings are used.
+.RS
+.PP
+.VS TIP518
+If the last slave of the master becomes unmanaged, this will also send
+the virtual event \fB<<NoManagedChild>>\fR to the master; the master
+may choose to resize itself (or otherwise respond) to such a change.
+.VE TIP518
+.RE
.TP
\fBgrid info \fIslave\fR
.
@@ -278,6 +286,14 @@ However, the configuration options for that window are remembered,
so that if the
slave is managed once more by the grid geometry manager, the previous
values are retained.
+.RS
+.PP
+.VS TIP518
+If the last slave of the master becomes unmanaged, this will also send
+the virtual event \fB<<NoManagedChild>>\fR to the master; the master
+may choose to resize itself (or otherwise respond) to such a change.
+.VE TIP518
+.RE
.TP
\fBgrid size \fImaster\fR
.
diff --git a/doc/image.n b/doc/image.n
index fd51cc0..70f5acf 100644
--- a/doc/image.n
+++ b/doc/image.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH image n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/keysyms.n b/doc/keysyms.n
index d5822a6..e107219 100644
--- a/doc/keysyms.n
+++ b/doc/keysyms.n
@@ -456,6 +456,7 @@ Cyrillic_lje 1705 0x6A9
Cyrillic_nje 1706 0x6AA
Serbian_tshe 1707 0x6AB
Macedonia_kje 1708 0x6AC
+Ukrainian_ghe_with_upturn 1709 0x6AD
Byelorussian_shortu 1710 0x6AE
Cyrillic_dzhe 1711 0x6AF
numerosign 1712 0x6B0
@@ -471,6 +472,7 @@ Cyrillic_LJE 1721 0x6B9
Cyrillic_NJE 1722 0x6BA
Serbian_TSHE 1723 0x6BB
Macedonia_KJE 1724 0x6BC
+Ukrainian_GHE_WITH_UPTURN 1725 0x6BD
Byelorussian_SHORTU 1726 0x6BE
Cyrillic_DZHE 1727 0x6BF
Cyrillic_yu 1728 0x6C0
@@ -542,11 +544,9 @@ Greek_EPSILONaccent 1954 0x7A2
Greek_ETAaccent 1955 0x7A3
Greek_IOTAaccent 1956 0x7A4
Greek_IOTAdieresis 1957 0x7A5
-Greek_IOTAaccentdiaeresis 1958 0x7A6
Greek_OMICRONaccent 1959 0x7A7
Greek_UPSILONaccent 1960 0x7A8
Greek_UPSILONdieresis 1961 0x7A9
-Greek_UPSILONaccentdieresis 1962 0x7AA
Greek_OMEGAaccent 1963 0x7AB
Greek_accentdieresis 1966 0x7AE
Greek_horizbar 1967 0x7AF
@@ -728,6 +728,7 @@ rightsinglequotemark 2769 0xAD1
leftdoublequotemark 2770 0xAD2
rightdoublequotemark 2771 0xAD3
prescription 2772 0xAD4
+permille 2773 0xAD5
minutes 2774 0xAD6
seconds 2775 0xAD7
latincross 2777 0xAD9
@@ -815,6 +816,355 @@ hebrew_qoph 3319 0xCF7
hebrew_resh 3320 0xCF8
hebrew_shin 3321 0xCF9
hebrew_taw 3322 0xCFA
+Thai_kokai 3489 0xDA1
+Thai_khokhai 3490 0xDA2
+Thai_khokhuat 3491 0xDA3
+Thai_khokhwai 3492 0xDA4
+Thai_khokhon 3493 0xDA5
+Thai_khorakhang 3494 0xDA6
+Thai_ngongu 3495 0xDA7
+Thai_chochan 3496 0xDA8
+Thai_choching 3497 0xDA9
+Thai_chochang 3498 0xDAA
+Thai_soso 3499 0xDAB
+Thai_chochoe 3500 0xDAC
+Thai_yoying 3501 0xDAD
+Thai_dochada 3502 0xDAE
+Thai_topatak 3503 0xDAF
+Thai_thothan 3504 0xDB0
+Thai_thonangmontho 3505 0xDB1
+Thai_thophuthao 3506 0xDB2
+Thai_nonen 3507 0xDB3
+Thai_dodek 3508 0xDB4
+Thai_totao 3509 0xDB5
+Thai_thothung 3510 0xDB6
+Thai_thothahan 3511 0xDB7
+Thai_thothong 3512 0xDB8
+Thai_nonu 3513 0xDB9
+Thai_bobaimai 3514 0xDBA
+Thai_popla 3515 0xDBB
+Thai_phophung 3516 0xDBC
+Thai_fofa 3517 0xDBD
+Thai_phophan 3518 0xDBE
+Thai_fofan 3519 0xDBF
+Thai_phosamphao 3520 0xDC0
+Thai_moma 3521 0xDC1
+Thai_yoyak 3522 0xDC2
+Thai_rorua 3523 0xDC3
+Thai_ru 3524 0xDC4
+Thai_loling 3525 0xDC5
+Thai_lu 3526 0xDC6
+Thai_wowaen 3527 0xDC7
+Thai_sosala 3528 0xDC8
+Thai_sorusi 3529 0xDC9
+Thai_sosua 3530 0xDCA
+Thai_hohip 3531 0xDCB
+Thai_lochula 3532 0xDCC
+Thai_oang 3533 0xDCD
+Thai_honokhuk 3534 0xDCE
+Thai_paiyannoi 3535 0xDCF
+Thai_saraa 3536 0xDD0
+Thai_maihanakat 3537 0xDD1
+Thai_saraaa 3538 0xDD2
+Thai_saraam 3539 0xDD3
+Thai_sarai 3540 0xDD4
+Thai_saraii 3541 0xDD5
+Thai_saraue 3542 0xDD6
+Thai_sarauee 3543 0xDD7
+Thai_sarau 3544 0xDD8
+Thai_sarauu 3545 0xDD9
+Thai_phinthu 3546 0xDDA
+Thai_maihanakat_maitho 3550 0xDDE
+Thai_baht 3551 0xDDF
+Thai_sarae 3552 0xDE0
+Thai_saraae 3553 0xDE1
+Thai_sarao 3554 0xDE2
+Thai_saraaimaimuan 3555 0xDE3
+Thai_saraaimaimalai 3556 0xDE4
+Thai_lakkhangyao 3557 0xDE5
+Thai_maiyamok 3558 0xDE6
+Thai_maitaikhu 3559 0xDE7
+Thai_maiek 3560 0xDE8
+Thai_maitho 3561 0xDE9
+Thai_maitri 3562 0xDEA
+Thai_maichattawa 3563 0xDEB
+Thai_thanthakhat 3564 0xDEC
+Thai_nikhahit 3565 0xDED
+Thai_leksun 3568 0xDF0
+Thai_leknung 3569 0xDF1
+Thai_leksong 3570 0xDF2
+Thai_leksam 3571 0xDF3
+Thai_leksi 3572 0xDF4
+Thai_lekha 3573 0xDF5
+Thai_lekhok 3574 0xDF6
+Thai_lekchet 3575 0xDF7
+Thai_lekpaet 3576 0xDF8
+Thai_lekkao 3577 0xDF9
+Hangul_Kiyeog 3745 0xEA1
+Hangul_SsangKiyeog 3746 0xEA2
+Hangul_KiyeogSios 3747 0xEA3
+Hangul_Nieun 3748 0xEA4
+Hangul_NieunJieuj 3749 0xEA5
+Hangul_NieunHieuh 3750 0xEA6
+Hangul_Dikeud 3751 0xEA7
+Hangul_SsangDikeud 3752 0xEA8
+Hangul_Rieul 3753 0xEA9
+Hangul_RieulKiyeog 3754 0xEAA
+Hangul_RieulMieum 3755 0xEAB
+Hangul_RieulPieub 3756 0xEAC
+Hangul_RieulSios 3757 0xEAD
+Hangul_RieulTieut 3758 0xEAE
+Hangul_RieulPhieuf 3759 0xEAF
+Hangul_RieulHieuh 3760 0xEB0
+Hangul_Mieum 3761 0xEB1
+Hangul_Pieub 3762 0xEB2
+Hangul_SsangPieub 3763 0xEB3
+Hangul_PieubSios 3764 0xEB4
+Hangul_Sios 3765 0xEB5
+Hangul_SsangSios 3766 0xEB6
+Hangul_Ieung 3767 0xEB7
+Hangul_Jieuj 3768 0xEB8
+Hangul_SsangJieuj 3769 0xEB9
+Hangul_Cieuc 3770 0xEBA
+Hangul_Khieuq 3771 0xEBB
+Hangul_Tieut 3772 0xEBC
+Hangul_Phieuf 3773 0xEBD
+Hangul_Hieuh 3774 0xEBE
+Hangul_A 3775 0xEBF
+Hangul_AE 3776 0xEC0
+Hangul_YA 3777 0xEC1
+Hangul_YAE 3778 0xEC2
+Hangul_EO 3779 0xEC3
+Hangul_E 3780 0xEC4
+Hangul_YEO 3781 0xEC5
+Hangul_YE 3782 0xEC6
+Hangul_O 3783 0xEC7
+Hangul_WA 3784 0xEC8
+Hangul_WAE 3785 0xEC9
+Hangul_OE 3786 0xECA
+Hangul_YO 3787 0xECB
+Hangul_U 3788 0xECC
+Hangul_WEO 3789 0xECD
+Hangul_WE 3790 0xECE
+Hangul_WI 3791 0xECF
+Hangul_YU 3792 0xED0
+Hangul_EU 3793 0xED1
+Hangul_YI 3794 0xED2
+Hangul_I 3795 0xED3
+Hangul_J_Kiyeog 3796 0xED4
+Hangul_J_SsangKiyeog 3797 0xED5
+Hangul_J_KiyeogSios 3798 0xED6
+Hangul_J_Nieun 3799 0xED7
+Hangul_J_NieunJieuj 3800 0xED8
+Hangul_J_NieunHieuh 3801 0xED9
+Hangul_J_Dikeud 3802 0xEDA
+Hangul_J_Rieul 3803 0xEDB
+Hangul_J_RieulKiyeog 3804 0xEDC
+Hangul_J_RieulMieum 3805 0xEDD
+Hangul_J_RieulPieub 3806 0xEDE
+Hangul_J_RieulSios 3807 0xEDF
+Hangul_J_RieulTieut 3808 0xEE0
+Hangul_J_RieulPhieuf 3809 0xEE1
+Hangul_J_RieulHieuh 3810 0xEE2
+Hangul_J_Mieum 3811 0xEE3
+Hangul_J_Pieub 3812 0xEE4
+Hangul_J_PieubSios 3813 0xEE5
+Hangul_J_Sios 3814 0xEE6
+Hangul_J_SsangSios 3815 0xEE7
+Hangul_J_Ieung 3816 0xEE8
+Hangul_J_Jieuj 3817 0xEE9
+Hangul_J_Cieuc 3818 0xEEA
+Hangul_J_Khieuq 3819 0xEEB
+Hangul_J_Tieut 3820 0xEEC
+Hangul_J_Phieuf 3821 0xEED
+Hangul_J_Hieuh 3822 0xEEE
+Hangul_RieulYeorinHieuh 3823 0xEEF
+Hangul_SunkyeongeumMieum 3824 0xEF0
+Hangul_SunkyeongeumPieub 3825 0xEF1
+Hangul_PanSios 3826 0xEF2
+Hangul_KkogjiDalrinIeung 3827 0xEF3
+Hangul_SunkyeongeumPhieuf 3828 0xEF4
+Hangul_YeorinHieuh 3829 0xEF5
+Hangul_AraeA 3830 0xEF6
+Hangul_AraeAE 3831 0xEF7
+Hangul_J_PanSios 3832 0xEF8
+Hangul_J_KkogjiDalrinIeung 3833 0xEF9
+Hangul_J_YeorinHieuh 3834 0xEFA
+Korean_Won 3839 0xEFF
+OE 5052 0x13BC
+oe 5053 0x13BD
+Ydiaeresis 5054 0x13BE
+EuroSign 8364 0x20AC
+3270_Duplicate 64769 0xFD01
+3270_FieldMark 64770 0xFD02
+3270_Right2 64771 0xFD03
+3270_Left2 64772 0xFD04
+3270_BackTab 64773 0xFD05
+3270_EraseEOF 64774 0xFD06
+3270_EraseInput 64775 0xFD07
+3270_Reset 64776 0xFD08
+3270_Quit 64777 0xFD09
+3270_PA1 64778 0xFD0A
+3270_PA2 64779 0xFD0B
+3270_PA3 64780 0xFD0C
+3270_Test 64781 0xFD0D
+3270_Attn 64782 0xFD0E
+3270_CursorBlink 64783 0xFD0F
+3270_AltCursor 64784 0xFD10
+3270_KeyClick 64785 0xFD11
+3270_Jump 64786 0xFD12
+3270_Ident 64787 0xFD13
+3270_Rule 64788 0xFD14
+3270_Copy 64789 0xFD15
+3270_Play 64790 0xFD16
+3270_Setup 64791 0xFD17
+3270_Record 64792 0xFD18
+3270_ChangeScreen 64793 0xFD19
+3270_DeleteWord 64794 0xFD1A
+3270_ExSelect 64795 0xFD1B
+3270_CursorSelect 64796 0xFD1C
+3270_PrintScreen 64797 0xFD1D
+3270_Enter 64798 0xFD1E
+ISO_Lock 65025 0xFE01
+ISO_Level2_Latch 65026 0xFE02
+ISO_Level3_Shift 65027 0xFE03
+ISO_Level3_Latch 65028 0xFE04
+ISO_Level3_Lock 65029 0xFE05
+ISO_Group_Latch 65030 0xFE06
+ISO_Group_Lock 65031 0xFE07
+ISO_Next_Group 65032 0xFE08
+ISO_Next_Group_Lock 65033 0xFE09
+ISO_Prev_Group 65034 0xFE0A
+ISO_Prev_Group_Lock 65035 0xFE0B
+ISO_First_Group 65036 0xFE0C
+ISO_First_Group_Lock 65037 0xFE0D
+ISO_Last_Group 65038 0xFE0E
+ISO_Last_Group_Lock 65039 0xFE0F
+ISO_Level5_Shift 65041 0xFE11
+ISO_Level5_Latch 65042 0xFE12
+ISO_Level5_Lock 65043 0xFE13
+ISO_Left_Tab 65056 0xFE20
+ISO_Move_Line_Up 65057 0xFE21
+ISO_Move_Line_Down 65058 0xFE22
+ISO_Partial_Line_Up 65059 0xFE23
+ISO_Partial_Line_Down 65060 0xFE24
+ISO_Partial_Space_Left 65061 0xFE25
+ISO_Partial_Space_Right 65062 0xFE26
+ISO_Set_Margin_Left 65063 0xFE27
+ISO_Set_Margin_Right 65064 0xFE28
+ISO_Release_Margin_Left 65065 0xFE29
+ISO_Release_Margin_Right 65066 0xFE2A
+ISO_Release_Both_Margins 65067 0xFE2B
+ISO_Fast_Cursor_Left 65068 0xFE2C
+ISO_Fast_Cursor_Right 65069 0xFE2D
+ISO_Fast_Cursor_Up 65070 0xFE2E
+ISO_Fast_Cursor_Down 65071 0xFE2F
+ISO_Continuous_Underline 65072 0xFE30
+ISO_Discontinuous_Underline 65073 0xFE31
+ISO_Emphasize 65074 0xFE32
+ISO_Center_Object 65075 0xFE33
+ISO_Enter 65076 0xFE34
+dead_grave 65104 0xFE50
+dead_acute 65105 0xFE51
+dead_circumflex 65106 0xFE52
+dead_tilde 65107 0xFE53
+dead_macron 65108 0xFE54
+dead_breve 65109 0xFE55
+dead_abovedot 65110 0xFE56
+dead_diaeresis 65111 0xFE57
+dead_abovering 65112 0xFE58
+dead_doubleacute 65113 0xFE59
+dead_caron 65114 0xFE5A
+dead_cedilla 65115 0xFE5B
+dead_ogonek 65116 0xFE5C
+dead_iota 65117 0xFE5D
+dead_voiced_sound 65118 0xFE5E
+dead_semivoiced_sound 65119 0xFE5F
+dead_belowdot 65120 0xFE60
+dead_hook 65121 0xFE61
+dead_horn 65122 0xFE62
+dead_stroke 65123 0xFE63
+dead_abovecomma 65124 0xFE64
+dead_abovereversedcomma 65125 0xFE65
+dead_doublegrave 65126 0xFE66
+dead_belowring 65127 0xFE67
+dead_belowmacron 65128 0xFE68
+dead_belowcircumflex 65129 0xFE69
+dead_belowtilde 65130 0xFE6A
+dead_belowbreve 65131 0xFE6B
+dead_belowdiaeresis 65132 0xFE6C
+dead_invertedbreve 65133 0xFE6D
+dead_belowcomma 65134 0xFE6E
+dead_currency 65135 0xFE6F
+AccessX_Enable 65136 0xFE70
+AccessX_Feedback_Enable 65137 0xFE71
+RepeatKeys_Enable 65138 0xFE72
+SlowKeys_Enable 65139 0xFE73
+BounceKeys_Enable 65140 0xFE74
+StickyKeys_Enable 65141 0xFE75
+MouseKeys_Enable 65142 0xFE76
+MouseKeys_Accel_Enable 65143 0xFE77
+Overlay1_Enable 65144 0xFE78
+Overlay2_Enable 65145 0xFE79
+AudibleBell_Enable 65146 0xFE7A
+dead_a 65152 0xFE80
+dead_A 65153 0xFE81
+dead_e 65154 0xFE82
+dead_E 65155 0xFE83
+dead_i 65156 0xFE84
+dead_I 65157 0xFE85
+dead_o 65158 0xFE86
+dead_O 65159 0xFE87
+dead_u 65160 0xFE88
+dead_U 65161 0xFE89
+dead_small_schwa 65162 0xFE8A
+dead_capital_schwa 65163 0xFE8B
+dead_greek 65164 0xFE8C
+dead_lowline 65168 0xFE90
+dead_aboveverticalline 65169 0xFE91
+dead_belowverticalline 65170 0xFE92
+dead_longsolidusoverlay 65171 0xFE93
+ch 65184 0xFEA0
+Ch 65185 0xFEA1
+CH 65186 0xFEA2
+c_h 65187 0xFEA3
+C_h 65188 0xFEA4
+C_H 65189 0xFEA5
+First_Virtual_Screen 65232 0xFED0
+Prev_Virtual_Screen 65233 0xFED1
+Next_Virtual_Screen 65234 0xFED2
+Last_Virtual_Screen 65236 0xFED4
+Terminate_Server 65237 0xFED5
+Pointer_Left 65248 0xFEE0
+Pointer_Right 65249 0xFEE1
+Pointer_Up 65250 0xFEE2
+Pointer_Down 65251 0xFEE3
+Pointer_UpLeft 65252 0xFEE4
+Pointer_UpRight 65253 0xFEE5
+Pointer_DownLeft 65254 0xFEE6
+Pointer_DownRight 65255 0xFEE7
+Pointer_Button_Dflt 65256 0xFEE8
+Pointer_Button1 65257 0xFEE9
+Pointer_Button2 65258 0xFEEA
+Pointer_Button3 65259 0xFEEB
+Pointer_Button4 65260 0xFEEC
+Pointer_Button5 65261 0xFEED
+Pointer_DblClick_Dflt 65262 0xFEEE
+Pointer_DblClick1 65263 0xFEEF
+Pointer_DblClick2 65264 0xFEF0
+Pointer_DblClick3 65265 0xFEF1
+Pointer_DblClick4 65266 0xFEF2
+Pointer_DblClick5 65267 0xFEF3
+Pointer_Drag_Dflt 65268 0xFEF4
+Pointer_Drag1 65269 0xFEF5
+Pointer_Drag2 65270 0xFEF6
+Pointer_Drag3 65271 0xFEF7
+Pointer_Drag4 65272 0xFEF8
+Pointer_EnableKeys 65273 0xFEF9
+Pointer_Accelerate 65274 0xFEFA
+Pointer_DfltBtnNext 65275 0xFEFB
+Pointer_DfltBtnPrev 65276 0xFEFC
+Pointer_Drag5 65277 0xFEFD
BackSpace 65288 0xFF08
Tab 65289 0xFF09
Linefeed 65290 0xFF0A
@@ -841,6 +1191,21 @@ Kana_Lock 65325 0xFF2D
Kana_Shift 65326 0xFF2E
Eisu_Shift 65327 0xFF2F
Eisu_toggle 65328 0xFF30
+Hangul 65329 0xFF31
+Hangul_Start 65330 0xFF32
+Hangul_End 65331 0xFF33
+Hangul_Hanja 65332 0xFF34
+Hangul_Jamo 65333 0xFF35
+Hangul_Romaja 65334 0xFF36
+Codeinput 65335 0xFF37
+Hangul_Jeonja 65336 0xFF38
+Hangul_Banja 65337 0xFF39
+Hangul_PreHanja 65338 0xFF3A
+Hangul_PostHanja 65339 0xFF3B
+SingleCandidate 65340 0xFF3C
+MultipleCandidate 65341 0xFF3D
+PreviousCandidate 65342 0xFF3E
+Hangul_Special 65343 0xFF3F
Home 65360 0xFF50
Left 65361 0xFF51
Up 65362 0xFF52
@@ -952,7 +1317,726 @@ Super_L 65515 0xFFEB
Super_R 65516 0xFFEC
Hyper_L 65517 0xFFED
Hyper_R 65518 0xFFEE
+braille_dot_1 65521 0xFFF1
+braille_dot_2 65522 0xFFF2
+braille_dot_3 65523 0xFFF3
+braille_dot_4 65524 0xFFF4
+braille_dot_5 65525 0xFFF5
+braille_dot_6 65526 0xFFF6
+braille_dot_7 65527 0xFFF7
+braille_dot_8 65528 0xFFF8
+braille_dot_9 65529 0xFFF9
+braille_dot_10 65530 0xFFFA
Delete 65535 0xFFFF
+Ibreve 16777516 0x100012C
+ibreve 16777517 0x100012D
+Wcircumflex 16777588 0x1000174
+wcircumflex 16777589 0x1000175
+Ycircumflex 16777590 0x1000176
+ycircumflex 16777591 0x1000177
+SCHWA 16777615 0x100018F
+Obarred 16777631 0x100019F
+Ohorn 16777632 0x10001A0
+ohorn 16777633 0x10001A1
+Uhorn 16777647 0x10001AF
+uhorn 16777648 0x10001B0
+Zstroke 16777653 0x10001B5
+zstroke 16777654 0x10001B6
+EZH 16777655 0x10001B7
+Ocaron 16777681 0x10001D1
+ocaron 16777682 0x10001D2
+Gcaron 16777702 0x10001E6
+gcaron 16777703 0x10001E7
+schwa 16777817 0x1000259
+obarred 16777845 0x1000275
+ezh 16777874 0x1000292
+Cyrillic_GHE_bar 16778386 0x1000492
+Cyrillic_ghe_bar 16778387 0x1000493
+Cyrillic_ZHE_descender 16778390 0x1000496
+Cyrillic_zhe_descender 16778391 0x1000497
+Cyrillic_KA_descender 16778394 0x100049A
+Cyrillic_ka_descender 16778395 0x100049B
+Cyrillic_KA_vertstroke 16778396 0x100049C
+Cyrillic_ka_vertstroke 16778397 0x100049D
+Cyrillic_EN_descender 16778402 0x10004A2
+Cyrillic_en_descender 16778403 0x10004A3
+Cyrillic_U_straight 16778414 0x10004AE
+Cyrillic_u_straight 16778415 0x10004AF
+Cyrillic_U_straight_bar 16778416 0x10004B0
+Cyrillic_u_straight_bar 16778417 0x10004B1
+Cyrillic_HA_descender 16778418 0x10004B2
+Cyrillic_ha_descender 16778419 0x10004B3
+Cyrillic_CHE_descender 16778422 0x10004B6
+Cyrillic_che_descender 16778423 0x10004B7
+Cyrillic_CHE_vertstroke 16778424 0x10004B8
+Cyrillic_che_vertstroke 16778425 0x10004B9
+Cyrillic_SHHA 16778426 0x10004BA
+Cyrillic_shha 16778427 0x10004BB
+Cyrillic_SCHWA 16778456 0x10004D8
+Cyrillic_schwa 16778457 0x10004D9
+Cyrillic_I_macron 16778466 0x10004E2
+Cyrillic_i_macron 16778467 0x10004E3
+Cyrillic_O_bar 16778472 0x10004E8
+Cyrillic_o_bar 16778473 0x10004E9
+Cyrillic_U_macron 16778478 0x10004EE
+Cyrillic_u_macron 16778479 0x10004EF
+Armenian_AYB 16778545 0x1000531
+Armenian_BEN 16778546 0x1000532
+Armenian_GIM 16778547 0x1000533
+Armenian_DA 16778548 0x1000534
+Armenian_YECH 16778549 0x1000535
+Armenian_ZA 16778550 0x1000536
+Armenian_E 16778551 0x1000537
+Armenian_AT 16778552 0x1000538
+Armenian_TO 16778553 0x1000539
+Armenian_ZHE 16778554 0x100053A
+Armenian_INI 16778555 0x100053B
+Armenian_LYUN 16778556 0x100053C
+Armenian_KHE 16778557 0x100053D
+Armenian_TSA 16778558 0x100053E
+Armenian_KEN 16778559 0x100053F
+Armenian_HO 16778560 0x1000540
+Armenian_DZA 16778561 0x1000541
+Armenian_GHAT 16778562 0x1000542
+Armenian_TCHE 16778563 0x1000543
+Armenian_MEN 16778564 0x1000544
+Armenian_HI 16778565 0x1000545
+Armenian_NU 16778566 0x1000546
+Armenian_SHA 16778567 0x1000547
+Armenian_VO 16778568 0x1000548
+Armenian_CHA 16778569 0x1000549
+Armenian_PE 16778570 0x100054A
+Armenian_JE 16778571 0x100054B
+Armenian_RA 16778572 0x100054C
+Armenian_SE 16778573 0x100054D
+Armenian_VEV 16778574 0x100054E
+Armenian_TYUN 16778575 0x100054F
+Armenian_RE 16778576 0x1000550
+Armenian_TSO 16778577 0x1000551
+Armenian_VYUN 16778578 0x1000552
+Armenian_PYUR 16778579 0x1000553
+Armenian_KE 16778580 0x1000554
+Armenian_O 16778581 0x1000555
+Armenian_FE 16778582 0x1000556
+Armenian_apostrophe 16778586 0x100055A
+Armenian_accent 16778587 0x100055B
+Armenian_exclam 16778588 0x100055C
+Armenian_separation_mark 16778589 0x100055D
+Armenian_question 16778590 0x100055E
+Armenian_ayb 16778593 0x1000561
+Armenian_ben 16778594 0x1000562
+Armenian_gim 16778595 0x1000563
+Armenian_da 16778596 0x1000564
+Armenian_yech 16778597 0x1000565
+Armenian_za 16778598 0x1000566
+Armenian_e 16778599 0x1000567
+Armenian_at 16778600 0x1000568
+Armenian_to 16778601 0x1000569
+Armenian_zhe 16778602 0x100056A
+Armenian_ini 16778603 0x100056B
+Armenian_lyun 16778604 0x100056C
+Armenian_khe 16778605 0x100056D
+Armenian_tsa 16778606 0x100056E
+Armenian_ken 16778607 0x100056F
+Armenian_ho 16778608 0x1000570
+Armenian_dza 16778609 0x1000571
+Armenian_ghat 16778610 0x1000572
+Armenian_tche 16778611 0x1000573
+Armenian_men 16778612 0x1000574
+Armenian_hi 16778613 0x1000575
+Armenian_nu 16778614 0x1000576
+Armenian_sha 16778615 0x1000577
+Armenian_vo 16778616 0x1000578
+Armenian_cha 16778617 0x1000579
+Armenian_pe 16778618 0x100057A
+Armenian_je 16778619 0x100057B
+Armenian_ra 16778620 0x100057C
+Armenian_se 16778621 0x100057D
+Armenian_vev 16778622 0x100057E
+Armenian_tyun 16778623 0x100057F
+Armenian_re 16778624 0x1000580
+Armenian_tso 16778625 0x1000581
+Armenian_vyun 16778626 0x1000582
+Armenian_pyur 16778627 0x1000583
+Armenian_ke 16778628 0x1000584
+Armenian_o 16778629 0x1000585
+Armenian_fe 16778630 0x1000586
+Armenian_ligature_ew 16778631 0x1000587
+Armenian_full_stop 16778633 0x1000589
+Armenian_hyphen 16778634 0x100058A
+Arabic_madda_above 16778835 0x1000653
+Arabic_hamza_above 16778836 0x1000654
+Arabic_hamza_below 16778837 0x1000655
+Arabic_0 16778848 0x1000660
+Arabic_1 16778849 0x1000661
+Arabic_2 16778850 0x1000662
+Arabic_3 16778851 0x1000663
+Arabic_4 16778852 0x1000664
+Arabic_5 16778853 0x1000665
+Arabic_6 16778854 0x1000666
+Arabic_7 16778855 0x1000667
+Arabic_8 16778856 0x1000668
+Arabic_9 16778857 0x1000669
+Arabic_percent 16778858 0x100066A
+Arabic_superscript_alef 16778864 0x1000670
+Arabic_tteh 16778873 0x1000679
+Arabic_peh 16778878 0x100067E
+Arabic_tcheh 16778886 0x1000686
+Arabic_ddal 16778888 0x1000688
+Arabic_rreh 16778897 0x1000691
+Arabic_jeh 16778904 0x1000698
+Arabic_veh 16778916 0x10006A4
+Arabic_keheh 16778921 0x10006A9
+Arabic_gaf 16778927 0x10006AF
+Arabic_noon_ghunna 16778938 0x10006BA
+Arabic_heh_doachashmee 16778942 0x10006BE
+Arabic_heh_goal 16778945 0x10006C1
+Farsi_yeh 16778956 0x10006CC
+Arabic_yeh_baree 16778962 0x10006D2
+Arabic_fullstop 16778964 0x10006D4
+Farsi_0 16778992 0x10006F0
+Farsi_1 16778993 0x10006F1
+Farsi_2 16778994 0x10006F2
+Farsi_3 16778995 0x10006F3
+Farsi_4 16778996 0x10006F4
+Farsi_5 16778997 0x10006F5
+Farsi_6 16778998 0x10006F6
+Farsi_7 16778999 0x10006F7
+Farsi_8 16779000 0x10006F8
+Farsi_9 16779001 0x10006F9
+Sinh_ng 16780674 0x1000D82
+Sinh_h2 16780675 0x1000D83
+Sinh_a 16780677 0x1000D85
+Sinh_aa 16780678 0x1000D86
+Sinh_ae 16780679 0x1000D87
+Sinh_aee 16780680 0x1000D88
+Sinh_i 16780681 0x1000D89
+Sinh_ii 16780682 0x1000D8A
+Sinh_u 16780683 0x1000D8B
+Sinh_uu 16780684 0x1000D8C
+Sinh_ri 16780685 0x1000D8D
+Sinh_rii 16780686 0x1000D8E
+Sinh_lu 16780687 0x1000D8F
+Sinh_luu 16780688 0x1000D90
+Sinh_e 16780689 0x1000D91
+Sinh_ee 16780690 0x1000D92
+Sinh_ai 16780691 0x1000D93
+Sinh_o 16780692 0x1000D94
+Sinh_oo 16780693 0x1000D95
+Sinh_au 16780694 0x1000D96
+Sinh_ka 16780698 0x1000D9A
+Sinh_kha 16780699 0x1000D9B
+Sinh_ga 16780700 0x1000D9C
+Sinh_gha 16780701 0x1000D9D
+Sinh_ng2 16780702 0x1000D9E
+Sinh_nga 16780703 0x1000D9F
+Sinh_ca 16780704 0x1000DA0
+Sinh_cha 16780705 0x1000DA1
+Sinh_ja 16780706 0x1000DA2
+Sinh_jha 16780707 0x1000DA3
+Sinh_nya 16780708 0x1000DA4
+Sinh_jnya 16780709 0x1000DA5
+Sinh_nja 16780710 0x1000DA6
+Sinh_tta 16780711 0x1000DA7
+Sinh_ttha 16780712 0x1000DA8
+Sinh_dda 16780713 0x1000DA9
+Sinh_ddha 16780714 0x1000DAA
+Sinh_nna 16780715 0x1000DAB
+Sinh_ndda 16780716 0x1000DAC
+Sinh_tha 16780717 0x1000DAD
+Sinh_thha 16780718 0x1000DAE
+Sinh_dha 16780719 0x1000DAF
+Sinh_dhha 16780720 0x1000DB0
+Sinh_na 16780721 0x1000DB1
+Sinh_ndha 16780723 0x1000DB3
+Sinh_pa 16780724 0x1000DB4
+Sinh_pha 16780725 0x1000DB5
+Sinh_ba 16780726 0x1000DB6
+Sinh_bha 16780727 0x1000DB7
+Sinh_ma 16780728 0x1000DB8
+Sinh_mba 16780729 0x1000DB9
+Sinh_ya 16780730 0x1000DBA
+Sinh_ra 16780731 0x1000DBB
+Sinh_la 16780733 0x1000DBD
+Sinh_va 16780736 0x1000DC0
+Sinh_sha 16780737 0x1000DC1
+Sinh_ssha 16780738 0x1000DC2
+Sinh_sa 16780739 0x1000DC3
+Sinh_ha 16780740 0x1000DC4
+Sinh_lla 16780741 0x1000DC5
+Sinh_fa 16780742 0x1000DC6
+Sinh_al 16780746 0x1000DCA
+Sinh_aa2 16780751 0x1000DCF
+Sinh_ae2 16780752 0x1000DD0
+Sinh_aee2 16780753 0x1000DD1
+Sinh_i2 16780754 0x1000DD2
+Sinh_ii2 16780755 0x1000DD3
+Sinh_u2 16780756 0x1000DD4
+Sinh_uu2 16780758 0x1000DD6
+Sinh_ru2 16780760 0x1000DD8
+Sinh_e2 16780761 0x1000DD9
+Sinh_ee2 16780762 0x1000DDA
+Sinh_ai2 16780763 0x1000DDB
+Sinh_o2 16780764 0x1000DDC
+Sinh_oo2 16780765 0x1000DDD
+Sinh_au2 16780766 0x1000DDE
+Sinh_lu2 16780767 0x1000DDF
+Sinh_ruu2 16780786 0x1000DF2
+Sinh_luu2 16780787 0x1000DF3
+Sinh_kunddaliya 16780788 0x1000DF4
+Georgian_an 16781520 0x10010D0
+Georgian_ban 16781521 0x10010D1
+Georgian_gan 16781522 0x10010D2
+Georgian_don 16781523 0x10010D3
+Georgian_en 16781524 0x10010D4
+Georgian_vin 16781525 0x10010D5
+Georgian_zen 16781526 0x10010D6
+Georgian_tan 16781527 0x10010D7
+Georgian_in 16781528 0x10010D8
+Georgian_kan 16781529 0x10010D9
+Georgian_las 16781530 0x10010DA
+Georgian_man 16781531 0x10010DB
+Georgian_nar 16781532 0x10010DC
+Georgian_on 16781533 0x10010DD
+Georgian_par 16781534 0x10010DE
+Georgian_zhar 16781535 0x10010DF
+Georgian_rae 16781536 0x10010E0
+Georgian_san 16781537 0x10010E1
+Georgian_tar 16781538 0x10010E2
+Georgian_un 16781539 0x10010E3
+Georgian_phar 16781540 0x10010E4
+Georgian_khar 16781541 0x10010E5
+Georgian_ghan 16781542 0x10010E6
+Georgian_qar 16781543 0x10010E7
+Georgian_shin 16781544 0x10010E8
+Georgian_chin 16781545 0x10010E9
+Georgian_can 16781546 0x10010EA
+Georgian_jil 16781547 0x10010EB
+Georgian_cil 16781548 0x10010EC
+Georgian_char 16781549 0x10010ED
+Georgian_xan 16781550 0x10010EE
+Georgian_jhan 16781551 0x10010EF
+Georgian_hae 16781552 0x10010F0
+Georgian_he 16781553 0x10010F1
+Georgian_hie 16781554 0x10010F2
+Georgian_we 16781555 0x10010F3
+Georgian_har 16781556 0x10010F4
+Georgian_hoe 16781557 0x10010F5
+Georgian_fi 16781558 0x10010F6
+Babovedot 16784898 0x1001E02
+babovedot 16784899 0x1001E03
+Dabovedot 16784906 0x1001E0A
+dabovedot 16784907 0x1001E0B
+Fabovedot 16784926 0x1001E1E
+fabovedot 16784927 0x1001E1F
+Lbelowdot 16784950 0x1001E36
+lbelowdot 16784951 0x1001E37
+Mabovedot 16784960 0x1001E40
+mabovedot 16784961 0x1001E41
+Pabovedot 16784982 0x1001E56
+pabovedot 16784983 0x1001E57
+Sabovedot 16784992 0x1001E60
+sabovedot 16784993 0x1001E61
+Tabovedot 16785002 0x1001E6A
+tabovedot 16785003 0x1001E6B
+Wgrave 16785024 0x1001E80
+wgrave 16785025 0x1001E81
+Wacute 16785026 0x1001E82
+wacute 16785027 0x1001E83
+Wdiaeresis 16785028 0x1001E84
+wdiaeresis 16785029 0x1001E85
+Xabovedot 16785034 0x1001E8A
+xabovedot 16785035 0x1001E8B
+Abelowdot 16785056 0x1001EA0
+abelowdot 16785057 0x1001EA1
+Ahook 16785058 0x1001EA2
+ahook 16785059 0x1001EA3
+Acircumflexacute 16785060 0x1001EA4
+acircumflexacute 16785061 0x1001EA5
+Acircumflexgrave 16785062 0x1001EA6
+acircumflexgrave 16785063 0x1001EA7
+Acircumflexhook 16785064 0x1001EA8
+acircumflexhook 16785065 0x1001EA9
+Acircumflextilde 16785066 0x1001EAA
+acircumflextilde 16785067 0x1001EAB
+Acircumflexbelowdot 16785068 0x1001EAC
+acircumflexbelowdot 16785069 0x1001EAD
+Abreveacute 16785070 0x1001EAE
+abreveacute 16785071 0x1001EAF
+Abrevegrave 16785072 0x1001EB0
+abrevegrave 16785073 0x1001EB1
+Abrevehook 16785074 0x1001EB2
+abrevehook 16785075 0x1001EB3
+Abrevetilde 16785076 0x1001EB4
+abrevetilde 16785077 0x1001EB5
+Abrevebelowdot 16785078 0x1001EB6
+abrevebelowdot 16785079 0x1001EB7
+Ebelowdot 16785080 0x1001EB8
+ebelowdot 16785081 0x1001EB9
+Ehook 16785082 0x1001EBA
+ehook 16785083 0x1001EBB
+Etilde 16785084 0x1001EBC
+etilde 16785085 0x1001EBD
+Ecircumflexacute 16785086 0x1001EBE
+ecircumflexacute 16785087 0x1001EBF
+Ecircumflexgrave 16785088 0x1001EC0
+ecircumflexgrave 16785089 0x1001EC1
+Ecircumflexhook 16785090 0x1001EC2
+ecircumflexhook 16785091 0x1001EC3
+Ecircumflextilde 16785092 0x1001EC4
+ecircumflextilde 16785093 0x1001EC5
+Ecircumflexbelowdot 16785094 0x1001EC6
+ecircumflexbelowdot 16785095 0x1001EC7
+Ihook 16785096 0x1001EC8
+ihook 16785097 0x1001EC9
+Ibelowdot 16785098 0x1001ECA
+ibelowdot 16785099 0x1001ECB
+Obelowdot 16785100 0x1001ECC
+obelowdot 16785101 0x1001ECD
+Ohook 16785102 0x1001ECE
+ohook 16785103 0x1001ECF
+Ocircumflexacute 16785104 0x1001ED0
+ocircumflexacute 16785105 0x1001ED1
+Ocircumflexgrave 16785106 0x1001ED2
+ocircumflexgrave 16785107 0x1001ED3
+Ocircumflexhook 16785108 0x1001ED4
+ocircumflexhook 16785109 0x1001ED5
+Ocircumflextilde 16785110 0x1001ED6
+ocircumflextilde 16785111 0x1001ED7
+Ocircumflexbelowdot 16785112 0x1001ED8
+ocircumflexbelowdot 16785113 0x1001ED9
+Ohornacute 16785114 0x1001EDA
+ohornacute 16785115 0x1001EDB
+Ohorngrave 16785116 0x1001EDC
+ohorngrave 16785117 0x1001EDD
+Ohornhook 16785118 0x1001EDE
+ohornhook 16785119 0x1001EDF
+Ohorntilde 16785120 0x1001EE0
+ohorntilde 16785121 0x1001EE1
+Ohornbelowdot 16785122 0x1001EE2
+ohornbelowdot 16785123 0x1001EE3
+Ubelowdot 16785124 0x1001EE4
+ubelowdot 16785125 0x1001EE5
+Uhook 16785126 0x1001EE6
+uhook 16785127 0x1001EE7
+Uhornacute 16785128 0x1001EE8
+uhornacute 16785129 0x1001EE9
+Uhorngrave 16785130 0x1001EEA
+uhorngrave 16785131 0x1001EEB
+Uhornhook 16785132 0x1001EEC
+uhornhook 16785133 0x1001EED
+Uhorntilde 16785134 0x1001EEE
+uhorntilde 16785135 0x1001EEF
+Uhornbelowdot 16785136 0x1001EF0
+uhornbelowdot 16785137 0x1001EF1
+Ygrave 16785138 0x1001EF2
+ygrave 16785139 0x1001EF3
+Ybelowdot 16785140 0x1001EF4
+ybelowdot 16785141 0x1001EF5
+Yhook 16785142 0x1001EF6
+yhook 16785143 0x1001EF7
+Ytilde 16785144 0x1001EF8
+ytilde 16785145 0x1001EF9
+zerosuperior 16785520 0x1002070
+foursuperior 16785524 0x1002074
+fivesuperior 16785525 0x1002075
+sixsuperior 16785526 0x1002076
+sevensuperior 16785527 0x1002077
+eightsuperior 16785528 0x1002078
+ninesuperior 16785529 0x1002079
+zerosubscript 16785536 0x1002080
+onesubscript 16785537 0x1002081
+twosubscript 16785538 0x1002082
+threesubscript 16785539 0x1002083
+foursubscript 16785540 0x1002084
+fivesubscript 16785541 0x1002085
+sixsubscript 16785542 0x1002086
+sevensubscript 16785543 0x1002087
+eightsubscript 16785544 0x1002088
+ninesubscript 16785545 0x1002089
+EcuSign 16785568 0x10020A0
+ColonSign 16785569 0x10020A1
+CruzeiroSign 16785570 0x10020A2
+FFrancSign 16785571 0x10020A3
+LiraSign 16785572 0x10020A4
+MillSign 16785573 0x10020A5
+NairaSign 16785574 0x10020A6
+PesetaSign 16785575 0x10020A7
+RupeeSign 16785576 0x10020A8
+WonSign 16785577 0x10020A9
+NewSheqelSign 16785578 0x10020AA
+DongSign 16785579 0x10020AB
+partdifferential 16785922 0x1002202
+emptyset 16785925 0x1002205
+elementof 16785928 0x1002208
+notelementof 16785929 0x1002209
+containsas 16785931 0x100220B
+squareroot 16785946 0x100221A
+cuberoot 16785947 0x100221B
+fourthroot 16785948 0x100221C
+dintegral 16785964 0x100222C
+tintegral 16785965 0x100222D
+because 16785973 0x1002235
+notapproxeq 16785991 0x1002247
+approxeq 16785992 0x1002248
+notidentical 16786018 0x1002262
+stricteq 16786019 0x1002263
+braille_blank 16787456 0x1002800
+braille_dots_1 16787457 0x1002801
+braille_dots_2 16787458 0x1002802
+braille_dots_12 16787459 0x1002803
+braille_dots_3 16787460 0x1002804
+braille_dots_13 16787461 0x1002805
+braille_dots_23 16787462 0x1002806
+braille_dots_123 16787463 0x1002807
+braille_dots_4 16787464 0x1002808
+braille_dots_14 16787465 0x1002809
+braille_dots_24 16787466 0x100280A
+braille_dots_124 16787467 0x100280B
+braille_dots_34 16787468 0x100280C
+braille_dots_134 16787469 0x100280D
+braille_dots_234 16787470 0x100280E
+braille_dots_1234 16787471 0x100280F
+braille_dots_5 16787472 0x1002810
+braille_dots_15 16787473 0x1002811
+braille_dots_25 16787474 0x1002812
+braille_dots_125 16787475 0x1002813
+braille_dots_35 16787476 0x1002814
+braille_dots_135 16787477 0x1002815
+braille_dots_235 16787478 0x1002816
+braille_dots_1235 16787479 0x1002817
+braille_dots_45 16787480 0x1002818
+braille_dots_145 16787481 0x1002819
+braille_dots_245 16787482 0x100281A
+braille_dots_1245 16787483 0x100281B
+braille_dots_345 16787484 0x100281C
+braille_dots_1345 16787485 0x100281D
+braille_dots_2345 16787486 0x100281E
+braille_dots_12345 16787487 0x100281F
+braille_dots_6 16787488 0x1002820
+braille_dots_16 16787489 0x1002821
+braille_dots_26 16787490 0x1002822
+braille_dots_126 16787491 0x1002823
+braille_dots_36 16787492 0x1002824
+braille_dots_136 16787493 0x1002825
+braille_dots_236 16787494 0x1002826
+braille_dots_1236 16787495 0x1002827
+braille_dots_46 16787496 0x1002828
+braille_dots_146 16787497 0x1002829
+braille_dots_246 16787498 0x100282A
+braille_dots_1246 16787499 0x100282B
+braille_dots_346 16787500 0x100282C
+braille_dots_1346 16787501 0x100282D
+braille_dots_2346 16787502 0x100282E
+braille_dots_12346 16787503 0x100282F
+braille_dots_56 16787504 0x1002830
+braille_dots_156 16787505 0x1002831
+braille_dots_256 16787506 0x1002832
+braille_dots_1256 16787507 0x1002833
+braille_dots_356 16787508 0x1002834
+braille_dots_1356 16787509 0x1002835
+braille_dots_2356 16787510 0x1002836
+braille_dots_12356 16787511 0x1002837
+braille_dots_456 16787512 0x1002838
+braille_dots_1456 16787513 0x1002839
+braille_dots_2456 16787514 0x100283A
+braille_dots_12456 16787515 0x100283B
+braille_dots_3456 16787516 0x100283C
+braille_dots_13456 16787517 0x100283D
+braille_dots_23456 16787518 0x100283E
+braille_dots_123456 16787519 0x100283F
+braille_dots_7 16787520 0x1002840
+braille_dots_17 16787521 0x1002841
+braille_dots_27 16787522 0x1002842
+braille_dots_127 16787523 0x1002843
+braille_dots_37 16787524 0x1002844
+braille_dots_137 16787525 0x1002845
+braille_dots_237 16787526 0x1002846
+braille_dots_1237 16787527 0x1002847
+braille_dots_47 16787528 0x1002848
+braille_dots_147 16787529 0x1002849
+braille_dots_247 16787530 0x100284A
+braille_dots_1247 16787531 0x100284B
+braille_dots_347 16787532 0x100284C
+braille_dots_1347 16787533 0x100284D
+braille_dots_2347 16787534 0x100284E
+braille_dots_12347 16787535 0x100284F
+braille_dots_57 16787536 0x1002850
+braille_dots_157 16787537 0x1002851
+braille_dots_257 16787538 0x1002852
+braille_dots_1257 16787539 0x1002853
+braille_dots_357 16787540 0x1002854
+braille_dots_1357 16787541 0x1002855
+braille_dots_2357 16787542 0x1002856
+braille_dots_12357 16787543 0x1002857
+braille_dots_457 16787544 0x1002858
+braille_dots_1457 16787545 0x1002859
+braille_dots_2457 16787546 0x100285A
+braille_dots_12457 16787547 0x100285B
+braille_dots_3457 16787548 0x100285C
+braille_dots_13457 16787549 0x100285D
+braille_dots_23457 16787550 0x100285E
+braille_dots_123457 16787551 0x100285F
+braille_dots_67 16787552 0x1002860
+braille_dots_167 16787553 0x1002861
+braille_dots_267 16787554 0x1002862
+braille_dots_1267 16787555 0x1002863
+braille_dots_367 16787556 0x1002864
+braille_dots_1367 16787557 0x1002865
+braille_dots_2367 16787558 0x1002866
+braille_dots_12367 16787559 0x1002867
+braille_dots_467 16787560 0x1002868
+braille_dots_1467 16787561 0x1002869
+braille_dots_2467 16787562 0x100286A
+braille_dots_12467 16787563 0x100286B
+braille_dots_3467 16787564 0x100286C
+braille_dots_13467 16787565 0x100286D
+braille_dots_23467 16787566 0x100286E
+braille_dots_123467 16787567 0x100286F
+braille_dots_567 16787568 0x1002870
+braille_dots_1567 16787569 0x1002871
+braille_dots_2567 16787570 0x1002872
+braille_dots_12567 16787571 0x1002873
+braille_dots_3567 16787572 0x1002874
+braille_dots_13567 16787573 0x1002875
+braille_dots_23567 16787574 0x1002876
+braille_dots_123567 16787575 0x1002877
+braille_dots_4567 16787576 0x1002878
+braille_dots_14567 16787577 0x1002879
+braille_dots_24567 16787578 0x100287A
+braille_dots_124567 16787579 0x100287B
+braille_dots_34567 16787580 0x100287C
+braille_dots_134567 16787581 0x100287D
+braille_dots_234567 16787582 0x100287E
+braille_dots_1234567 16787583 0x100287F
+braille_dots_8 16787584 0x1002880
+braille_dots_18 16787585 0x1002881
+braille_dots_28 16787586 0x1002882
+braille_dots_128 16787587 0x1002883
+braille_dots_38 16787588 0x1002884
+braille_dots_138 16787589 0x1002885
+braille_dots_238 16787590 0x1002886
+braille_dots_1238 16787591 0x1002887
+braille_dots_48 16787592 0x1002888
+braille_dots_148 16787593 0x1002889
+braille_dots_248 16787594 0x100288A
+braille_dots_1248 16787595 0x100288B
+braille_dots_348 16787596 0x100288C
+braille_dots_1348 16787597 0x100288D
+braille_dots_2348 16787598 0x100288E
+braille_dots_12348 16787599 0x100288F
+braille_dots_58 16787600 0x1002890
+braille_dots_158 16787601 0x1002891
+braille_dots_258 16787602 0x1002892
+braille_dots_1258 16787603 0x1002893
+braille_dots_358 16787604 0x1002894
+braille_dots_1358 16787605 0x1002895
+braille_dots_2358 16787606 0x1002896
+braille_dots_12358 16787607 0x1002897
+braille_dots_458 16787608 0x1002898
+braille_dots_1458 16787609 0x1002899
+braille_dots_2458 16787610 0x100289A
+braille_dots_12458 16787611 0x100289B
+braille_dots_3458 16787612 0x100289C
+braille_dots_13458 16787613 0x100289D
+braille_dots_23458 16787614 0x100289E
+braille_dots_123458 16787615 0x100289F
+braille_dots_68 16787616 0x10028A0
+braille_dots_168 16787617 0x10028A1
+braille_dots_268 16787618 0x10028A2
+braille_dots_1268 16787619 0x10028A3
+braille_dots_368 16787620 0x10028A4
+braille_dots_1368 16787621 0x10028A5
+braille_dots_2368 16787622 0x10028A6
+braille_dots_12368 16787623 0x10028A7
+braille_dots_468 16787624 0x10028A8
+braille_dots_1468 16787625 0x10028A9
+braille_dots_2468 16787626 0x10028AA
+braille_dots_12468 16787627 0x10028AB
+braille_dots_3468 16787628 0x10028AC
+braille_dots_13468 16787629 0x10028AD
+braille_dots_23468 16787630 0x10028AE
+braille_dots_123468 16787631 0x10028AF
+braille_dots_568 16787632 0x10028B0
+braille_dots_1568 16787633 0x10028B1
+braille_dots_2568 16787634 0x10028B2
+braille_dots_12568 16787635 0x10028B3
+braille_dots_3568 16787636 0x10028B4
+braille_dots_13568 16787637 0x10028B5
+braille_dots_23568 16787638 0x10028B6
+braille_dots_123568 16787639 0x10028B7
+braille_dots_4568 16787640 0x10028B8
+braille_dots_14568 16787641 0x10028B9
+braille_dots_24568 16787642 0x10028BA
+braille_dots_124568 16787643 0x10028BB
+braille_dots_34568 16787644 0x10028BC
+braille_dots_134568 16787645 0x10028BD
+braille_dots_234568 16787646 0x10028BE
+braille_dots_1234568 16787647 0x10028BF
+braille_dots_78 16787648 0x10028C0
+braille_dots_178 16787649 0x10028C1
+braille_dots_278 16787650 0x10028C2
+braille_dots_1278 16787651 0x10028C3
+braille_dots_378 16787652 0x10028C4
+braille_dots_1378 16787653 0x10028C5
+braille_dots_2378 16787654 0x10028C6
+braille_dots_12378 16787655 0x10028C7
+braille_dots_478 16787656 0x10028C8
+braille_dots_1478 16787657 0x10028C9
+braille_dots_2478 16787658 0x10028CA
+braille_dots_12478 16787659 0x10028CB
+braille_dots_3478 16787660 0x10028CC
+braille_dots_13478 16787661 0x10028CD
+braille_dots_23478 16787662 0x10028CE
+braille_dots_123478 16787663 0x10028CF
+braille_dots_578 16787664 0x10028D0
+braille_dots_1578 16787665 0x10028D1
+braille_dots_2578 16787666 0x10028D2
+braille_dots_12578 16787667 0x10028D3
+braille_dots_3578 16787668 0x10028D4
+braille_dots_13578 16787669 0x10028D5
+braille_dots_23578 16787670 0x10028D6
+braille_dots_123578 16787671 0x10028D7
+braille_dots_4578 16787672 0x10028D8
+braille_dots_14578 16787673 0x10028D9
+braille_dots_24578 16787674 0x10028DA
+braille_dots_124578 16787675 0x10028DB
+braille_dots_34578 16787676 0x10028DC
+braille_dots_134578 16787677 0x10028DD
+braille_dots_234578 16787678 0x10028DE
+braille_dots_1234578 16787679 0x10028DF
+braille_dots_678 16787680 0x10028E0
+braille_dots_1678 16787681 0x10028E1
+braille_dots_2678 16787682 0x10028E2
+braille_dots_12678 16787683 0x10028E3
+braille_dots_3678 16787684 0x10028E4
+braille_dots_13678 16787685 0x10028E5
+braille_dots_23678 16787686 0x10028E6
+braille_dots_123678 16787687 0x10028E7
+braille_dots_4678 16787688 0x10028E8
+braille_dots_14678 16787689 0x10028E9
+braille_dots_24678 16787690 0x10028EA
+braille_dots_124678 16787691 0x10028EB
+braille_dots_34678 16787692 0x10028EC
+braille_dots_134678 16787693 0x10028ED
+braille_dots_234678 16787694 0x10028EE
+braille_dots_1234678 16787695 0x10028EF
+braille_dots_5678 16787696 0x10028F0
+braille_dots_15678 16787697 0x10028F1
+braille_dots_25678 16787698 0x10028F2
+braille_dots_125678 16787699 0x10028F3
+braille_dots_35678 16787700 0x10028F4
+braille_dots_135678 16787701 0x10028F5
+braille_dots_235678 16787702 0x10028F6
+braille_dots_1235678 16787703 0x10028F7
+braille_dots_45678 16787704 0x10028F8
+braille_dots_145678 16787705 0x10028F9
+braille_dots_245678 16787706 0x10028FA
+braille_dots_1245678 16787707 0x10028FB
+braille_dots_345678 16787708 0x10028FC
+braille_dots_1345678 16787709 0x10028FD
+braille_dots_2345678 16787710 0x10028FE
+braille_dots_12345678 16787711 0x10028FF
XF86AudioLowerVolume 269025041 0x1008FF11
XF86AudioMute 269025042 0x1008FF12
XF86AudioRaiseVolume 269025043 0x1008FF13
diff --git a/doc/label.n b/doc/label.n
index f2ba88c..107175e 100644
--- a/doc/label.n
+++ b/doc/label.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH label n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/listbox.n b/doc/listbox.n
index 66b75b9..ef3ae1c 100644
--- a/doc/listbox.n
+++ b/doc/listbox.n
@@ -384,15 +384,16 @@ total width of the listbox text is off-screen to the left.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR or an abbreviation
of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR character units (the width of the \fB0\fR character)
-on the display; if it is \fBpages\fR then the view adjusts by
+If \fIwhat\fR is \fBpages\fR then the view adjusts by
\fInumber\fR screenfuls.
If \fInumber\fR is negative then characters farther to the left
become visible; if it is positive then characters farther to the right
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
+\fInumber\fR character units (the width of the \fB0\fR character)
+on the display.
.RE
.TP
\fIpathName \fByview \fR?\fIargs\fR?
@@ -431,13 +432,14 @@ way through the listbox, and so on.
This command adjusts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
-\fInumber\fR lines; if it is \fBpages\fR then
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR.
+If \fIwhat\fR is \fBpages\fR then
the view adjusts by \fInumber\fR screenfuls.
If \fInumber\fR is negative then earlier elements
become visible; if it is positive then later elements
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
+\fInumber\fR lines.
.RE
.SH "DEFAULT BINDINGS"
.PP
diff --git a/doc/lower.n b/doc/lower.n
index 8159a8b..d0b0551 100644
--- a/doc/lower.n
+++ b/doc/lower.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH lower n 3.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/menu.n b/doc/menu.n
index 338ce6a..c6fcec3 100644
--- a/doc/menu.n
+++ b/doc/menu.n
@@ -19,7 +19,7 @@ menu, tk_menuSetFocus \- Create and manipulate 'menu' widgets and menubars
\-activebackground \-borderwidth \-foreground
\-activeborderwidth \-cursor \-relief
\-activeforeground \-disabledforeground \-takefocus
-\-background \-font
+\-background \-font \-activerelief
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-postcommand postCommand Command
@@ -34,12 +34,12 @@ For menu entries that are check buttons or radio buttons, this option
specifies the color to display in the indicator when the check button
or radio button is selected.
.OP \-tearoff tearOff TearOff
-This option must have a proper boolean value, which specifies
-whether or not the menu should include a tear-off 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 must have a proper boolean value (default is false),
+which specifies whether or not the menu should include a tear-off
+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
be torn off.
.OP \-tearoffcommand tearOffCommand TearOffCommand
@@ -267,7 +267,7 @@ toplevels are automatically appended after all the Tk-defined items and
a separator. The Window menu on the Mac also allows toggling the
window into a fullscreen state, and managing a tabbed window interface
(multiple windows grouped into a single window) if supported by that
-version of the operating system.
+version of the operating system.
.PP
When Tk sees a .menubar.help menu on the Macintosh, the menu's contents
are appended to the standard Help menu of the user's menubar whenever
diff --git a/doc/menubar.n b/doc/menubar.n
index 023bf37..c3be85d 100644
--- a/doc/menubar.n
+++ b/doc/menubar.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_menuBar n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/menubutton.n b/doc/menubutton.n
index 08b52a0..1f596ce 100644
--- a/doc/menubutton.n
+++ b/doc/menubutton.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH menubutton n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/message.n b/doc/message.n
index bd635ac..280c072 100644
--- a/doc/message.n
+++ b/doc/message.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH message n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/option.n b/doc/option.n
index 2763d64..6042010 100644
--- a/doc/option.n
+++ b/doc/option.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH option n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/optionMenu.n b/doc/optionMenu.n
index 42275ce..eff6e86 100644
--- a/doc/optionMenu.n
+++ b/doc/optionMenu.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_optionMenu n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/options.n b/doc/options.n
index 738a1c6..56e65dd 100644
--- a/doc/options.n
+++ b/doc/options.n
@@ -58,6 +58,9 @@ than one element at a time (e.g. menus but not buttons).
.OP \-activeforeground activeForeground Background
Specifies foreground color to use when drawing active elements.
See above for definition of active elements.
+.OP \-activerelief activeRelief Relief
+Specifies the 3-D effect desired for the active item of the widget.
+See the \fB-relief\fR option for details.
.OP \-anchor anchor Anchor
Specifies how the information in a widget (e.g. text or a bitmap)
is to be displayed in the widget.
@@ -221,6 +224,14 @@ internal space above and/or below what it displays inside.
Most widgets only use this option for padding text: if they are
displaying a bitmap or image, then they usually ignore padding
options.
+.OP \-placeholder placeHolder PlaceHolder
+Specifies a help text string to display if no text is otherwise displayed,
+that is when the widget is empty. The placeholder text is displayed using
+the values of the \fB\-font\fR and \fB\-justify\fR options.
+.OP \-placeholderforeground placeholderForeground PlaceholderForeground
+Specifies the foreground color to use when the placeholder text is
+displayed. If this option is the empty string, the default color gray70
+is used.
.OP \-relief relief Relief
Specifies the 3-D effect desired for the widget. Acceptable
values are \fBraised\fR, \fBsunken\fR, \fBflat\fR, \fBridge\fR,
diff --git a/doc/pack-old.n b/doc/pack-old.n
index 217dba9..5ef5da1 100644
--- a/doc/pack-old.n
+++ b/doc/pack-old.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH pack-old n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/pack.n b/doc/pack.n
index 538af62..980dd6e 100644
--- a/doc/pack.n
+++ b/doc/pack.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH pack n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -129,6 +129,14 @@ than receiving default values.
Removes each of the \fIslave\fRs from the packing order for its
master and unmaps their windows.
The slaves will no longer be managed by the packer.
+.RS
+.PP
+.VS TIP518
+If the last slave of the master becomes unmanaged, this will also send
+the virtual event \fB<<NoManagedChild>>\fR to the master; the master
+may choose to resize itself (or otherwise respond) to such a change.
+.VE TIP518
+.RE
.TP
\fBpack info \fIslave\fR
Returns a list whose elements are the current configuration state of
diff --git a/doc/palette.n b/doc/palette.n
index 085c4c6..6a04450 100644
--- a/doc/palette.n
+++ b/doc/palette.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_setPalette n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/photo.n b/doc/photo.n
index 0fe0c61..2673985 100644
--- a/doc/photo.n
+++ b/doc/photo.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
'\" Author: Paul Mackerras (paulus@cs.anu.edu.au),
'\" Department of Computer Science,
'\" Australian National University.
@@ -24,7 +24,7 @@ photo \- Full-color images
\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
\fIimageName \fBcopy \fIsourceImage\fR ?\fIoption value(s) ...\fR?
\fIimageName \fBdata\fR ?\fIoption value(s) ...\fR?
-\fIimageName \fBget \fIx y\fR
+\fIimageName \fBget \fIx y\fR ?\fIoption\fR?
\fIimageName \fBput \fIdata\fR ?\fIoption value(s) ...\fR?
\fIimageName \fBread \fIfilename\fR ?\fIoption value(s) ...\fR?
\fIimageName \fBredither\fR
@@ -34,21 +34,21 @@ photo \- Full-color images
.BE
.SH DESCRIPTION
.PP
-A photo is an image whose pixels can display any color or be
-transparent. A photo image is stored internally in full color (32
-bits per pixel), and is displayed using dithering if necessary. Image
-data for a photo image can be obtained from a file or a string, or it
-can be supplied from
-C code through a procedural interface. At present, only
+A photo is an image whose pixels can display any color with a varying
+degree of transparency (the alpha channel). A photo image is stored
+internally in full color (32 bits per pixel), and is displayed using
+dithering if necessary. Image data for a photo image can be obtained
+from a file or a string, or it can be supplied from C code through a
+procedural interface. At present, only
.VS 8.6
PNG,
.VE 8.6
-GIF and PPM/PGM
-formats are supported, but an interface exists to allow additional
-image file formats to be added easily. A photo image is transparent
-in regions where no image data has been supplied
-or where it has been set transparent by the \fBtransparency set\fR
-subcommand.
+GIF and PPM/PGM formats are supported, but an interface exists to
+allow additional image file formats to be added easily. A photo image
+is (semi)transparent if the image data it was obtained from had
+transparency informaton. In regions where no image data has been
+supplied, it is fully transparent. Transparency may also be modified
+with the \fBtransparency set\fR subcommand.
.SH "CREATING PHOTOS"
.PP
Like all images, photos are created using the \fBimage create\fR
@@ -57,19 +57,25 @@ Photos support the following \fIoptions\fR:
.TP
\fB\-data \fIstring\fR
.
-Specifies the contents of the image as a string. The string should
-contain binary data or, for some formats, base64-encoded data (this is
+Specifies the contents of the image as a string.
+.VS 8.7
+The string should
+contain data in the default list-of-lists form,
+.VE 8.7
+binary data or, for some formats, base64-encoded data (this is
currently guaranteed to be supported for PNG and GIF images). The
-format of the
-string must be one of those for which there is an image file format
-handler that will accept string data. If both the \fB\-data\fR
-and \fB\-file\fR options are specified, the \fB\-file\fR option takes
-precedence.
+format of the string must be one of those for which there is an image
+file format handler that will accept string data. If both the
+\fB\-data\fR and \fB\-file\fR options are specified, the \fB\-file\fR
+option takes precedence.
.TP
-\fB\-format \fIformat-name\fR
+\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
.
Specifies the name of the file format for the data specified with the
-\fB\-data\fR or \fB\-file\fR option.
+\fB\-data\fR or \fB\-file\fR option and optional arguments passed to
+the format handler. Note: the value of this option must be a Tcl list.
+This means that the braces may be omitted if the argument has only one
+word. Also, instead of braces, double quotes may be used for quoting.
.TP
\fB\-file \fIname\fR
.
@@ -233,8 +239,14 @@ the source image is used as-is. The default compositing rule is
.TP
\fIimageName \fBdata\fR ?\fIoption value(s) ...\fR?
.
-Returns image data in the form of a string. The following options
-may be specified:
+Returns image data in the form of a string.
+.VS 8.7
+The format of the string depends on the format handler. By default, a
+human readable format as a list of lists of pixel data is used, other
+formats can be chosen with the \fB-format\fR option.
+See \fBIMAGE FORMATS\fR below for details.
+.VE 8.7
+The following options may be specified:
.RS
.TP
\fB\-background\fI color\fR
@@ -243,19 +255,23 @@ If the color is specified, the data will not contain any transparency
information. In all transparent pixels the color will be replaced by
the specified color.
.TP
-\fB\-format\fI format-name\fR
-.
-Specifies the name of the image file format handler to be used.
-Specifically, this subcommand searches
-for the first handler whose name matches an initial substring of
-\fIformat-name\fR and which has the capability to write a string
-containing this image data.
-If this option is not given, this subcommand uses a format that
-consists of a list (one element per row) of lists (one element per
-pixel/column) of colors in
+\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
+.
+Specifies the name of the image file format handler to use and,
+optionally, arguments to the format handler. Specifically, this
+subcommand searches for the first handler whose name matches an
+initial substring of \fIformat-name\fR and which has the capability to
+write a string containing this image data.
+.VS 8.7
+If this option is not given, this subcommand uses the default format
+that consists of a list (one element per row) of lists (one element
+per pixel/column) of colors in
.QW \fB#\fIrrggbb\fR
-format (where \fIrr\fR is a pair of hexadecimal digits for the red
-channel, \fIgg\fR for green, and \fIbb\fR for blue).
+format (see \fBIMAGE FORMATS\fR below).
+.VE 8.7
+Note: the value of this option must be a Tcl list.
+This means that the braces may be omitted if the argument has only one
+word. Also, instead of braces, double quotes may be used for quoting.
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -272,34 +288,40 @@ whole image.
If this options is specified, the data will not contain color
information. All pixel data will be transformed into grayscale.
.RE
+.VS 8.7
.TP
-\fIimageName \fBget\fR \fIx y\fR
+\fIimageName \fBget\fR \fIx y\fR ?\fB-withalpha\fR?
.
Returns the color of the pixel at coordinates (\fIx\fR,\fIy\fR) in the
image as a list of three integers between 0 and 255, representing the
-red, green and blue components respectively.
+red, green and blue components respectively. If the \fB-withalpha\fR
+option is specified, the returned list will have a fourth element
+representing the alpha value of the pixel as an integer between 0 and
+255.
+.VE 8.7
.TP
\fIimageName \fBput\fR \fIdata\fR ?\fIoption value(s) ...\fR?
.
Sets pixels in \fI imageName\fR to the data specified in \fIdata\fR.
-This command first searches the list of image file format handlers for
+.VS 8.7
+This command searches the list of image file format handlers for
a handler that can interpret the data in \fIdata\fR, and then reads
the image encoded within into \fIimageName\fR (the destination image).
-If \fIdata\fR does not match any known format, an attempt to interpret
-it as a (top-to-bottom) list of scan-lines is made, with each
-scan-line being a (left-to-right) list of pixel colors (see
-\fBTk_GetColor\fR for a description of valid colors.) Every scan-line
-must be of the same length. Note that when \fIdata\fR is a single
-color name, you are instructing Tk to fill a rectangular region with
-that color. The following options may be specified:
+See \fBIMAGE FORMATS\fR below for details on formats for image data.
+.VE 8.7
+The following options may be specified:
.RS
.TP
-\fB\-format \fIformat-name\fR
+\fB\-format\fR {\fIformat-name\fR ?\fIoption value ..\fR?}
.
-Specifies the format of the image data in \fIdata\fR.
+Specifies the format of the image data in \fIdata\fR and, optionally,
+arguments to be passed to the format handler.
Specifically, only image file format handlers whose names begin with
\fIformat-name\fR will be used while searching for an image data
format handler to read the data.
+Note: the value of this option must be a Tcl list.
+This means that the braces may be omitted if the argument has only one
+word. Also, instead of braces, double quotes may be used for quoting.
.TP
\fB\-to \fIx1 y1\fR ?\fIx2 y2\fR?
.
@@ -308,7 +330,9 @@ of the region of \fIimageName\fR into which the image data will be
copied. The default position is (0,0). If \fIx2\fR,\fIy2\fR is given
and \fIdata\fR is not large enough to cover the rectangle specified by
this option, the image data extracted will be tiled so it covers the
-entire destination rectangle. Note that if \fIdata\fR specifies a
+entire destination rectangle. If the region specified with this opion
+is smaller than the supplied \fIdata\fR, the exceeding data is silently
+discarded. Note that if \fIdata\fR specifies a
single color value, then a region extending to the bottom-right corner
represented by (\fIx2\fR,\fIy2\fR) will be filled with that color.
.RE
@@ -323,12 +347,16 @@ in \fIfilename\fR, and then reads the image in \fIfilename\fR into
specified:
.RS
.TP
-\fB\-format \fIformat-name\fR
+\fB\-format {\fIformat-name\fR ?\fIoption value ..\fR?}
.
-Specifies the format of the image data in \fIfilename\fR.
+Specifies the format of the image data in \fIfilename\fR and,
+optionally, additional options to the format handler.
Specifically, only image file format handlers whose names begin with
\fIformat-name\fR will be used while searching for an image data
format handler to read the data.
+Note: the value of this option must be a Tcl list.
+This means that the braces may be omitted if the argument has only one
+word. Also, instead of braces, double quotes may be used for quoting.
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -371,16 +399,26 @@ displayed.
Allows examination and manipulation of the transparency information in
the photo image. Several subcommands are available:
.RS
+.VS 8.7
.TP
-\fIimageName \fBtransparency get \fIx y\fR
+\fIimageName \fBtransparency get \fIx y\fR ?\fB-alpha\fR?
.
-Returns a boolean indicating if the pixel at (\fIx\fR,\fIy\fR) is
-transparent.
+Returns true if the pixel at (\fIx\fR,\fIy\fR) is fully transparent,
+false otherwise. If the option \fB-alpha\fR is passed, returns the
+alpha value of the pixel instead, as an integer in the range 0 to 255.
+.VE 8.7
+
+.VS 8.7
.TP
-\fIimageName \fBtransparency set \fIx y boolean\fR
+\fIimageName \fBtransparency set \fIx y\fR \fInewVal\fR ?\fB-alpha\fR?
.
-Makes the pixel at (\fIx\fR,\fIy\fR) transparent if \fIboolean\fR is
-true, and makes that pixel opaque otherwise.
+Change the transparency of the pixel at (\fIx\fR,\fIy\fR) to
+\fInewVal.\fR If no additional option is passed, \fInewVal\fR is
+interpreted as a boolean and the pixel is made fully transparent if
+that value is true, fully opaque otherwise. If the \fB-alpha\fR
+option is passed, \fInewVal\fR is interpreted as an integral alpha
+value for the pixel, which must be in the range 0 to 255.
+.VE 8.7
.RE
.TP
\fIimageName \fBwrite \fIfilename\fR ?\fIoption value(s) ...\fR?
@@ -395,15 +433,19 @@ If the color is specified, the data will not contain any transparency
information. In all transparent pixels the color will be replaced by
the specified color.
.TP
-\fB\-format\fI format-name\fR
+\fB\-format\fR {\fIformat-name\fR ?\fIoption value ...\fR?}
.
Specifies the name of the image file format handler to be used to
-write the data to the file. Specifically, this subcommand searches
-for the first handler whose name matches an initial substring of
-\fIformat-name\fR and which has the capability to write an image
-file. If this option is not given, the format is guessed from
-the file extension. If that cannot be determined, this subcommand
-uses the first handler that has the capability to write an image file.
+write the data to the file and, optionally, options to pass to the
+format handler. Specifically, this subcommand searches for the first
+handler whose name matches an initial substring of \fIformat-name\fR
+and which has the capability to write an image file. If this option
+is not given, the format is guessed from the file extension. If that
+cannot be determined, this subcommand uses the first handler that has
+the capability to write an image file.
+Note: the value of this option must be a Tcl list.
+This means that the braces may be omitted if the argument has only one
+word. Also, instead of braces, double quotes may be used for quoting.
.TP
\fB\-from \fIx1 y1 x2 y2\fR
.
@@ -426,20 +468,24 @@ image file formats to be added easily. The photo image code maintains
a list of these handlers. Handlers are added to the list by
registering them with a call to \fBTk_CreatePhotoImageFormat\fR. The
standard Tk distribution comes with handlers for PPM/PGM, PNG and GIF
-formats, which are automatically registered on initialization.
+formats,
+.VS 8.7
+as well as the \fBdefault\fR handler to encode/decode image
+data in a human readable form.
+.VE 8.7
+These handlers are automatically registered on initialization.
.PP
-When reading an image file or processing
-string data specified with the \fB\-data\fR configuration option, the
-photo image code invokes each handler in turn until one is
-found that claims to be able to read the data in the file or string.
-Usually this will find the correct handler, but if it does not, the
-user may give a format name with the \fB\-format\fR option to specify
-which handler to use. In fact the photo image code will try those
-handlers whose names begin with the string specified for the
-\fB\-format\fR option (the comparison is case-insensitive). For
-example, if the user specifies \fB\-format gif\fR, then a handler
-named GIF87 or GIF89 may be invoked, but a handler
-named JPEG may not (assuming that such handlers had been
+When reading an image file or processing string data specified with
+the \fB\-data\fR configuration option, the photo image code invokes
+each handler in turn until one is found that claims to be able to read
+the data in the file or string. Usually this will find the correct
+handler, but if it does not, the user may give a format name with the
+\fB\-format\fR option to specify which handler to use. In this case,
+the photo image code will try those handlers whose names begin with
+the string specified for the \fB\-format\fR option (the comparison is
+case-insensitive). For example, if the user specifies \fB\-format
+gif\fR, then a handler named GIF87 or GIF89 may be invoked, but a
+handler named JPEG may not (assuming that such handlers had been
registered).
.PP
When writing image data to a file, the processing of the
@@ -450,27 +496,163 @@ that, which the handler can use, for example, to specify which variant
to use of the formats supported by the handler.
Note that not all image handlers may support writing transparency data
to a file, even where the target image format does.
+.VS 8.7
+.SS "THE DEFAULT IMAGE HANDLER"
+.PP
+The \fBdefault\fR image handler cannot be used to read or write data
+from/to a file. Its sole purpose is to encode and decode image data in
+string form in a clear text, human readable, form. The \fIimageName\fR
+\fBdata\fR subcommand uses this handler when no other format is
+specified. When reading image data from a string with \fIimageName\fR
+\fBput\fR or the \fB-data\fR option, the default handler is treated
+as the other handlers.
+.PP
+Image data in the \fBdefault\fR string format is a (top-to-bottom)
+list of scan-lines, with each scan-line being a (left-to-right) list
+of pixel data. Every scan-line has the same length. The color
+and, optionally, alpha value of each pixel is specified in any of
+the forms described in the \fBCOLOR FORMATS\fR section below.
+.VE 8.7
+
.SS "FORMAT SUBOPTIONS"
.PP
.VS 8.6
-Some image formats support sub-options, which are specified at the time that
-the image is loaded using additional words in the \fB\-format\fR option. At
-the time of writing, the following are supported:
+Image formats may support sub-options, wich ahre specified using
+additional words in the value to the \fB\-format\fR option. These
+suboptions can affect how image data is read or written to file or
+string. The nature and values of these options is up to the format
+handler.
+The built-in handlers support these suboptions:
+.VS 8.7
+.TP
+\fBdefault \-colorformat\fI formatType\fR
+.
+The option is allowed when writing image data to a string with
+\fIimageName\fR \fBdata\fR. Specifies the format to use for the color
+string of each pixel. \fIformatType\fR may be one of: \fBrgb\fR to
+encode pixel data in the form \fB#\fIRRGGBB\fR, \fBrgba\fR to encode
+pixel data in the form \fB#\fIRRGGBBAA\fR or \fBlist\fR to encode
+pixel data as a list with four elements. See \fBCOLOR FORMATS\fR
+below for details. The default is \fBrgb\fR.
+.VE 8.7
.TP
\fBgif \-index\fI indexValue\fR
.
-When parsing a multi-part GIF image, Tk normally only accesses the first
-image. By giving the \fB\-index\fR sub-option, the \fIindexValue\fR'th value
-may be used instead. The \fIindexValue\fR must be an integer from 0 up to the
-number of image parts in the GIF data.
+The option has effect when reading image data from a file. When
+parsing a multi-part GIF image, Tk normally only accesses the first
+image. By giving the \fB\-index\fR sub-option, the \fIindexValue\fR'th
+value may be used instead. The \fIindexValue\fR must be an integer
+from 0 up to the number of image parts in the GIF data.
.TP
\fBpng \-alpha\fI alphaValue\fR
.
-An additional alpha filtering for the overall image, which allows the
-background on which the image is displayed to show through. This usually also
-has the effect of desaturating the image. The \fIalphaValue\fR must be between
-0.0 and 1.0.
+The option has effect when reading image data from a file. Specifies
+an additional alpha filtering for the overall image, which allows the
+background on which the image is displayed to show through. This
+usually also has the effect of desaturating the image. The
+\fIalphaValue\fR must be between 0.0 and 1.0.
+.TP
+\fBsvg \-dpi\fI dpiValue\fB \-scale\fI scaleValue\fB \-scaletowidth \fI width\fB \-scaletoheight\fI height\fR
+.
+\fIdpiValue\fR is used in conversion between given coordinates and
+screen resolution. The value must be greater than 0 and the default
+value is 96.
+\fIscaleValue\fR is used to scale the resulting image. The value must
+be greater than 0 and the default value is 1.
+\fIwidth\fR and \fIheight\fR are the width or height that the image
+will be adjusted to. Only one parameter among \fB\-scale\fR,
+\fB\-scaletowidth\fR and \fB\-scaletoheight\fR can be given at a time
+and the aspect ratio of the original image is always preserved.
+The svg format supports a wide range of SVG features, but the
+full SVG standard is not available, for instance the 'text' feature
+is missing and silently ignored when reading the SVG data.
+The supported SVG features are:
+.
+.RS
+\fB elements:\fR g, path, rect, circle, ellipse, line, polyline, polygon,
+linearGradient, radialGradient, stop, defs, svg, style
+.PP
+\fB attributes:\fR width, height, viewBox,
+preserveAspectRatio with none, xMin, xMid, xMax, yMin, yMid, yMax, slice
+.PP
+\fB gradient attributes:\fR gradientUnits with objectBoundingBox,
+gradientTransform, cx, cy, r fx, fy x1, y1, x2, y2
+spreadMethod with pad, reflect or repeat,
+xlink:href
+.PP
+\fB poly attributes: \fR points
+.PP
+\fB line attributes: \fR x1, y1, x2, y2
+.PP
+\fB ellipse attributes: \fR cx, cy, rx, ry
+.PP
+\fB circle attributes: \fR cx, cy, r
+.PP
+\fB rectangle attributes: \fR x, y, width, height, rx, ry
+.PP
+\fB path attributes: \fR d with m, M, l, L, h, H, v, V, c, C, s, S, q, Q, t, T, a, A, z, Z
+.PP
+\fB style attributes: \fR display with none, visibility, hidden, visible,
+fill with nonzero and evenodd, opacity, fill-opacity,
+stroke, stroke-width, stroke-dasharray, stroke-dashoffset, stroke-opacity,
+stroke-linecap with butt, round and square,
+stroke-linejoin with miter, round and bevel, stroke-miterlimit
+fill-rule, font-size,
+transform with matrix, translate, scale, rotate, skewX and skewY,
+stop-color, stop-opacity, offset, id, class
+.RE
+.
+Currently only SVG images reading and conversion into (pixel-based
+format) photos is supported: Tk does not (yet) support bundling photo
+images in SVG vector graphics.
.VE 8.6
+.VS 8.7
+.SH "COLOR FORMATS"
+.PP
+The default image handler can represent/parse color and alpha values
+of a pixel in one of the formats listed below. If a color format does
+not contain transparency information, full opacity is assumed. The
+available color formats are:
+.IP \(bu 3
+The empty string - interpreted as full transparency, the color value
+is undefined.
+.IP \(bu 3
+Any value accepted by \fBTk_GetColor\fR, optionally followed by an
+alpha suffix. The alpha suffix may be one of:
+.RS
+.TP
+\fB@\fR\fIA\fR
+.
+The alpha value \fIA\fR must be a fractional value in the range 0.0
+(fully transparent) to 1.0 (fully opaque).
+.TP
+\fB#\fR\fIX\fR
+.
+The alpha value \fIX\fR is a hexadecimal digit that specifies an integer
+alpha value in the range 0 (fully transparent) to 255 (fully opaque).
+This is expanded in range from 4 bits wide to 8 bits wide by
+multiplication by 0x11.
+.TP
+\fB#\fR\fIXX\fR
+.
+The alpha value \fIXX\fR is passed as two hexadecimal digits that
+specify an integer alpha value in the range 0 (fully transparent) to 255
+(fully opaque).
+.RE
+.IP \(bu 3
+A Tcl list with three or four integers in the range 0 to 255,
+specifying the values for the red, green, blue and (optionally)
+alpha channels respectively.
+.IP \(bu 3
+\fB#\fR\fIRGBA\fR format: a \fB#\fR followed by four hexadecimal digits,
+where each digit is the value for the red, green, blue and alpha
+channels respectively. Each digit will be expanded internally to
+8 bits by multiplication by 0x11.
+.IP \(bu 3
+\fB#\fR\fIRRGGBBAA\fR format: \fB#\fR followed by eight hexadecimal digits,
+where each pair of subsequent digits represents the value for the red,
+green, blue and alpha channels respectively.
+.VE 8.7
.SH "COLOR ALLOCATION"
.PP
When a photo image is displayed in a window, the photo image code
@@ -534,6 +716,23 @@ buttons:
button .b \-image icon \-disabledimage iconDisabled
.CE
.VE 8.6
+.PP
+.VS 8.7
+Create a green box with a simple shadow effect
+.PP
+.CS
+\fBimage create photo\fR foo
+
+# Make a simple graduated fill varying in alpha for the shadow
+for {set i 14} {$i > 0} {incr i -1} {
+ set i2 [expr {$i + 30}]
+ foo \fBput\fR [format black#%x [expr {15-$i}]] -to $i $i $i2 $i2
+}
+
+# Put a solid green rectangle on top
+foo \fBput\fR #F080 -to 0 0 30 30
+.VE 8.7
+.CE
.SH "SEE ALSO"
image(n)
.SH KEYWORDS
diff --git a/doc/place.n b/doc/place.n
index 3a092c2..3ebaf20 100644
--- a/doc/place.n
+++ b/doc/place.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH place n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/popup.n b/doc/popup.n
index 0d32362..6e6fd95 100644
--- a/doc/popup.n
+++ b/doc/popup.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk_popup n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/raise.n b/doc/raise.n
index c8feb71..7741001 100644
--- a/doc/raise.n
+++ b/doc/raise.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH raise n 3.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/scale.n b/doc/scale.n
index b1f1981..d6407a0 100644
--- a/doc/scale.n
+++ b/doc/scale.n
@@ -78,7 +78,7 @@ specified by the \fB\-activebackground\fR option.
.OP \-tickinterval tickInterval TickInterval
Must be a real value.
Determines the spacing between numerical
-tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval.
+tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval.
If 0, no tick marks will be displayed.
.OP \-to to To
Specifies a real value corresponding
diff --git a/doc/scrollbar.n b/doc/scrollbar.n
index 4d148af..5a062ce 100644
--- a/doc/scrollbar.n
+++ b/doc/scrollbar.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH scrollbar n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -215,15 +215,6 @@ document. 1.0 refers to the end of the document, 0.333
refers to a point one-third of the way through the document,
and so on.
.TP
-\fIprefix \fBscroll \fInumber \fBunits\fR
-.
-The widget should adjust its view by \fInumber\fR units.
-The units are defined in whatever way makes sense for the widget,
-such as characters or lines in a text widget.
-\fINumber\fR is either 1, which means one unit should scroll off
-the top or left of the window, or \-1, which means that one unit
-should scroll off the bottom or right of the window.
-.TP
\fIprefix \fBscroll \fInumber \fBpages\fR
.
The widget should adjust its view by \fInumber\fR pages.
@@ -233,6 +224,15 @@ is a slight overlap between the old and new views.
\fINumber\fR is either 1, which means the next page should
become visible, or \-1, which means that the previous page should
become visible.
+.TP
+\fIprefix \fBscroll \fInumber \fBunits\fR
+.
+The widget should adjust its view by \fInumber\fR units.
+The units are defined in whatever way makes sense for the widget,
+such as characters or lines in a text widget.
+\fINumber\fR is either 1, which means one unit should scroll off
+the top or left of the window, or \-1, which means that one unit
+should scroll off the bottom or right of the window.
.SH "OLD COMMAND SYNTAX"
.PP
In versions of Tk before 4.0, the \fBset\fR and \fBget\fR widget
diff --git a/doc/send.n b/doc/send.n
index 2a683d5..e33a504 100644
--- a/doc/send.n
+++ b/doc/send.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH send n 4.0 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/spinbox.n b/doc/spinbox.n
index acf06d6..6719ca3 100644
--- a/doc/spinbox.n
+++ b/doc/spinbox.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH spinbox n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -23,6 +23,7 @@ spinbox \- Create and manipulate 'spinbox' value spinner widgets
\-foreground \-justify \-xscrollcommand
\-highlightbackground \-relief
\-highlightcolor \-repeatdelay
+\-placeholder \-placeholderforeground
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-buttonbackground buttonBackground Background
@@ -54,7 +55,8 @@ as it will format a floating-point number.
A floating-point value corresponding to the lowest value for a spinbox, to
be used in conjunction with \fB\-to\fR and \fB\-increment\fR. When all
are specified correctly, the spinbox will use these values to control its
-contents. This value must be less than the \fB\-to\fR option.
+contents. If this value is greater than the \fB\-to\fR option, then
+\fB\-from\fR and \fB\-to\fR values are automatically swapped.
If \fB\-values\fR is specified, it supersedes this option.
.OP "\-invalidcommand or \-invcmd" invalidCommand InvalidCommand
Specifies a script to eval when \fB\-validatecommand\fR returns 0. Setting
@@ -83,7 +85,8 @@ be displayed in a different color, depending on the values of the
A floating-point value corresponding to the highest value for the spinbox,
to be used in conjunction with \fB\-from\fR and \fB\-increment\fR. When
all are specified correctly, the spinbox will use these values to control
-its contents. This value must be greater than the \fB\-from\fR option.
+its contents. If this value is less than the \fB\-from\fR option, then
+\fB\-from\fR and \fB\-to\fR values are automatically swapped.
If \fB\-values\fR is specified, it supersedes this option.
.OP \-validate validate Validate
Specifies the mode in which validation should operate: \fBnone\fR,
@@ -468,14 +471,14 @@ way through the text appears at the left edge of the window.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR or an abbreviation
of one of these.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR average-width characters on the display; if it is
-\fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
-If \fInumber\fR is negative then characters farther to the left
+If \fIwhat\fR is \fBpages\fR then the view adjusts by \fInumber\fR
+screenfuls. If \fInumber\fR is negative then characters farther to the left
become visible; if it is positive then characters farther to the right
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
+\fInumber\fR average-width characters on the display.
.RE
.SH "DEFAULT BINDINGS"
.PP
diff --git a/doc/text.n b/doc/text.n
index 2a161e6..c4128a1 100644
--- a/doc/text.n
+++ b/doc/text.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH text n 8.5 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -1309,8 +1309,9 @@ of the widget to \fIboolean\fR.
\fIpathName \fBedit redo\fR
.
When the \fB\-undo\fR option is true, reapplies the last undone edits provided
-no other edits were done since then. Generates an error when the redo stack is
-empty. Does nothing when the \fB\-undo\fR option is false.
+no other edits were done since then, and returns a list of indices indicating
+what ranges were changed by the redo operation. Generates an error when the
+redo stack is empty. Does nothing when the \fB\-undo\fR option is false.
.TP
\fIpathName \fBedit reset\fR
.
@@ -1323,9 +1324,10 @@ Inserts a separator (boundary) on the undo stack. Does nothing when the
.TP
\fIpathName \fBedit undo\fR
.
-Undoes the last edit action when the \fB\-undo\fR option is true. An edit
-action is defined as all the insert and delete commands that are recorded on
-the undo stack in between two separators. Generates an error when the undo
+Undoes the last edit action when the \fB\-undo\fR option is true, and returns a
+list of indices indicating what ranges were changed by the undo operation. An
+edit action is defined as all the insert and delete commands that are recorded
+on the undo stack in between two separators. Generates an error when the undo
stack is empty. Does nothing when the \fB\-undo\fR option is false.
.RE
.TP
@@ -1928,18 +1930,18 @@ and 1.
\fIpathName \fBxview scroll \fInumber what\fR
.
This command shifts the view in the window left or right according to
-\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBunits\fR, \fBpages\fR or
-\fBpixels\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR
-must be an integer, otherwise number may be specified in any of the forms
-acceptable to \fBTk_GetPixels\fR, such as
+\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBpages\fR,
+\fBpixels\fR, or \fBunits\fR. If \fIwhat\fR is \fBpages\fR or
+\fBunits\fR then \fInumber\fR must be an integer, otherwise number may be
+specified in any of the forms acceptable to \fBTk_GetPixels\fR, such as
.QW 2.0c
or
.QW 1i
(the result is rounded to the nearest integer value. If no units are given,
-pixels are assumed). If \fIwhat\fR is \fBunits\fR, the view adjusts left or
-right by \fInumber\fR average-width characters on the display; if it is
-\fBpages\fR then the view adjusts by \fInumber\fR screenfuls; if it is
-\fBpixels\fR then the view adjusts by \fInumber\fR pixels. If \fInumber\fR is
+pixels are assumed). If \fIwhat\fR is \fBpages\fR then the view adjusts by
+\fInumber\fR screenfuls; if it is \fBpixels\fR then the view adjusts by
+\fInumber\fR pixels; if it is \fBunits\fR, the view adjusts left or
+right by \fInumber\fR average-width characters on the display. If \fInumber\fR is
negative then characters farther to the left become visible; if it is positive
then characters farther to the right become visible.
.RE
@@ -1976,10 +1978,10 @@ the bottom of the window, and some other pixel is at the top.
\fIpathName \fByview scroll \fInumber what\fR
.
This command adjust the view in the window up or down according to
-\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBunits\fR, \fBpages\fR or
-\fBpixels\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then \fInumber\fR
-must be an integer, otherwise number may be specified in any of the forms
-acceptable to \fBTk_GetPixels\fR, such as
+\fInumber\fR and \fIwhat\fR. \fIWhat\fR must be \fBpages\fR,
+\fBpixels\fR, or \fBunits\fR. If \fIwhat\fR is \fBunits\fR or \fBpages\fR then
+\fInumber\fR must be an integer, otherwise number may be specified in any of
+the forms acceptable to \fBTk_GetPixels\fR, such as
.QW 2.0c
or
.QW 1i
@@ -2155,11 +2157,11 @@ insertion cursor without moving the insertion cursor.
Meta-backspace and Meta-Delete delete the word to the left of the insertion
cursor.
.IP [30]
-Control-x deletes whatever is selected in the text widget after copying it to
-the clipboard.
-.IP [31]
Control-t reverses the order of the two characters to the right of the
insertion cursor.
+.IP [31]
+Control-x deletes whatever is selected in the text widget after copying it to
+the clipboard.
.IP [32]
Control-z undoes the last edit action if the \fB\-undo\fR option is true.
Does nothing otherwise.
diff --git a/doc/tk.n b/doc/tk.n
index 1165b67..43ce64d 100644
--- a/doc/tk.n
+++ b/doc/tk.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/tk4.0.ps b/doc/tk4.0.ps
index d79642d..5b71d92 100644
--- a/doc/tk4.0.ps
+++ b/doc/tk4.0.ps
@@ -16,7 +16,7 @@
%
% Known Problems:
% Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1
-/FMversion (3.0) def
+/FMversion (3.0) def
% Set up Color vs. Black-and-White
/FMPrintInColor { % once-thru loop gimmick
@@ -38,34 +38,34 @@ exit } loop def
% Uncomment the following line to force b&w on color printer
% /FMPrintInColor false def
-/FrameDict 195 dict def
+/FrameDict 195 dict def
systemdict /errordict known not {/errordict 10 dict def
errordict /rangecheck {stop} put} if
% The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk
-FrameDict /tmprangecheck errordict /rangecheck get put
-errordict /rangecheck {FrameDict /bug true put} put
-FrameDict /bug false put
-mark
+FrameDict /tmprangecheck errordict /rangecheck get put
+errordict /rangecheck {FrameDict /bug true put} put
+FrameDict /bug false put
+mark
% Some PS machines read past the CR, so keep the following 3 lines together!
currentfile 5 string readline
00
0000000000
-cleartomark
-errordict /rangecheck FrameDict /tmprangecheck get put
-FrameDict /bug get {
+cleartomark
+errordict /rangecheck FrameDict /tmprangecheck get put
+FrameDict /bug get {
/readline {
/gstring exch def
/gfile exch def
/gindex 0 def
{
- gfile read pop
- dup 10 eq {exit} if
- dup 13 eq {exit} if
- gstring exch gindex exch put
- /gindex gindex 1 add def
+ gfile read pop
+ dup 10 eq {exit} if
+ dup 13 eq {exit} if
+ gstring exch gindex exch put
+ /gindex gindex 1 add def
} loop
- pop
- gstring 0 gindex getinterval true
+ pop
+ gstring 0 gindex getinterval true
} def
} if
/FMVERSION {
@@ -76,12 +76,12 @@ FrameDict /bug get {
dup =
show showpage
} if
- } def
+ } def
/FMLOCAL {
FrameDict begin
- 0 def
- end
- } def
+ 0 def
+ end
+ } def
/gstring FMLOCAL
/gfile FMLOCAL
/gindex FMLOCAL
@@ -94,8 +94,8 @@ FrameDict /bug get {
/manualfeed FMLOCAL
/paperheight FMLOCAL
/paperwidth FMLOCAL
-/FMDOCUMENT {
- array /FMfonts exch def
+/FMDOCUMENT {
+ array /FMfonts exch def
/#copies exch def
FrameDict begin
0 ne dup {setmanualfeed} if
@@ -107,62 +107,62 @@ FrameDict /bug get {
currenttransfer cvlit /orgxfer exch def
currentscreen cvlit /orgproc exch def
/organgle exch def /orgfreq exch def
- setpapername
- manualfeed {true} {papersize} ifelse
- {manualpapersize} {false} ifelse
+ setpapername
+ manualfeed {true} {papersize} ifelse
+ {manualpapersize} {false} ifelse
{desperatepapersize} if
- end
- } def
+ end
+ } def
/pagesave FMLOCAL
/orgmatrix FMLOCAL
/landscape FMLOCAL
-/FMBEGINPAGE {
- FrameDict begin
+/FMBEGINPAGE {
+ FrameDict begin
/pagesave save def
3.86 setmiterlimit
/landscape exch 0 ne def
- landscape {
- 90 rotate 0 exch neg translate pop
+ landscape {
+ 90 rotate 0 exch neg translate pop
}
{pop pop}
ifelse
xscale yscale scale
/orgmatrix matrix def
- gsave
- } def
+ gsave
+ } def
/FMENDPAGE {
- grestore
+ grestore
pagesave restore
- end
+ end
showpage
- } def
-/FMFONTDEFINE {
+ } def
+/FMFONTDEFINE {
FrameDict begin
- findfont
- ReEncode
- 1 index exch
- definefont
- FMfonts 3 1 roll
+ findfont
+ ReEncode
+ 1 index exch
+ definefont
+ FMfonts 3 1 roll
put
- end
- } def
+ end
+ } def
/FMFILLS {
FrameDict begin
array /fillvals exch def
- end
- } def
+ end
+ } def
/FMFILL {
FrameDict begin
fillvals 3 1 roll put
- end
- } def
-/FMNORMALIZEGRAPHICS {
+ end
+ } def
+/FMNORMALIZEGRAPHICS {
newpath
0.0 0.0 moveto
1 setlinewidth
0 setlinecap
0 0 0 sethsbcolor
- 0 setgray
+ 0 setgray
} bind def
/fx FMLOCAL
/fy FMLOCAL
@@ -172,22 +172,22 @@ FrameDict /bug get {
/lly FMLOCAL
/urx FMLOCAL
/ury FMLOCAL
-/FMBEGINEPSF {
- end
- /FMEPSF save def
- /showpage {} def
- FMNORMALIZEGRAPHICS
- [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
- fx fy translate
+/FMBEGINEPSF {
+ end
+ /FMEPSF save def
+ /showpage {} def
+ FMNORMALIZEGRAPHICS
+ [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
+ fx fy translate
rotate
- fw urx llx sub div fh ury lly sub div scale
- llx neg lly neg translate
+ fw urx llx sub div fh ury lly sub div scale
+ llx neg lly neg translate
} bind def
/FMENDEPSF {
FMEPSF restore
- FrameDict begin
+ FrameDict begin
} bind def
-FrameDict begin
+FrameDict begin
/setmanualfeed {
%%BeginFeature *ManualFeed True
statusdict /manualfeed true put
@@ -196,16 +196,16 @@ FrameDict begin
/max {2 copy lt {exch} if pop} bind def
/min {2 copy gt {exch} if pop} bind def
/inch {72 mul} def
-/pagedimen {
- paperheight sub abs 16 lt exch
+/pagedimen {
+ paperheight sub abs 16 lt exch
paperwidth sub abs 16 lt and
{/papername exch def} {pop} ifelse
} def
/papersizedict FMLOCAL
-/setpapername {
- /papersizedict 14 dict def
+/setpapername {
+ /papersizedict 14 dict def
papersizedict begin
- /papername /unknown def
+ /papername /unknown def
/Letter 8.5 inch 11.0 inch pagedimen
/LetterSmall 7.68 inch 10.16 inch pagedimen
/Tabloid 11.0 inch 17.0 inch pagedimen
@@ -237,9 +237,9 @@ FrameDict begin
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
- /FMdicttop countdictstack 1 add def
- statusdict begin stopped end
- countdictstack -1 FMdicttop {pop end} for
+ /FMdicttop countdictstack 1 add def
+ statusdict begin stopped end
+ countdictstack -1 FMdicttop {pop end} for
} def
/manualpapersize {
papersizedict begin
@@ -258,14 +258,14 @@ FrameDict begin
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
- stopped
+ stopped
} def
/desperatepapersize {
statusdict /setpageparams known
{
- paperwidth paperheight 0 1
+ paperwidth paperheight 0 1
statusdict begin
- {setpageparams} stopped pop
+ {setpageparams} stopped pop
end
} if
} def
@@ -314,18 +314,18 @@ FrameDict begin
/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron
/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
] def
-/ReEncode {
- dup
- length
- dict begin
+/ReEncode {
+ dup
+ length
+ dict begin
{
- 1 index /FID ne
- {def}
- {pop pop} ifelse
- } forall
- 0 eq {/Encoding DiacriticEncoding def} if
- currentdict
- end
+ 1 index /FID ne
+ {def}
+ {pop pop} ifelse
+ } forall
+ 0 eq {/Encoding DiacriticEncoding def} if
+ currentdict
+ end
} bind def
/graymode true def
/bwidth FMLOCAL
@@ -342,7 +342,7 @@ FrameDict begin
/bpside exch def
/bstring exch def
/onbits 0 def /offbits 0 def
- freq sangle landscape {90 add} if
+ freq sangle landscape {90 add} if
{/y exch def
/x exch def
/xindex x 1 add 2 div bpside mul cvi def
@@ -370,14 +370,14 @@ FrameDict begin
/SAT FMLOCAL
/BRIGHT FMLOCAL
/Colors FMLOCAL
-FMPrintInColor
-
+FMPrintInColor
+
{
/HUE 0 def
/SAT 0 def
/BRIGHT 0 def
% array of arrays Hue and Sat values for the separations [HUE BRIGHT]
- /Colors
+ /Colors
[[0 0 ] % black
[0 0 ] % white
[0.00 1.0] % red
@@ -387,44 +387,44 @@ FMPrintInColor
[0.83 1.0] % magenta
[0.16 1.0] % comment / yellow
] def
-
- /BEGINBITMAPCOLOR {
+
+ /BEGINBITMAPCOLOR {
BITMAPCOLOR} def
- /BEGINBITMAPCOLORc {
+ /BEGINBITMAPCOLORc {
BITMAPCOLORc} def
- /BEGINBITMAPTRUECOLOR {
+ /BEGINBITMAPTRUECOLOR {
BITMAPTRUECOLOR } def
- /BEGINBITMAPTRUECOLORc {
+ /BEGINBITMAPTRUECOLORc {
BITMAPTRUECOLORc } def
- /K {
+ /K {
Colors exch get dup
- 0 get /HUE exch store
+ 0 get /HUE exch store
1 get /BRIGHT exch store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
- {HUE SAT BRIGHT sethsbcolor}
+ {HUE SAT BRIGHT sethsbcolor}
ifelse
} def
- /FMsetgray {
- /SAT exch 1.0 exch sub store
+ /FMsetgray {
+ /SAT exch 1.0 exch sub store
HUE 0 eq BRIGHT 0 eq and
{1.0 SAT sub setgray}
- {HUE SAT BRIGHT sethsbcolor}
+ {HUE SAT BRIGHT sethsbcolor}
ifelse
} bind def
}
-
+
{
- /BEGINBITMAPCOLOR {
+ /BEGINBITMAPCOLOR {
BITMAPGRAY} def
- /BEGINBITMAPCOLORc {
+ /BEGINBITMAPCOLORc {
BITMAPGRAYc} def
- /BEGINBITMAPTRUECOLOR {
+ /BEGINBITMAPTRUECOLOR {
BITMAPTRUEGRAY } def
- /BEGINBITMAPTRUECOLORc {
+ /BEGINBITMAPTRUECOLORc {
BITMAPTRUEGRAYc } def
/FMsetgray {setgray} bind def
- /K {
+ /K {
pop
} def
}
@@ -435,27 +435,27 @@ ifelse
/dnormalize {
dtransform round exch round exch idtransform
} bind def
-/lnormalize {
+/lnormalize {
0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop
} bind def
-/H {
+/H {
lnormalize setlinewidth
} bind def
/Z {
setlinecap
} bind def
/fillvals FMLOCAL
-/X {
+/X {
fillvals exch get
dup type /stringtype eq
- {8 1 setpattern}
+ {8 1 setpattern}
{grayness}
ifelse
} bind def
-/V {
+/V {
gsave eofill grestore
} bind def
-/N {
+/N {
stroke
} bind def
/M {newpath moveto} bind def
@@ -463,15 +463,15 @@ ifelse
/D {curveto} bind def
/O {closepath} bind def
/n FMLOCAL
-/L {
+/L {
/n exch def
newpath
normalize
- moveto
+ moveto
2 1 n {pop normalize lineto} for
} bind def
-/Y {
- L
+/Y {
+ L
closepath
} bind def
/x1 FMLOCAL
@@ -479,7 +479,7 @@ ifelse
/y1 FMLOCAL
/y2 FMLOCAL
/rad FMLOCAL
-/R {
+/R {
/y2 exch def
/x2 exch def
/y1 exch def
@@ -488,9 +488,9 @@ ifelse
x2 y1
x2 y2
x1 y2
- 4 Y
+ 4 Y
} bind def
-/RR {
+/RR {
/rad exch def
normalize
/y2 exch def
@@ -507,87 +507,87 @@ ifelse
closepath
16 {pop} repeat
} bind def
-/C {
+/C {
grestore
gsave
- R
+ R
clip
} bind def
/FMpointsize FMLOCAL
-/F {
+/F {
FMfonts exch get
FMpointsize scalefont
setfont
} bind def
-/Q {
+/Q {
/FMpointsize exch def
- F
+ F
} bind def
-/T {
+/T {
moveto show
} bind def
-/RF {
+/RF {
rotate
0 ne {-1 1 scale} if
} bind def
-/TF {
+/TF {
gsave
- moveto
+ moveto
RF
show
grestore
} bind def
-/P {
+/P {
moveto
0 32 3 2 roll widthshow
} bind def
-/PF {
+/PF {
gsave
- moveto
+ moveto
RF
0 32 3 2 roll widthshow
grestore
} bind def
-/S {
+/S {
moveto
0 exch ashow
} bind def
-/SF {
+/SF {
gsave
moveto
RF
0 exch ashow
grestore
} bind def
-/B {
+/B {
moveto
0 32 4 2 roll 0 exch awidthshow
} bind def
-/BF {
+/BF {
gsave
moveto
RF
0 32 4 2 roll 0 exch awidthshow
grestore
} bind def
-/G {
+/G {
gsave
newpath
- normalize translate 0.0 0.0 moveto
- dnormalize scale
- 0.0 0.0 1.0 5 3 roll arc
+ normalize translate 0.0 0.0 moveto
+ dnormalize scale
+ 0.0 0.0 1.0 5 3 roll arc
closepath fill
grestore
} bind def
-/A {
+/A {
gsave
savematrix
newpath
- 2 index 2 div add exch 3 index 2 div sub exch
- normalize 2 index 2 div sub exch 3 index 2 div add exch
- translate
- scale
- 0.0 0.0 1.0 5 3 roll arc
+ 2 index 2 div add exch 3 index 2 div sub exch
+ normalize 2 index 2 div sub exch 3 index 2 div add exch
+ translate
+ scale
+ 0.0 0.0 1.0 5 3 roll arc
restorematrix
stroke
grestore
@@ -603,37 +603,37 @@ ifelse
/FMsaveobject FMLOCAL
/FMoptop FMLOCAL
/FMdicttop FMLOCAL
-/BEGINPRINTCODE {
- /FMdicttop countdictstack 1 add def
- /FMoptop count 4 sub def
+/BEGINPRINTCODE {
+ /FMdicttop countdictstack 1 add def
+ /FMoptop count 4 sub def
/FMsaveobject save def
- userdict begin
- /showpage {} def
- FMNORMALIZEGRAPHICS
+ userdict begin
+ /showpage {} def
+ FMNORMALIZEGRAPHICS
3 index neg 3 index neg translate
} bind def
/ENDPRINTCODE {
- count -1 FMoptop {pop pop} for
- countdictstack -1 FMdicttop {pop end} for
- FMsaveobject restore
+ count -1 FMoptop {pop pop} for
+ countdictstack -1 FMdicttop {pop end} for
+ FMsaveobject restore
} bind def
-/gn {
- 0
- { 46 mul
- cf read pop
- 32 sub
- dup 46 lt {exit} if
- 46 sub add
+/gn {
+ 0
+ { 46 mul
+ cf read pop
+ 32 sub
+ dup 46 lt {exit} if
+ 46 sub add
} loop
- add
+ add
} bind def
/str FMLOCAL
-/cfs {
- /str sl string def
- 0 1 sl 1 sub {str exch val put} for
- str def
+/cfs {
+ /str sl string def
+ 0 1 sl 1 sub {str exch val put} for
+ str def
} bind def
-/ic [
+/ic [
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
0
@@ -655,49 +655,49 @@ ifelse
/cs FMLOCAL
/len FMLOCAL
/pos FMLOCAL
-/ms {
- /sl exch def
- /val 255 def
- /ws cfs
- /im cfs
- /val 0 def
- /bs cfs
- /cs cfs
+/ms {
+ /sl exch def
+ /val 255 def
+ /ws cfs
+ /im cfs
+ /val 0 def
+ /bs cfs
+ /cs cfs
} bind def
-400 ms
-/ip {
- is
- 0
- cf cs readline pop
- { ic exch get exec
- add
- } forall
- pop
-
+400 ms
+/ip {
+ is
+ 0
+ cf cs readline pop
+ { ic exch get exec
+ add
+ } forall
+ pop
+
} bind def
-/wh {
- /len exch def
- /pos exch def
+/wh {
+ /len exch def
+ /pos exch def
ws 0 len getinterval im pos len getinterval copy pop
- pos len
+ pos len
} bind def
-/bl {
- /len exch def
- /pos exch def
+/bl {
+ /len exch def
+ /pos exch def
bs 0 len getinterval im pos len getinterval copy pop
- pos len
+ pos len
} bind def
/s1 1 string def
-/fl {
- /len exch def
- /pos exch def
+/fl {
+ /len exch def
+ /pos exch def
/val cf s1 readhexstring pop 0 get def
pos 1 pos len add 1 sub {im exch val put} for
- pos len
+ pos len
} bind def
-/hx {
- 3 copy getinterval
- cf exch readhexstring pop pop
+/hx {
+ 3 copy getinterval
+ cf exch readhexstring pop pop
} bind def
/h FMLOCAL
/w FMLOCAL
@@ -706,57 +706,57 @@ ifelse
/bitmapsave FMLOCAL
/is FMLOCAL
/cf FMLOCAL
-/wbytes {
- dup
+/wbytes {
+ dup
8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse
} bind def
-/BEGINBITMAPBWc {
+/BEGINBITMAPBWc {
1 {} COMMONBITMAPc
} bind def
-/BEGINBITMAPGRAYc {
+/BEGINBITMAPGRAYc {
8 {} COMMONBITMAPc
} bind def
-/BEGINBITMAP2BITc {
+/BEGINBITMAP2BITc {
2 {} COMMONBITMAPc
} bind def
-/COMMONBITMAPc {
+/COMMONBITMAPc {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
- /lb w d wbytes def
- sl lb lt {lb ms} if
- /bitmapsave save def
- r
- /is im 0 lb getinterval def
- ws 0 lb getinterval is copy pop
- /cf currentfile def
- w h d [w 0 0 h neg 0 h]
- {ip} image
- bitmapsave restore
+ /lb w d wbytes def
+ sl lb lt {lb ms} if
+ /bitmapsave save def
+ r
+ /is im 0 lb getinterval def
+ ws 0 lb getinterval is copy pop
+ /cf currentfile def
+ w h d [w 0 0 h neg 0 h]
+ {ip} image
+ bitmapsave restore
grestore
} bind def
-/BEGINBITMAPBW {
+/BEGINBITMAPBW {
1 {} COMMONBITMAP
} bind def
-/BEGINBITMAPGRAY {
+/BEGINBITMAPGRAY {
8 {} COMMONBITMAP
} bind def
-/BEGINBITMAP2BIT {
+/BEGINBITMAP2BIT {
2 {} COMMONBITMAP
} bind def
-/COMMONBITMAP {
+/COMMONBITMAP {
/r exch def
/d exch def
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
- r
+ /bitmapsave save def
+ r
/is w d wbytes string def
- /cf currentfile def
- w h d [w 0 0 h neg 0 h]
+ /cf currentfile def
+ w h d [w 0 0 h neg 0 h]
{cf is readhexstring pop} image
- bitmapsave restore
+ bitmapsave restore
grestore
} bind def
/proc1 FMLOCAL
@@ -813,7 +813,7 @@ ifelse
/tran FMLOCAL
/fakecolorsetup {
/tran 256 string def
- 0 1 255 {/indx exch def
+ 0 1 255 {/indx exch def
tran indx
red indx get 77 mul
green indx get 151 mul
@@ -823,77 +823,77 @@ ifelse
{255 mul cvi tran exch get 255.0 div}
exch Fmcc settransfer
} bind def
-/BITMAPCOLOR {
+/BITMAPCOLOR {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
+ /bitmapsave save def
colorsetup
/is w d wbytes string def
- /cf currentfile def
- w h d [w 0 0 h neg 0 h]
- {cf is readhexstring pop} {is} {is} true 3 colorimage
- bitmapsave restore
+ /cf currentfile def
+ w h d [w 0 0 h neg 0 h]
+ {cf is readhexstring pop} {is} {is} true 3 colorimage
+ bitmapsave restore
grestore
} bind def
-/BITMAPCOLORc {
+/BITMAPCOLORc {
/d 8 def
gsave
translate rotate scale /h exch def /w exch def
- /lb w d wbytes def
- sl lb lt {lb ms} if
- /bitmapsave save def
+ /lb w d wbytes def
+ sl lb lt {lb ms} if
+ /bitmapsave save def
colorsetup
- /is im 0 lb getinterval def
- ws 0 lb getinterval is copy pop
- /cf currentfile def
- w h d [w 0 0 h neg 0 h]
+ /is im 0 lb getinterval def
+ ws 0 lb getinterval is copy pop
+ /cf currentfile def
+ w h d [w 0 0 h neg 0 h]
{ip} {is} {is} true 3 colorimage
- bitmapsave restore
+ bitmapsave restore
grestore
} bind def
-/BITMAPTRUECOLORc {
+/BITMAPTRUECOLORc {
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
-
+ /bitmapsave save def
+
/is w string def
-
- ws 0 w getinterval is copy pop
- /cf currentfile def
- w h 8 [w 0 0 h neg 0 h]
+
+ ws 0 w getinterval is copy pop
+ /cf currentfile def
+ w h 8 [w 0 0 h neg 0 h]
{ip} {gip} {bip} true 3 colorimage
- bitmapsave restore
+ bitmapsave restore
grestore
} bind def
-/BITMAPTRUECOLOR {
+/BITMAPTRUECOLOR {
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
+ /bitmapsave save def
/is w string def
/gis w string def
/bis w string def
- /cf currentfile def
- w h 8 [w 0 0 h neg 0 h]
- { cf is readhexstring pop }
- { cf gis readhexstring pop }
- { cf bis readhexstring pop }
- true 3 colorimage
- bitmapsave restore
+ /cf currentfile def
+ w h 8 [w 0 0 h neg 0 h]
+ { cf is readhexstring pop }
+ { cf gis readhexstring pop }
+ { cf bis readhexstring pop }
+ true 3 colorimage
+ bitmapsave restore
grestore
} bind def
-/BITMAPTRUEGRAYc {
+/BITMAPTRUEGRAYc {
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
-
+ /bitmapsave save def
+
/is w string def
-
- ws 0 w getinterval is copy pop
- /cf currentfile def
- w h 8 [w 0 0 h neg 0 h]
+
+ ws 0 w getinterval is copy pop
+ /cf currentfile def
+ w h 8 [w 0 0 h neg 0 h]
{ip gip bip w gray} image
- bitmapsave restore
+ bitmapsave restore
grestore
} bind def
/ww FMLOCAL
@@ -901,7 +901,7 @@ ifelse
/g FMLOCAL
/b FMLOCAL
/i FMLOCAL
-/gray {
+/gray {
/ww exch def
/b exch def
/g exch def
@@ -910,30 +910,30 @@ ifelse
b i get .114 mul add add r i 3 -1 roll floor cvi put } for
r
} bind def
-/BITMAPTRUEGRAY {
+/BITMAPTRUEGRAY {
gsave
translate rotate scale /h exch def /w exch def
- /bitmapsave save def
+ /bitmapsave save def
/is w string def
/gis w string def
/bis w string def
- /cf currentfile def
- w h 8 [w 0 0 h neg 0 h]
- { cf is readhexstring pop
- cf gis readhexstring pop
+ /cf currentfile def
+ w h 8 [w 0 0 h neg 0 h]
+ { cf is readhexstring pop
+ cf gis readhexstring pop
cf bis readhexstring pop w gray} image
- bitmapsave restore
+ bitmapsave restore
grestore
} bind def
-/BITMAPGRAY {
+/BITMAPGRAY {
8 {fakecolorsetup} COMMONBITMAP
} bind def
-/BITMAPGRAYc {
+/BITMAPGRAYc {
8 {fakecolorsetup} COMMONBITMAPc
} bind def
/ENDBITMAP {
} bind def
-end
+end
/ALDsave FMLOCAL
/ALDmatrix matrix def ALDmatrix currentmatrix pop
/StartALD {
diff --git a/doc/tk_mac.n b/doc/tk_mac.n
index 87c43aa..a4206a9 100644
--- a/doc/tk_mac.n
+++ b/doc/tk_mac.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tk::mac n 8.6 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -48,10 +48,10 @@ the command is absent, no action will be taken.
.TP
\fB::tk::mac::DoScriptFile\fR
.
-The default Apple Event handler for AEDoScriptHandler. This command
+The default Apple Event handler for AEDoScriptHandler. This command
executes a Tcl file when an AppleScript sends a
.QW "do script"
-command to Wish with a file path as a parameter.
+command to Wish with a file path as a parameter.
.TP
\fB::tk::mac::DoScriptText\fR
.
@@ -131,7 +131,7 @@ If a proc of this name is defined it is the default Apple Event handler for
kAEPrintDocuments,
.QW pdoc ,
the Apple Event sent when your application is asked to print a
-document. It takes a single absolute file path as an argument.
+document. It takes a single absolute file path as an argument.
.TP
\fB::tk::mac::Quit\fR
.
@@ -165,15 +165,15 @@ set).
.TP
\fB::tk::mac::PerformService\fR
.
-Executes a Tcl procedure called from the macOS
-.QW Services
+Executes a Tcl procedure called from the macOS
+.QW Services
menu in the Application menu item. The
.QW Services
menu item allows for inter-application communication; data from one
application, such as selected text, can be sent to another application
for processing, for example to Safari as a search item for Google, or
to TextEdit to be appended to a file. An example of the proc is below,
-and should be rewritten in an application script for customization:
+and should be rewritten in an application script for customization:
.RS
.PP
.CS
@@ -184,7 +184,7 @@ proc ::tk::mac::PerformService {} {
.CE
.RE
Note that the mechanism for retrieving the data is from the clipboard;
-there is no other supported way to obtain the data. If the Services
+there is no other supported way to obtain the data. If the Services
process is not desired, the NSServices keys can be deleted from
the application's Info.plist file. The underlying code supporting this
command also allows the text, entry and ttk::entry widgets to access
@@ -203,7 +203,7 @@ URL, although it can defined as such. Wish includes a stub URL scheme
of
.QW foo://
in the CFBundleURLSchemes key of its Info.plist file; this should be customized for the specific URL
-scheme the developer wants to support.
+scheme the developer wants to support.
.TP
\fB::tk::mac::GetAppPath\fR
.
diff --git a/doc/tkvars.n b/doc/tkvars.n
index a80fd54..f872d1f 100644
--- a/doc/tkvars.n
+++ b/doc/tkvars.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tkvars n 4.1 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/tkwait.n b/doc/tkwait.n
index a31aee7..82d51ba 100644
--- a/doc/tkwait.n
+++ b/doc/tkwait.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH tkwait n "" Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/toplevel.n b/doc/toplevel.n
index 84fab14..c56e035 100644
--- a/doc/toplevel.n
+++ b/doc/toplevel.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH toplevel n 8.4 Tk "Tk Built-In Commands"
.so man.macros
.BS
@@ -25,6 +25,17 @@ except that its value may also be specified as an empty string.
In this case, the widget will display no background or border, and
no colors will be consumed from its colormap for its background
and border.
+.VS "8.7, TIP262"
+An empty background will disable drawing the background image.
+.OP \-backgroundimage backgroundImage BackgroundImage
+This specifies an image to display on the toplevel's background within
+the border of the toplevel (i.e., the image will be clipped by the
+toplevel's highlight ring and border, if either are present) on top of
+the background;
+subwidgets of the toplevel will be drawn on top. The image must have
+been created with the \fBimage create\fR command. If specified as the
+empty string, no image will be displayed.
+.VE "8.7, TIP262"
.OP \-class class Class
Specifies a class for the window.
This class will be used when querying the option database for
@@ -71,6 +82,15 @@ Defaults to the same screen as its parent.
This option is special in that it may not be specified via the option
database, and it may not be modified with the \fBconfigure\fR
widget command.
+.OP \-tile tile Tile
+.VS "8.7, TIP262"
+This specifies how to draw the background image (see
+\fB\-backgroundimage\fR) on the toplevel.
+If true (according to \fBTcl_GetBoolean\fR), the image will be tiled
+to fill the whole toplevel, with the origin of the first copy of the
+image being the top left of the interior of the toplevel.
+If false (the default), the image will be centered within the toplevel.
+.VE "8.7, TIP262"
.OP \-use use Use
This option is used for embedding. If the value is not an empty string,
it must be the window identifier of a container window, specified as
@@ -109,7 +129,7 @@ top-level window: its X parent is the root window of a screen
rather than the logical parent from its Tk path name. The primary
purpose of a toplevel is to serve as a container for dialog boxes
and other collections of widgets. The only visible features
-of a toplevel are its background color and an optional 3-D border
+of a toplevel are its background and an optional 3-D border
to make the toplevel appear raised or sunken.
.SH "WIDGET COMMAND"
.PP
diff --git a/doc/ttk_Theme.3 b/doc/ttk_Theme.3
index 8031b8a..a42dd38 100644
--- a/doc/ttk_Theme.3
+++ b/doc/ttk_Theme.3
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Ttk_CreateTheme 3 8.5 Tk "Tk Themed Widget"
.so man.macros
.BS
diff --git a/doc/ttk_button.n b/doc/ttk_button.n
index cf42e28..eb40d9d 100644
--- a/doc/ttk_button.n
+++ b/doc/ttk_button.n
@@ -17,7 +17,7 @@ A \fBttk::button\fR widget displays a textual label and/or image,
and evaluates a command when pressed.
.SO ttk_widget
\-class \-compound \-cursor
-\-image \-state \-style
+\-image \-justify \-state \-style
\-takefocus \-text \-textvariable
\-underline \-width
.SE
diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n
index 9d0bcc6..3ec3e77 100644
--- a/doc/ttk_combobox.n
+++ b/doc/ttk_combobox.n
@@ -19,7 +19,7 @@ the user may select the value of the text field from among the
values in the list.
.SO ttk_widget
\-class \-cursor \-takefocus
-\-style
+\-style \-placeholder
.SE
.\" ALSO: Other entry widget options
.SH "WIDGET-SPECIFIC OPTIONS"
diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n
index adc4f16..cb58005 100644
--- a/doc/ttk_entry.n
+++ b/doc/ttk_entry.n
@@ -23,8 +23,10 @@ with the \fB\-textvariable\fR option.
Entry widgets support horizontal scrolling with the
standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command.
.SO ttk_widget
-\-class \-cursor \-style
-\-takefocus \-xscrollcommand
+\-class \-cursor
+\-font \-foreground
+\-style
+\-takefocus \-xscrollcommand \-placeholder
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-exportselection exportSelection ExportSelection
@@ -34,8 +36,6 @@ If the selection is exported, then selecting in the widget deselects
the current X selection, selecting outside the widget deselects any
widget selection, and the widget will respond to selection retrieval
requests when it has a selection.
-.\" MAYBE: .OP \-font font Font
-.\" MAYBE: .OP \-foreground foreground Foreground
.\" MAYBE: .OP \-insertbackground insertBackground Foreground
.\" MAYBE: .OP \-insertwidth insertWidth InsertWidth
.OP \-invalidcommand invalidCommand InvalidCommand
diff --git a/doc/ttk_label.n b/doc/ttk_label.n
index 871fab7..1b25f9f 100644
--- a/doc/ttk_label.n
+++ b/doc/ttk_label.n
@@ -18,31 +18,16 @@ A \fBttk::label\fR widget displays a textual label and/or image.
The label may be linked to a Tcl variable
to automatically change the displayed text.
.SO ttk_widget
-\-class \-compound \-cursor
-\-image \-padding \-state \-style \-takefocus
+\-anchor \-class \-compound \-cursor
+\-font \-foreground
+\-image \-justify \-padding \-state \-style \-takefocus
\-text \-textvariable \-underline
-\-width
+\-width \-wraplength
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
-.OP \-anchor anchor Anchor
-Specifies how the information in the widget is positioned
-relative to the inner margins. Legal values are
-\fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
-\fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR.
-See also \fB\-justify\fR.
.OP \-background frameColor FrameColor
The widget's background color.
If unspecified, the theme default is used.
-.OP \-font font Font
-Font to use for label text.
-.OP \-foreground textColor TextColor
-The widget's foreground color.
-If unspecified, the theme default is used.
-.OP \-justify justify Justify
-If there are multiple lines of text, specifies how
-the lines are laid out relative to one another.
-One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
-See also \fB\-anchor\fR.
.OP \-relief relief Relief
.\" Rewrite this:
Specifies the 3-D effect desired for the widget border.
diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n
index 5d6316a..df469b6 100644
--- a/doc/ttk_progressbar.n
+++ b/doc/ttk_progressbar.n
@@ -19,14 +19,22 @@ operation. They can operate in two modes: \fIdeterminate\fR mode shows the
amount completed relative to the total amount of work to be done, and
\fIindeterminate\fR mode provides an animated display to let the user know
that something is happening.
+.PP
+If the value of \fB-orient\fR is \fBhorizontal\fR a text string can be
+displayed inside the progressbar. This string can be configured using
+the \fB-anchor\fR, \fB-font\fR, \fB-foreground\fR, \fB-justify\fR,
+\fB-text\fR and \fB-wraplength\fR options. If the value of \fB-orient\fR
+is \fBvertical\fR then these options are ignored.
.SO ttk_widget
-\-class \-cursor \-takefocus
-\-style
+\-anchor \-class \-cursor
+\-font \-foreground \-justify \-style
+\-takefocus \-text \-wraplength
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-length length Length
Specifies the length of the long axis of the progress bar
-(width if horizontal, height if vertical).
+(width if horizontal, height if vertical). The value may have any of the forms
+acceptable to \fBTk_GetPixels\fR.
.OP \-maximum maximum Maximum
A floating point number specifying the maximum \fB\-value\fR.
Defaults to 100.
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index bd80760..08c7f52 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -118,14 +118,6 @@ document. 1.0 refers to the end of the document, 0.333
refers to a point one-third of the way through the document,
and so on.
.TP
-\fIprefix \fBscroll \fInumber \fBunits\fR
-The widget should adjust its view by \fInumber\fR units.
-The units are defined in whatever way makes sense for the widget,
-such as characters or lines in a text widget.
-\fINumber\fR is either 1, which means one unit should scroll off
-the top or left of the window, or \-1, which means that one unit
-should scroll off the bottom or right of the window.
-.TP
\fIprefix \fBscroll \fInumber \fBpages\fR
The widget should adjust its view by \fInumber\fR pages.
It is up to the widget to define the meaning of a page; typically
@@ -134,6 +126,14 @@ is a slight overlap between the old and new views.
\fINumber\fR is either 1, which means the next page should
become visible, or \-1, which means that the previous page should
become visible.
+.TP
+\fIprefix \fBscroll \fInumber \fBunits\fR
+The widget should adjust its view by \fInumber\fR units.
+The units are defined in whatever way makes sense for the widget,
+such as characters or lines in a text widget.
+\fINumber\fR is either 1, which means one unit should scroll off
+the top or left of the window, or \-1, which means that one unit
+should scroll off the bottom or right of the window.
.SH "WIDGET STATES"
.PP
The scrollbar automatically sets the \fBdisabled\fR state bit.
diff --git a/doc/ttk_spinbox.n b/doc/ttk_spinbox.n
index 9ae9881..c18f987 100644
--- a/doc/ttk_spinbox.n
+++ b/doc/ttk_spinbox.n
@@ -22,7 +22,7 @@ of the \fBttk::entry\fR widget including support of the
to a Tcl variable.
.SO ttk_widget
\-class \-cursor \-state \-style
-\-takefocus \-xscrollcommand
+\-takefocus \-xscrollcommand \-placeholder
.SE
.SO ttk_entry
\-validate \-validatecommand
diff --git a/doc/ttk_widget.n b/doc/ttk_widget.n
index 281ce74..2dca269 100644
--- a/doc/ttk_widget.n
+++ b/doc/ttk_widget.n
@@ -71,6 +71,12 @@ See the description of \fB\-xscrollcommand\fR above for details.
.SH "LABEL OPTIONS"
The following options are supported by labels, buttons,
and other button-like widgets:
+.OP \-anchor anchor Anchor
+Specifies how the information in the widget is positioned
+relative to the inner margins. Legal values are
+\fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR,
+\fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, and \fBcenter\fR.
+See also \fB\-justify\fR (for widgets supporting this option).
.OP \-compound compound Compound
Specifies how to display the image relative to the text,
in the case both \fB\-text\fR and \fB\-image\fR are present.
@@ -90,6 +96,11 @@ Display image above, below, left of, or right of the text, respectively.
.IP none
The default; display the image if present, otherwise the text.
.RE
+.OP \-font font Font
+Font to use for the text displayed by the widget.
+.OP \-foreground textColor TextColor
+The widget's foreground color.
+If unspecified, the theme default is used.
.OP \-image image Image
Specifies an image to display.
This is a list of 1 or more elements.
@@ -98,6 +109,11 @@ The rest of the list is a sequence of \fIstatespec / value\fR pairs
as per \fBstyle map\fR, specifying different images to use when
the widget is in a particular state or combination of states.
All images in the list should have the same size.
+.OP \-justify justify Justify
+If there are multiple lines of text, specifies how
+the lines are laid out relative to one another.
+One of \fBleft\fR, \fBcenter\fR, or \fBright\fR.
+See also \fB\-anchor\fR (for widgets supporting this option).
.OP \-padding padding Padding
Specifies the internal padding for the widget.
The padding is a list of up to four length specifications
@@ -111,7 +127,7 @@ a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
.OP \-text text Text
Specifies a text string to be displayed inside the widget
-(unless overridden by \fB\-textvariable\fR).
+(unless overridden by \fB\-textvariable\fR for the widgets supporting this option).
.OP \-textvariable textVariable Variable
Specifies the name of a global variable whose value will be used
in place of the \fB\-text\fR resource.
@@ -124,6 +140,22 @@ If greater than zero, specifies how much space, in character widths,
to allocate for the text label.
If less than zero, specifies a minimum width.
If zero or unspecified, the natural width of the text label is used.
+Note that some themes may specify a non-zero \fB\-width\fR
+in the style.
+.OP \-wraplength wrapLength WrapLength
+Specifies the maximum line length. The value may have any of the forms
+acceptable to \fBTk_GetPixels\fR. If this option is less than or equal
+to zero, then automatic wrapping is not performed; otherwise
+the text is split into lines such that no line is longer
+than the specified value.
+.SH "ENTRY OPTIONS"
+The following option is supported by entry, spinbox and combobox:
+.OP \-placeholder placeHolder PlaceHolder
+Specifies a help text string to display if no text is otherwise displayed,
+that is when the widget is empty. The placeholder text is displayed using
+the values of the \fB\-font\fR and \fB\-justify\fR options. The foreground
+color of the placeholder text can be changed using the
+\fB\-placeholderforeground\fR style option.
.SH "COMPATIBILITY OPTIONS"
This option is only available for themed widgets that have
.QW corresponding
@@ -222,14 +254,15 @@ way through the content appears at the left edge of the window.
This command shifts the view in the window left or right according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR.
'\" or an abbreviation of one of these, but we don't document that.
-If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
-\fInumber\fR average-width characters on the display; if it is
+If \fIwhat\fR is
\fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
If \fInumber\fR is negative then characters farther to the left
become visible; if it is positive then characters farther to the right
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
+\fInumber\fR average-width characters on the display.
.RE
.TP
\fIpathName \fByview \fIargs\fR
@@ -261,14 +294,15 @@ way through the content appears at the top edge of the window.
This command shifts the view in the window up or down according to
\fInumber\fR and \fIwhat\fR.
\fINumber\fR must be an integer.
-\fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
+\fIWhat\fR must be either \fBpages\fR or \fBunits\fR.
'\" or an abbreviation of one of these, but we don't document that.
-If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
-\fInumber\fR average-width characters on the display; if it is
+If \fIwhat\fR is
\fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
If \fInumber\fR is negative then items farther to the top
become visible; if it is positive then items farther to the bottom
become visible.
+If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
+\fInumber\fR average-width characters on the display.
.RE
.SH "WIDGET STATES"
The widget state is a bitmap of independent state flags.
diff --git a/doc/winfo.n b/doc/winfo.n
index a833e31..fed5c39 100644
--- a/doc/winfo.n
+++ b/doc/winfo.n
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH winfo n 4.3 Tk "Tk Built-In Commands"
.so man.macros
.BS
diff --git a/doc/wish.1 b/doc/wish.1
index 93ade0d..f7d97d9 100644
--- a/doc/wish.1
+++ b/doc/wish.1
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH wish 1 8.0 Tk "Tk Applications"
.so man.macros
.BS
@@ -77,7 +77,7 @@ If there exists a file
in the home directory of the user, \fBwish\fR evaluates the file as a
Tcl script just before reading the first command from standard input.
.PP
-If arguments to \fBwish\fR do specify a \fIfileName\fR, then
+If arguments to \fBwish\fR do specify a \fIfileName\fR, then
\fIfileName\fR is treated as the name of a script file.
\fBWish\fR will evaluate the script in \fIfileName\fR (which
presumably creates a user interface), then it will respond to events
diff --git a/doc/wm.n b/doc/wm.n
index a137d06..aae68d9 100644
--- a/doc/wm.n
+++ b/doc/wm.n
@@ -494,7 +494,7 @@ other contexts. At the
script level the command will accept only the first image passed in the
parameters as support for multiple sizes/resolutions on macOS is outside Tk's
scope. Developers should use the largest icon they can support
-(preferably 512 pixels) to ensure smooth rendering on the Mac.
+(preferably 512 pixels) to ensure smooth rendering on the Mac.
.RE
.TP
\fBwm iconposition \fIwindow\fR ?\fIx y\fR?
diff --git a/generic/ks_names.h b/generic/ks_names.h
index 3577390..7d11cae 100644
--- a/generic/ks_names.h
+++ b/generic/ks_names.h
@@ -22,6 +22,10 @@
{ "Escape", 0xFF1B },
{ "Delete", 0xFFFF },
{ "Multi_key", 0xFF20 },
+{ "Codeinput", 0xFF37 },
+{ "SingleCandidate", 0xFF3C },
+{ "MultipleCandidate", 0xFF3D },
+{ "PreviousCandidate", 0xFF3E },
{ "Kanji", 0xFF21 },
{ "Muhenkan", 0xFF22 },
{ "Henkan_Mode", 0xFF23 },
@@ -39,6 +43,9 @@
{ "Kana_Shift", 0xFF2E },
{ "Eisu_Shift", 0xFF2F },
{ "Eisu_toggle", 0xFF30 },
+{ "Kanji_Bangou", 0xFF37 },
+{ "Zen_Koho", 0xFF3D },
+{ "Mae_Koho", 0xFF3E },
{ "Home", 0xFF50 },
{ "Left", 0xFF51 },
{ "Up", 0xFF52 },
@@ -178,6 +185,180 @@
{ "Super_R", 0xFFEC },
{ "Hyper_L", 0xFFED },
{ "Hyper_R", 0xFFEE },
+{ "ISO_Lock", 0xFE01 },
+{ "ISO_Level2_Latch", 0xFE02 },
+{ "ISO_Level3_Shift", 0xFE03 },
+{ "ISO_Level3_Latch", 0xFE04 },
+{ "ISO_Level3_Lock", 0xFE05 },
+{ "ISO_Level5_Shift", 0xFE11 },
+{ "ISO_Level5_Latch", 0xFE12 },
+{ "ISO_Level5_Lock", 0xFE13 },
+{ "ISO_Group_Shift", 0xFF7E },
+{ "ISO_Group_Latch", 0xFE06 },
+{ "ISO_Group_Lock", 0xFE07 },
+{ "ISO_Next_Group", 0xFE08 },
+{ "ISO_Next_Group_Lock", 0xFE09 },
+{ "ISO_Prev_Group", 0xFE0A },
+{ "ISO_Prev_Group_Lock", 0xFE0B },
+{ "ISO_First_Group", 0xFE0C },
+{ "ISO_First_Group_Lock", 0xFE0D },
+{ "ISO_Last_Group", 0xFE0E },
+{ "ISO_Last_Group_Lock", 0xFE0F },
+{ "ISO_Left_Tab", 0xFE20 },
+{ "ISO_Move_Line_Up", 0xFE21 },
+{ "ISO_Move_Line_Down", 0xFE22 },
+{ "ISO_Partial_Line_Up", 0xFE23 },
+{ "ISO_Partial_Line_Down", 0xFE24 },
+{ "ISO_Partial_Space_Left", 0xFE25 },
+{ "ISO_Partial_Space_Right", 0xFE26 },
+{ "ISO_Set_Margin_Left", 0xFE27 },
+{ "ISO_Set_Margin_Right", 0xFE28 },
+{ "ISO_Release_Margin_Left", 0xFE29 },
+{ "ISO_Release_Margin_Right", 0xFE2A },
+{ "ISO_Release_Both_Margins", 0xFE2B },
+{ "ISO_Fast_Cursor_Left", 0xFE2C },
+{ "ISO_Fast_Cursor_Right", 0xFE2D },
+{ "ISO_Fast_Cursor_Up", 0xFE2E },
+{ "ISO_Fast_Cursor_Down", 0xFE2F },
+{ "ISO_Continuous_Underline", 0xFE30 },
+{ "ISO_Discontinuous_Underline", 0xFE31 },
+{ "ISO_Emphasize", 0xFE32 },
+{ "ISO_Center_Object", 0xFE33 },
+{ "ISO_Enter", 0xFE34 },
+{ "dead_grave", 0xFE50 },
+{ "dead_acute", 0xFE51 },
+{ "dead_circumflex", 0xFE52 },
+{ "dead_tilde", 0xFE53 },
+{ "dead_perispomeni", 0xFE53 },
+{ "dead_macron", 0xFE54 },
+{ "dead_breve", 0xFE55 },
+{ "dead_abovedot", 0xFE56 },
+{ "dead_diaeresis", 0xFE57 },
+{ "dead_abovering", 0xFE58 },
+{ "dead_doubleacute", 0xFE59 },
+{ "dead_caron", 0xFE5A },
+{ "dead_cedilla", 0xFE5B },
+{ "dead_ogonek", 0xFE5C },
+{ "dead_iota", 0xFE5D },
+{ "dead_voiced_sound", 0xFE5E },
+{ "dead_semivoiced_sound", 0xFE5F },
+{ "dead_belowdot", 0xFE60 },
+{ "dead_hook", 0xFE61 },
+{ "dead_horn", 0xFE62 },
+{ "dead_stroke", 0xFE63 },
+{ "dead_abovecomma", 0xFE64 },
+{ "dead_psili", 0xFE64 },
+{ "dead_abovereversedcomma", 0xFE65 },
+{ "dead_dasia", 0xFE65 },
+{ "dead_doublegrave", 0xFE66 },
+{ "dead_belowring", 0xFE67 },
+{ "dead_belowmacron", 0xFE68 },
+{ "dead_belowcircumflex", 0xFE69 },
+{ "dead_belowtilde", 0xFE6A },
+{ "dead_belowbreve", 0xFE6B },
+{ "dead_belowdiaeresis", 0xFE6C },
+{ "dead_invertedbreve", 0xFE6D },
+{ "dead_belowcomma", 0xFE6E },
+{ "dead_currency", 0xFE6F },
+{ "dead_lowline", 0xFE90 },
+{ "dead_aboveverticalline", 0xFE91 },
+{ "dead_belowverticalline", 0xFE92 },
+{ "dead_longsolidusoverlay", 0xFE93 },
+{ "dead_a", 0xFE80 },
+{ "dead_A", 0xFE81 },
+{ "dead_e", 0xFE82 },
+{ "dead_E", 0xFE83 },
+{ "dead_i", 0xFE84 },
+{ "dead_I", 0xFE85 },
+{ "dead_o", 0xFE86 },
+{ "dead_O", 0xFE87 },
+{ "dead_u", 0xFE88 },
+{ "dead_U", 0xFE89 },
+{ "dead_small_schwa", 0xFE8A },
+{ "dead_capital_schwa", 0xFE8B },
+{ "dead_greek", 0xFE8C },
+{ "First_Virtual_Screen", 0xFED0 },
+{ "Prev_Virtual_Screen", 0xFED1 },
+{ "Next_Virtual_Screen", 0xFED2 },
+{ "Last_Virtual_Screen", 0xFED4 },
+{ "Terminate_Server", 0xFED5 },
+{ "AccessX_Enable", 0xFE70 },
+{ "AccessX_Feedback_Enable", 0xFE71 },
+{ "RepeatKeys_Enable", 0xFE72 },
+{ "SlowKeys_Enable", 0xFE73 },
+{ "BounceKeys_Enable", 0xFE74 },
+{ "StickyKeys_Enable", 0xFE75 },
+{ "MouseKeys_Enable", 0xFE76 },
+{ "MouseKeys_Accel_Enable", 0xFE77 },
+{ "Overlay1_Enable", 0xFE78 },
+{ "Overlay2_Enable", 0xFE79 },
+{ "AudibleBell_Enable", 0xFE7A },
+{ "Pointer_Left", 0xFEE0 },
+{ "Pointer_Right", 0xFEE1 },
+{ "Pointer_Up", 0xFEE2 },
+{ "Pointer_Down", 0xFEE3 },
+{ "Pointer_UpLeft", 0xFEE4 },
+{ "Pointer_UpRight", 0xFEE5 },
+{ "Pointer_DownLeft", 0xFEE6 },
+{ "Pointer_DownRight", 0xFEE7 },
+{ "Pointer_Button_Dflt", 0xFEE8 },
+{ "Pointer_Button1", 0xFEE9 },
+{ "Pointer_Button2", 0xFEEA },
+{ "Pointer_Button3", 0xFEEB },
+{ "Pointer_Button4", 0xFEEC },
+{ "Pointer_Button5", 0xFEED },
+{ "Pointer_DblClick_Dflt", 0xFEEE },
+{ "Pointer_DblClick1", 0xFEEF },
+{ "Pointer_DblClick2", 0xFEF0 },
+{ "Pointer_DblClick3", 0xFEF1 },
+{ "Pointer_DblClick4", 0xFEF2 },
+{ "Pointer_DblClick5", 0xFEF3 },
+{ "Pointer_Drag_Dflt", 0xFEF4 },
+{ "Pointer_Drag1", 0xFEF5 },
+{ "Pointer_Drag2", 0xFEF6 },
+{ "Pointer_Drag3", 0xFEF7 },
+{ "Pointer_Drag4", 0xFEF8 },
+{ "Pointer_Drag5", 0xFEFD },
+{ "Pointer_EnableKeys", 0xFEF9 },
+{ "Pointer_Accelerate", 0xFEFA },
+{ "Pointer_DfltBtnNext", 0xFEFB },
+{ "Pointer_DfltBtnPrev", 0xFEFC },
+{ "ch", 0xFEA0 },
+{ "Ch", 0xFEA1 },
+{ "CH", 0xFEA2 },
+{ "c_h", 0xFEA3 },
+{ "C_h", 0xFEA4 },
+{ "C_H", 0xFEA5 },
+{ "3270_Duplicate", 0xFD01 },
+{ "3270_FieldMark", 0xFD02 },
+{ "3270_Right2", 0xFD03 },
+{ "3270_Left2", 0xFD04 },
+{ "3270_BackTab", 0xFD05 },
+{ "3270_EraseEOF", 0xFD06 },
+{ "3270_EraseInput", 0xFD07 },
+{ "3270_Reset", 0xFD08 },
+{ "3270_Quit", 0xFD09 },
+{ "3270_PA1", 0xFD0A },
+{ "3270_PA2", 0xFD0B },
+{ "3270_PA3", 0xFD0C },
+{ "3270_Test", 0xFD0D },
+{ "3270_Attn", 0xFD0E },
+{ "3270_CursorBlink", 0xFD0F },
+{ "3270_AltCursor", 0xFD10 },
+{ "3270_KeyClick", 0xFD11 },
+{ "3270_Jump", 0xFD12 },
+{ "3270_Ident", 0xFD13 },
+{ "3270_Rule", 0xFD14 },
+{ "3270_Copy", 0xFD15 },
+{ "3270_Play", 0xFD16 },
+{ "3270_Setup", 0xFD17 },
+{ "3270_Record", 0xFD18 },
+{ "3270_ChangeScreen", 0xFD19 },
+{ "3270_DeleteWord", 0xFD1A },
+{ "3270_ExSelect", 0xFD1B },
+{ "3270_CursorSelect", 0xFD1C },
+{ "3270_PrintScreen", 0xFD1D },
+{ "3270_Enter", 0xFD1E },
{ "space", 0x20 },
{ "exclam", 0x21 },
{ "quotedbl", 0x22 },
@@ -333,7 +514,9 @@
{ "Odiaeresis", 0xD6 },
{ "multiply", 0xD7 },
{ "Oslash", 0xD8 },
+#ifndef TK_NO_DEPRECATED
{ "Ooblique", 0xD8 },
+#endif
{ "Ugrave", 0xD9 },
{ "Uacute", 0xDA },
{ "Ucircumflex", 0xDB },
@@ -367,6 +550,9 @@
{ "odiaeresis", 0xF6 },
{ "division", 0xF7 },
{ "oslash", 0xF8 },
+#ifndef TK_NO_DEPRECATED
+{ "ooblique", 0xF8 },
+#endif
{ "ugrave", 0xF9 },
{ "uacute", 0xFA },
{ "ucircumflex", 0xFB },
@@ -454,7 +640,9 @@
{ "ubreve", 0x2FD },
{ "scircumflex", 0x2FE },
{ "kra", 0x3A2 },
+#ifndef TK_NO_DEPRECATED
{ "kappa", 0x3A2 },
+#endif
{ "Rcedilla", 0x3A3 },
{ "Itilde", 0x3A5 },
{ "Lcedilla", 0x3A6 },
@@ -466,7 +654,9 @@
{ "lcedilla", 0x3B6 },
{ "emacron", 0x3BA },
{ "gcedilla", 0x3BB },
+#ifndef TK_NO_DEPRECATED
{ "gacute", 0x3BB },
+#endif
{ "tslash", 0x3BC },
{ "ENG", 0x3BD },
{ "eng", 0x3BF },
@@ -490,13 +680,44 @@
{ "uogonek", 0x3F9 },
{ "utilde", 0x3FD },
{ "umacron", 0x3FE },
+{ "Wcircumflex", 0x1000174 },
+{ "wcircumflex", 0x1000175 },
+{ "Ycircumflex", 0x1000176 },
+{ "ycircumflex", 0x1000177 },
+{ "Babovedot", 0x1001E02 },
+{ "babovedot", 0x1001E03 },
+{ "Dabovedot", 0x1001E0A },
+{ "dabovedot", 0x1001E0B },
+{ "Fabovedot", 0x1001E1E },
+{ "fabovedot", 0x1001E1F },
+{ "Mabovedot", 0x1001E40 },
+{ "mabovedot", 0x1001E41 },
+{ "Pabovedot", 0x1001E56 },
+{ "pabovedot", 0x1001E57 },
+{ "Sabovedot", 0x1001E60 },
+{ "sabovedot", 0x1001E61 },
+{ "Tabovedot", 0x1001E6A },
+{ "tabovedot", 0x1001E6B },
+{ "Wgrave", 0x1001E80 },
+{ "wgrave", 0x1001E81 },
+{ "Wacute", 0x1001E82 },
+{ "wacute", 0x1001E83 },
+{ "Wdiaeresis", 0x1001E84 },
+{ "wdiaeresis", 0x1001E85 },
+{ "Ygrave", 0x1001EF2 },
+{ "ygrave", 0x1001EF3 },
+{ "OE", 0x13BC },
+{ "oe", 0x13BD },
+{ "Ydiaeresis", 0x13BE },
{ "overline", 0x47E },
{ "kana_fullstop", 0x4A1 },
{ "kana_openingbracket", 0x4A2 },
{ "kana_closingbracket", 0x4A3 },
{ "kana_comma", 0x4A4 },
{ "kana_conjunctive", 0x4A5 },
+#ifndef TK_NO_DEPRECATED
{ "kana_middledot", 0x4A5 },
+#endif
{ "kana_WO", 0x4A6 },
{ "kana_a", 0x4A7 },
{ "kana_i", 0x4A8 },
@@ -507,7 +728,9 @@
{ "kana_yu", 0x4AD },
{ "kana_yo", 0x4AE },
{ "kana_tsu", 0x4AF },
+#ifndef TK_NO_DEPRECATED
{ "kana_tu", 0x4AF },
+#endif
{ "prolongedsound", 0x4B0 },
{ "kana_A", 0x4B1 },
{ "kana_I", 0x4B2 },
@@ -526,9 +749,13 @@
{ "kana_SO", 0x4BF },
{ "kana_TA", 0x4C0 },
{ "kana_CHI", 0x4C1 },
+#ifndef TK_NO_DEPRECATED
{ "kana_TI", 0x4C1 },
+#endif
{ "kana_TSU", 0x4C2 },
+#ifndef TK_NO_DEPRECATED
{ "kana_TU", 0x4C2 },
+#endif
{ "kana_TE", 0x4C3 },
{ "kana_TO", 0x4C4 },
{ "kana_NA", 0x4C5 },
@@ -539,7 +766,9 @@
{ "kana_HA", 0x4CA },
{ "kana_HI", 0x4CB },
{ "kana_FU", 0x4CC },
+#ifndef TK_NO_DEPRECATED
{ "kana_HU", 0x4CC },
+#endif
{ "kana_HE", 0x4CD },
{ "kana_HO", 0x4CE },
{ "kana_MA", 0x4CF },
@@ -560,7 +789,35 @@
{ "voicedsound", 0x4DE },
{ "semivoicedsound", 0x4DF },
{ "kana_switch", 0xFF7E },
+{ "Farsi_0", 0x10006F0 },
+{ "Farsi_1", 0x10006F1 },
+{ "Farsi_2", 0x10006F2 },
+{ "Farsi_3", 0x10006F3 },
+{ "Farsi_4", 0x10006F4 },
+{ "Farsi_5", 0x10006F5 },
+{ "Farsi_6", 0x10006F6 },
+{ "Farsi_7", 0x10006F7 },
+{ "Farsi_8", 0x10006F8 },
+{ "Farsi_9", 0x10006F9 },
+{ "Arabic_percent", 0x100066A },
+{ "Arabic_superscript_alef", 0x1000670 },
+{ "Arabic_tteh", 0x1000679 },
+{ "Arabic_peh", 0x100067E },
+{ "Arabic_tcheh", 0x1000686 },
+{ "Arabic_ddal", 0x1000688 },
+{ "Arabic_rreh", 0x1000691 },
{ "Arabic_comma", 0x5AC },
+{ "Arabic_fullstop", 0x10006D4 },
+{ "Arabic_0", 0x1000660 },
+{ "Arabic_1", 0x1000661 },
+{ "Arabic_2", 0x1000662 },
+{ "Arabic_3", 0x1000663 },
+{ "Arabic_4", 0x1000664 },
+{ "Arabic_5", 0x1000665 },
+{ "Arabic_6", 0x1000666 },
+{ "Arabic_7", 0x1000667 },
+{ "Arabic_8", 0x1000668 },
+{ "Arabic_9", 0x1000669 },
{ "Arabic_semicolon", 0x5BB },
{ "Arabic_question_mark", 0x5BF },
{ "Arabic_hamza", 0x5C1 },
@@ -597,7 +854,9 @@
{ "Arabic_meem", 0x5E5 },
{ "Arabic_noon", 0x5E6 },
{ "Arabic_ha", 0x5E7 },
+#ifndef TK_NO_DEPRECATED
{ "Arabic_heh", 0x5E7 },
+#endif
{ "Arabic_waw", 0x5E8 },
{ "Arabic_alefmaksura", 0x5E9 },
{ "Arabic_yeh", 0x5EA },
@@ -609,52 +868,123 @@
{ "Arabic_kasra", 0x5F0 },
{ "Arabic_shadda", 0x5F1 },
{ "Arabic_sukun", 0x5F2 },
+{ "Arabic_madda_above", 0x1000653 },
+{ "Arabic_hamza_above", 0x1000654 },
+{ "Arabic_hamza_below", 0x1000655 },
+{ "Arabic_jeh", 0x1000698 },
+{ "Arabic_veh", 0x10006A4 },
+{ "Arabic_keheh", 0x10006A9 },
+{ "Arabic_gaf", 0x10006AF },
+{ "Arabic_noon_ghunna", 0x10006BA },
+{ "Arabic_heh_doachashmee", 0x10006BE },
+{ "Farsi_yeh", 0x10006CC },
+{ "Arabic_farsi_yeh", 0x10006CC },
+{ "Arabic_yeh_baree", 0x10006D2 },
+{ "Arabic_heh_goal", 0x10006C1 },
{ "Arabic_switch", 0xFF7E },
+{ "Cyrillic_GHE_bar", 0x1000492 },
+{ "Cyrillic_ghe_bar", 0x1000493 },
+{ "Cyrillic_ZHE_descender", 0x1000496 },
+{ "Cyrillic_zhe_descender", 0x1000497 },
+{ "Cyrillic_KA_descender", 0x100049A },
+{ "Cyrillic_ka_descender", 0x100049B },
+{ "Cyrillic_KA_vertstroke", 0x100049C },
+{ "Cyrillic_ka_vertstroke", 0x100049D },
+{ "Cyrillic_EN_descender", 0x10004A2 },
+{ "Cyrillic_en_descender", 0x10004A3 },
+{ "Cyrillic_U_straight", 0x10004AE },
+{ "Cyrillic_u_straight", 0x10004AF },
+{ "Cyrillic_U_straight_bar", 0x10004B0 },
+{ "Cyrillic_u_straight_bar", 0x10004B1 },
+{ "Cyrillic_HA_descender", 0x10004B2 },
+{ "Cyrillic_ha_descender", 0x10004B3 },
+{ "Cyrillic_CHE_descender", 0x10004B6 },
+{ "Cyrillic_che_descender", 0x10004B7 },
+{ "Cyrillic_CHE_vertstroke", 0x10004B8 },
+{ "Cyrillic_che_vertstroke", 0x10004B9 },
+{ "Cyrillic_SHHA", 0x10004BA },
+{ "Cyrillic_shha", 0x10004BB },
+{ "Cyrillic_SCHWA", 0x10004D8 },
+{ "Cyrillic_schwa", 0x10004D9 },
+{ "Cyrillic_I_macron", 0x10004E2 },
+{ "Cyrillic_i_macron", 0x10004E3 },
+{ "Cyrillic_O_bar", 0x10004E8 },
+{ "Cyrillic_o_bar", 0x10004E9 },
+{ "Cyrillic_U_macron", 0x10004EE },
+{ "Cyrillic_u_macron", 0x10004EF },
{ "Serbian_dje", 0x6A1 },
{ "Macedonia_gje", 0x6A2 },
{ "Cyrillic_io", 0x6A3 },
{ "Ukrainian_ie", 0x6A4 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_je", 0x6A4 },
+#endif
{ "Macedonia_dse", 0x6A5 },
{ "Ukrainian_i", 0x6A6 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_i", 0x6A6 },
+#endif
{ "Ukrainian_yi", 0x6A7 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_yi", 0x6A7 },
+#endif
{ "Cyrillic_je", 0x6A8 },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_je", 0x6A8 },
+#endif
{ "Cyrillic_lje", 0x6A9 },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_lje", 0x6A9 },
+#endif
{ "Cyrillic_nje", 0x6AA },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_nje", 0x6AA },
+#endif
{ "Serbian_tshe", 0x6AB },
{ "Macedonia_kje", 0x6AC },
{ "Ukrainian_ghe_with_upturn", 0x6AD },
{ "Byelorussian_shortu", 0x6AE },
{ "Cyrillic_dzhe", 0x6AF },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_dze", 0x6AF },
+#endif
{ "numerosign", 0x6B0 },
{ "Serbian_DJE", 0x6B1 },
{ "Macedonia_GJE", 0x6B2 },
{ "Cyrillic_IO", 0x6B3 },
{ "Ukrainian_IE", 0x6B4 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_JE", 0x6B4 },
+#endif
{ "Macedonia_DSE", 0x6B5 },
{ "Ukrainian_I", 0x6B6 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_I", 0x6B6 },
+#endif
{ "Ukrainian_YI", 0x6B7 },
+#ifndef TK_NO_DEPRECATED
{ "Ukranian_YI", 0x6B7 },
+#endif
{ "Cyrillic_JE", 0x6B8 },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_JE", 0x6B8 },
+#endif
{ "Cyrillic_LJE", 0x6B9 },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_LJE", 0x6B9 },
+#endif
{ "Cyrillic_NJE", 0x6BA },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_NJE", 0x6BA },
+#endif
{ "Serbian_TSHE", 0x6BB },
{ "Macedonia_KJE", 0x6BC },
{ "Ukrainian_GHE_WITH_UPTURN", 0x6BD },
{ "Byelorussian_SHORTU", 0x6BE },
{ "Cyrillic_DZHE", 0x6BF },
+#ifndef TK_NO_DEPRECATED
{ "Serbian_DZE", 0x6BF },
+#endif
{ "Cyrillic_yu", 0x6C0 },
{ "Cyrillic_a", 0x6C1 },
{ "Cyrillic_be", 0x6C2 },
@@ -975,19 +1305,31 @@
{ "hebrew_doublelowline", 0xCDF },
{ "hebrew_aleph", 0xCE0 },
{ "hebrew_bet", 0xCE1 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_beth", 0xCE1 },
+#endif
{ "hebrew_gimel", 0xCE2 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_gimmel", 0xCE2 },
+#endif
{ "hebrew_dalet", 0xCE3 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_daleth", 0xCE3 },
+#endif
{ "hebrew_he", 0xCE4 },
{ "hebrew_waw", 0xCE5 },
{ "hebrew_zain", 0xCE6 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_zayin", 0xCE6 },
+#endif
{ "hebrew_chet", 0xCE7 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_het", 0xCE7 },
+#endif
{ "hebrew_tet", 0xCE8 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_teth", 0xCE8 },
+#endif
{ "hebrew_yod", 0xCE9 },
{ "hebrew_finalkaph", 0xCEA },
{ "hebrew_kaph", 0xCEB },
@@ -997,21 +1339,852 @@
{ "hebrew_finalnun", 0xCEF },
{ "hebrew_nun", 0xCF0 },
{ "hebrew_samech", 0xCF1 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_samekh", 0xCF1 },
+#endif
{ "hebrew_ayin", 0xCF2 },
{ "hebrew_finalpe", 0xCF3 },
{ "hebrew_pe", 0xCF4 },
{ "hebrew_finalzade", 0xCF5 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_finalzadi", 0xCF5 },
+#endif
{ "hebrew_zade", 0xCF6 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_zadi", 0xCF6 },
+#endif
{ "hebrew_qoph", 0xCF7 },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_kuf", 0xCF7 },
+#endif
{ "hebrew_resh", 0xCF8 },
{ "hebrew_shin", 0xCF9 },
{ "hebrew_taw", 0xCFA },
+#ifndef TK_NO_DEPRECATED
{ "hebrew_taf", 0xCFA },
+#endif
{ "Hebrew_switch", 0xFF7E },
+{ "Thai_kokai", 0xDA1 },
+{ "Thai_khokhai", 0xDA2 },
+{ "Thai_khokhuat", 0xDA3 },
+{ "Thai_khokhwai", 0xDA4 },
+{ "Thai_khokhon", 0xDA5 },
+{ "Thai_khorakhang", 0xDA6 },
+{ "Thai_ngongu", 0xDA7 },
+{ "Thai_chochan", 0xDA8 },
+{ "Thai_choching", 0xDA9 },
+{ "Thai_chochang", 0xDAA },
+{ "Thai_soso", 0xDAB },
+{ "Thai_chochoe", 0xDAC },
+{ "Thai_yoying", 0xDAD },
+{ "Thai_dochada", 0xDAE },
+{ "Thai_topatak", 0xDAF },
+{ "Thai_thothan", 0xDB0 },
+{ "Thai_thonangmontho", 0xDB1 },
+{ "Thai_thophuthao", 0xDB2 },
+{ "Thai_nonen", 0xDB3 },
+{ "Thai_dodek", 0xDB4 },
+{ "Thai_totao", 0xDB5 },
+{ "Thai_thothung", 0xDB6 },
+{ "Thai_thothahan", 0xDB7 },
+{ "Thai_thothong", 0xDB8 },
+{ "Thai_nonu", 0xDB9 },
+{ "Thai_bobaimai", 0xDBA },
+{ "Thai_popla", 0xDBB },
+{ "Thai_phophung", 0xDBC },
+{ "Thai_fofa", 0xDBD },
+{ "Thai_phophan", 0xDBE },
+{ "Thai_fofan", 0xDBF },
+{ "Thai_phosamphao", 0xDC0 },
+{ "Thai_moma", 0xDC1 },
+{ "Thai_yoyak", 0xDC2 },
+{ "Thai_rorua", 0xDC3 },
+{ "Thai_ru", 0xDC4 },
+{ "Thai_loling", 0xDC5 },
+{ "Thai_lu", 0xDC6 },
+{ "Thai_wowaen", 0xDC7 },
+{ "Thai_sosala", 0xDC8 },
+{ "Thai_sorusi", 0xDC9 },
+{ "Thai_sosua", 0xDCA },
+{ "Thai_hohip", 0xDCB },
+{ "Thai_lochula", 0xDCC },
+{ "Thai_oang", 0xDCD },
+{ "Thai_honokhuk", 0xDCE },
+{ "Thai_paiyannoi", 0xDCF },
+{ "Thai_saraa", 0xDD0 },
+{ "Thai_maihanakat", 0xDD1 },
+{ "Thai_saraaa", 0xDD2 },
+{ "Thai_saraam", 0xDD3 },
+{ "Thai_sarai", 0xDD4 },
+{ "Thai_saraii", 0xDD5 },
+{ "Thai_saraue", 0xDD6 },
+{ "Thai_sarauee", 0xDD7 },
+{ "Thai_sarau", 0xDD8 },
+{ "Thai_sarauu", 0xDD9 },
+{ "Thai_phinthu", 0xDDA },
+{ "Thai_maihanakat_maitho", 0xDDE },
+{ "Thai_baht", 0xDDF },
+{ "Thai_sarae", 0xDE0 },
+{ "Thai_saraae", 0xDE1 },
+{ "Thai_sarao", 0xDE2 },
+{ "Thai_saraaimaimuan", 0xDE3 },
+{ "Thai_saraaimaimalai", 0xDE4 },
+{ "Thai_lakkhangyao", 0xDE5 },
+{ "Thai_maiyamok", 0xDE6 },
+{ "Thai_maitaikhu", 0xDE7 },
+{ "Thai_maiek", 0xDE8 },
+{ "Thai_maitho", 0xDE9 },
+{ "Thai_maitri", 0xDEA },
+{ "Thai_maichattawa", 0xDEB },
+{ "Thai_thanthakhat", 0xDEC },
+{ "Thai_nikhahit", 0xDED },
+{ "Thai_leksun", 0xDF0 },
+{ "Thai_leknung", 0xDF1 },
+{ "Thai_leksong", 0xDF2 },
+{ "Thai_leksam", 0xDF3 },
+{ "Thai_leksi", 0xDF4 },
+{ "Thai_lekha", 0xDF5 },
+{ "Thai_lekhok", 0xDF6 },
+{ "Thai_lekchet", 0xDF7 },
+{ "Thai_lekpaet", 0xDF8 },
+{ "Thai_lekkao", 0xDF9 },
+{ "Hangul", 0xFF31 },
+{ "Hangul_Start", 0xFF32 },
+{ "Hangul_End", 0xFF33 },
+{ "Hangul_Hanja", 0xFF34 },
+{ "Hangul_Jamo", 0xFF35 },
+{ "Hangul_Romaja", 0xFF36 },
+{ "Hangul_Codeinput", 0xFF37 },
+{ "Hangul_Jeonja", 0xFF38 },
+{ "Hangul_Banja", 0xFF39 },
+{ "Hangul_PreHanja", 0xFF3A },
+{ "Hangul_PostHanja", 0xFF3B },
+{ "Hangul_SingleCandidate", 0xFF3C },
+{ "Hangul_MultipleCandidate", 0xFF3D },
+{ "Hangul_PreviousCandidate", 0xFF3E },
+{ "Hangul_Special", 0xFF3F },
+{ "Hangul_switch", 0xFF7E },
+{ "Hangul_Kiyeog", 0xEA1 },
+{ "Hangul_SsangKiyeog", 0xEA2 },
+{ "Hangul_KiyeogSios", 0xEA3 },
+{ "Hangul_Nieun", 0xEA4 },
+{ "Hangul_NieunJieuj", 0xEA5 },
+{ "Hangul_NieunHieuh", 0xEA6 },
+{ "Hangul_Dikeud", 0xEA7 },
+{ "Hangul_SsangDikeud", 0xEA8 },
+{ "Hangul_Rieul", 0xEA9 },
+{ "Hangul_RieulKiyeog", 0xEAA },
+{ "Hangul_RieulMieum", 0xEAB },
+{ "Hangul_RieulPieub", 0xEAC },
+{ "Hangul_RieulSios", 0xEAD },
+{ "Hangul_RieulTieut", 0xEAE },
+{ "Hangul_RieulPhieuf", 0xEAF },
+{ "Hangul_RieulHieuh", 0xEB0 },
+{ "Hangul_Mieum", 0xEB1 },
+{ "Hangul_Pieub", 0xEB2 },
+{ "Hangul_SsangPieub", 0xEB3 },
+{ "Hangul_PieubSios", 0xEB4 },
+{ "Hangul_Sios", 0xEB5 },
+{ "Hangul_SsangSios", 0xEB6 },
+{ "Hangul_Ieung", 0xEB7 },
+{ "Hangul_Jieuj", 0xEB8 },
+{ "Hangul_SsangJieuj", 0xEB9 },
+{ "Hangul_Cieuc", 0xEBA },
+{ "Hangul_Khieuq", 0xEBB },
+{ "Hangul_Tieut", 0xEBC },
+{ "Hangul_Phieuf", 0xEBD },
+{ "Hangul_Hieuh", 0xEBE },
+{ "Hangul_A", 0xEBF },
+{ "Hangul_AE", 0xEC0 },
+{ "Hangul_YA", 0xEC1 },
+{ "Hangul_YAE", 0xEC2 },
+{ "Hangul_EO", 0xEC3 },
+{ "Hangul_E", 0xEC4 },
+{ "Hangul_YEO", 0xEC5 },
+{ "Hangul_YE", 0xEC6 },
+{ "Hangul_O", 0xEC7 },
+{ "Hangul_WA", 0xEC8 },
+{ "Hangul_WAE", 0xEC9 },
+{ "Hangul_OE", 0xECA },
+{ "Hangul_YO", 0xECB },
+{ "Hangul_U", 0xECC },
+{ "Hangul_WEO", 0xECD },
+{ "Hangul_WE", 0xECE },
+{ "Hangul_WI", 0xECF },
+{ "Hangul_YU", 0xED0 },
+{ "Hangul_EU", 0xED1 },
+{ "Hangul_YI", 0xED2 },
+{ "Hangul_I", 0xED3 },
+{ "Hangul_J_Kiyeog", 0xED4 },
+{ "Hangul_J_SsangKiyeog", 0xED5 },
+{ "Hangul_J_KiyeogSios", 0xED6 },
+{ "Hangul_J_Nieun", 0xED7 },
+{ "Hangul_J_NieunJieuj", 0xED8 },
+{ "Hangul_J_NieunHieuh", 0xED9 },
+{ "Hangul_J_Dikeud", 0xEDA },
+{ "Hangul_J_Rieul", 0xEDB },
+{ "Hangul_J_RieulKiyeog", 0xEDC },
+{ "Hangul_J_RieulMieum", 0xEDD },
+{ "Hangul_J_RieulPieub", 0xEDE },
+{ "Hangul_J_RieulSios", 0xEDF },
+{ "Hangul_J_RieulTieut", 0xEE0 },
+{ "Hangul_J_RieulPhieuf", 0xEE1 },
+{ "Hangul_J_RieulHieuh", 0xEE2 },
+{ "Hangul_J_Mieum", 0xEE3 },
+{ "Hangul_J_Pieub", 0xEE4 },
+{ "Hangul_J_PieubSios", 0xEE5 },
+{ "Hangul_J_Sios", 0xEE6 },
+{ "Hangul_J_SsangSios", 0xEE7 },
+{ "Hangul_J_Ieung", 0xEE8 },
+{ "Hangul_J_Jieuj", 0xEE9 },
+{ "Hangul_J_Cieuc", 0xEEA },
+{ "Hangul_J_Khieuq", 0xEEB },
+{ "Hangul_J_Tieut", 0xEEC },
+{ "Hangul_J_Phieuf", 0xEED },
+{ "Hangul_J_Hieuh", 0xEEE },
+{ "Hangul_RieulYeorinHieuh", 0xEEF },
+{ "Hangul_SunkyeongeumMieum", 0xEF0 },
+{ "Hangul_SunkyeongeumPieub", 0xEF1 },
+{ "Hangul_PanSios", 0xEF2 },
+{ "Hangul_KkogjiDalrinIeung", 0xEF3 },
+{ "Hangul_SunkyeongeumPhieuf", 0xEF4 },
+{ "Hangul_YeorinHieuh", 0xEF5 },
+{ "Hangul_AraeA", 0xEF6 },
+{ "Hangul_AraeAE", 0xEF7 },
+{ "Hangul_J_PanSios", 0xEF8 },
+{ "Hangul_J_KkogjiDalrinIeung", 0xEF9 },
+{ "Hangul_J_YeorinHieuh", 0xEFA },
+{ "Korean_Won", 0xEFF },
+{ "Armenian_ligature_ew", 0x1000587 },
+{ "Armenian_full_stop", 0x1000589 },
+{ "Armenian_verjaket", 0x1000589 },
+{ "Armenian_separation_mark", 0x100055D },
+{ "Armenian_but", 0x100055D },
+{ "Armenian_hyphen", 0x100058A },
+{ "Armenian_yentamna", 0x100058A },
+{ "Armenian_exclam", 0x100055C },
+{ "Armenian_amanak", 0x100055C },
+{ "Armenian_accent", 0x100055B },
+{ "Armenian_shesht", 0x100055B },
+{ "Armenian_question", 0x100055E },
+{ "Armenian_paruyk", 0x100055E },
+{ "Armenian_AYB", 0x1000531 },
+{ "Armenian_ayb", 0x1000561 },
+{ "Armenian_BEN", 0x1000532 },
+{ "Armenian_ben", 0x1000562 },
+{ "Armenian_GIM", 0x1000533 },
+{ "Armenian_gim", 0x1000563 },
+{ "Armenian_DA", 0x1000534 },
+{ "Armenian_da", 0x1000564 },
+{ "Armenian_YECH", 0x1000535 },
+{ "Armenian_yech", 0x1000565 },
+{ "Armenian_ZA", 0x1000536 },
+{ "Armenian_za", 0x1000566 },
+{ "Armenian_E", 0x1000537 },
+{ "Armenian_e", 0x1000567 },
+{ "Armenian_AT", 0x1000538 },
+{ "Armenian_at", 0x1000568 },
+{ "Armenian_TO", 0x1000539 },
+{ "Armenian_to", 0x1000569 },
+{ "Armenian_ZHE", 0x100053A },
+{ "Armenian_zhe", 0x100056A },
+{ "Armenian_INI", 0x100053B },
+{ "Armenian_ini", 0x100056B },
+{ "Armenian_LYUN", 0x100053C },
+{ "Armenian_lyun", 0x100056C },
+{ "Armenian_KHE", 0x100053D },
+{ "Armenian_khe", 0x100056D },
+{ "Armenian_TSA", 0x100053E },
+{ "Armenian_tsa", 0x100056E },
+{ "Armenian_KEN", 0x100053F },
+{ "Armenian_ken", 0x100056F },
+{ "Armenian_HO", 0x1000540 },
+{ "Armenian_ho", 0x1000570 },
+{ "Armenian_DZA", 0x1000541 },
+{ "Armenian_dza", 0x1000571 },
+{ "Armenian_GHAT", 0x1000542 },
+{ "Armenian_ghat", 0x1000572 },
+{ "Armenian_TCHE", 0x1000543 },
+{ "Armenian_tche", 0x1000573 },
+{ "Armenian_MEN", 0x1000544 },
+{ "Armenian_men", 0x1000574 },
+{ "Armenian_HI", 0x1000545 },
+{ "Armenian_hi", 0x1000575 },
+{ "Armenian_NU", 0x1000546 },
+{ "Armenian_nu", 0x1000576 },
+{ "Armenian_SHA", 0x1000547 },
+{ "Armenian_sha", 0x1000577 },
+{ "Armenian_VO", 0x1000548 },
+{ "Armenian_vo", 0x1000578 },
+{ "Armenian_CHA", 0x1000549 },
+{ "Armenian_cha", 0x1000579 },
+{ "Armenian_PE", 0x100054A },
+{ "Armenian_pe", 0x100057A },
+{ "Armenian_JE", 0x100054B },
+{ "Armenian_je", 0x100057B },
+{ "Armenian_RA", 0x100054C },
+{ "Armenian_ra", 0x100057C },
+{ "Armenian_SE", 0x100054D },
+{ "Armenian_se", 0x100057D },
+{ "Armenian_VEV", 0x100054E },
+{ "Armenian_vev", 0x100057E },
+{ "Armenian_TYUN", 0x100054F },
+{ "Armenian_tyun", 0x100057F },
+{ "Armenian_RE", 0x1000550 },
+{ "Armenian_re", 0x1000580 },
+{ "Armenian_TSO", 0x1000551 },
+{ "Armenian_tso", 0x1000581 },
+{ "Armenian_VYUN", 0x1000552 },
+{ "Armenian_vyun", 0x1000582 },
+{ "Armenian_PYUR", 0x1000553 },
+{ "Armenian_pyur", 0x1000583 },
+{ "Armenian_KE", 0x1000554 },
+{ "Armenian_ke", 0x1000584 },
+{ "Armenian_O", 0x1000555 },
+{ "Armenian_o", 0x1000585 },
+{ "Armenian_FE", 0x1000556 },
+{ "Armenian_fe", 0x1000586 },
+{ "Armenian_apostrophe", 0x100055A },
+{ "Georgian_an", 0x10010D0 },
+{ "Georgian_ban", 0x10010D1 },
+{ "Georgian_gan", 0x10010D2 },
+{ "Georgian_don", 0x10010D3 },
+{ "Georgian_en", 0x10010D4 },
+{ "Georgian_vin", 0x10010D5 },
+{ "Georgian_zen", 0x10010D6 },
+{ "Georgian_tan", 0x10010D7 },
+{ "Georgian_in", 0x10010D8 },
+{ "Georgian_kan", 0x10010D9 },
+{ "Georgian_las", 0x10010DA },
+{ "Georgian_man", 0x10010DB },
+{ "Georgian_nar", 0x10010DC },
+{ "Georgian_on", 0x10010DD },
+{ "Georgian_par", 0x10010DE },
+{ "Georgian_zhar", 0x10010DF },
+{ "Georgian_rae", 0x10010E0 },
+{ "Georgian_san", 0x10010E1 },
+{ "Georgian_tar", 0x10010E2 },
+{ "Georgian_un", 0x10010E3 },
+{ "Georgian_phar", 0x10010E4 },
+{ "Georgian_khar", 0x10010E5 },
+{ "Georgian_ghan", 0x10010E6 },
+{ "Georgian_qar", 0x10010E7 },
+{ "Georgian_shin", 0x10010E8 },
+{ "Georgian_chin", 0x10010E9 },
+{ "Georgian_can", 0x10010EA },
+{ "Georgian_jil", 0x10010EB },
+{ "Georgian_cil", 0x10010EC },
+{ "Georgian_char", 0x10010ED },
+{ "Georgian_xan", 0x10010EE },
+{ "Georgian_jhan", 0x10010EF },
+{ "Georgian_hae", 0x10010F0 },
+{ "Georgian_he", 0x10010F1 },
+{ "Georgian_hie", 0x10010F2 },
+{ "Georgian_we", 0x10010F3 },
+{ "Georgian_har", 0x10010F4 },
+{ "Georgian_hoe", 0x10010F5 },
+{ "Georgian_fi", 0x10010F6 },
+{ "Xabovedot", 0x1001E8A },
+{ "Ibreve", 0x100012C },
+{ "Zstroke", 0x10001B5 },
+{ "Gcaron", 0x10001E6 },
+{ "Ocaron", 0x10001D1 },
+{ "Obarred", 0x100019F },
+{ "xabovedot", 0x1001E8B },
+{ "ibreve", 0x100012D },
+{ "zstroke", 0x10001B6 },
+{ "gcaron", 0x10001E7 },
+{ "ocaron", 0x10001D2 },
+{ "obarred", 0x1000275 },
+{ "SCHWA", 0x100018F },
+{ "schwa", 0x1000259 },
+{ "EZH", 0x10001B7 },
+{ "ezh", 0x1000292 },
+{ "Lbelowdot", 0x1001E36 },
+{ "lbelowdot", 0x1001E37 },
+{ "Abelowdot", 0x1001EA0 },
+{ "abelowdot", 0x1001EA1 },
+{ "Ahook", 0x1001EA2 },
+{ "ahook", 0x1001EA3 },
+{ "Acircumflexacute", 0x1001EA4 },
+{ "acircumflexacute", 0x1001EA5 },
+{ "Acircumflexgrave", 0x1001EA6 },
+{ "acircumflexgrave", 0x1001EA7 },
+{ "Acircumflexhook", 0x1001EA8 },
+{ "acircumflexhook", 0x1001EA9 },
+{ "Acircumflextilde", 0x1001EAA },
+{ "acircumflextilde", 0x1001EAB },
+{ "Acircumflexbelowdot", 0x1001EAC },
+{ "acircumflexbelowdot", 0x1001EAD },
+{ "Abreveacute", 0x1001EAE },
+{ "abreveacute", 0x1001EAF },
+{ "Abrevegrave", 0x1001EB0 },
+{ "abrevegrave", 0x1001EB1 },
+{ "Abrevehook", 0x1001EB2 },
+{ "abrevehook", 0x1001EB3 },
+{ "Abrevetilde", 0x1001EB4 },
+{ "abrevetilde", 0x1001EB5 },
+{ "Abrevebelowdot", 0x1001EB6 },
+{ "abrevebelowdot", 0x1001EB7 },
+{ "Ebelowdot", 0x1001EB8 },
+{ "ebelowdot", 0x1001EB9 },
+{ "Ehook", 0x1001EBA },
+{ "ehook", 0x1001EBB },
+{ "Etilde", 0x1001EBC },
+{ "etilde", 0x1001EBD },
+{ "Ecircumflexacute", 0x1001EBE },
+{ "ecircumflexacute", 0x1001EBF },
+{ "Ecircumflexgrave", 0x1001EC0 },
+{ "ecircumflexgrave", 0x1001EC1 },
+{ "Ecircumflexhook", 0x1001EC2 },
+{ "ecircumflexhook", 0x1001EC3 },
+{ "Ecircumflextilde", 0x1001EC4 },
+{ "ecircumflextilde", 0x1001EC5 },
+{ "Ecircumflexbelowdot", 0x1001EC6 },
+{ "ecircumflexbelowdot", 0x1001EC7 },
+{ "Ihook", 0x1001EC8 },
+{ "ihook", 0x1001EC9 },
+{ "Ibelowdot", 0x1001ECA },
+{ "ibelowdot", 0x1001ECB },
+{ "Obelowdot", 0x1001ECC },
+{ "obelowdot", 0x1001ECD },
+{ "Ohook", 0x1001ECE },
+{ "ohook", 0x1001ECF },
+{ "Ocircumflexacute", 0x1001ED0 },
+{ "ocircumflexacute", 0x1001ED1 },
+{ "Ocircumflexgrave", 0x1001ED2 },
+{ "ocircumflexgrave", 0x1001ED3 },
+{ "Ocircumflexhook", 0x1001ED4 },
+{ "ocircumflexhook", 0x1001ED5 },
+{ "Ocircumflextilde", 0x1001ED6 },
+{ "ocircumflextilde", 0x1001ED7 },
+{ "Ocircumflexbelowdot", 0x1001ED8 },
+{ "ocircumflexbelowdot", 0x1001ED9 },
+{ "Ohornacute", 0x1001EDA },
+{ "ohornacute", 0x1001EDB },
+{ "Ohorngrave", 0x1001EDC },
+{ "ohorngrave", 0x1001EDD },
+{ "Ohornhook", 0x1001EDE },
+{ "ohornhook", 0x1001EDF },
+{ "Ohorntilde", 0x1001EE0 },
+{ "ohorntilde", 0x1001EE1 },
+{ "Ohornbelowdot", 0x1001EE2 },
+{ "ohornbelowdot", 0x1001EE3 },
+{ "Ubelowdot", 0x1001EE4 },
+{ "ubelowdot", 0x1001EE5 },
+{ "Uhook", 0x1001EE6 },
+{ "uhook", 0x1001EE7 },
+{ "Uhornacute", 0x1001EE8 },
+{ "uhornacute", 0x1001EE9 },
+{ "Uhorngrave", 0x1001EEA },
+{ "uhorngrave", 0x1001EEB },
+{ "Uhornhook", 0x1001EEC },
+{ "uhornhook", 0x1001EED },
+{ "Uhorntilde", 0x1001EEE },
+{ "uhorntilde", 0x1001EEF },
+{ "Uhornbelowdot", 0x1001EF0 },
+{ "uhornbelowdot", 0x1001EF1 },
+{ "Ybelowdot", 0x1001EF4 },
+{ "ybelowdot", 0x1001EF5 },
+{ "Yhook", 0x1001EF6 },
+{ "yhook", 0x1001EF7 },
+{ "Ytilde", 0x1001EF8 },
+{ "ytilde", 0x1001EF9 },
+{ "Ohorn", 0x10001A0 },
+{ "ohorn", 0x10001A1 },
+{ "Uhorn", 0x10001AF },
+{ "uhorn", 0x10001B0 },
+{ "EcuSign", 0x10020A0 },
+{ "ColonSign", 0x10020A1 },
+{ "CruzeiroSign", 0x10020A2 },
+{ "FFrancSign", 0x10020A3 },
+{ "LiraSign", 0x10020A4 },
+{ "MillSign", 0x10020A5 },
+{ "NairaSign", 0x10020A6 },
+{ "PesetaSign", 0x10020A7 },
+{ "RupeeSign", 0x10020A8 },
+{ "WonSign", 0x10020A9 },
+{ "NewSheqelSign", 0x10020AA },
+{ "DongSign", 0x10020AB },
+{ "EuroSign", 0x20AC },
+{ "zerosuperior", 0x1002070 },
+{ "foursuperior", 0x1002074 },
+{ "fivesuperior", 0x1002075 },
+{ "sixsuperior", 0x1002076 },
+{ "sevensuperior", 0x1002077 },
+{ "eightsuperior", 0x1002078 },
+{ "ninesuperior", 0x1002079 },
+{ "zerosubscript", 0x1002080 },
+{ "onesubscript", 0x1002081 },
+{ "twosubscript", 0x1002082 },
+{ "threesubscript", 0x1002083 },
+{ "foursubscript", 0x1002084 },
+{ "fivesubscript", 0x1002085 },
+{ "sixsubscript", 0x1002086 },
+{ "sevensubscript", 0x1002087 },
+{ "eightsubscript", 0x1002088 },
+{ "ninesubscript", 0x1002089 },
+{ "partdifferential", 0x1002202 },
+{ "emptyset", 0x1002205 },
+{ "elementof", 0x1002208 },
+{ "notelementof", 0x1002209 },
+{ "containsas", 0x100220B },
+{ "squareroot", 0x100221A },
+{ "cuberoot", 0x100221B },
+{ "fourthroot", 0x100221C },
+{ "dintegral", 0x100222C },
+{ "tintegral", 0x100222D },
+{ "because", 0x1002235 },
+{ "approxeq", 0x1002248 },
+{ "notapproxeq", 0x1002247 },
+{ "notidentical", 0x1002262 },
+{ "stricteq", 0x1002263 },
+{ "braille_dot_1", 0xFFF1 },
+{ "braille_dot_2", 0xFFF2 },
+{ "braille_dot_3", 0xFFF3 },
+{ "braille_dot_4", 0xFFF4 },
+{ "braille_dot_5", 0xFFF5 },
+{ "braille_dot_6", 0xFFF6 },
+{ "braille_dot_7", 0xFFF7 },
+{ "braille_dot_8", 0xFFF8 },
+{ "braille_dot_9", 0xFFF9 },
+{ "braille_dot_10", 0xFFFA },
+{ "braille_blank", 0x1002800 },
+{ "braille_dots_1", 0x1002801 },
+{ "braille_dots_2", 0x1002802 },
+{ "braille_dots_12", 0x1002803 },
+{ "braille_dots_3", 0x1002804 },
+{ "braille_dots_13", 0x1002805 },
+{ "braille_dots_23", 0x1002806 },
+{ "braille_dots_123", 0x1002807 },
+{ "braille_dots_4", 0x1002808 },
+{ "braille_dots_14", 0x1002809 },
+{ "braille_dots_24", 0x100280A },
+{ "braille_dots_124", 0x100280B },
+{ "braille_dots_34", 0x100280C },
+{ "braille_dots_134", 0x100280D },
+{ "braille_dots_234", 0x100280E },
+{ "braille_dots_1234", 0x100280F },
+{ "braille_dots_5", 0x1002810 },
+{ "braille_dots_15", 0x1002811 },
+{ "braille_dots_25", 0x1002812 },
+{ "braille_dots_125", 0x1002813 },
+{ "braille_dots_35", 0x1002814 },
+{ "braille_dots_135", 0x1002815 },
+{ "braille_dots_235", 0x1002816 },
+{ "braille_dots_1235", 0x1002817 },
+{ "braille_dots_45", 0x1002818 },
+{ "braille_dots_145", 0x1002819 },
+{ "braille_dots_245", 0x100281A },
+{ "braille_dots_1245", 0x100281B },
+{ "braille_dots_345", 0x100281C },
+{ "braille_dots_1345", 0x100281D },
+{ "braille_dots_2345", 0x100281E },
+{ "braille_dots_12345", 0x100281F },
+{ "braille_dots_6", 0x1002820 },
+{ "braille_dots_16", 0x1002821 },
+{ "braille_dots_26", 0x1002822 },
+{ "braille_dots_126", 0x1002823 },
+{ "braille_dots_36", 0x1002824 },
+{ "braille_dots_136", 0x1002825 },
+{ "braille_dots_236", 0x1002826 },
+{ "braille_dots_1236", 0x1002827 },
+{ "braille_dots_46", 0x1002828 },
+{ "braille_dots_146", 0x1002829 },
+{ "braille_dots_246", 0x100282A },
+{ "braille_dots_1246", 0x100282B },
+{ "braille_dots_346", 0x100282C },
+{ "braille_dots_1346", 0x100282D },
+{ "braille_dots_2346", 0x100282E },
+{ "braille_dots_12346", 0x100282F },
+{ "braille_dots_56", 0x1002830 },
+{ "braille_dots_156", 0x1002831 },
+{ "braille_dots_256", 0x1002832 },
+{ "braille_dots_1256", 0x1002833 },
+{ "braille_dots_356", 0x1002834 },
+{ "braille_dots_1356", 0x1002835 },
+{ "braille_dots_2356", 0x1002836 },
+{ "braille_dots_12356", 0x1002837 },
+{ "braille_dots_456", 0x1002838 },
+{ "braille_dots_1456", 0x1002839 },
+{ "braille_dots_2456", 0x100283A },
+{ "braille_dots_12456", 0x100283B },
+{ "braille_dots_3456", 0x100283C },
+{ "braille_dots_13456", 0x100283D },
+{ "braille_dots_23456", 0x100283E },
+{ "braille_dots_123456", 0x100283F },
+{ "braille_dots_7", 0x1002840 },
+{ "braille_dots_17", 0x1002841 },
+{ "braille_dots_27", 0x1002842 },
+{ "braille_dots_127", 0x1002843 },
+{ "braille_dots_37", 0x1002844 },
+{ "braille_dots_137", 0x1002845 },
+{ "braille_dots_237", 0x1002846 },
+{ "braille_dots_1237", 0x1002847 },
+{ "braille_dots_47", 0x1002848 },
+{ "braille_dots_147", 0x1002849 },
+{ "braille_dots_247", 0x100284A },
+{ "braille_dots_1247", 0x100284B },
+{ "braille_dots_347", 0x100284C },
+{ "braille_dots_1347", 0x100284D },
+{ "braille_dots_2347", 0x100284E },
+{ "braille_dots_12347", 0x100284F },
+{ "braille_dots_57", 0x1002850 },
+{ "braille_dots_157", 0x1002851 },
+{ "braille_dots_257", 0x1002852 },
+{ "braille_dots_1257", 0x1002853 },
+{ "braille_dots_357", 0x1002854 },
+{ "braille_dots_1357", 0x1002855 },
+{ "braille_dots_2357", 0x1002856 },
+{ "braille_dots_12357", 0x1002857 },
+{ "braille_dots_457", 0x1002858 },
+{ "braille_dots_1457", 0x1002859 },
+{ "braille_dots_2457", 0x100285A },
+{ "braille_dots_12457", 0x100285B },
+{ "braille_dots_3457", 0x100285C },
+{ "braille_dots_13457", 0x100285D },
+{ "braille_dots_23457", 0x100285E },
+{ "braille_dots_123457", 0x100285F },
+{ "braille_dots_67", 0x1002860 },
+{ "braille_dots_167", 0x1002861 },
+{ "braille_dots_267", 0x1002862 },
+{ "braille_dots_1267", 0x1002863 },
+{ "braille_dots_367", 0x1002864 },
+{ "braille_dots_1367", 0x1002865 },
+{ "braille_dots_2367", 0x1002866 },
+{ "braille_dots_12367", 0x1002867 },
+{ "braille_dots_467", 0x1002868 },
+{ "braille_dots_1467", 0x1002869 },
+{ "braille_dots_2467", 0x100286A },
+{ "braille_dots_12467", 0x100286B },
+{ "braille_dots_3467", 0x100286C },
+{ "braille_dots_13467", 0x100286D },
+{ "braille_dots_23467", 0x100286E },
+{ "braille_dots_123467", 0x100286F },
+{ "braille_dots_567", 0x1002870 },
+{ "braille_dots_1567", 0x1002871 },
+{ "braille_dots_2567", 0x1002872 },
+{ "braille_dots_12567", 0x1002873 },
+{ "braille_dots_3567", 0x1002874 },
+{ "braille_dots_13567", 0x1002875 },
+{ "braille_dots_23567", 0x1002876 },
+{ "braille_dots_123567", 0x1002877 },
+{ "braille_dots_4567", 0x1002878 },
+{ "braille_dots_14567", 0x1002879 },
+{ "braille_dots_24567", 0x100287A },
+{ "braille_dots_124567", 0x100287B },
+{ "braille_dots_34567", 0x100287C },
+{ "braille_dots_134567", 0x100287D },
+{ "braille_dots_234567", 0x100287E },
+{ "braille_dots_1234567", 0x100287F },
+{ "braille_dots_8", 0x1002880 },
+{ "braille_dots_18", 0x1002881 },
+{ "braille_dots_28", 0x1002882 },
+{ "braille_dots_128", 0x1002883 },
+{ "braille_dots_38", 0x1002884 },
+{ "braille_dots_138", 0x1002885 },
+{ "braille_dots_238", 0x1002886 },
+{ "braille_dots_1238", 0x1002887 },
+{ "braille_dots_48", 0x1002888 },
+{ "braille_dots_148", 0x1002889 },
+{ "braille_dots_248", 0x100288A },
+{ "braille_dots_1248", 0x100288B },
+{ "braille_dots_348", 0x100288C },
+{ "braille_dots_1348", 0x100288D },
+{ "braille_dots_2348", 0x100288E },
+{ "braille_dots_12348", 0x100288F },
+{ "braille_dots_58", 0x1002890 },
+{ "braille_dots_158", 0x1002891 },
+{ "braille_dots_258", 0x1002892 },
+{ "braille_dots_1258", 0x1002893 },
+{ "braille_dots_358", 0x1002894 },
+{ "braille_dots_1358", 0x1002895 },
+{ "braille_dots_2358", 0x1002896 },
+{ "braille_dots_12358", 0x1002897 },
+{ "braille_dots_458", 0x1002898 },
+{ "braille_dots_1458", 0x1002899 },
+{ "braille_dots_2458", 0x100289A },
+{ "braille_dots_12458", 0x100289B },
+{ "braille_dots_3458", 0x100289C },
+{ "braille_dots_13458", 0x100289D },
+{ "braille_dots_23458", 0x100289E },
+{ "braille_dots_123458", 0x100289F },
+{ "braille_dots_68", 0x10028A0 },
+{ "braille_dots_168", 0x10028A1 },
+{ "braille_dots_268", 0x10028A2 },
+{ "braille_dots_1268", 0x10028A3 },
+{ "braille_dots_368", 0x10028A4 },
+{ "braille_dots_1368", 0x10028A5 },
+{ "braille_dots_2368", 0x10028A6 },
+{ "braille_dots_12368", 0x10028A7 },
+{ "braille_dots_468", 0x10028A8 },
+{ "braille_dots_1468", 0x10028A9 },
+{ "braille_dots_2468", 0x10028AA },
+{ "braille_dots_12468", 0x10028AB },
+{ "braille_dots_3468", 0x10028AC },
+{ "braille_dots_13468", 0x10028AD },
+{ "braille_dots_23468", 0x10028AE },
+{ "braille_dots_123468", 0x10028AF },
+{ "braille_dots_568", 0x10028B0 },
+{ "braille_dots_1568", 0x10028B1 },
+{ "braille_dots_2568", 0x10028B2 },
+{ "braille_dots_12568", 0x10028B3 },
+{ "braille_dots_3568", 0x10028B4 },
+{ "braille_dots_13568", 0x10028B5 },
+{ "braille_dots_23568", 0x10028B6 },
+{ "braille_dots_123568", 0x10028B7 },
+{ "braille_dots_4568", 0x10028B8 },
+{ "braille_dots_14568", 0x10028B9 },
+{ "braille_dots_24568", 0x10028BA },
+{ "braille_dots_124568", 0x10028BB },
+{ "braille_dots_34568", 0x10028BC },
+{ "braille_dots_134568", 0x10028BD },
+{ "braille_dots_234568", 0x10028BE },
+{ "braille_dots_1234568", 0x10028BF },
+{ "braille_dots_78", 0x10028C0 },
+{ "braille_dots_178", 0x10028C1 },
+{ "braille_dots_278", 0x10028C2 },
+{ "braille_dots_1278", 0x10028C3 },
+{ "braille_dots_378", 0x10028C4 },
+{ "braille_dots_1378", 0x10028C5 },
+{ "braille_dots_2378", 0x10028C6 },
+{ "braille_dots_12378", 0x10028C7 },
+{ "braille_dots_478", 0x10028C8 },
+{ "braille_dots_1478", 0x10028C9 },
+{ "braille_dots_2478", 0x10028CA },
+{ "braille_dots_12478", 0x10028CB },
+{ "braille_dots_3478", 0x10028CC },
+{ "braille_dots_13478", 0x10028CD },
+{ "braille_dots_23478", 0x10028CE },
+{ "braille_dots_123478", 0x10028CF },
+{ "braille_dots_578", 0x10028D0 },
+{ "braille_dots_1578", 0x10028D1 },
+{ "braille_dots_2578", 0x10028D2 },
+{ "braille_dots_12578", 0x10028D3 },
+{ "braille_dots_3578", 0x10028D4 },
+{ "braille_dots_13578", 0x10028D5 },
+{ "braille_dots_23578", 0x10028D6 },
+{ "braille_dots_123578", 0x10028D7 },
+{ "braille_dots_4578", 0x10028D8 },
+{ "braille_dots_14578", 0x10028D9 },
+{ "braille_dots_24578", 0x10028DA },
+{ "braille_dots_124578", 0x10028DB },
+{ "braille_dots_34578", 0x10028DC },
+{ "braille_dots_134578", 0x10028DD },
+{ "braille_dots_234578", 0x10028DE },
+{ "braille_dots_1234578", 0x10028DF },
+{ "braille_dots_678", 0x10028E0 },
+{ "braille_dots_1678", 0x10028E1 },
+{ "braille_dots_2678", 0x10028E2 },
+{ "braille_dots_12678", 0x10028E3 },
+{ "braille_dots_3678", 0x10028E4 },
+{ "braille_dots_13678", 0x10028E5 },
+{ "braille_dots_23678", 0x10028E6 },
+{ "braille_dots_123678", 0x10028E7 },
+{ "braille_dots_4678", 0x10028E8 },
+{ "braille_dots_14678", 0x10028E9 },
+{ "braille_dots_24678", 0x10028EA },
+{ "braille_dots_124678", 0x10028EB },
+{ "braille_dots_34678", 0x10028EC },
+{ "braille_dots_134678", 0x10028ED },
+{ "braille_dots_234678", 0x10028EE },
+{ "braille_dots_1234678", 0x10028EF },
+{ "braille_dots_5678", 0x10028F0 },
+{ "braille_dots_15678", 0x10028F1 },
+{ "braille_dots_25678", 0x10028F2 },
+{ "braille_dots_125678", 0x10028F3 },
+{ "braille_dots_35678", 0x10028F4 },
+{ "braille_dots_135678", 0x10028F5 },
+{ "braille_dots_235678", 0x10028F6 },
+{ "braille_dots_1235678", 0x10028F7 },
+{ "braille_dots_45678", 0x10028F8 },
+{ "braille_dots_145678", 0x10028F9 },
+{ "braille_dots_245678", 0x10028FA },
+{ "braille_dots_1245678", 0x10028FB },
+{ "braille_dots_345678", 0x10028FC },
+{ "braille_dots_1345678", 0x10028FD },
+{ "braille_dots_2345678", 0x10028FE },
+{ "braille_dots_12345678", 0x10028FF },
+{ "Sinh_ng", 0x1000D82 },
+{ "Sinh_h2", 0x1000D83 },
+{ "Sinh_a", 0x1000D85 },
+{ "Sinh_aa", 0x1000D86 },
+{ "Sinh_ae", 0x1000D87 },
+{ "Sinh_aee", 0x1000D88 },
+{ "Sinh_i", 0x1000D89 },
+{ "Sinh_ii", 0x1000D8A },
+{ "Sinh_u", 0x1000D8B },
+{ "Sinh_uu", 0x1000D8C },
+{ "Sinh_ri", 0x1000D8D },
+{ "Sinh_rii", 0x1000D8E },
+{ "Sinh_lu", 0x1000D8F },
+{ "Sinh_luu", 0x1000D90 },
+{ "Sinh_e", 0x1000D91 },
+{ "Sinh_ee", 0x1000D92 },
+{ "Sinh_ai", 0x1000D93 },
+{ "Sinh_o", 0x1000D94 },
+{ "Sinh_oo", 0x1000D95 },
+{ "Sinh_au", 0x1000D96 },
+{ "Sinh_ka", 0x1000D9A },
+{ "Sinh_kha", 0x1000D9B },
+{ "Sinh_ga", 0x1000D9C },
+{ "Sinh_gha", 0x1000D9D },
+{ "Sinh_ng2", 0x1000D9E },
+{ "Sinh_nga", 0x1000D9F },
+{ "Sinh_ca", 0x1000DA0 },
+{ "Sinh_cha", 0x1000DA1 },
+{ "Sinh_ja", 0x1000DA2 },
+{ "Sinh_jha", 0x1000DA3 },
+{ "Sinh_nya", 0x1000DA4 },
+{ "Sinh_jnya", 0x1000DA5 },
+{ "Sinh_nja", 0x1000DA6 },
+{ "Sinh_tta", 0x1000DA7 },
+{ "Sinh_ttha", 0x1000DA8 },
+{ "Sinh_dda", 0x1000DA9 },
+{ "Sinh_ddha", 0x1000DAA },
+{ "Sinh_nna", 0x1000DAB },
+{ "Sinh_ndda", 0x1000DAC },
+{ "Sinh_tha", 0x1000DAD },
+{ "Sinh_thha", 0x1000DAE },
+{ "Sinh_dha", 0x1000DAF },
+{ "Sinh_dhha", 0x1000DB0 },
+{ "Sinh_na", 0x1000DB1 },
+{ "Sinh_ndha", 0x1000DB3 },
+{ "Sinh_pa", 0x1000DB4 },
+{ "Sinh_pha", 0x1000DB5 },
+{ "Sinh_ba", 0x1000DB6 },
+{ "Sinh_bha", 0x1000DB7 },
+{ "Sinh_ma", 0x1000DB8 },
+{ "Sinh_mba", 0x1000DB9 },
+{ "Sinh_ya", 0x1000DBA },
+{ "Sinh_ra", 0x1000DBB },
+{ "Sinh_la", 0x1000DBD },
+{ "Sinh_va", 0x1000DC0 },
+{ "Sinh_sha", 0x1000DC1 },
+{ "Sinh_ssha", 0x1000DC2 },
+{ "Sinh_sa", 0x1000DC3 },
+{ "Sinh_ha", 0x1000DC4 },
+{ "Sinh_lla", 0x1000DC5 },
+{ "Sinh_fa", 0x1000DC6 },
+{ "Sinh_al", 0x1000DCA },
+{ "Sinh_aa2", 0x1000DCF },
+{ "Sinh_ae2", 0x1000DD0 },
+{ "Sinh_aee2", 0x1000DD1 },
+{ "Sinh_i2", 0x1000DD2 },
+{ "Sinh_ii2", 0x1000DD3 },
+{ "Sinh_u2", 0x1000DD4 },
+{ "Sinh_uu2", 0x1000DD6 },
+{ "Sinh_ru2", 0x1000DD8 },
+{ "Sinh_e2", 0x1000DD9 },
+{ "Sinh_ee2", 0x1000DDA },
+{ "Sinh_ai2", 0x1000DDB },
+{ "Sinh_o2", 0x1000DDC },
+{ "Sinh_oo2", 0x1000DDD },
+{ "Sinh_au2", 0x1000DDE },
+{ "Sinh_lu2", 0x1000DDF },
+{ "Sinh_ruu2", 0x1000DF2 },
+{ "Sinh_luu2", 0x1000DF3 },
+{ "Sinh_kunddaliya", 0x1000DF4 },
{ "XF86ModeLock", 0x1008FF01 },
{ "XF86MonBrightnessUp", 0x1008FF02 },
{ "XF86MonBrightnessDown", 0x1008FF03 },
@@ -1195,3 +2368,26 @@
{ "XF86Prev_VMode", 0x1008FE23 },
{ "XF86LogWindowTree", 0x1008FE24 },
{ "XF86LogGrabInfo", 0x1008FE25 },
+{ "SunFA_Grave", 0x1005FF00 },
+{ "SunFA_Circum", 0x1005FF01 },
+{ "SunFA_Tilde", 0x1005FF02 },
+{ "SunFA_Acute", 0x1005FF03 },
+{ "SunFA_Diaeresis", 0x1005FF04 },
+{ "SunFA_Cedilla", 0x1005FF05 },
+{ "SunF36", 0x1005FF10 },
+{ "SunF37", 0x1005FF11 },
+{ "SunSys_Req", 0x1005FF60 },
+{ "SunProps", 0x1005FF70 },
+{ "SunFront", 0x1005FF71 },
+{ "SunCopy", 0x1005FF72 },
+{ "SunOpen", 0x1005FF73 },
+{ "SunPaste", 0x1005FF74 },
+{ "SunCut", 0x1005FF75 },
+{ "SunPowerSwitch", 0x1005FF76 },
+{ "SunAudioLowerVolume", 0x1005FF77 },
+{ "SunAudioMute", 0x1005FF78 },
+{ "SunAudioRaiseVolume", 0x1005FF79 },
+{ "SunVideoDegauss", 0x1005FF7A },
+{ "SunVideoLowerBrightness", 0x1005FF7B },
+{ "SunVideoRaiseBrightness", 0x1005FF7C },
+{ "SunPowerSwitchShift", 0x1005FF7D },
diff --git a/generic/nanosvg.h b/generic/nanosvg.h
new file mode 100755
index 0000000..5377ae0
--- /dev/null
+++ b/generic/nanosvg.h
@@ -0,0 +1,3088 @@
+/*
+ * Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * The SVG parser is based on Anti-Grain Geometry 2.4 SVG example
+ * Copyright (C) 2002-2004 Maxim Shemanarev (McSeem) (http://www.antigrain.com/)
+ *
+ * Arc calculation code based on canvg (https://code.google.com/p/canvg/)
+ *
+ * Bounding box calculation based on http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
+ *
+ */
+
+#ifndef NANOSVG_H
+#define NANOSVG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.
+//
+// The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.
+//
+// NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!
+//
+// The shapes in the SVG images are transformed by the viewBox and converted to specified units.
+// That is, you should get the same looking data as your designed in your favorite app.
+//
+// NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose
+// to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.
+//
+// The units passed to NanoVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'.
+// DPI (dots-per-inch) controls how the unit conversion is done.
+//
+// If you don't know or care about the units stuff, "px" and 96 should get you going.
+
+
+/* Example Usage:
+ // Load
+ NSVGImage* image;
+ image = nsvgParseFromFile("test.svg", "px", 96);
+ printf("size: %f x %f\n", image->width, image->height);
+ // Use...
+ for (NSVGshape *shape = image->shapes; shape != NULL; shape = shape->next) {
+ for (NSVGpath *path = shape->paths; path != NULL; path = path->next) {
+ for (int i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ drawCubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7]);
+ }
+ }
+ }
+ // Delete
+ nsvgDelete(image);
+*/
+
+#ifndef NANOSVG_SCOPE
+#define NANOSVG_SCOPE
+#endif
+
+#ifndef NANOSVG_malloc
+#define NANOSVG_malloc malloc
+#endif
+
+#ifndef NANOSVG_realloc
+#define NANOSVG_realloc realloc
+#endif
+
+#ifndef NANOSVG_free
+#define NANOSVG_free free
+#endif
+
+// float emulation for MS VC6++ compiler
+#if (_MSC_VER == 1200)
+#define tanf(a) (float)tan(a)
+#define cosf(a) (float)cos(a)
+#define sinf(a) (float)sin(a)
+#define sqrtf(a) (float)sqrt(a)
+#define fabsf(a) (float)fabs(a)
+#define acosf(a) (float)acos(a)
+#define atan2f(a,b) (float)atan2(a,b)
+#define ceilf(a) (float)ceil(a)
+#define fmodf(a,b) (float)fmod(a,b)
+#define floorf(a) (float)floor(a)
+#endif
+// float emulation for MS VC8++ compiler
+#if (_MSC_VER == 1400)
+#define fabsf(a) (float)fabs(a)
+#endif
+
+enum NSVGpaintType {
+ NSVG_PAINT_NONE = 0,
+ NSVG_PAINT_COLOR = 1,
+ NSVG_PAINT_LINEAR_GRADIENT = 2,
+ NSVG_PAINT_RADIAL_GRADIENT = 3
+};
+
+enum NSVGspreadType {
+ NSVG_SPREAD_PAD = 0,
+ NSVG_SPREAD_REFLECT = 1,
+ NSVG_SPREAD_REPEAT = 2
+};
+
+enum NSVGlineJoin {
+ NSVG_JOIN_MITER = 0,
+ NSVG_JOIN_ROUND = 1,
+ NSVG_JOIN_BEVEL = 2
+};
+
+enum NSVGlineCap {
+ NSVG_CAP_BUTT = 0,
+ NSVG_CAP_ROUND = 1,
+ NSVG_CAP_SQUARE = 2
+};
+
+enum NSVGfillRule {
+ NSVG_FILLRULE_NONZERO = 0,
+ NSVG_FILLRULE_EVENODD = 1
+};
+
+enum NSVGflags {
+ NSVG_FLAGS_VISIBLE = 0x01
+};
+
+typedef struct NSVGgradientStop {
+ unsigned int color;
+ float offset;
+} NSVGgradientStop;
+
+typedef struct NSVGgradient {
+ float xform[6];
+ char spread;
+ float fx, fy;
+ int nstops;
+ NSVGgradientStop stops[1];
+} NSVGgradient;
+
+typedef struct NSVGpaint {
+ char type;
+ union {
+ unsigned int color;
+ NSVGgradient* gradient;
+ };
+} NSVGpaint;
+
+typedef struct NSVGpath
+{
+ float* pts; // Cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
+ int npts; // Total number of bezier points.
+ char closed; // Flag indicating if shapes should be treated as closed.
+ float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy].
+ struct NSVGpath* next; // Pointer to next path, or NULL if last element.
+} NSVGpath;
+
+typedef struct NSVGshape
+{
+ char id[64]; // Optional 'id' attr of the shape or its group
+ NSVGpaint fill; // Fill paint
+ NSVGpaint stroke; // Stroke paint
+ float opacity; // Opacity of the shape.
+ float strokeWidth; // Stroke width (scaled).
+ float strokeDashOffset; // Stroke dash offset (scaled).
+ float strokeDashArray[8]; // Stroke dash array (scaled).
+ char strokeDashCount; // Number of dash values in dash array.
+ char strokeLineJoin; // Stroke join type.
+ char strokeLineCap; // Stroke cap type.
+ float miterLimit; // Miter limit
+ char fillRule; // Fill rule, see NSVGfillRule.
+ unsigned char flags; // Logical or of NSVG_FLAGS_* flags
+ float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy].
+ NSVGpath* paths; // Linked list of paths in the image.
+ struct NSVGshape* next; // Pointer to next shape, or NULL if last element.
+} NSVGshape;
+
+typedef struct NSVGimage
+{
+ float width; // Width of the image.
+ float height; // Height of the image.
+ NSVGshape* shapes; // Linked list of shapes in the image.
+} NSVGimage;
+
+// Parses SVG file from a file, returns SVG image as paths.
+NANOSVG_SCOPE NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi);
+
+// Parses SVG file from a null terminated string, returns SVG image as paths.
+// Important note: changes the string.
+NANOSVG_SCOPE NSVGimage* nsvgParse(char* input, const char* units, float dpi);
+
+// Deletes list of paths.
+NANOSVG_SCOPE void nsvgDelete(NSVGimage* image);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NANOSVG_H
+
+#ifdef NANOSVG_IMPLEMENTATION
+
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+#define NSVG_PI (3.14159265358979323846264338327f)
+#define NSVG_KAPPA90 (0.5522847493f) // Length proportional to radius of a cubic bezier handle for 90deg arcs.
+
+#define NSVG_ALIGN_MIN 0
+#define NSVG_ALIGN_MID 1
+#define NSVG_ALIGN_MAX 2
+#define NSVG_ALIGN_NONE 0
+#define NSVG_ALIGN_MEET 1
+#define NSVG_ALIGN_SLICE 2
+
+#define NSVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0)
+#define NSVG_RGB(r, g, b) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16))
+
+#ifdef _MSC_VER
+ #pragma warning (disable: 4996) // Switch off security warnings
+ #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings
+ #ifdef __cplusplus
+ #define NSVG_INLINE inline
+ #else
+ #define NSVG_INLINE
+ #endif
+ #if !defined(strtoll) // old MSVC versions do not have strtoll()
+ #define strtoll _strtoi64
+ #endif
+#else
+ #define NSVG_INLINE inline
+#endif
+
+
+static int nsvg__isspace(char c)
+{
+ return strchr(" \t\n\v\f\r", c) != 0;
+}
+
+static int nsvg__isdigit(char c)
+{
+ return c >= '0' && c <= '9';
+}
+
+static int nsvg__isnum(char c)
+{
+ return strchr("0123456789+-.eE", c) != 0;
+}
+
+static NSVG_INLINE float nsvg__minf(float a, float b) { return a < b ? a : b; }
+static NSVG_INLINE float nsvg__maxf(float a, float b) { return a > b ? a : b; }
+
+
+// Simple XML parser
+
+#define NSVG_XML_TAG 1
+#define NSVG_XML_CONTENT 2
+#define NSVG_XML_MAX_ATTRIBS 256
+
+static void nsvg__parseContent(char* s,
+ void (*contentCb)(void* ud, const char* s),
+ void* ud)
+{
+ // Trim start white spaces
+ while (*s && nsvg__isspace(*s)) s++;
+ if (!*s) return;
+
+ if (contentCb)
+ (*contentCb)(ud, s);
+}
+
+static void nsvg__parseElement(char* s,
+ void (*startelCb)(void* ud, const char* el, const char** attr),
+ void (*endelCb)(void* ud, const char* el),
+ void* ud)
+{
+ const char* attr[NSVG_XML_MAX_ATTRIBS];
+ int nattr = 0;
+ char* name;
+ int start = 0;
+ int end = 0;
+ char quote;
+
+ // Skip white space after the '<'
+ while (*s && nsvg__isspace(*s)) s++;
+
+ // Check if the tag is end tag
+ if (*s == '/') {
+ s++;
+ end = 1;
+ } else {
+ start = 1;
+ }
+
+ // Skip comments, data and preprocessor stuff.
+ if (!*s || *s == '?' || *s == '!')
+ return;
+
+ // Get tag name
+ name = s;
+ while (*s && !nsvg__isspace(*s)) s++;
+ if (*s) { *s++ = '\0'; }
+
+ // Get attribs
+ while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) {
+ char* name = NULL;
+ char* value = NULL;
+
+ // Skip white space before the attrib name
+ while (*s && nsvg__isspace(*s)) s++;
+ if (!*s) break;
+ if (*s == '/') {
+ end = 1;
+ break;
+ }
+ name = s;
+ // Find end of the attrib name.
+ while (*s && !nsvg__isspace(*s) && *s != '=') s++;
+ if (*s) { *s++ = '\0'; }
+ // Skip until the beginning of the value.
+ while (*s && *s != '\"' && *s != '\'') s++;
+ if (!*s) break;
+ quote = *s;
+ s++;
+ // Store value and find the end of it.
+ value = s;
+ while (*s && *s != quote) s++;
+ if (*s) { *s++ = '\0'; }
+
+ // Store only well formed attributes
+ if (name && value) {
+ attr[nattr++] = name;
+ attr[nattr++] = value;
+ }
+ }
+
+ // List terminator
+ attr[nattr++] = 0;
+ attr[nattr++] = 0;
+
+ // Call callbacks.
+ if (start && startelCb)
+ (*startelCb)(ud, name, attr);
+ if (end && endelCb)
+ (*endelCb)(ud, name);
+}
+
+NANOSVG_SCOPE
+int nsvg__parseXML(char* input,
+ void (*startelCb)(void* ud, const char* el, const char** attr),
+ void (*endelCb)(void* ud, const char* el),
+ void (*contentCb)(void* ud, const char* s),
+ void* ud)
+{
+ char* s = input;
+ char* mark = s;
+ int state = NSVG_XML_CONTENT;
+ while (*s) {
+ if (*s == '<' && state == NSVG_XML_CONTENT) {
+ // Start of a tag
+ *s++ = '\0';
+ nsvg__parseContent(mark, contentCb, ud);
+ mark = s;
+ state = NSVG_XML_TAG;
+ } else if (*s == '>' && state == NSVG_XML_TAG) {
+ // Start of a content or new tag.
+ *s++ = '\0';
+ nsvg__parseContent(mark, contentCb, ud);
+ nsvg__parseElement(mark, startelCb, endelCb, ud);
+ mark = s;
+ state = NSVG_XML_CONTENT;
+ } else {
+ s++;
+ }
+ }
+
+ return 1;
+}
+
+
+/* Simple SVG parser. */
+
+#define NSVG_MAX_ATTR 128
+
+enum NSVGgradientUnits {
+ NSVG_USER_SPACE = 0,
+ NSVG_OBJECT_SPACE = 1
+};
+
+#define NSVG_MAX_DASHES 8
+
+enum NSVGunits {
+ NSVG_UNITS_USER,
+ NSVG_UNITS_PX,
+ NSVG_UNITS_PT,
+ NSVG_UNITS_PC,
+ NSVG_UNITS_MM,
+ NSVG_UNITS_CM,
+ NSVG_UNITS_IN,
+ NSVG_UNITS_PERCENT,
+ NSVG_UNITS_EM,
+ NSVG_UNITS_EX
+};
+
+enum NSVGvisible {
+ NSVG_VIS_DISPLAY = 1,
+ NSVG_VIS_VISIBLE = 2
+};
+
+typedef struct NSVGcoordinate {
+ float value;
+ int units;
+} NSVGcoordinate;
+
+typedef struct NSVGlinearData {
+ NSVGcoordinate x1, y1, x2, y2;
+} NSVGlinearData;
+
+typedef struct NSVGradialData {
+ NSVGcoordinate cx, cy, r, fx, fy;
+} NSVGradialData;
+
+typedef struct NSVGgradientData
+{
+ char id[64];
+ char ref[64];
+ char type;
+ union {
+ NSVGlinearData linear;
+ NSVGradialData radial;
+ };
+ char spread;
+ char units;
+ float xform[6];
+ int nstops;
+ NSVGgradientStop* stops;
+ struct NSVGgradientData* next;
+} NSVGgradientData;
+
+typedef struct NSVGattrib
+{
+ char id[64];
+ float xform[6];
+ unsigned int fillColor;
+ unsigned int strokeColor;
+ float opacity;
+ float fillOpacity;
+ float strokeOpacity;
+ char fillGradient[64];
+ char strokeGradient[64];
+ float strokeWidth;
+ float strokeDashOffset;
+ float strokeDashArray[NSVG_MAX_DASHES];
+ int strokeDashCount;
+ char strokeLineJoin;
+ char strokeLineCap;
+ float miterLimit;
+ char fillRule;
+ float fontSize;
+ unsigned int stopColor;
+ float stopOpacity;
+ float stopOffset;
+ char hasFill;
+ char hasStroke;
+ char visible;
+} NSVGattrib;
+
+typedef struct NSVGstyles
+{
+ char* name;
+ char* description;
+ struct NSVGstyles* next;
+} NSVGstyles;
+
+typedef struct NSVGparser
+{
+ NSVGattrib attr[NSVG_MAX_ATTR];
+ int attrHead;
+ float* pts;
+ int npts;
+ int cpts;
+ NSVGpath* plist;
+ NSVGimage* image;
+ NSVGstyles* styles;
+ NSVGgradientData* gradients;
+ NSVGshape* shapesTail;
+ float viewMinx, viewMiny, viewWidth, viewHeight;
+ int alignX, alignY, alignType;
+ float dpi;
+ char pathFlag;
+ char defsFlag;
+ char styleFlag;
+} NSVGparser;
+
+static void nsvg__xformIdentity(float* t)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetTranslation(float* t, float tx, float ty)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = tx; t[5] = ty;
+}
+
+static void nsvg__xformSetScale(float* t, float sx, float sy)
+{
+ t[0] = sx; t[1] = 0.0f;
+ t[2] = 0.0f; t[3] = sy;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetSkewX(float* t, float a)
+{
+ t[0] = 1.0f; t[1] = 0.0f;
+ t[2] = tanf(a); t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetSkewY(float* t, float a)
+{
+ t[0] = 1.0f; t[1] = tanf(a);
+ t[2] = 0.0f; t[3] = 1.0f;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformSetRotation(float* t, float a)
+{
+ float cs = cosf(a), sn = sinf(a);
+ t[0] = cs; t[1] = sn;
+ t[2] = -sn; t[3] = cs;
+ t[4] = 0.0f; t[5] = 0.0f;
+}
+
+static void nsvg__xformMultiply(float* t, float* s)
+{
+ float t0 = t[0] * s[0] + t[1] * s[2];
+ float t2 = t[2] * s[0] + t[3] * s[2];
+ float t4 = t[4] * s[0] + t[5] * s[2] + s[4];
+ t[1] = t[0] * s[1] + t[1] * s[3];
+ t[3] = t[2] * s[1] + t[3] * s[3];
+ t[5] = t[4] * s[1] + t[5] * s[3] + s[5];
+ t[0] = t0;
+ t[2] = t2;
+ t[4] = t4;
+}
+
+static void nsvg__xformInverse(float* inv, float* t)
+{
+ double invdet, det = (double)t[0] * t[3] - (double)t[2] * t[1];
+ if (det > -1e-6 && det < 1e-6) {
+ nsvg__xformIdentity(t);
+ return;
+ }
+ invdet = 1.0 / det;
+ inv[0] = (float)(t[3] * invdet);
+ inv[2] = (float)(-t[2] * invdet);
+ inv[4] = (float)(((double)t[2] * t[5] - (double)t[3] * t[4]) * invdet);
+ inv[1] = (float)(-t[1] * invdet);
+ inv[3] = (float)(t[0] * invdet);
+ inv[5] = (float)(((double)t[1] * t[4] - (double)t[0] * t[5]) * invdet);
+}
+
+static void nsvg__xformPremultiply(float* t, float* s)
+{
+ float s2[6];
+ memcpy(s2, s, sizeof(float)*6);
+ nsvg__xformMultiply(s2, t);
+ memcpy(t, s2, sizeof(float)*6);
+}
+
+static void nsvg__xformPoint(float* dx, float* dy, float x, float y, float* t)
+{
+ *dx = x*t[0] + y*t[2] + t[4];
+ *dy = x*t[1] + y*t[3] + t[5];
+}
+
+static void nsvg__xformVec(float* dx, float* dy, float x, float y, float* t)
+{
+ *dx = x*t[0] + y*t[2];
+ *dy = x*t[1] + y*t[3];
+}
+
+#define NSVG_EPSILON (1e-12)
+
+static int nsvg__ptInBounds(float* pt, float* bounds)
+{
+ return pt[0] >= bounds[0] && pt[0] <= bounds[2] && pt[1] >= bounds[1] && pt[1] <= bounds[3];
+}
+
+
+static double nsvg__evalBezier(double t, double p0, double p1, double p2, double p3)
+{
+ double it = 1.0-t;
+ return it*it*it*p0 + 3.0*it*it*t*p1 + 3.0*it*t*t*p2 + t*t*t*p3;
+}
+
+static void nsvg__curveBounds(float* bounds, float* curve)
+{
+ int i, j, count;
+ double roots[2], a, b, c, b2ac, t, v;
+ float* v0 = &curve[0];
+ float* v1 = &curve[2];
+ float* v2 = &curve[4];
+ float* v3 = &curve[6];
+
+ // Start the bounding box by end points
+ bounds[0] = nsvg__minf(v0[0], v3[0]);
+ bounds[1] = nsvg__minf(v0[1], v3[1]);
+ bounds[2] = nsvg__maxf(v0[0], v3[0]);
+ bounds[3] = nsvg__maxf(v0[1], v3[1]);
+
+ // Bezier curve fits inside the convex hull of it's control points.
+ // If control points are inside the bounds, we're done.
+ if (nsvg__ptInBounds(v1, bounds) && nsvg__ptInBounds(v2, bounds))
+ return;
+
+ // Add bezier curve inflection points in X and Y.
+ for (i = 0; i < 2; i++) {
+ a = -3.0 * v0[i] + 9.0 * v1[i] - 9.0 * v2[i] + 3.0 * v3[i];
+ b = 6.0 * v0[i] - 12.0 * v1[i] + 6.0 * v2[i];
+ c = 3.0 * v1[i] - 3.0 * v0[i];
+ count = 0;
+ if (fabs(a) < NSVG_EPSILON) {
+ if (fabs(b) > NSVG_EPSILON) {
+ t = -c / b;
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ }
+ } else {
+ b2ac = b*b - 4.0*c*a;
+ if (b2ac > NSVG_EPSILON) {
+ t = (-b + sqrt(b2ac)) / (2.0 * a);
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ t = (-b - sqrt(b2ac)) / (2.0 * a);
+ if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON)
+ roots[count++] = t;
+ }
+ }
+ for (j = 0; j < count; j++) {
+ v = nsvg__evalBezier(roots[j], v0[i], v1[i], v2[i], v3[i]);
+ bounds[0+i] = nsvg__minf(bounds[0+i], (float)v);
+ bounds[2+i] = nsvg__maxf(bounds[2+i], (float)v);
+ }
+ }
+}
+
+static NSVGparser* nsvg__createParser()
+{
+ NSVGparser* p;
+ p = (NSVGparser*)NANOSVG_malloc(sizeof(NSVGparser));
+ if (p == NULL) goto error;
+ memset(p, 0, sizeof(NSVGparser));
+
+ p->image = (NSVGimage*)NANOSVG_malloc(sizeof(NSVGimage));
+ if (p->image == NULL) goto error;
+ memset(p->image, 0, sizeof(NSVGimage));
+
+ // Init style
+ nsvg__xformIdentity(p->attr[0].xform);
+ memset(p->attr[0].id, 0, sizeof p->attr[0].id);
+ p->attr[0].fillColor = NSVG_RGB(0,0,0);
+ p->attr[0].strokeColor = NSVG_RGB(0,0,0);
+ p->attr[0].opacity = 1;
+ p->attr[0].fillOpacity = 1;
+ p->attr[0].strokeOpacity = 1;
+ p->attr[0].stopOpacity = 1;
+ p->attr[0].strokeWidth = 1;
+ p->attr[0].strokeLineJoin = NSVG_JOIN_MITER;
+ p->attr[0].strokeLineCap = NSVG_CAP_BUTT;
+ p->attr[0].miterLimit = 4;
+ p->attr[0].fillRule = NSVG_FILLRULE_NONZERO;
+ p->attr[0].hasFill = 1;
+ p->attr[0].visible = NSVG_VIS_DISPLAY | NSVG_VIS_VISIBLE;
+
+ return p;
+
+error:
+ if (p) {
+ if (p->image) NANOSVG_free(p->image);
+ NANOSVG_free(p);
+ }
+ return NULL;
+}
+
+static void nsvg__deleteStyles(NSVGstyles* style) {
+ while (style) {
+ NSVGstyles *next = style->next;
+ if (style->name!= NULL)
+ NANOSVG_free(style->name);
+ if (style->description != NULL)
+ NANOSVG_free(style->description);
+ NANOSVG_free(style);
+ style = next;
+ }
+}
+
+static void nsvg__deletePaths(NSVGpath* path)
+{
+ while (path) {
+ NSVGpath *next = path->next;
+ if (path->pts != NULL)
+ NANOSVG_free(path->pts);
+ NANOSVG_free(path);
+ path = next;
+ }
+}
+
+static void nsvg__deletePaint(NSVGpaint* paint)
+{
+ if (paint->type == NSVG_PAINT_LINEAR_GRADIENT || paint->type == NSVG_PAINT_RADIAL_GRADIENT)
+ NANOSVG_free(paint->gradient);
+}
+
+static void nsvg__deleteGradientData(NSVGgradientData* grad)
+{
+ NSVGgradientData* next;
+ while (grad != NULL) {
+ next = grad->next;
+ NANOSVG_free(grad->stops);
+ NANOSVG_free(grad);
+ grad = next;
+ }
+}
+
+static void nsvg__deleteParser(NSVGparser* p)
+{
+ if (p != NULL) {
+ nsvg__deleteStyles(p->styles);
+ nsvg__deletePaths(p->plist);
+ nsvg__deleteGradientData(p->gradients);
+ nsvgDelete(p->image);
+ NANOSVG_free(p->pts);
+ NANOSVG_free(p);
+ }
+}
+
+static void nsvg__resetPath(NSVGparser* p)
+{
+ p->npts = 0;
+}
+
+static void nsvg__addPoint(NSVGparser* p, float x, float y)
+{
+ if (p->npts+1 > p->cpts) {
+ p->cpts = p->cpts ? p->cpts*2 : 8;
+ p->pts = (float*)NANOSVG_realloc(p->pts, p->cpts*2*sizeof(float));
+ if (!p->pts) return;
+ }
+ p->pts[p->npts*2+0] = x;
+ p->pts[p->npts*2+1] = y;
+ p->npts++;
+}
+
+static void nsvg__moveTo(NSVGparser* p, float x, float y)
+{
+ if (p->npts > 0) {
+ p->pts[(p->npts-1)*2+0] = x;
+ p->pts[(p->npts-1)*2+1] = y;
+ } else {
+ nsvg__addPoint(p, x, y);
+ }
+}
+
+static void nsvg__lineTo(NSVGparser* p, float x, float y)
+{
+ float px,py, dx,dy;
+ if (p->npts > 0) {
+ px = p->pts[(p->npts-1)*2+0];
+ py = p->pts[(p->npts-1)*2+1];
+ dx = x - px;
+ dy = y - py;
+ nsvg__addPoint(p, px + dx/3.0f, py + dy/3.0f);
+ nsvg__addPoint(p, x - dx/3.0f, y - dy/3.0f);
+ nsvg__addPoint(p, x, y);
+ }
+}
+
+static void nsvg__cubicBezTo(NSVGparser* p, float cpx1, float cpy1, float cpx2, float cpy2, float x, float y)
+{
+ nsvg__addPoint(p, cpx1, cpy1);
+ nsvg__addPoint(p, cpx2, cpy2);
+ nsvg__addPoint(p, x, y);
+}
+
+static NSVGattrib* nsvg__getAttr(NSVGparser* p)
+{
+ return &p->attr[p->attrHead];
+}
+
+static void nsvg__pushAttr(NSVGparser* p)
+{
+ if (p->attrHead < NSVG_MAX_ATTR-1) {
+ p->attrHead++;
+ memcpy(&p->attr[p->attrHead], &p->attr[p->attrHead-1], sizeof(NSVGattrib));
+ }
+}
+
+static void nsvg__popAttr(NSVGparser* p)
+{
+ if (p->attrHead > 0)
+ p->attrHead--;
+}
+
+static float nsvg__actualOrigX(NSVGparser* p)
+{
+ return p->viewMinx;
+}
+
+static float nsvg__actualOrigY(NSVGparser* p)
+{
+ return p->viewMiny;
+}
+
+static float nsvg__actualWidth(NSVGparser* p)
+{
+ return p->viewWidth;
+}
+
+static float nsvg__actualHeight(NSVGparser* p)
+{
+ return p->viewHeight;
+}
+
+static float nsvg__actualLength(NSVGparser* p)
+{
+ float w = nsvg__actualWidth(p), h = nsvg__actualHeight(p);
+ return sqrtf(w*w + h*h) / sqrtf(2.0f);
+}
+
+static float nsvg__convertToPixels(NSVGparser* p, NSVGcoordinate c, float orig, float length)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ switch (c.units) {
+ case NSVG_UNITS_USER: return c.value;
+ case NSVG_UNITS_PX: return c.value;
+ case NSVG_UNITS_PT: return c.value / 72.0f * p->dpi;
+ case NSVG_UNITS_PC: return c.value / 6.0f * p->dpi;
+ case NSVG_UNITS_MM: return c.value / 25.4f * p->dpi;
+ case NSVG_UNITS_CM: return c.value / 2.54f * p->dpi;
+ case NSVG_UNITS_IN: return c.value * p->dpi;
+ case NSVG_UNITS_EM: return c.value * attr->fontSize;
+ case NSVG_UNITS_EX: return c.value * attr->fontSize * 0.52f; // x-height of Helvetica.
+ case NSVG_UNITS_PERCENT: return orig + c.value / 100.0f * length;
+ default: return c.value;
+ }
+ return c.value;
+}
+
+static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id)
+{
+ NSVGgradientData* grad = p->gradients;
+ while (grad) {
+ if (strcmp(grad->id, id) == 0)
+ return grad;
+ grad = grad->next;
+ }
+ return NULL;
+}
+
+static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, char* paintType)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ NSVGgradientData* data = NULL;
+ NSVGgradientData* ref = NULL;
+ NSVGgradientStop* stops = NULL;
+ NSVGgradient* grad;
+ float ox, oy, sw, sh, sl;
+ int nstops = 0;
+
+ data = nsvg__findGradientData(p, id);
+ if (data == NULL) return NULL;
+
+ // TODO: use ref to fill in all unset values too.
+ ref = data;
+ while (ref != NULL) {
+ if (stops == NULL && ref->stops != NULL) {
+ stops = ref->stops;
+ nstops = ref->nstops;
+ break;
+ }
+ ref = nsvg__findGradientData(p, ref->ref);
+ }
+ if (stops == NULL) return NULL;
+
+ grad = (NSVGgradient*)NANOSVG_malloc(sizeof(NSVGgradient) + sizeof(NSVGgradientStop)*(nstops-1));
+ if (grad == NULL) return NULL;
+
+ // The shape width and height.
+ if (data->units == NSVG_OBJECT_SPACE) {
+ ox = localBounds[0];
+ oy = localBounds[1];
+ sw = localBounds[2] - localBounds[0];
+ sh = localBounds[3] - localBounds[1];
+ } else {
+ ox = nsvg__actualOrigX(p);
+ oy = nsvg__actualOrigY(p);
+ sw = nsvg__actualWidth(p);
+ sh = nsvg__actualHeight(p);
+ }
+ sl = sqrtf(sw*sw + sh*sh) / sqrtf(2.0f);
+
+ if (data->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ float x1, y1, x2, y2, dx, dy;
+ x1 = nsvg__convertToPixels(p, data->linear.x1, ox, sw);
+ y1 = nsvg__convertToPixels(p, data->linear.y1, oy, sh);
+ x2 = nsvg__convertToPixels(p, data->linear.x2, ox, sw);
+ y2 = nsvg__convertToPixels(p, data->linear.y2, oy, sh);
+ // Calculate transform aligned to the line
+ dx = x2 - x1;
+ dy = y2 - y1;
+ grad->xform[0] = dy; grad->xform[1] = -dx;
+ grad->xform[2] = dx; grad->xform[3] = dy;
+ grad->xform[4] = x1; grad->xform[5] = y1;
+ } else {
+ float cx, cy, fx, fy, r;
+ cx = nsvg__convertToPixels(p, data->radial.cx, ox, sw);
+ cy = nsvg__convertToPixels(p, data->radial.cy, oy, sh);
+ fx = nsvg__convertToPixels(p, data->radial.fx, ox, sw);
+ fy = nsvg__convertToPixels(p, data->radial.fy, oy, sh);
+ r = nsvg__convertToPixels(p, data->radial.r, 0, sl);
+ // Calculate transform aligned to the circle
+ grad->xform[0] = r; grad->xform[1] = 0;
+ grad->xform[2] = 0; grad->xform[3] = r;
+ grad->xform[4] = cx; grad->xform[5] = cy;
+ grad->fx = fx / r;
+ grad->fy = fy / r;
+ }
+
+ nsvg__xformMultiply(grad->xform, data->xform);
+ nsvg__xformMultiply(grad->xform, attr->xform);
+
+ grad->spread = data->spread;
+ memcpy(grad->stops, stops, nstops*sizeof(NSVGgradientStop));
+ grad->nstops = nstops;
+
+ *paintType = data->type;
+
+ return grad;
+}
+
+static float nsvg__getAverageScale(float* t)
+{
+ float sx = sqrtf(t[0]*t[0] + t[2]*t[2]);
+ float sy = sqrtf(t[1]*t[1] + t[3]*t[3]);
+ return (sx + sy) * 0.5f;
+}
+
+static void nsvg__getLocalBounds(float* bounds, NSVGshape *shape, float* xform)
+{
+ NSVGpath* path;
+ float curve[4*2], curveBounds[4];
+ int i, first = 1;
+ for (path = shape->paths; path != NULL; path = path->next) {
+ nsvg__xformPoint(&curve[0], &curve[1], path->pts[0], path->pts[1], xform);
+ for (i = 0; i < path->npts-1; i += 3) {
+ nsvg__xformPoint(&curve[2], &curve[3], path->pts[(i+1)*2], path->pts[(i+1)*2+1], xform);
+ nsvg__xformPoint(&curve[4], &curve[5], path->pts[(i+2)*2], path->pts[(i+2)*2+1], xform);
+ nsvg__xformPoint(&curve[6], &curve[7], path->pts[(i+3)*2], path->pts[(i+3)*2+1], xform);
+ nsvg__curveBounds(curveBounds, curve);
+ if (first) {
+ bounds[0] = curveBounds[0];
+ bounds[1] = curveBounds[1];
+ bounds[2] = curveBounds[2];
+ bounds[3] = curveBounds[3];
+ first = 0;
+ } else {
+ bounds[0] = nsvg__minf(bounds[0], curveBounds[0]);
+ bounds[1] = nsvg__minf(bounds[1], curveBounds[1]);
+ bounds[2] = nsvg__maxf(bounds[2], curveBounds[2]);
+ bounds[3] = nsvg__maxf(bounds[3], curveBounds[3]);
+ }
+ curve[0] = curve[6];
+ curve[1] = curve[7];
+ }
+ }
+}
+
+static void nsvg__addShape(NSVGparser* p)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ float scale = 1.0f;
+ NSVGshape* shape;
+ NSVGpath* path;
+ int i;
+
+ if (p->plist == NULL)
+ return;
+
+ shape = (NSVGshape*)NANOSVG_malloc(sizeof(NSVGshape));
+ if (shape == NULL) goto error;
+ memset(shape, 0, sizeof(NSVGshape));
+
+ memcpy(shape->id, attr->id, sizeof shape->id);
+ scale = nsvg__getAverageScale(attr->xform);
+ shape->strokeWidth = attr->strokeWidth * scale;
+ shape->strokeDashOffset = attr->strokeDashOffset * scale;
+ shape->strokeDashCount = (char)attr->strokeDashCount;
+ for (i = 0; i < attr->strokeDashCount; i++)
+ shape->strokeDashArray[i] = attr->strokeDashArray[i] * scale;
+ shape->strokeLineJoin = attr->strokeLineJoin;
+ shape->strokeLineCap = attr->strokeLineCap;
+ shape->miterLimit = attr->miterLimit;
+ shape->fillRule = attr->fillRule;
+ shape->opacity = attr->opacity;
+
+ shape->paths = p->plist;
+ p->plist = NULL;
+
+ // Calculate shape bounds
+ shape->bounds[0] = shape->paths->bounds[0];
+ shape->bounds[1] = shape->paths->bounds[1];
+ shape->bounds[2] = shape->paths->bounds[2];
+ shape->bounds[3] = shape->paths->bounds[3];
+ for (path = shape->paths->next; path != NULL; path = path->next) {
+ shape->bounds[0] = nsvg__minf(shape->bounds[0], path->bounds[0]);
+ shape->bounds[1] = nsvg__minf(shape->bounds[1], path->bounds[1]);
+ shape->bounds[2] = nsvg__maxf(shape->bounds[2], path->bounds[2]);
+ shape->bounds[3] = nsvg__maxf(shape->bounds[3], path->bounds[3]);
+ }
+
+ // Set fill
+ if (attr->hasFill == 0) {
+ shape->fill.type = NSVG_PAINT_NONE;
+ } else if (attr->hasFill == 1) {
+ shape->fill.type = NSVG_PAINT_COLOR;
+ shape->fill.color = attr->fillColor;
+ shape->fill.color |= (unsigned int)(attr->fillOpacity*255) << 24;
+ } else if (attr->hasFill == 2) {
+ float inv[6], localBounds[4];
+ nsvg__xformInverse(inv, attr->xform);
+ nsvg__getLocalBounds(localBounds, shape, inv);
+ shape->fill.gradient = nsvg__createGradient(p, attr->fillGradient, localBounds, &shape->fill.type);
+ if (shape->fill.gradient == NULL) {
+ shape->fill.type = NSVG_PAINT_NONE;
+ }
+ }
+
+ // Set stroke
+ if (attr->hasStroke == 0) {
+ shape->stroke.type = NSVG_PAINT_NONE;
+ } else if (attr->hasStroke == 1) {
+ shape->stroke.type = NSVG_PAINT_COLOR;
+ shape->stroke.color = attr->strokeColor;
+ shape->stroke.color |= (unsigned int)(attr->strokeOpacity*255) << 24;
+ } else if (attr->hasStroke == 2) {
+ float inv[6], localBounds[4];
+ nsvg__xformInverse(inv, attr->xform);
+ nsvg__getLocalBounds(localBounds, shape, inv);
+ shape->stroke.gradient = nsvg__createGradient(p, attr->strokeGradient, localBounds, &shape->stroke.type);
+ if (shape->stroke.gradient == NULL)
+ shape->stroke.type = NSVG_PAINT_NONE;
+ }
+
+ // Set flags
+ shape->flags = ((attr->visible & NSVG_VIS_DISPLAY) && (attr->visible & NSVG_VIS_VISIBLE) ? NSVG_FLAGS_VISIBLE : 0x00);
+
+ // Add to tail
+ if (p->image->shapes == NULL)
+ p->image->shapes = shape;
+ else
+ p->shapesTail->next = shape;
+ p->shapesTail = shape;
+
+ return;
+
+error:
+ if (shape) NANOSVG_free(shape);
+}
+
+static void nsvg__addPath(NSVGparser* p, char closed)
+{
+ NSVGattrib* attr = nsvg__getAttr(p);
+ NSVGpath* path = NULL;
+ float bounds[4];
+ float* curve;
+ int i;
+
+ if (p->npts < 4)
+ return;
+
+ if (closed)
+ nsvg__lineTo(p, p->pts[0], p->pts[1]);
+
+ path = (NSVGpath*)NANOSVG_malloc(sizeof(NSVGpath));
+ if (path == NULL) goto error;
+ memset(path, 0, sizeof(NSVGpath));
+
+ path->pts = (float*)NANOSVG_malloc(p->npts*2*sizeof(float));
+ if (path->pts == NULL) goto error;
+ path->closed = closed;
+ path->npts = p->npts;
+
+ // Transform path.
+ for (i = 0; i < p->npts; ++i)
+ nsvg__xformPoint(&path->pts[i*2], &path->pts[i*2+1], p->pts[i*2], p->pts[i*2+1], attr->xform);
+
+ // Find bounds
+ for (i = 0; i < path->npts-1; i += 3) {
+ curve = &path->pts[i*2];
+ nsvg__curveBounds(bounds, curve);
+ if (i == 0) {
+ path->bounds[0] = bounds[0];
+ path->bounds[1] = bounds[1];
+ path->bounds[2] = bounds[2];
+ path->bounds[3] = bounds[3];
+ } else {
+ path->bounds[0] = nsvg__minf(path->bounds[0], bounds[0]);
+ path->bounds[1] = nsvg__minf(path->bounds[1], bounds[1]);
+ path->bounds[2] = nsvg__maxf(path->bounds[2], bounds[2]);
+ path->bounds[3] = nsvg__maxf(path->bounds[3], bounds[3]);
+ }
+ }
+
+ path->next = p->plist;
+ p->plist = path;
+
+ return;
+
+error:
+ if (path != NULL) {
+ if (path->pts != NULL) NANOSVG_free(path->pts);
+ NANOSVG_free(path);
+ }
+}
+
+// We roll our own string to float because the std library one uses locale and messes things up.
+static double nsvg__atof(const char* s)
+{
+ char* cur = (char*)s;
+ char* end = NULL;
+ double res = 0.0, sign = 1.0;
+#if (_MSC_VER == 1200)
+ __int64 intPart = 0, fracPart = 0;
+#else
+ long long intPart = 0, fracPart = 0;
+#endif
+ char hasIntPart = 0, hasFracPart = 0;
+
+ // Parse optional sign
+ if (*cur == '+') {
+ cur++;
+ } else if (*cur == '-') {
+ sign = -1;
+ cur++;
+ }
+
+ // Parse integer part
+ if (nsvg__isdigit(*cur)) {
+ // Parse digit sequence
+#if (_MSC_VER == 1200)
+ intPart = strtol(cur, &end, 10);
+#else
+ intPart = strtoll(cur, &end, 10);
+#endif
+ if (cur != end) {
+ res = (double)intPart;
+ hasIntPart = 1;
+ cur = end;
+ }
+ }
+
+ // Parse fractional part.
+ if (*cur == '.') {
+ cur++; // Skip '.'
+ if (nsvg__isdigit(*cur)) {
+ // Parse digit sequence
+#if (_MSC_VER == 1200)
+ fracPart = strtol(cur, &end, 10);
+#else
+ fracPart = strtoll(cur, &end, 10);
+#endif
+ if (cur != end) {
+ res += (double)fracPart / pow(10.0, (double)(end - cur));
+ hasFracPart = 1;
+ cur = end;
+ }
+ }
+ }
+
+ // A valid number should have integer or fractional part.
+ if (!hasIntPart && !hasFracPart)
+ return 0.0;
+
+ // Parse optional exponent
+ if (*cur == 'e' || *cur == 'E') {
+ int expPart = 0;
+ cur++; // skip 'E'
+ expPart = strtol(cur, &end, 10); // Parse digit sequence with sign
+ if (cur != end) {
+ res *= pow(10.0, (double)expPart);
+ }
+ }
+
+ return res * sign;
+}
+
+
+static const char* nsvg__parseNumber(const char* s, char* it, const int size)
+{
+ const int last = size-1;
+ int i = 0;
+
+ // sign
+ if (*s == '-' || *s == '+') {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ // integer part
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ if (*s == '.') {
+ // decimal point
+ if (i < last) it[i++] = *s;
+ s++;
+ // fraction part
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ }
+ // exponent
+ if (*s == 'e' || *s == 'E') {
+ if (i < last) it[i++] = *s;
+ s++;
+ if (*s == '-' || *s == '+') {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ while (*s && nsvg__isdigit(*s)) {
+ if (i < last) it[i++] = *s;
+ s++;
+ }
+ }
+ it[i] = '\0';
+
+ return s;
+}
+
+static const char* nsvg__getNextPathItem(const char* s, char* it)
+{
+ it[0] = '\0';
+ // Skip white spaces and commas
+ while (*s && (nsvg__isspace(*s) || *s == ',')) s++;
+ if (!*s) return s;
+ if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) {
+ s = nsvg__parseNumber(s, it, 64);
+ } else {
+ // Parse command
+ it[0] = *s++;
+ it[1] = '\0';
+ return s;
+ }
+
+ return s;
+}
+
+static unsigned int nsvg__parseColorHex(const char* str)
+{
+ unsigned int c = 0, r = 0, g = 0, b = 0;
+ int n = 0;
+ str++; // skip #
+ // Calculate number of characters.
+ while(str[n] && !nsvg__isspace(str[n]))
+ n++;
+ if (n == 6) {
+ sscanf(str, "%x", &c);
+ } else if (n == 3) {
+ sscanf(str, "%x", &c);
+ c = (c&0xf) | ((c&0xf0) << 4) | ((c&0xf00) << 8);
+ c |= c<<4;
+ }
+ r = (c >> 16) & 0xff;
+ g = (c >> 8) & 0xff;
+ b = c & 0xff;
+ return NSVG_RGB(r,g,b);
+}
+
+static unsigned int nsvg__parseColorRGB(const char* str)
+{
+ int r = -1, g = -1, b = -1;
+ char s1[32]="", s2[32]="";
+ sscanf(str + 4, "%d%[%%, \t]%d%[%%, \t]%d", &r, s1, &g, s2, &b);
+ if (strchr(s1, '%')) {
+ return NSVG_RGB((r*255)/100,(g*255)/100,(b*255)/100);
+ } else {
+ return NSVG_RGB(r,g,b);
+ }
+}
+
+typedef struct NSVGNamedColor {
+ const char* name;
+ unsigned int color;
+} NSVGNamedColor;
+
+NSVGNamedColor nsvg__colors[] = {
+
+ { "red", NSVG_RGB(255, 0, 0) },
+ { "green", NSVG_RGB( 0, 128, 0) },
+ { "blue", NSVG_RGB( 0, 0, 255) },
+ { "yellow", NSVG_RGB(255, 255, 0) },
+ { "cyan", NSVG_RGB( 0, 255, 255) },
+ { "magenta", NSVG_RGB(255, 0, 255) },
+ { "black", NSVG_RGB( 0, 0, 0) },
+ { "grey", NSVG_RGB(128, 128, 128) },
+ { "gray", NSVG_RGB(128, 128, 128) },
+ { "white", NSVG_RGB(255, 255, 255) },
+
+#ifdef NANOSVG_ALL_COLOR_KEYWORDS
+ { "aliceblue", NSVG_RGB(240, 248, 255) },
+ { "antiquewhite", NSVG_RGB(250, 235, 215) },
+ { "aqua", NSVG_RGB( 0, 255, 255) },
+ { "aquamarine", NSVG_RGB(127, 255, 212) },
+ { "azure", NSVG_RGB(240, 255, 255) },
+ { "beige", NSVG_RGB(245, 245, 220) },
+ { "bisque", NSVG_RGB(255, 228, 196) },
+ { "blanchedalmond", NSVG_RGB(255, 235, 205) },
+ { "blueviolet", NSVG_RGB(138, 43, 226) },
+ { "brown", NSVG_RGB(165, 42, 42) },
+ { "burlywood", NSVG_RGB(222, 184, 135) },
+ { "cadetblue", NSVG_RGB( 95, 158, 160) },
+ { "chartreuse", NSVG_RGB(127, 255, 0) },
+ { "chocolate", NSVG_RGB(210, 105, 30) },
+ { "coral", NSVG_RGB(255, 127, 80) },
+ { "cornflowerblue", NSVG_RGB(100, 149, 237) },
+ { "cornsilk", NSVG_RGB(255, 248, 220) },
+ { "crimson", NSVG_RGB(220, 20, 60) },
+ { "darkblue", NSVG_RGB( 0, 0, 139) },
+ { "darkcyan", NSVG_RGB( 0, 139, 139) },
+ { "darkgoldenrod", NSVG_RGB(184, 134, 11) },
+ { "darkgray", NSVG_RGB(169, 169, 169) },
+ { "darkgreen", NSVG_RGB( 0, 100, 0) },
+ { "darkgrey", NSVG_RGB(169, 169, 169) },
+ { "darkkhaki", NSVG_RGB(189, 183, 107) },
+ { "darkmagenta", NSVG_RGB(139, 0, 139) },
+ { "darkolivegreen", NSVG_RGB( 85, 107, 47) },
+ { "darkorange", NSVG_RGB(255, 140, 0) },
+ { "darkorchid", NSVG_RGB(153, 50, 204) },
+ { "darkred", NSVG_RGB(139, 0, 0) },
+ { "darksalmon", NSVG_RGB(233, 150, 122) },
+ { "darkseagreen", NSVG_RGB(143, 188, 143) },
+ { "darkslateblue", NSVG_RGB( 72, 61, 139) },
+ { "darkslategray", NSVG_RGB( 47, 79, 79) },
+ { "darkslategrey", NSVG_RGB( 47, 79, 79) },
+ { "darkturquoise", NSVG_RGB( 0, 206, 209) },
+ { "darkviolet", NSVG_RGB(148, 0, 211) },
+ { "deeppink", NSVG_RGB(255, 20, 147) },
+ { "deepskyblue", NSVG_RGB( 0, 191, 255) },
+ { "dimgray", NSVG_RGB(105, 105, 105) },
+ { "dimgrey", NSVG_RGB(105, 105, 105) },
+ { "dodgerblue", NSVG_RGB( 30, 144, 255) },
+ { "firebrick", NSVG_RGB(178, 34, 34) },
+ { "floralwhite", NSVG_RGB(255, 250, 240) },
+ { "forestgreen", NSVG_RGB( 34, 139, 34) },
+ { "fuchsia", NSVG_RGB(255, 0, 255) },
+ { "gainsboro", NSVG_RGB(220, 220, 220) },
+ { "ghostwhite", NSVG_RGB(248, 248, 255) },
+ { "gold", NSVG_RGB(255, 215, 0) },
+ { "goldenrod", NSVG_RGB(218, 165, 32) },
+ { "greenyellow", NSVG_RGB(173, 255, 47) },
+ { "honeydew", NSVG_RGB(240, 255, 240) },
+ { "hotpink", NSVG_RGB(255, 105, 180) },
+ { "indianred", NSVG_RGB(205, 92, 92) },
+ { "indigo", NSVG_RGB( 75, 0, 130) },
+ { "ivory", NSVG_RGB(255, 255, 240) },
+ { "khaki", NSVG_RGB(240, 230, 140) },
+ { "lavender", NSVG_RGB(230, 230, 250) },
+ { "lavenderblush", NSVG_RGB(255, 240, 245) },
+ { "lawngreen", NSVG_RGB(124, 252, 0) },
+ { "lemonchiffon", NSVG_RGB(255, 250, 205) },
+ { "lightblue", NSVG_RGB(173, 216, 230) },
+ { "lightcoral", NSVG_RGB(240, 128, 128) },
+ { "lightcyan", NSVG_RGB(224, 255, 255) },
+ { "lightgoldenrodyellow", NSVG_RGB(250, 250, 210) },
+ { "lightgray", NSVG_RGB(211, 211, 211) },
+ { "lightgreen", NSVG_RGB(144, 238, 144) },
+ { "lightgrey", NSVG_RGB(211, 211, 211) },
+ { "lightpink", NSVG_RGB(255, 182, 193) },
+ { "lightsalmon", NSVG_RGB(255, 160, 122) },
+ { "lightseagreen", NSVG_RGB( 32, 178, 170) },
+ { "lightskyblue", NSVG_RGB(135, 206, 250) },
+ { "lightslategray", NSVG_RGB(119, 136, 153) },
+ { "lightslategrey", NSVG_RGB(119, 136, 153) },
+ { "lightsteelblue", NSVG_RGB(176, 196, 222) },
+ { "lightyellow", NSVG_RGB(255, 255, 224) },
+ { "lime", NSVG_RGB( 0, 255, 0) },
+ { "limegreen", NSVG_RGB( 50, 205, 50) },
+ { "linen", NSVG_RGB(250, 240, 230) },
+ { "maroon", NSVG_RGB(128, 0, 0) },
+ { "mediumaquamarine", NSVG_RGB(102, 205, 170) },
+ { "mediumblue", NSVG_RGB( 0, 0, 205) },
+ { "mediumorchid", NSVG_RGB(186, 85, 211) },
+ { "mediumpurple", NSVG_RGB(147, 112, 219) },
+ { "mediumseagreen", NSVG_RGB( 60, 179, 113) },
+ { "mediumslateblue", NSVG_RGB(123, 104, 238) },
+ { "mediumspringgreen", NSVG_RGB( 0, 250, 154) },
+ { "mediumturquoise", NSVG_RGB( 72, 209, 204) },
+ { "mediumvioletred", NSVG_RGB(199, 21, 133) },
+ { "midnightblue", NSVG_RGB( 25, 25, 112) },
+ { "mintcream", NSVG_RGB(245, 255, 250) },
+ { "mistyrose", NSVG_RGB(255, 228, 225) },
+ { "moccasin", NSVG_RGB(255, 228, 181) },
+ { "navajowhite", NSVG_RGB(255, 222, 173) },
+ { "navy", NSVG_RGB( 0, 0, 128) },
+ { "oldlace", NSVG_RGB(253, 245, 230) },
+ { "olive", NSVG_RGB(128, 128, 0) },
+ { "olivedrab", NSVG_RGB(107, 142, 35) },
+ { "orange", NSVG_RGB(255, 165, 0) },
+ { "orangered", NSVG_RGB(255, 69, 0) },
+ { "orchid", NSVG_RGB(218, 112, 214) },
+ { "palegoldenrod", NSVG_RGB(238, 232, 170) },
+ { "palegreen", NSVG_RGB(152, 251, 152) },
+ { "paleturquoise", NSVG_RGB(175, 238, 238) },
+ { "palevioletred", NSVG_RGB(219, 112, 147) },
+ { "papayawhip", NSVG_RGB(255, 239, 213) },
+ { "peachpuff", NSVG_RGB(255, 218, 185) },
+ { "peru", NSVG_RGB(205, 133, 63) },
+ { "pink", NSVG_RGB(255, 192, 203) },
+ { "plum", NSVG_RGB(221, 160, 221) },
+ { "powderblue", NSVG_RGB(176, 224, 230) },
+ { "purple", NSVG_RGB(128, 0, 128) },
+ { "rosybrown", NSVG_RGB(188, 143, 143) },
+ { "royalblue", NSVG_RGB( 65, 105, 225) },
+ { "saddlebrown", NSVG_RGB(139, 69, 19) },
+ { "salmon", NSVG_RGB(250, 128, 114) },
+ { "sandybrown", NSVG_RGB(244, 164, 96) },
+ { "seagreen", NSVG_RGB( 46, 139, 87) },
+ { "seashell", NSVG_RGB(255, 245, 238) },
+ { "sienna", NSVG_RGB(160, 82, 45) },
+ { "silver", NSVG_RGB(192, 192, 192) },
+ { "skyblue", NSVG_RGB(135, 206, 235) },
+ { "slateblue", NSVG_RGB(106, 90, 205) },
+ { "slategray", NSVG_RGB(112, 128, 144) },
+ { "slategrey", NSVG_RGB(112, 128, 144) },
+ { "snow", NSVG_RGB(255, 250, 250) },
+ { "springgreen", NSVG_RGB( 0, 255, 127) },
+ { "steelblue", NSVG_RGB( 70, 130, 180) },
+ { "tan", NSVG_RGB(210, 180, 140) },
+ { "teal", NSVG_RGB( 0, 128, 128) },
+ { "thistle", NSVG_RGB(216, 191, 216) },
+ { "tomato", NSVG_RGB(255, 99, 71) },
+ { "turquoise", NSVG_RGB( 64, 224, 208) },
+ { "violet", NSVG_RGB(238, 130, 238) },
+ { "wheat", NSVG_RGB(245, 222, 179) },
+ { "whitesmoke", NSVG_RGB(245, 245, 245) },
+ { "yellowgreen", NSVG_RGB(154, 205, 50) },
+#endif
+};
+
+static unsigned int nsvg__parseColorName(const char* str)
+{
+ int i, ncolors = sizeof(nsvg__colors) / sizeof(NSVGNamedColor);
+
+ for (i = 0; i < ncolors; i++) {
+ if (strcmp(nsvg__colors[i].name, str) == 0) {
+ return nsvg__colors[i].color;
+ }
+ }
+
+ return NSVG_RGB(128, 128, 128);
+}
+
+static unsigned int nsvg__parseColor(const char* str)
+{
+ size_t len = 0;
+ while(*str == ' ') ++str;
+ len = strlen(str);
+ if (len >= 1 && *str == '#')
+ return nsvg__parseColorHex(str);
+ else if (len >= 4 && str[0] == 'r' && str[1] == 'g' && str[2] == 'b' && str[3] == '(')
+ return nsvg__parseColorRGB(str);
+ return nsvg__parseColorName(str);
+}
+
+static float nsvg__parseOpacity(const char* str)
+{
+ float val = 0;
+ sscanf(str, "%f", &val);
+ if (val < 0.0f) val = 0.0f;
+ if (val > 1.0f) val = 1.0f;
+ return val;
+}
+
+static float nsvg__parseMiterLimit(const char* str)
+{
+ float val = 0;
+ sscanf(str, "%f", &val);
+ if (val < 0.0f) val = 0.0f;
+ return val;
+}
+
+static int nsvg__parseUnits(const char* units)
+{
+ if (units[0] == 'p' && units[1] == 'x')
+ return NSVG_UNITS_PX;
+ else if (units[0] == 'p' && units[1] == 't')
+ return NSVG_UNITS_PT;
+ else if (units[0] == 'p' && units[1] == 'c')
+ return NSVG_UNITS_PC;
+ else if (units[0] == 'm' && units[1] == 'm')
+ return NSVG_UNITS_MM;
+ else if (units[0] == 'c' && units[1] == 'm')
+ return NSVG_UNITS_CM;
+ else if (units[0] == 'i' && units[1] == 'n')
+ return NSVG_UNITS_IN;
+ else if (units[0] == '%')
+ return NSVG_UNITS_PERCENT;
+ else if (units[0] == 'e' && units[1] == 'm')
+ return NSVG_UNITS_EM;
+ else if (units[0] == 'e' && units[1] == 'x')
+ return NSVG_UNITS_EX;
+ return NSVG_UNITS_USER;
+}
+
+static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)
+{
+ NSVGcoordinate coord = {0, NSVG_UNITS_USER};
+ char units[32]="";
+ sscanf(str, "%f%s", &coord.value, units);
+ coord.units = nsvg__parseUnits(units);
+ return coord;
+}
+
+static NSVGcoordinate nsvg__coord(float v, int units)
+{
+ NSVGcoordinate coord = {v, units};
+ return coord;
+}
+
+static float nsvg__parseCoordinate(NSVGparser* p, const char* str, float orig, float length)
+{
+ NSVGcoordinate coord = nsvg__parseCoordinateRaw(str);
+ return nsvg__convertToPixels(p, coord, orig, length);
+}
+
+static int nsvg__parseTransformArgs(const char* str, float* args, int maxNa, int* na)
+{
+ const char* end;
+ const char* ptr;
+ char it[64];
+
+ *na = 0;
+ ptr = str;
+ while (*ptr && *ptr != '(') ++ptr;
+ if (*ptr == 0)
+ return 1;
+ end = ptr;
+ while (*end && *end != ')') ++end;
+ if (*end == 0)
+ return 1;
+
+ while (ptr < end) {
+ if (*ptr == '-' || *ptr == '+' || *ptr == '.' || nsvg__isdigit(*ptr)) {
+ if (*na >= maxNa) return 0;
+ ptr = nsvg__parseNumber(ptr, it, 64);
+ args[(*na)++] = (float)nsvg__atof(it);
+ } else {
+ ++ptr;
+ }
+ }
+ return (int)(end - str);
+}
+
+
+static int nsvg__parseMatrix(float* xform, const char* str)
+{
+ float t[6];
+ int na = 0;
+ int len = nsvg__parseTransformArgs(str, t, 6, &na);
+ if (na != 6) return len;
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseTranslate(float* xform, const char* str)
+{
+ float args[2];
+ float t[6];
+ int na = 0;
+ int len = nsvg__parseTransformArgs(str, args, 2, &na);
+ if (na == 1) args[1] = 0.0;
+
+ nsvg__xformSetTranslation(t, args[0], args[1]);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseScale(float* xform, const char* str)
+{
+ float args[2];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 2, &na);
+ if (na == 1) args[1] = args[0];
+ nsvg__xformSetScale(t, args[0], args[1]);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseSkewX(float* xform, const char* str)
+{
+ float args[1];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 1, &na);
+ nsvg__xformSetSkewX(t, args[0]/180.0f*NSVG_PI);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseSkewY(float* xform, const char* str)
+{
+ float args[1];
+ int na = 0;
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 1, &na);
+ nsvg__xformSetSkewY(t, args[0]/180.0f*NSVG_PI);
+ memcpy(xform, t, sizeof(float)*6);
+ return len;
+}
+
+static int nsvg__parseRotate(float* xform, const char* str)
+{
+ float args[3];
+ int na = 0;
+ float m[6];
+ float t[6];
+ int len = nsvg__parseTransformArgs(str, args, 3, &na);
+ if (na == 1)
+ args[1] = args[2] = 0.0f;
+ nsvg__xformIdentity(m);
+
+ if (na > 1) {
+ nsvg__xformSetTranslation(t, -args[1], -args[2]);
+ nsvg__xformMultiply(m, t);
+ }
+
+ nsvg__xformSetRotation(t, args[0]/180.0f*NSVG_PI);
+ nsvg__xformMultiply(m, t);
+
+ if (na > 1) {
+ nsvg__xformSetTranslation(t, args[1], args[2]);
+ nsvg__xformMultiply(m, t);
+ }
+
+ memcpy(xform, m, sizeof(float)*6);
+
+ return len;
+}
+
+static void nsvg__parseTransform(float* xform, const char* str)
+{
+ float t[6];
+ nsvg__xformIdentity(xform);
+ while (*str)
+ {
+ if (strncmp(str, "matrix", 6) == 0)
+ str += nsvg__parseMatrix(t, str);
+ else if (strncmp(str, "translate", 9) == 0)
+ str += nsvg__parseTranslate(t, str);
+ else if (strncmp(str, "scale", 5) == 0)
+ str += nsvg__parseScale(t, str);
+ else if (strncmp(str, "rotate", 6) == 0)
+ str += nsvg__parseRotate(t, str);
+ else if (strncmp(str, "skewX", 5) == 0)
+ str += nsvg__parseSkewX(t, str);
+ else if (strncmp(str, "skewY", 5) == 0)
+ str += nsvg__parseSkewY(t, str);
+ else{
+ ++str;
+ continue;
+ }
+
+ nsvg__xformPremultiply(xform, t);
+ }
+}
+
+static void nsvg__parseUrl(char* id, const char* str)
+{
+ int i = 0;
+ str += 4; // "url(";
+ if (*str == '#')
+ str++;
+ while (i < 63 && *str != ')') {
+ id[i] = *str++;
+ i++;
+ }
+ id[i] = '\0';
+}
+
+static char nsvg__parseLineCap(const char* str)
+{
+ if (strcmp(str, "butt") == 0)
+ return NSVG_CAP_BUTT;
+ else if (strcmp(str, "round") == 0)
+ return NSVG_CAP_ROUND;
+ else if (strcmp(str, "square") == 0)
+ return NSVG_CAP_SQUARE;
+ // TODO: handle inherit.
+ return NSVG_CAP_BUTT;
+}
+
+static char nsvg__parseLineJoin(const char* str)
+{
+ if (strcmp(str, "miter") == 0)
+ return NSVG_JOIN_MITER;
+ else if (strcmp(str, "round") == 0)
+ return NSVG_JOIN_ROUND;
+ else if (strcmp(str, "bevel") == 0)
+ return NSVG_JOIN_BEVEL;
+ // TODO: handle inherit.
+ return NSVG_JOIN_MITER;
+}
+
+static char nsvg__parseFillRule(const char* str)
+{
+ if (strcmp(str, "nonzero") == 0)
+ return NSVG_FILLRULE_NONZERO;
+ else if (strcmp(str, "evenodd") == 0)
+ return NSVG_FILLRULE_EVENODD;
+ // TODO: handle inherit.
+ return NSVG_FILLRULE_NONZERO;
+}
+
+static const char* nsvg__getNextDashItem(const char* s, char* it)
+{
+ int n = 0;
+ it[0] = '\0';
+ // Skip white spaces and commas
+ while (*s && (nsvg__isspace(*s) || *s == ',')) s++;
+ // Advance until whitespace, comma or end.
+ while (*s && (!nsvg__isspace(*s) && *s != ',')) {
+ if (n < 63)
+ it[n++] = *s;
+ s++;
+ }
+ it[n++] = '\0';
+ return s;
+}
+
+static int nsvg__parseStrokeDashArray(NSVGparser* p, const char* str, float* strokeDashArray)
+{
+ char item[64];
+ int count = 0, i;
+ float sum = 0.0f;
+
+ // Handle "none"
+ if (str[0] == 'n')
+ return 0;
+
+ // Parse dashes
+ while (*str) {
+ str = nsvg__getNextDashItem(str, item);
+ if (!*item) break;
+ if (count < NSVG_MAX_DASHES)
+ strokeDashArray[count++] = fabsf(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p)));
+ }
+
+ for (i = 0; i < count; i++)
+ sum += strokeDashArray[i];
+ if (sum <= 1e-6f)
+ count = 0;
+
+ return count;
+}
+
+static void nsvg__parseStyle(NSVGparser* p, const char* str);
+
+static int nsvg__parseAttr(NSVGparser* p, const char* name, const char* value)
+{
+ float xform[6];
+ NSVGattrib* attr = nsvg__getAttr(p);
+ if (!attr) return 0;
+
+ if (strcmp(name, "style") == 0) {
+ nsvg__parseStyle(p, value);
+ } else if (strcmp(name, "display") == 0) {
+ if (strcmp(value, "none") == 0)
+ attr->visible &= ~NSVG_VIS_DISPLAY;
+ // Don't reset ->visible on display:inline, one display:none hides the whole subtree
+
+ } else if (strcmp(name, "visibility") == 0) {
+ if (strcmp(value, "hidden") == 0) {
+ attr->visible &= ~NSVG_VIS_VISIBLE;
+ } else if (strcmp(value, "visible") == 0) {
+ attr->visible |= NSVG_VIS_VISIBLE;
+ }
+ } else if (strcmp(name, "fill") == 0) {
+ if (strcmp(value, "none") == 0) {
+ attr->hasFill = 0;
+ } else if (strncmp(value, "url(", 4) == 0) {
+ attr->hasFill = 2;
+ nsvg__parseUrl(attr->fillGradient, value);
+ } else {
+ attr->hasFill = 1;
+ attr->fillColor = nsvg__parseColor(value);
+ }
+ } else if (strcmp(name, "opacity") == 0) {
+ attr->opacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "fill-opacity") == 0) {
+ attr->fillOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "stroke") == 0) {
+ if (strcmp(value, "none") == 0) {
+ attr->hasStroke = 0;
+ } else if (strncmp(value, "url(", 4) == 0) {
+ attr->hasStroke = 2;
+ nsvg__parseUrl(attr->strokeGradient, value);
+ } else {
+ attr->hasStroke = 1;
+ attr->strokeColor = nsvg__parseColor(value);
+ }
+ } else if (strcmp(name, "stroke-width") == 0) {
+ attr->strokeWidth = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "stroke-dasharray") == 0) {
+ attr->strokeDashCount = nsvg__parseStrokeDashArray(p, value, attr->strokeDashArray);
+ } else if (strcmp(name, "stroke-dashoffset") == 0) {
+ attr->strokeDashOffset = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "stroke-opacity") == 0) {
+ attr->strokeOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "stroke-linecap") == 0) {
+ attr->strokeLineCap = nsvg__parseLineCap(value);
+ } else if (strcmp(name, "stroke-linejoin") == 0) {
+ attr->strokeLineJoin = nsvg__parseLineJoin(value);
+ } else if (strcmp(name, "stroke-miterlimit") == 0) {
+ attr->miterLimit = nsvg__parseMiterLimit(value);
+ } else if (strcmp(name, "fill-rule") == 0) {
+ attr->fillRule = nsvg__parseFillRule(value);
+ } else if (strcmp(name, "font-size") == 0) {
+ attr->fontSize = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p));
+ } else if (strcmp(name, "transform") == 0) {
+ nsvg__parseTransform(xform, value);
+ nsvg__xformPremultiply(attr->xform, xform);
+ } else if (strcmp(name, "stop-color") == 0) {
+ attr->stopColor = nsvg__parseColor(value);
+ } else if (strcmp(name, "stop-opacity") == 0) {
+ attr->stopOpacity = nsvg__parseOpacity(value);
+ } else if (strcmp(name, "offset") == 0) {
+ attr->stopOffset = nsvg__parseCoordinate(p, value, 0.0f, 1.0f);
+ } else if (strcmp(name, "id") == 0) {
+ strncpy(attr->id, value, 63);
+ attr->id[63] = '\0';
+ } else if (strcmp(name, "class") == 0) {
+ NSVGstyles* style = p->styles;
+ while (style) {
+ if (strcmp(style->name + 1, value) == 0) {
+ break;
+ }
+ style = style->next;
+ }
+ if (style) {
+ nsvg__parseStyle(p, style->description);
+ }
+ } else {
+ return 0;
+ }
+ return 1;
+}
+
+static int nsvg__parseNameValue(NSVGparser* p, const char* start, const char* end)
+{
+ const char* str;
+ const char* val;
+ char name[512];
+ char value[512];
+ int n;
+
+ str = start;
+ while (str < end && *str != ':') ++str;
+
+ val = str;
+
+ // Right Trim
+ while (str > start && (*str == ':' || nsvg__isspace(*str))) --str;
+ ++str;
+
+ n = (int)(str - start);
+ if (n > 511) n = 511;
+ if (n) memcpy(name, start, n);
+ name[n] = 0;
+
+ while (val < end && (*val == ':' || nsvg__isspace(*val))) ++val;
+
+ n = (int)(end - val);
+ if (n > 511) n = 511;
+ if (n) memcpy(value, val, n);
+ value[n] = 0;
+
+ return nsvg__parseAttr(p, name, value);
+}
+
+static void nsvg__parseStyle(NSVGparser* p, const char* str)
+{
+ const char* start;
+ const char* end;
+
+ while (*str) {
+ // Left Trim
+ while(*str && nsvg__isspace(*str)) ++str;
+ start = str;
+ while(*str && *str != ';') ++str;
+ end = str;
+
+ // Right Trim
+ while (end > start && (*end == ';' || nsvg__isspace(*end))) --end;
+ ++end;
+
+ nsvg__parseNameValue(p, start, end);
+ if (*str) ++str;
+ }
+}
+
+static void nsvg__parseAttribs(NSVGparser* p, const char** attr)
+{
+ int i;
+ for (i = 0; attr[i]; i += 2)
+ {
+ if (strcmp(attr[i], "style") == 0)
+ nsvg__parseStyle(p, attr[i + 1]);
+ else
+ nsvg__parseAttr(p, attr[i], attr[i + 1]);
+ }
+}
+
+static int nsvg__getArgsPerElement(char cmd)
+{
+ switch (cmd) {
+ case 'v':
+ case 'V':
+ case 'h':
+ case 'H':
+ return 1;
+ case 'm':
+ case 'M':
+ case 'l':
+ case 'L':
+ case 't':
+ case 'T':
+ return 2;
+ case 'q':
+ case 'Q':
+ case 's':
+ case 'S':
+ return 4;
+ case 'c':
+ case 'C':
+ return 6;
+ case 'a':
+ case 'A':
+ return 7;
+ }
+ return 0;
+}
+
+static void nsvg__pathMoveTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel) {
+ *cpx += args[0];
+ *cpy += args[1];
+ } else {
+ *cpx = args[0];
+ *cpy = args[1];
+ }
+ nsvg__moveTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel) {
+ *cpx += args[0];
+ *cpy += args[1];
+ } else {
+ *cpx = args[0];
+ *cpy = args[1];
+ }
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathHLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel)
+ *cpx += args[0];
+ else
+ *cpx = args[0];
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathVLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ if (rel)
+ *cpy += args[0];
+ else
+ *cpy = args[0];
+ nsvg__lineTo(p, *cpx, *cpy);
+}
+
+static void nsvg__pathCubicBezTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x2, y2, cx1, cy1, cx2, cy2;
+
+ if (rel) {
+ cx1 = *cpx + args[0];
+ cy1 = *cpy + args[1];
+ cx2 = *cpx + args[2];
+ cy2 = *cpy + args[3];
+ x2 = *cpx + args[4];
+ y2 = *cpy + args[5];
+ } else {
+ cx1 = args[0];
+ cy1 = args[1];
+ cx2 = args[2];
+ cy2 = args[3];
+ x2 = args[4];
+ y2 = args[5];
+ }
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx2;
+ *cpy2 = cy2;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathCubicBezShortTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ cx2 = *cpx + args[0];
+ cy2 = *cpy + args[1];
+ x2 = *cpx + args[2];
+ y2 = *cpy + args[3];
+ } else {
+ cx2 = args[0];
+ cy2 = args[1];
+ x2 = args[2];
+ y2 = args[3];
+ }
+
+ cx1 = 2*x1 - *cpx2;
+ cy1 = 2*y1 - *cpy2;
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx2;
+ *cpy2 = cy2;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathQuadBezTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx, cy;
+ float cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ cx = *cpx + args[0];
+ cy = *cpy + args[1];
+ x2 = *cpx + args[2];
+ y2 = *cpy + args[3];
+ } else {
+ cx = args[0];
+ cy = args[1];
+ x2 = args[2];
+ y2 = args[3];
+ }
+
+ // Convert to cubic bezier
+ cx1 = x1 + 2.0f/3.0f*(cx - x1);
+ cy1 = y1 + 2.0f/3.0f*(cy - y1);
+ cx2 = x2 + 2.0f/3.0f*(cx - x2);
+ cy2 = y2 + 2.0f/3.0f*(cy - y2);
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx;
+ *cpy2 = cy;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__pathQuadBezShortTo(NSVGparser* p, float* cpx, float* cpy,
+ float* cpx2, float* cpy2, float* args, int rel)
+{
+ float x1, y1, x2, y2, cx, cy;
+ float cx1, cy1, cx2, cy2;
+
+ x1 = *cpx;
+ y1 = *cpy;
+ if (rel) {
+ x2 = *cpx + args[0];
+ y2 = *cpy + args[1];
+ } else {
+ x2 = args[0];
+ y2 = args[1];
+ }
+
+ cx = 2*x1 - *cpx2;
+ cy = 2*y1 - *cpy2;
+
+ // Convert to cubix bezier
+ cx1 = x1 + 2.0f/3.0f*(cx - x1);
+ cy1 = y1 + 2.0f/3.0f*(cy - y1);
+ cx2 = x2 + 2.0f/3.0f*(cx - x2);
+ cy2 = y2 + 2.0f/3.0f*(cy - y2);
+
+ nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2);
+
+ *cpx2 = cx;
+ *cpy2 = cy;
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static float nsvg__sqr(float x) { return x*x; }
+static float nsvg__vmag(float x, float y) { return sqrtf(x*x + y*y); }
+
+static float nsvg__vecrat(float ux, float uy, float vx, float vy)
+{
+ return (ux*vx + uy*vy) / (nsvg__vmag(ux,uy) * nsvg__vmag(vx,vy));
+}
+
+static float nsvg__vecang(float ux, float uy, float vx, float vy)
+{
+ float r = nsvg__vecrat(ux,uy, vx,vy);
+ if (r < -1.0f) r = -1.0f;
+ if (r > 1.0f) r = 1.0f;
+ return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acosf(r);
+}
+
+static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel)
+{
+ // Ported from canvg (https://code.google.com/p/canvg/)
+ float rx, ry, rotx;
+ float x1, y1, x2, y2, cx, cy, dx, dy, d;
+ float x1p, y1p, cxp, cyp, s, sa, sb;
+ float ux, uy, vx, vy, a1, da;
+ float x, y, tanx, tany, a, px = 0, py = 0, ptanx = 0, ptany = 0, t[6];
+ float sinrx, cosrx;
+ int fa, fs;
+ int i, ndivs;
+ float hda, kappa;
+
+ rx = fabsf(args[0]); // y radius
+ ry = fabsf(args[1]); // x radius
+ rotx = args[2] / 180.0f * NSVG_PI; // x rotation angle
+ fa = fabsf(args[3]) > 1e-6 ? 1 : 0; // Large arc
+ fs = fabsf(args[4]) > 1e-6 ? 1 : 0; // Sweep direction
+ x1 = *cpx; // start point
+ y1 = *cpy;
+ if (rel) { // end point
+ x2 = *cpx + args[5];
+ y2 = *cpy + args[6];
+ } else {
+ x2 = args[5];
+ y2 = args[6];
+ }
+
+ dx = x1 - x2;
+ dy = y1 - y2;
+ d = sqrtf(dx*dx + dy*dy);
+ if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) {
+ // The arc degenerates to a line
+ nsvg__lineTo(p, x2, y2);
+ *cpx = x2;
+ *cpy = y2;
+ return;
+ }
+
+ sinrx = sinf(rotx);
+ cosrx = cosf(rotx);
+
+ // Convert to center point parameterization.
+ // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
+ // 1) Compute x1', y1'
+ x1p = cosrx * dx / 2.0f + sinrx * dy / 2.0f;
+ y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f;
+ d = nsvg__sqr(x1p)/nsvg__sqr(rx) + nsvg__sqr(y1p)/nsvg__sqr(ry);
+ if (d > 1) {
+ d = sqrtf(d);
+ rx *= d;
+ ry *= d;
+ }
+ // 2) Compute cx', cy'
+ s = 0.0f;
+ sa = nsvg__sqr(rx)*nsvg__sqr(ry) - nsvg__sqr(rx)*nsvg__sqr(y1p) - nsvg__sqr(ry)*nsvg__sqr(x1p);
+ sb = nsvg__sqr(rx)*nsvg__sqr(y1p) + nsvg__sqr(ry)*nsvg__sqr(x1p);
+ if (sa < 0.0f) sa = 0.0f;
+ if (sb > 0.0f)
+ s = sqrtf(sa / sb);
+ if (fa == fs)
+ s = -s;
+ cxp = s * rx * y1p / ry;
+ cyp = s * -ry * x1p / rx;
+
+ // 3) Compute cx,cy from cx',cy'
+ cx = (x1 + x2)/2.0f + cosrx*cxp - sinrx*cyp;
+ cy = (y1 + y2)/2.0f + sinrx*cxp + cosrx*cyp;
+
+ // 4) Calculate theta1, and delta theta.
+ ux = (x1p - cxp) / rx;
+ uy = (y1p - cyp) / ry;
+ vx = (-x1p - cxp) / rx;
+ vy = (-y1p - cyp) / ry;
+ a1 = nsvg__vecang(1.0f,0.0f, ux,uy); // Initial angle
+ da = nsvg__vecang(ux,uy, vx,vy); // Delta angle
+
+// if (vecrat(ux,uy,vx,vy) <= -1.0f) da = NSVG_PI;
+// if (vecrat(ux,uy,vx,vy) >= 1.0f) da = 0;
+
+ if (fs == 0 && da > 0)
+ da -= 2 * NSVG_PI;
+ else if (fs == 1 && da < 0)
+ da += 2 * NSVG_PI;
+
+ // Approximate the arc using cubic spline segments.
+ t[0] = cosrx; t[1] = sinrx;
+ t[2] = -sinrx; t[3] = cosrx;
+ t[4] = cx; t[5] = cy;
+
+ // Split arc into max 90 degree segments.
+ // The loop assumes an iteration per end point (including start and end), this +1.
+ ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f);
+ hda = (da / (float)ndivs) / 2.0f;
+ kappa = fabsf(4.0f / 3.0f * (1.0f - cosf(hda)) / sinf(hda));
+ if (da < 0.0f)
+ kappa = -kappa;
+
+ for (i = 0; i <= ndivs; i++) {
+ a = a1 + da * ((float)i/(float)ndivs);
+ dx = cosf(a);
+ dy = sinf(a);
+ nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); // position
+ nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); // tangent
+ if (i > 0)
+ nsvg__cubicBezTo(p, px+ptanx,py+ptany, x-tanx, y-tany, x, y);
+ px = x;
+ py = y;
+ ptanx = tanx;
+ ptany = tany;
+ }
+
+ *cpx = x2;
+ *cpy = y2;
+}
+
+static void nsvg__parsePath(NSVGparser* p, const char** attr)
+{
+ const char* s = NULL;
+ char cmd = '\0';
+ float args[10];
+ int nargs;
+ int rargs = 0;
+ float cpx, cpy, cpx2, cpy2;
+ const char* tmp[4];
+ char closedFlag;
+ int i;
+ char item[64];
+
+ for (i = 0; attr[i]; i += 2) {
+ if (strcmp(attr[i], "d") == 0) {
+ s = attr[i + 1];
+ } else {
+ tmp[0] = attr[i];
+ tmp[1] = attr[i + 1];
+ tmp[2] = 0;
+ tmp[3] = 0;
+ nsvg__parseAttribs(p, tmp);
+ }
+ }
+
+ if (s) {
+ nsvg__resetPath(p);
+ cpx = 0; cpy = 0;
+ cpx2 = 0; cpy2 = 0;
+ closedFlag = 0;
+ nargs = 0;
+
+ while (*s) {
+ s = nsvg__getNextPathItem(s, item);
+ if (!*item) break;
+ if (nsvg__isnum(item[0])) {
+ if (nargs < 10)
+ args[nargs++] = (float)nsvg__atof(item);
+ if (nargs >= rargs) {
+ switch (cmd) {
+ case 'm':
+ case 'M':
+ nsvg__pathMoveTo(p, &cpx, &cpy, args, cmd == 'm' ? 1 : 0);
+ // Moveto can be followed by multiple coordinate pairs,
+ // which should be treated as linetos.
+ cmd = (cmd == 'm') ? 'l' : 'L';
+ rargs = nsvg__getArgsPerElement(cmd);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'l':
+ case 'L':
+ nsvg__pathLineTo(p, &cpx, &cpy, args, cmd == 'l' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'H':
+ case 'h':
+ nsvg__pathHLineTo(p, &cpx, &cpy, args, cmd == 'h' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'V':
+ case 'v':
+ nsvg__pathVLineTo(p, &cpx, &cpy, args, cmd == 'v' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ case 'C':
+ case 'c':
+ nsvg__pathCubicBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'c' ? 1 : 0);
+ break;
+ case 'S':
+ case 's':
+ nsvg__pathCubicBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 's' ? 1 : 0);
+ break;
+ case 'Q':
+ case 'q':
+ nsvg__pathQuadBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'q' ? 1 : 0);
+ break;
+ case 'T':
+ case 't':
+ nsvg__pathQuadBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 't' ? 1 : 0);
+ break;
+ case 'A':
+ case 'a':
+ nsvg__pathArcTo(p, &cpx, &cpy, args, cmd == 'a' ? 1 : 0);
+ cpx2 = cpx; cpy2 = cpy;
+ break;
+ default:
+ if (nargs >= 2) {
+ cpx = args[nargs-2];
+ cpy = args[nargs-1];
+ cpx2 = cpx; cpy2 = cpy;
+ }
+ break;
+ }
+ nargs = 0;
+ }
+ } else {
+ cmd = item[0];
+ rargs = nsvg__getArgsPerElement(cmd);
+ if (cmd == 'M' || cmd == 'm') {
+ // Commit path.
+ if (p->npts > 0)
+ nsvg__addPath(p, closedFlag);
+ // Start new subpath.
+ nsvg__resetPath(p);
+ closedFlag = 0;
+ nargs = 0;
+ } else if (cmd == 'Z' || cmd == 'z') {
+ closedFlag = 1;
+ // Commit path.
+ if (p->npts > 0) {
+ // Move current point to first point
+ cpx = p->pts[0];
+ cpy = p->pts[1];
+ cpx2 = cpx; cpy2 = cpy;
+ nsvg__addPath(p, closedFlag);
+ }
+ // Start new subpath.
+ nsvg__resetPath(p);
+ nsvg__moveTo(p, cpx, cpy);
+ closedFlag = 0;
+ nargs = 0;
+ }
+ }
+ }
+ // Commit path.
+ if (p->npts)
+ nsvg__addPath(p, closedFlag);
+ }
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parseRect(NSVGparser* p, const char** attr)
+{
+ float x = 0.0f;
+ float y = 0.0f;
+ float w = 0.0f;
+ float h = 0.0f;
+ float rx = -1.0f; // marks not set
+ float ry = -1.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "x") == 0) x = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y") == 0) y = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "width") == 0) w = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p));
+ if (strcmp(attr[i], "height") == 0) h = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p));
+ if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+ if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+ }
+ }
+
+ if (rx < 0.0f && ry > 0.0f) rx = ry;
+ if (ry < 0.0f && rx > 0.0f) ry = rx;
+ if (rx < 0.0f) rx = 0.0f;
+ if (ry < 0.0f) ry = 0.0f;
+ if (rx > w/2.0f) rx = w/2.0f;
+ if (ry > h/2.0f) ry = h/2.0f;
+
+ if (w != 0.0f && h != 0.0f) {
+ nsvg__resetPath(p);
+
+ if (rx < 0.00001f || ry < 0.0001f) {
+ nsvg__moveTo(p, x, y);
+ nsvg__lineTo(p, x+w, y);
+ nsvg__lineTo(p, x+w, y+h);
+ nsvg__lineTo(p, x, y+h);
+ } else {
+ // Rounded rectangle
+ nsvg__moveTo(p, x+rx, y);
+ nsvg__lineTo(p, x+w-rx, y);
+ nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry);
+ nsvg__lineTo(p, x+w, y+h-ry);
+ nsvg__cubicBezTo(p, x+w, y+h-ry*(1-NSVG_KAPPA90), x+w-rx*(1-NSVG_KAPPA90), y+h, x+w-rx, y+h);
+ nsvg__lineTo(p, x+rx, y+h);
+ nsvg__cubicBezTo(p, x+rx*(1-NSVG_KAPPA90), y+h, x, y+h-ry*(1-NSVG_KAPPA90), x, y+h-ry);
+ nsvg__lineTo(p, x, y+ry);
+ nsvg__cubicBezTo(p, x, y+ry*(1-NSVG_KAPPA90), x+rx*(1-NSVG_KAPPA90), y, x+rx, y);
+ }
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseCircle(NSVGparser* p, const char** attr)
+{
+ float cx = 0.0f;
+ float cy = 0.0f;
+ float r = 0.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "r") == 0) r = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualLength(p)));
+ }
+ }
+
+ if (r > 0.0f) {
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, cx+r, cy);
+ nsvg__cubicBezTo(p, cx+r, cy+r*NSVG_KAPPA90, cx+r*NSVG_KAPPA90, cy+r, cx, cy+r);
+ nsvg__cubicBezTo(p, cx-r*NSVG_KAPPA90, cy+r, cx-r, cy+r*NSVG_KAPPA90, cx-r, cy);
+ nsvg__cubicBezTo(p, cx-r, cy-r*NSVG_KAPPA90, cx-r*NSVG_KAPPA90, cy-r, cx, cy-r);
+ nsvg__cubicBezTo(p, cx+r*NSVG_KAPPA90, cy-r, cx+r, cy-r*NSVG_KAPPA90, cx+r, cy);
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseEllipse(NSVGparser* p, const char** attr)
+{
+ float cx = 0.0f;
+ float cy = 0.0f;
+ float rx = 0.0f;
+ float ry = 0.0f;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)));
+ if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)));
+ }
+ }
+
+ if (rx > 0.0f && ry > 0.0f) {
+
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, cx+rx, cy);
+ nsvg__cubicBezTo(p, cx+rx, cy+ry*NSVG_KAPPA90, cx+rx*NSVG_KAPPA90, cy+ry, cx, cy+ry);
+ nsvg__cubicBezTo(p, cx-rx*NSVG_KAPPA90, cy+ry, cx-rx, cy+ry*NSVG_KAPPA90, cx-rx, cy);
+ nsvg__cubicBezTo(p, cx-rx, cy-ry*NSVG_KAPPA90, cx-rx*NSVG_KAPPA90, cy-ry, cx, cy-ry);
+ nsvg__cubicBezTo(p, cx+rx*NSVG_KAPPA90, cy-ry, cx+rx, cy-ry*NSVG_KAPPA90, cx+rx, cy);
+
+ nsvg__addPath(p, 1);
+
+ nsvg__addShape(p);
+ }
+}
+
+static void nsvg__parseLine(NSVGparser* p, const char** attr)
+{
+ float x1 = 0.0;
+ float y1 = 0.0;
+ float x2 = 0.0;
+ float y2 = 0.0;
+ int i;
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "x1") == 0) x1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y1") == 0) y1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ if (strcmp(attr[i], "x2") == 0) x2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p));
+ if (strcmp(attr[i], "y2") == 0) y2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p));
+ }
+ }
+
+ nsvg__resetPath(p);
+
+ nsvg__moveTo(p, x1, y1);
+ nsvg__lineTo(p, x2, y2);
+
+ nsvg__addPath(p, 0);
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parsePoly(NSVGparser* p, const char** attr, int closeFlag)
+{
+ int i;
+ const char* s;
+ float args[2];
+ int nargs, npts = 0;
+ char item[64];
+
+ nsvg__resetPath(p);
+
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "points") == 0) {
+ s = attr[i + 1];
+ nargs = 0;
+ while (*s) {
+ s = nsvg__getNextPathItem(s, item);
+ args[nargs++] = (float)nsvg__atof(item);
+ if (nargs >= 2) {
+ if (npts == 0)
+ nsvg__moveTo(p, args[0], args[1]);
+ else
+ nsvg__lineTo(p, args[0], args[1]);
+ nargs = 0;
+ npts++;
+ }
+ }
+ }
+ }
+ }
+
+ nsvg__addPath(p, (char)closeFlag);
+
+ nsvg__addShape(p);
+}
+
+static void nsvg__parseSVG(NSVGparser* p, const char** attr)
+{
+ int i;
+ for (i = 0; attr[i]; i += 2) {
+ if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "width") == 0) {
+ p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f);
+ } else if (strcmp(attr[i], "height") == 0) {
+ p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f);
+ } else if (strcmp(attr[i], "viewBox") == 0) {
+ sscanf(attr[i + 1], "%f%*[%%, \t]%f%*[%%, \t]%f%*[%%, \t]%f", &p->viewMinx, &p->viewMiny, &p->viewWidth, &p->viewHeight);
+ } else if (strcmp(attr[i], "preserveAspectRatio") == 0) {
+ if (strstr(attr[i + 1], "none") != 0) {
+ // No uniform scaling
+ p->alignType = NSVG_ALIGN_NONE;
+ } else {
+ // Parse X align
+ if (strstr(attr[i + 1], "xMin") != 0)
+ p->alignX = NSVG_ALIGN_MIN;
+ else if (strstr(attr[i + 1], "xMid") != 0)
+ p->alignX = NSVG_ALIGN_MID;
+ else if (strstr(attr[i + 1], "xMax") != 0)
+ p->alignX = NSVG_ALIGN_MAX;
+ // Parse X align
+ if (strstr(attr[i + 1], "yMin") != 0)
+ p->alignY = NSVG_ALIGN_MIN;
+ else if (strstr(attr[i + 1], "yMid") != 0)
+ p->alignY = NSVG_ALIGN_MID;
+ else if (strstr(attr[i + 1], "yMax") != 0)
+ p->alignY = NSVG_ALIGN_MAX;
+ // Parse meet/slice
+ p->alignType = NSVG_ALIGN_MEET;
+ if (strstr(attr[i + 1], "slice") != 0)
+ p->alignType = NSVG_ALIGN_SLICE;
+ }
+ }
+ }
+ }
+}
+
+static void nsvg__parseGradient(NSVGparser* p, const char** attr, char type)
+{
+ int i;
+ NSVGgradientData* grad = (NSVGgradientData*)NANOSVG_malloc(sizeof(NSVGgradientData));
+ if (grad == NULL) return;
+ memset(grad, 0, sizeof(NSVGgradientData));
+ grad->units = NSVG_OBJECT_SPACE;
+ grad->type = type;
+ if (grad->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ grad->linear.x1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ grad->linear.y1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ grad->linear.x2 = nsvg__coord(100.0f, NSVG_UNITS_PERCENT);
+ grad->linear.y2 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT);
+ } else if (grad->type == NSVG_PAINT_RADIAL_GRADIENT) {
+ grad->radial.cx = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ grad->radial.cy = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ grad->radial.r = nsvg__coord(50.0f, NSVG_UNITS_PERCENT);
+ }
+
+ nsvg__xformIdentity(grad->xform);
+
+ for (i = 0; attr[i]; i += 2) {
+ if (strcmp(attr[i], "id") == 0) {
+ strncpy(grad->id, attr[i+1], 63);
+ grad->id[63] = '\0';
+ } else if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) {
+ if (strcmp(attr[i], "gradientUnits") == 0) {
+ if (strcmp(attr[i+1], "objectBoundingBox") == 0)
+ grad->units = NSVG_OBJECT_SPACE;
+ else
+ grad->units = NSVG_USER_SPACE;
+ } else if (strcmp(attr[i], "gradientTransform") == 0) {
+ nsvg__parseTransform(grad->xform, attr[i + 1]);
+ } else if (strcmp(attr[i], "cx") == 0) {
+ grad->radial.cx = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "cy") == 0) {
+ grad->radial.cy = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "r") == 0) {
+ grad->radial.r = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "fx") == 0) {
+ grad->radial.fx = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "fy") == 0) {
+ grad->radial.fy = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "x1") == 0) {
+ grad->linear.x1 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "y1") == 0) {
+ grad->linear.y1 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "x2") == 0) {
+ grad->linear.x2 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "y2") == 0) {
+ grad->linear.y2 = nsvg__parseCoordinateRaw(attr[i + 1]);
+ } else if (strcmp(attr[i], "spreadMethod") == 0) {
+ if (strcmp(attr[i+1], "pad") == 0)
+ grad->spread = NSVG_SPREAD_PAD;
+ else if (strcmp(attr[i+1], "reflect") == 0)
+ grad->spread = NSVG_SPREAD_REFLECT;
+ else if (strcmp(attr[i+1], "repeat") == 0)
+ grad->spread = NSVG_SPREAD_REPEAT;
+ } else if (strcmp(attr[i], "xlink:href") == 0) {
+ const char *href = attr[i+1];
+ strncpy(grad->ref, href+1, 62);
+ grad->ref[62] = '\0';
+ }
+ }
+ }
+
+ grad->next = p->gradients;
+ p->gradients = grad;
+}
+
+static void nsvg__parseGradientStop(NSVGparser* p, const char** attr)
+{
+ NSVGattrib* curAttr = nsvg__getAttr(p);
+ NSVGgradientData* grad;
+ NSVGgradientStop* stop;
+ int i, idx;
+
+ curAttr->stopOffset = 0;
+ curAttr->stopColor = 0;
+ curAttr->stopOpacity = 1.0f;
+
+ for (i = 0; attr[i]; i += 2) {
+ nsvg__parseAttr(p, attr[i], attr[i + 1]);
+ }
+
+ // Add stop to the last gradient.
+ grad = p->gradients;
+ if (grad == NULL) return;
+
+ grad->nstops++;
+ grad->stops = (NSVGgradientStop*)NANOSVG_realloc(grad->stops, sizeof(NSVGgradientStop)*grad->nstops);
+ if (grad->stops == NULL) return;
+
+ // Insert
+ idx = grad->nstops-1;
+ for (i = 0; i < grad->nstops-1; i++) {
+ if (curAttr->stopOffset < grad->stops[i].offset) {
+ idx = i;
+ break;
+ }
+ }
+ if (idx != grad->nstops-1) {
+ for (i = grad->nstops-1; i > idx; i--)
+ grad->stops[i] = grad->stops[i-1];
+ }
+
+ stop = &grad->stops[idx];
+ stop->color = curAttr->stopColor;
+ stop->color |= (unsigned int)(curAttr->stopOpacity*255) << 24;
+ stop->offset = curAttr->stopOffset;
+}
+
+static void nsvg__startElement(void* ud, const char* el, const char** attr)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+
+ if (p->defsFlag) {
+ // Skip everything but gradients in defs
+ if (strcmp(el, "linearGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
+ } else if (strcmp(el, "radialGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
+ } else if (strcmp(el, "stop") == 0) {
+ nsvg__parseGradientStop(p, attr);
+ }
+ return;
+ }
+
+ if (strcmp(el, "g") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseAttribs(p, attr);
+ } else if (strcmp(el, "path") == 0) {
+ if (p->pathFlag) // Do not allow nested paths.
+ return;
+ nsvg__pushAttr(p);
+ nsvg__parsePath(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "rect") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseRect(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "circle") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseCircle(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "ellipse") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseEllipse(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "line") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parseLine(p, attr);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "polyline") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parsePoly(p, attr, 0);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "polygon") == 0) {
+ nsvg__pushAttr(p);
+ nsvg__parsePoly(p, attr, 1);
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "linearGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT);
+ } else if (strcmp(el, "radialGradient") == 0) {
+ nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT);
+ } else if (strcmp(el, "stop") == 0) {
+ nsvg__parseGradientStop(p, attr);
+ } else if (strcmp(el, "defs") == 0) {
+ p->defsFlag = 1;
+ } else if (strcmp(el, "svg") == 0) {
+ nsvg__parseSVG(p, attr);
+ } else if (strcmp(el, "style") == 0) {
+ p->styleFlag = 1;
+ }
+}
+
+static void nsvg__endElement(void* ud, const char* el)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+
+ if (strcmp(el, "g") == 0) {
+ nsvg__popAttr(p);
+ } else if (strcmp(el, "path") == 0) {
+ p->pathFlag = 0;
+ } else if (strcmp(el, "defs") == 0) {
+ p->defsFlag = 0;
+ } else if (strcmp(el, "style") == 0) {
+ p->styleFlag = 0;
+ }
+}
+
+static char *nsvg__strndup(const char *s, size_t n)
+{
+ char *result;
+ size_t len = strlen(s);
+
+ if (n < len)
+ len = n;
+
+ result = (char*)NANOSVG_malloc(len+1);
+ if (!result)
+ return 0;
+
+ result[len] = '\0';
+ return (char *)memcpy(result, s, len);
+}
+
+static void nsvg__content(void* ud, const char* s)
+{
+ NSVGparser* p = (NSVGparser*)ud;
+ if (p->styleFlag) {
+
+ int state = 0;
+ const char* start = NULL;
+ while (*s) {
+ char c = *s;
+ if (nsvg__isspace(c) || c == '{') {
+ if (state == 1) {
+ NSVGstyles* next = p->styles;
+
+ p->styles = (NSVGstyles*)NANOSVG_malloc(sizeof(NSVGstyles));
+ p->styles->next = next;
+ p->styles->name = nsvg__strndup(start, (size_t)(s - start));
+ start = s + 1;
+ state = 2;
+ }
+ } else if (state == 2 && c == '}') {
+ p->styles->description = nsvg__strndup(start, (size_t)(s - start));
+ state = 0;
+ }
+ else if (state == 0) {
+ start = s;
+ state = 1;
+ }
+ s++;
+ /*
+ if (*s == '{' && state == NSVG_XML_CONTENT) {
+ // Start of a tag
+ *s++ = '\0';
+ nsvg__parseContent(mark, contentCb, ud);
+ mark = s;
+ state = NSVG_XML_TAG;
+ }
+ else if (*s == '>' && state == NSVG_XML_TAG) {
+ // Start of a content or new tag.
+ *s++ = '\0';
+ nsvg__parseElement(mark, startelCb, endelCb, ud);
+ mark = s;
+ state = NSVG_XML_CONTENT;
+ }
+ else {
+ s++;
+ }
+ */
+ }
+
+ }
+}
+
+static void nsvg__imageBounds(NSVGparser* p, float* bounds)
+{
+ NSVGshape* shape;
+ shape = p->image->shapes;
+ if (shape == NULL) {
+ bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0;
+ return;
+ }
+ bounds[0] = shape->bounds[0];
+ bounds[1] = shape->bounds[1];
+ bounds[2] = shape->bounds[2];
+ bounds[3] = shape->bounds[3];
+ for (shape = shape->next; shape != NULL; shape = shape->next) {
+ bounds[0] = nsvg__minf(bounds[0], shape->bounds[0]);
+ bounds[1] = nsvg__minf(bounds[1], shape->bounds[1]);
+ bounds[2] = nsvg__maxf(bounds[2], shape->bounds[2]);
+ bounds[3] = nsvg__maxf(bounds[3], shape->bounds[3]);
+ }
+}
+
+static float nsvg__viewAlign(float content, float container, int type)
+{
+ if (type == NSVG_ALIGN_MIN)
+ return 0;
+ else if (type == NSVG_ALIGN_MAX)
+ return container - content;
+ // mid
+ return (container - content) * 0.5f;
+}
+
+static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy)
+{
+ float t[6];
+ nsvg__xformSetTranslation(t, tx, ty);
+ nsvg__xformMultiply (grad->xform, t);
+
+ nsvg__xformSetScale(t, sx, sy);
+ nsvg__xformMultiply (grad->xform, t);
+}
+
+static void nsvg__scaleToViewbox(NSVGparser* p, const char* units)
+{
+ NSVGshape* shape;
+ NSVGpath* path;
+ float tx, ty, sx, sy, us, bounds[4], t[6], avgs;
+ int i;
+ float* pt;
+
+ // Guess image size if not set completely.
+ nsvg__imageBounds(p, bounds);
+
+ if (p->viewWidth == 0) {
+ if (p->image->width > 0) {
+ p->viewWidth = p->image->width;
+ } else {
+ p->viewMinx = bounds[0];
+ p->viewWidth = bounds[2] - bounds[0];
+ }
+ }
+ if (p->viewHeight == 0) {
+ if (p->image->height > 0) {
+ p->viewHeight = p->image->height;
+ } else {
+ p->viewMiny = bounds[1];
+ p->viewHeight = bounds[3] - bounds[1];
+ }
+ }
+ if (p->image->width == 0)
+ p->image->width = p->viewWidth;
+ if (p->image->height == 0)
+ p->image->height = p->viewHeight;
+
+ tx = -p->viewMinx;
+ ty = -p->viewMiny;
+ sx = p->viewWidth > 0 ? p->image->width / p->viewWidth : 0;
+ sy = p->viewHeight > 0 ? p->image->height / p->viewHeight : 0;
+ // Unit scaling
+ us = 1.0f / nsvg__convertToPixels(p, nsvg__coord(1.0f, nsvg__parseUnits(units)), 0.0f, 1.0f);
+
+ // Fix aspect ratio
+ if (p->alignType == NSVG_ALIGN_MEET) {
+ // fit whole image into viewbox
+ sx = sy = nsvg__minf(sx, sy);
+ tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
+ ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy;
+ } else if (p->alignType == NSVG_ALIGN_SLICE) {
+ // fill whole viewbox with image
+ sx = sy = nsvg__maxf(sx, sy);
+ tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx;
+ ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy;
+ }
+
+ // Transform
+ sx *= us;
+ sy *= us;
+ avgs = (sx+sy) / 2.0f;
+ for (shape = p->image->shapes; shape != NULL; shape = shape->next) {
+ shape->bounds[0] = (shape->bounds[0] + tx) * sx;
+ shape->bounds[1] = (shape->bounds[1] + ty) * sy;
+ shape->bounds[2] = (shape->bounds[2] + tx) * sx;
+ shape->bounds[3] = (shape->bounds[3] + ty) * sy;
+ for (path = shape->paths; path != NULL; path = path->next) {
+ path->bounds[0] = (path->bounds[0] + tx) * sx;
+ path->bounds[1] = (path->bounds[1] + ty) * sy;
+ path->bounds[2] = (path->bounds[2] + tx) * sx;
+ path->bounds[3] = (path->bounds[3] + ty) * sy;
+ for (i =0; i < path->npts; i++) {
+ pt = &path->pts[i*2];
+ pt[0] = (pt[0] + tx) * sx;
+ pt[1] = (pt[1] + ty) * sy;
+ }
+ }
+
+ if (shape->fill.type == NSVG_PAINT_LINEAR_GRADIENT || shape->fill.type == NSVG_PAINT_RADIAL_GRADIENT) {
+ nsvg__scaleGradient(shape->fill.gradient, tx,ty, sx,sy);
+ memcpy(t, shape->fill.gradient->xform, sizeof(float)*6);
+ nsvg__xformInverse(shape->fill.gradient->xform, t);
+ }
+ if (shape->stroke.type == NSVG_PAINT_LINEAR_GRADIENT || shape->stroke.type == NSVG_PAINT_RADIAL_GRADIENT) {
+ nsvg__scaleGradient(shape->stroke.gradient, tx,ty, sx,sy);
+ memcpy(t, shape->stroke.gradient->xform, sizeof(float)*6);
+ nsvg__xformInverse(shape->stroke.gradient->xform, t);
+ }
+
+ shape->strokeWidth *= avgs;
+ shape->strokeDashOffset *= avgs;
+ for (i = 0; i < shape->strokeDashCount; i++)
+ shape->strokeDashArray[i] *= avgs;
+ }
+}
+
+NANOSVG_SCOPE
+NSVGimage* nsvgParse(char* input, const char* units, float dpi)
+{
+ NSVGparser* p;
+ NSVGimage* ret = 0;
+
+ p = nsvg__createParser();
+ if (p == NULL) {
+ return NULL;
+ }
+ p->dpi = dpi;
+
+ nsvg__parseXML(input, nsvg__startElement, nsvg__endElement, nsvg__content, p);
+
+ // Scale to viewBox
+ nsvg__scaleToViewbox(p, units);
+
+ ret = p->image;
+ p->image = NULL;
+
+ nsvg__deleteParser(p);
+
+ return ret;
+}
+
+NANOSVG_SCOPE
+NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi)
+{
+ FILE* fp = NULL;
+ size_t size;
+ char* data = NULL;
+ NSVGimage* image = NULL;
+
+ fp = fopen(filename, "rb");
+ if (!fp) goto error;
+ fseek(fp, 0, SEEK_END);
+ size = ftell(fp);
+ fseek(fp, 0, SEEK_SET);
+ data = (char*)NANOSVG_malloc(size+1);
+ if (data == NULL) goto error;
+ if (fread(data, 1, size, fp) != size) goto error;
+ data[size] = '\0'; // Must be null terminated.
+ fclose(fp);
+ image = nsvgParse(data, units, dpi);
+ NANOSVG_free(data);
+
+ return image;
+
+error:
+ if (fp) fclose(fp);
+ if (data) NANOSVG_free(data);
+ if (image) nsvgDelete(image);
+ return NULL;
+}
+
+NANOSVG_SCOPE
+void nsvgDelete(NSVGimage* image)
+{
+ NSVGshape *snext, *shape;
+ if (image == NULL) return;
+ shape = image->shapes;
+ while (shape != NULL) {
+ snext = shape->next;
+ nsvg__deletePaths(shape->paths);
+ nsvg__deletePaint(&shape->fill);
+ nsvg__deletePaint(&shape->stroke);
+ NANOSVG_free(shape);
+ shape = snext;
+ }
+ NANOSVG_free(image);
+}
+
+#endif
diff --git a/generic/nanosvgrast.h b/generic/nanosvgrast.h
new file mode 100644
index 0000000..37636fe
--- /dev/null
+++ b/generic/nanosvgrast.h
@@ -0,0 +1,1467 @@
+/*
+ * Copyright (c) 2013-14 Mikko Mononen memon@inside.org
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * The polygon rasterization is heavily based on stb_truetype rasterizer
+ * by Sean Barrett - http://nothings.org/
+ *
+ */
+
+#ifndef NANOSVGRAST_H
+#define NANOSVGRAST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef NANOSVG_SCOPE
+#define NANOSVG_SCOPE
+#endif
+
+#ifndef NANOSVG_malloc
+#define NANOSVG_malloc malloc
+#endif
+
+#ifndef NANOSVG_realloc
+#define NANOSVG_realloc realloc
+#endif
+
+#ifndef NANOSVG_free
+#define NANOSVG_free free
+#endif
+
+typedef struct NSVGrasterizer NSVGrasterizer;
+
+/* Example Usage:
+ // Load SVG
+ struct SNVGImage* image = nsvgParseFromFile("test.svg.");
+
+ // Create rasterizer (can be used to render multiple images).
+ struct NSVGrasterizer* rast = nsvgCreateRasterizer();
+ // Allocate memory for image
+ unsigned char* img = malloc(w*h*4);
+ // Rasterize
+ nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4);
+*/
+
+// Allocated rasterizer context.
+NANOSVG_SCOPE NSVGrasterizer* nsvgCreateRasterizer();
+
+// Rasterizes SVG image, returns RGBA image (non-premultiplied alpha)
+// r - pointer to rasterizer context
+// image - pointer to image to rasterize
+// tx,ty - image offset (applied after scaling)
+// scale - image scale
+// dst - pointer to destination image data, 4 bytes per pixel (RGBA)
+// w - width of the image to render
+// h - height of the image to render
+// stride - number of bytes per scaleline in the destination buffer
+NANOSVG_SCOPE void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride);
+
+// Deletes rasterizer context.
+NANOSVG_SCOPE void nsvgDeleteRasterizer(NSVGrasterizer*);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // NANOSVGRAST_H
+
+#ifdef NANOSVGRAST_IMPLEMENTATION
+
+#include <math.h>
+
+#define NSVG__SUBSAMPLES 5
+#define NSVG__FIXSHIFT 10
+#define NSVG__FIX (1 << NSVG__FIXSHIFT)
+#define NSVG__FIXMASK (NSVG__FIX-1)
+#define NSVG__MEMPAGE_SIZE 1024
+
+typedef struct NSVGedge {
+ float x0,y0, x1,y1;
+ int dir;
+ struct NSVGedge* next;
+} NSVGedge;
+
+typedef struct NSVGpoint {
+ float x, y;
+ float dx, dy;
+ float len;
+ float dmx, dmy;
+ unsigned char flags;
+} NSVGpoint;
+
+typedef struct NSVGactiveEdge {
+ int x,dx;
+ float ey;
+ int dir;
+ struct NSVGactiveEdge *next;
+} NSVGactiveEdge;
+
+typedef struct NSVGmemPage {
+ unsigned char mem[NSVG__MEMPAGE_SIZE];
+ int size;
+ struct NSVGmemPage* next;
+} NSVGmemPage;
+
+typedef struct NSVGcachedPaint {
+ char type;
+ char spread;
+ float xform[6];
+ unsigned int colors[256];
+} NSVGcachedPaint;
+
+struct NSVGrasterizer
+{
+ float px, py;
+
+ float tessTol;
+ float distTol;
+
+ NSVGedge* edges;
+ int nedges;
+ int cedges;
+
+ NSVGpoint* points;
+ int npoints;
+ int cpoints;
+
+ NSVGpoint* points2;
+ int npoints2;
+ int cpoints2;
+
+ NSVGactiveEdge* freelist;
+ NSVGmemPage* pages;
+ NSVGmemPage* curpage;
+
+ unsigned char* scanline;
+ int cscanline;
+
+ unsigned char* bitmap;
+ int width, height, stride;
+};
+
+NANOSVG_SCOPE
+NSVGrasterizer* nsvgCreateRasterizer()
+{
+ NSVGrasterizer* r = (NSVGrasterizer*)NANOSVG_malloc(sizeof(NSVGrasterizer));
+ if (r == NULL) goto error;
+ memset(r, 0, sizeof(NSVGrasterizer));
+
+ r->tessTol = 0.25f;
+ r->distTol = 0.01f;
+
+ return r;
+
+error:
+ nsvgDeleteRasterizer(r);
+ return NULL;
+}
+
+NANOSVG_SCOPE
+void nsvgDeleteRasterizer(NSVGrasterizer* r)
+{
+ NSVGmemPage* p;
+
+ if (r == NULL) return;
+
+ p = r->pages;
+ while (p != NULL) {
+ NSVGmemPage* next = p->next;
+ NANOSVG_free(p);
+ p = next;
+ }
+
+ if (r->edges) NANOSVG_free(r->edges);
+ if (r->points) NANOSVG_free(r->points);
+ if (r->points2) NANOSVG_free(r->points2);
+ if (r->scanline) NANOSVG_free(r->scanline);
+
+ NANOSVG_free(r);
+}
+
+static NSVGmemPage* nsvg__nextPage(NSVGrasterizer* r, NSVGmemPage* cur)
+{
+ NSVGmemPage *newp;
+
+ // If using existing chain, return the next page in chain
+ if (cur != NULL && cur->next != NULL) {
+ return cur->next;
+ }
+
+ // Alloc new page
+ newp = (NSVGmemPage*)NANOSVG_malloc(sizeof(NSVGmemPage));
+ if (newp == NULL) return NULL;
+ memset(newp, 0, sizeof(NSVGmemPage));
+
+ // Add to linked list
+ if (cur != NULL)
+ cur->next = newp;
+ else
+ r->pages = newp;
+
+ return newp;
+}
+
+static void nsvg__resetPool(NSVGrasterizer* r)
+{
+ NSVGmemPage* p = r->pages;
+ while (p != NULL) {
+ p->size = 0;
+ p = p->next;
+ }
+ r->curpage = r->pages;
+}
+
+static unsigned char* nsvg__alloc(NSVGrasterizer* r, int size)
+{
+ unsigned char* buf;
+ if (size > NSVG__MEMPAGE_SIZE) return NULL;
+ if (r->curpage == NULL || r->curpage->size+size > NSVG__MEMPAGE_SIZE) {
+ r->curpage = nsvg__nextPage(r, r->curpage);
+ }
+ buf = &r->curpage->mem[r->curpage->size];
+ r->curpage->size += size;
+ return buf;
+}
+
+static int nsvg__ptEquals(float x1, float y1, float x2, float y2, float tol)
+{
+ float dx = x2 - x1;
+ float dy = y2 - y1;
+ return dx*dx + dy*dy < tol*tol;
+}
+
+static void nsvg__addPathPoint(NSVGrasterizer* r, float x, float y, int flags)
+{
+ NSVGpoint* pt;
+
+ if (r->npoints > 0) {
+ pt = &r->points[r->npoints-1];
+ if (nsvg__ptEquals(pt->x,pt->y, x,y, r->distTol)) {
+ pt->flags = (unsigned char)(pt->flags | flags);
+ return;
+ }
+ }
+
+ if (r->npoints+1 > r->cpoints) {
+ r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64;
+ r->points = (NSVGpoint*)NANOSVG_realloc(r->points, sizeof(NSVGpoint) * r->cpoints);
+ if (r->points == NULL) return;
+ }
+
+ pt = &r->points[r->npoints];
+ pt->x = x;
+ pt->y = y;
+ pt->flags = (unsigned char)flags;
+ r->npoints++;
+}
+
+static void nsvg__appendPathPoint(NSVGrasterizer* r, NSVGpoint pt)
+{
+ if (r->npoints+1 > r->cpoints) {
+ r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64;
+ r->points = (NSVGpoint*)NANOSVG_realloc(r->points, sizeof(NSVGpoint) * r->cpoints);
+ if (r->points == NULL) return;
+ }
+ r->points[r->npoints] = pt;
+ r->npoints++;
+}
+
+static void nsvg__duplicatePoints(NSVGrasterizer* r)
+{
+ if (r->npoints > r->cpoints2) {
+ r->cpoints2 = r->npoints;
+ r->points2 = (NSVGpoint*)NANOSVG_realloc(r->points2, sizeof(NSVGpoint) * r->cpoints2);
+ if (r->points2 == NULL) return;
+ }
+
+ memcpy(r->points2, r->points, sizeof(NSVGpoint) * r->npoints);
+ r->npoints2 = r->npoints;
+}
+
+static void nsvg__addEdge(NSVGrasterizer* r, float x0, float y0, float x1, float y1)
+{
+ NSVGedge* e;
+
+ // Skip horizontal edges
+ if (y0 == y1)
+ return;
+
+ if (r->nedges+1 > r->cedges) {
+ r->cedges = r->cedges > 0 ? r->cedges * 2 : 64;
+ r->edges = (NSVGedge*)NANOSVG_realloc(r->edges, sizeof(NSVGedge) * r->cedges);
+ if (r->edges == NULL) return;
+ }
+
+ e = &r->edges[r->nedges];
+ r->nedges++;
+
+ if (y0 < y1) {
+ e->x0 = x0;
+ e->y0 = y0;
+ e->x1 = x1;
+ e->y1 = y1;
+ e->dir = 1;
+ } else {
+ e->x0 = x1;
+ e->y0 = y1;
+ e->x1 = x0;
+ e->y1 = y0;
+ e->dir = -1;
+ }
+}
+
+static float nsvg__normalize(float *x, float* y)
+{
+ float d = sqrtf((*x)*(*x) + (*y)*(*y));
+ if (d > 1e-6f) {
+ float id = 1.0f / d;
+ *x *= id;
+ *y *= id;
+ }
+ return d;
+}
+
+static float nsvg__absf(float x) { return x < 0 ? -x : x; }
+
+static void nsvg__flattenCubicBez(NSVGrasterizer* r,
+ float x1, float y1, float x2, float y2,
+ float x3, float y3, float x4, float y4,
+ int level, int type)
+{
+ float x12,y12,x23,y23,x34,y34,x123,y123,x234,y234,x1234,y1234;
+ float dx,dy,d2,d3;
+
+ if (level > 10) return;
+
+ x12 = (x1+x2)*0.5f;
+ y12 = (y1+y2)*0.5f;
+ x23 = (x2+x3)*0.5f;
+ y23 = (y2+y3)*0.5f;
+ x34 = (x3+x4)*0.5f;
+ y34 = (y3+y4)*0.5f;
+ x123 = (x12+x23)*0.5f;
+ y123 = (y12+y23)*0.5f;
+
+ dx = x4 - x1;
+ dy = y4 - y1;
+ d2 = nsvg__absf(((x2 - x4) * dy - (y2 - y4) * dx));
+ d3 = nsvg__absf(((x3 - x4) * dy - (y3 - y4) * dx));
+
+ if ((d2 + d3)*(d2 + d3) < r->tessTol * (dx*dx + dy*dy)) {
+ nsvg__addPathPoint(r, x4, y4, type);
+ return;
+ }
+
+ x234 = (x23+x34)*0.5f;
+ y234 = (y23+y34)*0.5f;
+ x1234 = (x123+x234)*0.5f;
+ y1234 = (y123+y234)*0.5f;
+
+ nsvg__flattenCubicBez(r, x1,y1, x12,y12, x123,y123, x1234,y1234, level+1, 0);
+ nsvg__flattenCubicBez(r, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type);
+}
+
+static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale)
+{
+ int i, j;
+ NSVGpath* path;
+
+ for (path = shape->paths; path != NULL; path = path->next) {
+ r->npoints = 0;
+ // Flatten path
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
+ for (i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, 0);
+ }
+ // Close path
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0);
+ // Build edges
+ for (i = 0, j = r->npoints-1; i < r->npoints; j = i++)
+ nsvg__addEdge(r, r->points[j].x, r->points[j].y, r->points[i].x, r->points[i].y);
+ }
+}
+
+enum NSVGpointFlags
+{
+ NSVG_PT_CORNER = 0x01,
+ NSVG_PT_BEVEL = 0x02,
+ NSVG_PT_LEFT = 0x04
+};
+
+static void nsvg__initClosed(NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ float len = nsvg__normalize(&dx, &dy);
+ float px = p0->x + dx*len*0.5f, py = p0->y + dy*len*0.5f;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__buttCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect)
+{
+ float w = lineWidth * 0.5f;
+ float px = p->x, py = p->y;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+
+ nsvg__addEdge(r, lx, ly, rx, ry);
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__squareCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect)
+{
+ float w = lineWidth * 0.5f;
+ float px = p->x - dx*w, py = p->y - dy*w;
+ float dlx = dy, dly = -dx;
+ float lx = px - dlx*w, ly = py - dly*w;
+ float rx = px + dlx*w, ry = py + dly*w;
+
+ nsvg__addEdge(r, lx, ly, rx, ry);
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+#ifndef NSVG_PI
+#define NSVG_PI (3.14159265358979323846264338327f)
+#endif
+
+static void nsvg__roundCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int ncap, int connect)
+{
+ int i;
+ float w = lineWidth * 0.5f;
+ float px = p->x, py = p->y;
+ float dlx = dy, dly = -dx;
+ float lx = 0, ly = 0, rx = 0, ry = 0, prevx = 0, prevy = 0;
+
+ for (i = 0; i < ncap; i++) {
+ float a = (float)i/(float)(ncap-1)*NSVG_PI;
+ float ax = cosf(a) * w, ay = sinf(a) * w;
+ float x = px - dlx*ax - dx*ay;
+ float y = py - dly*ax - dy*ay;
+
+ if (i > 0)
+ nsvg__addEdge(r, prevx, prevy, x, y);
+
+ prevx = x;
+ prevy = y;
+
+ if (i == 0) {
+ lx = x; ly = y;
+ } else if (i == ncap-1) {
+ rx = x; ry = y;
+ }
+ }
+
+ if (connect) {
+ nsvg__addEdge(r, left->x, left->y, lx, ly);
+ nsvg__addEdge(r, rx, ry, right->x, right->y);
+ }
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__bevelJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float lx0 = p1->x - (dlx0 * w), ly0 = p1->y - (dly0 * w);
+ float rx0 = p1->x + (dlx0 * w), ry0 = p1->y + (dly0 * w);
+ float lx1 = p1->x - (dlx1 * w), ly1 = p1->y - (dly1 * w);
+ float rx1 = p1->x + (dlx1 * w), ry1 = p1->y + (dly1 * w);
+
+ nsvg__addEdge(r, lx0, ly0, left->x, left->y);
+ nsvg__addEdge(r, lx1, ly1, lx0, ly0);
+
+ nsvg__addEdge(r, right->x, right->y, rx0, ry0);
+ nsvg__addEdge(r, rx0, ry0, rx1, ry1);
+
+ left->x = lx1; left->y = ly1;
+ right->x = rx1; right->y = ry1;
+}
+
+static void nsvg__miterJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float lx0, rx0, lx1, rx1;
+ float ly0, ry0, ly1, ry1;
+
+ if (p1->flags & NSVG_PT_LEFT) {
+ lx0 = lx1 = p1->x - p1->dmx * w;
+ ly0 = ly1 = p1->y - p1->dmy * w;
+ nsvg__addEdge(r, lx1, ly1, left->x, left->y);
+
+ rx0 = p1->x + (dlx0 * w);
+ ry0 = p1->y + (dly0 * w);
+ rx1 = p1->x + (dlx1 * w);
+ ry1 = p1->y + (dly1 * w);
+ nsvg__addEdge(r, right->x, right->y, rx0, ry0);
+ nsvg__addEdge(r, rx0, ry0, rx1, ry1);
+ } else {
+ lx0 = p1->x - (dlx0 * w);
+ ly0 = p1->y - (dly0 * w);
+ lx1 = p1->x - (dlx1 * w);
+ ly1 = p1->y - (dly1 * w);
+ nsvg__addEdge(r, lx0, ly0, left->x, left->y);
+ nsvg__addEdge(r, lx1, ly1, lx0, ly0);
+
+ rx0 = rx1 = p1->x + p1->dmx * w;
+ ry0 = ry1 = p1->y + p1->dmy * w;
+ nsvg__addEdge(r, right->x, right->y, rx1, ry1);
+ }
+
+ left->x = lx1; left->y = ly1;
+ right->x = rx1; right->y = ry1;
+}
+
+static void nsvg__roundJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth, int ncap)
+{
+ int i, n;
+ float w = lineWidth * 0.5f;
+ float dlx0 = p0->dy, dly0 = -p0->dx;
+ float dlx1 = p1->dy, dly1 = -p1->dx;
+ float a0 = atan2f(dly0, dlx0);
+ float a1 = atan2f(dly1, dlx1);
+ float da = a1 - a0;
+ float lx, ly, rx, ry;
+
+ if (da < NSVG_PI) da += NSVG_PI*2;
+ if (da > NSVG_PI) da -= NSVG_PI*2;
+
+ n = (int)ceilf((nsvg__absf(da) / NSVG_PI) * (float)ncap);
+ if (n < 2) n = 2;
+ if (n > ncap) n = ncap;
+
+ lx = left->x;
+ ly = left->y;
+ rx = right->x;
+ ry = right->y;
+
+ for (i = 0; i < n; i++) {
+ float u = (float)i/(float)(n-1);
+ float a = a0 + u*da;
+ float ax = cosf(a) * w, ay = sinf(a) * w;
+ float lx1 = p1->x - ax, ly1 = p1->y - ay;
+ float rx1 = p1->x + ax, ry1 = p1->y + ay;
+
+ nsvg__addEdge(r, lx1, ly1, lx, ly);
+ nsvg__addEdge(r, rx, ry, rx1, ry1);
+
+ lx = lx1; ly = ly1;
+ rx = rx1; ry = ry1;
+ }
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static void nsvg__straightJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p1, float lineWidth)
+{
+ float w = lineWidth * 0.5f;
+ float lx = p1->x - (p1->dmx * w), ly = p1->y - (p1->dmy * w);
+ float rx = p1->x + (p1->dmx * w), ry = p1->y + (p1->dmy * w);
+
+ nsvg__addEdge(r, lx, ly, left->x, left->y);
+ nsvg__addEdge(r, right->x, right->y, rx, ry);
+
+ left->x = lx; left->y = ly;
+ right->x = rx; right->y = ry;
+}
+
+static int nsvg__curveDivs(float r, float arc, float tol)
+{
+ float da = acosf(r / (r + tol)) * 2.0f;
+ int divs = (int)ceilf(arc / da);
+ if (divs < 2) divs = 2;
+ return divs;
+}
+
+static void nsvg__expandStroke(NSVGrasterizer* r, NSVGpoint* points, int npoints, int closed, int lineJoin, int lineCap, float lineWidth)
+{
+ int ncap = nsvg__curveDivs(lineWidth*0.5f, NSVG_PI, r->tessTol); // Calculate divisions per half circle.
+ NSVGpoint left = {0,0,0,0,0,0,0,0}, right = {0,0,0,0,0,0,0,0}, firstLeft = {0,0,0,0,0,0,0,0}, firstRight = {0,0,0,0,0,0,0,0};
+ NSVGpoint* p0, *p1;
+ int j, s, e;
+
+ // Build stroke edges
+ if (closed) {
+ // Looping
+ p0 = &points[npoints-1];
+ p1 = &points[0];
+ s = 0;
+ e = npoints;
+ } else {
+ // Add cap
+ p0 = &points[0];
+ p1 = &points[1];
+ s = 1;
+ e = npoints-1;
+ }
+
+ if (closed) {
+ nsvg__initClosed(&left, &right, p0, p1, lineWidth);
+ firstLeft = left;
+ firstRight = right;
+ } else {
+ // Add cap
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ nsvg__normalize(&dx, &dy);
+ if (lineCap == NSVG_CAP_BUTT)
+ nsvg__buttCap(r, &left, &right, p0, dx, dy, lineWidth, 0);
+ else if (lineCap == NSVG_CAP_SQUARE)
+ nsvg__squareCap(r, &left, &right, p0, dx, dy, lineWidth, 0);
+ else if (lineCap == NSVG_CAP_ROUND)
+ nsvg__roundCap(r, &left, &right, p0, dx, dy, lineWidth, ncap, 0);
+ }
+
+ for (j = s; j < e; ++j) {
+ if (p1->flags & NSVG_PT_CORNER) {
+ if (lineJoin == NSVG_JOIN_ROUND)
+ nsvg__roundJoin(r, &left, &right, p0, p1, lineWidth, ncap);
+ else if (lineJoin == NSVG_JOIN_BEVEL || (p1->flags & NSVG_PT_BEVEL))
+ nsvg__bevelJoin(r, &left, &right, p0, p1, lineWidth);
+ else
+ nsvg__miterJoin(r, &left, &right, p0, p1, lineWidth);
+ } else {
+ nsvg__straightJoin(r, &left, &right, p1, lineWidth);
+ }
+ p0 = p1++;
+ }
+
+ if (closed) {
+ // Loop it
+ nsvg__addEdge(r, firstLeft.x, firstLeft.y, left.x, left.y);
+ nsvg__addEdge(r, right.x, right.y, firstRight.x, firstRight.y);
+ } else {
+ // Add cap
+ float dx = p1->x - p0->x;
+ float dy = p1->y - p0->y;
+ nsvg__normalize(&dx, &dy);
+ if (lineCap == NSVG_CAP_BUTT)
+ nsvg__buttCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1);
+ else if (lineCap == NSVG_CAP_SQUARE)
+ nsvg__squareCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1);
+ else if (lineCap == NSVG_CAP_ROUND)
+ nsvg__roundCap(r, &right, &left, p1, -dx, -dy, lineWidth, ncap, 1);
+ }
+}
+
+static void nsvg__prepareStroke(NSVGrasterizer* r, float miterLimit, int lineJoin)
+{
+ int i, j;
+ NSVGpoint* p0, *p1;
+
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ for (i = 0; i < r->npoints; i++) {
+ // Calculate segment direction and length
+ p0->dx = p1->x - p0->x;
+ p0->dy = p1->y - p0->y;
+ p0->len = nsvg__normalize(&p0->dx, &p0->dy);
+ // Advance
+ p0 = p1++;
+ }
+
+ // calculate joins
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ for (j = 0; j < r->npoints; j++) {
+ float dlx0, dly0, dlx1, dly1, dmr2, cross;
+ dlx0 = p0->dy;
+ dly0 = -p0->dx;
+ dlx1 = p1->dy;
+ dly1 = -p1->dx;
+ // Calculate extrusions
+ p1->dmx = (dlx0 + dlx1) * 0.5f;
+ p1->dmy = (dly0 + dly1) * 0.5f;
+ dmr2 = p1->dmx*p1->dmx + p1->dmy*p1->dmy;
+ if (dmr2 > 0.000001f) {
+ float s2 = 1.0f / dmr2;
+ if (s2 > 600.0f) {
+ s2 = 600.0f;
+ }
+ p1->dmx *= s2;
+ p1->dmy *= s2;
+ }
+
+ // Clear flags, but keep the corner.
+ p1->flags = (p1->flags & NSVG_PT_CORNER) ? NSVG_PT_CORNER : 0;
+
+ // Keep track of left turns.
+ cross = p1->dx * p0->dy - p0->dx * p1->dy;
+ if (cross > 0.0f)
+ p1->flags |= NSVG_PT_LEFT;
+
+ // Check to see if the corner needs to be beveled.
+ if (p1->flags & NSVG_PT_CORNER) {
+ if ((dmr2 * miterLimit*miterLimit) < 1.0f || lineJoin == NSVG_JOIN_BEVEL || lineJoin == NSVG_JOIN_ROUND) {
+ p1->flags |= NSVG_PT_BEVEL;
+ }
+ }
+
+ p0 = p1++;
+ }
+}
+
+static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float scale)
+{
+ int i, j, closed;
+ NSVGpath* path;
+ NSVGpoint* p0, *p1;
+ float miterLimit = shape->miterLimit;
+ int lineJoin = shape->strokeLineJoin;
+ int lineCap = shape->strokeLineCap;
+ float lineWidth = shape->strokeWidth * scale;
+
+ for (path = shape->paths; path != NULL; path = path->next) {
+ // Flatten path
+ r->npoints = 0;
+ nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, NSVG_PT_CORNER);
+ for (i = 0; i < path->npts-1; i += 3) {
+ float* p = &path->pts[i*2];
+ nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, NSVG_PT_CORNER);
+ }
+ if (r->npoints < 2)
+ continue;
+
+ closed = path->closed;
+
+ // If the first and last points are the same, remove the last, mark as closed path.
+ p0 = &r->points[r->npoints-1];
+ p1 = &r->points[0];
+ if (nsvg__ptEquals(p0->x,p0->y, p1->x,p1->y, r->distTol)) {
+ r->npoints--;
+ p0 = &r->points[r->npoints-1];
+ closed = 1;
+ }
+
+ if (shape->strokeDashCount > 0) {
+ int idash = 0, dashState = 1;
+ float totalDist = 0, dashLen, allDashLen, dashOffset;
+ NSVGpoint cur;
+
+ if (closed)
+ nsvg__appendPathPoint(r, r->points[0]);
+
+ // Duplicate points -> points2.
+ nsvg__duplicatePoints(r);
+
+ r->npoints = 0;
+ cur = r->points2[0];
+ nsvg__appendPathPoint(r, cur);
+
+ // Figure out dash offset.
+ allDashLen = 0;
+ for (j = 0; j < shape->strokeDashCount; j++)
+ allDashLen += shape->strokeDashArray[j];
+ if (shape->strokeDashCount & 1)
+ allDashLen *= 2.0f;
+ // Find location inside pattern
+ dashOffset = fmodf(shape->strokeDashOffset, allDashLen);
+ if (dashOffset < 0.0f)
+ dashOffset += allDashLen;
+
+ while (dashOffset > shape->strokeDashArray[idash]) {
+ dashOffset -= shape->strokeDashArray[idash];
+ idash = (idash + 1) % shape->strokeDashCount;
+ }
+ dashLen = (shape->strokeDashArray[idash] - dashOffset) * scale;
+
+ for (j = 1; j < r->npoints2; ) {
+ float dx = r->points2[j].x - cur.x;
+ float dy = r->points2[j].y - cur.y;
+ float dist = sqrtf(dx*dx + dy*dy);
+
+ if ((totalDist + dist) > dashLen) {
+ // Calculate intermediate point
+ float d = (dashLen - totalDist) / dist;
+ float x = cur.x + dx * d;
+ float y = cur.y + dy * d;
+ nsvg__addPathPoint(r, x, y, NSVG_PT_CORNER);
+
+ // Stroke
+ if (r->npoints > 1 && dashState) {
+ nsvg__prepareStroke(r, miterLimit, lineJoin);
+ nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth);
+ }
+ // Advance dash pattern
+ dashState = !dashState;
+ idash = (idash+1) % shape->strokeDashCount;
+ dashLen = shape->strokeDashArray[idash] * scale;
+ // Restart
+ cur.x = x;
+ cur.y = y;
+ cur.flags = NSVG_PT_CORNER;
+ totalDist = 0.0f;
+ r->npoints = 0;
+ nsvg__appendPathPoint(r, cur);
+ } else {
+ totalDist += dist;
+ cur = r->points2[j];
+ nsvg__appendPathPoint(r, cur);
+ j++;
+ }
+ }
+ // Stroke any leftover path
+ if (r->npoints > 1 && dashState)
+ nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth);
+ } else {
+ nsvg__prepareStroke(r, miterLimit, lineJoin);
+ nsvg__expandStroke(r, r->points, r->npoints, closed, lineJoin, lineCap, lineWidth);
+ }
+ }
+}
+
+static int nsvg__cmpEdge(const void *p, const void *q)
+{
+ const NSVGedge* a = (const NSVGedge*)p;
+ const NSVGedge* b = (const NSVGedge*)q;
+
+ if (a->y0 < b->y0) return -1;
+ if (a->y0 > b->y0) return 1;
+ return 0;
+}
+
+
+static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint)
+{
+ NSVGactiveEdge* z;
+ float dxdy;
+
+ if (r->freelist != NULL) {
+ // Restore from freelist.
+ z = r->freelist;
+ r->freelist = z->next;
+ } else {
+ // Alloc new edge.
+ z = (NSVGactiveEdge*)nsvg__alloc(r, sizeof(NSVGactiveEdge));
+ if (z == NULL) return NULL;
+ }
+
+ dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
+// STBTT_assert(e->y0 <= start_point);
+ // round dx down to avoid going too far
+ if (dxdy < 0)
+ z->dx = (int)(-floorf(NSVG__FIX * -dxdy));
+ else
+ z->dx = (int)floorf(NSVG__FIX * dxdy);
+ z->x = (int)floorf(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0)));
+// z->x -= off_x * FIX;
+ z->ey = e->y1;
+ z->next = 0;
+ z->dir = e->dir;
+
+ return z;
+}
+
+static void nsvg__freeActive(NSVGrasterizer* r, NSVGactiveEdge* z)
+{
+ z->next = r->freelist;
+ r->freelist = z;
+}
+
+static void nsvg__fillScanline(unsigned char* scanline, int len, int x0, int x1, int maxWeight, int* xmin, int* xmax)
+{
+ int i = x0 >> NSVG__FIXSHIFT;
+ int j = x1 >> NSVG__FIXSHIFT;
+ if (i < *xmin) *xmin = i;
+ if (j > *xmax) *xmax = j;
+ if (i < len && j >= 0) {
+ if (i == j) {
+ // x0,x1 are the same pixel, so compute combined coverage
+ scanline[i] = (unsigned char)(scanline[i] + ((x1 - x0) * maxWeight >> NSVG__FIXSHIFT));
+ } else {
+ if (i >= 0) // add antialiasing for x0
+ scanline[i] = (unsigned char)(scanline[i] + (((NSVG__FIX - (x0 & NSVG__FIXMASK)) * maxWeight) >> NSVG__FIXSHIFT));
+ else
+ i = -1; // clip
+
+ if (j < len) // add antialiasing for x1
+ scanline[j] = (unsigned char)(scanline[j] + (((x1 & NSVG__FIXMASK) * maxWeight) >> NSVG__FIXSHIFT));
+ else
+ j = len; // clip
+
+ for (++i; i < j; ++i) // fill pixels between x0 and x1
+ scanline[i] = (unsigned char)(scanline[i] + maxWeight);
+ }
+ }
+}
+
+// note: this routine clips fills that extend off the edges... ideally this
+// wouldn't happen, but it could happen if the truetype glyph bounding boxes
+// are wrong, or if the user supplies a too-small bitmap
+static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule)
+{
+ // non-zero winding fill
+ int x0 = 0, w = 0;
+
+ if (fillRule == NSVG_FILLRULE_NONZERO) {
+ // Non-zero
+ while (e != NULL) {
+ if (w == 0) {
+ // if we're currently at zero, we need to record the edge start point
+ x0 = e->x; w += e->dir;
+ } else {
+ int x1 = e->x; w += e->dir;
+ // if we went to zero, we need to draw
+ if (w == 0)
+ nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax);
+ }
+ e = e->next;
+ }
+ } else if (fillRule == NSVG_FILLRULE_EVENODD) {
+ // Even-odd
+ while (e != NULL) {
+ if (w == 0) {
+ // if we're currently at zero, we need to record the edge start point
+ x0 = e->x; w = 1;
+ } else {
+ int x1 = e->x; w = 0;
+ nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax);
+ }
+ e = e->next;
+ }
+ }
+}
+
+static float nsvg__clampf(float a, float mn, float mx) { return a < mn ? mn : (a > mx ? mx : a); }
+
+static unsigned int nsvg__RGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
+{
+ return (r) | (g << 8) | (b << 16) | (a << 24);
+}
+
+static unsigned int nsvg__lerpRGBA(unsigned int c0, unsigned int c1, float u)
+{
+ int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f);
+ int r = (((c0) & 0xff)*(256-iu) + (((c1) & 0xff)*iu)) >> 8;
+ int g = (((c0>>8) & 0xff)*(256-iu) + (((c1>>8) & 0xff)*iu)) >> 8;
+ int b = (((c0>>16) & 0xff)*(256-iu) + (((c1>>16) & 0xff)*iu)) >> 8;
+ int a = (((c0>>24) & 0xff)*(256-iu) + (((c1>>24) & 0xff)*iu)) >> 8;
+ return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a);
+}
+
+static unsigned int nsvg__applyOpacity(unsigned int c, float u)
+{
+ int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f);
+ int r = (c) & 0xff;
+ int g = (c>>8) & 0xff;
+ int b = (c>>16) & 0xff;
+ int a = (((c>>24) & 0xff)*iu) >> 8;
+ return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a);
+}
+
+static inline int nsvg__div255(int x)
+{
+ return ((x+1) * 257) >> 16;
+}
+
+static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* cover, int x, int y,
+ float tx, float ty, float scale, NSVGcachedPaint* cache)
+{
+
+ if (cache->type == NSVG_PAINT_COLOR) {
+ int i, cr, cg, cb, ca;
+ cr = cache->colors[0] & 0xff;
+ cg = (cache->colors[0] >> 8) & 0xff;
+ cb = (cache->colors[0] >> 16) & 0xff;
+ ca = (cache->colors[0] >> 24) & 0xff;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b;
+ int a = nsvg__div255((int)cover[0] * ca);
+ int ia = 255 - a;
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ }
+ } else if (cache->type == NSVG_PAINT_LINEAR_GRADIENT) {
+ // TODO: spread modes.
+ // TODO: plenty of opportunities to optimize.
+ float fx, fy, dx, gy;
+ float* t = cache->xform;
+ int i, cr, cg, cb, ca;
+ unsigned int c;
+
+ fx = ((float)x - tx) / scale;
+ fy = ((float)y - ty) / scale;
+ dx = 1.0f / scale;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b,a,ia;
+ gy = fx*t[1] + fy*t[3] + t[5];
+ c = cache->colors[(int)nsvg__clampf(gy*255.0f, 0, 255.0f)];
+ cr = (c) & 0xff;
+ cg = (c >> 8) & 0xff;
+ cb = (c >> 16) & 0xff;
+ ca = (c >> 24) & 0xff;
+
+ a = nsvg__div255((int)cover[0] * ca);
+ ia = 255 - a;
+
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ fx += dx;
+ }
+ } else if (cache->type == NSVG_PAINT_RADIAL_GRADIENT) {
+ // TODO: spread modes.
+ // TODO: plenty of opportunities to optimize.
+ // TODO: focus (fx,fy)
+ float fx, fy, dx, gx, gy, gd;
+ float* t = cache->xform;
+ int i, cr, cg, cb, ca;
+ unsigned int c;
+
+ fx = ((float)x - tx) / scale;
+ fy = ((float)y - ty) / scale;
+ dx = 1.0f / scale;
+
+ for (i = 0; i < count; i++) {
+ int r,g,b,a,ia;
+ gx = fx*t[0] + fy*t[2] + t[4];
+ gy = fx*t[1] + fy*t[3] + t[5];
+ gd = sqrtf(gx*gx + gy*gy);
+ c = cache->colors[(int)nsvg__clampf(gd*255.0f, 0, 255.0f)];
+ cr = (c) & 0xff;
+ cg = (c >> 8) & 0xff;
+ cb = (c >> 16) & 0xff;
+ ca = (c >> 24) & 0xff;
+
+ a = nsvg__div255((int)cover[0] * ca);
+ ia = 255 - a;
+
+ // Premultiply
+ r = nsvg__div255(cr * a);
+ g = nsvg__div255(cg * a);
+ b = nsvg__div255(cb * a);
+
+ // Blend over
+ r += nsvg__div255(ia * (int)dst[0]);
+ g += nsvg__div255(ia * (int)dst[1]);
+ b += nsvg__div255(ia * (int)dst[2]);
+ a += nsvg__div255(ia * (int)dst[3]);
+
+ dst[0] = (unsigned char)r;
+ dst[1] = (unsigned char)g;
+ dst[2] = (unsigned char)b;
+ dst[3] = (unsigned char)a;
+
+ cover++;
+ dst += 4;
+ fx += dx;
+ }
+ }
+}
+
+static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float scale, NSVGcachedPaint* cache, char fillRule)
+{
+ NSVGactiveEdge *active = NULL;
+ int y, s;
+ int e = 0;
+ int maxWeight = (255 / NSVG__SUBSAMPLES); // weight per vertical scanline
+ int xmin, xmax;
+
+ for (y = 0; y < r->height; y++) {
+ memset(r->scanline, 0, r->width);
+ xmin = r->width;
+ xmax = 0;
+ for (s = 0; s < NSVG__SUBSAMPLES; ++s) {
+ // find center of pixel for this scanline
+ float scany = (float)(y*NSVG__SUBSAMPLES + s) + 0.5f;
+ NSVGactiveEdge **step = &active;
+
+ // update all active edges;
+ // remove all active edges that terminate before the center of this scanline
+ while (*step) {
+ NSVGactiveEdge *z = *step;
+ if (z->ey <= scany) {
+ *step = z->next; // delete from list
+// NSVG__assert(z->valid);
+ nsvg__freeActive(r, z);
+ } else {
+ z->x += z->dx; // advance to position for current scanline
+ step = &((*step)->next); // advance through list
+ }
+ }
+
+ // resort the list if needed
+ for (;;) {
+ int changed = 0;
+ step = &active;
+ while (*step && (*step)->next) {
+ if ((*step)->x > (*step)->next->x) {
+ NSVGactiveEdge* t = *step;
+ NSVGactiveEdge* q = t->next;
+ t->next = q->next;
+ q->next = t;
+ *step = q;
+ changed = 1;
+ }
+ step = &(*step)->next;
+ }
+ if (!changed) break;
+ }
+
+ // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline
+ while (e < r->nedges && r->edges[e].y0 <= scany) {
+ if (r->edges[e].y1 > scany) {
+ NSVGactiveEdge* z = nsvg__addActive(r, &r->edges[e], scany);
+ if (z == NULL) break;
+ // find insertion point
+ if (active == NULL) {
+ active = z;
+ } else if (z->x < active->x) {
+ // insert at front
+ z->next = active;
+ active = z;
+ } else {
+ // find thing to insert AFTER
+ NSVGactiveEdge* p = active;
+ while (p->next && p->next->x < z->x)
+ p = p->next;
+ // at this point, p->next->x is NOT < z->x
+ z->next = p->next;
+ p->next = z;
+ }
+ }
+ e++;
+ }
+
+ // now process all active edges in non-zero fashion
+ if (active != NULL)
+ nsvg__fillActiveEdges(r->scanline, r->width, active, maxWeight, &xmin, &xmax, fillRule);
+ }
+ // Blit
+ if (xmin < 0) xmin = 0;
+ if (xmax > r->width-1) xmax = r->width-1;
+ if (xmin <= xmax) {
+ nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, scale, cache);
+ }
+ }
+
+}
+
+static void nsvg__unpremultiplyAlpha(unsigned char* image, int w, int h, int stride)
+{
+ int x,y;
+
+ // Unpremultiply
+ for (y = 0; y < h; y++) {
+ unsigned char *row = &image[y*stride];
+ for (x = 0; x < w; x++) {
+ int r = row[0], g = row[1], b = row[2], a = row[3];
+ if (a != 0) {
+ row[0] = (unsigned char)(r*255/a);
+ row[1] = (unsigned char)(g*255/a);
+ row[2] = (unsigned char)(b*255/a);
+ }
+ row += 4;
+ }
+ }
+
+ // Defringe
+ for (y = 0; y < h; y++) {
+ unsigned char *row = &image[y*stride];
+ for (x = 0; x < w; x++) {
+ int r = 0, g = 0, b = 0, a = row[3], n = 0;
+ if (a == 0) {
+ if (x-1 > 0 && row[-1] != 0) {
+ r += row[-4];
+ g += row[-3];
+ b += row[-2];
+ n++;
+ }
+ if (x+1 < w && row[7] != 0) {
+ r += row[4];
+ g += row[5];
+ b += row[6];
+ n++;
+ }
+ if (y-1 > 0 && row[-stride+3] != 0) {
+ r += row[-stride];
+ g += row[-stride+1];
+ b += row[-stride+2];
+ n++;
+ }
+ if (y+1 < h && row[stride+3] != 0) {
+ r += row[stride];
+ g += row[stride+1];
+ b += row[stride+2];
+ n++;
+ }
+ if (n > 0) {
+ row[0] = (unsigned char)(r/n);
+ row[1] = (unsigned char)(g/n);
+ row[2] = (unsigned char)(b/n);
+ }
+ }
+ row += 4;
+ }
+ }
+}
+
+
+static void nsvg__initPaint(NSVGcachedPaint* cache, NSVGpaint* paint, float opacity)
+{
+ int i, j;
+ NSVGgradient* grad;
+
+ cache->type = paint->type;
+
+ if (paint->type == NSVG_PAINT_COLOR) {
+ cache->colors[0] = nsvg__applyOpacity(paint->color, opacity);
+ return;
+ }
+
+ grad = paint->gradient;
+
+ cache->spread = grad->spread;
+ memcpy(cache->xform, grad->xform, sizeof(float)*6);
+
+ if (grad->nstops == 0) {
+ for (i = 0; i < 256; i++)
+ cache->colors[i] = 0;
+ } if (grad->nstops == 1) {
+ for (i = 0; i < 256; i++)
+ cache->colors[i] = nsvg__applyOpacity(grad->stops[i].color, opacity);
+ } else {
+ unsigned int ca, cb = 0;
+ float ua, ub, du, u;
+ int ia, ib, count;
+
+ ca = nsvg__applyOpacity(grad->stops[0].color, opacity);
+ ua = nsvg__clampf(grad->stops[0].offset, 0, 1);
+ ub = nsvg__clampf(grad->stops[grad->nstops-1].offset, ua, 1);
+ ia = (int)(ua * 255.0f);
+ ib = (int)(ub * 255.0f);
+ for (i = 0; i < ia; i++) {
+ cache->colors[i] = ca;
+ }
+
+ for (i = 0; i < grad->nstops-1; i++) {
+ ca = nsvg__applyOpacity(grad->stops[i].color, opacity);
+ cb = nsvg__applyOpacity(grad->stops[i+1].color, opacity);
+ ua = nsvg__clampf(grad->stops[i].offset, 0, 1);
+ ub = nsvg__clampf(grad->stops[i+1].offset, 0, 1);
+ ia = (int)(ua * 255.0f);
+ ib = (int)(ub * 255.0f);
+ count = ib - ia;
+ if (count <= 0) continue;
+ u = 0;
+ du = 1.0f / (float)count;
+ for (j = 0; j < count; j++) {
+ cache->colors[ia+j] = nsvg__lerpRGBA(ca,cb,u);
+ u += du;
+ }
+ }
+
+ for (i = ib; i < 256; i++)
+ cache->colors[i] = cb;
+ }
+
+}
+
+/*
+static void dumpEdges(NSVGrasterizer* r, const char* name)
+{
+ float xmin = 0, xmax = 0, ymin = 0, ymax = 0;
+ NSVGedge *e = NULL;
+ int i;
+ if (r->nedges == 0) return;
+ FILE* fp = fopen(name, "w");
+ if (fp == NULL) return;
+
+ xmin = xmax = r->edges[0].x0;
+ ymin = ymax = r->edges[0].y0;
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ xmin = nsvg__minf(xmin, e->x0);
+ xmin = nsvg__minf(xmin, e->x1);
+ xmax = nsvg__maxf(xmax, e->x0);
+ xmax = nsvg__maxf(xmax, e->x1);
+ ymin = nsvg__minf(ymin, e->y0);
+ ymin = nsvg__minf(ymin, e->y1);
+ ymax = nsvg__maxf(ymax, e->y0);
+ ymax = nsvg__maxf(ymax, e->y1);
+ }
+
+ fprintf(fp, "<svg viewBox=\"%f %f %f %f\" xmlns=\"http://www.w3.org/2000/svg\">", xmin, ymin, (xmax - xmin), (ymax - ymin));
+
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ fprintf(fp ,"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:#000;\" />", e->x0,e->y0, e->x1,e->y1);
+ }
+
+ for (i = 0; i < r->npoints; i++) {
+ if (i+1 < r->npoints)
+ fprintf(fp ,"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:#f00;\" />", r->points[i].x, r->points[i].y, r->points[i+1].x, r->points[i+1].y);
+ fprintf(fp ,"<circle cx=\"%f\" cy=\"%f\" r=\"1\" style=\"fill:%s;\" />", r->points[i].x, r->points[i].y, r->points[i].flags == 0 ? "#f00" : "#0f0");
+ }
+
+ fprintf(fp, "</svg>");
+ fclose(fp);
+}
+*/
+
+NANOSVG_SCOPE
+void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride)
+{
+ NSVGshape *shape = NULL;
+ NSVGedge *e = NULL;
+ NSVGcachedPaint cache;
+ int i;
+
+ r->bitmap = dst;
+ r->width = w;
+ r->height = h;
+ r->stride = stride;
+
+ if (w > r->cscanline) {
+ r->cscanline = w;
+ r->scanline = (unsigned char*)NANOSVG_realloc(r->scanline, w);
+ if (r->scanline == NULL) return;
+ }
+
+ for (i = 0; i < h; i++)
+ memset(&dst[i*stride], 0, w*4);
+
+ for (shape = image->shapes; shape != NULL; shape = shape->next) {
+ if (!(shape->flags & NSVG_FLAGS_VISIBLE))
+ continue;
+
+ if (shape->fill.type != NSVG_PAINT_NONE) {
+ nsvg__resetPool(r);
+ r->freelist = NULL;
+ r->nedges = 0;
+
+ nsvg__flattenShape(r, shape, scale);
+
+ // Scale and translate edges
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ e->x0 = tx + e->x0;
+ e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES;
+ e->x1 = tx + e->x1;
+ e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES;
+ }
+
+ // Rasterize edges
+ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge);
+
+ // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ nsvg__initPaint(&cache, &shape->fill, shape->opacity);
+
+ nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, shape->fillRule);
+ }
+ if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * scale) > 0.01f) {
+ nsvg__resetPool(r);
+ r->freelist = NULL;
+ r->nedges = 0;
+
+ nsvg__flattenShapeStroke(r, shape, scale);
+
+// dumpEdges(r, "edge.svg");
+
+ // Scale and translate edges
+ for (i = 0; i < r->nedges; i++) {
+ e = &r->edges[i];
+ e->x0 = tx + e->x0;
+ e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES;
+ e->x1 = tx + e->x1;
+ e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES;
+ }
+
+ // Rasterize edges
+ qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge);
+
+ // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule
+ nsvg__initPaint(&cache, &shape->stroke, shape->opacity);
+
+ nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, NSVG_FILLRULE_NONZERO);
+ }
+ }
+
+ nsvg__unpremultiplyAlpha(dst, w, h, stride);
+
+ r->bitmap = NULL;
+ r->width = 0;
+ r->height = 0;
+ r->stride = 0;
+}
+
+#endif
diff --git a/generic/tk.decls b/generic/tk.decls
index 9ceb3af..9619416 100644
--- a/generic/tk.decls
+++ b/generic/tk.decls
@@ -105,7 +105,7 @@ declare 18 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 19 {
- CONST86 char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 20 {
@@ -146,7 +146,7 @@ declare 28 {
declare 29 {
int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- int argc, CONST84 char **argv, char *widgRec,
+ int argc, const char **argv, char *widgRec,
int flags)
}
declare 30 {
@@ -245,7 +245,7 @@ declare 54 {
void Tk_DestroyWindow(Tk_Window tkwin)
}
declare 55 {
- CONST84_RETURN char *Tk_DisplayName(Tk_Window tkwin)
+ const char *Tk_DisplayName(Tk_Window tkwin)
}
declare 56 {
int Tk_DistanceToTextLayout(Tk_TextLayout layout, int x, int y)
@@ -326,7 +326,7 @@ declare 75 {
declare 76 {
void Tk_FreeTextLayout(Tk_TextLayout textLayout)
}
-declare 77 {
+declare 77 {deprecated {function does nothing, call can be removed}} {
void Tk_FreeXId(Display *display, XID xid)
}
declare 78 {
@@ -348,10 +348,10 @@ declare 82 {
const char *str, Tk_Anchor *anchorPtr)
}
declare 83 {
- CONST84_RETURN char *Tk_GetAtomName(Tk_Window tkwin, Atom atom)
+ const char *Tk_GetAtomName(Tk_Window tkwin, Atom atom)
}
declare 84 {
- CONST84_RETURN char *Tk_GetBinding(Tcl_Interp *interp,
+ const char *Tk_GetBinding(Tcl_Interp *interp,
Tk_BindingTable bindingTable, ClientData object,
const char *eventStr)
}
@@ -404,7 +404,7 @@ declare 97 {
}
declare 98 {
ClientData Tk_GetImageMasterData(Tcl_Interp *interp,
- const char *name, CONST86 Tk_ImageType **typePtrPtr)
+ const char *name, const Tk_ImageType **typePtrPtr)
}
declare 99 {
Tk_ItemType *Tk_GetItemTypes(void)
@@ -439,7 +439,7 @@ declare 107 {
}
declare 108 {
int Tk_GetScrollInfo(Tcl_Interp *interp,
- int argc, CONST84 char **argv, double *dblPtr, int *intPtr)
+ int argc, const char **argv, double *dblPtr, int *intPtr)
}
declare 109 {
int Tk_GetScreenMM(Tcl_Interp *interp,
@@ -518,37 +518,37 @@ declare 129 {
void Tk_MoveToplevelWindow(Tk_Window tkwin, int x, int y)
}
declare 130 {
- CONST84_RETURN char *Tk_NameOf3DBorder(Tk_3DBorder border)
+ const char *Tk_NameOf3DBorder(Tk_3DBorder border)
}
declare 131 {
- CONST84_RETURN char *Tk_NameOfAnchor(Tk_Anchor anchor)
+ const char *Tk_NameOfAnchor(Tk_Anchor anchor)
}
declare 132 {
- CONST84_RETURN char *Tk_NameOfBitmap(Display *display, Pixmap bitmap)
+ const char *Tk_NameOfBitmap(Display *display, Pixmap bitmap)
}
declare 133 {
- CONST84_RETURN char *Tk_NameOfCapStyle(int cap)
+ const char *Tk_NameOfCapStyle(int cap)
}
declare 134 {
- CONST84_RETURN char *Tk_NameOfColor(XColor *colorPtr)
+ const char *Tk_NameOfColor(XColor *colorPtr)
}
declare 135 {
- CONST84_RETURN char *Tk_NameOfCursor(Display *display, Tk_Cursor cursor)
+ const char *Tk_NameOfCursor(Display *display, Tk_Cursor cursor)
}
declare 136 {
- CONST84_RETURN char *Tk_NameOfFont(Tk_Font font)
+ const char *Tk_NameOfFont(Tk_Font font)
}
declare 137 {
- CONST84_RETURN char *Tk_NameOfImage(Tk_ImageMaster imageMaster)
+ const char *Tk_NameOfImage(Tk_ImageMaster imageMaster)
}
declare 138 {
- CONST84_RETURN char *Tk_NameOfJoinStyle(int join)
+ const char *Tk_NameOfJoinStyle(int join)
}
declare 139 {
- CONST84_RETURN char *Tk_NameOfJustify(Tk_Justify justify)
+ const char *Tk_NameOfJustify(Tk_Justify justify)
}
declare 140 {
- CONST84_RETURN char *Tk_NameOfRelief(int relief)
+ const char *Tk_NameOfRelief(int relief)
}
declare 141 {
Tk_Window Tk_NameToWindow(Tcl_Interp *interp,
@@ -561,15 +561,15 @@ declare 142 {
}
declare 143 {
int Tk_ParseArgv(Tcl_Interp *interp,
- Tk_Window tkwin, int *argcPtr, CONST84 char **argv,
+ Tk_Window tkwin, int *argcPtr, const char **argv,
const Tk_ArgvInfo *argTable, int flags)
}
-declare 144 {
+declare 144 {deprecated {function signature changed}} {
void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height)
}
-declare 145 {
+declare 145 {deprecated {function signature changed}} {
void Tk_PhotoPutZoomedBlock_NoComposite(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int zoomX, int zoomY,
@@ -581,13 +581,13 @@ declare 146 {
declare 147 {
void Tk_PhotoBlank(Tk_PhotoHandle handle)
}
-declare 148 {
+declare 148 {deprecated {function signature changed}} {
void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle, int width, int height )
}
declare 149 {
void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr)
}
-declare 150 {
+declare 150 {deprecated {function signature changed}} {
void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle, int width, int height)
}
declare 151 {
@@ -744,7 +744,7 @@ declare 194 {
void Tk_FreeColorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr)
}
declare 195 {
- void Tk_FreeConfigOptions(char *recordPtr, Tk_OptionTable optionToken,
+ void Tk_FreeConfigOptions(void *recordPtr, Tk_OptionTable optionToken,
Tk_Window tkwin)
}
declare 196 {
@@ -774,11 +774,11 @@ declare 203 {
}
declare 204 {
Tcl_Obj *Tk_GetOptionInfo(Tcl_Interp *interp,
- char *recordPtr, Tk_OptionTable optionTable,
+ void *recordPtr, Tk_OptionTable optionTable,
Tcl_Obj *namePtr, Tk_Window tkwin)
}
declare 205 {
- Tcl_Obj *Tk_GetOptionValue(Tcl_Interp *interp, char *recordPtr,
+ Tcl_Obj *Tk_GetOptionValue(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionTable, Tcl_Obj *namePtr, Tk_Window tkwin)
}
declare 206 {
@@ -802,10 +802,10 @@ declare 210 {
int objc, Tcl_Obj *const objv[], double *dblPtr, int *intPtr)
}
declare 211 {
- int Tk_InitOptions(Tcl_Interp *interp, char *recordPtr,
+ int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionToken, Tk_Window tkwin)
}
-declare 212 {
+declare 212 {nostub {Don't use this function in a stub-enabled extension}} {
void Tk_MainEx(int argc, char **argv, Tcl_AppInitProc *appInitProc,
Tcl_Interp *interp)
}
@@ -813,7 +813,7 @@ declare 213 {
void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr)
}
declare 214 {
- int Tk_SetOptions(Tcl_Interp *interp, char *recordPtr,
+ int Tk_SetOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionTable, int objc,
Tcl_Obj *const objv[], Tk_Window tkwin,
Tk_SavedOptions *savePtr, int *maskPtr)
@@ -943,12 +943,12 @@ declare 244 {
declare 245 {
void Tk_SetCaretPos(Tk_Window tkwin, int x, int y, int height)
}
-declare 246 {
+declare 246 {deprecated {function signature changed}} {
void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int compRule)
}
-declare 247 {
+declare 247 {deprecated {function signature changed}} {
void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int zoomX, int zoomY,
@@ -1001,22 +1001,22 @@ declare 260 {
}
declare 261 {
void Tk_GetElementSize(Tk_Style style, Tk_StyledElement element,
- char *recordPtr, Tk_Window tkwin, int width, int height,
+ void *recordPtr, Tk_Window tkwin, int width, int height,
int inner, int *widthPtr, int *heightPtr)
}
declare 262 {
void Tk_GetElementBox(Tk_Style style, Tk_StyledElement element,
- char *recordPtr, Tk_Window tkwin, int x, int y, int width,
+ void *recordPtr, Tk_Window tkwin, int x, int y, int width,
int height, int inner, int *xPtr, int *yPtr, int *widthPtr,
int *heightPtr)
}
declare 263 {
int Tk_GetElementBorderWidth(Tk_Style style, Tk_StyledElement element,
- char *recordPtr, Tk_Window tkwin)
+ void *recordPtr, Tk_Window tkwin)
}
declare 264 {
void Tk_DrawElement(Tk_Style style, Tk_StyledElement element,
- char *recordPtr, Tk_Window tkwin, Drawable d, int x, int y,
+ void *recordPtr, Tk_Window tkwin, Drawable d, int x, int y,
int width, int height, int state)
}
@@ -1148,6 +1148,14 @@ export {
const char *Tk_PkgInitStubsCheck(Tcl_Interp *interp, const char *version,
int exact)
}
+export {
+ void Tk_MainEx(int argc, char **argv, Tcl_AppInitProc *appInitProc,
+ Tcl_Interp *interp)
+}
+export {
+ void Tk_MainExW(int argc, wchar_t **argv,
+ Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
+}
# Local Variables:
# mode: tcl
diff --git a/generic/tk.h b/generic/tk.h
index ce5902d..e4d78e3 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,17 +17,10 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 6)
-# error Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better
+#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
+# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
#endif
-#ifndef CONST84
-# define CONST84 const
-# define CONST84_RETURN const
-#endif
-#ifndef CONST86
-# define CONST86 CONST84
-#endif
#ifndef EXTERN
# define EXTERN extern TCL_STORAGE_CLASS
#endif
@@ -59,8 +52,8 @@ extern "C" {
* and update the version numbers:
*
* library/tk.tcl (1 LOC patch)
- * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
- * win/configure.in (as above)
+ * unix/configure.ac (2 LOC Major, 2 LOC minor, 1 LOC patch)
+ * win/configure.ac (as above)
* README (sections 0 and 1)
* macosx/Tk-Common.xcconfig (not patchlevel) 1 LOC
* win/README (not patchlevel)
@@ -73,12 +66,12 @@ extern "C" {
*/
#define TK_MAJOR_VERSION 8
-#define TK_MINOR_VERSION 6
-#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
-#define TK_RELEASE_SERIAL 10
+#define TK_MINOR_VERSION 7
+#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
+#define TK_RELEASE_SERIAL 3
-#define TK_VERSION "8.6"
-#define TK_PATCH_LEVEL "8.6.10"
+#define TK_VERSION "8.7"
+#define TK_PATCH_LEVEL "8.7a3"
/*
* A special definition used to allow this header file to be included from
@@ -106,6 +99,10 @@ extern "C" {
#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifndef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
#endif
/*
@@ -114,7 +111,7 @@ extern "C" {
* Decide whether or not to use input methods.
*/
-#ifdef XNQueryInputStyle
+#if defined(XNQueryInputStyle) && !defined(_WIN32) && !defined(MAC_OSX_TK)
#define TK_USE_INPUT_METHODS
#endif
@@ -191,20 +188,25 @@ typedef struct Tk_OptionSpec {
const char *defValue; /* Default value for option if not specified
* in command line, the option database, or
* the system. */
- int objOffset; /* Where in record to store a Tcl_Obj * that
+#if TCL_MAJOR_VERSION > 8
+ size_t objOffset; /* Where in record to store a Tcl_Obj * that
* holds the value of this option, specified
* as an offset in bytes from the start of the
- * record. Use the Tk_Offset macro to generate
+ * record. Use the offsetof macro to generate
* values for this. -1 means don't store the
* Tcl_Obj in the record. */
- int internalOffset; /* Where in record to store the internal
+ size_t internalOffset; /* Where in record to store the internal
* representation of the value of this option,
* such as an int or XColor *. This field is
* specified as an offset in bytes from the
- * start of the record. Use the Tk_Offset
+ * start of the record. Use the offsetof
* macro to generate values for it. -1 means
* don't store the internal representation in
* the record. */
+#else
+ int objOffset;
+ int internalOffset;
+#endif
int flags; /* Any combination of the values defined
* below. */
const void *clientData; /* An alternate place to put option-specific
@@ -267,7 +269,9 @@ typedef struct Tk_ObjCustomOption {
* Computes number of bytes from beginning of structure to a given field.
*/
-#define Tk_Offset(type, field) ((int) offsetof(type, field))
+#ifndef TK_NO_DEPRECATED
+# define Tk_Offset(type, field) ((int) offsetof(type, field))
+#endif
/* Workaround for platforms missing offsetof(), e.g. VC++ 6.0 */
#ifndef offsetof
# define offsetof(type, field) ((size_t) ((char *) &((type *) 0)->field))
@@ -291,7 +295,7 @@ typedef struct Tk_SavedOption {
double internalForm; /* The old value of the option, in some
* internal representation such as an int or
* (XColor *). Valid only if the field
- * optionPtr->specPtr->objOffset is < 0. The
+ * optionPtr->specPtr->objOffset is -1. The
* space must be large enough to accommodate a
* double, a long, or a pointer; right now it
* looks like a double (i.e., 8 bytes) is big
@@ -307,11 +311,15 @@ typedef struct Tk_SavedOption {
#endif
typedef struct Tk_SavedOptions {
- char *recordPtr; /* The data structure in which to restore
+ void *recordPtr; /* The data structure in which to restore
* configuration options. */
Tk_Window tkwin; /* Window associated with recordPtr; needed to
* restore certain options. */
- int numItems; /* The number of valid items in items field. */
+#if TCL_MAJOR_VERSION > 8
+ size_t numItems; /* The number of valid items in items field. */
+#else
+ int numItems;
+#endif
Tk_SavedOption items[TK_NUM_SAVED_OPTIONS];
/* Items used to hold old values. */
struct Tk_SavedOptions *nextPtr;
@@ -336,8 +344,8 @@ typedef struct Tk_SavedOptions {
#ifndef __NO_OLD_CONFIG
typedef int (Tk_OptionParseProc) (ClientData clientData, Tcl_Interp *interp,
- Tk_Window tkwin, CONST84 char *value, char *widgRec, int offset);
-typedef CONST86 char *(Tk_OptionPrintProc) (ClientData clientData,
+ Tk_Window tkwin, const char *value, char *widgRec, int offset);
+typedef const char *(Tk_OptionPrintProc) (ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr);
typedef struct Tk_CustomOption {
@@ -363,19 +371,23 @@ typedef struct Tk_ConfigSpec {
int type; /* Type of option, such as TK_CONFIG_COLOR;
* see definitions below. Last option in table
* must have type TK_CONFIG_END. */
- CONST86 char *argvName; /* Switch used to specify option in argv. NULL
+ const char *argvName; /* Switch used to specify option in argv. NULL
* means this spec is part of a group. */
Tk_Uid dbName; /* Name for option in option database. */
Tk_Uid dbClass; /* Class for option in database. */
Tk_Uid defValue; /* Default value for option if not specified
* in command line or database. */
- int offset; /* Where in widget record to store value; use
- * Tk_Offset macro to generate values for
+#if TCL_MAJOR_VERSION > 8
+ size_t offset; /* Where in widget record to store value; use
+ * offsetof macro to generate values for
* this. */
+#else
+ int offset;
+#endif
int specFlags; /* Any combination of the values defined
* below; other bits are used internally by
* tkConfig.c. */
- CONST86 Tk_CustomOption *customPtr;
+ const Tk_CustomOption *customPtr;
/* If type is TK_CONFIG_CUSTOM then this is a
* pointer to info about how to parse and
* print the option. Otherwise it is
@@ -415,7 +427,9 @@ typedef enum {
#define TK_CONFIG_COLOR_ONLY (1 << 1)
#define TK_CONFIG_MONO_ONLY (1 << 2)
#define TK_CONFIG_DONT_SET_DEFAULT (1 << 3)
-#define TK_CONFIG_OPTION_SPECIFIED (1 << 4)
+#ifndef TK_NO_DEPRECATED
+# define TK_CONFIG_OPTION_SPECIFIED (1 << 4)
+#endif /* !TK_NO_DEPRECATED */
#define TK_CONFIG_USER_BIT 0x100
#endif /* __NO_OLD_CONFIG */
@@ -424,14 +438,14 @@ typedef enum {
*/
typedef struct {
- CONST86 char *key; /* The key string that flags the option in the
+ const char *key; /* The key string that flags the option in the
* argv array. */
int type; /* Indicates option type; see below. */
- char *src; /* Value to be used in setting dst; usage
+ void *src; /* Value to be used in setting dst; usage
* depends on type. */
- char *dst; /* Address of value to be modified; usage
+ void *dst; /* Address of value to be modified; usage
* depends on type. */
- CONST86 char *help; /* Documentation message describing this
+ const char *help; /* Documentation message describing this
* option. */
} Tk_ArgvInfo;
@@ -576,7 +590,11 @@ typedef void (Tk_ClassWorldChangedProc) (ClientData instanceData);
typedef void (Tk_ClassModalProc) (Tk_Window tkwin, XEvent *eventPtr);
typedef struct Tk_ClassProcs {
+#if TCL_MAJOR_VERSION > 8
+ size_t size;
+#else
unsigned int size;
+#endif
Tk_ClassWorldChangedProc *worldChangedProc;
/* Procedure to invoke when the widget needs
* to respond in some way to a change in the
@@ -601,12 +619,12 @@ typedef struct Tk_ClassProcs {
*
* #define Tk_GetField(name, who, which) \
* (((who) == NULL) ? NULL :
- * (((who)->size <= Tk_Offset(name, which)) ? NULL :(name)->which))
+ * (((who)->size <= offsetof(name, which)) ? NULL :(name)->which))
*/
#define Tk_GetClassProc(procs, which) \
(((procs) == NULL) ? NULL : \
- (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which))
+ (((procs)->size <= offsetof(Tk_ClassProcs, which)) ? NULL:(procs)->which))
/*
* Each geometry manager (the packer, the placer, etc.) is represented by a
@@ -747,9 +765,10 @@ typedef XActivateDeactivateEvent XDeactivateEvent;
(((Tk_FakeWin *) (tkwin))->flags & TK_WM_MANAGEABLE)
#define Tk_ReqWidth(tkwin) (((Tk_FakeWin *) (tkwin))->reqWidth)
#define Tk_ReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->reqHeight)
-/* Tk_InternalBorderWidth is deprecated */
+#ifndef TK_NO_DEPRECATED
#define Tk_InternalBorderWidth(tkwin) \
(((Tk_FakeWin *) (tkwin))->internalBorderLeft)
+#endif /* !TK_NO_DEPRECATED */
#define Tk_InternalBorderLeft(tkwin) \
(((Tk_FakeWin *) (tkwin))->internalBorderLeft)
#define Tk_InternalBorderRight(tkwin) \
@@ -794,7 +813,7 @@ typedef struct Tk_FakeWin {
unsigned long dummy7; /* dirtyAtts */
unsigned int flags;
char *dummy8; /* handlerList */
-#ifdef TK_USE_INPUT_METHODS
+#if defined(TK_USE_INPUT_METHODS) || (TCL_MAJOR_VERSION > 8)
XIC dummy9; /* inputContext */
#endif /* TK_USE_INPUT_METHODS */
ClientData *dummy10; /* tagPtr */
@@ -814,11 +833,15 @@ typedef struct Tk_FakeWin {
int internalBorderBottom;
int minReqWidth;
int minReqHeight;
-#ifdef TK_USE_INPUT_METHODS
+#if defined(TK_USE_INPUT_METHODS) || (TCL_MAJOR_VERSION > 8)
int dummy20;
#endif /* TK_USE_INPUT_METHODS */
char *dummy21; /* geomMgrName */
Tk_Window dummy22; /* maintainerPtr */
+#if !defined(TK_USE_INPUT_METHODS) && (TCL_MAJOR_VERSION < 9)
+ XIC dummy9; /* inputContext */
+ int dummy20;
+#endif /* TK_USE_INPUT_METHODS */
} Tk_FakeWin;
/*
@@ -920,7 +943,7 @@ typedef enum {
} Tk_State;
typedef struct Tk_SmoothMethod {
- CONST86 char *name;
+ const char *name;
int (*coordProc) (Tk_Canvas canvas, double *pointPtr, int numPoints,
int numSteps, XPoint xPoints[], double dblPoints[]);
void (*postscriptProc) (Tcl_Interp *interp, Tk_Canvas canvas,
@@ -1019,6 +1042,8 @@ typedef int (Tk_ItemAreaProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
double *rectPtr);
typedef int (Tk_ItemPostscriptProc)(Tcl_Interp *interp, Tk_Canvas canvas,
Tk_Item *itemPtr, int prepass);
+typedef void (Tk_ItemRotateProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRadians);
typedef void (Tk_ItemScaleProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
double originX, double originY, double scaleX,
double scaleY);
@@ -1048,14 +1073,18 @@ typedef void (Tk_ItemDCharsProc)(Tk_Canvas canvas, Tk_Item *itemPtr,
#ifndef __NO_OLD_CONFIG
typedef struct Tk_ItemType {
- CONST86 char *name; /* The name of this type of item, such as
+ const char *name; /* The name of this type of item, such as
* "line". */
- int itemSize; /* Total amount of space needed for item's
+#if TCL_MAJOR_VERSION > 8
+ size_t itemSize; /* Total amount of space needed for item's
* record. */
+#else
+ int itemSize;
+#endif
Tk_ItemCreateProc *createProc;
/* Procedure to create a new item of this
* type. */
- CONST86 Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for
+ const Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for
* this type. Used for returning configuration
* info. */
Tk_ItemConfigureProc *configProc;
@@ -1098,7 +1127,9 @@ typedef struct Tk_ItemType {
/* Procedure to delete characters from an
* item. */
struct Tk_ItemType *nextPtr;/* Used to link types together into a list. */
- char *reserved1; /* Reserved for future extension. */
+ Tk_ItemRotateProc *rotateProc;
+ /* Procedure to rotate an item's coordinates
+ * about a point. */
int reserved2; /* Carefully compatible with */
char *reserved3; /* Jan Nijtmans dash patch */
char *reserved4;
@@ -1225,8 +1256,8 @@ typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, int argc,
char **argv, Tk_ImageType *typePtr, Tk_ImageMaster master,
ClientData *masterDataPtr);
#else
-typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, CONST86 char *name, int objc,
- Tcl_Obj *const objv[], CONST86 Tk_ImageType *typePtr, Tk_ImageMaster master,
+typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, const char *name, int objc,
+ Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageMaster master,
ClientData *masterDataPtr);
#endif /* USE_OLD_IMAGE */
typedef ClientData (Tk_ImageGetProc) (Tk_Window tkwin, ClientData masterData);
@@ -1250,7 +1281,7 @@ typedef int (Tk_ImagePostscriptProc) (ClientData clientData,
*/
struct Tk_ImageType {
- CONST86 char *name; /* Name of image type. */
+ const char *name; /* Name of image type. */
Tk_ImageCreateProc *createProc;
/* Procedure to call to create a new image of
* this type. */
@@ -1362,7 +1393,7 @@ typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format,
*/
struct Tk_PhotoImageFormat {
- CONST86 char *name; /* Name of image file format */
+ const char *name; /* Name of image file format */
Tk_ImageFileMatchProc *fileMatchProc;
/* Procedure to call to determine whether an
* image file matches this format. */
@@ -1466,6 +1497,7 @@ typedef struct Tk_ElementSpec {
*----------------------------------------------------------------------
*/
+#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
#define TK_READABLE TCL_READABLE
#define TK_WRITABLE TCL_WRITABLE
#define TK_EXCEPTION TCL_EXCEPTION
@@ -1499,6 +1531,7 @@ typedef struct Tk_ElementSpec {
#define Tk_FreeProc Tcl_FreeProc
#define Tk_Preserve Tcl_Preserve
#define Tk_Release Tcl_Release
+#endif
/* Removed Tk_Main, use macro instead */
#if defined(_WIN32) || defined(__CYGWIN__)
@@ -1533,7 +1566,7 @@ typedef void (Tk_EventProc) (ClientData clientData, XEvent *eventPtr);
typedef int (Tk_GenericProc) (ClientData clientData, XEvent *eventPtr);
typedef int (Tk_ClientMessageProc) (Tk_Window tkwin, XEvent *eventPtr);
typedef int (Tk_GetSelProc) (ClientData clientData, Tcl_Interp *interp,
- CONST86 char *portion);
+ const char *portion);
typedef void (Tk_LostSelProc) (ClientData clientData);
typedef Tk_RestrictAction (Tk_RestrictProc) (ClientData clientData,
XEvent *eventPtr);
@@ -1561,12 +1594,13 @@ typedef int (Tk_SelectionProc) (ClientData clientData, int offset,
*----------------------------------------------------------------------
*
* Allow users to say that they don't want to alter their source to add extra
- * arguments to Tk_PhotoPutBlock() et al; DO NOT DEFINE THIS WHEN BUILDING TK.
+ * arguments to Tk_PhotoPutBlock() et al.
*
* This goes after the inclusion of the stubbed-decls so that the declarations
* of what is actually there can be correct.
*/
+#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
#ifdef USE_COMPOSITELESS_PHOTO_PUT_BLOCK
# ifdef Tk_PhotoPutBlock
# undef Tk_PhotoPutBlock
@@ -1599,6 +1633,7 @@ typedef int (Tk_SelectionProc) (ClientData clientData, int offset,
# endif
# define Tk_PhotoSetSize Tk_PhotoSetSize_Panic
#endif /* USE_PANIC_ON_PHOTO_ALLOC_FAILURE */
+#endif /* !TK_NO_DEPRECATED */
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tk3d.c b/generic/tk3d.c
index 987bace..9ed419a 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -1380,9 +1380,9 @@ TkDebugBorder(
Tcl_Obj *objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(borderPtr->resourceRefCount));
+ Tcl_NewWideIntObj(borderPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(borderPtr->objRefCount));
+ Tcl_NewWideIntObj(borderPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tk3d.h b/generic/tk3d.h
index ec7f7c7..d36b95e 100644
--- a/generic/tk3d.h
+++ b/generic/tk3d.h
@@ -28,7 +28,7 @@ typedef struct TkBorder {
* the border will be used. */
Colormap colormap; /* Colormap out of which pixels are
* allocated. */
- int resourceRefCount; /* Number of active uses of this color (each
+ TkSizeT resourceRefCount; /* Number of active uses of this color (each
* active use corresponds to a call to
* Tk_Alloc3DBorderFromObj or Tk_Get3DBorder).
* If this count is 0, then this structure is
@@ -37,7 +37,7 @@ typedef struct TkBorder {
* because there are objects referring to it.
* The structure is freed when objRefCount and
* resourceRefCount are both 0. */
- int objRefCount; /* The number of Tcl objects that reference
+ TkSizeT objRefCount; /* The number of Tcl objects that reference
* this structure. */
XColor *bgColorPtr; /* Background color (intensity between
* lightColorPtr and darkColorPtr). */
diff --git a/generic/tkArgv.c b/generic/tkArgv.c
index 6c2c5c5..ca5ecc0 100644
--- a/generic/tkArgv.c
+++ b/generic/tkArgv.c
@@ -228,7 +228,7 @@ Tk_ParseArgv(
break;
case TK_ARGV_FUNC: {
typedef int (ArgvFunc)(char *, const char *, const char *);
- ArgvFunc *handlerProc = (ArgvFunc *) infoPtr->src;
+ ArgvFunc *handlerProc = infoPtr->src;
if (handlerProc(infoPtr->dst, infoPtr->key, argv[srcIndex])) {
srcIndex++;
@@ -239,7 +239,7 @@ Tk_ParseArgv(
case TK_ARGV_GENFUNC: {
typedef int (ArgvGenFunc)(char *, Tcl_Interp *, const char *, int,
const char **);
- ArgvGenFunc *handlerProc = (ArgvGenFunc *) infoPtr->src;
+ ArgvGenFunc *handlerProc = infoPtr->src;
argc = handlerProc(infoPtr->dst, interp, infoPtr->key, argc,
argv+srcIndex);
diff --git a/generic/tkAtom.c b/generic/tkAtom.c
index 2491fb2..ddfa97f 100644
--- a/generic/tkAtom.c
+++ b/generic/tkAtom.c
@@ -156,7 +156,7 @@ Tk_GetAtomName(
}
name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr);
hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew);
- Tcl_SetHashValue(hPtr, name);
+ Tcl_SetHashValue(hPtr, (char *)name);
}
return Tcl_GetHashValue(hPtr);
}
@@ -202,7 +202,7 @@ AtomInit(
Tcl_SetHashValue(hPtr, INT2PTR(atom));
name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr);
hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew);
- Tcl_SetHashValue(hPtr, name);
+ Tcl_SetHashValue(hPtr, (char *)name);
}
}
diff --git a/generic/tkBind.c b/generic/tkBind.c
index f65d2ee..ed81584 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -60,21 +60,21 @@
/*
* In old implementation (the one that used an event ring), <Double-1> and <1><1> were
* equivalent sequences. However it is logical to give <Double-1> higher precedence.
- * This can be achieved by setting PREFER_MOST_SPECIALIZED_EVENT to 1.
+ * This is achieved by setting PREFER_MOST_SPECIALIZED_EVENT to 1.
*/
#ifndef PREFER_MOST_SPECIALIZED_EVENT
-# define PREFER_MOST_SPECIALIZED_EVENT 0
+# define PREFER_MOST_SPECIALIZED_EVENT 1
#endif
/*
* Traditionally motion events can be combined with buttons in this way: <B1-B2-Motion>.
- * However it should be allowed to express this as <Motion-1-2> in addition. This can be
- * achieved by setting SUPPORT_ADDITIONAL_MOTION_SYNTAX to 1.
+ * However it should be allowed to express this as <Motion-1-2> in addition. This is achieved
+ * by setting SUPPORT_ADDITIONAL_MOTION_SYNTAX to 1.
*/
#ifndef SUPPORT_ADDITIONAL_MOTION_SYNTAX
-# define SUPPORT_ADDITIONAL_MOTION_SYNTAX 0 /* set to 1 if wanted */
+# define SUPPORT_ADDITIONAL_MOTION_SYNTAX 1
#endif
/*
@@ -458,6 +458,14 @@ static const ModInfo modArray[] = {
{"Button4", Button4Mask, 0},
{"B5", Button5Mask, 0},
{"Button5", Button5Mask, 0},
+ {"B6", Button6Mask, 0},
+ {"Button6", Button6Mask, 0},
+ {"B7", Button7Mask, 0},
+ {"Button7", Button7Mask, 0},
+ {"B8", Button8Mask, 0},
+ {"Button8", Button8Mask, 0},
+ {"B9", Button9Mask, 0},
+ {"Button9", Button9Mask, 0},
{"Mod1", Mod1Mask, 0},
{"M1", Mod1Mask, 0},
{"Command", Mod1Mask, 0},
@@ -780,7 +788,7 @@ GetButtonNumber(
const char *field)
{
assert(field);
- return (field[0] >= '1' && field[0] <= '5' && field[1] == '\0') ? field[0] - '0' : 0;
+ return (field[0] >= '1' && field[0] <= '9' && field[1] == '\0') ? field[0] - '0' : 0;
}
static Time
@@ -956,14 +964,18 @@ ResolveModifiers(
static int
ButtonNumberFromState(
- unsigned state)
+ ModMask state)
{
if (!(state & ALL_BUTTONS)) { return 0; }
if (state & Button1Mask) { return 1; }
if (state & Button2Mask) { return 2; }
if (state & Button3Mask) { return 3; }
if (state & Button4Mask) { return 4; }
- return 5;
+ if (state & Button5Mask) { return 5; }
+ if (state & Button6Mask) { return 6; }
+ if (state & Button7Mask) { return 7; }
+ if (state & Button8Mask) { return 8; }
+ return 9;
}
static void
@@ -1256,49 +1268,49 @@ TkBindInit(
assert(NoSymbol == 0L);
/* this must be a union, not a struct, otherwise comparison with NULL will not work */
- assert(Tk_Offset(Detail, name) == Tk_Offset(Detail, info));
+ assert(offsetof(Detail, name) == offsetof(Detail, info));
/* we use some constraints about X*Event */
- assert(Tk_Offset(XButtonEvent, time) == Tk_Offset(XMotionEvent, time));
- assert(Tk_Offset(XButtonEvent, x_root) == Tk_Offset(XMotionEvent, x_root));
- assert(Tk_Offset(XButtonEvent, y_root) == Tk_Offset(XMotionEvent, y_root));
- assert(Tk_Offset(XCreateWindowEvent, border_width) == Tk_Offset(XConfigureEvent, border_width));
- assert(Tk_Offset(XCreateWindowEvent, width) == Tk_Offset(XConfigureEvent, width));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XCirculateRequestEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XConfigureEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XGravityEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XMapEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XReparentEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, window) == Tk_Offset(XUnmapEvent, window));
- assert(Tk_Offset(XCreateWindowEvent, x) == Tk_Offset(XConfigureEvent, x));
- assert(Tk_Offset(XCreateWindowEvent, x) == Tk_Offset(XGravityEvent, x));
- assert(Tk_Offset(XCreateWindowEvent, y) == Tk_Offset(XConfigureEvent, y));
- assert(Tk_Offset(XCreateWindowEvent, y) == Tk_Offset(XGravityEvent, y));
- assert(Tk_Offset(XCrossingEvent, time) == Tk_Offset(XEnterWindowEvent, time));
- assert(Tk_Offset(XCrossingEvent, time) == Tk_Offset(XLeaveWindowEvent, time));
- assert(Tk_Offset(XCrossingEvent, time) == Tk_Offset(XKeyEvent, time));
- assert(Tk_Offset(XKeyEvent, root) == Tk_Offset(XButtonEvent, root));
- assert(Tk_Offset(XKeyEvent, root) == Tk_Offset(XCrossingEvent, root));
- assert(Tk_Offset(XKeyEvent, root) == Tk_Offset(XMotionEvent, root));
- assert(Tk_Offset(XKeyEvent, state) == Tk_Offset(XButtonEvent, state));
- assert(Tk_Offset(XKeyEvent, state) == Tk_Offset(XMotionEvent, state));
- assert(Tk_Offset(XKeyEvent, subwindow) == Tk_Offset(XButtonEvent, subwindow));
- assert(Tk_Offset(XKeyEvent, subwindow) == Tk_Offset(XCrossingEvent, subwindow));
- assert(Tk_Offset(XKeyEvent, subwindow) == Tk_Offset(XMotionEvent, subwindow));
- assert(Tk_Offset(XKeyEvent, time) == Tk_Offset(XButtonEvent, time));
- assert(Tk_Offset(XKeyEvent, time) == Tk_Offset(XMotionEvent, time));
- assert(Tk_Offset(XKeyEvent, x) == Tk_Offset(XButtonEvent, x));
- assert(Tk_Offset(XKeyEvent, x) == Tk_Offset(XCrossingEvent, x));
- assert(Tk_Offset(XKeyEvent, x) == Tk_Offset(XMotionEvent, x));
- assert(Tk_Offset(XKeyEvent, x_root) == Tk_Offset(XButtonEvent, x_root));
- assert(Tk_Offset(XKeyEvent, x_root) == Tk_Offset(XCrossingEvent, x_root));
- assert(Tk_Offset(XKeyEvent, x_root) == Tk_Offset(XMotionEvent, x_root));
- assert(Tk_Offset(XKeyEvent, y) == Tk_Offset(XButtonEvent, y));
- assert(Tk_Offset(XKeyEvent, y) == Tk_Offset(XCrossingEvent, y));
- assert(Tk_Offset(XKeyEvent, y) == Tk_Offset(XMotionEvent, y));
- assert(Tk_Offset(XKeyEvent, y_root) == Tk_Offset(XButtonEvent, y_root));
- assert(Tk_Offset(XKeyEvent, y_root) == Tk_Offset(XCrossingEvent, y_root));
- assert(Tk_Offset(XKeyEvent, y_root) == Tk_Offset(XMotionEvent, y_root));
+ assert(offsetof(XButtonEvent, time) == offsetof(XMotionEvent, time));
+ assert(offsetof(XButtonEvent, x_root) == offsetof(XMotionEvent, x_root));
+ assert(offsetof(XButtonEvent, y_root) == offsetof(XMotionEvent, y_root));
+ assert(offsetof(XCreateWindowEvent, border_width) == offsetof(XConfigureEvent, border_width));
+ assert(offsetof(XCreateWindowEvent, width) == offsetof(XConfigureEvent, width));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XCirculateRequestEvent, window));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XConfigureEvent, window));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XGravityEvent, window));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XMapEvent, window));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XReparentEvent, window));
+ assert(offsetof(XCreateWindowEvent, window) == offsetof(XUnmapEvent, window));
+ assert(offsetof(XCreateWindowEvent, x) == offsetof(XConfigureEvent, x));
+ assert(offsetof(XCreateWindowEvent, x) == offsetof(XGravityEvent, x));
+ assert(offsetof(XCreateWindowEvent, y) == offsetof(XConfigureEvent, y));
+ assert(offsetof(XCreateWindowEvent, y) == offsetof(XGravityEvent, y));
+ assert(offsetof(XCrossingEvent, time) == offsetof(XEnterWindowEvent, time));
+ assert(offsetof(XCrossingEvent, time) == offsetof(XLeaveWindowEvent, time));
+ assert(offsetof(XCrossingEvent, time) == offsetof(XKeyEvent, time));
+ assert(offsetof(XKeyEvent, root) == offsetof(XButtonEvent, root));
+ assert(offsetof(XKeyEvent, root) == offsetof(XCrossingEvent, root));
+ assert(offsetof(XKeyEvent, root) == offsetof(XMotionEvent, root));
+ assert(offsetof(XKeyEvent, state) == offsetof(XButtonEvent, state));
+ assert(offsetof(XKeyEvent, state) == offsetof(XMotionEvent, state));
+ assert(offsetof(XKeyEvent, subwindow) == offsetof(XButtonEvent, subwindow));
+ assert(offsetof(XKeyEvent, subwindow) == offsetof(XCrossingEvent, subwindow));
+ assert(offsetof(XKeyEvent, subwindow) == offsetof(XMotionEvent, subwindow));
+ assert(offsetof(XKeyEvent, time) == offsetof(XButtonEvent, time));
+ assert(offsetof(XKeyEvent, time) == offsetof(XMotionEvent, time));
+ assert(offsetof(XKeyEvent, x) == offsetof(XButtonEvent, x));
+ assert(offsetof(XKeyEvent, x) == offsetof(XCrossingEvent, x));
+ assert(offsetof(XKeyEvent, x) == offsetof(XMotionEvent, x));
+ assert(offsetof(XKeyEvent, x_root) == offsetof(XButtonEvent, x_root));
+ assert(offsetof(XKeyEvent, x_root) == offsetof(XCrossingEvent, x_root));
+ assert(offsetof(XKeyEvent, x_root) == offsetof(XMotionEvent, x_root));
+ assert(offsetof(XKeyEvent, y) == offsetof(XButtonEvent, y));
+ assert(offsetof(XKeyEvent, y) == offsetof(XCrossingEvent, y));
+ assert(offsetof(XKeyEvent, y) == offsetof(XMotionEvent, y));
+ assert(offsetof(XKeyEvent, y_root) == offsetof(XButtonEvent, y_root));
+ assert(offsetof(XKeyEvent, y_root) == offsetof(XCrossingEvent, y_root));
+ assert(offsetof(XKeyEvent, y_root) == offsetof(XMotionEvent, y_root));
/*
* Initialize the static data structures used by the binding package. They
@@ -1605,7 +1617,7 @@ Tk_CreateBinding(
ClientData object, /* Token for object with which binding is associated. */
const char *eventString, /* String describing event sequence that triggers binding. */
const char *script, /* Contains Tcl script to execute when binding triggers. */
- int append) /* 0 means replace any existing binding for eventString;
+ int append) /* 0 means replace any existing binding for eventString;
* 1 means append to that binding. If the existing binding is
* for a callback function and not a Tcl command string, the
* existing binding will always be replaced. */
@@ -4572,7 +4584,7 @@ FindSequence(
* associated. For virtual event table, NULL. */
const char *eventString, /* String description of pattern to match on. See user
* documentation for details. */
- int create, /* 0 means don't create the entry if it doesn't already exist.
+ int create, /* 0 means don't create the entry if it doesn't already exist.
* 1 means create. */
int allowVirtual, /* 0 means that virtual events are not allowed in the sequence.
* 1 otherwise. */
@@ -5129,15 +5141,15 @@ GetPatternObj(
}
case ButtonPress:
case ButtonRelease:
- assert(patPtr->info <= Button5);
+ assert(patPtr->info <= Button9);
Tcl_AppendPrintfToObj(patternObj, "-%d", (int) patPtr->info);
break;
#if PRINT_SHORT_MOTION_SYNTAX
case MotionNotify: {
ModMask mask = patPtr->modMask;
while (mask & ALL_BUTTONS) {
- unsigned button = ButtonNumberFromState(mask);
- Tcl_AppendPrintfToObj(patternObj, "-%u", button);
+ int button = ButtonNumberFromState(mask);
+ Tcl_AppendPrintfToObj(patternObj, "-%d", button);
mask &= ~TkGetButtonMask(button);
}
break;
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index 54bab69..f642174 100644
--- a/generic/tkBitmap.c
+++ b/generic/tkBitmap.c
@@ -536,7 +536,7 @@ Tk_NameOfBitmap(
Tcl_Panic("Tk_NameOfBitmap received unknown bitmap argument");
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, bitmap);
if (idHashPtr == NULL) {
goto unknown;
}
@@ -578,7 +578,7 @@ Tk_SizeOfBitmap(
Tcl_Panic("Tk_SizeOfBitmap received unknown bitmap argument");
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, bitmap);
if (idHashPtr == NULL) {
goto unknownBitmap;
}
@@ -667,7 +667,7 @@ Tk_FreeBitmap(
Tcl_Panic("Tk_FreeBitmap called before Tk_GetBitmap");
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, (char *) bitmap);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->bitmapIdTable, bitmap);
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeBitmap received unknown bitmap argument");
}
@@ -1157,9 +1157,9 @@ TkDebugBitmap(
for ( ; (bitmapPtr != NULL); bitmapPtr = bitmapPtr->nextPtr) {
objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(bitmapPtr->resourceRefCount));
+ Tcl_NewWideIntObj(bitmapPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(bitmapPtr->objRefCount));
+ Tcl_NewWideIntObj(bitmapPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 7bd9a44..fa526a3 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -23,7 +23,7 @@
static const Tk_OptionSpec busyOptionSpecs[] = {
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUSY_CURSOR, -1, Tk_Offset(Busy, cursor),
+ DEF_BUSY_CURSOR, -1, offsetof(Busy, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -572,7 +572,7 @@ CreateBusy(
busyPtr->cursor = NULL;
Tk_SetClass(tkBusy, "Busy");
busyPtr->optionTable = Tk_CreateOptionTable(interp, busyOptionSpecs);
- if (Tk_InitOptions(interp, (char *) busyPtr, busyPtr->optionTable,
+ if (Tk_InitOptions(interp, busyPtr, busyPtr->optionTable,
tkBusy) != TCL_OK) {
Tk_DestroyWindow(tkBusy);
return NULL;
@@ -639,7 +639,7 @@ ConfigureBusy(
{
Tk_Cursor oldCursor = busyPtr->cursor;
- if (Tk_SetOptions(interp, (char *) busyPtr, busyPtr->optionTable, objc,
+ if (Tk_SetOptions(interp, busyPtr, busyPtr->optionTable, objc,
objv, busyPtr->tkBusy, NULL, NULL) != TCL_OK) {
return TCL_ERROR;
}
@@ -688,7 +688,7 @@ GetBusy(
&tkwin) != TCL_OK) {
return NULL;
}
- hPtr = Tcl_FindHashEntry(busyTablePtr, (char *) tkwin);
+ hPtr = Tcl_FindHashEntry(busyTablePtr, tkwin);
if (hPtr == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't find busy window \"%s\"", Tcl_GetString(windowObj)));
@@ -762,6 +762,9 @@ HoldBusy(
} else {
TkpHideBusyWindow(busyPtr);
}
+ if (result == TCL_OK) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), -1));
+ }
return result;
}
@@ -795,11 +798,12 @@ Tk_BusyObjCmd(
Tcl_Obj *objPtr;
int index, result = TCL_OK;
static const char *const optionStrings[] = {
- "cget", "configure", "current", "forget", "hold", "status", NULL
+ "busywindow", "cget", "configure", "current", "forget", "hold",
+ "status", NULL
};
enum options {
- BUSY_CGET, BUSY_CONFIGURE, BUSY_CURRENT, BUSY_FORGET, BUSY_HOLD,
- BUSY_STATUS
+ BUSY_BUSYWINDOW, BUSY_CGET, BUSY_CONFIGURE, BUSY_CURRENT, BUSY_FORGET,
+ BUSY_HOLD, BUSY_STATUS
};
if (objc < 2) {
@@ -824,6 +828,19 @@ Tk_BusyObjCmd(
return TCL_ERROR;
}
switch ((enum options) index) {
+ case BUSY_BUSYWINDOW:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "window");
+ return TCL_ERROR;
+ }
+ busyPtr = GetBusy(interp, busyTablePtr, objv[2]);
+ if (busyPtr == NULL) {
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(busyPtr->tkBusy), -1));
+ return TCL_OK;
+
case BUSY_CGET:
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window option");
@@ -834,7 +851,7 @@ Tk_BusyObjCmd(
return TCL_ERROR;
}
Tcl_Preserve(busyPtr);
- objPtr = Tk_GetOptionValue(interp, (char *) busyPtr,
+ objPtr = Tk_GetOptionValue(interp, busyPtr,
busyPtr->optionTable, objv[3], busyPtr->tkBusy);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -855,7 +872,7 @@ Tk_BusyObjCmd(
}
Tcl_Preserve(busyPtr);
if (objc <= 4) {
- objPtr = Tk_GetOptionInfo(interp, (char *) busyPtr,
+ objPtr = Tk_GetOptionInfo(interp, busyPtr,
busyPtr->optionTable, (objc == 4) ? objv[3] : NULL,
busyPtr->tkBusy);
if (objPtr == NULL) {
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 3c15bf6..c43fe9b 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -70,412 +70,412 @@ char tkDefLabelPady[TCL_INTEGER_SPACE] = DEF_LABCHKRAD_PADY;
static const Tk_OptionSpec labelOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_BUTTON_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg),
+ DEF_BUTTON_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr),
- Tk_Offset(TkButton, borderWidth), 0, 0, 0},
+ tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
+ offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor),
+ DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_BUTTON_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0},
+ DEF_BUTTON_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkButton, highlightBorder), 0,
+ -1, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, Tk_Offset(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefLabelHighlightWidth,
- Tk_Offset(TkButton, highlightWidthPtr),
- Tk_Offset(TkButton, highlightWidth), 0, 0, 0},
+ offsetof(TkButton, highlightWidthPtr),
+ offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, Tk_Offset(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- tkDefLabelPadx, Tk_Offset(TkButton, padXPtr),
- Tk_Offset(TkButton, padX), 0, 0, 0},
+ tkDefLabelPadx, offsetof(TkButton, padXPtr),
+ offsetof(TkButton, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- tkDefLabelPady, Tk_Offset(TkButton, padYPtr),
- Tk_Offset(TkButton, padY), 0, 0, 0},
+ tkDefLabelPady, offsetof(TkButton, padYPtr),
+ offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state),
+ DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_LABEL_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1,
+ DEF_LABEL_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, Tk_Offset(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, Tk_Offset(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, Tk_Offset(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, Tk_Offset(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
- Tk_Offset(TkButton, wrapLength), 0, 0, 0},
+ DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
+ offsetof(TkButton, wrapLength), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static const Tk_OptionSpec buttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_BUTTON_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg),
+ DEF_BUTTON_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr),
- Tk_Offset(TkButton, borderWidth), 0, 0, 0},
+ tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
+ offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor),
+ DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-default", "default", "Default",
- DEF_BUTTON_DEFAULT, -1, Tk_Offset(TkButton, defaultState),
+ DEF_BUTTON_DEFAULT, -1, offsetof(TkButton, defaultState),
0, defaultStrings, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_BUTTON_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0},
+ DEF_BUTTON_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkButton, highlightBorder), 0,
+ -1, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, Tk_Offset(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
- Tk_Offset(TkButton, highlightWidthPtr),
- Tk_Offset(TkButton, highlightWidth), 0, 0, 0},
+ offsetof(TkButton, highlightWidthPtr),
+ offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, Tk_Offset(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, Tk_Offset(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- tkDefButtonPadx, Tk_Offset(TkButton, padXPtr),
- Tk_Offset(TkButton, padX), 0, 0, 0},
+ tkDefButtonPadx, offsetof(TkButton, padXPtr),
+ offsetof(TkButton, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- tkDefButtonPady, Tk_Offset(TkButton, padYPtr),
- Tk_Offset(TkButton, padY), 0, 0, 0},
+ tkDefButtonPady, offsetof(TkButton, padYPtr),
+ offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_BUTTON_RELIEF, -1, Tk_Offset(TkButton, relief),
+ DEF_BUTTON_RELIEF, -1, offsetof(TkButton, relief),
0, 0, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_BUTTON_REPEAT_DELAY, -1, Tk_Offset(TkButton, repeatDelay),
+ DEF_BUTTON_REPEAT_DELAY, -1, offsetof(TkButton, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_BUTTON_REPEAT_INTERVAL, -1, Tk_Offset(TkButton, repeatInterval),
+ DEF_BUTTON_REPEAT_INTERVAL, -1, offsetof(TkButton, repeatInterval),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state),
+ DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, Tk_Offset(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, Tk_Offset(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, Tk_Offset(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, Tk_Offset(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
- Tk_Offset(TkButton, wrapLength), 0, 0, 0},
+ DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
+ offsetof(TkButton, wrapLength), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_CHKRAD_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg),
+ DEF_CHKRAD_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr),
- Tk_Offset(TkButton, borderWidth), 0, 0, 0},
+ tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
+ offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor),
+ DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_CHKRAD_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0},
+ DEF_CHKRAD_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkButton, highlightBorder), 0,
+ -1, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, Tk_Offset(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
- Tk_Offset(TkButton, highlightWidthPtr),
- Tk_Offset(TkButton, highlightWidth), 0, 0, 0},
+ offsetof(TkButton, highlightWidthPtr),
+ offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_BUTTON_INDICATOR, -1, Tk_Offset(TkButton, indicatorOn), 0, 0, 0},
+ DEF_BUTTON_INDICATOR, -1, offsetof(TkButton, indicatorOn), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, Tk_Offset(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-offrelief", "offRelief", "OffRelief",
- DEF_BUTTON_RELIEF, -1, Tk_Offset(TkButton, offRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, -1, offsetof(TkButton, offRelief), 0, 0, 0},
{TK_OPTION_STRING, "-offvalue", "offValue", "Value",
- DEF_BUTTON_OFF_VALUE, Tk_Offset(TkButton, offValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_OFF_VALUE, offsetof(TkButton, offValuePtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-onvalue", "onValue", "Value",
- DEF_BUTTON_ON_VALUE, Tk_Offset(TkButton, onValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_ON_VALUE, offsetof(TkButton, onValuePtr), -1, 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, Tk_Offset(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- tkDefLabelPadx, Tk_Offset(TkButton, padXPtr),
- Tk_Offset(TkButton, padX), 0, 0, 0},
+ tkDefLabelPadx, offsetof(TkButton, padXPtr),
+ offsetof(TkButton, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- tkDefLabelPady, Tk_Offset(TkButton, padYPtr),
- Tk_Offset(TkButton, padY), 0, 0, 0},
+ tkDefLabelPady, offsetof(TkButton, padYPtr),
+ offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background",
- DEF_BUTTON_SELECT_COLOR, -1, Tk_Offset(TkButton, selectBorder),
+ DEF_BUTTON_SELECT_COLOR, -1, offsetof(TkButton, selectBorder),
TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0},
{TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage",
- DEF_BUTTON_SELECT_IMAGE, Tk_Offset(TkButton, selectImagePtr), -1,
+ DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state),
+ DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, Tk_Offset(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, Tk_Offset(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristateimage", "tristateImage", "TristateImage",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, tristateImagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
- DEF_BUTTON_TRISTATE_VALUE, Tk_Offset(TkButton, tristateValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), -1, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, Tk_Offset(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_CHECKBUTTON_VARIABLE, Tk_Offset(TkButton, selVarNamePtr), -1,
+ DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, Tk_Offset(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
- Tk_Offset(TkButton, wrapLength), 0, 0, 0},
+ DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
+ offsetof(TkButton, wrapLength), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
static const Tk_OptionSpec radiobuttonOptionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(TkButton, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
- DEF_CHKRAD_ACTIVE_FG_COLOR, -1, Tk_Offset(TkButton, activeFg),
+ DEF_CHKRAD_ACTIVE_FG_COLOR, -1, offsetof(TkButton, activeFg),
TK_OPTION_NULL_OK, DEF_BUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- DEF_BUTTON_ANCHOR, -1, Tk_Offset(TkButton, anchor), 0, 0, 0},
+ DEF_BUTTON_ANCHOR, -1, offsetof(TkButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_BUTTON_BG_COLOR, -1, Tk_Offset(TkButton, normalBorder),
+ DEF_BUTTON_BG_COLOR, -1, offsetof(TkButton, normalBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_BUTTON_BITMAP, -1, Tk_Offset(TkButton, bitmap),
+ DEF_BUTTON_BITMAP, -1, offsetof(TkButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- tkDefButtonBorderWidth, Tk_Offset(TkButton, borderWidthPtr),
- Tk_Offset(TkButton, borderWidth), 0, 0, 0},
+ tkDefButtonBorderWidth, offsetof(TkButton, borderWidthPtr),
+ offsetof(TkButton, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_BUTTON_COMMAND, Tk_Offset(TkButton, commandPtr), -1,
+ DEF_BUTTON_COMMAND, offsetof(TkButton, commandPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkButton, compound), 0,
+ DEF_BUTTON_COMPOUND, -1, offsetof(TkButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, Tk_Offset(TkButton, cursor),
+ DEF_BUTTON_CURSOR, -1, offsetof(TkButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_BUTTON_DISABLED_FG_COLOR,
- -1, Tk_Offset(TkButton, disabledFg), TK_OPTION_NULL_OK,
+ -1, offsetof(TkButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_BUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0},
+ DEF_BUTTON_FONT, -1, offsetof(TkButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_CHKRAD_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0},
+ DEF_CHKRAD_FG, -1, offsetof(TkButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0},
+ DEF_BUTTON_HEIGHT, offsetof(TkButton, heightPtr), -1, 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_BUTTON_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkButton, highlightBorder), 0,
+ -1, offsetof(TkButton, highlightBorder), 0,
(ClientData) DEF_BUTTON_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_BUTTON_HIGHLIGHT, -1, Tk_Offset(TkButton, highlightColorPtr),
+ DEF_BUTTON_HIGHLIGHT, -1, offsetof(TkButton, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", tkDefButtonHighlightWidth,
- Tk_Offset(TkButton, highlightWidthPtr),
- Tk_Offset(TkButton, highlightWidth), 0, 0, 0},
+ offsetof(TkButton, highlightWidthPtr),
+ offsetof(TkButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, imagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_BUTTON_INDICATOR, -1, Tk_Offset(TkButton, indicatorOn),
+ DEF_BUTTON_INDICATOR, -1, offsetof(TkButton, indicatorOn),
0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, -1, Tk_Offset(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, -1, offsetof(TkButton, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-offrelief", "offRelief", "OffRelief",
- DEF_BUTTON_RELIEF, -1, Tk_Offset(TkButton, offRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, -1, offsetof(TkButton, offRelief), 0, 0, 0},
{TK_OPTION_RELIEF, "-overrelief", "overRelief", "OverRelief",
- DEF_BUTTON_OVER_RELIEF, -1, Tk_Offset(TkButton, overRelief),
+ DEF_BUTTON_OVER_RELIEF, -1, offsetof(TkButton, overRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- tkDefLabelPadx, Tk_Offset(TkButton, padXPtr),
- Tk_Offset(TkButton, padX), 0, 0, 0},
+ tkDefLabelPadx, offsetof(TkButton, padXPtr),
+ offsetof(TkButton, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- tkDefLabelPady, Tk_Offset(TkButton, padYPtr),
- Tk_Offset(TkButton, padY), 0, 0, 0},
+ tkDefLabelPady, offsetof(TkButton, padYPtr),
+ offsetof(TkButton, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABCHKRAD_RELIEF, -1, Tk_Offset(TkButton, relief), 0, 0, 0},
+ DEF_LABCHKRAD_RELIEF, -1, offsetof(TkButton, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectcolor", "selectColor", "Background",
- DEF_BUTTON_SELECT_COLOR, -1, Tk_Offset(TkButton, selectBorder),
+ DEF_BUTTON_SELECT_COLOR, -1, offsetof(TkButton, selectBorder),
TK_OPTION_NULL_OK, DEF_BUTTON_SELECT_MONO, 0},
{TK_OPTION_STRING, "-selectimage", "selectImage", "SelectImage",
- DEF_BUTTON_SELECT_IMAGE, Tk_Offset(TkButton, selectImagePtr), -1,
+ DEF_BUTTON_SELECT_IMAGE, offsetof(TkButton, selectImagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_BUTTON_STATE, -1, Tk_Offset(TkButton, state),
+ DEF_BUTTON_STATE, -1, offsetof(TkButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_BUTTON_TAKE_FOCUS, Tk_Offset(TkButton, takeFocusPtr), -1,
+ DEF_BUTTON_TAKE_FOCUS, offsetof(TkButton, takeFocusPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_BUTTON_TEXT, Tk_Offset(TkButton, textPtr), -1, 0, 0, 0},
+ DEF_BUTTON_TEXT, offsetof(TkButton, textPtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_BUTTON_TEXT_VARIABLE, Tk_Offset(TkButton, textVarNamePtr), -1,
+ DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristateimage", "tristateImage", "TristateImage",
- DEF_BUTTON_IMAGE, Tk_Offset(TkButton, tristateImagePtr), -1,
+ DEF_BUTTON_IMAGE, offsetof(TkButton, tristateImagePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue",
- DEF_BUTTON_TRISTATE_VALUE, Tk_Offset(TkButton, tristateValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), -1, 0, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_BUTTON_UNDERLINE, -1, Tk_Offset(TkButton, underline), 0, 0, 0},
+ DEF_BUTTON_UNDERLINE, -1, offsetof(TkButton, underline), 0, 0, 0},
{TK_OPTION_STRING, "-value", "value", "Value",
- DEF_BUTTON_VALUE, Tk_Offset(TkButton, onValuePtr), -1, 0, 0, 0},
+ DEF_BUTTON_VALUE, offsetof(TkButton, onValuePtr), -1, 0, 0, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_RADIOBUTTON_VARIABLE, Tk_Offset(TkButton, selVarNamePtr), -1,
+ DEF_RADIOBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), -1,
0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_BUTTON_WIDTH, Tk_Offset(TkButton, widthPtr), -1, 0, 0, 0},
+ DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_BUTTON_WRAP_LENGTH, Tk_Offset(TkButton, wrapLengthPtr),
- Tk_Offset(TkButton, wrapLength), 0, 0, 0},
+ DEF_BUTTON_WRAP_LENGTH, offsetof(TkButton, wrapLengthPtr),
+ offsetof(TkButton, wrapLength), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -749,7 +749,7 @@ ButtonCreate(
ExposureMask|StructureNotifyMask|FocusChangeMask,
ButtonEventProc, butPtr);
- if (Tk_InitOptions(interp, (char *) butPtr, optionTable, tkwin)
+ if (Tk_InitOptions(interp, butPtr, optionTable, tkwin)
!= TCL_OK) {
Tk_DestroyWindow(butPtr->tkwin);
return TCL_ERROR;
@@ -810,7 +810,7 @@ ButtonWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "cget option");
goto error;
}
- objPtr = Tk_GetOptionValue(interp, (char *) butPtr,
+ objPtr = Tk_GetOptionValue(interp, butPtr,
butPtr->optionTable, objv[2], butPtr->tkwin);
if (objPtr == NULL) {
goto error;
@@ -820,7 +820,7 @@ ButtonWidgetObjCmd(
case COMMAND_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) butPtr,
+ objPtr = Tk_GetOptionInfo(interp, butPtr,
butPtr->optionTable, (objc == 3) ? objv[2] : NULL,
butPtr->tkwin);
if (objPtr == NULL) {
@@ -1074,7 +1074,7 @@ ConfigureButton(
* First pass: set options to new values.
*/
- if (Tk_SetOptions(interp, (char *) butPtr,
+ if (Tk_SetOptions(interp, butPtr,
butPtr->optionTable, objc, objv,
butPtr->tkwin, &savedOptions, NULL) != TCL_OK) {
continue;
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index c93b95a..b41dc64 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.c
@@ -14,6 +14,8 @@
#include "tkCanvas.h"
#include "default.h"
+#include "float.h"
+
/*
* The structure below defines the record for each arc item.
*/
@@ -63,6 +65,12 @@ typedef struct ArcItem {
* start (see ComputeArcOutline). */
double center2[2]; /* Coordinates of center of arc outline at
* start+extent (see ComputeArcOutline). */
+ double height; /* Distance from the arc's chord to its
+ * mid-point. */
+ double startPoint[2]; /* Start point of arc used when specifying
+ * height. */
+ double endPoint[2]; /* End point of arc used when specifying
+ * height. */
} ArcItem;
/*
@@ -105,65 +113,67 @@ static const Tk_CustomOption pixelOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.activeDash),
+ NULL, offsetof(ArcItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
- NULL, Tk_Offset(ArcItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-activeoutline", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activeoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.activeStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, outline.activeStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL,
- "0.0", Tk_Offset(ArcItem, outline.activeWidth),
+ "0.0", offsetof(ArcItem, outline.activeWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_CUSTOM, "-dash", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.dash),
+ NULL, offsetof(ArcItem, outline.dash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL,
- "0", Tk_Offset(ArcItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(ArcItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.disabledDash),
+ NULL, offsetof(ArcItem, outline.disabledDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-disabledfill", NULL, NULL,
- NULL, Tk_Offset(ArcItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.disabledStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, outline.disabledStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-disabledwidth", NULL, NULL,
- "0.0", Tk_Offset(ArcItem, outline.disabledWidth),
+ "0.0", offsetof(ArcItem, outline.disabledWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_DOUBLE, "-extent", NULL, NULL,
- "90", Tk_Offset(ArcItem, extent), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "90", offsetof(ArcItem, extent), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_COLOR, "-fill", NULL, NULL,
- NULL, Tk_Offset(ArcItem, fillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, fillColor), TK_CONFIG_NULL_OK, NULL},
+ {TK_CONFIG_DOUBLE, "-height", NULL, NULL,
+ 0, offsetof(ArcItem, height), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-offset", NULL, NULL,
- "0,0", Tk_Offset(ArcItem, tsoffset),
+ "0,0", offsetof(ArcItem, tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_COLOR, "-outline", NULL, NULL,
- DEF_CANVITEM_OUTLINE, Tk_Offset(ArcItem, outline.color), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVITEM_OUTLINE, offsetof(ArcItem, outline.color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-outlineoffset", NULL, NULL,
- "0,0", Tk_Offset(ArcItem, outline.tsoffset),
+ "0,0", offsetof(ArcItem, outline.tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_BITMAP, "-outlinestipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_DOUBLE, "-start", NULL, NULL,
- "0", Tk_Offset(ArcItem, start), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(ArcItem, start), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_BITMAP, "-stipple", NULL, NULL,
- NULL, Tk_Offset(ArcItem, fillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ArcItem, fillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-style", NULL, NULL,
- NULL, Tk_Offset(ArcItem, style), TK_CONFIG_DONT_SET_DEFAULT,
+ NULL, offsetof(ArcItem, style), TK_CONFIG_DONT_SET_DEFAULT,
&styleOption},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_CUSTOM, "-width", NULL, NULL,
- "1.0", Tk_Offset(ArcItem, outline.width), TK_CONFIG_DONT_SET_DEFAULT,
+ "1.0", offsetof(ArcItem, outline.width), TK_CONFIG_DONT_SET_DEFAULT,
&pixelOption},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -176,6 +186,7 @@ static void ComputeArcBbox(Tk_Canvas canvas, ArcItem *arcPtr);
static int ConfigureArc(Tcl_Interp *interp,
Tk_Canvas canvas, Tk_Item *itemPtr, int objc,
Tcl_Obj *const objv[], int flags);
+static void ComputeArcParametersFromHeight(ArcItem *arcPtr);
static int CreateArc(Tcl_Interp *interp,
Tk_Canvas canvas, struct Tk_Item *itemPtr,
int objc, Tcl_Obj *const objv[]);
@@ -206,6 +217,8 @@ static int HorizLineToArc(double x1, double x2,
static int VertLineToArc(double x, double y1,
double y2, double rx, double ry,
double start, double extent);
+static void RotateArc(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
/*
* The structures below defines the arc item types by means of functions that
@@ -233,7 +246,8 @@ Tk_ItemType tkArcType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateArc, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -292,6 +306,7 @@ CreateArc(
arcPtr->disabledFillStipple = None;
arcPtr->style = PIESLICE_STYLE;
arcPtr->fillGC = NULL;
+ arcPtr->height = 0;
/*
* Process the arguments to fill in the item record.
@@ -352,8 +367,8 @@ ArcCoords(
objs[2] = Tcl_NewDoubleObj(arcPtr->bbox[2]);
objs[3] = Tcl_NewDoubleObj(arcPtr->bbox[3]);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, objs));
- } else if ((objc == 1)||(objc == 4)) {
- if (objc==1) {
+ } else if ((objc == 1) || (objc == 4)) {
+ if (objc == 1) {
if (Tcl_ListObjGetElements(interp, objv[0], &objc,
(Tcl_Obj ***) &objv) != TCL_OK) {
return TCL_ERROR;
@@ -375,6 +390,17 @@ ArcCoords(
&arcPtr->bbox[3]) != TCL_OK)) {
return TCL_ERROR;
}
+
+ /*
+ * Store bbox as start and end points so they can be used if either
+ * radius or height is specified.
+ */
+
+ arcPtr->startPoint[0] = arcPtr->bbox[0];
+ arcPtr->startPoint[1] = arcPtr->bbox[1];
+ arcPtr->endPoint[0] = arcPtr->bbox[2];
+ arcPtr->endPoint[1] = arcPtr->bbox[3];
+
ComputeArcBbox(canvas, arcPtr);
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -448,6 +474,22 @@ ConfigureArc(
itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT;
}
+ /*
+ * Override the start and extent if the height is given.
+ */
+
+ ComputeArcParametersFromHeight(arcPtr);
+
+ ComputeArcBbox(canvas, arcPtr);
+
+ i = (int) (arcPtr->start/360.0);
+ arcPtr->start -= i*360.0;
+ if (arcPtr->start < 0) {
+ arcPtr->start += 360.0;
+ }
+ i = (int) (arcPtr->extent/360.0);
+ arcPtr->extent -= i*360.0;
+
tsoffset = &arcPtr->outline.tsoffset;
flags = tsoffset->flags;
if (flags & TK_OFFSET_LEFT) {
@@ -465,14 +507,6 @@ ConfigureArc(
tsoffset->yoffset = (int) (arcPtr->bbox[2] + 0.5);
}
- i = (int) (arcPtr->start/360.0);
- arcPtr->start -= i*360.0;
- if (arcPtr->start < 0) {
- arcPtr->start += 360.0;
- }
- i = (int) (arcPtr->extent/360.0);
- arcPtr->extent -= i*360.0;
-
mask = Tk_ConfigOutlineGC(&gcValues, canvas, itemPtr, &(arcPtr->outline));
if (mask) {
gcValues.cap_style = CapButt;
@@ -510,7 +544,7 @@ ConfigureArc(
if (arcPtr->disabledFillStipple!=None) {
stipple = arcPtr->disabledFillStipple;
}
- }
+ }
if (arcPtr->style == ARC_STYLE) {
newGC = NULL;
@@ -560,6 +594,103 @@ ConfigureArc(
/*
*--------------------------------------------------------------
*
+ * ComputeArcParametersFromHeight --
+ *
+ * This function calculates the arc parameters given start-point,
+ * end-point and height (!= 0).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The height parameter is set to 0 on exit.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+ComputeArcParametersFromHeight(
+ ArcItem* arcPtr)
+{
+ double chordLen, chordDir[2], chordCen[2], arcCen[2], d, radToDeg, radius;
+
+ /*
+ * Do nothing if no height has been specified.
+ */
+
+ if (arcPtr->height == 0)
+ return;
+
+ /*
+ * Calculate the chord length, return early if it is too small.
+ */
+
+ chordLen = hypot(arcPtr->endPoint[1] - arcPtr->startPoint[1],
+ arcPtr->startPoint[0] - arcPtr->endPoint[0]);
+
+ if (chordLen < DBL_EPSILON) {
+ arcPtr->start = arcPtr->extent = arcPtr->height = 0;
+ return;
+ }
+
+ chordDir[0] = (arcPtr->endPoint[0] - arcPtr->startPoint[0]) / chordLen;
+ chordDir[1] = (arcPtr->endPoint[1] - arcPtr->startPoint[1]) / chordLen;
+ chordCen[0] = (arcPtr->startPoint[0] + arcPtr->endPoint[0]) / 2;
+ chordCen[1] = (arcPtr->startPoint[1] + arcPtr->endPoint[1]) / 2;
+
+ /*
+ * Calculate the radius (assumes height != 0).
+ */
+
+ radius = (4*pow(arcPtr->height, 2) + pow(chordLen, 2))
+ / (8 * arcPtr->height);
+
+ /*
+ * The arc centre.
+ */
+
+ d = radius - arcPtr->height;
+ arcCen[0] = chordCen[0] - d * chordDir[1];
+ arcCen[1] = chordCen[1] + d * chordDir[0];
+
+ /*
+ * The arc start and span. Angles are negated because the coordinate
+ * system is left-handed.
+ */
+
+ radToDeg = 45 / atan(1);
+ arcPtr->start = atan2(arcCen[1] - arcPtr->startPoint[1],
+ arcPtr->startPoint[0] - arcCen[0]) * radToDeg;
+ arcPtr->extent = -2 * asin(chordLen / (2 * radius)) * radToDeg;
+
+ /*
+ * Handle spans > 180.
+ */
+
+ if (fabs(2 * arcPtr->height) > chordLen) {
+ arcPtr->extent = arcPtr->extent > 0 ? (360 - arcPtr->extent)
+ : -(360 + arcPtr->extent);
+ }
+
+ /*
+ * Create the bounding box.
+ */
+
+ arcPtr->bbox[0] = arcCen[0] - radius;
+ arcPtr->bbox[1] = arcCen[1] - radius;
+ arcPtr->bbox[2] = arcCen[0] + radius;
+ arcPtr->bbox[3] = arcCen[1] + radius;
+
+ /*
+ * Set the height to 0 so that itemcget -height returns 0.
+ */
+
+ arcPtr->height = 0;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* DeleteArc --
*
* This function is called to clean up the data structure associated with
@@ -678,7 +809,7 @@ ComputeArcBbox(
ComputeArcOutline(canvas,arcPtr);
/*
- * To compute the bounding box, start with the the bbox formed by the two
+ * To compute the bounding box, start with the bbox formed by the two
* endpoints of the arc. Then add in the center of the arc's oval (if
* relevant) and the 3-o'clock, 6-o'clock, 9-o'clock, and 12-o'clock
* positions, if they are relevant.
@@ -1380,6 +1511,60 @@ ScaleArc(
/*
*--------------------------------------------------------------
*
+ * RotateArc --
+ *
+ * This function is called to rotate an arc by a given amount.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the arc is rotated by angleRad radians about (originX,
+ * originY), and the bounding box is updated in the generic part of the
+ * item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateArc(
+ Tk_Canvas canvas,
+ Tk_Item *itemPtr,
+ double originX,
+ double originY,
+ double angleRad)
+{
+ ArcItem *arcPtr = (ArcItem *) itemPtr;
+ double newX, newY, oldX, oldY;
+
+ /*
+ * Compute the centre of the box, then rotate that about the origin.
+ */
+
+ newX = oldX = (arcPtr->bbox[0] + arcPtr->bbox[2]) / 2.0;
+ newY = oldY = (arcPtr->bbox[1] + arcPtr->bbox[3]) / 2.0;
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &newX, &newY);
+
+ /*
+ * Apply the translation to the box.
+ */
+
+ arcPtr->bbox[0] += newX - oldX;
+ arcPtr->bbox[1] += newY - oldY;
+ arcPtr->bbox[2] += newX - oldX;
+ arcPtr->bbox[3] += newY - oldY;
+
+ /*
+ * TODO: update the arc endpoints?
+ */
+
+ ComputeArcBbox(canvas, arcPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* TranslateArc --
*
* This function is called to move an arc by a given amount.
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 01d875c..e7b19ae 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.c
@@ -50,30 +50,30 @@ static const Tk_CustomOption tagsOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_COLOR, "-activebackground", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, activeBgColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapItem, activeBgColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activebitmap", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, activeBitmap), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapItem, activeBitmap), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-activeforeground", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, activeFgColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapItem, activeFgColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
- "center", Tk_Offset(BitmapItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "center", offsetof(BitmapItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_COLOR, "-background", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, bgColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapItem, bgColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-bitmap", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, bitmap), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapItem, bitmap), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-disabledbackground", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, disabledBgColor),
+ NULL, offsetof(BitmapItem, disabledBgColor),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledbitmap", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, disabledBitmap),
+ NULL, offsetof(BitmapItem, disabledBitmap),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-disabledforeground", NULL, NULL,
- NULL, Tk_Offset(BitmapItem, disabledFgColor),
+ NULL, offsetof(BitmapItem, disabledFgColor),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-foreground", NULL, NULL,
- DEF_CANVBMAP_FG, Tk_Offset(BitmapItem, fgColor), 0, NULL},
+ DEF_CANVBMAP_FG, offsetof(BitmapItem, fgColor), 0, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK,
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK,
&stateOption},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
@@ -106,6 +106,8 @@ static void DeleteBitmap(Tk_Canvas canvas,
static void DisplayBitmap(Tk_Canvas canvas,
Tk_Item *itemPtr, Display *display, Drawable dst,
int x, int y, int width, int height);
+static void RotateBitmap(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScaleBitmap(Tk_Canvas canvas,
Tk_Item *itemPtr, double originX, double originY,
double scaleX, double scaleY);
@@ -138,7 +140,8 @@ Tk_ItemType tkBitmapType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateBitmap, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -791,6 +794,39 @@ ScaleBitmap(
/*
*--------------------------------------------------------------
*
+ * RotateBitmap --
+ *
+ * This function is called to rotate a bitmap's origin by a given amount.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the bitmap is rotated by angleRad radians about
+ * (originX, originY), and the bounding box is updated in the generic
+ * part of the item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateBitmap(
+ Tk_Canvas canvas,
+ Tk_Item *itemPtr,
+ double originX,
+ double originY,
+ double angleRad)
+{
+ BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
+
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &bmapPtr->x, &bmapPtr->y);
+ ComputeBitmapBbox(canvas, bmapPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* TranslateBitmap --
*
* This function is called to move an item by a given amount.
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 70b9c79..19e1c70 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -52,15 +52,15 @@ static const Tk_CustomOption tagsOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-activeimage", NULL, NULL,
- NULL, Tk_Offset(ImageItem, activeImageString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ImageItem, activeImageString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
- "center", Tk_Offset(ImageItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "center", offsetof(ImageItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_STRING, "-disabledimage", NULL, NULL,
- NULL, Tk_Offset(ImageItem, disabledImageString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ImageItem, disabledImageString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_STRING, "-image", NULL, NULL,
- NULL, Tk_Offset(ImageItem, imageString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(ImageItem, imageString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
@@ -94,6 +94,8 @@ static void DeleteImage(Tk_Canvas canvas,
static void DisplayImage(Tk_Canvas canvas,
Tk_Item *itemPtr, Display *display, Drawable dst,
int x, int y, int width, int height);
+static void RotateImage(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScaleImage(Tk_Canvas canvas,
Tk_Item *itemPtr, double originX, double originY,
double scaleX, double scaleY);
@@ -126,7 +128,8 @@ Tk_ItemType tkImageType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateImage, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -761,6 +764,40 @@ ImageToPostscript(
/*
*--------------------------------------------------------------
*
+ * RotateImage --
+ *
+ * This function is called to rotate an image's origin by a given amount.
+ * This does *not* rotate the contents of the image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the image anchor is rotated by angleRad radians about
+ * (originX, originY), and the bounding box is updated in the generic
+ * part of the item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateImage(
+ Tk_Canvas canvas,
+ Tk_Item *itemPtr,
+ double originX,
+ double originY,
+ double angleRad)
+{
+ ImageItem *imgPtr = (ImageItem *) itemPtr;
+
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &imgPtr->x, &imgPtr->y);
+ ComputeImageBbox(canvas, imgPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* ScaleImage --
*
* This function is invoked to rescale an item.
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 7e74942..5f2dcb7 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -118,6 +118,8 @@ static int ParseArrowShape(ClientData clientData,
static const char * PrintArrowShape(ClientData clientData,
Tk_Window tkwin, char *recordPtr, int offset,
Tcl_FreeProc **freeProcPtr);
+static void RotateLine(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScaleLine(Tk_Canvas canvas,
Tk_Item *itemPtr, double originX, double originY,
double scaleX, double scaleY);
@@ -158,58 +160,58 @@ static const Tk_CustomOption pixelOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.activeDash),
+ NULL, offsetof(LineItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(LineItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.activeStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(LineItem, outline.activeStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL,
- "0.0", Tk_Offset(LineItem, outline.activeWidth),
+ "0.0", offsetof(LineItem, outline.activeWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_CUSTOM, "-arrow", NULL, NULL,
- "none", Tk_Offset(LineItem, arrow),
+ "none", offsetof(LineItem, arrow),
TK_CONFIG_DONT_SET_DEFAULT, &arrowOption},
{TK_CONFIG_CUSTOM, "-arrowshape", NULL, NULL,
- "8 10 3", Tk_Offset(LineItem, arrowShapeA),
+ "8 10 3", offsetof(LineItem, arrowShapeA),
TK_CONFIG_DONT_SET_DEFAULT, &arrowShapeOption},
{TK_CONFIG_CAP_STYLE, "-capstyle", NULL, NULL,
- "butt", Tk_Offset(LineItem, capStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "butt", offsetof(LineItem, capStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_COLOR, "-fill", NULL, NULL,
- DEF_CANVITEM_OUTLINE, Tk_Offset(LineItem, outline.color), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVITEM_OUTLINE, offsetof(LineItem, outline.color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-dash", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.dash),
+ NULL, offsetof(LineItem, outline.dash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL,
- "0", Tk_Offset(LineItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(LineItem, outline.offset), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.disabledDash),
+ NULL, offsetof(LineItem, outline.disabledDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-disabledfill", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(LineItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.disabledStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(LineItem, outline.disabledStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-disabledwidth", NULL, NULL,
- "0.0", Tk_Offset(LineItem, outline.disabledWidth),
+ "0.0", offsetof(LineItem, outline.disabledWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_JOIN_STYLE, "-joinstyle", NULL, NULL,
- "round", Tk_Offset(LineItem, joinStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "round", offsetof(LineItem, joinStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-offset", NULL, NULL,
- "0,0", Tk_Offset(LineItem, outline.tsoffset),
+ "0,0", offsetof(LineItem, outline.tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_CUSTOM, "-smooth", NULL, NULL,
- "0", Tk_Offset(LineItem, smooth),
+ "0", offsetof(LineItem, smooth),
TK_CONFIG_DONT_SET_DEFAULT, &smoothOption},
{TK_CONFIG_INT, "-splinesteps", NULL, NULL,
- "12", Tk_Offset(LineItem, splineSteps), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "12", offsetof(LineItem, splineSteps), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_BITMAP, "-stipple", NULL, NULL,
- NULL, Tk_Offset(LineItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(LineItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_CUSTOM, "-width", NULL, NULL,
- "1.0", Tk_Offset(LineItem, outline.width),
+ "1.0", offsetof(LineItem, outline.width),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -240,7 +242,8 @@ Tk_ItemType tkLineType = {
LineInsert, /* insertProc */
LineDeleteCoords, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateLine, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -1857,6 +1860,56 @@ TranslateLine(
/*
*--------------------------------------------------------------
*
+ * RotateLine --
+ *
+ * This function is called to rotate a line by a given amount about a
+ * point.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the line is rotated by angleRad about (originX,
+ * originY), and the bounding box is updated in the generic part of the
+ * item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateLine(
+ Tk_Canvas canvas, /* Canvas containing item. */
+ Tk_Item *itemPtr, /* Item that is being moved. */
+ double originX, double originY,
+ double angleRad) /* Amount by which item is to be rotated. */
+{
+ LineItem *linePtr = (LineItem *) itemPtr;
+ double *coordPtr;
+ int i;
+ double s = sin(angleRad), c = cos(angleRad);
+
+ for (i = 0, coordPtr = linePtr->coordPtr; i < linePtr->numPoints;
+ i++, coordPtr += 2) {
+ TkRotatePoint(originX, originY, s, c, &coordPtr[0], &coordPtr[1]);
+ }
+ if (linePtr->firstArrowPtr != NULL) {
+ for (i = 0, coordPtr = linePtr->firstArrowPtr; i < PTS_IN_ARROW;
+ i++, coordPtr += 2) {
+ TkRotatePoint(originX, originY, s, c, &coordPtr[0], &coordPtr[1]);
+ }
+ }
+ if (linePtr->lastArrowPtr != NULL) {
+ for (i = 0, coordPtr = linePtr->lastArrowPtr; i < PTS_IN_ARROW;
+ i++, coordPtr += 2) {
+ TkRotatePoint(originX, originY, s, c, &coordPtr[0], &coordPtr[1]);
+ }
+ }
+ ComputeLineBbox(canvas, linePtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* ParseArrowShape --
*
* This function is called back during option parsing to parse arrow
@@ -1890,7 +1943,7 @@ ParseArrowShape(
int argc;
const char **argv = NULL;
- if (offset != Tk_Offset(LineItem, arrowShapeA)) {
+ if ((size_t)offset != offsetof(LineItem, arrowShapeA)) {
Tcl_Panic("ParseArrowShape received bogus offset");
}
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index a537846..eeba814 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -77,70 +77,69 @@ static const Tk_CustomOption pixelOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.activeDash),
+ NULL, offsetof(PolygonItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-activeoutline", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activeoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.activeStipple),
+ NULL, offsetof(PolygonItem, outline.activeStipple),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL,
- "0.0", Tk_Offset(PolygonItem, outline.activeWidth),
+ "0.0", offsetof(PolygonItem, outline.activeWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_CUSTOM, "-dash", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.dash),
+ NULL, offsetof(PolygonItem, outline.dash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL,
- "0", Tk_Offset(PolygonItem, outline.offset),
+ "0", offsetof(PolygonItem, outline.offset),
TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.disabledDash),
+ NULL, offsetof(PolygonItem, outline.disabledDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-disabledfill", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.disabledColor),
+ NULL, offsetof(PolygonItem, outline.disabledColor),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.disabledStipple),
+ NULL, offsetof(PolygonItem, outline.disabledStipple),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-disabledwidth", NULL, NULL,
- "0.0", Tk_Offset(PolygonItem, outline.disabledWidth),
+ "0.0", offsetof(PolygonItem, outline.disabledWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
- /* Remark: Default for -fill should be NULL, see [2860519]. Will be fixed in Tk 8.7 */
{TK_CONFIG_COLOR, "-fill", NULL, NULL,
- DEF_CANVITEM_OUTLINE, Tk_Offset(PolygonItem, fillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, fillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_JOIN_STYLE, "-joinstyle", NULL, NULL,
- "round", Tk_Offset(PolygonItem, joinStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "round", offsetof(PolygonItem, joinStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-offset", NULL, NULL,
- "0,0", Tk_Offset(PolygonItem, tsoffset),
+ "0,0", offsetof(PolygonItem, tsoffset),
TK_CONFIG_NULL_OK, &offsetOption},
{TK_CONFIG_COLOR, "-outline", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.color), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVITEM_OUTLINE, offsetof(PolygonItem, outline.color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-outlineoffset", NULL, NULL,
- "0,0", Tk_Offset(PolygonItem, outline.tsoffset),
+ "0,0", offsetof(PolygonItem, outline.tsoffset),
TK_CONFIG_NULL_OK, &offsetOption},
{TK_CONFIG_BITMAP, "-outlinestipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-smooth", NULL, NULL,
- "0", Tk_Offset(PolygonItem, smooth),
+ "0", offsetof(PolygonItem, smooth),
TK_CONFIG_DONT_SET_DEFAULT, &smoothOption},
{TK_CONFIG_INT, "-splinesteps", NULL, NULL,
- "12", Tk_Offset(PolygonItem, splineSteps), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "12", offsetof(PolygonItem, splineSteps), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_BITMAP, "-stipple", NULL, NULL,
- NULL, Tk_Offset(PolygonItem, fillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PolygonItem, fillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_CUSTOM, "-width", NULL, NULL,
- "1.0", Tk_Offset(PolygonItem, outline.width),
+ "1.0", offsetof(PolygonItem, outline.width),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -178,6 +177,8 @@ static double PolygonToPoint(Tk_Canvas canvas,
Tk_Item *itemPtr, double *pointPtr);
static int PolygonToPostscript(Tcl_Interp *interp,
Tk_Canvas canvas, Tk_Item *itemPtr, int prepass);
+static void RotatePolygon(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScalePolygon(Tk_Canvas canvas,
Tk_Item *itemPtr, double originX, double originY,
double scaleX, double scaleY);
@@ -210,7 +211,8 @@ Tk_ItemType tkPolygonType = {
PolygonInsert, /* insertProc */
PolygonDeleteCoords, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotatePolygon, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -1740,6 +1742,44 @@ GetPolygonIndex(
/*
*--------------------------------------------------------------
*
+ * RotatePolygon --
+ *
+ * This function is called to rotate a polygon by a given amount about a
+ * point.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the polygon is rotated by angleRad about (originX,
+ * originY), and the bounding box is updated in the generic part of the
+ * item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotatePolygon(
+ Tk_Canvas canvas, /* Canvas containing item. */
+ Tk_Item *itemPtr, /* Item that is being moved. */
+ double originX, double originY,
+ double angleRad) /* Amount by which item is to be rotated. */
+{
+ PolygonItem *polyPtr = (PolygonItem *) itemPtr;
+ double *coordPtr;
+ int i;
+ double s = sin(angleRad), c = cos(angleRad);
+
+ for (i = 0, coordPtr = polyPtr->coordPtr; i < polyPtr->numPoints;
+ i++, coordPtr += 2) {
+ TkRotatePoint(originX, originY, s, c, &coordPtr[0], &coordPtr[1]);
+ }
+ ComputePolygonBbox(canvas, polyPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* TranslatePolygon --
*
* This function is called to move a polygon by a given amount.
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 167f61f..2598d4e 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -94,37 +94,37 @@ typedef struct TkPostscriptInfo {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-colormap", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, colorVar), 0, NULL},
+ "", offsetof(TkPostscriptInfo, colorVar), 0, NULL},
{TK_CONFIG_STRING, "-colormode", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, colorMode), 0, NULL},
+ "", offsetof(TkPostscriptInfo, colorMode), 0, NULL},
{TK_CONFIG_STRING, "-file", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, fileName), 0, NULL},
+ "", offsetof(TkPostscriptInfo, fileName), 0, NULL},
{TK_CONFIG_STRING, "-channel", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, channelName), 0, NULL},
+ "", offsetof(TkPostscriptInfo, channelName), 0, NULL},
{TK_CONFIG_STRING, "-fontmap", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, fontVar), 0, NULL},
+ "", offsetof(TkPostscriptInfo, fontVar), 0, NULL},
{TK_CONFIG_PIXELS, "-height", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, height), 0, NULL},
+ "", offsetof(TkPostscriptInfo, height), 0, NULL},
{TK_CONFIG_ANCHOR, "-pageanchor", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, pageAnchor), 0, NULL},
+ "", offsetof(TkPostscriptInfo, pageAnchor), 0, NULL},
{TK_CONFIG_STRING, "-pageheight", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, pageHeightString), 0, NULL},
+ "", offsetof(TkPostscriptInfo, pageHeightString), 0, NULL},
{TK_CONFIG_STRING, "-pagewidth", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, pageWidthString), 0, NULL},
+ "", offsetof(TkPostscriptInfo, pageWidthString), 0, NULL},
{TK_CONFIG_STRING, "-pagex", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, pageXString), 0, NULL},
+ "", offsetof(TkPostscriptInfo, pageXString), 0, NULL},
{TK_CONFIG_STRING, "-pagey", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, pageYString), 0, NULL},
+ "", offsetof(TkPostscriptInfo, pageYString), 0, NULL},
{TK_CONFIG_BOOLEAN, "-prolog", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, prolog), 0, NULL},
+ "", offsetof(TkPostscriptInfo, prolog), 0, NULL},
{TK_CONFIG_BOOLEAN, "-rotate", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, rotate), 0, NULL},
+ "", offsetof(TkPostscriptInfo, rotate), 0, NULL},
{TK_CONFIG_PIXELS, "-width", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, width), 0, NULL},
+ "", offsetof(TkPostscriptInfo, width), 0, NULL},
{TK_CONFIG_PIXELS, "-x", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, x), 0, NULL},
+ "", offsetof(TkPostscriptInfo, x), 0, NULL},
{TK_CONFIG_PIXELS, "-y", NULL, NULL,
- "", Tk_Offset(TkPostscriptInfo, y), 0, NULL},
+ "", offsetof(TkPostscriptInfo, y), 0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -491,7 +491,7 @@ TkCanvPostscriptCmd(
Tcl_AppendObjToObj(psObj, preambleObj);
if (psInfo.chan != NULL) {
- if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == TCL_IO_FAILURE) {
channelWriteFailed:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"problem writing postscript data to channel: %s",
@@ -545,7 +545,7 @@ TkCanvPostscriptCmd(
psInfo.x, Tk_PostscriptY((double)psInfo.y2,
(Tk_PostscriptInfo)psInfoPtr));
if (psInfo.chan != NULL) {
- if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == TCL_IO_FAILURE) {
goto channelWriteFailed;
}
Tcl_DecrRefCount(psObj);
@@ -587,7 +587,7 @@ TkCanvPostscriptCmd(
Tcl_AppendToObj(psObj, "grestore\n", -1);
if (psInfo.chan != NULL) {
- if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == TCL_IO_FAILURE) {
goto channelWriteFailed;
}
Tcl_DecrRefCount(psObj);
@@ -608,7 +608,7 @@ TkCanvPostscriptCmd(
"%%EOF\n", -1);
if (psInfo.chan != NULL) {
- if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == TCL_IO_FAILURE) {
goto channelWriteFailed;
}
}
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 84b2a23..61aa9be 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -95,38 +95,38 @@ static const Tk_CustomOption offsetOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
- NULL, Tk_Offset(TextItem, activeColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(TextItem, activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
- NULL, Tk_Offset(TextItem, activeStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(TextItem, activeStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
- "center", Tk_Offset(TextItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "center", offsetof(TextItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_DOUBLE, "-angle", NULL, NULL,
- "0.0", Tk_Offset(TextItem, angle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0.0", offsetof(TextItem, angle), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_COLOR, "-disabledfill", NULL, NULL,
- NULL, Tk_Offset(TextItem, disabledColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(TextItem, disabledColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL,
- NULL, Tk_Offset(TextItem, disabledStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(TextItem, disabledStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-fill", NULL, NULL,
- DEF_CANVITEM_OUTLINE, Tk_Offset(TextItem, color), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVITEM_OUTLINE, offsetof(TextItem, color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_FONT, "-font", NULL, NULL,
- DEF_CANVTEXT_FONT, Tk_Offset(TextItem, tkfont), 0, NULL},
+ DEF_CANVTEXT_FONT, offsetof(TextItem, tkfont), 0, NULL},
{TK_CONFIG_JUSTIFY, "-justify", NULL, NULL,
- "left", Tk_Offset(TextItem, justify), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "left", offsetof(TextItem, justify), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-offset", NULL, NULL,
- "0,0", Tk_Offset(TextItem, tsoffset),
+ "0,0", offsetof(TextItem, tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_BITMAP, "-stipple", NULL, NULL,
- NULL, Tk_Offset(TextItem, stipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(TextItem, stipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_STRING, "-text", NULL, NULL,
- "", Tk_Offset(TextItem, text), 0, NULL},
+ "", offsetof(TextItem, text), 0, NULL},
{TK_CONFIG_INT, "-underline", NULL, NULL,
- "-1", Tk_Offset(TextItem, underline), 0, NULL},
+ "-1", offsetof(TextItem, underline), 0, NULL},
{TK_CONFIG_PIXELS, "-width", NULL, NULL,
- "0", Tk_Offset(TextItem, width), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(TextItem, width), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -170,6 +170,8 @@ static double TextToPoint(Tk_Canvas canvas,
Tk_Item *itemPtr, double *pointPtr);
static int TextToPostscript(Tcl_Interp *interp,
Tk_Canvas canvas, Tk_Item *itemPtr, int prepass);
+static void RotateText(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void TranslateText(Tk_Canvas canvas,
Tk_Item *itemPtr, double deltaX, double deltaY);
@@ -199,7 +201,8 @@ Tk_ItemType tkTextType = {
TextInsert, /* insertProc */
TextDeleteChars, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateText, /* rotateProc */
+ 0, NULL, NULL
};
#define ROUND(d) ((int) floor((d) + 0.5))
@@ -1006,12 +1009,13 @@ TextInsert(
Tcl_Obj *obj) /* New characters to be inserted. */
{
TextItem *textPtr = (TextItem *) itemPtr;
- int byteIndex, byteCount, charsAdded;
+ int byteIndex, charsAdded;
+ TkSizeT byteCount;
char *newStr, *text;
const char *string;
Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
- string = Tcl_GetStringFromObj(obj, &byteCount);
+ string = TkGetStringFromObj(obj, &byteCount);
text = textPtr->text;
@@ -1028,7 +1032,7 @@ TextInsert(
}
newStr = ckalloc(textPtr->numBytes + byteCount + 1);
- memcpy(newStr, text, (size_t) byteIndex);
+ memcpy(newStr, text, byteIndex);
strcpy(newStr + byteIndex, string);
strcpy(newStr + byteIndex + byteCount, text + byteIndex);
@@ -1109,7 +1113,7 @@ TextDeleteChars(
- (text + byteIndex);
newStr = ckalloc(textPtr->numBytes + 1 - byteCount);
- memcpy(newStr, text, (size_t) byteIndex);
+ memcpy(newStr, text, byteIndex);
strcpy(newStr + byteIndex, text + byteIndex + byteCount);
ckfree(text);
@@ -1249,6 +1253,39 @@ TextToArea(
/*
*--------------------------------------------------------------
*
+ * RotateText --
+ *
+ * This function is called to rotate a text item by a given amount about a
+ * point. Note that this does *not* rotate the text of the item.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the text anchor is rotated by angleRad about (originX,
+ * originY), and the bounding box is updated in the generic part of the
+ * item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateText(
+ Tk_Canvas canvas, /* Canvas containing item. */
+ Tk_Item *itemPtr, /* Item that is being rotated. */
+ double originX, double originY,
+ double angleRad) /* Amount by which item is to be rotated. */
+{
+ TextItem *textPtr = (TextItem *) itemPtr;
+
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &textPtr->x, &textPtr->y);
+ ComputeTextBbox(canvas, textPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* ScaleText --
*
* This function is invoked to rescale a text item.
@@ -1343,21 +1380,21 @@ GetTextIndex(
* index. */
{
TextItem *textPtr = (TextItem *) itemPtr;
- int length;
+ TkSizeT length;
int c;
TkCanvas *canvasPtr = (TkCanvas *) canvas;
Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
- const char *string = Tcl_GetStringFromObj(obj, &length);
+ const char *string = TkGetStringFromObj(obj, &length);
c = string[0];
- if ((c == 'e') && (strncmp(string, "end", (unsigned) length) == 0)) {
+ if ((c == 'e') && (strncmp(string, "end", length) == 0)) {
*indexPtr = textPtr->numChars;
} else if ((c == 'i')
- && (strncmp(string, "insert", (unsigned) length) == 0)) {
+ && (strncmp(string, "insert", length) == 0)) {
*indexPtr = textPtr->insertPos;
} else if ((c == 's') && (length >= 5)
- && (strncmp(string, "sel.first", (unsigned) length) == 0)) {
+ && (strncmp(string, "sel.first", length) == 0)) {
if (textInfoPtr->selItemPtr != itemPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"selection isn't in item", -1));
@@ -1366,7 +1403,7 @@ GetTextIndex(
}
*indexPtr = textInfoPtr->selectFirst;
} else if ((c == 's') && (length >= 5)
- && (strncmp(string, "sel.last", (unsigned) length) == 0)) {
+ && (strncmp(string, "sel.last", length) == 0)) {
if (textInfoPtr->selItemPtr != itemPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"selection isn't in item", -1));
@@ -1504,7 +1541,7 @@ GetSelText(
if (byteCount <= 0) {
return 0;
}
- memcpy(buffer, selStart + offset, (size_t) byteCount);
+ memcpy(buffer, selStart + offset, byteCount);
buffer[byteCount] = '\0';
return byteCount;
}
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c
index ca3af8f..2c6d480 100644
--- a/generic/tkCanvUtil.c
+++ b/generic/tkCanvUtil.c
@@ -1264,7 +1264,6 @@ Tk_ChangeOutlineGC(
}
return 0;
}
-
/*
*--------------------------------------------------------------
@@ -1864,6 +1863,43 @@ TkCanvTranslatePath(
}
/*
+ *--------------------------------------------------------------
+ *
+ * TkRotatePoint --
+ *
+ * Rotate a point about another point. The angle should be converted into
+ * its sine and cosine before calling this function.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * The point in (*xPtr,*yPtr) is updated to be rotated about
+ * (originX,originY) by the amount given by the sine and cosine of the
+ * angle to rotate.
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+TkRotatePoint(
+ double originX, double originY, /* The point about which to rotate. */
+ double sine, double cosine, /* How much to rotate? */
+ double *xPtr, double *yPtr) /* The point to be rotated. (INOUT) */
+{
+ double x = *xPtr - originX;
+ double y = *yPtr - originY;
+
+ /*
+ * Beware! The canvas coordinate space is flipped vertically, so rotations
+ * go the "wrong" way with respect to mathematics.
+ */
+
+ *xPtr = originX + x * cosine + y * sine;
+ *yPtr = originY - x * sine + y * cosine;
+}
+
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index f73546f..59e81af 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -46,17 +46,17 @@ static const Tk_CustomOption tagsOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_ANCHOR, "-anchor", NULL, NULL,
- "center", Tk_Offset(WindowItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "center", offsetof(WindowItem, anchor), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_PIXELS, "-height", NULL, NULL,
- "0", Tk_Offset(WindowItem, height), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(WindowItem, height), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state), TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_PIXELS, "-width", NULL, NULL,
- "0", Tk_Offset(WindowItem, width), TK_CONFIG_DONT_SET_DEFAULT, NULL},
+ "0", offsetof(WindowItem, width), TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_WINDOW, "-window", NULL, NULL,
- NULL, Tk_Offset(WindowItem, tkwin), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(WindowItem, tkwin), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -77,6 +77,8 @@ static void DeleteWinItem(Tk_Canvas canvas,
static void DisplayWinItem(Tk_Canvas canvas,
Tk_Item *itemPtr, Display *display, Drawable dst,
int x, int y, int width, int height);
+static void RotateWinItem(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScaleWinItem(Tk_Canvas canvas,
Tk_Item *itemPtr, double originX, double originY,
double scaleX, double scaleY);
@@ -130,7 +132,8 @@ Tk_ItemType tkWindowType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateWinItem, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -915,6 +918,40 @@ CanvasPsWindow(
/*
*--------------------------------------------------------------
*
+ * RotateWinItem --
+ *
+ * This function is called to rotate a window item by a given amount
+ * about a point. Note that this does *not* rotate the window of the
+ * item.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the window anchor is rotated by angleRad about (originX,
+ * originY), and the bounding box is updated in the generic part of the
+ * item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateWinItem(
+ Tk_Canvas canvas, /* Canvas containing item. */
+ Tk_Item *itemPtr, /* Item that is being rotated. */
+ double originX, double originY,
+ double angleRad) /* Amount by which item is to be rotated. */
+{
+ WindowItem *winItemPtr = (WindowItem *) itemPtr;
+
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &winItemPtr->x, &winItemPtr->y);
+ ComputeWindowBbox(canvas, winItemPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* ScaleWinItem --
*
* This function is invoked to rescale a window item.
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index ce3dad1..8def19c 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -13,11 +13,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-/* #define USE_OLD_TAG_SEARCH 1 */
-
-#include "default.h"
#include "tkInt.h"
#include "tkCanvas.h"
+#include "default.h"
#ifdef TK_NO_DOUBLE_BUFFERING
#ifdef MAC_OSX_TK
#include "tkMacOSXInt.h"
@@ -28,26 +26,6 @@
* See tkCanvas.h for key data structures used to implement canvases.
*/
-#ifdef USE_OLD_TAG_SEARCH
-/*
- * The structure defined below is used to keep track of a tag search in
- * progress. No field should be accessed by anyone other than StartTagSearch
- * and NextItem.
- */
-
-typedef struct TagSearch {
- TkCanvas *canvasPtr; /* Canvas widget being searched. */
- Tk_Uid tag; /* Tag to search for. 0 means return all
- * items. */
- Tk_Item *currentPtr; /* Pointer to last item returned. */
- Tk_Item *lastPtr; /* The item right before the currentPtr is
- * tracked so if the currentPtr is deleted we
- * don't have to start from the beginning. */
- int searchOver; /* Non-zero means NextItem should always
- * return NULL. */
-} TagSearch;
-
-#else /* USE_OLD_TAG_SEARCH */
/*
* The structure defined below is used to keep track of a tag search in
* progress. No field should be accessed by anyone other than TagSearchScan,
@@ -94,8 +72,6 @@ typedef struct TagSearch {
#define SEARCH_TYPE_TAG 3 /* Looking for an item by simple tag */
#define SEARCH_TYPE_EXPR 4 /* Compound search */
-#endif /* USE_OLD_TAG_SEARCH */
-
/*
* Custom option for handling "-state" and "-offset"
*/
@@ -115,92 +91,92 @@ static const Tk_CustomOption offsetOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_CANVAS_BG_COLOR, Tk_Offset(TkCanvas, bgBorder),
+ DEF_CANVAS_BG_COLOR, offsetof(TkCanvas, bgBorder),
TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_CANVAS_BG_MONO, Tk_Offset(TkCanvas, bgBorder),
+ DEF_CANVAS_BG_MONO, offsetof(TkCanvas, bgBorder),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL},
{TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL},
{TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_CANVAS_BORDER_WIDTH, Tk_Offset(TkCanvas, borderWidth), 0, NULL},
+ DEF_CANVAS_BORDER_WIDTH, offsetof(TkCanvas, borderWidth), 0, NULL},
{TK_CONFIG_DOUBLE, "-closeenough", "closeEnough", "CloseEnough",
- DEF_CANVAS_CLOSE_ENOUGH, Tk_Offset(TkCanvas, closeEnough), 0, NULL},
+ DEF_CANVAS_CLOSE_ENOUGH, offsetof(TkCanvas, closeEnough), 0, NULL},
{TK_CONFIG_BOOLEAN, "-confine", "confine", "Confine",
- DEF_CANVAS_CONFINE, Tk_Offset(TkCanvas, confine), 0, NULL},
+ DEF_CANVAS_CONFINE, offsetof(TkCanvas, confine), 0, NULL},
{TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_CANVAS_CURSOR, Tk_Offset(TkCanvas, cursor), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVAS_CURSOR, offsetof(TkCanvas, cursor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-height", "height", "Height",
- DEF_CANVAS_HEIGHT, Tk_Offset(TkCanvas, height), 0, NULL},
+ DEF_CANVAS_HEIGHT, offsetof(TkCanvas, height), 0, NULL},
{TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_CANVAS_HIGHLIGHT_BG,
- Tk_Offset(TkCanvas, highlightBgColorPtr), 0, NULL},
+ offsetof(TkCanvas, highlightBgColorPtr), 0, NULL},
{TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_CANVAS_HIGHLIGHT, Tk_Offset(TkCanvas, highlightColorPtr), 0, NULL},
+ DEF_CANVAS_HIGHLIGHT, offsetof(TkCanvas, highlightColorPtr), 0, NULL},
{TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness",
- DEF_CANVAS_HIGHLIGHT_WIDTH, Tk_Offset(TkCanvas, highlightWidth), 0, NULL},
+ DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidth), 0, NULL},
{TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground",
- DEF_CANVAS_INSERT_BG, Tk_Offset(TkCanvas, textInfo.insertBorder), 0, NULL},
+ DEF_CANVAS_INSERT_BG, offsetof(TkCanvas, textInfo.insertBorder), 0, NULL},
{TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth",
DEF_CANVAS_INSERT_BD_COLOR,
- Tk_Offset(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_COLOR_ONLY, NULL},
+ offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth",
DEF_CANVAS_INSERT_BD_MONO,
- Tk_Offset(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_MONO_ONLY, NULL},
+ offsetof(TkCanvas, textInfo.insertBorderWidth), TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_CANVAS_INSERT_OFF_TIME, Tk_Offset(TkCanvas, insertOffTime), 0, NULL},
+ DEF_CANVAS_INSERT_OFF_TIME, offsetof(TkCanvas, insertOffTime), 0, NULL},
{TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_CANVAS_INSERT_ON_TIME, Tk_Offset(TkCanvas, insertOnTime), 0, NULL},
+ DEF_CANVAS_INSERT_ON_TIME, offsetof(TkCanvas, insertOnTime), 0, NULL},
{TK_CONFIG_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_CANVAS_INSERT_WIDTH, Tk_Offset(TkCanvas, textInfo.insertWidth), 0, NULL},
+ DEF_CANVAS_INSERT_WIDTH, offsetof(TkCanvas, textInfo.insertWidth), 0, NULL},
{TK_CONFIG_CUSTOM, "-offset", "offset", "Offset", "0,0",
- Tk_Offset(TkCanvas, tsoffset),TK_CONFIG_DONT_SET_DEFAULT,
+ offsetof(TkCanvas, tsoffset),TK_CONFIG_DONT_SET_DEFAULT,
&offsetOption},
{TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
- DEF_CANVAS_RELIEF, Tk_Offset(TkCanvas, relief), 0, NULL},
+ DEF_CANVAS_RELIEF, offsetof(TkCanvas, relief), 0, NULL},
{TK_CONFIG_STRING, "-scrollregion", "scrollRegion", "ScrollRegion",
- DEF_CANVAS_SCROLL_REGION, Tk_Offset(TkCanvas, regionString),
+ DEF_CANVAS_SCROLL_REGION, offsetof(TkCanvas, regionString),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_CANVAS_SELECT_COLOR, Tk_Offset(TkCanvas, textInfo.selBorder),
+ DEF_CANVAS_SELECT_COLOR, offsetof(TkCanvas, textInfo.selBorder),
TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_CANVAS_SELECT_MONO, Tk_Offset(TkCanvas, textInfo.selBorder),
+ DEF_CANVAS_SELECT_MONO, offsetof(TkCanvas, textInfo.selBorder),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth",
DEF_CANVAS_SELECT_BD_COLOR,
- Tk_Offset(TkCanvas, textInfo.selBorderWidth), TK_CONFIG_COLOR_ONLY, NULL},
+ offsetof(TkCanvas, textInfo.selBorderWidth), TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth",
- DEF_CANVAS_SELECT_BD_MONO, Tk_Offset(TkCanvas, textInfo.selBorderWidth),
+ DEF_CANVAS_SELECT_BD_MONO, offsetof(TkCanvas, textInfo.selBorderWidth),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_CANVAS_SELECT_FG_COLOR, Tk_Offset(TkCanvas, textInfo.selFgColorPtr),
+ DEF_CANVAS_SELECT_FG_COLOR, offsetof(TkCanvas, textInfo.selFgColorPtr),
TK_CONFIG_COLOR_ONLY|TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_CANVAS_SELECT_FG_MONO, Tk_Offset(TkCanvas, textInfo.selFgColorPtr),
+ DEF_CANVAS_SELECT_FG_MONO, offsetof(TkCanvas, textInfo.selFgColorPtr),
TK_CONFIG_MONO_ONLY|TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-state", "state", "State",
- "normal", Tk_Offset(TkCanvas, canvas_state), TK_CONFIG_DONT_SET_DEFAULT,
+ "normal", offsetof(TkCanvas, canvas_state), TK_CONFIG_DONT_SET_DEFAULT,
&stateOption},
{TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_CANVAS_TAKE_FOCUS, Tk_Offset(TkCanvas, takeFocus),
+ DEF_CANVAS_TAKE_FOCUS, offsetof(TkCanvas, takeFocus),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-width", "width", "Width",
- DEF_CANVAS_WIDTH, Tk_Offset(TkCanvas, width), 0, NULL},
+ DEF_CANVAS_WIDTH, offsetof(TkCanvas, width), 0, NULL},
{TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_CANVAS_X_SCROLL_CMD, Tk_Offset(TkCanvas, xScrollCmd),
+ DEF_CANVAS_X_SCROLL_CMD, offsetof(TkCanvas, xScrollCmd),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-xscrollincrement", "xScrollIncrement",
"ScrollIncrement",
- DEF_CANVAS_X_SCROLL_INCREMENT, Tk_Offset(TkCanvas, xScrollIncrement),
+ DEF_CANVAS_X_SCROLL_INCREMENT, offsetof(TkCanvas, xScrollIncrement),
0, NULL},
{TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- DEF_CANVAS_Y_SCROLL_CMD, Tk_Offset(TkCanvas, yScrollCmd),
+ DEF_CANVAS_Y_SCROLL_CMD, offsetof(TkCanvas, yScrollCmd),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-yscrollincrement", "yScrollIncrement",
"ScrollIncrement",
- DEF_CANVAS_Y_SCROLL_INCREMENT, Tk_Offset(TkCanvas, yScrollIncrement),
+ DEF_CANVAS_Y_SCROLL_INCREMENT, offsetof(TkCanvas, yScrollIncrement),
0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -215,7 +191,6 @@ static Tk_ItemType *typeList = NULL;
* yet. */
TCL_DECLARE_MUTEX(typeListMutex)
-#ifndef USE_OLD_TAG_SEARCH
/*
* Uids for operands in compiled advanced tag search expressions.
* Initialization is done by GetStaticUids()
@@ -236,7 +211,6 @@ typedef struct {
static Tcl_ThreadDataKey dataKey;
static SearchUids * GetStaticUids(void);
-#endif /* USE_OLD_TAG_SEARCH */
/*
* Prototypes for functions defined later in this file:
@@ -267,39 +241,28 @@ static void CanvasWorldChanged(ClientData instanceData);
static int ConfigureCanvas(Tcl_Interp *interp,
TkCanvas *canvasPtr, int argc,
Tcl_Obj *const *argv, int flags);
-static void DestroyCanvas(char *memPtr);
+static void DefaultRotateImplementation(TkCanvas *canvasPtr,
+ Tk_Item *itemPtr, double x, double y,
+ double angleRadians);
+static void DestroyCanvas(void *memPtr);
+static int DrawCanvas(Tcl_Interp *interp, ClientData clientData, Tk_PhotoHandle photohandle, int subsample, int zoom);
static void DisplayCanvas(ClientData clientData);
static void DoItem(Tcl_Obj *accumObj,
Tk_Item *itemPtr, Tk_Uid tag);
static void EventuallyRedrawItem(TkCanvas *canvasPtr,
Tk_Item *itemPtr);
-#ifdef USE_OLD_TAG_SEARCH
-static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr,
- int argc, Tcl_Obj *const *argv,
- Tcl_Obj *newTagObj, int first);
-#else /* USE_OLD_TAG_SEARCH */
static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr,
int argc, Tcl_Obj *const *argv,
Tcl_Obj *newTagObj, int first,
TagSearch **searchPtrPtr);
-#endif /* USE_OLD_TAG_SEARCH */
static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr,
Tcl_Obj *const *argv, Tk_Uid uid, int enclosed);
static double GridAlign(double coord, double spacing);
static const char** TkGetStringsFromObjs(int argc, Tcl_Obj *const *objv);
static void InitCanvas(void);
-#ifdef USE_OLD_TAG_SEARCH
-static Tk_Item * NextItem(TagSearch *searchPtr);
-#endif /* USE_OLD_TAG_SEARCH */
static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr);
static Tcl_Obj * ScrollFractions(int screen1,
int screen2, int object1, int object2);
-#ifdef USE_OLD_TAG_SEARCH
-static void RelinkItems(TkCanvas *canvasPtr,
- Tcl_Obj *tag, Tk_Item *prevPtr);
-static Tk_Item * StartTagSearch(TkCanvas *canvasPtr,
- Tcl_Obj *tag, TagSearch *searchPtr);
-#else /* USE_OLD_TAG_SEARCH */
static int RelinkItems(TkCanvas *canvasPtr, Tcl_Obj *tag,
Tk_Item *prevPtr, TagSearch **searchPtrPtr);
static void TagSearchExprInit(TagSearchExpr **exprPtrPtr);
@@ -313,7 +276,6 @@ static int TagSearchEvalExpr(TagSearchExpr *expr,
Tk_Item *itemPtr);
static Tk_Item * TagSearchFirst(TagSearch *searchPtr);
static Tk_Item * TagSearchNext(TagSearch *searchPtr);
-#endif /* USE_OLD_TAG_SEARCH */
/*
* The structure below defines canvas class behavior by means of functions
@@ -331,17 +293,6 @@ static const Tk_ClassProcs canvasClass = {
* Macros that significantly simplify all code that finds items.
*/
-#ifdef USE_OLD_TAG_SEARCH
-#define FIRST_CANVAS_ITEM_MATCHING(objPtr,searchPtrPtr,errorExitClause) \
- itemPtr = StartTagSearch(canvasPtr,(objPtr),&search)
-#define FOR_EVERY_CANVAS_ITEM_MATCHING(objPtr,searchPtrPtr,errorExitClause) \
- for (itemPtr = StartTagSearch(canvasPtr, (objPtr), &search); \
- itemPtr != NULL; itemPtr = NextItem(&search))
-#define FIND_ITEMS(objPtr, n) \
- FindItems(interp, canvasPtr, objc, objv, (objPtr), (n))
-#define RELINK_ITEMS(objPtr, itemPtr) \
- RelinkItems(canvasPtr, (objPtr), (itemPtr))
-#else /* USE_OLD_TAG_SEARCH */
#define FIRST_CANVAS_ITEM_MATCHING(objPtr,searchPtrPtr,errorExitClause) \
if ((result=TagSearchScan(canvasPtr,(objPtr),(searchPtrPtr))) != TCL_OK){ \
errorExitClause; \
@@ -357,7 +308,6 @@ static const Tk_ClassProcs canvasClass = {
FindItems(interp, canvasPtr, objc, objv, (objPtr), (n), &searchPtr)
#define RELINK_ITEMS(objPtr, itemPtr) \
result = RelinkItems(canvasPtr, (objPtr), (itemPtr), &searchPtr)
-#endif /* USE_OLD_TAG_SEARCH */
/*
* ----------------------------------------------------------------------
@@ -613,6 +563,102 @@ ItemTranslate(
itemPtr->typePtr->translateProc((Tk_Canvas) canvasPtr, itemPtr,
xDelta, yDelta);
}
+
+static inline void
+ItemRotate(
+ TkCanvas *canvasPtr,
+ Tk_Item *itemPtr,
+ double x,
+ double y,
+ double angleRadians)
+{
+ if (itemPtr->typePtr->rotateProc != NULL) {
+ itemPtr->typePtr->rotateProc((Tk_Canvas) canvasPtr,
+ itemPtr, x, y, angleRadians);
+ } else {
+ DefaultRotateImplementation(canvasPtr, itemPtr, x, y, angleRadians);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * DefaultRotateImplementation --
+ *
+ * The default implementation of the rotation operation, used when items
+ * do not provide their own version.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+DefaultRotateImplementation(
+ TkCanvas *canvasPtr,
+ Tk_Item *itemPtr,
+ double x,
+ double y,
+ double angleRadians)
+{
+ int objc, i, ok = 1;
+ Tcl_Obj **objv, **newObjv;
+ double *coordv;
+ double s = sin(angleRadians);
+ double c = cos(angleRadians);
+ Tcl_Interp *interp = canvasPtr->interp;
+
+ /*
+ * Get the coordinates out of the item.
+ */
+
+ if (ItemCoords(canvasPtr, itemPtr, 0, NULL) == TCL_OK &&
+ Tcl_ListObjGetElements(NULL, Tcl_GetObjResult(interp),
+ &objc, &objv) == TCL_OK) {
+ coordv = (double *) ckalloc(sizeof(double) * objc);
+ for (i=0 ; i<objc ; i++) {
+ if (Tcl_GetDoubleFromObj(NULL, objv[i], &coordv[i]) != TCL_OK) {
+ ok = 0;
+ break;
+ }
+ }
+ if (ok) {
+ /*
+ * Apply the rotation.
+ */
+
+ for (i=0 ; i<objc ; i+=2) {
+ double px = coordv[i+0] - x;
+ double py = coordv[i+1] - y;
+ double nx = px * c - py * s;
+ double ny = px * s + py * c;
+
+ coordv[i+0] = nx + x;
+ coordv[i+1] = ny + y;
+ }
+
+ /*
+ * Write the coordinates back into the item.
+ */
+
+ newObjv = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * objc);
+ for (i=0 ; i<objc ; i++) {
+ newObjv[i] = Tcl_NewDoubleObj(coordv[i]);
+ Tcl_IncrRefCount(newObjv[i]);
+ }
+ ItemCoords(canvasPtr, itemPtr, objc, newObjv);
+ for (i=0 ; i<objc ; i++) {
+ Tcl_DecrRefCount(newObjv[i]);
+ }
+ ckfree((char *) newObjv);
+ }
+ ckfree((char *) coordv);
+ }
+
+ /*
+ * The interpreter result was (probably) modified above; reset it.
+ */
+
+ Tcl_ResetResult(interp);
+}
/*
*--------------------------------------------------------------
@@ -735,9 +781,7 @@ Tk_CanvasObjCmd(
canvasPtr->tsoffset.flags = 0;
canvasPtr->tsoffset.xoffset = 0;
canvasPtr->tsoffset.yoffset = 0;
-#ifndef USE_OLD_TAG_SEARCH
canvasPtr->bindTagExprs = NULL;
-#endif
Tcl_InitHashTable(&canvasPtr->idTable, TCL_ONE_WORD_KEYS);
Tk_SetClass(canvasPtr->tkwin, "Canvas");
@@ -792,12 +836,8 @@ CanvasWidgetCmd(
int c, result;
Tk_Item *itemPtr = NULL; /* Initialization needed only to prevent
* compiler warning. */
-#ifdef USE_OLD_TAG_SEARCH
- TagSearch search;
-#else /* USE_OLD_TAG_SEARCH */
TagSearch *searchPtr = NULL;/* Allocated by first TagSearchScan, freed by
* TagSearchDestroy */
-#endif /* USE_OLD_TAG_SEARCH */
int index;
static const char *const optionStrings[] = {
@@ -805,23 +845,24 @@ CanvasWidgetCmd(
"canvasy", "cget", "configure", "coords",
"create", "dchars", "delete", "dtag",
"find", "focus", "gettags", "icursor",
- "imove", "index", "insert", "itemcget",
- "itemconfigure",
+ "image", "imove", "index", "insert",
+ "itemcget", "itemconfigure",
"lower", "move", "moveto", "postscript",
- "raise", "rchars", "scale", "scan",
- "select", "type", "xview", "yview",
- NULL
+ "raise", "rchars", "rotate", "scale",
+ "scan", "select", "type", "xview",
+ "yview", NULL
};
enum options {
CANV_ADDTAG, CANV_BBOX, CANV_BIND, CANV_CANVASX,
CANV_CANVASY, CANV_CGET, CANV_CONFIGURE, CANV_COORDS,
CANV_CREATE, CANV_DCHARS, CANV_DELETE, CANV_DTAG,
CANV_FIND, CANV_FOCUS, CANV_GETTAGS, CANV_ICURSOR,
- CANV_IMOVE, CANV_INDEX, CANV_INSERT, CANV_ITEMCGET,
- CANV_ITEMCONFIGURE,
+ CANV_IMAGE, CANV_IMOVE, CANV_INDEX, CANV_INSERT,
+ CANV_ITEMCGET, CANV_ITEMCONFIGURE,
CANV_LOWER, CANV_MOVE, CANV_MOVETO, CANV_POSTSCRIPT,
- CANV_RAISE, CANV_RCHARS, CANV_SCALE, CANV_SCAN,
- CANV_SELECT, CANV_TYPE, CANV_XVIEW, CANV_YVIEW
+ CANV_RAISE, CANV_RCHARS, CANV_ROTATE, CANV_SCALE,
+ CANV_SCAN, CANV_SELECT, CANV_TYPE, CANV_XVIEW,
+ CANV_YVIEW
};
if (objc < 2) {
@@ -888,16 +929,16 @@ CanvasWidgetCmd(
if (gotAny) {
Tcl_Obj *resultObjs[4];
- resultObjs[0] = Tcl_NewIntObj(x1);
- resultObjs[1] = Tcl_NewIntObj(y1);
- resultObjs[2] = Tcl_NewIntObj(x2);
- resultObjs[3] = Tcl_NewIntObj(y2);
+ resultObjs[0] = Tcl_NewWideIntObj(x1);
+ resultObjs[1] = Tcl_NewWideIntObj(y1);
+ resultObjs[2] = Tcl_NewWideIntObj(x2);
+ resultObjs[3] = Tcl_NewWideIntObj(y2);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, resultObjs));
}
break;
}
case CANV_BIND: {
- ClientData object;
+ void *object;
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "tagOrId ?sequence? ?command?");
@@ -911,35 +952,6 @@ CanvasWidgetCmd(
*/
object = NULL;
-#ifdef USE_OLD_TAG_SEARCH
- if (isdigit(UCHAR(Tcl_GetString(objv[2])[0]))) {
- int id;
- char *end;
- Tcl_HashEntry *entryPtr;
-
- id = strtoul(Tcl_GetString(objv[2]), &end, 0);
- if (*end != 0) {
- goto bindByTag;
- }
- entryPtr = Tcl_FindHashEntry(&canvasPtr->idTable, (char *) id);
- if (entryPtr != NULL) {
- itemPtr = Tcl_GetHashValue(entryPtr);
- object = itemPtr;
- }
-
- if (object == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "item \"%s\" doesn't exist", Tcl_GetString(objv[2])));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "CANVAS_ITEM",
- Tcl_GetString(objv[2]), NULL);
- result = TCL_ERROR;
- goto done;
- }
- } else {
- bindByTag:
- object = Tk_GetUid(Tcl_GetString(objv[2]));
- }
-#else /* USE_OLD_TAG_SEARCH */
result = TagSearchScan(canvasPtr, objv[2], &searchPtr);
if (result != TCL_OK) {
goto done;
@@ -948,7 +960,7 @@ CanvasWidgetCmd(
Tcl_HashEntry *entryPtr;
entryPtr = Tcl_FindHashEntry(&canvasPtr->idTable,
- (char *) INT2PTR(searchPtr->id));
+ INT2PTR(searchPtr->id));
if (entryPtr != NULL) {
itemPtr = Tcl_GetHashValue(entryPtr);
object = itemPtr;
@@ -963,9 +975,8 @@ CanvasWidgetCmd(
goto done;
}
} else {
- object = (ClientData) searchPtr->expr->uid;
+ object = (char *)searchPtr->expr->uid;
}
-#endif /* USE_OLD_TAG_SEARCH */
/*
* Make a binding table if the canvas doesn't already have one.
@@ -985,7 +996,6 @@ CanvasWidgetCmd(
object, Tcl_GetString(objv[3]));
goto done;
}
-#ifndef USE_OLD_TAG_SEARCH
if (searchPtr->type == SEARCH_TYPE_EXPR) {
/*
* If new tag expression, then insert in linked list.
@@ -1016,7 +1026,6 @@ CanvasWidgetCmd(
searchPtr->expr = NULL;
}
}
-#endif /* not USE_OLD_TAG_SEARCH */
if (argv4[0] == '+') {
argv4++;
append = 1;
@@ -1242,15 +1251,14 @@ CanvasWidgetCmd(
int isNew = 0;
Tcl_HashEntry *entryPtr;
const char *arg;
- size_t length;
+ TkSizeT length;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv, "type coords ?arg ...?");
result = TCL_ERROR;
goto done;
}
- arg = Tcl_GetString(objv[2]);
- length = objv[2]->length;
+ arg = TkGetStringFromObj(objv[2], &length);
c = arg[0];
/*
@@ -1315,7 +1323,7 @@ CanvasWidgetCmd(
itemPtr->nextPtr = NULL;
entryPtr = Tcl_CreateHashEntry(&canvasPtr->idTable,
- (char *) INT2PTR(itemPtr->id), &isNew);
+ INT2PTR(itemPtr->id), &isNew);
Tcl_SetHashValue(entryPtr, itemPtr);
itemPtr->prevPtr = canvasPtr->lastItemPtr;
canvasPtr->hotPtr = itemPtr;
@@ -1329,7 +1337,7 @@ CanvasWidgetCmd(
itemPtr->redraw_flags |= FORCE_REDRAW;
EventuallyRedrawItem(canvasPtr, itemPtr);
canvasPtr->flags |= REPICK_NEEDED;
- Tcl_SetObjResult(interp, Tcl_NewIntObj(itemPtr->id));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(itemPtr->id));
break;
}
case CANV_DCHARS: {
@@ -1394,7 +1402,7 @@ CanvasWidgetCmd(
ckfree(itemPtr->tagPtr);
}
entryPtr = Tcl_FindHashEntry(&canvasPtr->idTable,
- (char *) INT2PTR(itemPtr->id));
+ INT2PTR(itemPtr->id));
Tcl_DeleteHashEntry(entryPtr);
if (itemPtr->nextPtr != NULL) {
itemPtr->nextPtr->prevPtr = itemPtr->prevPtr;
@@ -1475,7 +1483,7 @@ CanvasWidgetCmd(
itemPtr = canvasPtr->textInfo.focusItemPtr;
if (objc == 2) {
if (itemPtr != NULL) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(itemPtr->id));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(itemPtr->id));
}
goto done;
}
@@ -1567,7 +1575,7 @@ CanvasWidgetCmd(
if (result != TCL_OK) {
goto done;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
break;
}
case CANV_INSERT: {
@@ -1850,6 +1858,30 @@ CanvasWidgetCmd(
}
break;
}
+ case CANV_ROTATE: {
+ double x, y, angle;
+ Tk_Canvas canvas = (Tk_Canvas) canvasPtr;
+
+ if (objc != 6) {
+ Tcl_WrongNumArgs(interp, 2, objv, "tagOrId x y angle");
+ result = TCL_ERROR;
+ goto done;
+ }
+ if (Tk_CanvasGetCoordFromObj(interp, canvas, objv[3], &x) != TCL_OK ||
+ Tk_CanvasGetCoordFromObj(interp, canvas, objv[4], &y) != TCL_OK ||
+ Tcl_GetDoubleFromObj(interp, objv[5], &angle) != TCL_OK) {
+ result = TCL_ERROR;
+ goto done;
+ }
+ angle = angle * 3.1415927 / 180.0;
+ FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done) {
+ EventuallyRedrawItem(canvasPtr, itemPtr);
+ ItemRotate(canvasPtr, itemPtr, x, y, angle);
+ EventuallyRedrawItem(canvasPtr, itemPtr);
+ canvasPtr->flags |= REPICK_NEEDED;
+ }
+ break;
+ }
case CANV_SCALE: {
double xOrigin, yOrigin, xScale, yScale;
@@ -2014,7 +2046,7 @@ CanvasWidgetCmd(
}
if (canvasPtr->textInfo.selItemPtr != NULL) {
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(canvasPtr->textInfo.selItemPtr->id));
+ Tcl_NewWideIntObj(canvasPtr->textInfo.selItemPtr->id));
}
break;
case CANV_TO:
@@ -2131,12 +2163,50 @@ CanvasWidgetCmd(
CanvasSetOrigin(canvasPtr, canvasPtr->xOrigin, newY);
break;
}
+ case CANV_IMAGE: {
+ Tk_PhotoHandle photohandle;
+ int subsample = 1, zoom = 1;
+
+ if (objc < 3 || objc > 5) {
+ Tcl_WrongNumArgs(interp, 2, objv, "imagename ?subsample? ?zoom?");
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ if ((photohandle = Tk_FindPhoto(interp, Tcl_GetString(objv[2]) )) == 0) {
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * If we are given a subsample or a zoom then grab them.
+ */
+
+ if (objc >= 4 && Tcl_GetIntFromObj(interp, objv[3], &subsample) != TCL_OK) {
+ result = TCL_ERROR;
+ goto done;
+ }
+ if (objc >= 5 && Tcl_GetIntFromObj(interp, objv[4], &zoom) != TCL_OK) {
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * Set the image size to zero, which allows the DrawCanvas() function
+ * to expand the image automatically when it copies the pixmap into it.
+ */
+
+ if (Tk_PhotoSetSize(interp, photohandle, 0, 0) != TCL_OK) {
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ result = DrawCanvas(interp, clientData, photohandle, subsample, zoom);
+ }
}
done:
-#ifndef USE_OLD_TAG_SEARCH
TagSearchDestroy(searchPtr);
-#endif /* not USE_OLD_TAG_SEARCH */
Tcl_Release(canvasPtr);
return result;
}
@@ -2161,13 +2231,11 @@ CanvasWidgetCmd(
static void
DestroyCanvas(
- char *memPtr) /* Info about canvas widget. */
+ void *memPtr) /* Info about canvas widget. */
{
- TkCanvas *canvasPtr = (TkCanvas *) memPtr;
+ TkCanvas *canvasPtr = memPtr;
Tk_Item *itemPtr;
-#ifndef USE_OLD_TAG_SEARCH
TagSearchExpr *expr, *next;
-#endif
/*
* Free up all of the items in the canvas.
@@ -2192,14 +2260,12 @@ DestroyCanvas(
if (canvasPtr->pixmapGC != NULL) {
Tk_FreeGC(canvasPtr->display, canvasPtr->pixmapGC);
}
-#ifndef USE_OLD_TAG_SEARCH
expr = canvasPtr->bindTagExprs;
while (expr) {
next = expr->next;
TagSearchExprDestroy(expr);
expr = next;
}
-#endif /* USE_OLD_TAG_SEARCH */
Tcl_DeleteTimerHandler(canvasPtr->insertBlinkHandler);
if (canvasPtr->bindingTable != NULL) {
Tk_DeleteBindingTable(canvasPtr->bindingTable);
@@ -2419,6 +2485,500 @@ CanvasWorldChanged(
/*
*----------------------------------------------------------------------
*
+ * DecomposeMaskToShiftAndBits --
+ *
+ * Given a 32 bit pixel mask, we find the position of the lowest bit and the
+ * width of the mask bits.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+* None.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+DecomposeMaskToShiftAndBits(
+ unsigned long mask, /* The pixel mask to examine */
+ int *shift, /* Where to put the shift count (position of lowest bit) */
+ int *bits) /* Where to put the bit count (width of the pixel mask) */
+{
+ int i;
+
+ *shift = 0;
+ *bits = 0;
+
+ /*
+ * Find the lowest '1' bit in the mask.
+ */
+
+ for (i = 0; i < 32; ++i) {
+ if (mask & 1 << i)
+ break;
+ }
+ if (i < 32) {
+ *shift = i;
+
+ /*
+ * Now find the next '0' bit and the width of the mask.
+ */
+
+ for ( ; i < 32; ++i) {
+ if ((mask & 1 << i) == 0)
+ break;
+ else
+ ++*bits;
+ }
+
+ /*
+ * Limit to the top 8 bits if the mask was wider than 8.
+ */
+
+ if (*bits > 8) {
+ *shift += *bits - 8;
+ *bits = 8;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DrawCanvas --
+ *
+ * This function draws the contents of a canvas into the given Photo image.
+ * This function is called from the widget "image" subcommand.
+ * The canvas does not need to be mapped (one of it's ancestors must be)
+ * in order for this function to work.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Canvas contents from within the -scrollregion or widget size are rendered
+ * into the Photo. Any errors are left in the result.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define OVERDRAW_PIXELS 32 /* How much larger we make the pixmap
+ * that the canvas objects are drawn into */
+
+/* From stackoverflow.com/questions/2100331/c-macro-definition-to-determine-big-endian-or-little-endian-machine */
+#define IS_BIG_ENDIAN (*(unsigned short *)"\0\xff" < 0x100)
+
+#define BYTE_SWAP16(n) ((((unsigned short)n)>>8) | (((unsigned short)n)<<8))
+#define BYTE_SWAP32(n) (((n>>24)&0x000000FF) | ((n<<8)&0x00FF0000) | ((n>>8)&0x0000FF00) | ((n<<24)&0xFF000000))
+
+static int
+DrawCanvas(
+ Tcl_Interp *interp, /* As passed to the widget command, and we will leave errors here */
+ ClientData clientData,
+ Tk_PhotoHandle photohandle, /* The photo we are rendering into */
+ int subsample, /* If either subsample or zoom are not 1 then we call Tk_PhotoPutZoomedBlock() */
+ int zoom)
+{
+ TkCanvas * canvasPtr = clientData;
+ Tk_Window tkwin;
+ Display *displayPtr;
+ Tk_PhotoImageBlock blockPtr = {0};
+ Window wid;
+ Tk_Item * itemPtr;
+ Pixmap pixmap = 0;
+ XImage *ximagePtr = NULL;
+ Visual *visualPtr;
+ GC xgc = 0;
+ XGCValues xgcValues;
+ int canvasX1, canvasY1, canvasX2, canvasY2, cWidth, cHeight,
+ pixmapX1, pixmapY1, pixmapX2, pixmapY2, pmWidth, pmHeight,
+ bitsPerPixel, bytesPerPixel, x, y, result = TCL_OK,
+ rshift, gshift, bshift, rbits, gbits, bbits;
+
+#ifdef DEBUG_DRAWCANVAS
+ char buffer[128];
+#endif
+
+ if ((tkwin = canvasPtr->tkwin) == NULL) {
+ Tcl_AppendResult(interp, "canvas tkwin is NULL!", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * If this canvas is unmapped, then we won't have a window id, so we will
+ * try the ancestors of the canvas until we find a window that has a
+ * valid window id. The Tk_GetPixmap() call requires a valid window id.
+ */
+
+ do {
+
+ if ((displayPtr = Tk_Display(tkwin)) == NULL) {
+ Tcl_AppendResult(interp, "canvas (or parent) display is NULL!", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ if ((wid = Tk_WindowId(tkwin)) != 0) {
+ continue;
+ }
+
+ if ((tkwin = Tk_Parent(tkwin)) == NULL) {
+ Tcl_AppendResult(interp, "canvas has no parent with a valid window id! Is the toplevel window mapped?", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ } while (wid == 0);
+
+ bitsPerPixel = Tk_Depth(tkwin);
+ visualPtr = Tk_Visual(tkwin);
+
+ if (subsample == 0) {
+ Tcl_AppendResult(interp, "subsample cannot be zero", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * Scan through the item list, registering the bounding box for all items
+ * that didn't do that for the final coordinates yet. This can be
+ * determined by the FORCE_REDRAW flag.
+ */
+
+ for (itemPtr = canvasPtr -> firstItemPtr; itemPtr != NULL;
+ itemPtr = itemPtr -> nextPtr) {
+ if (itemPtr -> redraw_flags & FORCE_REDRAW) {
+ itemPtr -> redraw_flags &= ~FORCE_REDRAW;
+ EventuallyRedrawItem(canvasPtr, itemPtr);
+ itemPtr -> redraw_flags &= ~FORCE_REDRAW;
+ }
+ }
+
+ /*
+ * The DisplayCanvas() function works out the region that needs redrawing,
+ * but we don't do this. We grab the whole scrollregion or canvas window
+ * area. If we have a defined -scrollregion we use that as the drawing
+ * region, otherwise use the canvas window height and width with an origin
+ * of 0,0.
+ */
+ if (canvasPtr->scrollX1 != 0 || canvasPtr->scrollY1 != 0 ||
+ canvasPtr->scrollX2 != 0 || canvasPtr->scrollY2 != 0) {
+
+ canvasX1 = canvasPtr->scrollX1;
+ canvasY1 = canvasPtr->scrollY1;
+ canvasX2 = canvasPtr->scrollX2;
+ canvasY2 = canvasPtr->scrollY2;
+ cWidth = canvasX2 - canvasX1 + 1;
+ cHeight = canvasY2 - canvasY1 + 1;
+
+ } else {
+
+ cWidth = Tk_Width(tkwin);
+ cHeight = Tk_Height(tkwin);
+ canvasX1 = 0;
+ canvasY1 = 0;
+ canvasX2 = canvasX1 + cWidth - 1;
+ canvasY2 = canvasY1 + cHeight - 1;
+ }
+
+ /*
+ * Allocate a pixmap to draw into. We add OVERDRAW_PIXELS in the same way
+ * that DisplayCanvas() does to avoid problems on some systems when objects
+ * are being drawn too close to the edge.
+ */
+
+ pixmapX1 = canvasX1 - OVERDRAW_PIXELS;
+ pixmapY1 = canvasY1 - OVERDRAW_PIXELS;
+ pixmapX2 = canvasX2 + OVERDRAW_PIXELS;
+ pixmapY2 = canvasY2 + OVERDRAW_PIXELS;
+ pmWidth = pixmapX2 - pixmapX1 + 1;
+ pmHeight = pixmapY2 - pixmapY1 + 1;
+ if ((pixmap = Tk_GetPixmap(displayPtr, Tk_WindowId(tkwin), pmWidth, pmHeight,
+ bitsPerPixel)) == 0) {
+ Tcl_AppendResult(interp, "failed to create drawing Pixmap", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * Before we can draw the canvas objects into the pixmap it's background
+ * should be filled with canvas background colour.
+ */
+
+ xgcValues.function = GXcopy;
+ xgcValues.foreground = Tk_3DBorderColor(canvasPtr->bgBorder)->pixel;
+ xgc = XCreateGC(displayPtr, pixmap, GCFunction|GCForeground, &xgcValues);
+ XFillRectangle(displayPtr,pixmap,xgc,0,0,pmWidth,pmHeight);
+
+ /*
+ * Draw all the cavas items into the pixmap
+ */
+
+ canvasPtr->drawableXOrigin = pixmapX1;
+ canvasPtr->drawableYOrigin = pixmapY1;
+ for (itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL;
+ itemPtr = itemPtr->nextPtr) {
+ if ((itemPtr->x1 >= pixmapX2) || (itemPtr->y1 >= pixmapY2) ||
+ (itemPtr->x2 < pixmapX1) || (itemPtr->y2 < pixmapY1)) {
+ if (!AlwaysRedraw(itemPtr)) {
+ continue;
+ }
+ }
+ if (itemPtr->state == TK_STATE_HIDDEN ||
+ (itemPtr->state == TK_STATE_NULL && canvasPtr->canvas_state
+ == TK_STATE_HIDDEN)) {
+ continue;
+ }
+ ItemDisplay(canvasPtr, itemPtr, pixmap, pixmapX1, pixmapY1, pmWidth,
+ pmHeight);
+ }
+
+ /*
+ * Copy the Pixmap into an ZPixmap format XImage so we can copy it across
+ * to the photo image. This seems to be the only way to get Pixmap image
+ * data out of an image. Note we have to account for the OVERDRAW_PIXELS
+ * border width.
+ */
+
+ if ((ximagePtr = XGetImage(displayPtr, pixmap, -pixmapX1, -pixmapY1, cWidth,
+ cHeight, AllPlanes, ZPixmap)) == NULL) {
+ Tcl_AppendResult(interp, "failed to copy Pixmap to XImage", NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+#ifdef DEBUG_DRAWCANVAS
+ Tcl_AppendResult(interp, "ximagePtr {", NULL);
+ sprintf(buffer,"%d",ximagePtr->width); Tcl_AppendResult(interp, " width ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->height); Tcl_AppendResult(interp, " height ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->xoffset); Tcl_AppendResult(interp, " xoffset ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->format); Tcl_AppendResult(interp, " format ", buffer, NULL);
+ Tcl_AppendResult(interp, " ximagePtr->data", NULL);
+ if (ximagePtr->data != NULL) {
+ int ix, iy;
+
+ Tcl_AppendResult(interp, " {", NULL);
+ for (iy = 0; iy < ximagePtr->height; ++ iy) {
+ Tcl_AppendResult(interp, " {", NULL);
+ for (ix = 0; ix < ximagePtr->bytes_per_line; ++ ix) {
+ if (ix > 0) {
+ if (ix % 4 == 0)
+ Tcl_AppendResult(interp, "-", NULL);
+ else
+ Tcl_AppendResult(interp, " ", NULL);
+ }
+ sprintf(buffer,"%2.2x",ximagePtr->data[ximagePtr->bytes_per_line * iy + ix]&0xFF);
+ Tcl_AppendResult(interp, buffer, NULL);
+ }
+ Tcl_AppendResult(interp, " }", NULL);
+ }
+ Tcl_AppendResult(interp, " }", NULL);
+ } else
+ sprintf(buffer," NULL");
+ sprintf(buffer,"%d",ximagePtr->byte_order); Tcl_AppendResult(interp, " byte_order ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->bitmap_unit); Tcl_AppendResult(interp, " bitmap_unit ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->bitmap_bit_order); Tcl_AppendResult(interp, " bitmap_bit_order ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->bitmap_pad); Tcl_AppendResult(interp, " bitmap_pad ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->depth); Tcl_AppendResult(interp, " depth ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->bytes_per_line); Tcl_AppendResult(interp, " bytes_per_line ", buffer, NULL);
+ sprintf(buffer,"%d",ximagePtr->bits_per_pixel); Tcl_AppendResult(interp, " bits_per_pixel ", buffer, NULL);
+ sprintf(buffer,"0x%8.8lx",ximagePtr->red_mask); Tcl_AppendResult(interp, " red_mask ", buffer, NULL);
+ sprintf(buffer,"0x%8.8lx",ximagePtr->green_mask); Tcl_AppendResult(interp, " green_mask ", buffer, NULL);
+ sprintf(buffer,"0x%8.8lx",ximagePtr->blue_mask); Tcl_AppendResult(interp, " blue_mask ", buffer, NULL);
+ Tcl_AppendResult(interp, " }", NULL);
+
+ Tcl_AppendResult(interp, "\nvisualPtr {", NULL);
+ sprintf(buffer,"0x%8.8lx",visualPtr->red_mask); Tcl_AppendResult(interp, " red_mask ", buffer, NULL);
+ sprintf(buffer,"0x%8.8lx",visualPtr->green_mask); Tcl_AppendResult(interp, " green_mask ", buffer, NULL);
+ sprintf(buffer,"0x%8.8lx",visualPtr->blue_mask); Tcl_AppendResult(interp, " blue_mask ", buffer, NULL);
+ Tcl_AppendResult(interp, " }", NULL);
+
+#endif
+
+ /*
+ * Fill in the PhotoImageBlock structure abd allocate a block of memory
+ * for the converted image data. Note we allocate an alpha channel even
+ * though we don't use one, because this layout helps Tk_PhotoPutBlock()
+ * use memcpy() instead of the slow pixel or line copy.
+ */
+
+ blockPtr.width = cWidth;
+ blockPtr.height = cHeight;
+ blockPtr.pixelSize = 4;
+ blockPtr.pitch = blockPtr.pixelSize * blockPtr.width;
+ blockPtr.offset[0] = 0;
+ blockPtr.offset[1] = 1;
+ blockPtr.offset[2] = 2;
+ blockPtr.offset[3] = 3;
+ blockPtr.pixelPtr = ckalloc(blockPtr.pixelSize * blockPtr.height * blockPtr.width);
+
+ /*
+ * Now convert the image data pixel by pixel from XImage to 32bit RGBA
+ * format suitable for Tk_PhotoPutBlock().
+ */
+
+ DecomposeMaskToShiftAndBits(visualPtr->red_mask,&rshift,&rbits);
+ DecomposeMaskToShiftAndBits(visualPtr->green_mask,&gshift,&gbits);
+ DecomposeMaskToShiftAndBits(visualPtr->blue_mask,&bshift,&bbits);
+
+#ifdef DEBUG_DRAWCANVAS
+ sprintf(buffer,"%d",rshift); Tcl_AppendResult(interp, "\nbits { rshift ", buffer, NULL);
+ sprintf(buffer,"%d",gshift); Tcl_AppendResult(interp, " gshift ", buffer, NULL);
+ sprintf(buffer,"%d",bshift); Tcl_AppendResult(interp, " bshift ", buffer, NULL);
+ sprintf(buffer,"%d",rbits); Tcl_AppendResult(interp, " rbits ", buffer, NULL);
+ sprintf(buffer,"%d",gbits); Tcl_AppendResult(interp, " gbits ", buffer, NULL);
+ sprintf(buffer,"%d",bbits); Tcl_AppendResult(interp, " bbits ", buffer, " }", NULL);
+ Tcl_AppendResult(interp, "\nConverted_image {", NULL);
+#endif
+
+ /* Ok, had to use ximagePtr->bits_per_pixel here and in the switch (...)
+ * below to get this to work on Windows. X11 correctly sets the bitmap
+ *_pad and bitmap_unit fields to 32, but on Windows they are 0 and 8
+ * respectively!
+ */
+
+ bytesPerPixel = ximagePtr->bits_per_pixel/8;
+ for (y = 0; y < blockPtr.height; ++y) {
+
+#ifdef DEBUG_DRAWCANVAS
+ Tcl_AppendResult(interp, " {", NULL);
+#endif
+
+ for(x = 0; x < blockPtr.width; ++x) {
+ unsigned long pixel = 0;
+
+ switch (ximagePtr->bits_per_pixel) {
+
+ /*
+ * Get an 8 bit pixel from the XImage.
+ */
+
+ case 8 :
+ pixel = *((unsigned char *)(ximagePtr->data + bytesPerPixel * x
+ + ximagePtr->bytes_per_line * y));
+ break;
+
+ /*
+ * Get a 16 bit pixel from the XImage, and correct the
+ * byte order as necessary.
+ */
+
+ case 16 :
+ pixel = *((unsigned short *)(ximagePtr->data + bytesPerPixel * x
+ + ximagePtr->bytes_per_line * y));
+ if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst)
+ || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst))
+ pixel = BYTE_SWAP16(pixel);
+ break;
+
+ /*
+ * Grab a 32 bit pixel from the XImage, and correct the
+ * byte order as necessary.
+ */
+
+ case 32 :
+ pixel = *((unsigned long *)(ximagePtr->data + bytesPerPixel * x
+ + ximagePtr->bytes_per_line * y));
+ if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst)
+ || (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst))
+ pixel = BYTE_SWAP32(pixel);
+ break;
+ }
+
+ /*
+ * We have a pixel with the correct byte order, so pull out the
+ * colours and place them in the photo block. Perhaps we could
+ * just not bother with the alpha byte because we are using
+ * TK_PHOTO_COMPOSITE_SET later?
+ * ***Windows: We have to swap the red and blue values. The
+ * XImage storage is B - G - R - A which becomes a 32bit ARGB
+ * quad. However the visual mask is a 32bit ABGR quad. And
+ * Tk_PhotoPutBlock() wants R-G-B-A which is a 32bit ABGR quad.
+ * If the visual mask was correct there would be no need to
+ * swap anything here.
+ */
+
+#ifdef _WIN32
+#define R_OFFSET 2
+#define B_OFFSET 0
+#else
+#define R_OFFSET 0
+#define B_OFFSET 2
+#endif
+ blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x + R_OFFSET] =
+ (unsigned char)((pixel & visualPtr->red_mask) >> rshift);
+ blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x +1] =
+ (unsigned char)((pixel & visualPtr->green_mask) >> gshift);
+ blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x + B_OFFSET] =
+ (unsigned char)((pixel & visualPtr->blue_mask) >> bshift);
+ blockPtr.pixelPtr[blockPtr.pitch * y + blockPtr.pixelSize * x +3] = 0xFF;
+
+#ifdef DEBUG_DRAWCANVAS
+ {
+ int ix;
+ if (x > 0)
+ Tcl_AppendResult(interp, "-", NULL);
+ for (ix = 0; ix < 4; ++ix) {
+ if (ix > 0)
+ Tcl_AppendResult(interp, " ", NULL);
+ sprintf(buffer,"%2.2x",blockPtr.pixelPtr[blockPtr.pitch * y
+ + blockPtr.pixelSize * x + ix]&0xFF);
+ Tcl_AppendResult(interp, buffer, NULL);
+ }
+ }
+#endif
+
+ }
+
+#ifdef DEBUG_DRAWCANVAS
+ Tcl_AppendResult(interp, " }", NULL);
+#endif
+
+ }
+
+#ifdef DEBUG_DRAWCANVAS
+ Tcl_AppendResult(interp, " }", NULL);
+#endif
+
+ /*
+ * Now put the copied pixmap into the photo.
+ * If either zoom or subsample are not 1, we use the zoom function.
+ */
+
+ if (subsample != 1 || zoom != 1) {
+ if ((result = Tk_PhotoPutZoomedBlock(interp, photohandle, &blockPtr,
+ 0, 0, cWidth * zoom / subsample, cHeight * zoom / subsample,
+ zoom, zoom, subsample, subsample, TK_PHOTO_COMPOSITE_SET))
+ != TCL_OK) {
+ goto done;
+ }
+ } else {
+ if ((result = Tk_PhotoPutBlock(interp, photohandle, &blockPtr, 0, 0,
+ cWidth, cHeight, TK_PHOTO_COMPOSITE_SET)) != TCL_OK) {
+ goto done;
+ }
+ }
+
+ /*
+ * Clean up anything we have allocated and exit.
+ */
+
+done:
+ if (blockPtr.pixelPtr)
+ ckfree(blockPtr.pixelPtr);
+ if (pixmap)
+ Tk_FreePixmap(Tk_Display(tkwin), pixmap);
+ if (ximagePtr)
+ XDestroyImage(ximagePtr);
+ if (xgc)
+ XFreeGC(displayPtr,xgc);
+ return result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* DisplayCanvas --
*
* This function redraws the contents of a canvas window. It is invoked
@@ -3050,208 +3610,6 @@ InitCanvas(void)
Tcl_MutexUnlock(&typeListMutex);
}
-#ifdef USE_OLD_TAG_SEARCH
-/*
- *--------------------------------------------------------------
- *
- * StartTagSearch --
- *
- * This function is called to initiate an enumeration of all items in a
- * given canvas that contain a given tag.
- *
- * Results:
- * The return value is a pointer to the first item in canvasPtr that
- * matches tag, or NULL if there is no such item. The information at
- * *searchPtr is initialized such that successive calls to NextItem will
- * return successive items that match tag.
- *
- * Side effects:
- * SearchPtr is linked into a list of searches in progress on canvasPtr,
- * so that elements can safely be deleted while the search is in
- * progress. EndTagSearch must be called at the end of the search to
- * unlink searchPtr from this list.
- *
- *--------------------------------------------------------------
- */
-
-static Tk_Item *
-StartTagSearch(
- TkCanvas *canvasPtr, /* Canvas whose items are to be searched. */
- Tcl_Obj *tagObj, /* Object giving tag value. */
- TagSearch *searchPtr) /* Record describing tag search; will be
- * initialized here. */
-{
- int id;
- Tk_Item *itemPtr, *lastPtr;
- Tk_Uid *tagPtr;
- Tk_Uid uid;
- char *tag = Tcl_GetString(tagObj);
- int count;
- TkWindow *tkwin = (TkWindow *) canvasPtr->tkwin;
- TkDisplay *dispPtr = tkwin->dispPtr;
-
- /*
- * Initialize the search.
- */
-
- searchPtr->canvasPtr = canvasPtr;
- searchPtr->searchOver = 0;
-
- /*
- * Find the first matching item in one of several ways. If the tag is a
- * number then it selects the single item with the matching identifier.
- * In this case see if the item being requested is the hot item, in which
- * case the search can be skipped.
- */
-
- if (isdigit(UCHAR(*tag))) {
- char *end;
- Tcl_HashEntry *entryPtr;
-
- dispPtr->numIdSearches++;
- id = strtoul(tag, &end, 0);
- if (*end == 0) {
- itemPtr = canvasPtr->hotPtr;
- lastPtr = canvasPtr->hotPrevPtr;
- if ((itemPtr == NULL) || (itemPtr->id != id) || (lastPtr == NULL)
- || (lastPtr->nextPtr != itemPtr)) {
- dispPtr->numSlowSearches++;
- entryPtr = Tcl_FindHashEntry(&canvasPtr->idTable, (char*) id);
- if (entryPtr != NULL) {
- itemPtr = Tcl_GetHashValue(entryPtr);
- lastPtr = itemPtr->prevPtr;
- } else {
- lastPtr = itemPtr = NULL;
- }
- }
- searchPtr->lastPtr = lastPtr;
- searchPtr->searchOver = 1;
- canvasPtr->hotPtr = itemPtr;
- canvasPtr->hotPrevPtr = lastPtr;
- return itemPtr;
- }
- }
-
- searchPtr->tag = uid = Tk_GetUid(tag);
- if (uid == Tk_GetUid("all")) {
- /*
- * All items match.
- */
-
- searchPtr->tag = NULL;
- searchPtr->lastPtr = NULL;
- searchPtr->currentPtr = canvasPtr->firstItemPtr;
- return canvasPtr->firstItemPtr;
- }
-
- /*
- * None of the above. Search for an item with a matching tag.
- */
-
- for (lastPtr = NULL, itemPtr = canvasPtr->firstItemPtr; itemPtr != NULL;
- lastPtr = itemPtr, itemPtr = itemPtr->nextPtr) {
- for (tagPtr = itemPtr->tagPtr, count = itemPtr->numTags;
- count > 0; tagPtr++, count--) {
- if (*tagPtr == uid) {
- searchPtr->lastPtr = lastPtr;
- searchPtr->currentPtr = itemPtr;
- return itemPtr;
- }
- }
- }
- searchPtr->lastPtr = lastPtr;
- searchPtr->searchOver = 1;
- return NULL;
-}
-
-/*
- *--------------------------------------------------------------
- *
- * NextItem --
- *
- * This function returns successive items that match a given tag; it
- * should be called only after StartTagSearch has been used to begin a
- * search.
- *
- * Results:
- * The return value is a pointer to the next item that matches the tag
- * specified to StartTagSearch, or NULL if no such item exists.
- * *SearchPtr is updated so that the next call to this function will
- * return the next item.
- *
- * Side effects:
- * None.
- *
- *--------------------------------------------------------------
- */
-
-static Tk_Item *
-NextItem(
- TagSearch *searchPtr) /* Record describing search in progress. */
-{
- Tk_Item *itemPtr, *lastPtr;
- int count;
- Tk_Uid uid;
- Tk_Uid *tagPtr;
-
- /*
- * Find next item in list (this may not actually be a suitable one to
- * return), and return if there are no items left.
- */
-
- lastPtr = searchPtr->lastPtr;
- if (lastPtr == NULL) {
- itemPtr = searchPtr->canvasPtr->firstItemPtr;
- } else {
- itemPtr = lastPtr->nextPtr;
- }
- if ((itemPtr == NULL) || (searchPtr->searchOver)) {
- searchPtr->searchOver = 1;
- return NULL;
- }
- if (itemPtr != searchPtr->currentPtr) {
- /*
- * The structure of the list has changed. Probably the previously-
- * returned item was removed from the list. In this case, don't
- * advance lastPtr; just return its new successor (i.e. do nothing
- * here).
- */
- } else {
- lastPtr = itemPtr;
- itemPtr = lastPtr->nextPtr;
- }
-
- /*
- * Handle special case of "all" search by returning next item.
- */
-
- uid = searchPtr->tag;
- if (uid == NULL) {
- searchPtr->lastPtr = lastPtr;
- searchPtr->currentPtr = itemPtr;
- return itemPtr;
- }
-
- /*
- * Look for an item with a particular tag.
- */
-
- for ( ; itemPtr != NULL; lastPtr = itemPtr, itemPtr = itemPtr->nextPtr) {
- for (tagPtr = itemPtr->tagPtr, count = itemPtr->numTags;
- count > 0; tagPtr++, count--) {
- if (*tagPtr == uid) {
- searchPtr->lastPtr = lastPtr;
- searchPtr->currentPtr = itemPtr;
- return itemPtr;
- }
- }
- }
- searchPtr->lastPtr = lastPtr;
- searchPtr->searchOver = 1;
- return NULL;
-}
-
-#else /* !USE_OLD_TAG_SEARCH */
/*
*----------------------------------------------------------------------
*
@@ -4015,7 +4373,7 @@ TagSearchFirst(
if ((itemPtr == NULL) || (itemPtr->id != searchPtr->id)
|| (lastPtr == NULL) || (lastPtr->nextPtr != itemPtr)) {
entryPtr = Tcl_FindHashEntry(&searchPtr->canvasPtr->idTable,
- (char *) INT2PTR(searchPtr->id));
+ INT2PTR(searchPtr->id));
if (entryPtr != NULL) {
itemPtr = Tcl_GetHashValue(entryPtr);
lastPtr = itemPtr->prevPtr;
@@ -4180,7 +4538,6 @@ TagSearchNext(
searchPtr->searchOver = 1;
return NULL;
}
-#endif /* USE_OLD_TAG_SEARCH */
/*
*--------------------------------------------------------------
@@ -4217,7 +4574,7 @@ DoItem(
*/
if (tag == NULL) {
- Tcl_ListObjAppendElement(NULL, accumObj, Tcl_NewIntObj(itemPtr->id));
+ Tcl_ListObjAppendElement(NULL, accumObj, Tcl_NewWideIntObj(itemPtr->id));
return;
}
@@ -4293,14 +4650,9 @@ FindItems(
int first /* For error messages: gives number of
* elements of objv which are already
* handled. */
-#ifndef USE_OLD_TAG_SEARCH
,TagSearch **searchPtrPtr /* From CanvasWidgetCmd local vars*/
-#endif /* not USE_OLD_TAG_SEARCH */
)
{
-#ifdef USE_OLD_TAG_SEARCH
- TagSearch search;
-#endif /* USE_OLD_TAG_SEARCH */
Tk_Item *itemPtr;
Tk_Uid uid;
int index, result;
@@ -4617,16 +4969,6 @@ FindArea(
*--------------------------------------------------------------
*/
-#ifdef USE_OLD_TAG_SEARCH
-static void
-RelinkItems(
- TkCanvas *canvasPtr, /* Canvas to be modified. */
- Tcl_Obj *tag, /* Tag identifying items to be moved in the
- * redisplay list. */
- Tk_Item *prevPtr) /* Reposition the items so that they go just
- * after this item (NULL means put at
- * beginning of list). */
-#else /* USE_OLD_TAG_SEARCH */
static int
RelinkItems(
TkCanvas *canvasPtr, /* Canvas to be modified. */
@@ -4636,12 +4978,8 @@ RelinkItems(
* after this item (NULL means put at
* beginning of list). */
TagSearch **searchPtrPtr) /* From CanvasWidgetCmd local vars */
-#endif /* USE_OLD_TAG_SEARCH */
{
Tk_Item *itemPtr;
-#ifdef USE_OLD_TAG_SEARCH
- TagSearch search;
-#endif /* USE_OLD_TAG_SEARCH */
Tk_Item *firstMovePtr, *lastMovePtr;
int result;
@@ -4693,11 +5031,7 @@ RelinkItems(
*/
if (firstMovePtr == NULL) {
-#ifdef USE_OLD_TAG_SEARCH
- return;
-#else /* USE_OLD_TAG_SEARCH */
return TCL_OK;
-#endif /* USE_OLD_TAG_SEARCH */
}
if (prevPtr == NULL) {
if (canvasPtr->firstItemPtr != NULL) {
@@ -4718,9 +5052,7 @@ RelinkItems(
if (canvasPtr->lastItemPtr == prevPtr) {
canvasPtr->lastItemPtr = lastMovePtr;
}
-#ifndef USE_OLD_TAG_SEARCH
return TCL_OK;
-#endif /* not USE_OLD_TAG_SEARCH */
}
/*
@@ -4845,9 +5177,7 @@ PickCurrentItem(
double coords[2];
unsigned long buttonDown;
Tk_Item *prevItemPtr;
-#ifndef USE_OLD_TAG_SEARCH
SearchUids *searchUids = GetStaticUids();
-#endif
/*
* Check whether or not a button is down. If so, we'll log entry and exit
@@ -4969,11 +5299,7 @@ PickCurrentItem(
if ((itemPtr == canvasPtr->currentItemPtr) && !buttonDown) {
for (i = itemPtr->numTags-1; i >= 0; i--) {
-#ifdef USE_OLD_TAG_SEARCH
- if (itemPtr->tagPtr[i] == Tk_GetUid("current"))
-#else /* USE_OLD_TAG_SEARCH */
if (itemPtr->tagPtr[i] == searchUids->currentUid)
-#endif /* USE_OLD_TAG_SEARCH */
/* then */ {
itemPtr->tagPtr[i] = itemPtr->tagPtr[itemPtr->numTags-1];
itemPtr->numTags--;
@@ -5010,11 +5336,7 @@ PickCurrentItem(
if (canvasPtr->currentItemPtr != NULL) {
XEvent event;
-#ifdef USE_OLD_TAG_SEARCH
- DoItem(NULL, canvasPtr->currentItemPtr, Tk_GetUid("current"));
-#else /* USE_OLD_TAG_SEARCH */
DoItem(NULL, canvasPtr->currentItemPtr, searchUids->currentUid);
-#endif /* USE_OLD_TAG_SEARCH */
if ((canvasPtr->currentItemPtr->redraw_flags & TK_ITEM_STATE_DEPENDANT
&& prevItemPtr != canvasPtr->currentItemPtr)) {
ItemConfigure(canvasPtr, canvasPtr->currentItemPtr, 0, NULL);
@@ -5108,15 +5430,13 @@ CanvasDoEvent(
* processed. */
{
#define NUM_STATIC 3
- ClientData staticObjects[NUM_STATIC];
- ClientData *objectPtr;
+ void *staticObjects[NUM_STATIC];
+ void **objectPtr;
int numObjects, i;
Tk_Item *itemPtr;
-#ifndef USE_OLD_TAG_SEARCH
TagSearchExpr *expr;
int numExprs;
SearchUids *searchUids = GetStaticUids();
-#endif /* not USE_OLD_TAG_SEARCH */
if (canvasPtr->bindingTable == NULL) {
return;
@@ -5130,16 +5450,6 @@ CanvasDoEvent(
return;
}
-#ifdef USE_OLD_TAG_SEARCH
- /*
- * Set up an array with all the relevant objects for processing this
- * event. The relevant objects are (a) the event's item, (b) the tags
- * associated with the event's item, and (c) the tag "all". If there are a
- * lot of tags then malloc an array to hold all of the objects.
- */
-
- numObjects = itemPtr->numTags + 2;
-#else /* USE_OLD_TAG_SEARCH */
/*
* Set up an array with all the relevant objects for processing this
* event. The relevant objects are:
@@ -5168,23 +5478,17 @@ CanvasDoEvent(
}
numObjects = itemPtr->numTags + numExprs + 2;
-#endif /* not USE_OLD_TAG_SEARCH */
if (numObjects <= NUM_STATIC) {
objectPtr = staticObjects;
} else {
- objectPtr = ckalloc(numObjects * sizeof(ClientData));
+ objectPtr = ckalloc(numObjects * sizeof(void *));
}
-#ifdef USE_OLD_TAG_SEARCH
- objectPtr[0] = (ClientData) Tk_GetUid("all");
-#else /* USE_OLD_TAG_SEARCH */
- objectPtr[0] = (ClientData) searchUids->allUid;
-#endif /* USE_OLD_TAG_SEARCH */
+ objectPtr[0] = (char *)searchUids->allUid;
for (i = itemPtr->numTags-1; i >= 0; i--) {
- objectPtr[i+1] = (ClientData) itemPtr->tagPtr[i];
+ objectPtr[i+1] = (char *)itemPtr->tagPtr[i];
}
objectPtr[itemPtr->numTags+1] = itemPtr;
-#ifndef USE_OLD_TAG_SEARCH
/*
* Copy uids of matching expressions into object array
*/
@@ -5197,7 +5501,6 @@ CanvasDoEvent(
}
expr = expr->next;
}
-#endif /* not USE_OLD_TAG_SEARCH */
/*
* Invoke the binding system, then free up the object array if it was
diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h
index e2221a8..fc0ac7a 100644
--- a/generic/tkCanvas.h
+++ b/generic/tkCanvas.h
@@ -147,7 +147,7 @@ typedef struct TkCanvas {
* currentItem is based. Must be saved so that
* if the currentItem is deleted, can pick
* another. */
- int state; /* Last known modifier state. Used to defer
+ unsigned int state; /* Last known modifier state. Used to defer
* picking a new current object while buttons
* are down. */
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index b902625..3c3d89b 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -422,7 +422,7 @@ Tk_ClipboardObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
const char *path = NULL;
Atom selection;
static const char *const optionStrings[] = { "append", "clear", "get", NULL };
@@ -449,10 +449,11 @@ Tk_ClipboardObjCmd(
"-displayof", "-format", "-type", NULL
};
enum appendOptions { APPEND_DISPLAYOF, APPEND_FORMAT, APPEND_TYPE };
- int subIndex, length;
+ int subIndex;
+ TkSizeT length;
for (i = 2; i < objc - 1; i++) {
- string = Tcl_GetStringFromObj(objv[i], &length);
+ string = TkGetStringFromObj(objv[i], &length);
if (string[0] != '-') {
break;
}
@@ -708,7 +709,7 @@ ClipboardGetProc(
* used). */
const char *portion) /* New information to be appended. */
{
- Tcl_DStringAppend((Tcl_DString *) clientData, portion, -1);
+ Tcl_DStringAppend(clientData, portion, -1);
return TCL_OK;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 7f4c49b..d7f742a 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -746,15 +746,15 @@ CaretCmd(
Tcl_ListObjAppendElement(interp, objPtr,
Tcl_NewStringObj("-height", 7));
Tcl_ListObjAppendElement(interp, objPtr,
- Tcl_NewIntObj(caretPtr->height));
+ Tcl_NewWideIntObj(caretPtr->height));
Tcl_ListObjAppendElement(interp, objPtr,
Tcl_NewStringObj("-x", 2));
Tcl_ListObjAppendElement(interp, objPtr,
- Tcl_NewIntObj(caretPtr->x));
+ Tcl_NewWideIntObj(caretPtr->x));
Tcl_ListObjAppendElement(interp, objPtr,
Tcl_NewStringObj("-y", 2));
Tcl_ListObjAppendElement(interp, objPtr,
- Tcl_NewIntObj(caretPtr->y));
+ Tcl_NewWideIntObj(caretPtr->y));
Tcl_SetObjResult(interp, objPtr);
} else if (objc == 3) {
int value;
@@ -774,7 +774,7 @@ CaretCmd(
} else /* if (index == TK_CARET_HEIGHT) -- last case */ {
value = caretPtr->height;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(value));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(value));
} else {
int i, value, x = 0, y = 0, height = -1;
@@ -875,11 +875,6 @@ UseinputmethodsCmd(
}
dispPtr = ((TkWindow *) tkwin)->dispPtr;
if ((objc - skip) == 2) {
- /*
- * In the case where TK_USE_INPUT_METHODS is not defined, this
- * will be ignored and we will always return 0. That will indicate
- * to the user that input methods are just not available.
- */
int boolVal;
@@ -887,13 +882,11 @@ UseinputmethodsCmd(
&boolVal) != TCL_OK) {
return TCL_ERROR;
}
-#ifdef TK_USE_INPUT_METHODS
- if (boolVal) {
+ if (boolVal && (dispPtr->inputMethod != NULL)) {
dispPtr->flags |= TK_DISPLAY_USE_IM;
} else {
dispPtr->flags &= ~TK_DISPLAY_USE_IM;
}
-#endif /* TK_USE_INPUT_METHODS */
} else if ((objc - skip) != 1) {
Tcl_WrongNumArgs(interp, 1, objv,
"?-displayof window? ?boolean?");
@@ -942,11 +935,11 @@ InactiveCmd(
return TCL_ERROR;
}
if (objc - skip == 1) {
- long inactive;
+ Tcl_WideInt inactive;
inactive = (Tcl_IsSafe(interp) ? -1 :
Tk_GetUserInactiveTime(Tk_Display(tkwin)));
- Tcl_SetObjResult(interp, Tcl_NewLongObj(inactive));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(inactive));
} else if (objc - skip == 2) {
const char *string;
@@ -1363,7 +1356,7 @@ Tk_WinfoObjCmd(
switch ((enum options) index) {
case WIN_CELLS:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(Tk_Visual(tkwin)->map_entries));
+ Tcl_NewWideIntObj(Tk_Visual(tkwin)->map_entries));
break;
case WIN_CHILDREN: {
Tcl_Obj *strPtr, *resultPtr = Tcl_NewObj();
@@ -1386,14 +1379,14 @@ Tk_WinfoObjCmd(
Tcl_NewBooleanObj(TkpCmapStressed(tkwin,Tk_Colormap(tkwin))));
break;
case WIN_DEPTH:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_Depth(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_Depth(tkwin)));
break;
case WIN_GEOMETRY:
Tcl_SetObjResult(interp, Tcl_ObjPrintf("%dx%d+%d+%d",
Tk_Width(tkwin), Tk_Height(tkwin), Tk_X(tkwin), Tk_Y(tkwin)));
break;
case WIN_HEIGHT:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_Height(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_Height(tkwin)));
break;
case WIN_ID: {
char buf[TCL_INTEGER_SPACE];
@@ -1444,28 +1437,28 @@ Tk_WinfoObjCmd(
if (useX & useY) {
Tcl_Obj *xyObj[2];
- xyObj[0] = Tcl_NewIntObj(x);
- xyObj[1] = Tcl_NewIntObj(y);
+ xyObj[0] = Tcl_NewWideIntObj(x);
+ xyObj[1] = Tcl_NewWideIntObj(y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, xyObj));
} else if (useX) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(x));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(x));
} else {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(y));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(y));
}
break;
case WIN_REQHEIGHT:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_ReqHeight(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_ReqHeight(tkwin)));
break;
case WIN_REQWIDTH:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_ReqWidth(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_ReqWidth(tkwin)));
break;
case WIN_ROOTX:
Tk_GetRootCoords(tkwin, &x, &y);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(x));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(x));
break;
case WIN_ROOTY:
Tk_GetRootCoords(tkwin, &x, &y);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(y));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(y));
break;
case WIN_SCREEN:
Tcl_SetObjResult(interp, Tcl_ObjPrintf("%s.%d",
@@ -1473,27 +1466,27 @@ Tk_WinfoObjCmd(
break;
case WIN_SCREENCELLS:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(CellsOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(CellsOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENDEPTH:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(DefaultDepthOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(DefaultDepthOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENHEIGHT:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(HeightOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(HeightOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENWIDTH:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(WidthOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(WidthOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENMMHEIGHT:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(HeightMMOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(HeightMMOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENMMWIDTH:
Tcl_SetObjResult(interp,
- Tcl_NewIntObj(WidthMMOfScreen(Tk_Screen(tkwin))));
+ Tcl_NewWideIntObj(WidthMMOfScreen(Tk_Screen(tkwin))));
break;
case WIN_SCREENVISUAL:
c_class = DefaultVisualOfScreen(Tk_Screen(tkwin))->c_class;
@@ -1539,28 +1532,28 @@ Tk_WinfoObjCmd(
break;
case WIN_VROOTHEIGHT:
Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(height));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(height));
break;
case WIN_VROOTWIDTH:
Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(width));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(width));
break;
case WIN_VROOTX:
Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(x));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(x));
break;
case WIN_VROOTY:
Tk_GetVRootGeometry(tkwin, &x, &y, &width, &height);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(y));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(y));
break;
case WIN_WIDTH:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_Width(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_Width(tkwin)));
break;
case WIN_X:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_X(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_X(tkwin)));
break;
case WIN_Y:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(Tk_Y(tkwin)));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tk_Y(tkwin)));
break;
/*
@@ -1579,11 +1572,11 @@ Tk_WinfoObjCmd(
objv += skip;
string = Tcl_GetString(objv[2]);
Tcl_SetObjResult(interp,
- Tcl_NewLongObj((long) Tk_InternAtom(tkwin, string)));
+ Tcl_NewWideIntObj(Tk_InternAtom(tkwin, string)));
break;
case WIN_ATOMNAME: {
const char *name;
- long id;
+ Tcl_WideInt id;
skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin);
if (skip < 0) {
@@ -1594,7 +1587,7 @@ Tk_WinfoObjCmd(
return TCL_ERROR;
}
objv += skip;
- if (Tcl_GetLongFromObj(interp, objv[2], &id) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(interp, objv[2], &id) != TCL_OK) {
return TCL_ERROR;
}
name = Tk_GetAtomName(tkwin, (Atom) id);
@@ -1735,7 +1728,7 @@ Tk_WinfoObjCmd(
if (Tk_GetPixels(interp, tkwin, string, &pixels) != TCL_OK) {
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(pixels));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(pixels));
break;
}
case WIN_RGB: {
@@ -1812,224 +1805,7 @@ Tk_WinfoObjCmd(
return TCL_OK;
}
-#if 0
-/*
- *----------------------------------------------------------------------
- *
- * Tk_WmObjCmd --
- *
- * This function is invoked to process the "wm" Tcl command. See the user
- * documentation for details on what it does.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * See the user documentation.
- *
- *----------------------------------------------------------------------
- */
-
- /* ARGSUSED */
-int
-Tk_WmObjCmd(
- ClientData clientData, /* Main window associated with interpreter. */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
-{
- Tk_Window tkwin;
- TkWindow *winPtr;
-
- static const char *const optionStrings[] = {
- "aspect", "client", "command", "deiconify",
- "focusmodel", "frame", "geometry", "grid",
- "group", "iconbitmap", "iconify", "iconmask",
- "iconname", "iconposition", "iconwindow", "maxsize",
- "minsize", "overrideredirect", "positionfrom", "protocol",
- "resizable", "sizefrom", "state", "title",
- "tracing", "transient", "withdraw", NULL
- };
- enum options {
- TKWM_ASPECT, TKWM_CLIENT, TKWM_COMMAND, TKWM_DEICONIFY,
- TKWM_FOCUSMOD, TKWM_FRAME, TKWM_GEOMETRY, TKWM_GRID,
- TKWM_GROUP, TKWM_ICONBMP, TKWM_ICONIFY, TKWM_ICONMASK,
- TKWM_ICONNAME, TKWM_ICONPOS, TKWM_ICONWIN, TKWM_MAXSIZE,
- TKWM_MINSIZE, TKWM_OVERRIDE, TKWM_POSFROM, TKWM_PROTOCOL,
- TKWM_RESIZABLE, TKWM_SIZEFROM, TKWM_STATE, TKWM_TITLE,
- TKWM_TRACING, TKWM_TRANSIENT, TKWM_WITHDRAW
- };
-
- tkwin = (Tk_Window) clientData;
-
- if (objc < 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "option window ?arg?");
- return TCL_ERROR;
- }
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
- return TCL_ERROR;
- }
-
- if (index == TKWM_TRACING) {
- int wmTracing;
- TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
-
- if ((objc != 2) && (objc != 3)) {
- Tcl_WrongNumArgs(interp, 1, objv, "tracing ?boolean?");
- return TCL_ERROR;
- }
- if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- dispPtr->flags & TK_DISPLAY_WM_TRACING));
- return TCL_OK;
- }
- if (Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing) != TCL_OK) {
- return TCL_ERROR;
- }
- if (wmTracing) {
- dispPtr->flags |= TK_DISPLAY_WM_TRACING;
- } else {
- dispPtr->flags &= ~TK_DISPLAY_WM_TRACING;
- }
- return TCL_OK;
- }
-
- if (objc < 3) {
- Tcl_WrongNumArgs(interp, 2, objv, "window ?arg?");
- return TCL_ERROR;
- }
- winPtr = (TkWindow *) Tk_NameToWindow(interp,
- Tcl_GetString(objv[2]), tkwin);
- if (winPtr == NULL) {
- return TCL_ERROR;
- }
- if (!(winPtr->flags & TK_TOP_LEVEL)) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "window \"%s\" isn't a top-level window", winPtr->pathName));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "TOPLEVEL", winPtr->pathName,
- NULL);
- return TCL_ERROR;
- }
-
- switch ((enum options) index) {
- case TKWM_ASPECT:
- TkpWmAspectCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_CLIENT:
- TkpWmClientCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_COMMAND:
- TkpWmCommandCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_DEICONIFY:
- TkpWmDeiconifyCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_FOCUSMOD:
- TkpWmFocusmodCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_FRAME:
- TkpWmFrameCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_GEOMETRY:
- TkpWmGeometryCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_GRID:
- TkpWmGridCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_GROUP:
- TkpWmGroupCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONBMP:
- TkpWmIconbitmapCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONIFY:
- TkpWmIconifyCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONMASK:
- TkpWmIconmaskCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONNAME:
- /*
- * Slight Unix variation.
- */
- TkpWmIconnameCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONPOS:
- /*
- * nearly same - 1 line more on Unix.
- */
- TkpWmIconpositionCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_ICONWIN:
- TkpWmIconwindowCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_MAXSIZE:
- /*
- * Nearly same, win diffs.
- */
- TkpWmMaxsizeCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_MINSIZE:
- /*
- * Nearly same, win diffs
- */
- TkpWmMinsizeCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_OVERRIDE:
- /*
- * Almost same.
- */
- TkpWmOverrideCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_POSFROM:
- /*
- * Equal across platforms
- */
- TkpWmPositionfromCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_PROTOCOL:
- /*
- * Equal across platforms
- */
- TkpWmProtocolCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_RESIZABLE:
- /*
- * Almost same
- */
- TkpWmResizableCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_SIZEFROM:
- /*
- * Equal across platforms
- */
- TkpWmSizefromCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_STATE:
- TkpWmStateCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_TITLE:
- TkpWmTitleCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_TRANSIENT:
- TkpWmTransientCmd(interp, tkwin, winPtr, objc, objv);
- break;
- case TKWM_WITHDRAW:
- TkpWmWithdrawCmd(interp, tkwin, winPtr, objc, objv);
- break;
- }
-
- updateGeom:
- if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) {
- Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr);
- wmPtr->flags |= WM_UPDATE_PENDING;
- }
- return TCL_OK;
-}
-#endif
-
/*
*----------------------------------------------------------------------
*
@@ -2071,14 +1847,14 @@ TkGetDisplayOf(
* present. */
{
const char *string;
- int length;
+ TkSizeT length;
if (objc < 1) {
return 0;
}
- string = Tcl_GetStringFromObj(objv[0], &length);
+ string = TkGetStringFromObj(objv[0], &length);
if ((length >= 2) &&
- (strncmp(string, "-displayof", (unsigned) length) == 0)) {
+ (strncmp(string, "-displayof", length) == 0)) {
if (objc < 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"value for \"-displayof\" missing", -1));
diff --git a/generic/tkColor.c b/generic/tkColor.c
index f6650f9..2f51b27 100644
--- a/generic/tkColor.c
+++ b/generic/tkColor.c
@@ -480,8 +480,7 @@ Tk_FreeColor(
Tcl_Panic("Tk_FreeColor called with bogus color");
}
- tkColPtr->resourceRefCount--;
- if (tkColPtr->resourceRefCount > 0) {
+ if (tkColPtr->resourceRefCount-- > 1) {
return;
}
@@ -587,8 +586,7 @@ FreeColorObj(
TkColor *tkColPtr = objPtr->internalRep.twoPtrValue.ptr1;
if (tkColPtr != NULL) {
- tkColPtr->objRefCount--;
- if ((tkColPtr->objRefCount == 0)
+ if ((tkColPtr->objRefCount-- <= 1)
&& (tkColPtr->resourceRefCount == 0)) {
ckfree(tkColPtr);
}
@@ -820,9 +818,9 @@ TkDebugColor(
Tcl_Obj *objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tkColPtr->resourceRefCount));
+ Tcl_NewWideIntObj(tkColPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tkColPtr->objRefCount));
+ Tcl_NewWideIntObj(tkColPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tkColor.h b/generic/tkColor.h
index 54e8cdc..bcd71fe 100644
--- a/generic/tkColor.h
+++ b/generic/tkColor.h
@@ -38,7 +38,7 @@ typedef struct TkColor {
Colormap colormap; /* Colormap from which this entry was
* allocated. */
Visual *visual; /* Visual associated with colormap. */
- int resourceRefCount; /* Number of active uses of this color (each
+ TkSizeT resourceRefCount; /* Number of active uses of this color (each
* active use corresponds to a call to
* Tk_AllocColorFromObj or Tk_GetColor). If
* this count is 0, then this TkColor
@@ -48,7 +48,7 @@ typedef struct TkColor {
* referring to it. The structure is freed
* when resourceRefCount and objRefCount are
* both 0. */
- int objRefCount; /* The number of Tcl objects that reference
+ TkSizeT objRefCount; /* The number of Tcl objects that reference
* this structure. */
int type; /* TK_COLOR_BY_NAME or TK_COLOR_BY_VALUE. */
Tcl_HashEntry *hashPtr; /* Pointer to hash table entry for this
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index f1a5176..461be56 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -91,7 +91,7 @@ typedef struct TkOption {
*/
typedef struct OptionTable {
- int refCount; /* Counts the number of uses of this table
+ size_t refCount; /* Counts the number of uses of this table
* (the number of times Tk_CreateOptionTable
* has returned it). This can be greater than
* 1 if it is shared along several option
@@ -103,7 +103,7 @@ typedef struct OptionTable {
* templates, this points to the table
* corresponding to the next template in the
* chain. */
- int numOptions; /* The number of items in the options array
+ size_t numOptions; /* The number of items in the options array
* below. */
Option options[1]; /* Information about the individual options in
* the table. This must be the last field in
@@ -115,14 +115,14 @@ typedef struct OptionTable {
* Forward declarations for functions defined later in this file:
*/
-static int DoObjConfig(Tcl_Interp *interp, char *recordPtr,
+static int DoObjConfig(Tcl_Interp *interp, void *recordPtr,
Option *optionPtr, Tcl_Obj *valuePtr,
Tk_Window tkwin, Tk_SavedOption *savePtr);
static void FreeResources(Option *optionPtr, Tcl_Obj *objPtr,
- char *internalPtr, Tk_Window tkwin);
-static Tcl_Obj * GetConfigList(char *recordPtr,
+ void *internalPtr, Tk_Window tkwin);
+static Tcl_Obj * GetConfigList(void *recordPtr,
Option *optionPtr, Tk_Window tkwin);
-static Tcl_Obj * GetObjectForOption(char *recordPtr,
+static Tcl_Obj * GetObjectForOption(void *recordPtr,
Option *optionPtr, Tk_Window tkwin);
static Option * GetOption(const char *name, OptionTable *tablePtr);
static Option * GetOptionFromObj(Tcl_Interp *interp,
@@ -177,7 +177,7 @@ Tk_CreateOptionTable(
OptionTable *tablePtr;
const Tk_OptionSpec *specPtr, *specPtr2;
Option *optionPtr;
- int numOptions, i;
+ size_t numOptions, i;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -279,7 +279,7 @@ Tk_CreateOptionTable(
}
}
if (((specPtr->type == TK_OPTION_STRING)
- && (specPtr->internalOffset >= 0))
+ && (specPtr->internalOffset != TCL_AUTO_LENGTH))
|| (specPtr->type == TK_OPTION_COLOR)
|| (specPtr->type == TK_OPTION_FONT)
|| (specPtr->type == TK_OPTION_BITMAP)
@@ -330,10 +330,9 @@ Tk_DeleteOptionTable(
{
OptionTable *tablePtr = (OptionTable *) optionTable;
Option *optionPtr;
- int count;
+ size_t count;
- tablePtr->refCount--;
- if (tablePtr->refCount > 0) {
+ if (tablePtr->refCount-- > 1) {
return;
}
@@ -382,7 +381,7 @@ int
Tk_InitOptions(
Tcl_Interp *interp, /* Interpreter for error reporting. NULL means
* don't leave an error message. */
- char *recordPtr, /* Pointer to the record to configure. Note:
+ void *recordPtr, /* Pointer to the record to configure. Note:
* the caller should have properly initialized
* the record with NULL pointers for each
* option value. */
@@ -553,7 +552,7 @@ DoObjConfig(
Tcl_Interp *interp, /* Interpreter for error reporting. If NULL,
* then no message is left if an error
* occurs. */
- char *recordPtr, /* The record to modify to hold the new option
+ void *recordPtr, /* The record to modify to hold the new option
* value. */
Option *optionPtr, /* Pointer to information about the option. */
Tcl_Obj *valuePtr, /* New value for option. */
@@ -569,10 +568,10 @@ DoObjConfig(
* free the old value). */
{
Tcl_Obj **slotPtrPtr, *oldPtr;
- char *internalPtr; /* Points to location in record where internal
+ void *internalPtr; /* Points to location in record where internal
* representation of value should be stored,
* or NULL. */
- char *oldInternalPtr; /* Points to location in which to save old
+ void *oldInternalPtr; /* Points to location in which to save old
* internal representation of value. */
Tk_SavedOption internal; /* Used to save the old internal
* representation of the value if
@@ -585,8 +584,8 @@ DoObjConfig(
*/
specPtr = optionPtr->specPtr;
- if (specPtr->objOffset >= 0) {
- slotPtrPtr = (Tcl_Obj **) (recordPtr + specPtr->objOffset);
+ if (specPtr->objOffset != TCL_AUTO_LENGTH) {
+ slotPtrPtr = (Tcl_Obj **) ((char *)recordPtr + specPtr->objOffset);
oldPtr = *slotPtrPtr;
} else {
slotPtrPtr = NULL;
@@ -598,8 +597,8 @@ DoObjConfig(
* object and internal forms, if they exist.
*/
- if (specPtr->internalOffset >= 0) {
- internalPtr = recordPtr + specPtr->internalOffset;
+ if (specPtr->internalOffset != TCL_AUTO_LENGTH) {
+ internalPtr = (char *)recordPtr + specPtr->internalOffset;
} else {
internalPtr = NULL;
}
@@ -657,14 +656,14 @@ DoObjConfig(
case TK_OPTION_STRING: {
char *newStr;
const char *value;
- int length;
+ TkSizeT length;
if (nullOK && ObjectIsEmpty(valuePtr)) {
valuePtr = NULL;
}
if (internalPtr != NULL) {
if (valuePtr != NULL) {
- value = Tcl_GetStringFromObj(valuePtr, &length);
+ value = TkGetStringFromObj(valuePtr, &length);
newStr = ckalloc(length + 1);
strcpy(newStr, value);
} else {
@@ -975,7 +974,7 @@ GetOption(
Option *bestPtr, *optionPtr;
OptionTable *tablePtr2;
const char *p1, *p2;
- int count;
+ size_t count;
/*
* Search through all of the option tables in the chain to find the best
@@ -1223,7 +1222,7 @@ int
Tk_SetOptions(
Tcl_Interp *interp, /* Interpreter for error reporting. If NULL,
* then no error message is returned.*/
- char *recordPtr, /* The record to configure. */
+ void *recordPtr, /* The record to configure. */
Tk_OptionTable optionTable, /* Describes valid options. */
int objc, /* The number of elements in objv. */
Tcl_Obj *const objv[], /* Contains one or more name-value pairs. */
@@ -1341,12 +1340,12 @@ Tk_RestoreSavedOptions(
Tk_SavedOptions *savePtr) /* Holds saved option information; must have
* been passed to Tk_SetOptions. */
{
- int i;
+ size_t i;
Option *optionPtr;
Tcl_Obj *newPtr; /* New object value of option, which we
* replace with old value and free. Taken from
* record. */
- char *internalPtr; /* Points to internal value of option in
+ void *internalPtr; /* Points to internal value of option in
* record. */
const Tk_OptionSpec *specPtr;
@@ -1361,7 +1360,7 @@ Tk_RestoreSavedOptions(
ckfree(savePtr->nextPtr);
savePtr->nextPtr = NULL;
}
- for (i = savePtr->numItems - 1; i >= 0; i--) {
+ for (i = savePtr->numItems - 1; i != (size_t)-1; i--) {
optionPtr = savePtr->items[i].optionPtr;
specPtr = optionPtr->specPtr;
@@ -1370,13 +1369,13 @@ Tk_RestoreSavedOptions(
* record.
*/
- if (specPtr->objOffset >= 0) {
- newPtr = *((Tcl_Obj **) (savePtr->recordPtr + specPtr->objOffset));
+ if (specPtr->objOffset != TCL_AUTO_LENGTH) {
+ newPtr = *((Tcl_Obj **) ((char *)savePtr->recordPtr + specPtr->objOffset));
} else {
newPtr = NULL;
}
- if (specPtr->internalOffset >= 0) {
- internalPtr = savePtr->recordPtr + specPtr->internalOffset;
+ if (specPtr->internalOffset != TCL_AUTO_LENGTH) {
+ internalPtr = (char *)savePtr->recordPtr + specPtr->internalOffset;
} else {
internalPtr = NULL;
}
@@ -1391,11 +1390,11 @@ Tk_RestoreSavedOptions(
* Now restore the old value of the option.
*/
- if (specPtr->objOffset >= 0) {
- *((Tcl_Obj **) (savePtr->recordPtr + specPtr->objOffset))
+ if (specPtr->objOffset != TCL_AUTO_LENGTH) {
+ *((Tcl_Obj **) ((char *)savePtr->recordPtr + specPtr->objOffset))
= savePtr->items[i].valuePtr;
}
- if (specPtr->internalOffset >= 0) {
+ if (specPtr->internalOffset != TCL_AUTO_LENGTH) {
register char *ptr = (char *) &savePtr->items[i].internalForm;
CLANG_ASSERT(internalPtr);
@@ -1488,7 +1487,7 @@ Tk_FreeSavedOptions(
Tk_SavedOptions *savePtr) /* Contains options saved in a previous call
* to Tk_SetOptions. */
{
- int count;
+ size_t count;
Tk_SavedOption *savedOptionPtr;
if (savePtr->nextPtr != NULL) {
@@ -1528,7 +1527,7 @@ Tk_FreeSavedOptions(
/* ARGSUSED */
void
Tk_FreeConfigOptions(
- char *recordPtr, /* Record whose fields contain current values
+ void *recordPtr, /* Record whose fields contain current values
* for options. */
Tk_OptionTable optionTable, /* Describes legal options. */
Tk_Window tkwin) /* Window associated with recordPtr; needed
@@ -1536,9 +1535,9 @@ Tk_FreeConfigOptions(
{
OptionTable *tablePtr;
Option *optionPtr;
- int count;
+ size_t count;
Tcl_Obj **oldPtrPtr, *oldPtr;
- char *oldInternalPtr;
+ void *oldInternalPtr;
const Tk_OptionSpec *specPtr;
for (tablePtr = (OptionTable *) optionTable; tablePtr != NULL;
@@ -1549,15 +1548,15 @@ Tk_FreeConfigOptions(
if (specPtr->type == TK_OPTION_SYNONYM) {
continue;
}
- if (specPtr->objOffset >= 0) {
- oldPtrPtr = (Tcl_Obj **) (recordPtr + specPtr->objOffset);
+ if (specPtr->objOffset != TCL_AUTO_LENGTH) {
+ oldPtrPtr = (Tcl_Obj **) ((char *)recordPtr + specPtr->objOffset);
oldPtr = *oldPtrPtr;
*oldPtrPtr = NULL;
} else {
oldPtr = NULL;
}
- if (specPtr->internalOffset >= 0) {
- oldInternalPtr = recordPtr + specPtr->internalOffset;
+ if (specPtr->internalOffset != TCL_AUTO_LENGTH) {
+ oldInternalPtr = (char *)recordPtr + specPtr->internalOffset;
} else {
oldInternalPtr = NULL;
}
@@ -1594,10 +1593,10 @@ FreeResources(
Option *optionPtr, /* Description of the configuration option. */
Tcl_Obj *objPtr, /* The current value of the option, specified
* as an object. */
- char *internalPtr, /* A pointer to an internal representation for
+ void *internalPtr, /* A pointer to an internal representation for
* the option's value, such as an int or
* (XColor *). Only valid if
- * optionPtr->specPtr->internalOffset >= 0. */
+ * optionPtr->specPtr->internalOffset != -1. */
Tk_Window tkwin) /* The window in which this option is used. */
{
int internalFormExists;
@@ -1608,7 +1607,7 @@ FreeResources(
* form, then use the object form.
*/
- internalFormExists = optionPtr->specPtr->internalOffset >= 0;
+ internalFormExists = optionPtr->specPtr->internalOffset != TCL_AUTO_LENGTH;
switch (optionPtr->specPtr->type) {
case TK_OPTION_STRING:
if (internalFormExists) {
@@ -1640,8 +1639,6 @@ FreeResources(
if (internalFormExists) {
Tk_FreeStyle(*((Tk_Style *) internalPtr));
*((Tk_Style *) internalPtr) = NULL;
- } else if (objPtr != NULL) {
- Tk_FreeStyleFromObj(objPtr);
}
break;
case TK_OPTION_BITMAP:
@@ -1716,7 +1713,7 @@ Tcl_Obj *
Tk_GetOptionInfo(
Tcl_Interp *interp, /* Interpreter for error reporting. If NULL,
* then no error message is created. */
- char *recordPtr, /* Record whose fields contain current values
+ void *recordPtr, /* Record whose fields contain current values
* for options. */
Tk_OptionTable optionTable, /* Describes all the legal options. */
Tcl_Obj *namePtr, /* If non-NULL, the string value selects a
@@ -1730,7 +1727,7 @@ Tk_GetOptionInfo(
Tcl_Obj *resultPtr;
OptionTable *tablePtr = (OptionTable *) optionTable;
Option *optionPtr;
- int count;
+ size_t count;
/*
* If information is only wanted for a single configuration spec, then
@@ -1784,7 +1781,7 @@ Tk_GetOptionInfo(
static Tcl_Obj *
GetConfigList(
- char *recordPtr, /* Pointer to record holding current values of
+ void *recordPtr, /* Pointer to record holding current values of
* configuration options. */
Option *optionPtr, /* Pointer to information describing a
* particular option. */
@@ -1827,8 +1824,8 @@ GetConfigList(
}
Tcl_ListObjAppendElement(NULL, listPtr, elementPtr);
- if (optionPtr->specPtr->objOffset >= 0) {
- elementPtr = *((Tcl_Obj **) (recordPtr
+ if (optionPtr->specPtr->objOffset != TCL_AUTO_LENGTH) {
+ elementPtr = *((Tcl_Obj **) ((char *)recordPtr
+ optionPtr->specPtr->objOffset));
if (elementPtr == NULL) {
elementPtr = Tcl_NewObj();
@@ -1862,7 +1859,7 @@ GetConfigList(
static Tcl_Obj *
GetObjectForOption(
- char *recordPtr, /* Pointer to record holding current values of
+ void *recordPtr, /* Pointer to record holding current values of
* configuration options. */
Option *optionPtr, /* Pointer to information describing an option
* whose internal value is stored in
@@ -1870,17 +1867,17 @@ GetObjectForOption(
Tk_Window tkwin) /* Window corresponding to recordPtr. */
{
Tcl_Obj *objPtr;
- char *internalPtr; /* Points to internal value of option in
+ void *internalPtr; /* Points to internal value of option in
* record. */
- internalPtr = recordPtr + optionPtr->specPtr->internalOffset;
+ internalPtr = (char *)recordPtr + optionPtr->specPtr->internalOffset;
objPtr = NULL;
switch (optionPtr->specPtr->type) {
case TK_OPTION_BOOLEAN:
- objPtr = Tcl_NewIntObj(*((int *) internalPtr));
+ objPtr = Tcl_NewWideIntObj(*((int *) internalPtr));
break;
case TK_OPTION_INT:
- objPtr = Tcl_NewIntObj(*((int *) internalPtr));
+ objPtr = Tcl_NewWideIntObj(*((int *) internalPtr));
break;
case TK_OPTION_DOUBLE:
objPtr = Tcl_NewDoubleObj(*((double *) internalPtr));
@@ -1954,7 +1951,7 @@ GetObjectForOption(
*((Tk_Anchor *) internalPtr)), -1);
break;
case TK_OPTION_PIXELS:
- objPtr = Tcl_NewIntObj(*((int *) internalPtr));
+ objPtr = Tcl_NewWideIntObj(*((int *) internalPtr));
break;
case TK_OPTION_WINDOW: {
Tk_Window tkwin = *((Tk_Window *) internalPtr);
@@ -2004,7 +2001,7 @@ Tk_GetOptionValue(
Tcl_Interp *interp, /* Interpreter for error reporting. If NULL
* then no messages are provided for
* errors. */
- char *recordPtr, /* Record whose fields contain current values
+ void *recordPtr, /* Record whose fields contain current values
* for options. */
Tk_OptionTable optionTable, /* Describes legal options. */
Tcl_Obj *namePtr, /* Gives the command-line name for the option
@@ -2022,8 +2019,8 @@ Tk_GetOptionValue(
if (optionPtr->specPtr->type == TK_OPTION_SYNONYM) {
optionPtr = optionPtr->extra.synonymPtr;
}
- if (optionPtr->specPtr->objOffset >= 0) {
- resultPtr = *((Tcl_Obj **) (recordPtr+optionPtr->specPtr->objOffset));
+ if (optionPtr->specPtr->objOffset != TCL_AUTO_LENGTH) {
+ resultPtr = *((Tcl_Obj **) ((char *)recordPtr+optionPtr->specPtr->objOffset));
if (resultPtr == NULL) {
/*
* This option has a null value and is represented by a null
@@ -2093,9 +2090,9 @@ TkDebugConfig(
if (tablePtr == (OptionTable *) Tcl_GetHashValue(hashEntryPtr)) {
for ( ; tablePtr != NULL; tablePtr = tablePtr->nextPtr) {
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tablePtr->refCount));
+ Tcl_NewWideIntObj(tablePtr->refCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tablePtr->numOptions));
+ Tcl_NewWideIntObj(tablePtr->numOptions));
Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj(
tablePtr->options[0].specPtr->optionName, -1));
}
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index a6a8cbf..7a74344 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -24,7 +24,7 @@
typedef struct ConsoleInfo {
Tcl_Interp *consoleInterp; /* Interpreter displaying the console. */
Tcl_Interp *interp; /* Interpreter controlled by console. */
- int refCount;
+ size_t refCount;
} ConsoleInfo;
/*
@@ -223,7 +223,7 @@ Tk_InitConsoleChannels(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
return;
}
@@ -456,7 +456,7 @@ Tk_CreateConsoleWindow(
if (mainWindow) {
Tk_DeleteEventHandler(mainWindow, StructureNotifyMask,
ConsoleEventProc, info);
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -596,7 +596,7 @@ ConsoleClose(
ConsoleInfo *info = data->info;
if (info) {
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
/*
* Assuming the Tcl_Interp * fields must already be NULL.
*/
@@ -885,7 +885,7 @@ InterpDeleteProc(
Tcl_DeleteThreadExitHandler(DeleteConsoleInterp, info->consoleInterp);
info->consoleInterp = NULL;
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -916,7 +916,7 @@ ConsoleDeleteProc(
if (info->consoleInterp) {
Tcl_DeleteInterp(info->consoleInterp);
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -953,7 +953,7 @@ ConsoleEventProc(
Tcl_EvalEx(consoleInterp, "tk::ConsoleExit", -1, TCL_EVAL_GLOBAL);
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index 21c713a..6bdfa9d 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.c
@@ -428,7 +428,7 @@ Tk_NameOfCursor(
sprintf(dispPtr->cursorString, "cursor id 0x%" TCL_Z_MODIFIER "x", (size_t)cursor);
return dispPtr->cursorString;
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, (char *) cursor);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, cursor);
if (idHashPtr == NULL) {
goto printid;
}
@@ -463,8 +463,7 @@ FreeCursor(
{
TkCursor *prevPtr;
- cursorPtr->resourceRefCount--;
- if (cursorPtr->resourceRefCount > 0) {
+ if (cursorPtr->resourceRefCount-- > 1) {
return;
}
@@ -518,7 +517,7 @@ Tk_FreeCursor(
Tcl_Panic("Tk_FreeCursor called before Tk_GetCursor");
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, (char *) cursor);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->cursorIdTable, cursor);
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeCursor received unknown cursor argument");
}
@@ -590,8 +589,7 @@ FreeCursorObj(
TkCursor *cursorPtr = objPtr->internalRep.twoPtrValue.ptr1;
if (cursorPtr != NULL) {
- cursorPtr->objRefCount--;
- if ((cursorPtr->objRefCount == 0)
+ if ((cursorPtr->objRefCount-- <= 1)
&& (cursorPtr->resourceRefCount == 0)) {
ckfree(cursorPtr);
}
@@ -864,9 +862,9 @@ TkDebugCursor(
for ( ; (cursorPtr != NULL); cursorPtr = cursorPtr->nextPtr) {
objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(cursorPtr->resourceRefCount));
+ Tcl_NewWideIntObj(cursorPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(cursorPtr->objRefCount));
+ Tcl_NewWideIntObj(cursorPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 64c32cd..0d52f2f 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -17,6 +17,14 @@
#define TCL_STORAGE_CLASS DLLEXPORT
#endif
+#if !defined(BUILD_tk)
+# define TK_DEPRECATED(msg) EXTERN TCL_DEPRECATED_API(msg)
+#elif defined(TK_NO_DEPRECATED)
+# define TK_DEPRECATED(msg) MODULE_SCOPE
+#else
+# define TK_DEPRECATED(msg) EXTERN
+#endif
+
/*
* WARNING: This file is automatically generated by the tools/genStubs.tcl
* script. Any modifications to the function declarations below should be made
@@ -95,7 +103,7 @@ EXTERN int Tk_CanvasTagsParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 19 */
-EXTERN CONST86 char * Tk_CanvasTagsPrintProc(ClientData clientData,
+EXTERN const char * Tk_CanvasTagsPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 20 */
@@ -133,7 +141,7 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp,
/* 29 */
EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp,
Tk_Window tkwin, const Tk_ConfigSpec *specs,
- int argc, CONST84 char **argv, char *widgRec,
+ int argc, const char **argv, char *widgRec,
int flags);
/* 30 */
EXTERN void Tk_ConfigureWindow(Tk_Window tkwin,
@@ -215,7 +223,7 @@ EXTERN void Tk_DeleteSelHandler(Tk_Window tkwin, Atom selection,
/* 54 */
EXTERN void Tk_DestroyWindow(Tk_Window tkwin);
/* 55 */
-EXTERN CONST84_RETURN char * Tk_DisplayName(Tk_Window tkwin);
+EXTERN const char * Tk_DisplayName(Tk_Window tkwin);
/* 56 */
EXTERN int Tk_DistanceToTextLayout(Tk_TextLayout layout, int x,
int y);
@@ -281,7 +289,8 @@ EXTERN void Tk_FreePixmap(Display *display, Pixmap pixmap);
/* 76 */
EXTERN void Tk_FreeTextLayout(Tk_TextLayout textLayout);
/* 77 */
-EXTERN void Tk_FreeXId(Display *display, XID xid);
+TK_DEPRECATED("function does nothing, call can be removed")
+void Tk_FreeXId(Display *display, XID xid);
/* 78 */
EXTERN GC Tk_GCForColor(XColor *colorPtr, Drawable drawable);
/* 79 */
@@ -298,9 +307,9 @@ EXTERN void Tk_GetAllBindings(Tcl_Interp *interp,
EXTERN int Tk_GetAnchor(Tcl_Interp *interp, const char *str,
Tk_Anchor *anchorPtr);
/* 83 */
-EXTERN CONST84_RETURN char * Tk_GetAtomName(Tk_Window tkwin, Atom atom);
+EXTERN const char * Tk_GetAtomName(Tk_Window tkwin, Atom atom);
/* 84 */
-EXTERN CONST84_RETURN char * Tk_GetBinding(Tcl_Interp *interp,
+EXTERN const char * Tk_GetBinding(Tcl_Interp *interp,
Tk_BindingTable bindingTable,
ClientData object, const char *eventStr);
/* 85 */
@@ -348,7 +357,7 @@ EXTERN Tk_Image Tk_GetImage(Tcl_Interp *interp, Tk_Window tkwin,
/* 98 */
EXTERN ClientData Tk_GetImageMasterData(Tcl_Interp *interp,
const char *name,
- CONST86 Tk_ImageType **typePtrPtr);
+ const Tk_ImageType **typePtrPtr);
/* 99 */
EXTERN Tk_ItemType * Tk_GetItemTypes(void);
/* 100 */
@@ -376,7 +385,7 @@ EXTERN void Tk_GetRootCoords(Tk_Window tkwin, int *xPtr,
int *yPtr);
/* 108 */
EXTERN int Tk_GetScrollInfo(Tcl_Interp *interp, int argc,
- CONST84 char **argv, double *dblPtr,
+ const char **argv, double *dblPtr,
int *intPtr);
/* 109 */
EXTERN int Tk_GetScreenMM(Tcl_Interp *interp, Tk_Window tkwin,
@@ -438,28 +447,27 @@ EXTERN void Tk_MoveWindow(Tk_Window tkwin, int x, int y);
/* 129 */
EXTERN void Tk_MoveToplevelWindow(Tk_Window tkwin, int x, int y);
/* 130 */
-EXTERN CONST84_RETURN char * Tk_NameOf3DBorder(Tk_3DBorder border);
+EXTERN const char * Tk_NameOf3DBorder(Tk_3DBorder border);
/* 131 */
-EXTERN CONST84_RETURN char * Tk_NameOfAnchor(Tk_Anchor anchor);
+EXTERN const char * Tk_NameOfAnchor(Tk_Anchor anchor);
/* 132 */
-EXTERN CONST84_RETURN char * Tk_NameOfBitmap(Display *display, Pixmap bitmap);
+EXTERN const char * Tk_NameOfBitmap(Display *display, Pixmap bitmap);
/* 133 */
-EXTERN CONST84_RETURN char * Tk_NameOfCapStyle(int cap);
+EXTERN const char * Tk_NameOfCapStyle(int cap);
/* 134 */
-EXTERN CONST84_RETURN char * Tk_NameOfColor(XColor *colorPtr);
+EXTERN const char * Tk_NameOfColor(XColor *colorPtr);
/* 135 */
-EXTERN CONST84_RETURN char * Tk_NameOfCursor(Display *display,
- Tk_Cursor cursor);
+EXTERN const char * Tk_NameOfCursor(Display *display, Tk_Cursor cursor);
/* 136 */
-EXTERN CONST84_RETURN char * Tk_NameOfFont(Tk_Font font);
+EXTERN const char * Tk_NameOfFont(Tk_Font font);
/* 137 */
-EXTERN CONST84_RETURN char * Tk_NameOfImage(Tk_ImageMaster imageMaster);
+EXTERN const char * Tk_NameOfImage(Tk_ImageMaster imageMaster);
/* 138 */
-EXTERN CONST84_RETURN char * Tk_NameOfJoinStyle(int join);
+EXTERN const char * Tk_NameOfJoinStyle(int join);
/* 139 */
-EXTERN CONST84_RETURN char * Tk_NameOfJustify(Tk_Justify justify);
+EXTERN const char * Tk_NameOfJustify(Tk_Justify justify);
/* 140 */
-EXTERN CONST84_RETURN char * Tk_NameOfRelief(int relief);
+EXTERN const char * Tk_NameOfRelief(int relief);
/* 141 */
EXTERN Tk_Window Tk_NameToWindow(Tcl_Interp *interp,
const char *pathName, Tk_Window tkwin);
@@ -468,14 +476,16 @@ EXTERN void Tk_OwnSelection(Tk_Window tkwin, Atom selection,
Tk_LostSelProc *proc, ClientData clientData);
/* 143 */
EXTERN int Tk_ParseArgv(Tcl_Interp *interp, Tk_Window tkwin,
- int *argcPtr, CONST84 char **argv,
+ int *argcPtr, const char **argv,
const Tk_ArgvInfo *argTable, int flags);
/* 144 */
-EXTERN void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle,
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoPutBlock_NoComposite(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height);
/* 145 */
-EXTERN void Tk_PhotoPutZoomedBlock_NoComposite(
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoPutZoomedBlock_NoComposite(
Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int zoomX, int zoomY,
@@ -486,13 +496,15 @@ EXTERN int Tk_PhotoGetImage(Tk_PhotoHandle handle,
/* 147 */
EXTERN void Tk_PhotoBlank(Tk_PhotoHandle handle);
/* 148 */
-EXTERN void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle,
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoExpand_Panic(Tk_PhotoHandle handle,
int width, int height);
/* 149 */
EXTERN void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr,
int *heightPtr);
/* 150 */
-EXTERN void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle,
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoSetSize_Panic(Tk_PhotoHandle handle,
int width, int height);
/* 151 */
EXTERN int Tk_PointToChar(Tk_TextLayout layout, int x, int y);
@@ -620,7 +632,7 @@ EXTERN void Tk_FreeBitmapFromObj(Tk_Window tkwin,
/* 194 */
EXTERN void Tk_FreeColorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr);
/* 195 */
-EXTERN void Tk_FreeConfigOptions(char *recordPtr,
+EXTERN void Tk_FreeConfigOptions(void *recordPtr,
Tk_OptionTable optionToken, Tk_Window tkwin);
/* 196 */
EXTERN void Tk_FreeSavedOptions(Tk_SavedOptions *savePtr);
@@ -642,12 +654,12 @@ EXTERN XColor * Tk_GetColorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr);
/* 203 */
EXTERN Tk_Cursor Tk_GetCursorFromObj(Tk_Window tkwin, Tcl_Obj *objPtr);
/* 204 */
-EXTERN Tcl_Obj * Tk_GetOptionInfo(Tcl_Interp *interp, char *recordPtr,
+EXTERN Tcl_Obj * Tk_GetOptionInfo(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionTable, Tcl_Obj *namePtr,
Tk_Window tkwin);
/* 205 */
EXTERN Tcl_Obj * Tk_GetOptionValue(Tcl_Interp *interp,
- char *recordPtr, Tk_OptionTable optionTable,
+ void *recordPtr, Tk_OptionTable optionTable,
Tcl_Obj *namePtr, Tk_Window tkwin);
/* 206 */
EXTERN int Tk_GetJustifyFromObj(Tcl_Interp *interp,
@@ -667,7 +679,7 @@ EXTERN int Tk_GetScrollInfoObj(Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], double *dblPtr,
int *intPtr);
/* 211 */
-EXTERN int Tk_InitOptions(Tcl_Interp *interp, char *recordPtr,
+EXTERN int Tk_InitOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionToken, Tk_Window tkwin);
/* 212 */
EXTERN void Tk_MainEx(int argc, char **argv,
@@ -676,7 +688,7 @@ EXTERN void Tk_MainEx(int argc, char **argv,
/* 213 */
EXTERN void Tk_RestoreSavedOptions(Tk_SavedOptions *savePtr);
/* 214 */
-EXTERN int Tk_SetOptions(Tcl_Interp *interp, char *recordPtr,
+EXTERN int Tk_SetOptions(Tcl_Interp *interp, void *recordPtr,
Tk_OptionTable optionTable, int objc,
Tcl_Obj *const objv[], Tk_Window tkwin,
Tk_SavedOptions *savePtr, int *maskPtr);
@@ -776,11 +788,13 @@ EXTERN void Tk_SetMinimumRequestSize(Tk_Window tkwin,
EXTERN void Tk_SetCaretPos(Tk_Window tkwin, int x, int y,
int height);
/* 246 */
-EXTERN void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle,
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoPutBlock_Panic(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int compRule);
/* 247 */
-EXTERN void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle,
+TK_DEPRECATED("function signature changed")
+void Tk_PhotoPutZoomedBlock_Panic(Tk_PhotoHandle handle,
Tk_PhotoImageBlock *blockPtr, int x, int y,
int width, int height, int zoomX, int zoomY,
int subsampleX, int subsampleY, int compRule);
@@ -818,22 +832,22 @@ EXTERN Tk_StyledElement Tk_GetStyledElement(Tk_Style style, int elementId,
Tk_OptionTable optionTable);
/* 261 */
EXTERN void Tk_GetElementSize(Tk_Style style,
- Tk_StyledElement element, char *recordPtr,
+ Tk_StyledElement element, void *recordPtr,
Tk_Window tkwin, int width, int height,
int inner, int *widthPtr, int *heightPtr);
/* 262 */
EXTERN void Tk_GetElementBox(Tk_Style style,
- Tk_StyledElement element, char *recordPtr,
+ Tk_StyledElement element, void *recordPtr,
Tk_Window tkwin, int x, int y, int width,
int height, int inner, int *xPtr, int *yPtr,
int *widthPtr, int *heightPtr);
/* 263 */
EXTERN int Tk_GetElementBorderWidth(Tk_Style style,
- Tk_StyledElement element, char *recordPtr,
+ Tk_StyledElement element, void *recordPtr,
Tk_Window tkwin);
/* 264 */
EXTERN void Tk_DrawElement(Tk_Style style,
- Tk_StyledElement element, char *recordPtr,
+ Tk_StyledElement element, void *recordPtr,
Tk_Window tkwin, Drawable d, int x, int y,
int width, int height, int state);
/* 265 */
@@ -895,7 +909,7 @@ typedef struct TkStubs {
double (*tk_CanvasPsY) (Tk_Canvas canvas, double y); /* 16 */
void (*tk_CanvasSetStippleOrigin) (Tk_Canvas canvas, GC gc); /* 17 */
int (*tk_CanvasTagsParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 18 */
- CONST86 char * (*tk_CanvasTagsPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 19 */
+ const char * (*tk_CanvasTagsPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 19 */
Tk_Window (*tk_CanvasTkwin) (Tk_Canvas canvas); /* 20 */
void (*tk_CanvasWindowCoords) (Tk_Canvas canvas, double x, double y, short *screenXPtr, short *screenYPtr); /* 21 */
void (*tk_ChangeWindowAttributes) (Tk_Window tkwin, unsigned long valueMask, XSetWindowAttributes *attsPtr); /* 22 */
@@ -905,7 +919,7 @@ typedef struct TkStubs {
int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */
int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 27 */
int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 28 */
- int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, int argc, CONST84 char **argv, char *widgRec, int flags); /* 29 */
+ int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, int argc, const char **argv, char *widgRec, int flags); /* 29 */
void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */
Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, int numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */
Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */
@@ -931,7 +945,7 @@ typedef struct TkStubs {
void (*tk_DeleteImage) (Tcl_Interp *interp, const char *name); /* 52 */
void (*tk_DeleteSelHandler) (Tk_Window tkwin, Atom selection, Atom target); /* 53 */
void (*tk_DestroyWindow) (Tk_Window tkwin); /* 54 */
- CONST84_RETURN char * (*tk_DisplayName) (Tk_Window tkwin); /* 55 */
+ const char * (*tk_DisplayName) (Tk_Window tkwin); /* 55 */
int (*tk_DistanceToTextLayout) (Tk_TextLayout layout, int x, int y); /* 56 */
void (*tk_Draw3DPolygon) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, XPoint *pointPtr, int numPoints, int borderWidth, int leftRelief); /* 57 */
void (*tk_Draw3DRectangle) (Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, int borderWidth, int relief); /* 58 */
@@ -953,14 +967,14 @@ typedef struct TkStubs {
void (*tk_FreeOptions) (const Tk_ConfigSpec *specs, char *widgRec, Display *display, int needFlags); /* 74 */
void (*tk_FreePixmap) (Display *display, Pixmap pixmap); /* 75 */
void (*tk_FreeTextLayout) (Tk_TextLayout textLayout); /* 76 */
- void (*tk_FreeXId) (Display *display, XID xid); /* 77 */
+ TCL_DEPRECATED_API("function does nothing, call can be removed") void (*tk_FreeXId) (Display *display, XID xid); /* 77 */
GC (*tk_GCForColor) (XColor *colorPtr, Drawable drawable); /* 78 */
void (*tk_GeometryRequest) (Tk_Window tkwin, int reqWidth, int reqHeight); /* 79 */
Tk_3DBorder (*tk_Get3DBorder) (Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid colorName); /* 80 */
void (*tk_GetAllBindings) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object); /* 81 */
int (*tk_GetAnchor) (Tcl_Interp *interp, const char *str, Tk_Anchor *anchorPtr); /* 82 */
- CONST84_RETURN char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */
- CONST84_RETURN char * (*tk_GetBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 84 */
+ const char * (*tk_GetAtomName) (Tk_Window tkwin, Atom atom); /* 83 */
+ const char * (*tk_GetBinding) (Tcl_Interp *interp, Tk_BindingTable bindingTable, ClientData object, const char *eventStr); /* 84 */
Pixmap (*tk_GetBitmap) (Tcl_Interp *interp, Tk_Window tkwin, const char *str); /* 85 */
Pixmap (*tk_GetBitmapFromData) (Tcl_Interp *interp, Tk_Window tkwin, const void *source, int width, int height); /* 86 */
int (*tk_GetCapStyle) (Tcl_Interp *interp, const char *str, int *capPtr); /* 87 */
@@ -974,7 +988,7 @@ typedef struct TkStubs {
void (*tk_GetFontMetrics) (Tk_Font font, Tk_FontMetrics *fmPtr); /* 95 */
GC (*tk_GetGC) (Tk_Window tkwin, unsigned long valueMask, XGCValues *valuePtr); /* 96 */
Tk_Image (*tk_GetImage) (Tcl_Interp *interp, Tk_Window tkwin, const char *name, Tk_ImageChangedProc *changeProc, ClientData clientData); /* 97 */
- ClientData (*tk_GetImageMasterData) (Tcl_Interp *interp, const char *name, CONST86 Tk_ImageType **typePtrPtr); /* 98 */
+ ClientData (*tk_GetImageMasterData) (Tcl_Interp *interp, const char *name, const Tk_ImageType **typePtrPtr); /* 98 */
Tk_ItemType * (*tk_GetItemTypes) (void); /* 99 */
int (*tk_GetJoinStyle) (Tcl_Interp *interp, const char *str, int *joinPtr); /* 100 */
int (*tk_GetJustify) (Tcl_Interp *interp, const char *str, Tk_Justify *justifyPtr); /* 101 */
@@ -984,7 +998,7 @@ typedef struct TkStubs {
Pixmap (*tk_GetPixmap) (Display *display, Drawable d, int width, int height, int depth); /* 105 */
int (*tk_GetRelief) (Tcl_Interp *interp, const char *name, int *reliefPtr); /* 106 */
void (*tk_GetRootCoords) (Tk_Window tkwin, int *xPtr, int *yPtr); /* 107 */
- int (*tk_GetScrollInfo) (Tcl_Interp *interp, int argc, CONST84 char **argv, double *dblPtr, int *intPtr); /* 108 */
+ int (*tk_GetScrollInfo) (Tcl_Interp *interp, int argc, const char **argv, double *dblPtr, int *intPtr); /* 108 */
int (*tk_GetScreenMM) (Tcl_Interp *interp, Tk_Window tkwin, const char *str, double *doublePtr); /* 109 */
int (*tk_GetSelection) (Tcl_Interp *interp, Tk_Window tkwin, Atom selection, Atom target, Tk_GetSelProc *proc, ClientData clientData); /* 110 */
Tk_Uid (*tk_GetUid) (const char *str); /* 111 */
@@ -1006,27 +1020,27 @@ typedef struct TkStubs {
void (*tk_MoveResizeWindow) (Tk_Window tkwin, int x, int y, int width, int height); /* 127 */
void (*tk_MoveWindow) (Tk_Window tkwin, int x, int y); /* 128 */
void (*tk_MoveToplevelWindow) (Tk_Window tkwin, int x, int y); /* 129 */
- CONST84_RETURN char * (*tk_NameOf3DBorder) (Tk_3DBorder border); /* 130 */
- CONST84_RETURN char * (*tk_NameOfAnchor) (Tk_Anchor anchor); /* 131 */
- CONST84_RETURN char * (*tk_NameOfBitmap) (Display *display, Pixmap bitmap); /* 132 */
- CONST84_RETURN char * (*tk_NameOfCapStyle) (int cap); /* 133 */
- CONST84_RETURN char * (*tk_NameOfColor) (XColor *colorPtr); /* 134 */
- CONST84_RETURN char * (*tk_NameOfCursor) (Display *display, Tk_Cursor cursor); /* 135 */
- CONST84_RETURN char * (*tk_NameOfFont) (Tk_Font font); /* 136 */
- CONST84_RETURN char * (*tk_NameOfImage) (Tk_ImageMaster imageMaster); /* 137 */
- CONST84_RETURN char * (*tk_NameOfJoinStyle) (int join); /* 138 */
- CONST84_RETURN char * (*tk_NameOfJustify) (Tk_Justify justify); /* 139 */
- CONST84_RETURN char * (*tk_NameOfRelief) (int relief); /* 140 */
+ const char * (*tk_NameOf3DBorder) (Tk_3DBorder border); /* 130 */
+ const char * (*tk_NameOfAnchor) (Tk_Anchor anchor); /* 131 */
+ const char * (*tk_NameOfBitmap) (Display *display, Pixmap bitmap); /* 132 */
+ const char * (*tk_NameOfCapStyle) (int cap); /* 133 */
+ const char * (*tk_NameOfColor) (XColor *colorPtr); /* 134 */
+ const char * (*tk_NameOfCursor) (Display *display, Tk_Cursor cursor); /* 135 */
+ const char * (*tk_NameOfFont) (Tk_Font font); /* 136 */
+ const char * (*tk_NameOfImage) (Tk_ImageMaster imageMaster); /* 137 */
+ const char * (*tk_NameOfJoinStyle) (int join); /* 138 */
+ const char * (*tk_NameOfJustify) (Tk_Justify justify); /* 139 */
+ const char * (*tk_NameOfRelief) (int relief); /* 140 */
Tk_Window (*tk_NameToWindow) (Tcl_Interp *interp, const char *pathName, Tk_Window tkwin); /* 141 */
void (*tk_OwnSelection) (Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc, ClientData clientData); /* 142 */
- int (*tk_ParseArgv) (Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, CONST84 char **argv, const Tk_ArgvInfo *argTable, int flags); /* 143 */
- void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height); /* 144 */
- void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */
+ int (*tk_ParseArgv) (Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, const char **argv, const Tk_ArgvInfo *argTable, int flags); /* 143 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height); /* 144 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_NoComposite) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY); /* 145 */
int (*tk_PhotoGetImage) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr); /* 146 */
void (*tk_PhotoBlank) (Tk_PhotoHandle handle); /* 147 */
- void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoExpand_Panic) (Tk_PhotoHandle handle, int width, int height); /* 148 */
void (*tk_PhotoGetSize) (Tk_PhotoHandle handle, int *widthPtr, int *heightPtr); /* 149 */
- void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoSetSize_Panic) (Tk_PhotoHandle handle, int width, int height); /* 150 */
int (*tk_PointToChar) (Tk_TextLayout layout, int x, int y); /* 151 */
int (*tk_PostscriptFontName) (Tk_Font tkfont, Tcl_DString *dsPtr); /* 152 */
void (*tk_PreserveColormap) (Display *display, Colormap colormap); /* 153 */
@@ -1071,7 +1085,7 @@ typedef struct TkStubs {
void (*tk_Free3DBorderFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 192 */
void (*tk_FreeBitmapFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 193 */
void (*tk_FreeColorFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 194 */
- void (*tk_FreeConfigOptions) (char *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 195 */
+ void (*tk_FreeConfigOptions) (void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 195 */
void (*tk_FreeSavedOptions) (Tk_SavedOptions *savePtr); /* 196 */
void (*tk_FreeCursorFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 197 */
void (*tk_FreeFontFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 198 */
@@ -1080,17 +1094,17 @@ typedef struct TkStubs {
Pixmap (*tk_GetBitmapFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 201 */
XColor * (*tk_GetColorFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 202 */
Tk_Cursor (*tk_GetCursorFromObj) (Tk_Window tkwin, Tcl_Obj *objPtr); /* 203 */
- Tcl_Obj * (*tk_GetOptionInfo) (Tcl_Interp *interp, char *recordPtr, Tk_OptionTable optionTable, Tcl_Obj *namePtr, Tk_Window tkwin); /* 204 */
- Tcl_Obj * (*tk_GetOptionValue) (Tcl_Interp *interp, char *recordPtr, Tk_OptionTable optionTable, Tcl_Obj *namePtr, Tk_Window tkwin); /* 205 */
+ Tcl_Obj * (*tk_GetOptionInfo) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, Tcl_Obj *namePtr, Tk_Window tkwin); /* 204 */
+ Tcl_Obj * (*tk_GetOptionValue) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, Tcl_Obj *namePtr, Tk_Window tkwin); /* 205 */
int (*tk_GetJustifyFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tk_Justify *justifyPtr); /* 206 */
int (*tk_GetMMFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, double *doublePtr); /* 207 */
int (*tk_GetPixelsFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, int *intPtr); /* 208 */
int (*tk_GetReliefFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *resultPtr); /* 209 */
int (*tk_GetScrollInfoObj) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], double *dblPtr, int *intPtr); /* 210 */
- int (*tk_InitOptions) (Tcl_Interp *interp, char *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 211 */
- void (*tk_MainEx) (int argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 212 */
+ int (*tk_InitOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionToken, Tk_Window tkwin); /* 211 */
+ TCL_DEPRECATED_API("Don't use this function in a stub-enabled extension") void (*tk_MainEx) (int argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 212 */
void (*tk_RestoreSavedOptions) (Tk_SavedOptions *savePtr); /* 213 */
- int (*tk_SetOptions) (Tcl_Interp *interp, char *recordPtr, Tk_OptionTable optionTable, int objc, Tcl_Obj *const objv[], Tk_Window tkwin, Tk_SavedOptions *savePtr, int *maskPtr); /* 214 */
+ int (*tk_SetOptions) (Tcl_Interp *interp, void *recordPtr, Tk_OptionTable optionTable, int objc, Tcl_Obj *const objv[], Tk_Window tkwin, Tk_SavedOptions *savePtr, int *maskPtr); /* 214 */
void (*tk_InitConsoleChannels) (Tcl_Interp *interp); /* 215 */
int (*tk_CreateConsoleWindow) (Tcl_Interp *interp); /* 216 */
void (*tk_CreateSmoothMethod) (Tcl_Interp *interp, const Tk_SmoothMethod *method); /* 217 */
@@ -1122,8 +1136,8 @@ typedef struct TkStubs {
void (*tk_SetInternalBorderEx) (Tk_Window tkwin, int left, int right, int top, int bottom); /* 243 */
void (*tk_SetMinimumRequestSize) (Tk_Window tkwin, int minWidth, int minHeight); /* 244 */
void (*tk_SetCaretPos) (Tk_Window tkwin, int x, int y, int height); /* 245 */
- void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 246 */
- void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 246 */
+ TCL_DEPRECATED_API("function signature changed") void (*tk_PhotoPutZoomedBlock_Panic) (Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 247 */
int (*tk_CollapseMotionEvents) (Display *display, int collapse); /* 248 */
Tk_StyleEngine (*tk_RegisterStyleEngine) (const char *name, Tk_StyleEngine parent); /* 249 */
Tk_StyleEngine (*tk_GetStyleEngine) (const char *name); /* 250 */
@@ -1137,10 +1151,10 @@ typedef struct TkStubs {
Tk_Style (*tk_GetStyleFromObj) (Tcl_Obj *objPtr); /* 258 */
void (*tk_FreeStyleFromObj) (Tcl_Obj *objPtr); /* 259 */
Tk_StyledElement (*tk_GetStyledElement) (Tk_Style style, int elementId, Tk_OptionTable optionTable); /* 260 */
- void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, char *recordPtr, Tk_Window tkwin, int width, int height, int inner, int *widthPtr, int *heightPtr); /* 261 */
- void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, char *recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); /* 262 */
- int (*tk_GetElementBorderWidth) (Tk_Style style, Tk_StyledElement element, char *recordPtr, Tk_Window tkwin); /* 263 */
- void (*tk_DrawElement) (Tk_Style style, Tk_StyledElement element, char *recordPtr, Tk_Window tkwin, Drawable d, int x, int y, int width, int height, int state); /* 264 */
+ void (*tk_GetElementSize) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int width, int height, int inner, int *widthPtr, int *heightPtr); /* 261 */
+ void (*tk_GetElementBox) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, int x, int y, int width, int height, int inner, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); /* 262 */
+ int (*tk_GetElementBorderWidth) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin); /* 263 */
+ void (*tk_DrawElement) (Tk_Style style, Tk_StyledElement element, void *recordPtr, Tk_Window tkwin, Drawable d, int x, int y, int width, int height, int state); /* 264 */
int (*tk_PhotoExpand) (Tcl_Interp *interp, Tk_PhotoHandle handle, int width, int height); /* 265 */
int (*tk_PhotoPutBlock) (Tcl_Interp *interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int compRule); /* 266 */
int (*tk_PhotoPutZoomedBlock) (Tcl_Interp *interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule); /* 267 */
@@ -1721,12 +1735,30 @@ extern const TkStubs *tkStubsPtr;
#undef Tk_SafeInit
#undef Tk_CreateConsoleWindow
+#undef Tk_FreeXId
+#define Tk_FreeXId(display,xid)
+#undef Tk_GetStyleFromObj
+#undef Tk_FreeStyleFromObj
+#define Tk_GetStyleFromObj(obj) Tk_AllocStyleFromObj(NULL, obj)
+#define Tk_FreeStyleFromObj(obj) /* no-op */
+
+
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(int argc, wchar_t **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
#endif
+
+#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
+#undef Tk_PhotoPutBlock_NoComposite
+#undef Tk_PhotoPutZoomedBlock_NoComposite
+#undef Tk_PhotoExpand_Panic
+#undef Tk_PhotoPutBlock_Panic
+#undef Tk_PhotoPutZoomedBlock_Panic
+#undef Tk_PhotoSetSize_Panic
+#endif /* TK_NO_DEPRECATED */
+
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 161e581..cccc6d6 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -16,8 +16,8 @@
*/
#include "tkInt.h"
-#include "default.h"
#include "tkEntry.h"
+#include "default.h"
/*
* The following macro defines how many extra pixels to leave on each side of
@@ -63,100 +63,106 @@ enum validateType {
static const Tk_OptionSpec entryOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder),
+ DEF_ENTRY_BG_COLOR, -1, offsetof(Entry, normalBorder),
0, DEF_ENTRY_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_ENTRY_BORDER_WIDTH, -1, Tk_Offset(Entry, borderWidth), 0, 0, 0},
+ DEF_ENTRY_BORDER_WIDTH, -1, offsetof(Entry, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_ENTRY_CURSOR, -1, Tk_Offset(Entry, cursor),
+ DEF_ENTRY_CURSOR, -1, offsetof(Entry, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-disabledbackground", "disabledBackground",
"DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, -1,
- Tk_Offset(Entry, disabledBorder), TK_OPTION_NULL_OK,
+ offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_ENTRY_DISABLED_FG, -1,
- Tk_Offset(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
"ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1,
- Tk_Offset(Entry, exportSelection), 0, 0, 0},
+ offsetof(Entry, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, -1, Tk_Offset(Entry, tkfont), 0, 0, 0},
+ DEF_ENTRY_FONT, -1, offsetof(Entry, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_ENTRY_FG, -1, Tk_Offset(Entry, fgColorPtr), 0, 0, 0},
+ DEF_ENTRY_FG, -1, offsetof(Entry, fgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG,
- -1, Tk_Offset(Entry, highlightBgColorPtr), 0, 0, 0},
+ -1, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_ENTRY_HIGHLIGHT, -1, Tk_Offset(Entry, highlightColorPtr), 0, 0, 0},
+ DEF_ENTRY_HIGHLIGHT, -1, offsetof(Entry, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(Entry, highlightWidth), 0, 0, 0},
+ offsetof(Entry, highlightWidth), 0, 0, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
- DEF_ENTRY_INSERT_BG, -1, Tk_Offset(Entry, insertBorder), 0, 0, 0},
+ DEF_ENTRY_INSERT_BG, -1, offsetof(Entry, insertBorder), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
"BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, -1,
- Tk_Offset(Entry, insertBorderWidth), 0,
+ offsetof(Entry, insertBorderWidth), 0,
(ClientData) DEF_ENTRY_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_ENTRY_INSERT_OFF_TIME, -1, Tk_Offset(Entry, insertOffTime),
+ DEF_ENTRY_INSERT_OFF_TIME, -1, offsetof(Entry, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_ENTRY_INSERT_ON_TIME, -1, Tk_Offset(Entry, insertOnTime), 0, 0, 0},
+ DEF_ENTRY_INSERT_ON_TIME, -1, offsetof(Entry, insertOnTime), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_ENTRY_INSERT_WIDTH, -1, Tk_Offset(Entry, insertWidth), 0, 0, 0},
+ DEF_ENTRY_INSERT_WIDTH, -1, offsetof(Entry, insertWidth), 0, 0, 0},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- DEF_ENTRY_INVALIDCMD, -1, Tk_Offset(Entry, invalidCmd),
+ DEF_ENTRY_INVALIDCMD, -1, offsetof(Entry, invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-invcmd", NULL, NULL,
NULL, 0, -1, 0, "-invalidcommand", 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_ENTRY_JUSTIFY, -1, Tk_Offset(Entry, justify), 0, 0, 0},
+ DEF_ENTRY_JUSTIFY, -1, offsetof(Entry, justify), 0, 0, 0},
+ {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
+ DEF_ENTRY_PLACEHOLDER, -1, offsetof(Entry, placeholderString),
+ TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
+ "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, -1,
+ offsetof(Entry, placeholderColorPtr), 0, 0, 0},
{TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground",
"ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, -1,
- Tk_Offset(Entry, readonlyBorder), TK_OPTION_NULL_OK,
+ offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_READONLY_BG_MONO, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_ENTRY_RELIEF, -1, Tk_Offset(Entry, relief), 0, 0, 0},
+ DEF_ENTRY_RELIEF, -1, offsetof(Entry, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_ENTRY_SELECT_COLOR, -1, Tk_Offset(Entry, selBorder),
+ DEF_ENTRY_SELECT_COLOR, -1, offsetof(Entry, selBorder),
0, DEF_ENTRY_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1,
- Tk_Offset(Entry, selBorderWidth),
+ offsetof(Entry, selBorderWidth),
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr),
+ DEF_ENTRY_SELECT_FG_COLOR, -1, offsetof(Entry, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-show", "show", "Show",
- DEF_ENTRY_SHOW, -1, Tk_Offset(Entry, showChar),
+ DEF_ENTRY_SHOW, -1, offsetof(Entry, showChar),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_ENTRY_STATE, -1, Tk_Offset(Entry, state),
+ DEF_ENTRY_STATE, -1, offsetof(Entry, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus),
+ DEF_ENTRY_TAKE_FOCUS, -1, offsetof(Entry, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_ENTRY_TEXT_VARIABLE, -1, Tk_Offset(Entry, textVarName),
+ DEF_ENTRY_TEXT_VARIABLE, -1, offsetof(Entry, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate),
+ DEF_ENTRY_VALIDATE, -1, offsetof(Entry, validate),
0, validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand",
- NULL, -1, Tk_Offset(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-vcmd", NULL, NULL,
NULL, 0, -1, 0, "-validatecommand", 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, -1, Tk_Offset(Entry, prefWidth), 0, 0, 0},
+ DEF_ENTRY_WIDTH, -1, offsetof(Entry, prefWidth), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_ENTRY_SCROLL_COMMAND, -1, Tk_Offset(Entry, scrollCmd),
+ DEF_ENTRY_SCROLL_COMMAND, -1, offsetof(Entry, scrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -180,133 +186,139 @@ static const Tk_OptionSpec entryOptSpec[] = {
static const Tk_OptionSpec sbOptSpec[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background",
- DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(Spinbox, activeBorder),
+ DEF_BUTTON_ACTIVE_BG_COLOR, -1, offsetof(Spinbox, activeBorder),
0, DEF_BUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder),
+ DEF_ENTRY_BG_COLOR, -1, offsetof(Entry, normalBorder),
0, DEF_ENTRY_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_ENTRY_BORDER_WIDTH, -1, Tk_Offset(Entry, borderWidth), 0, 0, 0},
+ DEF_ENTRY_BORDER_WIDTH, -1, offsetof(Entry, borderWidth), 0, 0, 0},
{TK_OPTION_BORDER, "-buttonbackground", "Button.background", "Background",
- DEF_BUTTON_BG_COLOR, -1, Tk_Offset(Spinbox, buttonBorder),
+ DEF_BUTTON_BG_COLOR, -1, offsetof(Spinbox, buttonBorder),
0, DEF_BUTTON_BG_MONO, 0},
{TK_OPTION_CURSOR, "-buttoncursor", "Button.cursor", "Cursor",
- DEF_BUTTON_CURSOR, -1, Tk_Offset(Spinbox, bCursor),
+ DEF_BUTTON_CURSOR, -1, offsetof(Spinbox, bCursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-buttondownrelief", "Button.relief", "Relief",
- DEF_BUTTON_RELIEF, -1, Tk_Offset(Spinbox, bdRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, -1, offsetof(Spinbox, bdRelief), 0, 0, 0},
{TK_OPTION_RELIEF, "-buttonuprelief", "Button.relief", "Relief",
- DEF_BUTTON_RELIEF, -1, Tk_Offset(Spinbox, buRelief), 0, 0, 0},
+ DEF_BUTTON_RELIEF, -1, offsetof(Spinbox, buRelief), 0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_SPINBOX_CMD, -1, Tk_Offset(Spinbox, command),
+ DEF_SPINBOX_CMD, -1, offsetof(Spinbox, command),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_ENTRY_CURSOR, -1, Tk_Offset(Entry, cursor),
+ DEF_ENTRY_CURSOR, -1, offsetof(Entry, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-disabledbackground", "disabledBackground",
"DisabledBackground", DEF_ENTRY_DISABLED_BG_COLOR, -1,
- Tk_Offset(Entry, disabledBorder), TK_OPTION_NULL_OK,
+ offsetof(Entry, disabledBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_DISABLED_BG_MONO, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_ENTRY_DISABLED_FG, -1,
- Tk_Offset(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(Entry, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
"ExportSelection", DEF_ENTRY_EXPORT_SELECTION, -1,
- Tk_Offset(Entry, exportSelection), 0, 0, 0},
+ offsetof(Entry, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, -1, Tk_Offset(Entry, tkfont), 0, 0, 0},
+ DEF_ENTRY_FONT, -1, offsetof(Entry, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_ENTRY_FG, -1, Tk_Offset(Entry, fgColorPtr), 0, 0, 0},
+ DEF_ENTRY_FG, -1, offsetof(Entry, fgColorPtr), 0, 0, 0},
{TK_OPTION_STRING, "-format", "format", "Format",
- DEF_SPINBOX_FORMAT, -1, Tk_Offset(Spinbox, reqFormat),
+ DEF_SPINBOX_FORMAT, -1, offsetof(Spinbox, reqFormat),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-from", "from", "From",
- DEF_SPINBOX_FROM, -1, Tk_Offset(Spinbox, fromValue), 0, 0, 0},
+ DEF_SPINBOX_FROM, -1, offsetof(Spinbox, fromValue), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_ENTRY_HIGHLIGHT_BG,
- -1, Tk_Offset(Entry, highlightBgColorPtr), 0, 0, 0},
+ -1, offsetof(Entry, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_ENTRY_HIGHLIGHT, -1, Tk_Offset(Entry, highlightColorPtr), 0, 0, 0},
+ DEF_ENTRY_HIGHLIGHT, -1, offsetof(Entry, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_ENTRY_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(Entry, highlightWidth), 0, 0, 0},
+ offsetof(Entry, highlightWidth), 0, 0, 0},
{TK_OPTION_DOUBLE, "-increment", "increment", "Increment",
- DEF_SPINBOX_INCREMENT, -1, Tk_Offset(Spinbox, increment), 0, 0, 0},
+ DEF_SPINBOX_INCREMENT, -1, offsetof(Spinbox, increment), 0, 0, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
- DEF_ENTRY_INSERT_BG, -1, Tk_Offset(Entry, insertBorder), 0, 0, 0},
+ DEF_ENTRY_INSERT_BG, -1, offsetof(Entry, insertBorder), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
"BorderWidth", DEF_ENTRY_INSERT_BD_COLOR, -1,
- Tk_Offset(Entry, insertBorderWidth), 0,
+ offsetof(Entry, insertBorderWidth), 0,
(ClientData) DEF_ENTRY_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_ENTRY_INSERT_OFF_TIME, -1, Tk_Offset(Entry, insertOffTime),
+ DEF_ENTRY_INSERT_OFF_TIME, -1, offsetof(Entry, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_ENTRY_INSERT_ON_TIME, -1, Tk_Offset(Entry, insertOnTime), 0, 0, 0},
+ DEF_ENTRY_INSERT_ON_TIME, -1, offsetof(Entry, insertOnTime), 0, 0, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_ENTRY_INSERT_WIDTH, -1, Tk_Offset(Entry, insertWidth), 0, 0, 0},
+ DEF_ENTRY_INSERT_WIDTH, -1, offsetof(Entry, insertWidth), 0, 0, 0},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- DEF_ENTRY_INVALIDCMD, -1, Tk_Offset(Entry, invalidCmd),
+ DEF_ENTRY_INVALIDCMD, -1, offsetof(Entry, invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-invcmd", NULL, NULL,
NULL, 0, -1, 0, "-invalidcommand", 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_ENTRY_JUSTIFY, -1, Tk_Offset(Entry, justify), 0, 0, 0},
+ DEF_ENTRY_JUSTIFY, -1, offsetof(Entry, justify), 0, 0, 0},
+ {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
+ DEF_ENTRY_PLACEHOLDER, -1, offsetof(Entry, placeholderString),
+ TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
+ "PlaceholderForeground", DEF_ENTRY_PLACEHOLDERFG, -1,
+ offsetof(Entry, placeholderColorPtr), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_ENTRY_RELIEF, -1, Tk_Offset(Entry, relief), 0, 0, 0},
+ DEF_ENTRY_RELIEF, -1, offsetof(Entry, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-readonlybackground", "readonlyBackground",
"ReadonlyBackground", DEF_ENTRY_READONLY_BG_COLOR, -1,
- Tk_Offset(Entry, readonlyBorder), TK_OPTION_NULL_OK,
+ offsetof(Entry, readonlyBorder), TK_OPTION_NULL_OK,
(ClientData) DEF_ENTRY_READONLY_BG_MONO, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SPINBOX_REPEAT_DELAY, -1, Tk_Offset(Spinbox, repeatDelay),
+ DEF_SPINBOX_REPEAT_DELAY, -1, offsetof(Spinbox, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_SPINBOX_REPEAT_INTERVAL, -1, Tk_Offset(Spinbox, repeatInterval),
+ DEF_SPINBOX_REPEAT_INTERVAL, -1, offsetof(Spinbox, repeatInterval),
0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_ENTRY_SELECT_COLOR, -1, Tk_Offset(Entry, selBorder),
+ DEF_ENTRY_SELECT_COLOR, -1, offsetof(Entry, selBorder),
0, DEF_ENTRY_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_ENTRY_SELECT_BD_COLOR, -1,
- Tk_Offset(Entry, selBorderWidth),
+ offsetof(Entry, selBorderWidth),
0, DEF_ENTRY_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_ENTRY_SELECT_FG_COLOR, -1, Tk_Offset(Entry, selFgColorPtr),
+ DEF_ENTRY_SELECT_FG_COLOR, -1, offsetof(Entry, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_ENTRY_SELECT_FG_MONO, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_ENTRY_STATE, -1, Tk_Offset(Entry, state),
+ DEF_ENTRY_STATE, -1, offsetof(Entry, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_ENTRY_TAKE_FOCUS, -1, Tk_Offset(Entry, takeFocus),
+ DEF_ENTRY_TAKE_FOCUS, -1, offsetof(Entry, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_ENTRY_TEXT_VARIABLE, -1, Tk_Offset(Entry, textVarName),
+ DEF_ENTRY_TEXT_VARIABLE, -1, offsetof(Entry, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To",
- DEF_SPINBOX_TO, -1, Tk_Offset(Spinbox, toValue), 0, 0, 0},
+ DEF_SPINBOX_TO, -1, offsetof(Spinbox, toValue), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- DEF_ENTRY_VALIDATE, -1, Tk_Offset(Entry, validate),
+ DEF_ENTRY_VALIDATE, -1, offsetof(Entry, validate),
0, validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand","ValidateCommand",
- NULL, -1, Tk_Offset(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(Entry, validateCmd), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-values", "values", "Values",
- DEF_SPINBOX_VALUES, -1, Tk_Offset(Spinbox, valueStr),
+ DEF_SPINBOX_VALUES, -1, offsetof(Spinbox, valueStr),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-vcmd", NULL, NULL,
NULL, 0, -1, 0, "-validatecommand", 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, -1, Tk_Offset(Entry, prefWidth), 0, 0, 0},
+ DEF_ENTRY_WIDTH, -1, offsetof(Entry, prefWidth), 0, 0, 0},
{TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap",
- DEF_SPINBOX_WRAP, -1, Tk_Offset(Spinbox, wrap), 0, 0, 0},
+ DEF_SPINBOX_WRAP, -1, offsetof(Spinbox, wrap), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_ENTRY_SCROLL_COMMAND, -1, Tk_Offset(Entry, scrollCmd),
+ DEF_ENTRY_SCROLL_COMMAND, -1, offsetof(Entry, scrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -537,6 +549,8 @@ Tk_EntryObjCmd(
entryPtr->avgWidth = 1;
entryPtr->validate = VALIDATE_NONE;
+ entryPtr->placeholderGC = NULL;
+
/*
* Keep a hold of the associated tkwin until we destroy the entry,
* otherwise Tk might free it while we still need it.
@@ -552,7 +566,7 @@ Tk_EntryObjCmd(
Tk_CreateSelHandler(entryPtr->tkwin, XA_PRIMARY, XA_STRING,
EntryFetchSelection, entryPtr, XA_STRING);
- if ((Tk_InitOptions(interp, (char *) entryPtr, optionTable, tkwin)
+ if ((Tk_InitOptions(interp, entryPtr, optionTable, tkwin)
!= TCL_OK) ||
(ConfigureEntry(interp, entryPtr, objc-2, objv+2) != TCL_OK)) {
Tk_DestroyWindow(entryPtr->tkwin);
@@ -626,10 +640,10 @@ EntryWidgetObjCmd(
index--;
}
Tk_CharBbox(entryPtr->textLayout, index, &x, &y, &width, &height);
- bbox[0] = Tcl_NewIntObj(x + entryPtr->layoutX);
- bbox[1] = Tcl_NewIntObj(y + entryPtr->layoutY);
- bbox[2] = Tcl_NewIntObj(width);
- bbox[3] = Tcl_NewIntObj(height);
+ bbox[0] = Tcl_NewWideIntObj(x + entryPtr->layoutX);
+ bbox[1] = Tcl_NewWideIntObj(y + entryPtr->layoutY);
+ bbox[2] = Tcl_NewWideIntObj(width);
+ bbox[3] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, bbox));
break;
}
@@ -640,7 +654,7 @@ EntryWidgetObjCmd(
goto error;
}
- objPtr = Tk_GetOptionValue(interp, (char *) entryPtr,
+ objPtr = Tk_GetOptionValue(interp, entryPtr,
entryPtr->optionTable, objv[2], entryPtr->tkwin);
if (objPtr == NULL) {
goto error;
@@ -650,7 +664,7 @@ EntryWidgetObjCmd(
case COMMAND_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) entryPtr,
+ objPtr = Tk_GetOptionInfo(interp, entryPtr,
entryPtr->optionTable,
(objc == 3) ? objv[2] : NULL,
entryPtr->tkwin);
@@ -720,7 +734,7 @@ EntryWidgetObjCmd(
&index) != TCL_OK) {
goto error;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
break;
}
@@ -1137,7 +1151,7 @@ ConfigureEntry(
* First pass: set options to new values.
*/
- if (Tk_SetOptions(interp, (char *) entryPtr,
+ if (Tk_SetOptions(interp, entryPtr,
entryPtr->optionTable, objc, objv,
entryPtr->tkwin, &savedOptions, NULL) != TCL_OK) {
continue;
@@ -1177,13 +1191,15 @@ ConfigureEntry(
if (entryPtr->type == TK_SPINBOX) {
if (sbPtr->fromValue > sbPtr->toValue) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "-to value must be greater than -from value",
- -1));
- Tcl_SetErrorCode(interp, "TK", "SPINBOX", "RANGE_SANITY",
- NULL);
- continue;
- }
+ /*
+ * Swap -from and -to values.
+ */
+
+ double tmpFromTo = sbPtr->fromValue;
+
+ sbPtr->fromValue = sbPtr->toValue;
+ sbPtr->toValue = tmpFromTo;
+ }
if (sbPtr->reqFormat && (oldFormat != sbPtr->reqFormat)) {
/*
@@ -1487,8 +1503,20 @@ EntryWorldChanged(
}
entryPtr->textGC = gc;
+ if (entryPtr->placeholderColorPtr != NULL) {
+ gcValues.foreground = entryPtr->placeholderColorPtr->pixel;
+ }
+ mask = GCForeground | GCFont | GCGraphicsExposures;
+ gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues);
+ if (entryPtr->placeholderGC != NULL) {
+ Tk_FreeGC(entryPtr->display, entryPtr->placeholderGC);
+ }
+ entryPtr->placeholderGC = gc;
+
if (entryPtr->selFgColorPtr != NULL) {
gcValues.foreground = entryPtr->selFgColorPtr->pixel;
+ } else {
+ gcValues.foreground = colorPtr->pixel;
}
gcValues.font = Tk_FontId(entryPtr->tkfont);
mask = GCForeground | GCFont;
@@ -1732,9 +1760,15 @@ DisplayEntry(
* selected portion on top of it.
*/
- Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC,
+ if ((entryPtr->numChars != 0) || (entryPtr->placeholderChars == 0)) {
+ Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->textGC,
entryPtr->textLayout, entryPtr->layoutX, entryPtr->layoutY,
entryPtr->leftIndex, entryPtr->numChars);
+ } else {
+ Tk_DrawTextLayout(entryPtr->display, pixmap, entryPtr->placeholderGC,
+ entryPtr->placeholderLayout, entryPtr->placeholderX, entryPtr->layoutY,
+ entryPtr->placeholderLeftIndex, entryPtr->placeholderChars);
+ }
if (showSelection && (entryPtr->state != STATE_DISABLED)
&& (entryPtr->selTextGC != entryPtr->textGC)
@@ -1947,6 +1981,58 @@ EntryComputeGeometry(
*p = '\0';
}
+ /* Recompute layout of placeholder text.
+ * Only the placeholderX and placeholderLeftIndex value is needed.
+ * We use the same font so we can use the layoutY value from below.
+ */
+
+ Tk_FreeTextLayout(entryPtr->placeholderLayout);
+ if (entryPtr->placeholderString) {
+ entryPtr->placeholderChars = strlen(entryPtr->placeholderString);
+ entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont,
+ entryPtr->placeholderString, entryPtr->placeholderChars, 0,
+ entryPtr->justify, TK_IGNORE_NEWLINES, &totalLength, NULL);
+ overflow = totalLength -
+ (Tk_Width(entryPtr->tkwin) - 2*entryPtr->inset - entryPtr->xWidth);
+ if (overflow <= 0) {
+ entryPtr->placeholderLeftIndex = 0;
+ if (entryPtr->justify == TK_JUSTIFY_LEFT) {
+ entryPtr->placeholderX = entryPtr->inset;
+ } else if (entryPtr->justify == TK_JUSTIFY_RIGHT) {
+ entryPtr->placeholderX = Tk_Width(entryPtr->tkwin) - entryPtr->inset
+ - entryPtr->xWidth - totalLength;
+ } else {
+ entryPtr->placeholderX = (Tk_Width(entryPtr->tkwin)
+ - entryPtr->xWidth - totalLength)/2;
+ }
+ } else {
+
+ /*
+ * The whole string can't fit in the window. Compute the maximum
+ * number of characters that may be off-screen to the left without
+ * leaving empty space on the right of the window, then don't let
+ * placeholderLeftIndex be any greater than that.
+ */
+
+ maxOffScreen = Tk_PointToChar(entryPtr->placeholderLayout, overflow, 0);
+ Tk_CharBbox(entryPtr->placeholderLayout, maxOffScreen,
+ &rightX, NULL, NULL, NULL);
+ if (rightX < overflow) {
+ maxOffScreen++;
+ }
+ entryPtr->placeholderLeftIndex = maxOffScreen;
+ Tk_CharBbox(entryPtr->placeholderLayout, entryPtr->placeholderLeftIndex, &rightX,
+ NULL, NULL, NULL);
+ entryPtr->placeholderX = entryPtr->inset -rightX;
+ }
+ } else {
+ entryPtr->placeholderChars = 0;
+ entryPtr->placeholderLayout = Tk_ComputeTextLayout(entryPtr->tkfont,
+ entryPtr->placeholderString, 0, 0,
+ entryPtr->justify, TK_IGNORE_NEWLINES, NULL, NULL);
+ entryPtr->placeholderX = entryPtr->inset;
+ }
+
Tk_FreeTextLayout(entryPtr->textLayout);
entryPtr->textLayout = Tk_ComputeTextLayout(entryPtr->tkfont,
entryPtr->displayString, entryPtr->numChars, 0,
@@ -2042,9 +2128,7 @@ InsertChars(
const char *value) /* New characters to add (NULL-terminated
* string). */
{
- ptrdiff_t byteIndex;
- size_t byteCount, newByteCount;
- int oldChars, charsAdded;
+ size_t byteIndex, byteCount, newByteCount, oldChars, charsAdded;
const char *string;
char *newStr;
@@ -3267,7 +3351,7 @@ EntryValidate(
*
* Results:
* TCL_OK if the validatecommand accepts the new string, TCL_ERROR if any
- * problems occured with validatecommand.
+ * problems occurred with validatecommand.
*
* Side effects:
* The insertion/deletion may be aborted, and the validatecommand might
@@ -3324,7 +3408,7 @@ EntryValidateChange(
/*
* If e->validate has become VALIDATE_NONE during the validation, or we
* now have VALIDATE_VAR set (from EntrySetValue) and didn't before, it
- * means that a loop condition almost occured. Do not allow this
+ * means that a loop condition almost occurred. Do not allow this
* validation result to finish.
*/
@@ -3661,6 +3745,8 @@ Tk_SpinboxObjCmd(
sbPtr->bdRelief = TK_RELIEF_FLAT;
sbPtr->buRelief = TK_RELIEF_FLAT;
+ entryPtr->placeholderGC = NULL;
+
/*
* Keep a hold of the associated tkwin until we destroy the spinbox,
* otherwise Tk might free it while we still need it.
@@ -3676,7 +3762,7 @@ Tk_SpinboxObjCmd(
Tk_CreateSelHandler(entryPtr->tkwin, XA_PRIMARY, XA_STRING,
EntryFetchSelection, entryPtr, XA_STRING);
- if (Tk_InitOptions(interp, (char *) sbPtr, optionTable, tkwin)
+ if (Tk_InitOptions(interp, sbPtr, optionTable, tkwin)
!= TCL_OK) {
Tk_DestroyWindow(entryPtr->tkwin);
return TCL_ERROR;
@@ -3757,10 +3843,10 @@ SpinboxWidgetObjCmd(
index--;
}
Tk_CharBbox(entryPtr->textLayout, index, &x, &y, &width, &height);
- bbox[0] = Tcl_NewIntObj(x + entryPtr->layoutX);
- bbox[1] = Tcl_NewIntObj(y + entryPtr->layoutY);
- bbox[2] = Tcl_NewIntObj(width);
- bbox[3] = Tcl_NewIntObj(height);
+ bbox[0] = Tcl_NewWideIntObj(x + entryPtr->layoutX);
+ bbox[1] = Tcl_NewWideIntObj(y + entryPtr->layoutY);
+ bbox[2] = Tcl_NewWideIntObj(width);
+ bbox[3] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, bbox));
break;
}
@@ -3771,7 +3857,7 @@ SpinboxWidgetObjCmd(
goto error;
}
- objPtr = Tk_GetOptionValue(interp, (char *) entryPtr,
+ objPtr = Tk_GetOptionValue(interp, entryPtr,
entryPtr->optionTable, objv[2], entryPtr->tkwin);
if (objPtr == NULL) {
goto error;
@@ -3781,7 +3867,7 @@ SpinboxWidgetObjCmd(
case SB_CMD_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) entryPtr,
+ objPtr = Tk_GetOptionInfo(interp, entryPtr,
entryPtr->optionTable, (objc == 3) ? objv[2] : NULL,
entryPtr->tkwin);
if (objPtr == NULL) {
@@ -3871,7 +3957,7 @@ SpinboxWidgetObjCmd(
&index) != TCL_OK) {
goto error;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
break;
}
@@ -4301,16 +4387,17 @@ SpinboxInvoke(
* there. If not, move to the first element of the list.
*/
- int i, listc, elemLen, length = entryPtr->numChars;
+ int i, listc;
+ TkSizeT elemLen, length = entryPtr->numChars;
const char *bytes;
Tcl_Obj **listv;
Tcl_ListObjGetElements(interp, sbPtr->listObj, &listc, &listv);
for (i = 0; i < listc; i++) {
- bytes = Tcl_GetStringFromObj(listv[i], &elemLen);
+ bytes = TkGetStringFromObj(listv[i], &elemLen);
if ((length == elemLen) &&
(memcmp(bytes, entryPtr->string,
- (size_t) length) == 0)) {
+ length) == 0)) {
sbPtr->eIndex = i;
break;
}
diff --git a/generic/tkEntry.h b/generic/tkEntry.h
index 6b1bf87..c81563c 100644
--- a/generic/tkEntry.h
+++ b/generic/tkEntry.h
@@ -129,6 +129,19 @@ typedef struct {
* only used by the Entry widget. */
/*
+ * Fields used in displaying help text if entry value is empty
+ */
+
+ Tk_TextLayout placeholderLayout;/* Cached placeholder text layout information. */
+ char *placeholderString; /* String value of placeholder. */
+ int placeholderChars; /* Number of chars in placeholder. */
+ XColor *placeholderColorPtr;/* Color value of placeholder foreground. */
+ GC placeholderGC; /* For drawing placeholder text. */
+ int placeholderX; /* Origin for layout. */
+ int placeholderLeftIndex; /* Character index of left-most character
+ * visible in window. */
+
+ /*
* Fields whose values are derived from the current values of the
* configuration settings above.
*/
diff --git a/generic/tkError.c b/generic/tkError.c
index 277d7f0..5aa6d88 100644
--- a/generic/tkError.c
+++ b/generic/tkError.c
@@ -164,11 +164,10 @@ Tk_DeleteErrorHandler(
* there are many handlers that stay around forever).
*/
- dispPtr->deleteCount += 1;
- if (dispPtr->deleteCount >= 10) {
+ if (dispPtr->deleteCount++ >= 9) {
TkErrorHandler *prevPtr;
TkErrorHandler *nextPtr;
- int lastSerial = LastKnownRequestProcessed(dispPtr->display);
+ unsigned long lastSerial = LastKnownRequestProcessed(dispPtr->display);
/*
* Last chance to catch errors for this handler: if no event/error
@@ -176,7 +175,7 @@ Tk_DeleteErrorHandler(
* we need a round trip with the X server now.
*/
- if (errorPtr->lastRequest > (unsigned long) lastSerial) {
+ if (errorPtr->lastRequest > lastSerial) {
XSync(dispPtr->display, False);
}
dispPtr->deleteCount = 0;
@@ -184,7 +183,7 @@ Tk_DeleteErrorHandler(
for (prevPtr = NULL; errorPtr != NULL; errorPtr = nextPtr) {
nextPtr = errorPtr->nextPtr;
if ((errorPtr->lastRequest != (unsigned long) -1)
- && (errorPtr->lastRequest <= (unsigned long) lastSerial)) {
+ && (errorPtr->lastRequest <= lastSerial)) {
if (prevPtr == NULL) {
dispPtr->errorPtr = nextPtr;
} else {
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 32b3ee1..ef6393a 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -208,9 +208,7 @@ static int RefreshKeyboardMappingIfNeeded(XEvent *eventPtr);
static int TkXErrorHandler(ClientData clientData,
XErrorEvent *errEventPtr);
static int WindowEventProc(Tcl_Event *evPtr, int flags);
-#ifdef TK_USE_INPUT_METHODS
static void CreateXIC(TkWindow *winPtr);
-#endif /* TK_USE_INPUT_METHODS */
/*
*----------------------------------------------------------------------
@@ -318,7 +316,6 @@ InvokeMouseHandlers(
*----------------------------------------------------------------------
*/
-#ifdef TK_USE_INPUT_METHODS
static void
CreateXIC(
TkWindow *winPtr)
@@ -365,7 +362,6 @@ CreateXIC(
XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask);
}
}
-#endif
/*
*----------------------------------------------------------------------
@@ -536,14 +532,15 @@ RefreshKeyboardMappingIfNeeded(
*/
static const unsigned long buttonMasks[] = {
- 0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask
+ 0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask,
+ Button6Mask, Button7Mask, Button8Mask, Button9Mask
};
unsigned long
TkGetButtonMask(
unsigned int button)
{
- return (button > Button5) ? 0 : buttonMasks[button];
+ return (button > Button9) ? 0 : buttonMasks[button];
}
/*
@@ -1145,14 +1142,6 @@ Tk_HandleEvent(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
-#if !defined(MAC_OSX_TK) && !defined(_WIN32)
- if (((eventPtr->type == ButtonPress) || (eventPtr->type == ButtonRelease))
- && ((eventPtr->xbutton.button - 6) < 2)) {
- eventPtr->xbutton.button -= 2;
- eventPtr->xbutton.state ^= ShiftMask;
- }
-#endif
-
/*
* If the generic handler processed this event we are done and can return.
*/
@@ -1219,7 +1208,6 @@ Tk_HandleEvent(
* ever active for X11.
*/
-#ifdef TK_USE_INPUT_METHODS
/*
* If the XIC has been invalidated, it must be recreated.
*/
@@ -1241,7 +1229,6 @@ Tk_HandleEvent(
XSetICFocus(winPtr->inputContext);
}
}
-#endif /*TK_USE_INPUT_METHODS*/
/*
* For events where it hasn't already been done, update the current time
diff --git a/generic/tkFileFilter.c b/generic/tkFileFilter.c
index 8588d70..561676b 100644
--- a/generic/tkFileFilter.c
+++ b/generic/tkFileFilter.c
@@ -262,8 +262,8 @@ AddClause(
*/
for (i=0; i<ostypeCount; i++) {
- int len;
- const char *strType = Tcl_GetStringFromObj(ostypeList[i], &len);
+ TkSizeT len;
+ const char *strType = TkGetStringFromObj(ostypeList[i], &len);
/*
* If len is < 4, it is definitely an error. If equal or longer,
@@ -322,8 +322,8 @@ AddClause(
if (globCount > 0 && globList != NULL) {
for (i=0; i<globCount; i++) {
GlobPattern *globPtr = ckalloc(sizeof(GlobPattern));
- int len;
- const char *str = Tcl_GetStringFromObj(globList[i], &len);
+ TkSizeT len;
+ const char *str = TkGetStringFromObj(globList[i], &len);
len = (len + 1) * sizeof(char);
if (str[0] && str[0] != '*') {
@@ -375,9 +375,9 @@ AddClause(
}
for (i=0; i<ostypeCount; i++) {
Tcl_DString osTypeDS;
- int len;
+ TkSizeT len;
MacFileType *mfPtr = ckalloc(sizeof(MacFileType));
- const char *strType = Tcl_GetStringFromObj(ostypeList[i], &len);
+ const char *strType = TkGetStringFromObj(ostypeList[i], &len);
char *string;
/*
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 5d75b13..44e2aad 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -43,7 +43,7 @@ typedef struct TkFontInfo {
*/
typedef struct NamedFont {
- int refCount; /* Number of users of named font. */
+ size_t refCount; /* Number of users of named font. */
int deletePending; /* Non-zero if font should be deleted when
* last reference goes away. */
TkFontAttributes fa; /* Desired attributes for named font. */
@@ -353,7 +353,7 @@ const Tcl_ObjType tkFontObjType = {
FreeFontObjProc, /* freeIntRepProc */
DupFontObjProc, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetFontFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -565,9 +565,9 @@ Tk_FontObjCmd(
if (charPtr != NULL) {
const char *string = Tcl_GetString(charPtr);
- int len = TkUtfToUniChar(string, &uniChar);
+ size_t len = TkUtfToUniChar(string, &uniChar);
- if (len != charPtr->length) {
+ if (len != (size_t)charPtr->length) {
resultPtr = Tcl_NewStringObj(
"expected a single character but got \"", -1);
Tcl_AppendLimitedToObj(resultPtr, string,
@@ -714,7 +714,8 @@ Tk_FontObjCmd(
case FONT_MEASURE: {
const char *string;
Tk_Font tkfont;
- int length = 0, skip = 0;
+ TkSizeT length = 0;
+ int skip = 0;
if (objc > 4) {
skip = TkGetDisplayOf(interp, objc - 3, objv + 3, &tkwin);
@@ -731,8 +732,8 @@ Tk_FontObjCmd(
if (tkfont == NULL) {
return TCL_ERROR;
}
- string = Tcl_GetStringFromObj(objv[3 + skip], &length);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ string = TkGetStringFromObj(objv[3 + skip], &length);
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
Tk_TextWidth(tkfont, string, length)));
Tk_FreeFont(tkfont);
break;
@@ -779,7 +780,7 @@ Tk_FontObjCmd(
case 2: i = fmPtr->ascent + fmPtr->descent; break;
case 3: i = fmPtr->fixed; break;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(i));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(i));
}
Tk_FreeFont(tkfont);
break;
@@ -1436,8 +1437,7 @@ Tk_FreeFont(
if (fontPtr == NULL) {
return;
}
- fontPtr->resourceRefCount--;
- if (fontPtr->resourceRefCount > 0) {
+ if (fontPtr->resourceRefCount-- > 1) {
return;
}
if (fontPtr->namedHashPtr != NULL) {
@@ -1447,8 +1447,7 @@ Tk_FreeFont(
*/
nfPtr = Tcl_GetHashValue(fontPtr->namedHashPtr);
- nfPtr->refCount--;
- if ((nfPtr->refCount == 0) && nfPtr->deletePending) {
+ if ((nfPtr->refCount-- <= 1) && nfPtr->deletePending) {
Tcl_DeleteHashEntry(fontPtr->namedHashPtr);
ckfree(nfPtr);
}
@@ -1535,8 +1534,7 @@ FreeFontObj(
TkFont *fontPtr = objPtr->internalRep.twoPtrValue.ptr1;
if (fontPtr != NULL) {
- fontPtr->objRefCount--;
- if ((fontPtr->resourceRefCount == 0) && (fontPtr->objRefCount == 0)) {
+ if ((fontPtr->objRefCount-- <= 1) && (fontPtr->resourceRefCount == 0)) {
ckfree(fontPtr);
}
objPtr->internalRep.twoPtrValue.ptr1 = NULL;
@@ -1728,15 +1726,11 @@ Tk_PostscriptFontName(
upper = 1;
}
src += TkUtfToUniChar(src, &ch);
- if (ch <= 0xffff) {
- if (upper) {
- ch = Tcl_UniCharToUpper(ch);
- upper = 0;
- } else {
- ch = Tcl_UniCharToLower(ch);
- }
- } else {
+ if (upper) {
+ ch = Tcl_UniCharToUpper(ch);
upper = 0;
+ } else {
+ ch = Tcl_UniCharToLower(ch);
}
dest += TkUniCharToUtf(ch, dest);
}
@@ -3263,7 +3257,8 @@ Tk_TextLayoutToPostscript(
LayoutChunk *chunkPtr = layoutPtr->chunks;
int baseline = chunkPtr->y;
Tcl_Obj *psObj = Tcl_NewObj();
- int i, j, len;
+ int i, j;
+ TkSizeT len;
const char *p, *glyphname;
char uindex[5], c, *ps;
int ch;
@@ -3321,7 +3316,7 @@ Tk_TextLayoutToPostscript(
sprintf(uindex, "%04X", ch); /* endianness? */
glyphname = Tcl_GetVar2(interp, "::tk::psglyphs", uindex, 0);
if (glyphname) {
- ps = Tcl_GetStringFromObj(psObj, &len);
+ ps = TkGetStringFromObj(psObj, &len);
if (ps[len-1] == '(') {
/*
* In-place edit. Ewww!
@@ -3512,9 +3507,9 @@ GetAttributeInfoObj(
case FONT_SIZE:
if (faPtr->size >= 0.0) {
- valuePtr = Tcl_NewIntObj((int)(faPtr->size + 0.5));
+ valuePtr = Tcl_NewWideIntObj((Tcl_WideInt)(faPtr->size + 0.5));
} else {
- valuePtr = Tcl_NewIntObj(-(int)(-faPtr->size + 0.5));
+ valuePtr = Tcl_NewWideIntObj(-(Tcl_WideInt)(-faPtr->size + 0.5));
}
break;
@@ -4222,9 +4217,9 @@ TkDebugFont(
for ( ; (fontPtr != NULL); fontPtr = fontPtr->nextPtr) {
objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(fontPtr->resourceRefCount));
+ Tcl_NewWideIntObj(fontPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(fontPtr->objRefCount));
+ Tcl_NewWideIntObj(fontPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
@@ -4268,7 +4263,7 @@ TkFontGetFirstTextLayout(
}
chunkPtr = layoutPtr->chunks;
numBytesInChunk = chunkPtr->numBytes;
- strncpy(dst, chunkPtr->start, (size_t) numBytesInChunk);
+ strncpy(dst, chunkPtr->start, numBytesInChunk);
*font = layoutPtr->tkfont;
return numBytesInChunk;
}
diff --git a/generic/tkFont.h b/generic/tkFont.h
index de479bf..50f79d2 100644
--- a/generic/tkFont.h
+++ b/generic/tkFont.h
@@ -85,7 +85,7 @@ typedef struct TkFont {
* Fields used and maintained exclusively by generic code.
*/
- int resourceRefCount; /* Number of active uses of this font (each
+ TkSizeT resourceRefCount; /* Number of active uses of this font (each
* active use corresponds to a call to
* Tk_AllocFontFromTable or Tk_GetFont). If
* this count is 0, then this TkFont structure
@@ -95,7 +95,7 @@ typedef struct TkFont {
* The structure is freed when
* resourceRefCount and objRefCount are both
* 0. */
- int objRefCount; /* The number of Tcl objects that reference
+ TkSizeT objRefCount; /* The number of Tcl objects that reference
* this structure. */
Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure,
* used when deleting it. */
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index ce7dc8c..746f3eb 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -12,8 +12,8 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
+#include "default.h"
/*
* The following enum is used to define the type of the frame.
@@ -94,6 +94,16 @@ typedef struct {
* pixels of extra space to leave above and
* below child area. */
int padY; /* Integer value corresponding to padYPtr. */
+ Tcl_Obj *bgimgPtr; /* Value of -backgroundimage option: specifies
+ * image to display on window's background, or
+ * NULL if none. */
+ Tk_Image bgimg; /* Derived from bgimgPtr by calling
+ * Tk_GetImage, or NULL if bgimgPtr is
+ * NULL. */
+ int tile; /* Whether to tile the bgimg. */
+#ifndef TK_NO_DOUBLE_BUFFERING
+ GC copyGC; /* GC for copying when double-buffering. */
+#endif /* TK_NO_DOUBLE_BUFFERING */
} Frame;
/*
@@ -174,80 +184,94 @@ static const char *const labelAnchorStrings[] = {
static const Tk_OptionSpec commonOptSpec[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_FRAME_BG_COLOR, -1, Tk_Offset(Frame, border),
+ DEF_FRAME_BG_COLOR, -1, offsetof(Frame, border),
TK_OPTION_NULL_OK, DEF_FRAME_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_STRING, "-colormap", "colormap", "Colormap",
- DEF_FRAME_COLORMAP, -1, Tk_Offset(Frame, colormapName),
+ DEF_FRAME_COLORMAP, -1, offsetof(Frame, colormapName),
TK_OPTION_NULL_OK, 0, 0},
/*
* Having -container is useless in a labelframe since a container has
* no border. It should be deprecated.
*/
{TK_OPTION_BOOLEAN, "-container", "container", "Container",
- DEF_FRAME_CONTAINER, -1, Tk_Offset(Frame, isContainer), 0, 0, 0},
+ DEF_FRAME_CONTAINER, -1, offsetof(Frame, isContainer), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_FRAME_CURSOR, -1, Tk_Offset(Frame, cursor),
+ DEF_FRAME_CURSOR, -1, offsetof(Frame, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_FRAME_HEIGHT, -1, Tk_Offset(Frame, height), 0, 0, 0},
+ DEF_FRAME_HEIGHT, -1, offsetof(Frame, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, -1,
- Tk_Offset(Frame, highlightBgColorPtr), 0, 0, 0},
+ offsetof(Frame, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_FRAME_HIGHLIGHT, -1, Tk_Offset(Frame, highlightColorPtr),
+ DEF_FRAME_HIGHLIGHT, -1, offsetof(Frame, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(Frame, highlightWidth), 0, 0, 0},
+ offsetof(Frame, highlightWidth), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_FRAME_PADX, Tk_Offset(Frame, padXPtr),
- Tk_Offset(Frame, padX), 0, 0, 0},
+ DEF_FRAME_PADX, offsetof(Frame, padXPtr),
+ offsetof(Frame, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_FRAME_PADY, Tk_Offset(Frame, padYPtr),
- Tk_Offset(Frame, padY), 0, 0, 0},
+ DEF_FRAME_PADY, offsetof(Frame, padYPtr),
+ offsetof(Frame, padY), 0, 0, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_FRAME_TAKE_FOCUS, -1, Tk_Offset(Frame, takeFocus),
+ DEF_FRAME_TAKE_FOCUS, -1, offsetof(Frame, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-visual", "visual", "Visual",
- DEF_FRAME_VISUAL, -1, Tk_Offset(Frame, visualName),
+ DEF_FRAME_VISUAL, -1, offsetof(Frame, visualName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_FRAME_WIDTH, -1, Tk_Offset(Frame, width), 0, 0, 0},
+ DEF_FRAME_WIDTH, -1, offsetof(Frame, width), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static const Tk_OptionSpec frameOptSpec[] = {
+ {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage",
+ DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1,
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
+ {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL,
+ NULL, 0, -1, 0, "-backgroundimage", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_FRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth), 0, 0, 0},
+ DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_FRAME_CLASS, -1, Tk_Offset(Frame, className), 0, 0, 0},
+ DEF_FRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_FRAME_RELIEF, -1, Tk_Offset(Frame, relief), 0, 0, 0},
+ DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
+ {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile",
+ DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
};
static const Tk_OptionSpec toplevelOptSpec[] = {
+ {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage",
+ DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1,
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
+ {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL,
+ NULL, 0, -1, 0, "-backgroundimage", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_FRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth), 0, 0, 0},
+ DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_TOPLEVEL_CLASS, -1, Tk_Offset(Frame, className), 0, 0, 0},
+ DEF_TOPLEVEL_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- DEF_TOPLEVEL_MENU, -1, Tk_Offset(Frame, menuName),
+ DEF_TOPLEVEL_MENU, -1, offsetof(Frame, menuName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_FRAME_RELIEF, -1, Tk_Offset(Frame, relief), 0, 0, 0},
+ DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
{TK_OPTION_STRING, "-screen", "screen", "Screen",
- DEF_TOPLEVEL_SCREEN, -1, Tk_Offset(Frame, screenName),
+ DEF_TOPLEVEL_SCREEN, -1, offsetof(Frame, screenName),
TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile",
+ DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0},
{TK_OPTION_STRING, "-use", "use", "Use",
- DEF_TOPLEVEL_USE, -1, Tk_Offset(Frame, useThis),
+ DEF_TOPLEVEL_USE, -1, offsetof(Frame, useThis),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
@@ -257,25 +281,25 @@ static const Tk_OptionSpec labelframeOptSpec[] = {
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_LABELFRAME_BORDER_WIDTH, -1, Tk_Offset(Frame, borderWidth),
+ DEF_LABELFRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth),
0, 0, 0},
{TK_OPTION_STRING, "-class", "class", "Class",
- DEF_LABELFRAME_CLASS, -1, Tk_Offset(Frame, className), 0, 0, 0},
+ DEF_LABELFRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_LABELFRAME_FONT, -1, Tk_Offset(Labelframe, tkfont), 0, 0, 0},
+ DEF_LABELFRAME_FONT, -1, offsetof(Labelframe, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_LABELFRAME_FG, -1, Tk_Offset(Labelframe, textColorPtr), 0, 0, 0},
+ DEF_LABELFRAME_FG, -1, offsetof(Labelframe, textColorPtr), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-labelanchor", "labelAnchor", "LabelAnchor",
- DEF_LABELFRAME_LABELANCHOR, -1, Tk_Offset(Labelframe, labelAnchor),
+ DEF_LABELFRAME_LABELANCHOR, -1, offsetof(Labelframe, labelAnchor),
0, labelAnchorStrings, 0},
{TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget",
- NULL, -1, Tk_Offset(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LABELFRAME_RELIEF, -1, Tk_Offset(Frame, relief), 0, 0, 0},
+ DEF_LABELFRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_LABELFRAME_TEXT, Tk_Offset(Labelframe, textPtr), -1,
+ DEF_LABELFRAME_TEXT, offsetof(Labelframe, textPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, 0, 0, commonOptSpec, 0}
@@ -311,6 +335,12 @@ static int CreateFrame(ClientData clientData, Tcl_Interp *interp,
static void DestroyFrame(void *memPtr);
static void DestroyFramePartly(Frame *framePtr);
static void DisplayFrame(ClientData clientData);
+static void DrawFrameBackground(Tk_Window tkwin, Pixmap pixmap,
+ int highlightWidth, int borderWidth,
+ Tk_Image bgimg, int bgtile);
+static void FrameBgImageProc(ClientData clientData,
+ int x, int y, int width, int height,
+ int imgWidth, int imgHeight);
static void FrameCmdDeletedProc(ClientData clientData);
static void FrameEventProc(ClientData clientData,
XEvent *eventPtr);
@@ -488,7 +518,8 @@ CreateFrame(
Tk_Window newWin;
const char *className, *screenName, *visualName, *colormapName;
const char *arg, *useOption;
- int i, length, depth;
+ int i, depth;
+ TkSizeT length;
unsigned int mask;
Colormap colormap;
Visual *visual;
@@ -515,24 +546,24 @@ CreateFrame(
className = colormapName = screenName = visualName = useOption = NULL;
colormap = None;
for (i = 2; i < objc; i += 2) {
- arg = Tcl_GetStringFromObj(objv[i], &length);
+ arg = TkGetStringFromObj(objv[i], &length);
if (length < 2) {
continue;
}
if ((arg[1] == 'c') && (length >= 3)
- && (strncmp(arg, "-class", (unsigned) length) == 0)) {
+ && (strncmp(arg, "-class", length) == 0)) {
className = Tcl_GetString(objv[i+1]);
} else if ((arg[1] == 'c') && (length >= 3)
- && (strncmp(arg, "-colormap", (unsigned) length) == 0)) {
+ && (strncmp(arg, "-colormap", length) == 0)) {
colormapName = Tcl_GetString(objv[i+1]);
} else if ((arg[1] == 's') && (type == TYPE_TOPLEVEL)
- && (strncmp(arg, "-screen", (unsigned) length) == 0)) {
+ && (strncmp(arg, "-screen", length) == 0)) {
screenName = Tcl_GetString(objv[i+1]);
} else if ((arg[1] == 'u') && (type == TYPE_TOPLEVEL)
- && (strncmp(arg, "-use", (unsigned) length) == 0)) {
+ && (strncmp(arg, "-use", length) == 0)) {
useOption = Tcl_GetString(objv[i+1]);
} else if ((arg[1] == 'v')
- && (strncmp(arg, "-visual", (unsigned) length) == 0)) {
+ && (strncmp(arg, "-visual", length) == 0)) {
visualName = Tcl_GetString(objv[i+1]);
}
}
@@ -682,7 +713,7 @@ CreateFrame(
mask |= ActivateMask;
}
Tk_CreateEventHandler(newWin, mask, FrameEventProc, framePtr);
- if ((Tk_InitOptions(interp, (char *) framePtr, optionTable, newWin)
+ if ((Tk_InitOptions(interp, framePtr, optionTable, newWin)
!= TCL_OK) ||
(ConfigureFrame(interp, framePtr, objc-2, objv+2) != TCL_OK)) {
goto error;
@@ -743,7 +774,8 @@ FrameWidgetObjCmd(
};
register Frame *framePtr = clientData;
int result = TCL_OK, index;
- int c, i, length;
+ int c, i;
+ TkSizeT length;
Tcl_Obj *objPtr;
if (objc < 2) {
@@ -762,7 +794,7 @@ FrameWidgetObjCmd(
result = TCL_ERROR;
goto done;
}
- objPtr = Tk_GetOptionValue(interp, (char *) framePtr,
+ objPtr = Tk_GetOptionValue(interp, framePtr,
framePtr->optionTable, objv[2], framePtr->tkwin);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -772,7 +804,7 @@ FrameWidgetObjCmd(
break;
case FRAME_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) framePtr,
+ objPtr = Tk_GetOptionInfo(interp, framePtr,
framePtr->optionTable, (objc == 3) ? objv[2] : NULL,
framePtr->tkwin);
if (objPtr == NULL) {
@@ -787,24 +819,24 @@ FrameWidgetObjCmd(
*/
for (i = 2; i < objc; i++) {
- const char *arg = Tcl_GetStringFromObj(objv[i], &length);
+ const char *arg = TkGetStringFromObj(objv[i], &length);
if (length < 2) {
continue;
}
c = arg[1];
if (((c == 'c') && (length >= 2)
- && (strncmp(arg, "-class", (unsigned)length) == 0))
+ && (strncmp(arg, "-class", length) == 0))
|| ((c == 'c') && (length >= 3)
- && (strncmp(arg, "-colormap", (unsigned)length) == 0))
+ && (strncmp(arg, "-colormap", length) == 0))
|| ((c == 'c') && (length >= 3)
- && (strncmp(arg, "-container", (unsigned)length) == 0))
+ && (strncmp(arg, "-container", length) == 0))
|| ((c == 's') && (framePtr->type == TYPE_TOPLEVEL)
- && (strncmp(arg, "-screen", (unsigned)length) == 0))
+ && (strncmp(arg, "-screen", length) == 0))
|| ((c == 'u') && (framePtr->type == TYPE_TOPLEVEL)
- && (strncmp(arg, "-use", (unsigned)length) == 0))
+ && (strncmp(arg, "-use", length) == 0))
|| ((c == 'v')
- && (strncmp(arg, "-visual", (unsigned)length) == 0))) {
+ && (strncmp(arg, "-visual", length) == 0))) {
#ifdef SUPPORT_CONFIG_EMBEDDED
if (c == 'u') {
@@ -868,9 +900,17 @@ DestroyFrame(
Tk_FreeGC(framePtr->display, labelframePtr->textGC);
}
}
+#ifndef TK_NO_DOUBLE_BUFFERING
+ if (framePtr->copyGC != NULL) {
+ Tk_FreeGC(framePtr->display, framePtr->copyGC);
+ }
+#endif /* TK_NO_DOUBLE_BUFFERING */
if (framePtr->colormap != None) {
Tk_FreeColormap(framePtr->display, framePtr->colormap);
}
+ if (framePtr->bgimg) {
+ Tk_FreeImage(framePtr->bgimg);
+ }
ckfree(framePtr);
}
@@ -945,6 +985,7 @@ ConfigureFrame(
char *oldMenuName;
Tk_Window oldWindow = NULL;
Labelframe *labelframePtr = (Labelframe *) framePtr;
+ Tk_Image image = NULL;
/*
* Need the old menubar name for the menu code to delete it.
@@ -960,7 +1001,7 @@ ConfigureFrame(
if (framePtr->type == TYPE_LABELFRAME) {
oldWindow = labelframePtr->labelWin;
}
- if (Tk_SetOptions(interp, (char *) framePtr,
+ if (Tk_SetOptions(interp, framePtr,
framePtr->optionTable, objc, objv,
framePtr->tkwin, &savedOptions, NULL) != TCL_OK) {
if (oldMenuName != NULL) {
@@ -968,6 +1009,20 @@ ConfigureFrame(
}
return TCL_ERROR;
}
+
+ if (framePtr->bgimgPtr) {
+ image = Tk_GetImage(interp, framePtr->tkwin,
+ Tcl_GetString(framePtr->bgimgPtr), FrameBgImageProc, framePtr);
+ if (image == NULL) {
+ Tk_RestoreSavedOptions(&savedOptions);
+ return TCL_ERROR;
+ }
+ }
+ if (framePtr->bgimg) {
+ Tk_FreeImage(framePtr->bgimg);
+ }
+ framePtr->bgimg = image;
+
Tk_FreeSavedOptions(&savedOptions);
/*
@@ -1109,6 +1164,15 @@ FrameWorldChanged(
anyWindowLabel = (framePtr->type == TYPE_LABELFRAME) &&
(labelframePtr->labelWin != NULL);
+#ifndef TK_NO_DOUBLE_BUFFERING
+ gcValues.graphics_exposures = False;
+ gc = Tk_GetGC(tkwin, GCGraphicsExposures, &gcValues);
+ if (framePtr->copyGC != NULL) {
+ Tk_FreeGC(framePtr->display, framePtr->copyGC);
+ }
+ framePtr->copyGC = gc;
+#endif /* TK_NO_DOUBLE_BUFFERING */
+
if (framePtr->type == TYPE_LABELFRAME) {
/*
* The textGC is needed even in the labelWin case, so it's always
@@ -1453,6 +1517,20 @@ DisplayFrame(
return;
}
+#ifndef TK_NO_DOUBLE_BUFFERING
+ /*
+ * In order to avoid screen flashes, this function redraws the frame into
+ * off-screen memory, then copies it back on-screen in a single operation.
+ * This means there's no point in time where the on-screen image has been
+ * cleared.
+ */
+
+ pixmap = Tk_GetPixmap(framePtr->display, Tk_WindowId(tkwin),
+ Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
+#else
+ pixmap = Tk_WindowId(tkwin);
+#endif /* TK_NO_DOUBLE_BUFFERING */
+
if (framePtr->type != TYPE_LABELFRAME) {
/*
* Pass to platform specific draw function. In general, it just draws
@@ -1460,8 +1538,12 @@ DisplayFrame(
*/
noLabel:
- TkpDrawFrame(tkwin, framePtr->border, hlWidth,
+ TkpDrawFrameEx(tkwin, pixmap, framePtr->border, hlWidth,
framePtr->borderWidth, framePtr->relief);
+ if (framePtr->bgimg) {
+ DrawFrameBackground(tkwin, pixmap, hlWidth, framePtr->borderWidth,
+ framePtr->bgimg, framePtr->tile);
+ }
} else {
Labelframe *labelframePtr = (Labelframe *) framePtr;
@@ -1470,20 +1552,6 @@ DisplayFrame(
goto noLabel;
}
-#ifndef TK_NO_DOUBLE_BUFFERING
- /*
- * In order to avoid screen flashes, this function redraws the frame
- * into off-screen memory, then copies it back on-screen in a single
- * operation. This means there's no point in time where the on-screen
- * image has been cleared.
- */
-
- pixmap = Tk_GetPixmap(framePtr->display, Tk_WindowId(tkwin),
- Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
-#else
- pixmap = Tk_WindowId(tkwin);
-#endif /* TK_NO_DOUBLE_BUFFERING */
-
/*
* Clear the pixmap.
*/
@@ -1595,22 +1663,54 @@ DisplayFrame(
labelframePtr->labelBox.height);
}
}
+ }
#ifndef TK_NO_DOUBLE_BUFFERING
- /*
- * Everything's been redisplayed; now copy the pixmap onto the screen
- * and free up the pixmap.
- */
+ /*
+ * Everything's been redisplayed; now copy the pixmap onto the screen and
+ * free up the pixmap.
+ */
- XCopyArea(framePtr->display, pixmap, Tk_WindowId(tkwin),
- labelframePtr->textGC, hlWidth, hlWidth,
- (unsigned) (Tk_Width(tkwin) - 2 * hlWidth),
- (unsigned) (Tk_Height(tkwin) - 2 * hlWidth),
- hlWidth, hlWidth);
- Tk_FreePixmap(framePtr->display, pixmap);
+ XCopyArea(framePtr->display, pixmap, Tk_WindowId(tkwin),
+ framePtr->copyGC, hlWidth, hlWidth,
+ (unsigned) (Tk_Width(tkwin) - 2 * hlWidth),
+ (unsigned) (Tk_Height(tkwin) - 2 * hlWidth),
+ hlWidth, hlWidth);
+ Tk_FreePixmap(framePtr->display, pixmap);
#endif /* TK_NO_DOUBLE_BUFFERING */
- }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpDrawFrame --
+ *
+ * This procedure draws the rectangular frame area.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Draws inside the tkwin area.
+ *
+ *----------------------------------------------------------------------
+ */
+void
+TkpDrawFrame(
+ Tk_Window tkwin,
+ Tk_3DBorder border,
+ int highlightWidth,
+ int borderWidth,
+ int relief)
+{
+ /*
+ * Legacy shim to allow for external callers. Internal ones use
+ * non-exposed TkpDrawFrameEx directly so they can use double-buffering.
+ */
+
+ TkpDrawFrameEx(tkwin, Tk_WindowId(tkwin), border,
+ highlightWidth, borderWidth, relief);
}
/*
@@ -2030,6 +2130,128 @@ TkToplevelWindowForCommand(
}
/*
+ *----------------------------------------------------------------------
+ *
+ * FrameBgImageProc --
+ *
+ * This function is invoked by the image code whenever the manager for an
+ * image does something that affects the size or contents of an image
+ * displayed on a frame's background.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Arranges for the button to get redisplayed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FrameBgImageProc(
+ ClientData clientData, /* Pointer to widget record. */
+ int x, int y, /* Upper left pixel (within image) that must
+ * be redisplayed. */
+ int width, int height, /* Dimensions of area to redisplay (might be
+ * <= 0). */
+ int imgWidth, int imgHeight)/* New dimensions of image. */
+{
+ register Frame *framePtr = clientData;
+
+ /*
+ * Changing the background image never alters the dimensions of the frame.
+ */
+
+ if (framePtr->tkwin && Tk_IsMapped(framePtr->tkwin) &&
+ !(framePtr->flags & REDRAW_PENDING)) {
+ Tcl_DoWhenIdle(DisplayFrame, framePtr);
+ framePtr->flags |= REDRAW_PENDING;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DrawFrameBackground --
+ *
+ * This function draws the background image of a rectangular frame area.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Draws inside the tkwin area.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+DrawFrameBackground(
+ Tk_Window tkwin,
+ Pixmap pixmap,
+ int highlightWidth,
+ int borderWidth,
+ Tk_Image bgimg,
+ int bgtile)
+{
+ int width, height; /* Area to paint on. */
+ int imageWidth, imageHeight; /* Dimensions of image. */
+ const int bw = highlightWidth + borderWidth;
+
+ Tk_SizeOfImage(bgimg, &imageWidth, &imageHeight);
+ width = Tk_Width(tkwin) - 2*bw;
+ height = Tk_Height(tkwin) - 2*bw;
+
+ if (bgtile) {
+ /*
+ * Draw the image tiled in the widget (inside the border).
+ */
+
+ int x, y;
+
+ for (x = bw; x - bw < width; x += imageWidth) {
+ int w = imageWidth;
+ if (x - bw + imageWidth > width) {
+ w = (width + bw) - x;
+ }
+ for (y = bw; y < height + bw; y += imageHeight) {
+ int h = imageHeight;
+ if (y - bw + imageHeight > height) {
+ h = (height + bw) - y;
+ }
+ Tk_RedrawImage(bgimg, 0, 0, w, h, pixmap, x, y);
+ }
+ }
+ } else {
+ /*
+ * Draw the image centred in the widget (inside the border).
+ */
+
+ int x, y, xOff, yOff, w, h;
+
+ if (width > imageWidth) {
+ x = 0;
+ xOff = (Tk_Width(tkwin) - imageWidth) / 2;
+ w = imageWidth;
+ } else {
+ x = (imageWidth - width) / 2;
+ xOff = bw;
+ w = width;
+ }
+ if (height > imageHeight) {
+ y = 0;
+ yOff = (Tk_Height(tkwin) - imageHeight) / 2;
+ h = imageHeight;
+ } else {
+ y = (imageHeight - height) / 2;
+ yOff = bw;
+ h = height;
+ }
+ Tk_RedrawImage(bgimg, x, y, w, h, pixmap, xOff, yOff);
+ }
+}
+
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4
diff --git a/generic/tkGC.c b/generic/tkGC.c
index c424e30..4caa046 100644
--- a/generic/tkGC.c
+++ b/generic/tkGC.c
@@ -23,7 +23,7 @@
typedef struct {
GC gc; /* Graphics context. */
Display *display; /* Display to which gc belongs. */
- int refCount; /* Number of active uses of gc. */
+ size_t refCount; /* Number of active uses of gc. */
Tcl_HashEntry *valueHashPtr;/* Entry in valueTable (needed when deleting
* this structure). */
} TkGC;
@@ -307,13 +307,12 @@ Tk_FreeGC(
return;
}
- idHashPtr = Tcl_FindHashEntry(&dispPtr->gcIdTable, (char *) gc);
+ idHashPtr = Tcl_FindHashEntry(&dispPtr->gcIdTable, gc);
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeGC received unknown gc argument");
}
gcPtr = Tcl_GetHashValue(idHashPtr);
- gcPtr->refCount--;
- if (gcPtr->refCount == 0) {
+ if (gcPtr->refCount-- <= 1) {
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(idHashPtr);
diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c
index 870c1f3..76752a3 100644
--- a/generic/tkGeometry.c
+++ b/generic/tkGeometry.c
@@ -592,7 +592,7 @@ Tk_UnmaintainGeometry(
if (!(((TkWindow *) slave)->flags & TK_ALREADY_DEAD)) {
Tk_UnmapWindow(slave);
}
- hPtr = Tcl_FindHashEntry(&dispPtr->maintainHashTable, (char *) master);
+ hPtr = Tcl_FindHashEntry(&dispPtr->maintainHashTable, master);
if (hPtr == NULL) {
return;
}
diff --git a/generic/tkGrab.c b/generic/tkGrab.c
index 2855637..6cab469 100644
--- a/generic/tkGrab.c
+++ b/generic/tkGrab.c
@@ -179,7 +179,7 @@ Tk_GrabObjCmd(
TkDisplay *dispPtr;
const char *arg;
int index;
- int len;
+ TkSizeT len;
static const char *const optionStrings[] = {
"current", "release", "set", "status", NULL
};
@@ -216,7 +216,7 @@ Tk_GrabObjCmd(
* First check for a window name or "-global" as the first argument.
*/
- arg = Tcl_GetStringFromObj(objv[1], &len);
+ arg = TkGetStringFromObj(objv[1], &len);
if (arg[0] == '.') {
/* [grab window] */
if (objc != 2) {
@@ -872,7 +872,7 @@ TkPointerEvent(
} else {
if (eventPtr->xbutton.button != AnyButton &&
((eventPtr->xbutton.state & ALL_BUTTONS)
- == (unsigned int)TkGetButtonMask(eventPtr->xbutton.button))) {
+ == TkGetButtonMask(eventPtr->xbutton.button))) {
ReleaseButtonGrab(dispPtr); /* Note 4. */
}
}
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index be15c14..62a0447 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -292,8 +292,8 @@ static void GridLostSlaveProc(ClientData clientData,
Tk_Window tkwin);
static void GridReqProc(ClientData clientData, Tk_Window tkwin);
static void InitMasterData(Gridder *masterPtr);
-static Tcl_Obj * NewPairObj(int, int);
-static Tcl_Obj * NewQuadObj(int, int, int, int);
+static Tcl_Obj * NewPairObj(Tcl_WideInt, Tcl_WideInt);
+static Tcl_Obj * NewQuadObj(Tcl_WideInt, Tcl_WideInt, Tcl_WideInt, Tcl_WideInt);
static int ResolveConstraints(Gridder *gridPtr, int rowOrColumn,
int maxOffset);
static void SetGridSize(Gridder *gridPtr);
@@ -741,13 +741,13 @@ GridInfoCommand(
Tcl_DictObjPut(NULL, infoObj, Tcl_NewStringObj("-in", -1),
TkNewWindowObj(slavePtr->masterPtr->tkwin));
Tcl_DictObjPut(NULL, infoObj, Tcl_NewStringObj("-column", -1),
- Tcl_NewIntObj(slavePtr->column));
+ Tcl_NewWideIntObj(slavePtr->column));
Tcl_DictObjPut(NULL, infoObj, Tcl_NewStringObj("-row", -1),
- Tcl_NewIntObj(slavePtr->row));
+ Tcl_NewWideIntObj(slavePtr->row));
Tcl_DictObjPut(NULL, infoObj, Tcl_NewStringObj("-columnspan", -1),
- Tcl_NewIntObj(slavePtr->numCols));
+ Tcl_NewWideIntObj(slavePtr->numCols));
Tcl_DictObjPut(NULL, infoObj, Tcl_NewStringObj("-rowspan", -1),
- Tcl_NewIntObj(slavePtr->numRows));
+ Tcl_NewWideIntObj(slavePtr->numRows));
TkAppendPadAmount(infoObj, "-ipadx", slavePtr->iPadX/2, slavePtr->iPadX);
TkAppendPadAmount(infoObj, "-ipady", slavePtr->iPadY/2, slavePtr->iPadY);
TkAppendPadAmount(infoObj, "-padx", slavePtr->padLeft, slavePtr->padX);
@@ -1055,17 +1055,17 @@ GridRowColumnConfigureCommand(
Tcl_ListObjAppendElement(interp, res,
Tcl_NewStringObj("-minsize", -1));
- Tcl_ListObjAppendElement(interp, res, Tcl_NewIntObj(minsize));
+ Tcl_ListObjAppendElement(interp, res, Tcl_NewWideIntObj(minsize));
Tcl_ListObjAppendElement(interp, res,
Tcl_NewStringObj("-pad", -1));
- Tcl_ListObjAppendElement(interp, res, Tcl_NewIntObj(pad));
+ Tcl_ListObjAppendElement(interp, res, Tcl_NewWideIntObj(pad));
Tcl_ListObjAppendElement(interp, res,
Tcl_NewStringObj("-uniform", -1));
Tcl_ListObjAppendElement(interp, res,
Tcl_NewStringObj(uniform == NULL ? "" : uniform, -1));
Tcl_ListObjAppendElement(interp, res,
Tcl_NewStringObj("-weight", -1));
- Tcl_ListObjAppendElement(interp, res, Tcl_NewIntObj(weight));
+ Tcl_ListObjAppendElement(interp, res, Tcl_NewWideIntObj(weight));
Tcl_SetObjResult(interp, res);
Tcl_DecrRefCount(listCopy);
return TCL_OK;
@@ -1082,10 +1082,10 @@ GridRowColumnConfigureCommand(
return TCL_ERROR;
}
if (index == ROWCOL_MINSIZE) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
(ok == TCL_OK) ? slotPtr[slot].minSize : 0));
} else if (index == ROWCOL_WEIGHT) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
(ok == TCL_OK) ? slotPtr[slot].weight : 0));
} else if (index == ROWCOL_UNIFORM) {
Tk_Uid value = (ok == TCL_OK) ? slotPtr[slot].uniform : "";
@@ -1093,7 +1093,7 @@ GridRowColumnConfigureCommand(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
(value == NULL) ? "" : value, -1));
} else if (index == ROWCOL_PAD) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
(ok == TCL_OK) ? slotPtr[slot].pad : 0));
}
Tcl_DecrRefCount(listCopy);
@@ -1732,10 +1732,9 @@ ArrangeGrid(
masterPtr->flags &= ~REQUESTED_RELAYOUT;
/*
- * If the master has no slaves anymore, then don't do anything at all:
- * just leave the master's size as-is. Otherwise there is no way to
- * "relinquish" control over the master so another geometry manager can
- * take over.
+ * If the master has no slaves anymore, then don't change the master size.
+ * Otherwise there is no way to "relinquish" control over the master
+ * so another geometry manager can take over.
*/
if (masterPtr->slavePtr == NULL) {
@@ -2777,11 +2776,15 @@ Unlink(
/*
* If we have emptied this master from slaves it means we are no longer
* handling it and should mark it as free.
+ *
+ * Send the event "NoManagedChild" to the master to inform it about there
+ * being no managed children inside it.
*/
if ((masterPtr->slavePtr == NULL) && (masterPtr->flags & ALLOCED_MASTER)) {
TkFreeGeometryMaster(masterPtr->tkwin, "grid");
masterPtr->flags &= ~ALLOCED_MASTER;
+ TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
}
}
@@ -2882,7 +2885,7 @@ GridStructureProc(
slavePtr->nextPtr = NULL;
}
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->gridHashTable,
- (char *) gridPtr->tkwin));
+ gridPtr->tkwin));
if (gridPtr->flags & REQUESTED_RELAYOUT) {
Tcl_CancelIdleCall(ArrangeGrid, gridPtr);
}
@@ -2966,10 +2969,10 @@ ConfigureSlaves(
firstChar = 0;
for (numWindows=0, i=0; i < objc; i++) {
- int length;
+ TkSizeT length;
char prevChar = firstChar;
- string = Tcl_GetStringFromObj(objv[i], &length);
+ string = TkGetStringFromObj(objv[i], &length);
firstChar = string[0];
if (firstChar == '.') {
@@ -3516,11 +3519,15 @@ ConfigureSlaves(
/*
* If we have emptied this master from slaves it means we are no longer
* handling it and should mark it as free.
+ *
+ * Send the event "NoManagedChild" to the master to inform it about there
+ * being no managed children inside it.
*/
if (masterPtr->slavePtr == NULL && masterPtr->flags & ALLOCED_MASTER) {
TkFreeGeometryMaster(masterPtr->tkwin, "grid");
masterPtr->flags &= ~ALLOCED_MASTER;
+ TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
}
return TCL_OK;
@@ -3631,12 +3638,12 @@ StringToSticky(
static Tcl_Obj *
NewPairObj(
- int val1, int val2)
+ Tcl_WideInt val1, Tcl_WideInt val2)
{
Tcl_Obj *ary[2];
- ary[0] = Tcl_NewIntObj(val1);
- ary[1] = Tcl_NewIntObj(val2);
+ ary[0] = Tcl_NewWideIntObj(val1);
+ ary[1] = Tcl_NewWideIntObj(val2);
return Tcl_NewListObj(2, ary);
}
@@ -3658,14 +3665,14 @@ NewPairObj(
static Tcl_Obj *
NewQuadObj(
- int val1, int val2, int val3, int val4)
+ Tcl_WideInt val1, Tcl_WideInt val2, Tcl_WideInt val3, Tcl_WideInt val4)
{
Tcl_Obj *ary[4];
- ary[0] = Tcl_NewIntObj(val1);
- ary[1] = Tcl_NewIntObj(val2);
- ary[2] = Tcl_NewIntObj(val3);
- ary[3] = Tcl_NewIntObj(val4);
+ ary[0] = Tcl_NewWideIntObj(val1);
+ ary[1] = Tcl_NewWideIntObj(val2);
+ ary[2] = Tcl_NewWideIntObj(val3);
+ ary[3] = Tcl_NewWideIntObj(val4);
return Tcl_NewListObj(4, ary);
}
diff --git a/generic/tkImage.c b/generic/tkImage.c
index dc4e8e0..ca00d44 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -474,7 +474,7 @@ Tk_ImageObjCmd(
switch ((enum options) index) {
case IMAGE_HEIGHT:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(masterPtr->height));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(masterPtr->height));
break;
case IMAGE_INUSE:
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
@@ -487,7 +487,7 @@ Tk_ImageObjCmd(
}
break;
case IMAGE_WIDTH:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(masterPtr->width));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(masterPtr->width));
break;
default:
Tcl_Panic("can't happen");
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index f4ee407..f83f4cc 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -49,7 +49,7 @@ typedef struct BitmapMaster {
*/
typedef struct BitmapInstance {
- int refCount; /* Number of instances that share this data
+ size_t refCount; /* Number of instances that share this data
* structure. */
BitmapMaster *masterPtr; /* Pointer to master for image. */
Tk_Window tkwin; /* Window in which the instances will be
@@ -108,17 +108,17 @@ Tk_ImageType tkBitmapImageType = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_UID, "-background", NULL, NULL,
- "", Tk_Offset(BitmapMaster, bgUid), 0, NULL},
+ "", offsetof(BitmapMaster, bgUid), 0, NULL},
{TK_CONFIG_STRING, "-data", NULL, NULL,
- NULL, Tk_Offset(BitmapMaster, dataString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapMaster, dataString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_STRING, "-file", NULL, NULL,
- NULL, Tk_Offset(BitmapMaster, fileString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapMaster, fileString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_UID, "-foreground", NULL, NULL,
- "#000000", Tk_Offset(BitmapMaster, fgUid), 0, NULL},
+ "#000000", offsetof(BitmapMaster, fgUid), 0, NULL},
{TK_CONFIG_STRING, "-maskdata", NULL, NULL,
- NULL, Tk_Offset(BitmapMaster, maskDataString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapMaster, maskDataString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_STRING, "-maskfile", NULL, NULL,
- NULL, Tk_Offset(BitmapMaster, maskFileString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(BitmapMaster, maskFileString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -951,8 +951,7 @@ ImgBmapFree(
BitmapInstance *instancePtr = clientData;
BitmapInstance *prevPtr;
- instancePtr->refCount--;
- if (instancePtr->refCount > 0) {
+ if (instancePtr->refCount-- > 1) {
return;
}
@@ -1080,10 +1079,10 @@ GetByte(
Tcl_Channel chan) /* The channel we read from. */
{
char buffer;
- int size;
+ size_t size;
size = Tcl_Read(chan, &buffer, 1);
- if (size <= 0) {
+ if ((size + 1) < 2) {
return EOF;
} else {
return buffer;
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 76e48d4..c16ca11 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -55,7 +55,7 @@ typedef struct mFile {
unsigned char *data; /* mmencoded source string */
int c; /* bits left over from previous character */
int state; /* decoder state (0-4 or GIF_DONE) */
- int length; /* Total amount of bytes in data */
+ size_t length; /* Total amount of bytes in data */
} MFile;
/*
@@ -111,8 +111,8 @@ typedef struct {
* serializing in the GIF format.
*/
-typedef int (WriteBytesFunc) (ClientData clientData, const char *bytes,
- int byteCount);
+typedef size_t (WriteBytesFunc) (ClientData clientData, const char *bytes,
+ size_t byteCount);
/*
* The format record for the GIF file format:
@@ -187,14 +187,14 @@ static int ReadImage(GIFImageConfig *gifConfPtr,
* these are for the BASE64 image reader code only
*/
-static int Fread(GIFImageConfig *gifConfPtr, unsigned char *dst,
+static size_t Fread(GIFImageConfig *gifConfPtr, unsigned char *dst,
size_t size, size_t count, Tcl_Channel chan);
-static int Mread(unsigned char *dst, size_t size, size_t count,
+static size_t Mread(unsigned char *dst, size_t size, size_t count,
MFile *handle);
static int Mgetc(MFile *handle);
static int char64(int c);
static void mInit(unsigned char *string, MFile *handle,
- int length);
+ size_t length);
/*
* Types, defines and variables needed to write and compress a GIF.
@@ -757,10 +757,10 @@ StringMatchGIF(
Tcl_Interp *interp) /* not used */
{
unsigned char *data, header[10];
- int got, length;
+ TkSizeT got, length;
MFile handle;
- data = Tcl_GetByteArrayFromObj(dataObj, &length);
+ data = TkGetByteArrayFromObj(dataObj, &length);
/*
* Header is a minimum of 10 bytes.
@@ -826,9 +826,9 @@ StringReadGIF(
int srcX, int srcY)
{
MFile handle, *hdlPtr = &handle;
- int length;
+ TkSizeT length;
const char *xferFormat;
- unsigned char *data = Tcl_GetByteArrayFromObj(dataObj, &length);
+ unsigned char *data = TkGetByteArrayFromObj(dataObj, &length);
mInit(data, hdlPtr, length);
@@ -917,7 +917,7 @@ ReadColorMap(
unsigned char rgb[3];
for (i = 0; i < number; ++i) {
- if (Fread(gifConfPtr, rgb, sizeof(rgb), 1, chan) <= 0) {
+ if (((size_t)Fread(gifConfPtr, rgb, sizeof(rgb), 1, chan) + 1) < 2) {
return 0;
}
@@ -983,11 +983,11 @@ GetDataBlock(
{
unsigned char count;
- if (Fread(gifConfPtr, &count, 1, 1, chan) <= 0) {
+ if (((size_t)Fread(gifConfPtr, &count, 1, 1, chan) + 1) < 2) {
return -1;
}
- if ((count != 0) && (Fread(gifConfPtr, buf, count, 1, chan) <= 0)) {
+ if ((count != 0) && (((size_t)Fread(gifConfPtr, buf, count, 1, chan) + 1) < 2)) {
return -1;
}
@@ -1049,7 +1049,7 @@ ReadImage(
* Initialize the decoder
*/
- if (Fread(gifConfPtr, &initialCodeSize, 1, 1, chan) <= 0) {
+ if (((size_t)Fread(gifConfPtr, &initialCodeSize, 1, 1, chan) + 1) < 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"error reading GIF image: %s", Tcl_PosixError(interp)));
return TCL_ERROR;
@@ -1392,7 +1392,7 @@ static void
mInit(
unsigned char *string, /* string containing initial mmencoded data */
MFile *handle, /* mmdecode "file" handle */
- int length) /* Number of bytes in string */
+ size_t length) /* Number of bytes in string */
{
handle->data = string;
handle->state = 0;
@@ -1418,15 +1418,15 @@ mInit(
*----------------------------------------------------------------------
*/
-static int
+static size_t
Mread(
unsigned char *dst, /* where to put the result */
size_t chunkSize, /* size of each transfer */
size_t numChunks, /* number of chunks */
MFile *handle) /* mmdecode "file" handle */
{
- register int i, c;
- int count = chunkSize * numChunks;
+ int c;
+ size_t i, count = chunkSize * numChunks;
for (i=0; i<count && (c=Mgetc(handle)) != GIF_DONE; i++) {
*dst++ = c;
@@ -1567,7 +1567,7 @@ char64(
*----------------------------------------------------------------------
*/
-static int
+static size_t
Fread(
GIFImageConfig *gifConfPtr,
unsigned char *dst, /* where to put the result */
@@ -1581,20 +1581,20 @@ Fread(
if (gifConfPtr->fromData == INLINE_DATA_BINARY) {
MFile *handle = (MFile *) chan;
- if (handle->length <= 0 || (size_t) handle->length < hunk*count) {
- return -1;
+ if ((handle->length + 1 < 2) || (handle->length < hunk*count)) {
+ return (size_t)-1;
}
- memcpy(dst, handle->data, (size_t) (hunk * count));
+ memcpy(dst, handle->data, hunk * count);
handle->data += hunk * count;
handle->length -= hunk * count;
- return (int)(hunk * count);
+ return hunk * count;
}
/*
* Otherwise we've got a real file to read.
*/
- return Tcl_Read(chan, (char *) dst, (int) (hunk * count));
+ return Tcl_Read(chan, (char *) dst, hunk * count);
}
/*
@@ -1673,22 +1673,22 @@ StringWriteGIF(
return result;
}
-static int
+static size_t
WriteToChannel(
ClientData clientData,
const char *bytes,
- int byteCount)
+ size_t byteCount)
{
Tcl_Channel handle = clientData;
return Tcl_Write(handle, bytes, byteCount);
}
-static int
+static size_t
WriteToByteArray(
ClientData clientData,
const char *bytes,
- int byteCount)
+ size_t byteCount)
{
Tcl_Obj *objPtr = clientData;
Tcl_Obj *tmpObj = Tcl_NewByteArrayObj((unsigned char *) bytes, byteCount);
diff --git a/generic/tkImgListFormat.c b/generic/tkImgListFormat.c
new file mode 100644
index 0000000..2b23699
--- /dev/null
+++ b/generic/tkImgListFormat.c
@@ -0,0 +1,1142 @@
+/*
+ * tkImgListFormat.c --
+ *
+ * Implements the default image data format. I.e. the format used for
+ * [imageName data] and [imageName put] if no other format is specified.
+ *
+ * The default format consits of a list of scan lines (rows) with each
+ * list element being itself a list of pixels (or columns). For details,
+ * see the manpage photo.n
+ *
+ * This image format cannot read/write files, it is meant for string
+ * 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.
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * Authors:
+ * Paul Mackerras (paulus@cs.anu.edu.au),
+ * Department of Computer Science,
+ * Australian National University.
+ *
+ * Simon Bachmann (simonbachmann@bluewin.ch)
+ */
+
+
+#include "tkImgPhoto.h"
+
+/*
+ * Message to generate when an attempt to allocate memory for an image fails.
+ */
+
+#define TK_PHOTO_ALLOC_FAILURE_MESSAGE \
+ "not enough free memory for image buffer"
+
+
+/*
+ * Color name length limit: do not attempt to parse as color strings that are
+ * longer than this limit
+ */
+
+#define TK_PHOTO_MAX_COLOR_CHARS 99
+
+/*
+ * Symbols for the different formats of a color string.
+ */
+
+enum ColorFormatType {
+ COLORFORMAT_TKCOLOR,
+ COLORFORMAT_EMPTYSTRING,
+ COLORFORMAT_LIST,
+ COLORFORMAT_RGB1,
+ COLORFORMAT_RGB2,
+ COLORFORMAT_RGBA1,
+ COLORFORMAT_RGBA2
+};
+
+/*
+ * Names for the color format types above.
+ * Order must match the one in enum ColorFormatType
+ */
+
+static const char *const colorFormatNames[] = {
+ "tkcolor",
+ "emptystring",
+ "list",
+ "rgb-short",
+ "rgb",
+ "rgba-short",
+ "rgba",
+ NULL
+};
+
+/*
+ * The following data structure is used to return information from
+ * ParseFormatOptions:
+ */
+
+struct FormatOptions {
+ int options; /* Individual bits indicate which options were
+ * specified - see below. */
+ Tcl_Obj *formatName; /* Name specified without an option. */
+ enum ColorFormatType colorFormat;
+ /* The color format type given with the
+ * -colorformat option */
+};
+
+/*
+ * Bit definitions for use with ParseFormatOptions: each bit is set in the
+ * allowedOptions parameter on a call to ParseFormatOptions if that option
+ * is allowed for the current photo image subcommand. On return, the bit is
+ * set in the options field of the FormatOptions structure if that option
+ * was specified.
+ *
+ * OPT_COLORFORMAT: Set if -alpha option allowed/specified.
+ */
+
+#define OPT_COLORFORMAT 1
+
+/*
+ * List of format option names. The order here must match the order of
+ * declarations of the FMT_OPT_* constants above.
+ */
+
+static const char *const formatOptionNames[] = {
+ "-colorformat",
+ NULL
+};
+
+/*
+ * Forward declarations
+ */
+
+static int ParseFormatOptions(Tcl_Interp *interp, int allowedOptions,
+ int objc, Tcl_Obj *const objv[], int *indexPtr,
+ struct FormatOptions *optPtr);
+static Tcl_Obj *GetBadOptMsg(const char *badValue, int allowedOpts);
+static int StringMatchDef(Tcl_Obj *data, Tcl_Obj *formatString,
+ int *widthPtr, int *heightPtr, Tcl_Interp *interp);
+static int StringReadDef(Tcl_Interp *interp, Tcl_Obj *data,
+ Tcl_Obj *formatString, Tk_PhotoHandle imageHandle,
+ int destX, int destY, int width, int height,
+ int srcX, int srcY);
+static int StringWriteDef(Tcl_Interp *interp,
+ Tcl_Obj *formatString,
+ Tk_PhotoImageBlock *blockPtr);
+static int ParseColor(Tcl_Interp *interp, Tcl_Obj *specObj,
+ Display *display, Colormap colormap, unsigned char *redPtr,
+ unsigned char *greenPtr, unsigned char *bluePtr,
+ unsigned char *alphaPtr);
+static int ParseColorAsList(Tcl_Interp *interp, const char *colorString,
+ int colorStrLen, unsigned char *redPtr,
+ unsigned char *greenPtr, unsigned char *bluePtr,
+ unsigned char *alphaPtr);
+static int ParseColorAsHex(Tcl_Interp *interp, const char *colorString,
+ int colorStrLen, Display *display, Colormap colormap,
+ unsigned char *redPtr, unsigned char *greenPtr,
+ unsigned char *bluePtr, unsigned char *alphaPtr);
+static int ParseColorAsStandard(Tcl_Interp *interp,
+ const char *colorString, int colorStrLen,
+ Display *display, Colormap colormap,
+ unsigned char *redPtr, unsigned char *greenPtr,
+ unsigned char *bluePtr, unsigned char *alphaPtr);
+
+/*
+ * The format record for the default image handler
+ */
+
+Tk_PhotoImageFormat tkImgFmtDefault = {
+ "default", /* name */
+ NULL, /* fileMatchProc: format doesn't support file ops */
+ StringMatchDef, /* stringMatchProc */
+ NULL, /* fileReadProc: format doesn't support file read */
+ StringReadDef, /* stringReadProc */
+ NULL, /* fileWriteProc: format doesn't support file write */
+ StringWriteDef, /* stringWriteProc */
+ NULL /* nextPtr */
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseFormatOptions --
+ *
+ * Parse the options passed to the image format handler.
+ *
+ * Results:
+ * On success, the structure pointed to by optPtr is filled with the
+ * values passed or with the defaults and TCL_OK returned.
+ * If an error occurs, leaves an error message in interp and returns
+ * TCL_ERROR.
+ *
+ * Side effects:
+ * The value in *indexPtr is updated to the index of the fist
+ * element in argv[] that does not look like an option/value, or to
+ * argc if parsing reached the end of argv[].
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseFormatOptions(
+ Tcl_Interp *interp, /* For error messages */
+ int allowedOptions, /* Bitfield specifying which options are
+ * to be considered allowed */
+ int objc, /* Number of elements in argv[] */
+ Tcl_Obj *const objv[], /* The arguments to parse */
+ int *indexPtr, /* Index giving the first element to
+ * parse. The value is updated to the
+ * index where parsing ended */
+ struct FormatOptions *optPtr) /* Parsed option values are written to
+ * this struct */
+
+{
+ int index, optIndex, typeIndex, first;
+ const char *option;
+
+ first = 1;
+
+ /*
+ * Fill in default values
+ */
+ optPtr->options = 0;
+ optPtr->formatName = NULL;
+ optPtr->colorFormat = COLORFORMAT_RGB2;
+ for (index = *indexPtr; index < objc; *indexPtr = ++index) {
+ int optionExists;
+
+ /*
+ * The first value can be the format handler's name. It goes to
+ * optPtr->name.
+ */
+ option = Tcl_GetString(objv[index]);
+ if (option[0] != '-') {
+ if (first) {
+ optPtr->formatName = objv[index];
+ first = 0;
+ continue;
+ } else {
+ break;
+ }
+ }
+ first = 0;
+
+ /*
+ * Check if option is known and allowed
+ */
+
+ optionExists = 1;
+ if (Tcl_GetIndexFromObj(NULL, objv[index], formatOptionNames,
+ "format option", 0, &optIndex) != TCL_OK) {
+ optionExists = 0;
+ }
+ if (!optionExists || !((1 << optIndex) & allowedOptions)) {
+ Tcl_SetObjResult(interp, GetBadOptMsg(Tcl_GetString(objv[index]),
+ allowedOptions));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Option-specific checks
+ */
+
+ switch (1 << optIndex) {
+ case OPT_COLORFORMAT:
+ *indexPtr = ++index;
+ if (index >= objc) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("the \"%s\" option "
+ "requires a value", Tcl_GetString(objv[index - 1])));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "MISSING_VALUE", NULL);
+ return TCL_ERROR;
+ }
+ if (Tcl_GetIndexFromObj(NULL, objv[index], colorFormatNames, "",
+ TCL_EXACT, &typeIndex) != TCL_OK
+ || (typeIndex != COLORFORMAT_LIST
+ && typeIndex != COLORFORMAT_RGB2
+ && typeIndex != COLORFORMAT_RGBA2) ) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad color format "
+ "\"%s\": must be rgb, rgba, or list",
+ Tcl_GetString(objv[index])));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "BAD_COLOR_FORMAT", NULL);
+ return TCL_ERROR;
+ }
+ optPtr->colorFormat = typeIndex;
+ break;
+ default:
+ Tcl_Panic("ParseFormatOptions: unexpected switch fallthrough");
+ }
+
+ /*
+ * Add option to bitfield in optPtr
+ */
+ optPtr->options |= (1 << optIndex);
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetBadOptMsg --
+ *
+ * Build a Tcl_Obj containing an error message in the form "bad option
+ * "xx": must be y, or z", based on the bits set in allowedOpts.
+ *
+ * Results:
+ * A Tcl Object containig the error message.
+ *
+ * Side effects:
+ * None
+ *----------------------------------------------------------------------
+ */
+static Tcl_Obj *
+GetBadOptMsg(
+ const char *badValue, /* the erroneous option */
+ int allowedOpts) /* bitfield specifying the allowed options */
+{
+ int i, bit;
+ Tcl_Obj *resObj = Tcl_ObjPrintf("bad format option \"%s\": ", badValue);
+
+ if (allowedOpts == 0) {
+ Tcl_AppendToObj(resObj, "no options allowed", -1);
+ } else {
+ Tcl_AppendToObj(resObj, "must be ", -1);
+ bit = 1;
+ for (i = 0; formatOptionNames[i] != NULL; i++) {
+ if (allowedOpts & bit) {
+ if (allowedOpts & (bit -1)) {
+ /*
+ * not the first option
+ */
+ if (allowedOpts & ~((bit << 1) - 1)) {
+ /*
+ * not the last option
+ */
+ Tcl_AppendToObj(resObj, ", ", -1);
+ } else {
+ Tcl_AppendToObj(resObj, ", or ", -1);
+ }
+ }
+ Tcl_AppendToObj(resObj, formatOptionNames[i], -1);
+ }
+ bit <<=1;
+ }
+ }
+ return resObj;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StringMatchDef --
+ *
+ * Default string match function. Test if image data in string form
+ * appears to be in the default list-of-list-of-pixel-data format
+ * accepted by the "<img> put" command.
+ *
+ * Results:
+ * If thte data is in the default format, writes the size of the image
+ * to widthPtr and heightPtr and returns 1. Otherwise, leaves an error
+ * message in interp (if not NULL) and returns 0.
+ * Note that this function does not parse all data points. A return
+ * value of 1 does not guarantee that the data can be read without
+ * errors.
+ *
+ * Side effects:
+ * None
+ *----------------------------------------------------------------------
+ */
+static int
+StringMatchDef(
+ Tcl_Obj *data, /* The data to check */
+ Tcl_Obj *formatString, /* Value of the -format option, not used here */
+ int *widthPtr, /* Width of image is written to this location */
+ int *heightPtr, /* Height of image is written to this location */
+ Tcl_Interp *interp) /* Error messages are left in this interpreter */
+{
+ int y, rowCount, colCount, curColCount;
+ unsigned char dummy;
+ Tcl_Obj **rowListPtr, *pixelData;
+
+ /*
+ * See if data can be parsed as a list, if every element is itself a valid
+ * list and all sublists have the same length.
+ */
+
+ if (Tcl_ListObjGetElements(interp, data, &rowCount, &rowListPtr)
+ != TCL_OK) {
+ return 0;
+ }
+ if (rowCount == 0) {
+ /*
+ * empty list is valid data
+ */
+
+ *widthPtr = 0;
+ *heightPtr = 0;
+ return 1;
+ }
+ colCount = -1;
+ for (y = 0; y < rowCount; y++) {
+ if (Tcl_ListObjLength(interp, rowListPtr[y], &curColCount) != TCL_OK) {
+ return 0;
+ }
+ if (colCount < 0) {
+ colCount = curColCount;
+ } else if (curColCount != colCount) {
+ if (interp != NULL) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid row # %d: "
+ "all rows must have the same number of elements", y));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_DATA", NULL);
+ }
+ return 0;
+ }
+ }
+
+ /*
+ * Data in base64 encoding (or even binary data), might actually pass
+ * these tests. To avoid parsing it as list of lists format, check one
+ * pixel for validity.
+ */
+ if (Tcl_ListObjIndex(interp, rowListPtr[0], 0, &pixelData) != TCL_OK) {
+ return 0;
+ }
+ if (Tcl_GetCharLength(pixelData) > TK_PHOTO_MAX_COLOR_CHARS) {
+ return 0;
+ }
+ if (ParseColor(interp, pixelData, Tk_Display(Tk_MainWindow(interp)),
+ Tk_Colormap(Tk_MainWindow(interp)), &dummy, &dummy, &dummy, &dummy)
+ != TCL_OK) {
+ return 0;
+ }
+
+ /*
+ * Looks like we have valid data for this format.
+ * We do not check any pixel values - that's the job of ImgStringRead()
+ */
+
+ *widthPtr = colCount;
+ *heightPtr = rowCount;
+
+ return 1;
+
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StringReadDef --
+ *
+ * String read function for default format. (see manpage for details on
+ * the format).
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * If the data has valid format, write it to the image identified by
+ * imageHandle.
+ * If the image data cannot be parsed, an error message is left in
+ * interp.
+ *
+ *----------------------------------------------------------------------
+*/
+
+static int
+StringReadDef(
+ Tcl_Interp *interp, /* leave error messages here */
+ Tcl_Obj *data, /* the data to parse */
+ Tcl_Obj *formatString, /* value of the -format option */
+ Tk_PhotoHandle imageHandle, /* write data to this image */
+ int destX, int destY, /* start writing data at this point
+ * in destination image*/
+ int width, int height, /* dimensions of area to write to */
+ int srcX, int srcY) /* start reading source data at these
+ * coordinates */
+{
+ Tcl_Obj **rowListPtr, **colListPtr;
+ Tcl_Obj **objv;
+ int objc;
+ unsigned char *curPixelPtr;
+ int x, y, rowCount, colCount, curColCount;
+ Tk_PhotoImageBlock srcBlock;
+ Display *display;
+ Colormap colormap;
+ struct FormatOptions opts;
+ int optIndex;
+
+ /*
+ * Parse format suboptions
+ * We don't use any format suboptions, but we still need to provide useful
+ * error messages if suboptions were specified.
+ */
+
+ memset(&opts, 0, sizeof(opts));
+ if (formatString != NULL) {
+ if (Tcl_ListObjGetElements(interp, formatString, &objc, &objv)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ optIndex = 0;
+ if (ParseFormatOptions(interp, 0, objc, objv, &optIndex, &opts)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (optIndex < objc) {
+ Tcl_SetObjResult(interp,
+ GetBadOptMsg(Tcl_GetString(objv[optIndex]), 0));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ /*
+ * Check input data
+ */
+
+ if (Tcl_ListObjGetElements(interp, data, &rowCount, &rowListPtr)
+ != TCL_OK ) {
+ return TCL_ERROR;
+ }
+ if ( rowCount > 0 && Tcl_ListObjLength(interp, rowListPtr[0], &colCount)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (width <= 0 || height <= 0 || rowCount == 0 || colCount == 0) {
+ /*
+ * No changes with zero sized input or zero sized output region
+ */
+
+ return TCL_OK;
+ }
+ if (srcX < 0 || srcY < 0 || srcX >= rowCount || srcY >= colCount) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("source coordinates out of range"));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "COORDINATES", NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Memory allocation overflow protection.
+ * May not be able to trigger/ demo / test this.
+ */
+
+ if (colCount > (int)(UINT_MAX / 4 / rowCount)) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "photo image dimensions exceed Tcl memory limits"));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "OVERFLOW", NULL);
+ return TCL_OK;
+ }
+
+ /*
+ * Read data and put it to imageHandle
+ */
+
+ srcBlock.width = colCount - srcX;
+ srcBlock.height = rowCount - srcY;
+ srcBlock.pixelSize = 4;
+ srcBlock.pitch = srcBlock.width * 4;
+ srcBlock.offset[0] = 0;
+ srcBlock.offset[1] = 1;
+ srcBlock.offset[2] = 2;
+ srcBlock.offset[3] = 3;
+ srcBlock.pixelPtr = attemptckalloc(srcBlock.pitch * srcBlock.height);
+ if (srcBlock.pixelPtr == NULL) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(TK_PHOTO_ALLOC_FAILURE_MESSAGE));
+ Tcl_SetErrorCode(interp, "TK", "MALLOC", NULL);
+ return TCL_ERROR;
+ }
+ curPixelPtr = srcBlock.pixelPtr;
+ display = Tk_Display(Tk_MainWindow(interp));
+ colormap = Tk_Colormap(Tk_MainWindow(interp));
+ for (y = srcY; y < rowCount; y++) {
+ /*
+ * We don't test the length of row, as that's been done in
+ * ImgStringMatch()
+ */
+
+ if (Tcl_ListObjGetElements(interp, rowListPtr[y], &curColCount,
+ &colListPtr) != TCL_OK) {
+ goto errorExit;
+ }
+ for (x = srcX; x < colCount; x++) {
+ if (ParseColor(interp, colListPtr[x], display, colormap,
+ curPixelPtr, curPixelPtr + 1, curPixelPtr + 2,
+ curPixelPtr + 3) != TCL_OK) {
+ goto errorExit;
+ }
+ curPixelPtr += 4;
+ }
+ }
+
+ /*
+ * Write image data to destHandle
+ */
+ if (Tk_PhotoPutBlock(interp, imageHandle, &srcBlock, destX, destY,
+ width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) {
+ goto errorExit;
+ }
+
+ ckfree(srcBlock.pixelPtr);
+
+ return TCL_OK;
+
+ errorExit:
+ ckfree(srcBlock.pixelPtr);
+
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StringWriteDef --
+ *
+ * String write function for default image data format. See the user
+ * documentation for details.
+ *
+ * Results:
+ * The converted data is set as the result of interp. Returns a standard
+ * Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StringWriteDef(
+ Tcl_Interp *interp, /* For the result and errors */
+ Tcl_Obj *formatString, /* The value of the -format option */
+ Tk_PhotoImageBlock *blockPtr) /* The image data to convert */
+{
+ int greenOffset, blueOffset, alphaOffset, hasAlpha;
+ Tcl_Obj *result, **objv = NULL;
+ int objc, allowedOpts, optIndex;
+ struct FormatOptions opts;
+
+ /*
+ * Parse format suboptions
+ */
+ if (Tcl_ListObjGetElements(interp, formatString, &objc, &objv)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ allowedOpts = OPT_COLORFORMAT;
+ optIndex = 0;
+ if (ParseFormatOptions(interp, allowedOpts, objc, objv, &optIndex, &opts)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (optIndex < objc) {
+ Tcl_SetObjResult(interp,
+ GetBadOptMsg(Tcl_GetString(objv[optIndex]), allowedOpts));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION", NULL);
+ return TCL_ERROR;
+ }
+
+ greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
+ blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
+
+ /*
+ * A negative alpha offset signals that the image is fully opaque.
+ * That's not really documented anywhere, but it's the way it is!
+ */
+
+ if (blockPtr->offset[3] < 0) {
+ hasAlpha = 0;
+ alphaOffset = 0;
+ } else {
+ hasAlpha = 1;
+ alphaOffset = blockPtr->offset[3] - blockPtr->offset[0];
+ }
+
+ if ((blockPtr->width > 0) && (blockPtr->height > 0)) {
+ int row, col;
+ Tcl_DString data, line;
+ char colorBuf[11];
+ unsigned char *pixelPtr;
+ unsigned char alphaVal = 255;
+
+ Tcl_DStringInit(&data);
+ for (row=0; row<blockPtr->height; row++) {
+ pixelPtr = blockPtr->pixelPtr + blockPtr->offset[0]
+ + row * blockPtr->pitch;
+ Tcl_DStringInit(&line);
+ for (col=0; col<blockPtr->width; col++) {
+ if (hasAlpha) {
+ alphaVal = pixelPtr[alphaOffset];
+ }
+
+ /*
+ * We don't build lines as a list for #RGBA and #RGB. Since
+ * these color formats look like comments, the first element
+ * of the list would get quoted with an additional {} .
+ * While this is not a problem if the data is used as
+ * a list, it would cause problems if someone decides to parse
+ * it as a string (and it looks kinda strange)
+ */
+
+ switch (opts.colorFormat) {
+ case COLORFORMAT_RGB2:
+ sprintf(colorBuf, "#%02x%02x%02x ", pixelPtr[0],
+ pixelPtr[greenOffset], pixelPtr[blueOffset]);
+ Tcl_DStringAppend(&line, colorBuf, -1);
+ break;
+ case COLORFORMAT_RGBA2:
+ sprintf(colorBuf, "#%02x%02x%02x%02x ",
+ pixelPtr[0], pixelPtr[greenOffset],
+ pixelPtr[blueOffset], alphaVal);
+ Tcl_DStringAppend(&line, colorBuf, -1);
+ break;
+ case COLORFORMAT_LIST:
+ Tcl_DStringStartSublist(&line);
+ sprintf(colorBuf, "%d", pixelPtr[0]);
+ Tcl_DStringAppendElement(&line, colorBuf);
+ sprintf(colorBuf, "%d", pixelPtr[greenOffset]);
+ Tcl_DStringAppendElement(&line, colorBuf);
+ sprintf(colorBuf, "%d", pixelPtr[blueOffset]);
+ Tcl_DStringAppendElement(&line, colorBuf);
+ sprintf(colorBuf, "%d", alphaVal);
+ Tcl_DStringAppendElement(&line, colorBuf);
+ Tcl_DStringEndSublist(&line);
+ break;
+ default:
+ Tcl_Panic("unexpected switch fallthrough");
+ }
+ pixelPtr += blockPtr->pixelSize;
+ }
+ if (opts.colorFormat != COLORFORMAT_LIST) {
+ /*
+ * For the #XXX formats, we need to remove the last
+ * whitespace.
+ */
+
+ *(Tcl_DStringValue(&line) + Tcl_DStringLength(&line) - 1)
+ = '\0';
+ }
+ Tcl_DStringAppendElement(&data, Tcl_DStringValue(&line));
+ Tcl_DStringFree(&line);
+ }
+ result = Tcl_NewStringObj(Tcl_DStringValue(&data), -1);
+ Tcl_DStringFree(&data);
+ } else {
+ result = Tcl_NewObj();
+ }
+
+ Tcl_SetObjResult(interp, result);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseColor --
+ *
+ * This function extracts color and alpha values from a string. It
+ * understands standard Tk color formats, alpha suffixes and the color
+ * formats specific to photo images, which include alpha data.
+ *
+ * Results:
+ * On success, writes red, green, blue and alpha values to the
+ * corresponding pointers. If the color spec contains no alpha
+ * information, 255 is taken as transparency value.
+ * If the input cannot be parsed, leaves an error message in
+ * interp. Returns a standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseColor(
+ Tcl_Interp *interp, /* error messages go there */
+ Tcl_Obj *specObj, /* the color data to parse */
+ Display *display, /* display of main window, needed to parse
+ * standard Tk colors */
+ Colormap colormap, /* colormap of current display */
+ unsigned char *redPtr, /* the result is written to these pointers */
+ unsigned char *greenPtr,
+ unsigned char *bluePtr,
+ unsigned char *alphaPtr)
+{
+ const char *specString;
+ TkSizeT charCount;
+
+ /*
+ * Find out which color format we have
+ */
+
+ specString = TkGetStringFromObj(specObj, &charCount);
+
+ if (charCount == 0) {
+ /* Empty string */
+ *redPtr = *greenPtr = *bluePtr = *alphaPtr = 0;
+ return TCL_OK;
+ }
+ if (charCount > TK_PHOTO_MAX_COLOR_CHARS) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid color"));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_COLOR", NULL);
+ return TCL_ERROR;
+ }
+ if (specString[0] == '#') {
+ return ParseColorAsHex(interp, specString, charCount, display,
+ colormap, redPtr, greenPtr, bluePtr, alphaPtr);
+ }
+ if (ParseColorAsList(interp, specString, charCount,
+ redPtr, greenPtr, bluePtr, alphaPtr) == TCL_OK) {
+ return TCL_OK;
+ }
+
+ /*
+ * Parsing the color as standard Tk color always is the last option tried
+ * because TkParseColor() is very slow with values it cannot parse.
+ */
+
+ Tcl_ResetResult(interp);
+ return ParseColorAsStandard(interp, specString, charCount, display,
+ colormap, redPtr, greenPtr, bluePtr, alphaPtr);
+
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseColorAsList --
+ *
+ * This function extracts color and alpha values from a list of 3 or 4
+ * integers (the list color format).
+ *
+ * Results:
+ * On success, writes red, green, blue and alpha values to the
+ * corresponding pointers. If the color spec contains no alpha
+ * information, 255 is taken as transparency value.
+ * Returns a standard Tcl result.
+ *
+ * Side effects:
+ * Does *not* leave error messages in interp. The reason is that
+ * it is not always possible to tell if the list format was even
+ * intended and thus it is hard to return meaningful messages.
+ * A general error message from the caller is probably the best
+ * alternative.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseColorAsList(
+ Tcl_Interp *interp, /* not used */
+ const char *colorString, /* the color data to parse */
+ int colorStrLen, /* length of the color string */
+ unsigned char *redPtr, /* the result is written to these pointers */
+ unsigned char *greenPtr,
+ unsigned char *bluePtr,
+ unsigned char *alphaPtr)
+{
+
+ /*
+ * This is kinda ugly. The code would be certainly nicer if it
+ * used Tcl_ListObjGetElements() and Tcl_GetIntFromObj(). But with
+ * strtol() it's *much* faster.
+ */
+
+ const char *curPos;
+ int values[4];
+ int i;
+
+ curPos = colorString;
+ i = 0;
+
+ /*
+ * strtol can give false positives with a sequence of space chars.
+ * To avoid that, avance the pointer to the next non-blank char.
+ */
+
+ while(isspace(*curPos)) {
+ ++curPos;
+ }
+ while (i < 4 && *curPos != '\0') {
+ values[i] = strtol(curPos, (char **)&curPos, 0);
+ if (values[i] < 0 || values[i] > 255) {
+ return TCL_ERROR;
+ }
+ while(isspace(*curPos)) {
+ ++curPos;
+ }
+ ++i;
+ }
+
+ if (i < 3 || *curPos != '\0') {
+ return TCL_ERROR;
+ }
+ if (i < 4) {
+ values[3] = 255;
+ }
+
+ *redPtr = (unsigned char) values[0];
+ *greenPtr = (unsigned char) values[1];
+ *bluePtr = (unsigned char) values[2];
+ *alphaPtr = (unsigned char) values[3];
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseColorAsHex --
+ *
+ * This function extracts color and alpha values from a string
+ * starting with '#', followed by hex digits. It undestands both
+ * the #RGBA form and the #RBG (with optional suffix)
+ *
+ * Results:
+ * On success, writes red, green, blue and alpha values to the
+ * corresponding pointers. If the color spec contains no alpha
+ * information, 255 is taken as transparency value.
+ * Returns a standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseColorAsHex(
+ Tcl_Interp *interp, /* error messages are left here */
+ const char *colorString, /* the color data to parse */
+ int colorStrLen, /* length of the color string */
+ Display *display, /* display of main window */
+ Colormap colormap, /* colormap of current display */
+ unsigned char *redPtr, /* the result is written to these pointers */
+ unsigned char *greenPtr,
+ unsigned char *bluePtr,
+ unsigned char *alphaPtr)
+{
+ int i;
+ unsigned long int colorValue = 0;
+
+ if (colorStrLen - 1 != 4 && colorStrLen - 1 != 8) {
+ return ParseColorAsStandard(interp, colorString, colorStrLen,
+ display, colormap, redPtr, greenPtr, bluePtr, alphaPtr);
+ }
+ for (i = 1; i < colorStrLen; i++) {
+ if (!isxdigit(UCHAR(colorString[i]))) {
+ /*
+ * There still is a chance that this is a Tk color with
+ * an alpha suffix
+ */
+
+ return ParseColorAsStandard(interp, colorString, colorStrLen,
+ display, colormap, redPtr, greenPtr, bluePtr, alphaPtr);
+ }
+ }
+
+ colorValue = strtoul(colorString + 1, NULL, 16);
+ switch (colorStrLen - 1) {
+ case 4:
+ /* #RGBA format */
+ *redPtr = (unsigned char) ((colorValue >> 12) * 0x11);
+ *greenPtr = (unsigned char) (((colorValue >> 8) & 0xf) * 0x11);
+ *bluePtr = (unsigned char) (((colorValue >> 4) & 0xf) * 0x11);
+ *alphaPtr = (unsigned char) ((colorValue & 0xf) * 0x11);
+ return TCL_OK;
+ case 8:
+ /* #RRGGBBAA format */
+ *redPtr = (unsigned char) (colorValue >> 24);
+ *greenPtr = (unsigned char) ((colorValue >> 16) & 0xff);
+ *bluePtr = (unsigned char) ((colorValue >> 8) & 0xff);
+ *alphaPtr = (unsigned char) (colorValue & 0xff);
+ return TCL_OK;
+ default:
+ Tcl_Panic("unexpected switch fallthrough");
+ }
+
+ /* Shouldn't get here */
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseColorAsStandard --
+ *
+ * This function tries to split a color stirng in a color and a
+ * suffix part and to extract color and alpha values from them. The
+ * color part is treated as regular Tk color.
+ *
+ * Results:
+ * On success, writes red, green, blue and alpha values to the
+ * corresponding pointers. If the color spec contains no alpha
+ * information, 255 is taken as transparency value.
+ * Returns a standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseColorAsStandard(
+ Tcl_Interp *interp, /* error messages are left here */
+ const char *specString, /* the color data to parse */
+ int specStrLen, /* length of the color string */
+ Display *display, /* display of main window */
+ Colormap colormap, /* colormap of current display */
+ unsigned char *redPtr, /* the result is written to these pointers */
+ unsigned char *greenPtr,
+ unsigned char *bluePtr,
+ unsigned char *alphaPtr)
+{
+ XColor parsedColor;
+ const char *suffixString, *colorString;
+ char colorBuffer[TK_PHOTO_MAX_COLOR_CHARS + 1];
+ char *tmpString;
+ double fracAlpha;
+ unsigned int suffixAlpha;
+ int i;
+
+ /*
+ * Split color data string in color and suffix parts
+ */
+
+ if ((suffixString = strrchr(specString, '@')) == NULL
+ && ((suffixString = strrchr(specString, '#')) == NULL
+ || suffixString == specString)) {
+ suffixString = specString + specStrLen;
+ colorString = specString;
+ } else {
+ strncpy(colorBuffer, specString, suffixString - specString);
+ colorBuffer[suffixString - specString] = '\0';
+ colorString = (const char*)colorBuffer;
+ }
+
+ /*
+ * Try to parse as standard Tk color.
+ *
+ * We don't use Tk_GetColor() et al. here, as those functions
+ * migth return a color that does not exaxtly match the given name
+ * if the colormap is full. Also, we don't really want the color to be
+ * added to the colormap.
+ */
+
+ if ( ! TkParseColor(display, colormap, colorString, &parsedColor)) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "invalid color name \"%s\"", specString));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_COLOR", NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * parse the Suffix
+ */
+
+ switch (suffixString[0]) {
+ case '\0':
+ suffixAlpha = 255;
+ break;
+ case '@':
+ fracAlpha = strtod(suffixString + 1, &tmpString);
+ if (*tmpString != '\0') {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha "
+ "suffix \"%s\": expected floating-point value",
+ suffixString));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID COLOR", NULL);
+ return TCL_ERROR;
+ }
+ if (fracAlpha < 0 || fracAlpha > 1) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf("invalid alpha suffix"
+ " \"%s\": value must be in the range from 0 to 1",
+ suffixString));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_COLOR", NULL);
+ return TCL_ERROR;
+ }
+ suffixAlpha = (unsigned int) floor(fracAlpha * 255 + 0.5);
+ break;
+ case '#':
+ if (strlen(suffixString + 1) < 1 || strlen(suffixString + 1)> 2) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "invalid alpha suffix \"%s\"", suffixString));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_COLOR", NULL);
+ return TCL_ERROR;
+ }
+ for (i = 1; i <= (int)strlen(suffixString + 1); i++) {
+ if ( ! isxdigit(UCHAR(suffixString[i]))) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "invalid alpha suffix \"%s\": expected hex digit",
+ suffixString));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "INVALID_COLOR", NULL);
+ return TCL_ERROR;
+ }
+ }
+ if (strlen(suffixString + 1) == 1) {
+ sscanf(suffixString, "#%1x", &suffixAlpha);
+ suffixAlpha *= 0x11;
+ } else {
+ sscanf(suffixString, "#%2x", &suffixAlpha);
+ }
+ break;
+ default:
+ Tcl_Panic("unexpected switch fallthrough");
+ }
+
+ *redPtr = (unsigned char) (parsedColor.red >> 8);
+ *greenPtr = (unsigned char) (parsedColor.green >> 8);
+ *bluePtr = (unsigned char) (parsedColor.blue >> 8);
+ *alphaPtr = (unsigned char) suffixAlpha;
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkDebugStringMatchDef --
+ *
+ * Debugging function for StringMatchDef. Basically just an alias for
+ * that function, intended to expose it directly to tests, as
+ * StirngMatchDef cannot be sufficiently tested otherwise.
+ *
+ * Results:
+ * See StringMatchDef.
+ *
+ * Side effects:
+ * None
+ *----------------------------------------------------------------------
+ */
+int
+TkDebugPhotoStringMatchDef(
+ Tcl_Interp *interp, /* Error messages are left in this interpreter */
+ Tcl_Obj *data, /* The data to check */
+ Tcl_Obj *formatString, /* Value of the -format option, not used here */
+ int *widthPtr, /* Width of image is written to this location */
+ int *heightPtr) /* Height of image is written to this location */
+{
+ return StringMatchDef(data, formatString, widthPtr, heightPtr, interp);
+}
+
+
+/* Local Variables: */
+/* mode: c */
+/* fill-column: 78 */
+/* c-basic-offset: 4 */
+/* tab-width: 8 */
+/* indent-tabs-mode: nil */
+/* End: */
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index c6f2dcb..3331d3d 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -126,7 +126,7 @@ typedef struct {
Tcl_Channel channel; /* Channel for from-file reads. */
Tcl_Obj *objDataPtr;
unsigned char *strDataBuf; /* Raw source data for from-string reads. */
- int strDataLen; /* Length of source data. */
+ TkSizeT strDataLen; /* Length of source data. */
unsigned char *base64Data; /* base64 encoded string data. */
unsigned char base64Bits; /* Remaining bits from last base64 read. */
unsigned char base64State; /* Current state of base64 decoder. */
@@ -214,16 +214,16 @@ static inline unsigned char Paeth(int a, int b, int c);
static int ParseFormat(Tcl_Interp *interp, Tcl_Obj *fmtObj,
PNGImage *pngPtr);
static int ReadBase64(Tcl_Interp *interp, PNGImage *pngPtr,
- unsigned char *destPtr, int destSz,
+ unsigned char *destPtr, size_t destSz,
unsigned long *crcPtr);
static int ReadByteArray(Tcl_Interp *interp, PNGImage *pngPtr,
- unsigned char *destPtr, int destSz,
+ unsigned char *destPtr, size_t destSz,
unsigned long *crcPtr);
static int ReadData(Tcl_Interp *interp, PNGImage *pngPtr,
- unsigned char *destPtr, int destSz,
+ unsigned char *destPtr, size_t destSz,
unsigned long *crcPtr);
static int ReadChunkHeader(Tcl_Interp *interp, PNGImage *pngPtr,
- int *sizePtr, unsigned long *typePtr,
+ size_t *sizePtr, unsigned long *typePtr,
unsigned long *crcPtr);
static int ReadIDAT(Tcl_Interp *interp, PNGImage *pngPtr,
int chunkSz, unsigned long crc);
@@ -250,9 +250,9 @@ static inline int WriteByte(Tcl_Interp *interp, PNGImage *pngPtr,
unsigned char c, unsigned long *crcPtr);
static inline int WriteChunk(Tcl_Interp *interp, PNGImage *pngPtr,
unsigned long chunkType,
- const unsigned char *dataPtr, int dataSize);
+ const unsigned char *dataPtr, size_t dataSize);
static int WriteData(Tcl_Interp *interp, PNGImage *pngPtr,
- const unsigned char *srcPtr, int srcSz,
+ const unsigned char *srcPtr, size_t srcSz,
unsigned long *crcPtr);
static int WriteExtraChunks(Tcl_Interp *interp,
PNGImage *pngPtr);
@@ -319,7 +319,7 @@ InitPNGImage(
Tcl_IncrRefCount(objPtr);
pngPtr->objDataPtr = objPtr;
pngPtr->strDataBuf =
- Tcl_GetByteArrayFromObj(objPtr, &pngPtr->strDataLen);
+ TkGetByteArrayFromObj(objPtr, &pngPtr->strDataLen);
}
/*
@@ -430,7 +430,7 @@ ReadBase64(
Tcl_Interp *interp,
PNGImage *pngPtr,
unsigned char *destPtr,
- int destSz,
+ size_t destSz,
unsigned long *crcPtr)
{
static const unsigned char from64[] = {
@@ -555,14 +555,14 @@ ReadByteArray(
Tcl_Interp *interp,
PNGImage *pngPtr,
unsigned char *destPtr,
- int destSz,
+ size_t destSz,
unsigned long *crcPtr)
{
/*
* Check to make sure the number of requested bytes are available.
*/
- if (pngPtr->strDataLen < destSz) {
+ if ((size_t)pngPtr->strDataLen < destSz) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"unexpected end of image data", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "PNG", "EARLY_END", NULL);
@@ -570,7 +570,7 @@ ReadByteArray(
}
while (destSz) {
- int blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
+ size_t blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
memcpy(destPtr, pngPtr->strDataBuf, blockSz);
@@ -613,7 +613,7 @@ ReadData(
Tcl_Interp *interp,
PNGImage *pngPtr,
unsigned char *destPtr,
- int destSz,
+ size_t destSz,
unsigned long *crcPtr)
{
if (pngPtr->base64Data) {
@@ -623,10 +623,10 @@ ReadData(
}
while (destSz) {
- int blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
+ size_t blockSz = PNG_MIN(destSz, PNG_BLOCK_SZ);
- blockSz = Tcl_Read(pngPtr->channel, (char *)destPtr, blockSz);
- if (blockSz < 0) {
+ blockSz = (size_t)Tcl_Read(pngPtr->channel, (char *)destPtr, blockSz);
+ if (blockSz == (size_t)-1) {
/* TODO: failure info... */
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"channel read failed: %s", Tcl_PosixError(interp)));
@@ -858,7 +858,7 @@ static int
ReadChunkHeader(
Tcl_Interp *interp,
PNGImage *pngPtr,
- int *sizePtr,
+ size_t *sizePtr,
unsigned long *typePtr,
unsigned long *crcPtr)
{
@@ -1239,7 +1239,7 @@ ReadIHDR(
{
unsigned char sigBuf[PNG_SIG_SZ];
unsigned long chunkType;
- int chunkSz;
+ size_t chunkSz;
unsigned long crc;
unsigned long width, height;
int mismatch;
@@ -1263,7 +1263,7 @@ ReadIHDR(
*/
if (mismatch && pngPtr->strDataBuf) {
- pngPtr->strDataBuf = Tcl_GetByteArrayFromObj(pngPtr->objDataPtr,
+ pngPtr->strDataBuf = TkGetByteArrayFromObj(pngPtr->objDataPtr,
&pngPtr->strDataLen);
pngPtr->base64Data = pngPtr->strDataBuf;
@@ -2097,7 +2097,7 @@ ReadIDAT(
*/
while (chunkSz && !Tcl_ZlibStreamEof(pngPtr->stream)) {
- int len1, len2;
+ TkSizeT len1, len2;
/*
* Read another block of input into the zlib stream if data remains.
@@ -2146,14 +2146,14 @@ ReadIDAT(
*/
getNextLine:
- Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, &len1);
+ TkGetByteArrayFromObj(pngPtr->thisLineObj, &len1);
if (Tcl_ZlibStreamGet(pngPtr->stream, pngPtr->thisLineObj,
pngPtr->phaseSize - len1) == TCL_ERROR) {
return TCL_ERROR;
}
- Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, &len2);
+ TkGetByteArrayFromObj(pngPtr->thisLineObj, &len2);
- if (len2 == pngPtr->phaseSize) {
+ if (len2 == (TkSizeT)pngPtr->phaseSize) {
if (pngPtr->phase > 7) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"extra data after final scan line of final phase",
@@ -2382,7 +2382,7 @@ DecodePNG(
int destY)
{
unsigned long chunkType;
- int chunkSz;
+ size_t chunkSz;
unsigned long crc;
/*
@@ -2767,7 +2767,7 @@ StringMatchPNG(
InitPNGImage(NULL, &png, NULL, pObjData, TCL_ZLIB_STREAM_INFLATE);
- png.strDataBuf = Tcl_GetByteArrayFromObj(pObjData, &png.strDataLen);
+ png.strDataBuf = TkGetByteArrayFromObj(pObjData, &png.strDataLen);
if (ReadIHDR(interp, &png) == TCL_OK) {
*widthPtr = png.block.width;
@@ -2845,7 +2845,7 @@ WriteData(
Tcl_Interp *interp,
PNGImage *pngPtr,
const unsigned char *srcPtr,
- int srcSz,
+ size_t srcSz,
unsigned long *crcPtr)
{
if (!srcPtr || !srcSz) {
@@ -2862,12 +2862,12 @@ WriteData(
*/
if (pngPtr->objDataPtr) {
- int objSz;
+ TkSizeT objSz;
unsigned char *destPtr;
- Tcl_GetByteArrayFromObj(pngPtr->objDataPtr, &objSz);
+ TkGetByteArrayFromObj(pngPtr->objDataPtr, &objSz);
- if (objSz > INT_MAX - srcSz) {
+ if (objSz + srcSz > INT_MAX) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"image too large to store completely in byte array", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "PNG", "TOO_LARGE", NULL);
@@ -2884,7 +2884,7 @@ WriteData(
}
memcpy(destPtr+objSz, srcPtr, srcSz);
- } else if (Tcl_Write(pngPtr->channel, (const char *) srcPtr, srcSz) < 0) {
+ } else if (Tcl_Write(pngPtr->channel, (const char *) srcPtr, srcSz) == TCL_IO_FAILURE) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"write to channel failed: %s", Tcl_PosixError(interp)));
return TCL_ERROR;
@@ -2960,7 +2960,7 @@ WriteChunk(
PNGImage *pngPtr,
unsigned long chunkType,
const unsigned char *dataPtr,
- int dataSize)
+ size_t dataSize)
{
unsigned long crc = Tcl_ZlibCRC32(0, NULL, 0);
int result = TCL_OK;
@@ -3131,9 +3131,10 @@ WriteIDAT(
PNGImage *pngPtr,
Tk_PhotoImageBlock *blockPtr)
{
- int rowNum, flush = TCL_ZLIB_NO_FLUSH, outputSize, result;
+ int rowNum, flush = TCL_ZLIB_NO_FLUSH, result;
Tcl_Obj *outputObj;
unsigned char *outputBytes;
+ TkSizeT outputSize;
/*
* Filter and compress each row one at a time.
@@ -3225,7 +3226,7 @@ WriteIDAT(
outputObj = Tcl_NewObj();
(void) Tcl_ZlibStreamGet(pngPtr->stream, outputObj, -1);
- outputBytes = Tcl_GetByteArrayFromObj(outputObj, &outputSize);
+ outputBytes = TkGetByteArrayFromObj(outputObj, &outputSize);
result = WriteChunk(interp, pngPtr, CHUNK_IDAT, outputBytes, outputSize);
Tcl_DecrRefCount(outputObj);
return result;
diff --git a/generic/tkImgPPM.c b/generic/tkImgPPM.c
index 6f084f0..ea49fc2 100644
--- a/generic/tkImgPPM.c
+++ b/generic/tkImgPPM.c
@@ -141,7 +141,8 @@ FileReadPPM(
* image being read. */
{
int fileWidth, fileHeight, maxIntensity;
- int nLines, nBytes, h, type, count, bytesPerChannel = 1;
+ int nLines, h, type, bytesPerChannel = 1;
+ size_t nBytes, count;
unsigned char *pixelPtr;
Tk_PhotoImageBlock block;
@@ -285,7 +286,8 @@ FileWritePPM(
Tk_PhotoImageBlock *blockPtr)
{
Tcl_Channel chan;
- int w, h, greenOffset, blueOffset, nBytes;
+ int w, h, greenOffset, blueOffset;
+ size_t nBytes;
unsigned char *pixelPtr, *pixLinePtr;
char header[16 + TCL_INTEGER_SPACE * 2];
@@ -315,16 +317,16 @@ FileWritePPM(
if ((greenOffset == 1) && (blueOffset == 2) && (blockPtr->pixelSize == 3)
&& (blockPtr->pitch == (blockPtr->width * 3))) {
nBytes = blockPtr->height * blockPtr->pitch;
- if (Tcl_Write(chan, (char *) pixLinePtr, nBytes) != nBytes) {
+ if ((size_t)Tcl_Write(chan, (char *) pixLinePtr, nBytes) != nBytes) {
goto writeerror;
}
} else {
for (h = blockPtr->height; h > 0; h--) {
pixelPtr = pixLinePtr;
for (w = blockPtr->width; w > 0; w--) {
- if ( Tcl_Write(chan,(char *)&pixelPtr[0], 1) == -1 ||
- Tcl_Write(chan,(char *)&pixelPtr[greenOffset],1)==-1 ||
- Tcl_Write(chan,(char *)&pixelPtr[blueOffset],1) ==-1) {
+ if (Tcl_Write(chan,(char *)&pixelPtr[0], 1) == TCL_IO_FAILURE ||
+ Tcl_Write(chan,(char *)&pixelPtr[greenOffset],1) == TCL_IO_FAILURE ||
+ Tcl_Write(chan,(char *)&pixelPtr[blueOffset],1) == TCL_IO_FAILURE) {
goto writeerror;
}
pixelPtr += blockPtr->pixelSize;
@@ -762,10 +764,11 @@ ReadPPMStringHeader(
{
#define BUFFER_SIZE 1000
char buffer[BUFFER_SIZE], c;
- int i, numFields, dataSize, type = 0;
+ int i, numFields, type = 0;
+ TkSizeT dataSize;
unsigned char *dataBuffer;
- dataBuffer = Tcl_GetByteArrayFromObj(dataPtr, &dataSize);
+ dataBuffer = TkGetByteArrayFromObj(dataPtr, &dataSize);
/*
* Read 4 space-separated fields from the string, ignoring comments (any
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index c500050..fde868b 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -115,7 +115,7 @@ TkImgPhotoConfigureInstance(
*/
if (colorTablePtr != NULL) {
- colorTablePtr->liveRefCount -= 1;
+ colorTablePtr->liveRefCount--;
FreeColorTable(colorTablePtr, 0);
}
GetColorTable(instancePtr);
@@ -745,7 +745,7 @@ TkImgPhotoFree(
colorPtr = instancePtr->colorTablePtr;
if (colorPtr != NULL) {
- colorPtr->liveRefCount -= 1;
+ colorPtr->liveRefCount--;
}
Tcl_DoWhenIdle(TkImgDisposeInstance, instancePtr);
@@ -867,8 +867,8 @@ TkImgPhotoInstanceSetSize(
if (masterPtr->width == instancePtr->width) {
offset = validBox.y * masterPtr->width * 3;
memcpy(newError + offset, instancePtr->error + offset,
- (size_t) (validBox.height
- * masterPtr->width * 3 * sizeof(schar)));
+ (size_t) validBox.height
+ * masterPtr->width * 3 * sizeof(schar));
} else if (validBox.width > 0 && validBox.height > 0) {
errDestPtr = newError +
@@ -1128,8 +1128,7 @@ FreeColorTable(
* longer required by an instance. */
int force) /* Force free to happen immediately. */
{
- colorPtr->refCount--;
- if (colorPtr->refCount > 0) {
+ if (colorPtr->refCount-- > 1) {
return;
}
@@ -1462,7 +1461,7 @@ DisposeColorTable(
ckfree(colorPtr->pixelMap);
}
- entry = Tcl_FindHashEntry(&imgPhotoColorHash, (char *) &colorPtr->id);
+ entry = Tcl_FindHashEntry(&imgPhotoColorHash, &colorPtr->id);
if (entry == NULL) {
Tcl_Panic("DisposeColorTable couldn't find hash entry");
}
@@ -1983,8 +1982,8 @@ TkImgResetDither(
{
if (instancePtr->error) {
memset(instancePtr->error, 0,
- /*(size_t)*/ (instancePtr->masterPtr->width
- * instancePtr->masterPtr->height * 3 * sizeof(schar)));
+ (size_t) instancePtr->masterPtr->width
+ * instancePtr->masterPtr->height * 3 * sizeof(schar));
}
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 03b3731..23ee142 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -48,6 +48,7 @@ struct SubcommandOptions {
* set in the options field of the SubcommandOptions structure if that option
* was specified.
*
+ * OPT_ALPHA: Set if -alpha option allowed/specified.
* OPT_BACKGROUND: Set if -format option allowed/specified.
* OPT_COMPOSITE: Set if -compositingrule option allowed/spec'd.
* OPT_FORMAT: Set if -format option allowed/specified.
@@ -56,18 +57,21 @@ struct SubcommandOptions {
* OPT_SHRINK: Set if -shrink option allowed/specified.
* OPT_SUBSAMPLE: Set if -subsample option allowed/spec'd.
* OPT_TO: Set if -to option allowed/specified.
+ * OPT_WITHALPHA: Set if -withalpha option allowed/specified.
* OPT_ZOOM: Set if -zoom option allowed/specified.
*/
-#define OPT_BACKGROUND 1
-#define OPT_COMPOSITE 2
-#define OPT_FORMAT 4
-#define OPT_FROM 8
-#define OPT_GRAYSCALE 0x10
-#define OPT_SHRINK 0x20
-#define OPT_SUBSAMPLE 0x40
-#define OPT_TO 0x80
-#define OPT_ZOOM 0x100
+#define OPT_ALPHA 1
+#define OPT_BACKGROUND 2
+#define OPT_COMPOSITE 4
+#define OPT_FORMAT 8
+#define OPT_FROM 0x10
+#define OPT_GRAYSCALE 0x20
+#define OPT_SHRINK 0x40
+#define OPT_SUBSAMPLE 0x80
+#define OPT_TO 0x100
+#define OPT_WITHALPHA 0x200
+#define OPT_ZOOM 0x400
/*
* List of option names. The order here must match the order of declarations
@@ -75,6 +79,7 @@ struct SubcommandOptions {
*/
static const char *const optionNames[] = {
+ "-alpha",
"-background",
"-compositingrule",
"-format",
@@ -83,6 +88,7 @@ static const char *const optionNames[] = {
"-shrink",
"-subsample",
"-to",
+ "-withalpha",
"-zoom",
NULL
};
@@ -152,15 +158,15 @@ static Tcl_ThreadDataKey dataKey;
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_STRING, "-file", NULL, NULL,
- NULL, Tk_Offset(PhotoMaster, fileString), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(PhotoMaster, fileString), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_DOUBLE, "-gamma", NULL, NULL,
- DEF_PHOTO_GAMMA, Tk_Offset(PhotoMaster, gamma), 0, NULL},
+ DEF_PHOTO_GAMMA, offsetof(PhotoMaster, gamma), 0, NULL},
{TK_CONFIG_INT, "-height", NULL, NULL,
- DEF_PHOTO_HEIGHT, Tk_Offset(PhotoMaster, userHeight), 0, NULL},
+ DEF_PHOTO_HEIGHT, offsetof(PhotoMaster, userHeight), 0, NULL},
{TK_CONFIG_UID, "-palette", NULL, NULL,
- DEF_PHOTO_PALETTE, Tk_Offset(PhotoMaster, palette), 0, NULL},
+ DEF_PHOTO_PALETTE, offsetof(PhotoMaster, palette), 0, NULL},
{TK_CONFIG_INT, "-width", NULL, NULL,
- DEF_PHOTO_WIDTH, Tk_Offset(PhotoMaster, userWidth), 0, NULL},
+ DEF_PHOTO_WIDTH, offsetof(PhotoMaster, userWidth), 0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -182,9 +188,6 @@ static int ImgPhotoConfigureMaster(Tcl_Interp *interp,
static int ToggleComplexAlphaIfNeeded(PhotoMaster *mPtr);
static int ImgPhotoSetSize(PhotoMaster *masterPtr, int width,
int height);
-static int ImgStringWrite(Tcl_Interp *interp,
- Tcl_Obj *formatString,
- Tk_PhotoImageBlock *blockPtr);
static char * ImgGetPhoto(PhotoMaster *masterPtr,
Tk_PhotoImageBlock *blockPtr,
struct SubcommandOptions *optPtr);
@@ -402,14 +405,12 @@ ImgPhotoCmd(
};
PhotoMaster *masterPtr = clientData;
- int result, index, x, y, width, height, dataWidth, dataHeight, listObjc;
+ int result, index, x, y, width, height;
struct SubcommandOptions options;
- Tcl_Obj **listObjv, **srcObjv;
unsigned char *pixelPtr;
Tk_PhotoImageBlock block;
- Tk_Window tkwin;
Tk_PhotoImageFormat *imageFormat;
- size_t length;
+ TkSizeT length;
int imageWidth, imageHeight, matched, oldformat = 0;
Tcl_Channel chan;
Tk_PhotoHandle srcHandle;
@@ -447,8 +448,7 @@ ImgPhotoCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option");
return TCL_ERROR;
}
- arg = Tcl_GetString(objv[2]);
- length = objv[2]->length;
+ arg = TkGetStringFromObj(objv[2], &length);
if (strncmp(arg,"-data", length) == 0) {
if (masterPtr->dataString) {
Tcl_SetObjResult(interp, masterPtr->dataString);
@@ -497,9 +497,8 @@ ImgPhotoCmd(
return TCL_OK;
} else if (objc == 3) {
- const char *arg = Tcl_GetString(objv[2]);
+ const char *arg = TkGetStringFromObj(objv[2], &length);
- length = objv[2]->length;
if (length > 1 && !strncmp(arg, "-data", length)) {
Tcl_AppendResult(interp, "-data {} {} {}", NULL);
if (masterPtr->dataString) {
@@ -668,7 +667,8 @@ ImgPhotoCmd(
return result;
case PHOTO_DATA: {
- char *data;
+ char *data = NULL;
+ Tcl_Obj *freeObj = NULL;
/*
* photo data command - first parse and check any options given.
@@ -676,7 +676,7 @@ ImgPhotoCmd(
Tk_ImageStringWriteProc *stringWriteProc = NULL;
- index = 2;
+ index = 1;
memset(&options, 0, sizeof(options));
options.name = NULL;
options.format = NULL;
@@ -687,7 +687,7 @@ ImgPhotoCmd(
&index, objc, objv) != TCL_OK) {
return TCL_ERROR;
}
- if ((options.name != NULL) || (index < objc)) {
+ if ((options.name == NULL) || (index < objc)) {
Tcl_WrongNumArgs(interp, 2, objv, "?-option value ...?");
return TCL_ERROR;
}
@@ -709,50 +709,50 @@ ImgPhotoCmd(
options.fromX2 = masterPtr->width;
options.fromY2 = masterPtr->height;
}
+ if (!(options.options & OPT_FORMAT)) {
+ options.format = Tcl_NewStringObj("default", -1);
+ freeObj = options.format;
+ }
/*
* Search for an appropriate image string format handler.
*/
- if (options.options & OPT_FORMAT) {
- matched = 0;
- for (imageFormat = tsdPtr->formatList; imageFormat != NULL;
- imageFormat = imageFormat->nextPtr) {
- if ((strncasecmp(Tcl_GetString(options.format),
- imageFormat->name, strlen(imageFormat->name)) == 0)) {
- matched = 1;
- if (imageFormat->stringWriteProc != NULL) {
- stringWriteProc = imageFormat->stringWriteProc;
- break;
- }
- }
- }
- if (stringWriteProc == NULL) {
- oldformat = 1;
- for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL;
- imageFormat = imageFormat->nextPtr) {
- if ((strncasecmp(Tcl_GetString(options.format),
- imageFormat->name,
- strlen(imageFormat->name)) == 0)) {
- matched = 1;
- if (imageFormat->stringWriteProc != NULL) {
- stringWriteProc = imageFormat->stringWriteProc;
- break;
- }
- }
- }
+ matched = 0;
+ for (imageFormat = tsdPtr->formatList; imageFormat != NULL;
+ imageFormat = imageFormat->nextPtr) {
+ if ((strncasecmp(Tcl_GetString(options.format),
+ imageFormat->name, strlen(imageFormat->name)) == 0)) {
+ matched = 1;
+ if (imageFormat->stringWriteProc != NULL) {
+ stringWriteProc = imageFormat->stringWriteProc;
+ break;
+ }
}
- if (stringWriteProc == NULL) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "image string format \"%s\" is %s",
- Tcl_GetString(options.format),
- (matched ? "not supported" : "unknown")));
- Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT",
- Tcl_GetString(options.format), NULL);
- return TCL_ERROR;
+ }
+ if (stringWriteProc == NULL) {
+ oldformat = 1;
+ for (imageFormat = tsdPtr->oldFormatList; imageFormat != NULL;
+ imageFormat = imageFormat->nextPtr) {
+ if ((strncasecmp(Tcl_GetString(options.format),
+ imageFormat->name,
+ strlen(imageFormat->name)) == 0)) {
+ matched = 1;
+ if (imageFormat->stringWriteProc != NULL) {
+ stringWriteProc = imageFormat->stringWriteProc;
+ break;
+ }
+ }
}
- } else {
- stringWriteProc = ImgStringWrite;
+ }
+ if (stringWriteProc == NULL) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "image string format \"%s\" is %s",
+ Tcl_GetString(options.format),
+ (matched ? "not supported" : "unknown")));
+ Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT",
+ Tcl_GetString(options.format), NULL);
+ goto dataErrorExit;
}
/*
@@ -789,7 +789,22 @@ ImgPhotoCmd(
if (data) {
ckfree(data);
}
+ if (freeObj != NULL) {
+ Tcl_DecrRefCount(freeObj);
+ }
return result;
+
+ dataErrorExit:
+ if (options.background) {
+ Tk_FreeColor(options.background);
+ }
+ if (data) {
+ ckfree(data);
+ }
+ if (freeObj != NULL) {
+ Tcl_DecrRefCount(freeObj);
+ }
+ return TCL_ERROR;
}
case PHOTO_GET: {
@@ -797,12 +812,24 @@ ImgPhotoCmd(
* photo get command - first parse and check parameters.
*/
- Tcl_Obj *channels[3];
-
- if (objc != 4) {
- Tcl_WrongNumArgs(interp, 2, objv, "x y");
+ Tcl_Obj *channels[4];
+ int channelCount = 3;
+
+ index = 3;
+ memset(&options, 0, sizeof(options));
+ options.name = NULL;
+ if (ParseSubcommandOptions(&options, interp, OPT_WITHALPHA,
+ &index, objc, objv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (options.name == NULL || index < objc) {
+ Tcl_WrongNumArgs(interp, 2, objv, "x y ?-withalpha?");
return TCL_ERROR;
}
+ if (options.options & OPT_WITHALPHA) {
+ channelCount = 4;
+ }
+
if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK)
|| (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) {
return TCL_ERROR;
@@ -818,25 +845,29 @@ ImgPhotoCmd(
}
/*
- * Extract the value of the desired pixel and format it as a string.
+ * Extract the value of the desired pixel and format it as a list.
*/
pixelPtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4;
- channels[0] = Tcl_NewIntObj(pixelPtr[0]);
- channels[1] = Tcl_NewIntObj(pixelPtr[1]);
- channels[2] = Tcl_NewIntObj(pixelPtr[2]);
- Tcl_SetObjResult(interp, Tcl_NewListObj(3, channels));
+ channels[0] = Tcl_NewWideIntObj(pixelPtr[0]);
+ channels[1] = Tcl_NewWideIntObj(pixelPtr[1]);
+ channels[2] = Tcl_NewWideIntObj(pixelPtr[2]);
+ channels[3] = Tcl_NewWideIntObj(pixelPtr[3]);
+ Tcl_SetObjResult(interp, Tcl_NewListObj(channelCount, channels));
return TCL_OK;
}
- case PHOTO_PUT:
+ case PHOTO_PUT: {
+ Tcl_Obj *format, *data;
+
/*
- * photo put command - first parse the options and colors specified.
+ * photo put command - first parse the options.
*/
index = 2;
memset(&options, 0, sizeof(options));
options.name = NULL;
+ options.format = NULL;
if (ParseSubcommandOptions(&options, interp, OPT_TO|OPT_FORMAT,
&index, objc, objv) != TCL_OK) {
return TCL_ERROR;
@@ -846,174 +877,50 @@ ImgPhotoCmd(
return TCL_ERROR;
}
- if (MatchStringFormat(interp, options.name ? objv[2]:NULL,
- options.format, &imageFormat, &imageWidth,
- &imageHeight, &oldformat) == TCL_OK) {
- Tcl_Obj *format, *data;
+ /*
+ * See if there's a format that can read the data
+ */
- if (!(options.options & OPT_TO) || (options.toX2 < 0)) {
- options.toX2 = options.toX + imageWidth;
- options.toY2 = options.toY + imageHeight;
- }
- if (imageWidth > options.toX2 - options.toX) {
- imageWidth = options.toX2 - options.toX;
- }
- if (imageHeight > options.toY2 - options.toY) {
- imageHeight = options.toY2 - options.toY;
- }
- format = options.format;
- data = objv[2];
- if (oldformat) {
- if (format) {
- format = (Tcl_Obj *) Tcl_GetString(format);
- }
- data = (Tcl_Obj *) Tcl_GetString(data);
- }
- if (imageFormat->stringReadProc(interp, data, format,
- (Tk_PhotoHandle) masterPtr, options.toX, options.toY,
- imageWidth, imageHeight, 0, 0) != TCL_OK) {
- return TCL_ERROR;
- }
- masterPtr->flags |= IMAGE_CHANGED;
- return TCL_OK;
- }
- if (options.options & OPT_FORMAT) {
- return TCL_ERROR;
- }
- Tcl_ResetResult(interp);
- if (Tcl_ListObjGetElements(interp, options.name,
- &dataHeight, &srcObjv) != TCL_OK) {
+ if (MatchStringFormat(interp, objv[2], options.format, &imageFormat,
+ &imageWidth, &imageHeight, &oldformat) != TCL_OK) {
return TCL_ERROR;
}
- tkwin = Tk_MainWindow(interp);
- block.pixelPtr = NULL;
- dataWidth = 0;
- pixelPtr = NULL;
- for (y = 0; y < dataHeight; ++y) {
- if (Tcl_ListObjGetElements(interp, srcObjv[y],
- &listObjc, &listObjv) != TCL_OK) {
- break;
- }
- if (y == 0) {
- if (listObjc == 0) {
- /*
- * Lines must be non-empty...
- */
-
- break;
- }
- dataWidth = listObjc;
- /*
- * Memory allocation overflow protection.
- * May not be able to trigger/ demo / test this.
- */
-
- if (dataWidth > (int)((UINT_MAX/3) / dataHeight)) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "photo image dimensions exceed Tcl memory limits", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
- "OVERFLOW", NULL);
- break;
- }
-
- pixelPtr = ckalloc(dataWidth * dataHeight * 3);
- block.pixelPtr = pixelPtr;
- } else if (listObjc != dataWidth) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "all elements of color list must have the same"
- " number of elements", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
- "NON_RECTANGULAR", NULL);
- break;
- }
-
- for (x = 0; x < dataWidth; ++x) {
- const char *colorString = Tcl_GetString(listObjv[x]);
- XColor color;
- int tmpr, tmpg, tmpb;
-
- /*
- * We do not use Tk_GetColorFromObj() because we absolutely do
- * not want to invoke the fallback code.
- */
-
- if (colorString[0] == '#') {
- if (isxdigit(UCHAR(colorString[1])) &&
- isxdigit(UCHAR(colorString[2])) &&
- isxdigit(UCHAR(colorString[3]))) {
- if (colorString[4] == '\0') {
- /* Got #rgb */
- sscanf(colorString+1, "%1x%1x%1x",
- &tmpr, &tmpg, &tmpb);
- *pixelPtr++ = tmpr * 0x11;
- *pixelPtr++ = tmpg * 0x11;
- *pixelPtr++ = tmpb * 0x11;
- continue;
- } else if (isxdigit(UCHAR(colorString[4])) &&
- isxdigit(UCHAR(colorString[5])) &&
- isxdigit(UCHAR(colorString[6])) &&
- colorString[7] == '\0') {
- /* Got #rrggbb */
- sscanf(colorString+1, "%2x%2x%2x",
- &tmpr, &tmpg, &tmpb);
- *pixelPtr++ = tmpr;
- *pixelPtr++ = tmpg;
- *pixelPtr++ = tmpb;
- continue;
- }
- }
- }
-
- if (!TkParseColor(Tk_Display(tkwin), Tk_Colormap(tkwin),
- colorString, &color)) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't parse color \"%s\"", colorString));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "COLOR", NULL);
- break;
- }
- *pixelPtr++ = color.red >> 8;
- *pixelPtr++ = color.green >> 8;
- *pixelPtr++ = color.blue >> 8;
- }
- if (x < dataWidth) {
- break;
- }
+ if (!(options.options & OPT_TO) || (options.toX2 < 0)) {
+ options.toX2 = options.toX + imageWidth;
+ options.toY2 = options.toY + imageHeight;
}
- if (y < dataHeight || dataHeight == 0 || dataWidth == 0) {
- if (block.pixelPtr != NULL) {
- ckfree(block.pixelPtr);
- }
- if (y < dataHeight) {
- return TCL_ERROR;
+ if (imageWidth > options.toX2 - options.toX) {
+ imageWidth = options.toX2 - options.toX;
+ }
+ if (imageHeight > options.toY2 - options.toY) {
+ imageHeight = options.toY2 - options.toY;
+ }
+ format = options.format;
+ data = objv[2];
+ if (oldformat) {
+ if (format) {
+ format = (Tcl_Obj *) Tcl_GetString(format);
}
- return TCL_OK;
+ data = (Tcl_Obj *) Tcl_GetString(data);
}
+ if (imageFormat->stringReadProc(interp, data, format,
+ (Tk_PhotoHandle) masterPtr, options.toX, options.toY,
+ options.toX2 - options.toX,
+ options.toY2 - options.toY, 0, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
/*
- * Fill in default values for the -to option, then copy the block in
- * using Tk_PhotoPutBlock.
+ * SB: is the next line really needed? The stringReadProc
+ * writes image data with Tk_PhotoPutBlock(), which in turn
+ * takes care to notify the changed image and to set/unset the
+ * IMAGE_CHANGED bit.
*/
+ masterPtr->flags |= IMAGE_CHANGED;
- if (!(options.options & OPT_TO) || (options.toX2 < 0)) {
- options.toX2 = options.toX + dataWidth;
- options.toY2 = options.toY + dataHeight;
- }
- block.width = dataWidth;
- block.height = dataHeight;
- block.pitch = dataWidth * 3;
- block.pixelSize = 3;
- block.offset[0] = 0;
- block.offset[1] = 1;
- block.offset[2] = 2;
- block.offset[3] = 0;
- result = Tk_PhotoPutBlock(interp, masterPtr, &block,
- options.toX, options.toY, options.toX2 - options.toX,
- options.toY2 - options.toY,
- TK_PHOTO_COMPOSITE_SET);
- ckfree(block.pixelPtr);
- return result;
-
+ return TCL_OK;
+ }
case PHOTO_READ: {
Tcl_Obj *format;
@@ -1183,17 +1090,40 @@ ImgPhotoCmd(
switch ((enum transOptions) index) {
case PHOTO_TRANS_GET: {
- XRectangle testBox;
- TkRegion testRegion;
+ int boolMode;
- if (objc != 5) {
- Tcl_WrongNumArgs(interp, 3, objv, "x y");
+ /*
+ * parse fixed args and option
+ */
+
+ if (objc > 6 || objc < 5) {
+ Tcl_WrongNumArgs(interp, 3, objv, "x y ?-option?");
return TCL_ERROR;
}
if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK)
|| (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
return TCL_ERROR;
}
+
+ index = 4;
+ memset(&options, 0, sizeof(options));
+ if (ParseSubcommandOptions(&options, interp,
+ OPT_ALPHA, &index, objc, objv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (index < objc) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "unknown option \"%s\": must be -alpha",
+ Tcl_GetString(objv[index])));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION",
+ NULL);
+ return TCL_ERROR;
+ }
+ boolMode = 1;
+ if (options.options & OPT_ALPHA) {
+ boolMode = 0;
+ }
+
if ((x < 0) || (x >= masterPtr->width)
|| (y < 0) || (y >= masterPtr->height)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1204,36 +1134,55 @@ ImgPhotoCmd(
return TCL_ERROR;
}
- testBox.x = x;
- testBox.y = y;
- testBox.width = 1;
- testBox.height = 1;
- /* What a way to do a test! */
- testRegion = TkCreateRegion();
- TkUnionRectWithRegion(&testBox, testRegion, testRegion);
- TkIntersectRegion(testRegion, masterPtr->validRegion, testRegion);
- TkClipBox(testRegion, &testBox);
- TkDestroyRegion(testRegion);
-
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- testBox.width==0 && testBox.height==0));
+ /*
+ * Extract and return the desired value
+ */
+ pixelPtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4;
+ if (boolMode) {
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj( ! pixelPtr[3]));
+ } else {
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(pixelPtr[3]));
+ }
return TCL_OK;
}
case PHOTO_TRANS_SET: {
- int transFlag;
+ int newVal, boolMode;
XRectangle setBox;
+ TkRegion modRegion;
- if (objc != 6) {
- Tcl_WrongNumArgs(interp, 3, objv, "x y boolean");
+ /*
+ * Parse args and option, check for valid values
+ */
+
+ if (objc < 6 || objc > 7) {
+ Tcl_WrongNumArgs(interp, 3, objv, "x y newVal ?-option?");
return TCL_ERROR;
}
if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK)
- || (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)
- || (Tcl_GetBooleanFromObj(interp, objv[5],
- &transFlag) != TCL_OK)) {
+ || (Tcl_GetIntFromObj(interp, objv[4], &y) != TCL_OK)) {
return TCL_ERROR;
}
+
+ index = 5;
+ memset(&options, 0, sizeof(options));
+ if (ParseSubcommandOptions(&options, interp,
+ OPT_ALPHA, &index, objc, objv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (index < objc) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "unknown option \"%s\": must be -alpha",
+ Tcl_GetString(objv[index])));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "BAD_OPTION",
+ NULL);
+ return TCL_ERROR;
+ }
+ boolMode = 1;
+ if (options.options & OPT_ALPHA) {
+ boolMode = 0;
+ }
+
if ((x < 0) || (x >= masterPtr->width)
|| (y < 0) || (y >= masterPtr->height)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1244,38 +1193,53 @@ ImgPhotoCmd(
return TCL_ERROR;
}
+ if (boolMode) {
+ if (Tcl_GetBooleanFromObj(interp, objv[5], &newVal) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ if (Tcl_GetIntFromObj(interp, objv[5], &newVal) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (newVal < 0 || newVal > 255) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "invalid alpha value \"%d\": "
+ "must be integer between 0 and 255", newVal));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "BAD_VALUE", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ /*
+ * Set new alpha value for the pixel
+ */
+
+ pixelPtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4;
+ if (boolMode) {
+ pixelPtr[3] = newVal ? 0 : 255;
+ } else {
+ pixelPtr[3] = newVal;
+ }
+
+ /*
+ * Update the validRegion of the image
+ */
+
setBox.x = x;
setBox.y = y;
setBox.width = 1;
setBox.height = 1;
- pixelPtr = masterPtr->pix32 + (y * masterPtr->width + x) * 4;
-
- if (transFlag) {
- /*
- * Make pixel transparent.
- */
-
- TkRegion clearRegion = TkCreateRegion();
-
- TkUnionRectWithRegion(&setBox, clearRegion, clearRegion);
- TkSubtractRegion(masterPtr->validRegion, clearRegion,
+ modRegion = TkCreateRegion();
+ TkUnionRectWithRegion(&setBox, modRegion, modRegion);
+ if (pixelPtr[3]) {
+ TkUnionRectWithRegion(&setBox, masterPtr->validRegion,
masterPtr->validRegion);
- TkDestroyRegion(clearRegion);
-
- /*
- * Set the alpha value correctly.
- */
-
- pixelPtr[3] = 0;
} else {
- /*
- * Make pixel opaque.
- */
-
- TkUnionRectWithRegion(&setBox, masterPtr->validRegion,
+ TkSubtractRegion(masterPtr->validRegion, modRegion,
masterPtr->validRegion);
- pixelPtr[3] = 255;
}
+ TkDestroyRegion(modRegion);
/*
* Inform the generic image code that the image
@@ -1477,13 +1441,18 @@ GetExtension(
*
* This function is invoked to process one of the options which may be
* specified for the photo image subcommands, namely, -from, -to, -zoom,
- * -subsample, -format, -shrink, and -compositingrule.
+ * -subsample, -format, -shrink, -compositingrule, -alpha, -boolean and
+ * -withalpha.
+ * Parsing starts at the index in *optIndexPtr and stops at the end of
+ * objv[] or at the first value that does not belong to an option.
*
* Results:
* A standard Tcl result.
*
* Side effects:
- * Fields in *optPtr get filled in.
+ * Fields in *optPtr get filled in. The value of optIndexPtr is updated
+ * to contain the index of the first element in argv[] that was not
+ * parsed, or argc if the end of objv[] was reached.
*
*----------------------------------------------------------------------
*/
@@ -1507,7 +1476,7 @@ ParseSubcommandOptions(
* TK_PHOTO_COMPOSITE_* constants. */
NULL
};
- size_t length;
+ TkSizeT length;
int index, c, bit, currentBit;
int values[4], numValues, maxValues, argIndex;
const char *option, *expandedOption, *needed;
@@ -1520,8 +1489,7 @@ ParseSubcommandOptions(
* optPtr->name.
*/
- expandedOption = option = Tcl_GetString(objv[index]);
- length = objv[index]->length;
+ expandedOption = option = TkGetStringFromObj(objv[index], &length);
if (option[0] != '-') {
if (optPtr->name == NULL) {
optPtr->name = objv[index];
@@ -1608,7 +1576,8 @@ ParseSubcommandOptions(
return TCL_ERROR;
}
*optIndexPtr = index;
- } else if ((bit != OPT_SHRINK) && (bit != OPT_GRAYSCALE)) {
+ } else if (bit == OPT_TO || bit == OPT_FROM
+ || bit == OPT_SUBSAMPLE || bit == OPT_ZOOM) {
const char *val;
maxValues = ((bit == OPT_FROM) || (bit == OPT_TO)) ? 4 : 2;
@@ -1789,7 +1758,7 @@ ImgPhotoConfigureMaster(
const char *oldFileString, *oldPaletteString;
Tcl_Obj *oldData, *data = NULL, *oldFormat, *format = NULL;
Tcl_Obj *tempdata, *tempformat;
- size_t length;
+ TkSizeT length;
int i, j, result, imageWidth, imageHeight, oldformat;
double oldGamma;
Tcl_Channel chan;
@@ -1798,8 +1767,7 @@ ImgPhotoConfigureMaster(
args = ckalloc((objc + 1) * sizeof(char *));
for (i = 0, j = 0; i < objc; i++,j++) {
- args[j] = Tcl_GetString(objv[i]);
- length = objv[i]->length;
+ args[j] = TkGetStringFromObj(objv[i], &length);
if ((length > 1) && (args[j][0] == '-')) {
if ((args[j][1] == 'd') &&
!strncmp(args[j], "-data", length)) {
@@ -1878,9 +1846,9 @@ ImgPhotoConfigureMaster(
* Force into ByteArray format, which most (all) image handlers will
* use anyway. Empty length means ignore the -data option.
*/
- int bytesize;
+ TkSizeT bytesize;
- (void) Tcl_GetByteArrayFromObj(data, &bytesize);
+ (void) TkGetByteArrayFromObj(data, &bytesize);
if (bytesize) {
Tcl_IncrRefCount(data);
} else {
@@ -2564,7 +2532,7 @@ MatchStringFormat(
int *oldformat) /* Returns 1 if the old image API is used. */
{
int matched = 0, useoldformat = 0;
- Tk_PhotoImageFormat *formatPtr;
+ Tk_PhotoImageFormat *formatPtr, *defaultFormatPtr = NULL;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
const char *formatString = NULL;
@@ -2580,6 +2548,16 @@ MatchStringFormat(
for (formatPtr = tsdPtr->formatList; formatPtr != NULL;
formatPtr = formatPtr->nextPtr) {
+ /*
+ * To keep the behaviour of older versions (Tk <= 8.6), the default
+ * list-of-lists string format is checked last. Remember its position.
+ */
+
+ if (strncasecmp("default", formatPtr->name, strlen(formatPtr->name))
+ == 0) {
+ defaultFormatPtr = formatPtr;
+ }
+
if (formatObj != NULL) {
if (strncasecmp(formatString,
formatPtr->name, strlen(formatPtr->name)) != 0) {
@@ -2595,6 +2573,16 @@ MatchStringFormat(
return TCL_ERROR;
}
}
+
+ /*
+ * If this is the default format, and it was not passed as -format
+ * option, skip the stringMatchProc test. It'll be done later
+ */
+
+ if (formatObj == NULL && formatPtr == defaultFormatPtr) {
+ continue;
+ }
+
if ((formatPtr->stringMatchProc != NULL)
&& (formatPtr->stringReadProc != NULL)
&& formatPtr->stringMatchProc(data, formatObj,
@@ -2632,23 +2620,55 @@ MatchStringFormat(
}
}
}
+
if (formatPtr == NULL) {
- if ((formatObj != NULL) && !matched) {
+ /*
+ * Try the default format as last resort (only if no -format option
+ * was passed).
+ */
+
+ if ( formatObj == NULL && defaultFormatPtr == NULL) {
+ Tcl_Panic("default image format handler not registered");
+ }
+ if ( formatObj == NULL
+ && defaultFormatPtr->stringMatchProc != NULL
+ && defaultFormatPtr->stringReadProc != NULL
+ && defaultFormatPtr->stringMatchProc(data, formatObj,
+ widthPtr, heightPtr, interp) != 0) {
+ useoldformat = 0;
+ formatPtr = defaultFormatPtr;
+ } else if ((formatObj != NULL) && !matched) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"image format \"%s\" is not supported", formatString));
Tcl_SetErrorCode(interp, "TK", "LOOKUP", "PHOTO_FORMAT",
formatString, NULL);
+ return TCL_ERROR;
} else {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "couldn't recognize image data", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
- "UNRECOGNIZED_DATA", NULL);
+
+ /*
+ * Some lower level routine (stringMatchProc) may have already set
+ * a specific error message, so just return this. Otherwise return
+ * a generic image data error.
+ */
+
+ if (Tcl_GetString(Tcl_GetObjResult(interp))[0] == '\0') {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "couldn't recognize image data", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO",
+ "UNRECOGNIZED_DATA", NULL);
+ }
+ return TCL_ERROR;
}
- return TCL_ERROR;
}
*imageFormatPtr = formatPtr;
*oldformat = useoldformat;
+
+ /*
+ * Some stringMatchProc might have left error messages and error codes in
+ * interp. Clear them before return.
+ */
+ Tcl_ResetResult(interp);
return TCL_OK;
}
@@ -3940,57 +3960,6 @@ ImgGetPhoto(
/*
*----------------------------------------------------------------------
*
- * ImgStringWrite --
- *
- * Default string write function. The data is formatted in the default
- * format as accepted by the "<img> put" command.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * See the user documentation.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-ImgStringWrite(
- Tcl_Interp *interp,
- Tcl_Obj *formatString,
- Tk_PhotoImageBlock *blockPtr)
-{
- int greenOffset, blueOffset;
- Tcl_Obj *data;
-
- greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
- blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
-
- data = Tcl_NewObj();
- if ((blockPtr->width > 0) && (blockPtr->height > 0)) {
- int row, col;
-
- for (row=0; row<blockPtr->height; row++) {
- Tcl_Obj *line = Tcl_NewObj();
- unsigned char *pixelPtr = blockPtr->pixelPtr + blockPtr->offset[0]
- + row * blockPtr->pitch;
-
- for (col=0; col<blockPtr->width; col++) {
- Tcl_AppendPrintfToObj(line, "%s#%02x%02x%02x",
- col ? " " : "", *pixelPtr,
- pixelPtr[greenOffset], pixelPtr[blueOffset]);
- pixelPtr += blockPtr->pixelSize;
- }
- Tcl_ListObjAppendElement(NULL, data, line);
- }
- }
- Tcl_SetObjResult(interp, data);
- return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* Tk_PhotoGetImage --
*
* This function is called to obtain image data from a photo image. This
@@ -4033,7 +4002,7 @@ Tk_PhotoGetImage(
/*
*--------------------------------------------------------------
*
- * TkPostscriptPhoto --
+ * ImgPostscriptPhoto --
*
* This function is called to output the contents of a photo image in
* Postscript by calling the Tk_PostscriptPhoto function.
@@ -4078,7 +4047,7 @@ ImgPhotoPostscript(
*
*----------------------------------------------------------------------
*/
-
+#if !defined(TK_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9
void
Tk_PhotoPutBlock_NoComposite(
Tk_PhotoHandle handle,
@@ -4164,11 +4133,13 @@ Tk_PhotoSetSize_Panic(
Tcl_Panic(TK_PHOTO_ALLOC_FAILURE_MESSAGE);
}
}
+#endif /* TK_NO_DEPRECATED */
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
* fill-column: 78
+ * tab-width: 8
* End:
*/
diff --git a/generic/tkImgPhoto.h b/generic/tkImgPhoto.h
index 36bc6cb..a84ebb3 100644
--- a/generic/tkImgPhoto.h
+++ b/generic/tkImgPhoto.h
@@ -93,10 +93,17 @@ struct ColorTableId {
struct ColorTable {
ColorTableId id; /* Information used in selecting this color
* table. */
+#if TCL_MAJOR_VERSION > 8
+ size_t refCount; /* Number of instances using this map. */
+ size_t liveRefCount; /* Number of instances which are actually in
+ * use, using this map. */
+ int flags; /* See below. */
+#else
int flags; /* See below. */
- int refCount; /* Number of instances using this map. */
- int liveRefCount; /* Number of instances which are actually in
+ unsigned int refCount; /* Number of instances using this map. */
+ unsigned int liveRefCount; /* Number of instances which are actually in
* use, using this map. */
+#endif
int numColors; /* Number of colors allocated for this map. */
XVisualInfo visualInfo; /* Information about the visual for windows
@@ -201,7 +208,11 @@ struct PhotoInstance {
* this particular colormap. */
PhotoInstance *nextPtr; /* Pointer to the next instance in the list of
* instances associated with this master. */
- int refCount; /* Number of instances using this structure. */
+#if TCL_MAJOR_VERSION > 8
+ size_t refCount; /* Number of instances using this structure. */
+#else
+ unsigned int refCount; /* Number of instances using this structure. */
+#endif
Tk_Uid palette; /* Palette for these particular instances. */
double gamma; /* Gamma value for these instances. */
Tk_Uid defaultPalette; /* Default palette to use if a palette is not
diff --git a/generic/tkImgSVGnano.c b/generic/tkImgSVGnano.c
new file mode 100644
index 0000000..d51c211
--- /dev/null
+++ b/generic/tkImgSVGnano.c
@@ -0,0 +1,805 @@
+/*
+ * tkImgSVGnano.c
+ *
+ * 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 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.
+ *
+ * This handler is build using the original nanosvg library files from
+ * https://github.com/memononen/nanosvg and the tcl extension files from
+ * https://github.com/auriocus/tksvg
+ *
+ */
+
+#include "tkInt.h"
+#define NANOSVG_malloc ckalloc
+#define NANOSVG_realloc ckrealloc
+#define NANOSVG_free ckfree
+#define NANOSVG_SCOPE MODULE_SCOPE
+#define NANOSVG_ALL_COLOR_KEYWORDS
+#define NANOSVG_IMPLEMENTATION
+#include "nanosvg.h"
+#define NANOSVGRAST_IMPLEMENTATION
+#include "nanosvgrast.h"
+
+/* Additional parameters to nsvgRasterize() */
+
+typedef struct {
+ double scale;
+ int scaleToHeight;
+ int scaleToWidth;
+} RastOpts;
+
+/*
+ * Per interp cache of last NSVGimage which was matched to
+ * be immediately rasterized after the match. This helps to
+ * eliminate double parsing of the SVG file/string.
+ */
+
+typedef struct {
+ /* A poiner to remember if it is the same svn image (data)
+ * It is a Tcl_Channel if image created by -file option
+ * or a Tcl_Obj, if image is created with the -data option
+ */
+ ClientData dataOrChan;
+ Tcl_DString formatString;
+ NSVGimage *nsvgImage;
+ RastOpts ropts;
+} NSVGcache;
+
+static int FileMatchSVG(Tcl_Channel chan, const char *fileName,
+ Tcl_Obj *format, int *widthPtr, int *heightPtr,
+ Tcl_Interp *interp);
+static int FileReadSVG(Tcl_Interp *interp, Tcl_Channel chan,
+ const char *fileName, Tcl_Obj *format,
+ Tk_PhotoHandle imageHandle, int destX, int destY,
+ int width, int height, int srcX, int srcY);
+static int StringMatchSVG(Tcl_Obj *dataObj, Tcl_Obj *format,
+ int *widthPtr, int *heightPtr, Tcl_Interp *interp);
+static int StringReadSVG(Tcl_Interp *interp, Tcl_Obj *dataObj,
+ Tcl_Obj *format, Tk_PhotoHandle imageHandle,
+ int destX, int destY, int width, int height,
+ int srcX, int srcY);
+static NSVGimage * ParseSVGWithOptions(Tcl_Interp *interp,
+ const char *input, TkSizeT length, Tcl_Obj *format,
+ RastOpts *ropts);
+static int RasterizeSVG(Tcl_Interp *interp,
+ Tk_PhotoHandle imageHandle, NSVGimage *nsvgImage,
+ int destX, int destY, int width, int height,
+ int srcX, int srcY, RastOpts *ropts);
+static double GetScaleFromParameters(NSVGimage *nsvgImage,
+ RastOpts *ropts, int *widthPtr, int *heightPtr);
+static NSVGcache * GetCachePtr(Tcl_Interp *interp);
+static int CacheSVG(Tcl_Interp *interp, ClientData dataOrChan,
+ Tcl_Obj *formatObj, NSVGimage *nsvgImage,
+ RastOpts *ropts);
+static NSVGimage * GetCachedSVG(Tcl_Interp *interp, ClientData dataOrChan,
+ Tcl_Obj *formatObj, RastOpts *ropts);
+static void CleanCache(Tcl_Interp *interp);
+static void FreeCache(ClientData clientData, Tcl_Interp *interp);
+
+/*
+ * The format record for the SVG nano file format:
+ */
+
+Tk_PhotoImageFormat tkImgFmtSVGnano = {
+ "svg", /* name */
+ FileMatchSVG, /* fileMatchProc */
+ StringMatchSVG, /* stringMatchProc */
+ FileReadSVG, /* fileReadProc */
+ StringReadSVG, /* stringReadProc */
+ NULL, /* fileWriteProc */
+ NULL, /* stringWriteProc */
+ NULL
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileMatchSVG --
+ *
+ * This function is invoked by the photo image type to see if a file
+ * contains image data in SVG format.
+ *
+ * Results:
+ * The return value is >0 if the file can be successfully parsed,
+ * and 0 otherwise.
+ *
+ * Side effects:
+ * The file is saved in the internal cache for further use.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileMatchSVG(
+ Tcl_Channel chan,
+ const char *fileName,
+ Tcl_Obj *formatObj,
+ int *widthPtr, int *heightPtr,
+ Tcl_Interp *interp)
+{
+ TkSizeT length;
+ Tcl_Obj *dataObj = Tcl_NewObj();
+ const char *data;
+ RastOpts ropts;
+ NSVGimage *nsvgImage;
+
+ CleanCache(interp);
+ if (Tcl_ReadChars(chan, dataObj, -1, 0) == TCL_IO_FAILURE) {
+ /* in case of an error reading the file */
+ Tcl_DecrRefCount(dataObj);
+ return 0;
+ }
+ data = TkGetStringFromObj(dataObj, &length);
+ nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj, &ropts);
+ Tcl_DecrRefCount(dataObj);
+ if (nsvgImage != NULL) {
+ GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr);
+ if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) {
+ nsvgDelete(nsvgImage);
+ return 0;
+ }
+ if (!CacheSVG(interp, chan, formatObj, nsvgImage, &ropts)) {
+ nsvgDelete(nsvgImage);
+ }
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileReadSVG --
+ *
+ * This function is called by the photo image type to read SVG format
+ * data from a file and write it into a given photo image.
+ *
+ * Results:
+ * A standard TCL completion code. If TCL_ERROR is returned then an error
+ * message is left in the interp's result.
+ *
+ * Side effects:
+ * The access position in file f is changed, and new data is added to the
+ * image given by imageHandle.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileReadSVG(
+ Tcl_Interp *interp,
+ Tcl_Channel chan,
+ const char *fileName,
+ Tcl_Obj *formatObj,
+ Tk_PhotoHandle imageHandle,
+ int destX, int destY,
+ int width, int height,
+ int srcX, int srcY)
+{
+ TkSizeT length;
+ const char *data;
+ RastOpts ropts;
+ NSVGimage *nsvgImage = GetCachedSVG(interp, chan, formatObj, &ropts);
+
+ if (nsvgImage == NULL) {
+ Tcl_Obj *dataObj = Tcl_NewObj();
+
+ if (Tcl_ReadChars(chan, dataObj, -1, 0) == TCL_IO_FAILURE) {
+ /* in case of an error reading the file */
+ Tcl_DecrRefCount(dataObj);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("read error", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "READ_ERROR", NULL);
+ return TCL_ERROR;
+ }
+ data = TkGetStringFromObj(dataObj, &length);
+ nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj,
+ &ropts);
+ Tcl_DecrRefCount(dataObj);
+ if (nsvgImage == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ return RasterizeSVG(interp, imageHandle, nsvgImage, destX, destY,
+ width, height, srcX, srcY, &ropts);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StringMatchSVG --
+ *
+ * This function is invoked by the photo image type to see if a string
+ * contains image data in SVG format.
+ *
+ * Results:
+ * The return value is >0 if the file can be successfully parsed,
+ * and 0 otherwise.
+ *
+ * Side effects:
+ * The file is saved in the internal cache for further use.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StringMatchSVG(
+ Tcl_Obj *dataObj,
+ Tcl_Obj *formatObj,
+ int *widthPtr, int *heightPtr,
+ Tcl_Interp *interp)
+{
+ TkSizeT length;
+ const char *data;
+ RastOpts ropts;
+ NSVGimage *nsvgImage;
+
+ CleanCache(interp);
+ data = TkGetStringFromObj(dataObj, &length);
+ nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj, &ropts);
+ if (nsvgImage != NULL) {
+ GetScaleFromParameters(nsvgImage, &ropts, widthPtr, heightPtr);
+ if ((*widthPtr <= 0.0) || (*heightPtr <= 0.0)) {
+ nsvgDelete(nsvgImage);
+ return 0;
+ }
+ if (!CacheSVG(interp, dataObj, formatObj, nsvgImage, &ropts)) {
+ nsvgDelete(nsvgImage);
+ }
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StringReadSVG --
+ *
+ * This function is called by the photo image type to read SVG format
+ * data from a string and write it into a given photo image.
+ *
+ * Results:
+ * A standard TCL completion code. If TCL_ERROR is returned then an error
+ * message is left in the interp's result.
+ *
+ * Side effects:
+ * New data is added to the image given by imageHandle.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StringReadSVG(
+ Tcl_Interp *interp,
+ Tcl_Obj *dataObj,
+ Tcl_Obj *formatObj,
+ Tk_PhotoHandle imageHandle,
+ int destX, int destY,
+ int width, int height,
+ int srcX, int srcY)
+{
+ TkSizeT length;
+ const char *data;
+ RastOpts ropts;
+ NSVGimage *nsvgImage = GetCachedSVG(interp, dataObj, formatObj, &ropts);
+
+ if (nsvgImage == NULL) {
+ data = TkGetStringFromObj(dataObj, &length);
+ nsvgImage = ParseSVGWithOptions(interp, data, length, formatObj,
+ &ropts);
+ }
+ if (nsvgImage == NULL) {
+ return TCL_ERROR;
+ }
+ return RasterizeSVG(interp, imageHandle, nsvgImage, destX, destY,
+ width, height, srcX, srcY, &ropts);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ParseSVGWithOptions --
+ *
+ * This function is called to parse the given input string as SVG.
+ *
+ * Results:
+ * Return a newly create NSVGimage on success, and NULL otherwise.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+
+static NSVGimage *
+ParseSVGWithOptions(
+ Tcl_Interp *interp,
+ const char *input,
+ TkSizeT length,
+ Tcl_Obj *formatObj,
+ RastOpts *ropts)
+{
+ Tcl_Obj **objv = NULL;
+ int objc = 0;
+ double dpi = 96.0;
+ char *inputCopy = NULL;
+ NSVGimage *nsvgImage;
+ int parameterScaleSeen = 0;
+ static const char *const fmtOptions[] = {
+ "-dpi", "-scale", "-scaletoheight", "-scaletowidth", NULL
+ };
+ enum fmtOptions {
+ OPT_DPI, OPT_SCALE, OPT_SCALE_TO_HEIGHT, OPT_SCALE_TO_WIDTH
+ };
+
+ /*
+ * The parser destroys the original input string,
+ * therefore first duplicate.
+ */
+
+ inputCopy = attemptckalloc(length+1);
+ if (inputCopy == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot alloc data buffer", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "OUT_OF_MEMORY", NULL);
+ goto error;
+ }
+ memcpy(inputCopy, input, length);
+ inputCopy[length] = '\0';
+
+ /*
+ * Process elements of format specification as a list.
+ */
+
+ ropts->scale = 1.0;
+ ropts->scaleToHeight = 0;
+ ropts->scaleToWidth = 0;
+ if ((formatObj != NULL) &&
+ Tcl_ListObjGetElements(interp, formatObj, &objc, &objv) != TCL_OK) {
+ goto error;
+ }
+ for (; objc > 0 ; objc--, objv++) {
+ int optIndex;
+
+ /*
+ * Ignore the "svg" part of the format specification.
+ */
+
+ if (!strcasecmp(Tcl_GetString(objv[0]), "svg")) {
+ continue;
+ }
+
+ if (Tcl_GetIndexFromObjStruct(interp, objv[0], fmtOptions,
+ sizeof(char *), "option", 0, &optIndex) == TCL_ERROR) {
+ goto error;
+ }
+
+ if (objc < 2) {
+ ckfree(inputCopy);
+ inputCopy = NULL;
+ Tcl_WrongNumArgs(interp, 1, objv, "value");
+ goto error;
+ }
+
+ objc--;
+ objv++;
+
+ /*
+ * check that only one scale option is given
+ */
+ switch ((enum fmtOptions) optIndex) {
+ case OPT_SCALE:
+ case OPT_SCALE_TO_HEIGHT:
+ case OPT_SCALE_TO_WIDTH:
+ if ( parameterScaleSeen ) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "only one of -scale, -scaletoheight, -scaletowidth may be given", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "BAD_SCALE",
+ NULL);
+ goto error;
+ }
+ parameterScaleSeen = 1;
+ break;
+ default:
+ break;
+ }
+
+ /*
+ * Decode parameters
+ */
+ switch ((enum fmtOptions) optIndex) {
+ case OPT_DPI:
+ if (Tcl_GetDoubleFromObj(interp, objv[0], &dpi) == TCL_ERROR) {
+ goto error;
+ }
+ if (dpi < 0.0) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "-dpi value must be positive", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "BAD_DPI",
+ NULL);
+ goto error;
+ }
+ break;
+ case OPT_SCALE:
+ if (Tcl_GetDoubleFromObj(interp, objv[0], &ropts->scale) ==
+ TCL_ERROR) {
+ goto error;
+ }
+ if (ropts->scale <= 0.0) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "-scale value must be positive", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "BAD_SCALE",
+ NULL);
+ goto error;
+ }
+ break;
+ case OPT_SCALE_TO_HEIGHT:
+ if (Tcl_GetIntFromObj(interp, objv[0], &ropts->scaleToHeight) ==
+ TCL_ERROR) {
+ goto error;
+ }
+ if (ropts->scaleToHeight <= 0) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "-scaletoheight value must be positive", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "BAD_SCALE",
+ NULL);
+ goto error;
+ }
+ break;
+ case OPT_SCALE_TO_WIDTH:
+ if (Tcl_GetIntFromObj(interp, objv[0], &ropts->scaleToWidth) ==
+ TCL_ERROR) {
+ goto error;
+ }
+ if (ropts->scaleToWidth <= 0) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "-scaletowidth value must be positive", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "BAD_SCALE",
+ NULL);
+ goto error;
+ }
+ break;
+ }
+ }
+
+ nsvgImage = nsvgParse(inputCopy, "px", (float) dpi);
+ if (nsvgImage == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot parse SVG image", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "PARSE_ERROR", NULL);
+ goto error;
+ }
+ ckfree(inputCopy);
+ return nsvgImage;
+
+error:
+ if (inputCopy != NULL) {
+ ckfree(inputCopy);
+ }
+ return NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * RasterizeSVG --
+ *
+ * This function is called to rasterize the given nsvgImage and
+ * fill the imageHandle with data.
+ *
+ * Results:
+ * A standard TCL completion code. If TCL_ERROR is returned then an error
+ * message is left in the interp's result.
+ *
+ *
+ * Side effects:
+ * On error the given nsvgImage will be deleted.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+RasterizeSVG(
+ Tcl_Interp *interp,
+ Tk_PhotoHandle imageHandle,
+ NSVGimage *nsvgImage,
+ int destX, int destY,
+ int width, int height,
+ int srcX, int srcY,
+ RastOpts *ropts)
+{
+ int w, h, c;
+ NSVGrasterizer *rast;
+ unsigned char *imgData;
+ Tk_PhotoImageBlock svgblock;
+ double scale;
+
+ scale = GetScaleFromParameters(nsvgImage, ropts, &w, &h);
+
+ rast = nsvgCreateRasterizer();
+ if (rast == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot initialize rasterizer", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "RASTERIZER_ERROR",
+ NULL);
+ goto cleanAST;
+ }
+ imgData = attemptckalloc(w * h *4);
+ if (imgData == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("cannot alloc image buffer", -1));
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "SVG", "OUT_OF_MEMORY", NULL);
+ goto cleanRAST;
+ }
+ nsvgRasterize(rast, nsvgImage, 0, 0,
+ (float) scale, imgData, w, h, w * 4);
+ /* transfer the data to a photo block */
+ svgblock.pixelPtr = imgData;
+ svgblock.width = w;
+ svgblock.height = h;
+ svgblock.pitch = w * 4;
+ svgblock.pixelSize = 4;
+ for (c = 0; c <= 3; c++) {
+ svgblock.offset[c] = c;
+ }
+ if (Tk_PhotoExpand(interp, imageHandle,
+ destX + width, destY + height) != TCL_OK) {
+ goto cleanRAST;
+ }
+ if (Tk_PhotoPutBlock(interp, imageHandle, &svgblock, destX, destY,
+ width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) {
+ goto cleanimg;
+ }
+ ckfree(imgData);
+ nsvgDeleteRasterizer(rast);
+ nsvgDelete(nsvgImage);
+ return TCL_OK;
+
+cleanimg:
+ ckfree(imgData);
+
+cleanRAST:
+ nsvgDeleteRasterizer(rast);
+
+cleanAST:
+ nsvgDelete(nsvgImage);
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetScaleFromParameters --
+ *
+ * Get the scale value from the already parsed parameters -scale,
+ * -scaletoheight and -scaletowidth.
+ *
+ * The image width and height is also returned.
+ *
+ * Results:
+ * The evaluated or configured scale value, or 0.0 on failure
+ *
+ * Side effects:
+ * heightPtr and widthPtr are set to height and width of the image.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static double
+GetScaleFromParameters(
+ NSVGimage *nsvgImage,
+ RastOpts *ropts,
+ int *widthPtr,
+ int *heightPtr)
+{
+ double scale;
+ int width, height;
+
+ if ((nsvgImage->width == 0.0) || (nsvgImage->height == 0.0)) {
+ width = height = 0;
+ scale = 1.0;
+ } else if (ropts->scaleToHeight > 0) {
+ /*
+ * Fixed height
+ */
+ height = ropts->scaleToHeight;
+ scale = height / nsvgImage->height;
+ width = (int) ceil(nsvgImage->width * scale);
+ } else if (ropts->scaleToWidth > 0) {
+ /*
+ * Fixed width
+ */
+ width = ropts->scaleToWidth;
+ scale = width / nsvgImage->width;
+ height = (int) ceil(nsvgImage->height * scale);
+ } else {
+ /*
+ * Scale factor
+ */
+ scale = ropts->scale;
+ width = (int) ceil(nsvgImage->width * scale);
+ height = (int) ceil(nsvgImage->height * scale);
+ }
+
+ *heightPtr = height;
+ *widthPtr = width;
+ return scale;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetCachePtr --
+ *
+ * This function is called to get the per interpreter used
+ * svg image cache.
+ *
+ * Results:
+ * Return a pointer to the used cache.
+ *
+ * Side effects:
+ * Initialize the cache on the first call.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static NSVGcache *
+GetCachePtr(
+ Tcl_Interp *interp
+) {
+ NSVGcache *cachePtr = Tcl_GetAssocData(interp, "tksvgnano", NULL);
+ if (cachePtr == NULL) {
+ cachePtr = ckalloc(sizeof(NSVGcache));
+ cachePtr->dataOrChan = NULL;
+ Tcl_DStringInit(&cachePtr->formatString);
+ cachePtr->nsvgImage = NULL;
+ Tcl_SetAssocData(interp, "tksvgnano", FreeCache, cachePtr);
+ }
+ return cachePtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CacheSVG --
+ *
+ * Add the given svg image informations to the cache for further usage.
+ *
+ * Results:
+ * Return 1 on success, and 0 otherwise.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+CacheSVG(
+ Tcl_Interp *interp,
+ ClientData dataOrChan,
+ Tcl_Obj *formatObj,
+ NSVGimage *nsvgImage,
+ RastOpts *ropts)
+{
+ TkSizeT length;
+ const char *data;
+ NSVGcache *cachePtr = GetCachePtr(interp);
+
+ if (cachePtr != NULL) {
+ cachePtr->dataOrChan = dataOrChan;
+ if (formatObj != NULL) {
+ data = TkGetStringFromObj(formatObj, &length);
+ Tcl_DStringAppend(&cachePtr->formatString, data, length);
+ }
+ cachePtr->nsvgImage = nsvgImage;
+ cachePtr->ropts = *ropts;
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetCachedSVG --
+ *
+ * Try to get the NSVGimage from the internal cache.
+ *
+ * Results:
+ * Return the found NSVGimage on success, and NULL otherwise.
+ *
+ * Side effects:
+ * Calls the CleanCache() function.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static NSVGimage *
+GetCachedSVG(
+ Tcl_Interp *interp,
+ ClientData dataOrChan,
+ Tcl_Obj *formatObj,
+ RastOpts *ropts)
+{
+ TkSizeT length;
+ const char *data;
+ NSVGcache *cachePtr = GetCachePtr(interp);
+ NSVGimage *nsvgImage = NULL;
+
+ if ((cachePtr != NULL) && (cachePtr->nsvgImage != NULL) &&
+ (cachePtr->dataOrChan == dataOrChan)) {
+ if (formatObj != NULL) {
+ data = TkGetStringFromObj(formatObj, &length);
+ if (strcmp(data, Tcl_DStringValue(&cachePtr->formatString)) == 0) {
+ nsvgImage = cachePtr->nsvgImage;
+ *ropts = cachePtr->ropts;
+ cachePtr->nsvgImage = NULL;
+ }
+ } else if (Tcl_DStringLength(&cachePtr->formatString) == 0) {
+ nsvgImage = cachePtr->nsvgImage;
+ *ropts = cachePtr->ropts;
+ cachePtr->nsvgImage = NULL;
+ }
+ }
+ CleanCache(interp);
+ return nsvgImage;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CleanCache --
+ *
+ * Reset the cache and delete the saved image in it.
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+CleanCache(Tcl_Interp *interp)
+{
+ NSVGcache *cachePtr = GetCachePtr(interp);
+
+ if (cachePtr != NULL) {
+ cachePtr->dataOrChan = NULL;
+ Tcl_DStringSetLength(&cachePtr->formatString, 0);
+ if (cachePtr->nsvgImage != NULL) {
+ nsvgDelete(cachePtr->nsvgImage);
+ cachePtr->nsvgImage = NULL;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FreeCache --
+ *
+ * This function is called to clean up the internal cache data.
+ *
+ * Results:
+ *
+ * Side effects:
+ * Existing image data in the cache and the cache will be deleted.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FreeCache(ClientData clientData, Tcl_Interp *interp)
+{
+ NSVGcache *cachePtr = clientData;
+
+ Tcl_DStringFree(&cachePtr->formatString);
+ if (cachePtr->nsvgImage != NULL) {
+ nsvgDelete(cachePtr->nsvgImage);
+ }
+ ckfree(cachePtr);
+}
+
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 4c8ce38..13928ca 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -99,7 +99,7 @@ declare 21 {
const TkStateMap *mapPtr, const char *strKey)
}
declare 22 {
- CONST86 char *TkFindStateString(const TkStateMap *mapPtr, int numKey)
+ const char *TkFindStateString(const TkStateMap *mapPtr, int numKey)
}
declare 23 {
void TkFocusDeadWindow(TkWindow *winPtr)
@@ -182,7 +182,7 @@ declare 45 {
void TkInstallFrameMenu(Tk_Window tkwin)
}
declare 46 {
- CONST86 char *TkKeysymToString(KeySym keysym)
+ const char *TkKeysymToString(KeySym keysym)
}
declare 47 {
int TkLineToArea(double end1Ptr[], double end2Ptr[], double rectPtr[])
@@ -288,7 +288,7 @@ declare 78 {
}
declare 79 {
int TkScrollWindow(Tk_Window tkwin, GC gc, int x, int y,
- int width, int height, int dx, int dy, TkRegion damageRgn)
+ int width, int height, int dx, int dy, Region damageRgn)
}
declare 80 {
void TkSelDeadWindow(TkWindow *winPtr)
@@ -389,7 +389,7 @@ declare 108 {
Tcl_Obj *objPtr, Tk_Window *windowPtr)
}
declare 109 {
- CONST86 char *TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr)
+ const char *TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr)
}
declare 110 {
void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont)
@@ -402,27 +402,27 @@ declare 112 {
void TkpMenuThreadInit(void)
}
declare 113 {
- int TkClipBox(TkRegion rgn, XRectangle *rect_return)
+ int XClipBox(Region rgn, XRectangle *rect_return)
}
declare 114 {
- TkRegion TkCreateRegion(void)
+ Region XCreateRegion(void)
}
declare 115 {
- int TkDestroyRegion(TkRegion rgn)
+ int XDestroyRegion(Region rgn)
}
declare 116 {
- int TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
+ int XIntersectRegion(Region sra, Region srcb, Region dr_return)
}
declare 117 {
- int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width,
+ int XRectInRegion(Region rgn, int x, int y, unsigned int width,
unsigned int height)
}
declare 118 {
- int TkSetRegion(Display *display, GC gc, TkRegion rgn)
+ int XSetRegion(Display *display, GC gc, Region rgn)
}
declare 119 {
- int TkUnionRectWithRegion(XRectangle *rect,
- TkRegion src, TkRegion dr_return)
+ int XUnionRectWithRegion(XRectangle *rect,
+ Region src, Region dr_return)
}
declare 121 aqua {
Pixmap TkpCreateNativeBitmap(Display *display, const void *source)
@@ -452,7 +452,7 @@ declare 139 {
void TkpInitKeymapInfo(TkDisplay *dispPtr)
}
declare 140 {
- TkRegion TkPhotoGetValidRegion(Tk_PhotoHandle handle)
+ Region TkPhotoGetValidRegion(Tk_PhotoHandle handle)
}
declare 141 {
TkWindow **TkWmStackorderToplevel(TkWindow *parentPtr)
@@ -467,7 +467,7 @@ declare 144 {
void TkGCCleanup(TkDisplay *dispPtr)
}
declare 145 {
- int TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
+ int XSubtractRegion(Region sra, Region srcb, Region dr_return)
}
declare 146 {
void TkStylePkgInit(TkMainInfo *mainPtr)
@@ -570,7 +570,7 @@ declare 169 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 170 {
- CONST86 char *TkStatePrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkStatePrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 171 {
@@ -578,7 +578,7 @@ declare 171 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 172 {
- CONST86 char *TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 173 {
@@ -586,7 +586,7 @@ declare 173 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 174 {
- CONST86 char *TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 175 {
@@ -594,7 +594,7 @@ declare 175 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 176 {
- CONST86 char *TkPixelPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkPixelPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 177 {
@@ -602,7 +602,7 @@ declare 177 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 178 {
- CONST86 char *TkOrientPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkOrientPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
declare 179 {
@@ -610,7 +610,7 @@ declare 179 {
Tk_Window tkwin, const char *value, char *widgRec, int offset)
}
declare 180 {
- CONST86 char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin,
+ const char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin,
char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)
}
@@ -634,6 +634,13 @@ declare 184 {
Tk_Font tkfont, const char *source, int numBytes, double x,
double y, double angle)
}
+
+# Debugging / testing functions for photo images
+declare 185 {
+ int TkDebugPhotoStringMatchDef(Tcl_Interp *inter, Tcl_Obj *data,
+ Tcl_Obj *formatString, int *widthPtr, int *heightPtr)
+}
+
##############################################################################
@@ -972,7 +979,7 @@ declare 34 aqua {
int TkMacOSXUseMenuID(short macID)
}
declare 35 aqua {
- TkRegion TkMacOSXVisableClipRgn(TkWindow *winPtr)
+ Region TkMacOSXVisableClipRgn(TkWindow *winPtr)
}
declare 36 aqua {
void TkMacOSXWinBounds(TkWindow *winPtr, void *geometry)
@@ -1009,7 +1016,7 @@ declare 46 aqua {
int TkpIsWindowFloating(void *window)
}
declare 47 aqua {
- Tk_Window TkMacOSXGetCapture(void)
+ Tk_Window TkpGetCapture(void)
}
declare 49 aqua {
Tk_Window TkGetTransientMaster(TkWindow *winPtr)
@@ -1496,355 +1503,551 @@ declare 137 win {
int sx, int sy, int dx, int dy,
unsigned int w, unsigned int h)
}
+declare 138 win {
+ Region XPolygonRegion(XPoint *pts, int n, int rule)
+}
+declare 139 win {
+ int XPointInRegion(Region rgn, int x, int y)
+}
+# For XIM
+declare 140 win {
+ XVaNestedList XVaCreateNestedList(int dummy, ...)
+}
+declare 141 win {
+ char *XSetICValues(XIC xic, ...)
+}
+declare 142 win {
+ char *XGetICValues(XIC xic, ...)
+}
+declare 143 win {
+ void XSetICFocus(XIC xic)
+}
+declare 147 win {
+ void XFreeFontSet(Display *display, XFontSet fontset)
+}
+declare 148 win {
+ int XCloseIM(XIM im)
+}
+declare 149 win {
+ Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class, XIDProc callback, XPointer client_data)
+}
+declare 150 win {
+ Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class, XIDProc callback, XPointer client_data)
+}
+declare 151 win {
+ char *XSetLocaleModifiers(const char *modifier_list)
+}
+declare 152 win {
+ XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name,
+ char *res_class)
+}
+declare 153 win {
+ char *XGetIMValues(XIM im, ...)
+}
+declare 154 win {
+ char *XSetIMValues(XIM im, ...)
+}
+declare 155 win {
+ XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list,
+ char ***missing_charset_list, int *missing_charset_count, char **def_string)
+}
+declare 156 win {
+ void XFreeStringList(char **list)
+}
+
+
################################
-# X functions for Aqua
+# X functions for MacOSX
-declare 0 aqua {
+declare 0 macosx {
int XSetDashes(Display *display, GC gc, int dash_offset,
_Xconst char *dash_list, int n)
}
-declare 1 aqua {
+declare 1 macosx {
XModifierKeymap *XGetModifierMapping(Display *d)
}
-declare 2 aqua {
+declare 2 macosx {
XImage *XCreateImage(Display *d, Visual *v, unsigned int ui1, int i1,
int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3,
int i4)
}
-declare 3 aqua {
+declare 3 macosx {
XImage *XGetImage(Display *d, Drawable dr, int i1, int i2,
unsigned int ui1, unsigned int ui2, unsigned long ul, int i3)
}
-declare 4 aqua {
+declare 4 macosx {
char *XGetAtomName(Display *d, Atom a)
}
-declare 5 aqua {
+declare 5 macosx {
char *XKeysymToString(KeySym k)
}
-declare 6 aqua {
+declare 6 macosx {
Colormap XCreateColormap(Display *d, Window w, Visual *v, int i)
}
-declare 7 aqua {
+declare 7 macosx {
GContext XGContextFromGC(GC g)
}
-declare 8 aqua {
- KeySym XKeycodeToKeysym(Display *d, KeyCode k, int i)
+# second parameter was of type KeyCode
+declare 8 macosx {
+ KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i)
}
-declare 9 aqua {
+declare 9 macosx {
KeySym XStringToKeysym(_Xconst char *c)
}
-declare 10 aqua {
+declare 10 macosx {
Window XRootWindow(Display *d, int i)
}
-declare 11 aqua {
+declare 11 macosx {
XErrorHandler XSetErrorHandler(XErrorHandler x)
}
-declare 12 aqua {
+declare 12 macosx {
Status XAllocColor(Display *d, Colormap c, XColor *xp)
}
-declare 13 aqua {
+declare 13 macosx {
int XBell(Display *d, int i)
}
-declare 14 aqua {
+declare 14 macosx {
int XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1,
int i2, _Xconst unsigned char *c, int i3)
}
-declare 15 aqua {
+declare 15 macosx {
int XChangeWindowAttributes(Display *d, Window w, unsigned long ul,
XSetWindowAttributes *x)
}
-declare 16 aqua {
+declare 16 macosx {
int XConfigureWindow(Display *d, Window w, unsigned int i,
XWindowChanges *x)
}
-declare 17 aqua {
+declare 17 macosx {
int XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
int i2, unsigned int ui1, unsigned int ui2, int i3, int i4)
}
-declare 18 aqua {
+declare 18 macosx {
int XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
int i2, unsigned int ui1,
unsigned int ui2, int i3, int i4, unsigned long ul)
}
-declare 19 aqua {
+declare 19 macosx {
Pixmap XCreateBitmapFromData(Display *display, Drawable d,
_Xconst char *data, unsigned int width, unsigned int height)
}
-declare 20 aqua {
+declare 20 macosx {
int XDefineCursor(Display *d, Window w, Cursor c)
}
-declare 21 aqua {
+declare 21 macosx {
int XDestroyWindow(Display *d, Window w)
}
-declare 22 aqua {
+declare 22 macosx {
int XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2,
unsigned int ui1, unsigned int ui2, int i3, int i4)
}
-declare 23 aqua {
+declare 23 macosx {
int XDrawLines(Display *d, Drawable dr, GC g, XPoint *x, int i1, int i2)
}
-declare 24 aqua {
+declare 24 macosx {
int XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2,
unsigned int ui1, unsigned int ui2)
}
-declare 25 aqua {
+declare 25 macosx {
int XFillArc(Display *d, Drawable dr, GC g, int i1, int i2,
unsigned int ui1, unsigned int ui2, int i3, int i4)
}
-declare 26 aqua {
+declare 26 macosx {
int XFillPolygon(Display *d, Drawable dr, GC g, XPoint *x,
int i1, int i2, int i3)
}
-declare 27 aqua {
+declare 27 macosx {
int XFillRectangles(Display *d, Drawable dr, GC g, XRectangle *x, int i)
}
-declare 28 aqua {
+declare 28 macosx {
int XFreeColormap(Display *d, Colormap c)
}
-declare 29 aqua {
+declare 29 macosx {
int XFreeColors(Display *d, Colormap c,
unsigned long *ulp, int i, unsigned long ul)
}
-declare 30 aqua {
+declare 30 macosx {
int XFreeModifiermap(XModifierKeymap *x)
}
-declare 31 aqua {
+declare 31 macosx {
Status XGetGeometry(Display *d, Drawable dr, Window *w, int *i1,
int *i2, unsigned int *ui1, unsigned int *ui2, unsigned int *ui3,
unsigned int *ui4)
}
-declare 32 aqua {
+declare 32 macosx {
int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2,
Bool b, Atom a2, Atom *ap, int *ip, unsigned long *ulp1,
unsigned long *ulp2, unsigned char **cpp)
}
-declare 33 aqua {
+declare 33 macosx {
int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t)
}
-declare 34 aqua {
+declare 34 macosx {
int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui,
int i1, int i2, Window w2, Cursor c, Time t)
}
-declare 35 aqua {
+declare 35 macosx {
KeyCode XKeysymToKeycode(Display *d, KeySym k)
}
-declare 36 aqua {
+declare 36 macosx {
int XMapWindow(Display *d, Window w)
}
-declare 37 aqua {
+declare 37 macosx {
int XMoveResizeWindow(Display *d, Window w, int i1, int i2,
unsigned int ui1, unsigned int ui2)
}
-declare 38 aqua {
+declare 38 macosx {
int XMoveWindow(Display *d, Window w, int i1, int i2)
}
-declare 39 aqua {
+declare 39 macosx {
Bool XQueryPointer(Display *d, Window w1, Window *w2, Window *w3,
int *i1, int *i2, int *i3, int *i4, unsigned int *ui)
}
-declare 40 aqua {
+declare 40 macosx {
int XRaiseWindow(Display *d, Window w)
}
-declare 41 aqua {
+declare 41 macosx {
int XRefreshKeyboardMapping(XMappingEvent *x)
}
-declare 42 aqua {
+declare 42 macosx {
int XResizeWindow(Display *d, Window w, unsigned int ui1,
unsigned int ui2)
}
-declare 43 aqua {
+declare 43 macosx {
int XSelectInput(Display *d, Window w, long l)
}
-declare 44 aqua {
+declare 44 macosx {
Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent *x)
}
-declare 45 aqua {
+declare 45 macosx {
int XSetIconName(Display *d, Window w, _Xconst char *c)
}
-declare 46 aqua {
+declare 46 macosx {
int XSetInputFocus(Display *d, Window w, int i, Time t)
}
-declare 47 aqua {
+declare 47 macosx {
int XSetSelectionOwner(Display *d, Atom a, Window w, Time t)
}
-declare 48 aqua {
+declare 48 macosx {
int XSetWindowBackground(Display *d, Window w, unsigned long ul)
}
-declare 49 aqua {
+declare 49 macosx {
int XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p)
}
-declare 50 aqua {
+declare 50 macosx {
int XSetWindowBorder(Display *d, Window w, unsigned long ul)
}
-declare 51 aqua {
+declare 51 macosx {
int XSetWindowBorderPixmap(Display *d, Window w, Pixmap p)
}
-declare 52 aqua {
+declare 52 macosx {
int XSetWindowBorderWidth(Display *d, Window w, unsigned int ui)
}
-declare 53 aqua {
+declare 53 macosx {
int XSetWindowColormap(Display *d, Window w, Colormap c)
}
-declare 54 aqua {
+declare 54 macosx {
int XUngrabKeyboard(Display *d, Time t)
}
-declare 55 aqua {
+declare 55 macosx {
int XUngrabPointer(Display *d, Time t)
}
-declare 56 aqua {
+declare 56 macosx {
int XUnmapWindow(Display *d, Window w)
}
-declare 57 aqua {
+declare 57 macosx {
int TkPutImage(unsigned long *colors, int ncolors, Display *display,
Drawable d, GC gc, XImage *image, int src_x, int src_y,
int dest_x, int dest_y, unsigned int width, unsigned int height)
}
-declare 58 aqua {
+declare 58 macosx {
Status XParseColor(Display *display, Colormap map,
_Xconst char *spec, XColor *colorPtr)
}
-declare 59 aqua {
+declare 59 macosx {
GC XCreateGC(Display *display, Drawable d,
unsigned long valuemask, XGCValues *values)
}
-declare 60 aqua {
+declare 60 macosx {
int XFreeGC(Display *display, GC gc)
}
-declare 61 aqua {
+declare 61 macosx {
Atom XInternAtom(Display *display, _Xconst char *atom_name,
Bool only_if_exists)
}
-declare 62 aqua {
+declare 62 macosx {
int XSetBackground(Display *display, GC gc, unsigned long foreground)
}
-declare 63 aqua {
+declare 63 macosx {
int XSetForeground(Display *display, GC gc, unsigned long foreground)
}
-declare 64 aqua {
+declare 64 macosx {
int XSetClipMask(Display *display, GC gc, Pixmap pixmap)
}
-declare 65 aqua {
+declare 65 macosx {
int XSetClipOrigin(Display *display, GC gc,
int clip_x_origin, int clip_y_origin)
}
-declare 66 aqua {
+declare 66 macosx {
int XSetTSOrigin(Display *display, GC gc,
int ts_x_origin, int ts_y_origin)
}
-declare 67 aqua {
+declare 67 macosx {
int XChangeGC(Display *d, GC gc, unsigned long mask, XGCValues *values)
}
-declare 68 aqua {
+declare 68 macosx {
int XSetFont(Display *display, GC gc, Font font)
}
-declare 69 aqua {
+declare 69 macosx {
int XSetArcMode(Display *display, GC gc, int arc_mode)
}
-declare 70 aqua {
+declare 70 macosx {
int XSetStipple(Display *display, GC gc, Pixmap stipple)
}
-declare 71 aqua {
+declare 71 macosx {
int XSetFillRule(Display *display, GC gc, int fill_rule)
}
-declare 72 aqua {
+declare 72 macosx {
int XSetFillStyle(Display *display, GC gc, int fill_style)
}
-declare 73 aqua {
+declare 73 macosx {
int XSetFunction(Display *display, GC gc, int function)
}
-declare 74 aqua {
+declare 74 macosx {
int XSetLineAttributes(Display *display, GC gc, unsigned int line_width,
int line_style, int cap_style, int join_style)
}
-declare 75 aqua {
+declare 75 macosx {
int _XInitImageFuncPtrs(XImage *image)
}
-declare 76 aqua {
+declare 76 macosx {
XIC XCreateIC(XIM xim, ...)
}
-declare 77 aqua {
+declare 77 macosx {
XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask,
XVisualInfo *vinfo_template, int *nitems_return)
}
-declare 78 aqua {
+declare 78 macosx {
void XSetWMClientMachine(Display *display, Window w,
XTextProperty *text_prop)
}
-declare 79 aqua {
+declare 79 macosx {
Status XStringListToTextProperty(char **list, int count,
XTextProperty *text_prop_return)
}
-declare 80 aqua {
+declare 80 macosx {
int XDrawSegments(Display *display, Drawable d, GC gc,
XSegment *segments, int nsegments)
}
-declare 81 aqua {
+declare 81 macosx {
int XForceScreenSaver(Display *display, int mode)
}
-declare 82 aqua {
+declare 82 macosx {
int XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1,
int x2, int y2)
}
-declare 83 aqua {
+declare 83 macosx {
int XFillRectangle(Display *display, Drawable d, GC gc,
int x, int y, unsigned int width, unsigned int height)
}
-declare 84 aqua {
+declare 84 macosx {
int XClearWindow(Display *d, Window w)
}
-declare 85 aqua {
+declare 85 macosx {
int XDrawPoint(Display *display, Drawable d, GC gc, int x, int y)
}
-declare 86 aqua {
+declare 86 macosx {
int XDrawPoints(Display *display, Drawable d, GC gc, XPoint *points,
int npoints, int mode)
}
-declare 87 aqua {
+declare 87 macosx {
int XWarpPointer(Display *display, Window src_w, Window dest_w,
int src_x, int src_y, unsigned int src_width,
unsigned int src_height, int dest_x, int dest_y)
}
-declare 88 aqua {
+declare 88 macosx {
int XQueryColor(Display *display, Colormap colormap, XColor *def_in_out)
}
-declare 89 aqua {
+declare 89 macosx {
int XQueryColors(Display *display, Colormap colormap,
XColor *defs_in_out, int ncolors)
}
-declare 90 aqua {
+declare 90 macosx {
Status XQueryTree(Display *d, Window w1, Window *w2, Window *w3,
Window **w4, unsigned int *ui)
}
-declare 91 aqua {
+declare 91 macosx {
int XSync(Display *display, Bool discard)
}
-declare 107 aqua {
+declare 92 macosx {
+ Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1,
+ int i2, int *i3, int *i4, Window *w3)
+}
+declare 93 macosx {
+ int XDeleteProperty(Display *d, Window w, Atom a)
+}
+declare 94 macosx {
+ int XFreeCursor(Display *d, Cursor c)
+}
+declare 95 macosx {
+ int XGetInputFocus(Display *d, Window *w, int *i)
+}
+declare 96 macosx {
+ int XmbLookupString(XIC xi, XKeyPressedEvent *xk, char *c, int i,
+ KeySym *k, Status *s)
+}
+declare 97 macosx {
+ int XNextEvent(Display *d, XEvent *x)
+}
+declare 98 macosx {
+ int XPutBackEvent(Display *d, XEvent *x)
+}
+declare 99 macosx {
+ int XSetCommand(Display *d, Window w, char **c, int i)
+}
+declare 100 macosx {
+ int XWindowEvent(Display *d, Window w, long l, XEvent *x)
+}
+declare 101 macosx {
+ Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes *x)
+}
+declare 102 macosx {
+ Status XGetWMColormapWindows(Display *d, Window w, Window **wpp, int *ip)
+}
+declare 103 macosx {
+ Status XIconifyWindow(Display *d, Window w, int i)
+}
+declare 104 macosx {
+ Status XWithdrawWindow(Display *d, Window w, int i)
+}
+declare 105 macosx {
+ XHostAddress *XListHosts(Display *d, int *i, Bool *b)
+}
+declare 107 macosx {
int XFlush(Display *display)
}
-declare 108 aqua {
+declare 108 macosx {
int XGrabServer(Display *display)
}
-declare 109 aqua {
+declare 109 macosx {
int XUngrabServer(Display *display)
}
-declare 110 aqua {
+declare 110 macosx {
int XFree(void *data)
}
-declare 111 aqua {
+declare 111 macosx {
int XNoOp(Display *display)
}
-declare 112 aqua {
+declare 112 macosx {
XAfterFunction XSynchronize(Display *display, Bool onoff)
}
-declare 114 aqua {
+declare 113 macosx {
+ Status XLookupColor(Display *d, Colormap c1, _Xconst char *c2,
+ XColor *x1, XColor *x2)
+}
+declare 114 macosx {
VisualID XVisualIDFromVisual(Visual *visual)
}
-declare 137 aqua {
+declare 120 macosx {
+ int XOffsetRegion(Region rgn, int dx, int dy)
+}
+declare 121 macosx {
+ int XUnionRegion(Region srca, Region srcb, Region dr_return)
+}
+declare 122 macosx {
+ Window XCreateWindow(Display *display, Window parent, int x, int y,
+ unsigned int width, unsigned int height,
+ unsigned int border_width, int depth, unsigned int clazz,
+ Visual *visual, unsigned long value_mask,
+ XSetWindowAttributes *attributes)
+}
+declare 129 macosx {
+ int XLowerWindow(Display *d, Window w)
+}
+declare 130 macosx {
+ int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a, int n)
+}
+declare 131 macosx {
+ int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a, int n)
+}
+declare 132 macosx {
+ int XDrawRectangles(Display *d, Drawable dr, GC gc, XRectangle *r, int n)
+}
+declare 136 macosx {
+ int XReparentWindow(Display *d, Window w, Window p, int x, int y)
+}
+declare 137 macosx {
int XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
int sx, int sy, int dx, int dy,
unsigned int w, unsigned int h)
}
+declare 138 macosx {
+ Region XPolygonRegion(XPoint *pts, int n, int rule)
+}
+declare 139 macosx {
+ int XPointInRegion(Region rgn, int x, int y)
+}
+declare 140 macosx {
+ XVaNestedList XVaCreateNestedList(int dummy, ...)
+}
+declare 141 macosx {
+ char *XSetICValues(XIC xic, ...)
+}
+declare 142 macosx {
+ char *XGetICValues(XIC xic, ...)
+}
+declare 143 macosx {
+ void XSetICFocus(XIC xic)
+}
+declare 144 macosx {
+ void XDestroyIC(XIC xic)
+}
+declare 145 macosx {
+ Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
+ XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2)
+}
+declare 146 macosx {
+ Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
+ unsigned int ui1, unsigned int ui2, XColor _Xconst *x1,
+ XColor _Xconst *x2)
+}
+declare 147 macosx {
+ void XFreeFontSet(Display *display, XFontSet fontset)
+}
+declare 148 macosx {
+ int XCloseIM(XIM im)
+}
+declare 149 macosx {
+ Bool XRegisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class, XIDProc callback, XPointer client_data)
+}
+declare 150 macosx {
+ Bool XUnregisterIMInstantiateCallback(Display *dpy, struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class, XIDProc callback, XPointer client_data)
+}
+declare 151 macosx {
+ char *XSetLocaleModifiers(const char *modifier_list)
+}
+declare 152 macosx {
+ XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name,
+ char *res_class)
+}
+declare 153 macosx {
+ char *XGetIMValues(XIM im, ...)
+}
+declare 154 macosx {
+ char *XSetIMValues(XIM im, ...)
+}
+declare 155 macosx {
+ XFontSet XCreateFontSet(Display *display, _Xconst char *base_font_name_list,
+ char ***missing_charset_list, int *missing_charset_count, char **def_string)
+}
+declare 156 macosx {
+ void XFreeStringList(char **list)
+}
# Local Variables:
# mode: tcl
diff --git a/generic/tkInt.h b/generic/tkInt.h
index c1bd562d..282ac8f 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -25,7 +25,6 @@
* Darwin (where configure runs only once for multiple architectures).
*/
-#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@ -59,6 +58,19 @@
# endif
#endif
+#ifndef TkSizeT
+# if TCL_MAJOR_VERSION > 8
+# define TkSizeT size_t
+# else
+# define TkSizeT int
+# endif
+#endif
+
+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7)
+# define Tcl_WCharToUtfDString Tcl_UniCharToUtfDString
+# define Tcl_UtfToWCharDString Tcl_UtfToUniCharDString
+#endif
+
/*
* Macros used to cast between pointers and integers (e.g. when storing an int
* in ClientData), on 64-bit architectures they avoid gcc warning about "cast
@@ -68,22 +80,26 @@
#if !defined(INT2PTR) && !defined(PTR2INT)
# if defined(HAVE_INTPTR_T) || defined(intptr_t)
# define INT2PTR(p) ((void*)(intptr_t)(p))
-# define PTR2INT(p) ((int)(intptr_t)(p))
+# define PTR2INT(p) ((intptr_t)(p))
# else
# define INT2PTR(p) ((void*)(p))
-# define PTR2INT(p) ((int)(p))
+# define PTR2INT(p) ((long)(p))
# endif
#endif
#if !defined(UINT2PTR) && !defined(PTR2UINT)
# if defined(HAVE_UINTPTR_T) || defined(uintptr_t)
# define UINT2PTR(p) ((void*)(uintptr_t)(p))
-# define PTR2UINT(p) ((unsigned int)(uintptr_t)(p))
+# define PTR2UINT(p) ((uintptr_t)(p))
# else
# define UINT2PTR(p) ((void*)(p))
-# define PTR2UINT(p) ((unsigned int)(p))
+# define PTR2UINT(p) ((unsigned long)(p))
# endif
#endif
+#ifndef TCL_AUTO_LENGTH
+# define TCL_AUTO_LENGTH (-1)
+#endif
+
#ifndef TCL_Z_MODIFIER
# if defined(_WIN64)
# define TCL_Z_MODIFIER "I"
@@ -102,7 +118,7 @@ typedef struct TkColormap TkColormap;
typedef struct TkFontAttributes TkFontAttributes;
typedef struct TkGrabEvent TkGrabEvent;
typedef struct TkpCursor_ *TkpCursor;
-typedef struct TkRegion_ *TkRegion;
+#define TkRegion Region
typedef struct TkStressedCmap TkStressedCmap;
typedef struct TkBindInfo_ *TkBindInfo;
typedef struct Busy *TkBusy;
@@ -117,7 +133,7 @@ typedef struct TkCursor {
Tk_Cursor cursor; /* System specific identifier for cursor. */
Display *display; /* Display containing cursor. Needed for
* disposal and retrieval of cursors. */
- int resourceRefCount; /* Number of active uses of this cursor (each
+ TkSizeT resourceRefCount; /* Number of active uses of this cursor (each
* active use corresponds to a call to
* Tk_AllocPreserveFromObj or Tk_Preserve). If
* this count is 0, then this structure is no
@@ -126,7 +142,7 @@ typedef struct TkCursor {
* there are objects referring to it. The
* structure is freed when resourceRefCount
* and objRefCount are both 0. */
- int objRefCount; /* Number of Tcl objects that reference this
+ TkSizeT objRefCount; /* Number of Tcl objects that reference this
* structure.. */
Tcl_HashTable *otherTable; /* Second table (other than idTable) used to
* index this entry. */
@@ -276,7 +292,7 @@ typedef struct TkDisplay {
/* First in list of error handlers for this
* display. NULL means no handlers exist at
* present. */
- int deleteCount; /* Counts # of handlers deleted since last
+ TkSizeT deleteCount; /* Counts # of handlers deleted since last
* time inactive handlers were garbage-
* collected. When this number gets big,
* handlers get cleaned up. */
@@ -485,14 +501,14 @@ typedef struct TkDisplay {
* Miscellaneous information:
*/
-#ifdef TK_USE_INPUT_METHODS
+#if defined(TK_USE_INPUT_METHODS) || (TCL_MAJOR_VERSION > 8)
XIM inputMethod; /* Input method for this display. */
XIMStyle inputStyle; /* Input style selected for this display. */
XFontSet inputXfs; /* XFontSet cached for over-the-spot XIM. */
#endif /* TK_USE_INPUT_METHODS */
Tcl_HashTable winTable; /* Maps from X window ids to TkWindow ptrs. */
- int refCount; /* Reference count of how many Tk applications
+ TkSizeT refCount; /* Reference count of how many Tk applications
* are using this display. Used to clean up
* the display when we no longer have any Tk
* applications using it. */
@@ -501,10 +517,17 @@ typedef struct TkDisplay {
* The following field were all added for Tk8.3
*/
+#if TCL_MAJOR_VERSION < 9
+#if !defined(TK_NO_DEPRECATED)
int mouseButtonState; /* Current mouse button state for this
* display. NOT USED as of 8.6.10 */
Window mouseButtonWindow; /* Window the button state was set in, added
* in Tk 8.4. */
+#else
+ int notused1;
+ XID notused2;
+#endif /* !TK_NO_DEPRECATED */
+#endif
Tk_Window warpWindow;
Tk_Window warpMainwin; /* For finding the root window for warping
* purposes. */
@@ -522,8 +545,11 @@ typedef struct TkDisplay {
int iconDataSize; /* Size of default iconphoto image data. */
unsigned char *iconDataPtr; /* Default iconphoto image data, if set. */
-#ifdef TK_USE_INPUT_METHODS
int ximGeneration; /* Used to invalidate XIC */
+#if !defined(TK_USE_INPUT_METHODS) && (TCL_MAJOR_VERSION < 9)
+ XIM inputMethod; /* Input method for this display. */
+ XIMStyle inputStyle; /* Input style selected for this display. */
+ XFontSet inputXfs; /* XFontSet cached for over-the-spot XIM. */
#endif /* TK_USE_INPUT_METHODS */
} TkDisplay;
@@ -596,7 +622,7 @@ typedef struct TkEventHandler {
*/
typedef struct TkMainInfo {
- int refCount; /* Number of windows whose "mainPtr" fields
+ TkSizeT refCount; /* Number of windows whose "mainPtr" fields
* point here. When this becomes zero, can
* free up the structure (the reference count
* is zero because windows can get deleted in
@@ -607,7 +633,11 @@ typedef struct TkMainInfo {
Tcl_HashTable nameTable; /* Hash table mapping path names to TkWindow
* structs for all windows related to this
* main window. Managed by tkWindow.c. */
- long deletionEpoch; /* Incremented by window deletions. */
+#if TCL_MAJOR_VERSION > 8
+ size_t deletionEpoch; /* Incremented by window deletions. */
+#else
+ long deletionEpoch;
+#endif
Tk_BindingTable bindingTable;
/* Used in conjunction with "bind" command to
* bind events to Tcl commands. */
@@ -744,7 +774,7 @@ typedef struct TkWindow {
TkEventHandler *handlerList;/* First in list of event handlers declared
* for this window, or NULL if none. */
-#ifdef TK_USE_INPUT_METHODS
+#if defined(TK_USE_INPUT_METHODS) || (TCL_MAJOR_VERSION > 8)
XIC inputContext; /* XIM input context. */
#endif /* TK_USE_INPUT_METHODS */
@@ -825,7 +855,7 @@ typedef struct TkWindow {
int minReqWidth; /* Minimum requested width. */
int minReqHeight; /* Minimum requested height. */
-#ifdef TK_USE_INPUT_METHODS
+#if defined(TK_USE_INPUT_METHODS) || (TCL_MAJOR_VERSION > 8)
int ximGeneration; /* Used to invalidate XIC */
#endif /* TK_USE_INPUT_METHODS */
char *geomMgrName; /* Records the name of the geometry manager. */
@@ -833,6 +863,10 @@ typedef struct TkWindow {
/* The geometry master for this window. The
* value is NULL if the window has no master or
* if its master is its parent. */
+#if !defined(TK_USE_INPUT_METHODS) && (TCL_MAJOR_VERSION < 9)
+ XIC inputContext; /* XIM input context. */
+ int ximGeneration; /* Used to invalidate XIC */
+#endif /* TK_USE_INPUT_METHODS */
} TkWindow;
/*
@@ -841,13 +875,13 @@ typedef struct TkWindow {
*/
typedef struct {
- XKeyEvent keyEvent; /* The real event from X11. */
- char *charValuePtr; /* A pointer to a string that holds the key's
+ XKeyEvent keyEvent; /* The real event from X11. */
+ 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
* computed yet. If non-NULL, this string was
* allocated with ckalloc(). */
- int charValueLen; /* Length of string in charValuePtr when that
+ TkSizeT charValueLen; /* Length of string in charValuePtr when that
* is non-NULL. */
KeySym keysym; /* Key symbol computed after input methods
* have been invoked */
@@ -861,6 +895,15 @@ typedef struct {
#define TK_MAKE_MENU_POPUP 1
#define TK_MAKE_MENU_DROPDOWN 2
+/* See TIP #494 */
+#ifndef TCL_IO_FAILURE
+# define TCL_IO_FAILURE (-1)
+#endif
+/* See TIP #537 */
+#ifndef TCL_INDEX_NONE
+# define TCL_INDEX_NONE (-1)
+#endif
+
/*
* The following structure is used with TkMakeEnsemble to create ensemble
* commands and optionally to create sub-ensembles.
@@ -892,7 +935,7 @@ typedef struct TkpClipMask {
int type; /* TKP_CLIP_PIXMAP or TKP_CLIP_REGION. */
union {
Pixmap pixmap;
- TkRegion region;
+ Region region;
} value;
} TkpClipMask;
@@ -941,13 +984,34 @@ typedef struct TkpClipMask {
#define ALT_MASK (AnyModifier<<2)
#define EXTENDED_MASK (AnyModifier<<3)
+#ifndef Button8
+# define Button8 8
+#endif
+#ifndef Button9
+# define Button9 9
+#endif
+
+#ifndef Button6Mask
+# define Button6Mask (1<<13)
+#endif
+#ifndef Button7Mask
+# define Button7Mask (1<<14)
+#endif
+#ifndef Button8Mask
+# define Button8Mask (AnyModifier<<4)
+#endif
+#ifndef Button9Mask
+# define Button9Mask (AnyModifier<<5)
+#endif
+
/*
* Mask that selects any of the state bits corresponding to buttons, plus
* masks that select individual buttons' bits:
*/
#define ALL_BUTTONS \
- (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask)
+ (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask \
+ |Button6Mask|Button7Mask|Button8Mask|Button9Mask)
MODULE_SCOPE unsigned long TkGetButtonMask(unsigned int);
@@ -974,8 +1038,10 @@ MODULE_SCOPE const Tk_SmoothMethod tkBezierSmoothMethod;
MODULE_SCOPE Tk_ImageType tkBitmapImageType;
MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtGIF;
MODULE_SCOPE void (*tkHandleEventProc) (XEvent* eventPtr);
+MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtDefault;
MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtPNG;
MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtPPM;
+MODULE_SCOPE Tk_PhotoImageFormat tkImgFmtSVGnano;
MODULE_SCOPE TkMainInfo *tkMainWindowList;
MODULE_SCOPE Tk_ImageType tkPhotoImageType;
MODULE_SCOPE Tcl_HashTable tkPredefBitmapTable;
@@ -1205,7 +1271,7 @@ MODULE_SCOPE void TkDeleteExitHandler(Tcl_ExitProc *proc,
ClientData clientData);
MODULE_SCOPE Tcl_ExitProc TkFinalize;
MODULE_SCOPE Tcl_ExitProc TkFinalizeThread;
-MODULE_SCOPE void TkpBuildRegionFromAlphaData(TkRegion region,
+MODULE_SCOPE void TkpBuildRegionFromAlphaData(Region region,
unsigned x, unsigned y, unsigned width,
unsigned height, unsigned char *dataPtr,
unsigned pixelStride, unsigned lineStride);
@@ -1231,6 +1297,9 @@ MODULE_SCOPE void TkUnderlineCharsInContext(Display *display,
int firstByte, int lastByte);
MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont,
int c, struct TkFontAttributes *faPtr);
+MODULE_SCOPE void TkpDrawFrameEx(Tk_Window tkwin, Drawable drawable,
+ Tk_3DBorder border, int highlightWidth,
+ int borderWidth, int relief);
MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin);
MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy);
MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy);
@@ -1250,11 +1319,16 @@ MODULE_SCOPE int TkInitTkCmd(Tcl_Interp *interp,
ClientData clientData);
MODULE_SCOPE int TkInitFontchooser(Tcl_Interp *interp,
ClientData clientData);
+MODULE_SCOPE void TkInitEmbeddedConfigurationInformation(
+ Tcl_Interp *interp);
MODULE_SCOPE void TkpWarpPointer(TkDisplay *dispPtr);
MODULE_SCOPE void TkpCancelWarp(TkDisplay *dispPtr);
MODULE_SCOPE int TkListCreateFrame(ClientData clientData,
Tcl_Interp *interp, Tcl_Obj *listObj,
int toplevel, Tcl_Obj *nameObj);
+MODULE_SCOPE void TkRotatePoint(double originX, double originY,
+ double sine, double cosine, double *xPtr,
+ double *yPtr);
#ifdef _WIN32
#define TkParseColor XParseColor
@@ -1263,8 +1337,30 @@ MODULE_SCOPE Status TkParseColor (Display * display,
Colormap map, const char* spec,
XColor * colorPtr);
#endif
+#if !defined(_WIN32) && !defined(__CYGWIN__) /* UNIX and MacOSX */
+#undef TkPutImage
+#define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \
+ XPutImage(display, pixels, gc, image, srcx, srcy, destx, desty, width, height);
+#else
+#undef XPutImage
+#define XPutImage(display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \
+ TkPutImage(NULL, 0, display, pixels, gc, image, srcx, srcy, destx, desty, width, height);
+#endif
+
+/*
+ * These macros are just wrappers for the equivalent X Region calls.
+ */
+#define TkClipBox XClipBox
+#define TkCreateRegion XCreateRegion
+#define TkDestroyRegion XDestroyRegion
+#define TkIntersectRegion XIntersectRegion
+#define TkRectInRegion XRectInRegion
+#define TkSetRegion XSetRegion
+#define TkSubtractRegion XSubtractRegion
+#define TkUnionRectWithRegion XUnionRectWithRegion
+
#ifdef HAVE_XFT
-MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion);
+MODULE_SCOPE void TkUnixSetXftClipRegion(Region clipRegion);
#endif
#if !defined(__cplusplus) && !defined(c_plusplus)
@@ -1272,13 +1368,25 @@ MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion);
#endif
#if TCL_UTF_MAX > 4
-# define TkUtfToUniChar Tcl_UtfToUniChar
-# define TkUniCharToUtf Tcl_UniCharToUtf
+# define TkUtfToUniChar (size_t)Tcl_UtfToUniChar
+# define TkUniCharToUtf (size_t)Tcl_UniCharToUtf
#else
- MODULE_SCOPE int TkUtfToUniChar(const char *, int *);
- MODULE_SCOPE int TkUniCharToUtf(int, char *);
+ MODULE_SCOPE size_t TkUtfToUniChar(const char *, int *);
+ MODULE_SCOPE size_t TkUniCharToUtf(int, char *);
#endif
+#if TCL_MAJOR_VERSION > 8
+#define TkGetStringFromObj(objPtr, lenPtr) \
+ (((objPtr)->bytes ? 0 : Tcl_GetString(objPtr)), \
+ *(lenPtr) = (objPtr)->length, (objPtr)->bytes)
+MODULE_SCOPE unsigned char *TkGetByteArrayFromObj(Tcl_Obj *objPtr,
+ size_t *lengthPtr);
+#else
+#define TkGetStringFromObj Tcl_GetStringFromObj
+#define TkGetByteArrayFromObj Tcl_GetByteArrayFromObj
+#endif
+
+
/*
* Unsupported commands.
*/
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index eb32c00..88754e4 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -15,6 +15,8 @@
#ifndef _TKINTDECLS
#define _TKINTDECLS
+#include "X11/Xutil.h"
+
#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
@@ -104,7 +106,7 @@ EXTERN int TkFindStateNum(Tcl_Interp *interp,
const char *option, const TkStateMap *mapPtr,
const char *strKey);
/* 22 */
-EXTERN CONST86 char * TkFindStateString(const TkStateMap *mapPtr,
+EXTERN const char * TkFindStateString(const TkStateMap *mapPtr,
int numKey);
/* 23 */
EXTERN void TkFocusDeadWindow(TkWindow *winPtr);
@@ -167,7 +169,7 @@ EXTERN void TkInOutEvents(XEvent *eventPtr, TkWindow *sourcePtr,
/* 45 */
EXTERN void TkInstallFrameMenu(Tk_Window tkwin);
/* 46 */
-EXTERN CONST86 char * TkKeysymToString(KeySym keysym);
+EXTERN const char * TkKeysymToString(KeySym keysym);
/* 47 */
EXTERN int TkLineToArea(double end1Ptr[], double end2Ptr[],
double rectPtr[]);
@@ -254,7 +256,7 @@ EXTERN int TkReadBitmapFile(Display *display, Drawable d,
/* 79 */
EXTERN int TkScrollWindow(Tk_Window tkwin, GC gc, int x, int y,
int width, int height, int dx, int dy,
- TkRegion damageRgn);
+ Region damageRgn);
/* 80 */
EXTERN void TkSelDeadWindow(TkWindow *winPtr);
/* 81 */
@@ -324,7 +326,7 @@ EXTERN int TkGetWindowFromObj(Tcl_Interp *interp,
Tk_Window tkwin, Tcl_Obj *objPtr,
Tk_Window *windowPtr);
/* 109 */
-EXTERN CONST86 char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr,
+EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr,
Tcl_DString *dsPtr);
/* 110 */
EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont);
@@ -334,22 +336,22 @@ EXTERN Tcl_Obj * TkpGetSystemDefault(Tk_Window tkwin,
/* 112 */
EXTERN void TkpMenuThreadInit(void);
/* 113 */
-EXTERN int TkClipBox(TkRegion rgn, XRectangle *rect_return);
+EXTERN int XClipBox(Region rgn, XRectangle *rect_return);
/* 114 */
-EXTERN TkRegion TkCreateRegion(void);
+EXTERN Region XCreateRegion(void);
/* 115 */
-EXTERN int TkDestroyRegion(TkRegion rgn);
+EXTERN int XDestroyRegion(Region rgn);
/* 116 */
-EXTERN int TkIntersectRegion(TkRegion sra, TkRegion srcb,
- TkRegion dr_return);
+EXTERN int XIntersectRegion(Region sra, Region srcb,
+ Region dr_return);
/* 117 */
-EXTERN int TkRectInRegion(TkRegion rgn, int x, int y,
+EXTERN int XRectInRegion(Region rgn, int x, int y,
unsigned int width, unsigned int height);
/* 118 */
-EXTERN int TkSetRegion(Display *display, GC gc, TkRegion rgn);
+EXTERN int XSetRegion(Display *display, GC gc, Region rgn);
/* 119 */
-EXTERN int TkUnionRectWithRegion(XRectangle *rect, TkRegion src,
- TkRegion dr_return);
+EXTERN int XUnionRectWithRegion(XRectangle *rect, Region src,
+ Region dr_return);
/* Slot 120 is reserved */
#ifdef MAC_OSX_TK /* AQUA */
/* 121 */
@@ -390,7 +392,7 @@ EXTERN KeySym TkpGetKeySym(TkDisplay *dispPtr, XEvent *eventPtr);
/* 139 */
EXTERN void TkpInitKeymapInfo(TkDisplay *dispPtr);
/* 140 */
-EXTERN TkRegion TkPhotoGetValidRegion(Tk_PhotoHandle handle);
+EXTERN Region TkPhotoGetValidRegion(Tk_PhotoHandle handle);
/* 141 */
EXTERN TkWindow ** TkWmStackorderToplevel(TkWindow *parentPtr);
/* 142 */
@@ -400,8 +402,8 @@ EXTERN void TkClipCleanup(TkDisplay *dispPtr);
/* 144 */
EXTERN void TkGCCleanup(TkDisplay *dispPtr);
/* 145 */
-EXTERN int TkSubtractRegion(TkRegion sra, TkRegion srcb,
- TkRegion dr_return);
+EXTERN int XSubtractRegion(Region sra, Region srcb,
+ Region dr_return);
/* 146 */
EXTERN void TkStylePkgInit(TkMainInfo *mainPtr);
/* 147 */
@@ -488,7 +490,7 @@ EXTERN int TkStateParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 170 */
-EXTERN CONST86 char * TkStatePrintProc(ClientData clientData,
+EXTERN const char * TkStatePrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 171 */
@@ -496,7 +498,7 @@ EXTERN int TkCanvasDashParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 172 */
-EXTERN CONST86 char * TkCanvasDashPrintProc(ClientData clientData,
+EXTERN const char * TkCanvasDashPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 173 */
@@ -504,7 +506,7 @@ EXTERN int TkOffsetParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 174 */
-EXTERN CONST86 char * TkOffsetPrintProc(ClientData clientData,
+EXTERN const char * TkOffsetPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 175 */
@@ -512,7 +514,7 @@ EXTERN int TkPixelParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 176 */
-EXTERN CONST86 char * TkPixelPrintProc(ClientData clientData,
+EXTERN const char * TkPixelPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 177 */
@@ -520,7 +522,7 @@ EXTERN int TkOrientParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 178 */
-EXTERN CONST86 char * TkOrientPrintProc(ClientData clientData,
+EXTERN const char * TkOrientPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 179 */
@@ -528,7 +530,7 @@ EXTERN int TkSmoothParseProc(ClientData clientData,
Tcl_Interp *interp, Tk_Window tkwin,
const char *value, char *widgRec, int offset);
/* 180 */
-EXTERN CONST86 char * TkSmoothPrintProc(ClientData clientData,
+EXTERN const char * TkSmoothPrintProc(ClientData clientData,
Tk_Window tkwin, char *widgRec, int offset,
Tcl_FreeProc **freeProcPtr);
/* 181 */
@@ -550,6 +552,10 @@ EXTERN void TkDrawAngledChars(Display *display,
Drawable drawable, GC gc, Tk_Font tkfont,
const char *source, int numBytes, double x,
double y, double angle);
+/* 185 */
+EXTERN int TkDebugPhotoStringMatchDef(Tcl_Interp *inter,
+ Tcl_Obj *data, Tcl_Obj *formatString,
+ int *widthPtr, int *heightPtr);
typedef struct TkIntStubs {
int magic;
@@ -577,7 +583,7 @@ typedef struct TkIntStubs {
void (*tkEventDeadWindow) (TkWindow *winPtr); /* 19 */
void (*tkFillPolygon) (Tk_Canvas canvas, double *coordPtr, int numPoints, Display *display, Drawable drawable, GC gc, GC outlineGC); /* 20 */
int (*tkFindStateNum) (Tcl_Interp *interp, const char *option, const TkStateMap *mapPtr, const char *strKey); /* 21 */
- CONST86 char * (*tkFindStateString) (const TkStateMap *mapPtr, int numKey); /* 22 */
+ const char * (*tkFindStateString) (const TkStateMap *mapPtr, int numKey); /* 22 */
void (*tkFocusDeadWindow) (TkWindow *winPtr); /* 23 */
int (*tkFocusFilterEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 24 */
TkWindow * (*tkFocusKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 25 */
@@ -601,7 +607,7 @@ typedef struct TkIntStubs {
void (*tkIncludePoint) (Tk_Item *itemPtr, double *pointPtr); /* 43 */
void (*tkInOutEvents) (XEvent *eventPtr, TkWindow *sourcePtr, TkWindow *destPtr, int leaveType, int enterType, Tcl_QueuePosition position); /* 44 */
void (*tkInstallFrameMenu) (Tk_Window tkwin); /* 45 */
- CONST86 char * (*tkKeysymToString) (KeySym keysym); /* 46 */
+ const char * (*tkKeysymToString) (KeySym keysym); /* 46 */
int (*tkLineToArea) (double end1Ptr[], double end2Ptr[], double rectPtr[]); /* 47 */
double (*tkLineToPoint) (double end1Ptr[], double end2Ptr[], double pointPtr[]); /* 48 */
int (*tkMakeBezierCurve) (Tk_Canvas canvas, double *pointPtr, int numPoints, int numSteps, XPoint xPoints[], double dblPoints[]); /* 49 */
@@ -634,7 +640,7 @@ typedef struct TkIntStubs {
void (*reserved76)(void);
void (*tkQueueEventForAllChildren) (TkWindow *winPtr, XEvent *eventPtr); /* 77 */
int (*tkReadBitmapFile) (Display *display, Drawable d, const char *filename, unsigned int *width_return, unsigned int *height_return, Pixmap *bitmap_return, int *x_hot_return, int *y_hot_return); /* 78 */
- int (*tkScrollWindow) (Tk_Window tkwin, GC gc, int x, int y, int width, int height, int dx, int dy, TkRegion damageRgn); /* 79 */
+ int (*tkScrollWindow) (Tk_Window tkwin, GC gc, int x, int y, int width, int height, int dx, int dy, Region damageRgn); /* 79 */
void (*tkSelDeadWindow) (TkWindow *winPtr); /* 80 */
void (*tkSelEventProc) (Tk_Window tkwin, XEvent *eventPtr); /* 81 */
void (*tkSelInit) (Tk_Window tkwin); /* 82 */
@@ -664,17 +670,17 @@ typedef struct TkIntStubs {
TkDisplay * (*tkGetDisplayList) (void); /* 106 */
TkMainInfo * (*tkGetMainInfoList) (void); /* 107 */
int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */
- CONST86 char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */
+ const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */
void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */
Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */
void (*tkpMenuThreadInit) (void); /* 112 */
- int (*tkClipBox) (TkRegion rgn, XRectangle *rect_return); /* 113 */
- TkRegion (*tkCreateRegion) (void); /* 114 */
- int (*tkDestroyRegion) (TkRegion rgn); /* 115 */
- int (*tkIntersectRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 116 */
- int (*tkRectInRegion) (TkRegion rgn, int x, int y, unsigned int width, unsigned int height); /* 117 */
- int (*tkSetRegion) (Display *display, GC gc, TkRegion rgn); /* 118 */
- int (*tkUnionRectWithRegion) (XRectangle *rect, TkRegion src, TkRegion dr_return); /* 119 */
+ int (*xClipBox) (Region rgn, XRectangle *rect_return); /* 113 */
+ Region (*xCreateRegion) (void); /* 114 */
+ int (*xDestroyRegion) (Region rgn); /* 115 */
+ int (*xIntersectRegion) (Region sra, Region srcb, Region dr_return); /* 116 */
+ int (*xRectInRegion) (Region rgn, int x, int y, unsigned int width, unsigned int height); /* 117 */
+ int (*xSetRegion) (Display *display, GC gc, Region rgn); /* 118 */
+ int (*xUnionRectWithRegion) (XRectangle *rect, Region src, Region dr_return); /* 119 */
void (*reserved120)(void);
#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
void (*reserved121)(void);
@@ -722,12 +728,12 @@ typedef struct TkIntStubs {
void (*tkpSetKeycodeAndState) (Tk_Window tkwin, KeySym keySym, XEvent *eventPtr); /* 137 */
KeySym (*tkpGetKeySym) (TkDisplay *dispPtr, XEvent *eventPtr); /* 138 */
void (*tkpInitKeymapInfo) (TkDisplay *dispPtr); /* 139 */
- TkRegion (*tkPhotoGetValidRegion) (Tk_PhotoHandle handle); /* 140 */
+ Region (*tkPhotoGetValidRegion) (Tk_PhotoHandle handle); /* 140 */
TkWindow ** (*tkWmStackorderToplevel) (TkWindow *parentPtr); /* 141 */
void (*tkFocusFree) (TkMainInfo *mainPtr); /* 142 */
void (*tkClipCleanup) (TkDisplay *dispPtr); /* 143 */
void (*tkGCCleanup) (TkDisplay *dispPtr); /* 144 */
- int (*tkSubtractRegion) (TkRegion sra, TkRegion srcb, TkRegion dr_return); /* 145 */
+ int (*xSubtractRegion) (Region sra, Region srcb, Region dr_return); /* 145 */
void (*tkStylePkgInit) (TkMainInfo *mainPtr); /* 146 */
void (*tkStylePkgFree) (TkMainInfo *mainPtr); /* 147 */
Tk_Window (*tkToplevelWindowForCommand) (Tcl_Interp *interp, const char *cmdName); /* 148 */
@@ -752,21 +758,22 @@ typedef struct TkIntStubs {
int (*tkBTreeNumLines) (TkTextBTree tree, const struct TkText *textPtr); /* 167 */
void (*tkTextInsertDisplayProc) (struct TkText *textPtr, struct TkTextDispChunk *chunkPtr, int x, int y, int height, int baseline, Display *display, Drawable dst, int screenY); /* 168 */
int (*tkStateParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 169 */
- CONST86 char * (*tkStatePrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 170 */
+ const char * (*tkStatePrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 170 */
int (*tkCanvasDashParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 171 */
- CONST86 char * (*tkCanvasDashPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 172 */
+ const char * (*tkCanvasDashPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 172 */
int (*tkOffsetParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 173 */
- CONST86 char * (*tkOffsetPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 174 */
+ const char * (*tkOffsetPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 174 */
int (*tkPixelParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 175 */
- CONST86 char * (*tkPixelPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 176 */
+ const char * (*tkPixelPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 176 */
int (*tkOrientParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 177 */
- CONST86 char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */
+ const char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */
int (*tkSmoothParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 179 */
- CONST86 char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */
+ const char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */
void (*tkDrawAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int firstChar, int lastChar); /* 181 */
void (*tkUnderlineAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int underline); /* 182 */
int (*tkIntersectAngledTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height, double angle); /* 183 */
void (*tkDrawAngledChars) (Display *display, Drawable drawable, GC gc, Tk_Font tkfont, const char *source, int numBytes, double x, double y, double angle); /* 184 */
+ int (*tkDebugPhotoStringMatchDef) (Tcl_Interp *inter, Tcl_Obj *data, Tcl_Obj *formatString, int *widthPtr, int *heightPtr); /* 185 */
} TkIntStubs;
extern const TkIntStubs *tkIntStubsPtr;
@@ -1002,20 +1009,20 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkpGetSystemDefault) /* 111 */
#define TkpMenuThreadInit \
(tkIntStubsPtr->tkpMenuThreadInit) /* 112 */
-#define TkClipBox \
- (tkIntStubsPtr->tkClipBox) /* 113 */
-#define TkCreateRegion \
- (tkIntStubsPtr->tkCreateRegion) /* 114 */
-#define TkDestroyRegion \
- (tkIntStubsPtr->tkDestroyRegion) /* 115 */
-#define TkIntersectRegion \
- (tkIntStubsPtr->tkIntersectRegion) /* 116 */
-#define TkRectInRegion \
- (tkIntStubsPtr->tkRectInRegion) /* 117 */
-#define TkSetRegion \
- (tkIntStubsPtr->tkSetRegion) /* 118 */
-#define TkUnionRectWithRegion \
- (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */
+#define XClipBox \
+ (tkIntStubsPtr->xClipBox) /* 113 */
+#define XCreateRegion \
+ (tkIntStubsPtr->xCreateRegion) /* 114 */
+#define XDestroyRegion \
+ (tkIntStubsPtr->xDestroyRegion) /* 115 */
+#define XIntersectRegion \
+ (tkIntStubsPtr->xIntersectRegion) /* 116 */
+#define XRectInRegion \
+ (tkIntStubsPtr->xRectInRegion) /* 117 */
+#define XSetRegion \
+ (tkIntStubsPtr->xSetRegion) /* 118 */
+#define XUnionRectWithRegion \
+ (tkIntStubsPtr->xUnionRectWithRegion) /* 119 */
/* Slot 120 is reserved */
#ifdef MAC_OSX_TK /* AQUA */
#define TkpCreateNativeBitmap \
@@ -1060,8 +1067,8 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkClipCleanup) /* 143 */
#define TkGCCleanup \
(tkIntStubsPtr->tkGCCleanup) /* 144 */
-#define TkSubtractRegion \
- (tkIntStubsPtr->tkSubtractRegion) /* 145 */
+#define XSubtractRegion \
+ (tkIntStubsPtr->xSubtractRegion) /* 145 */
#define TkStylePkgInit \
(tkIntStubsPtr->tkStylePkgInit) /* 146 */
#define TkStylePkgFree \
@@ -1139,6 +1146,8 @@ extern const TkIntStubs *tkIntStubsPtr;
(tkIntStubsPtr->tkIntersectAngledTextLayout) /* 183 */
#define TkDrawAngledChars \
(tkIntStubsPtr->tkDrawAngledChars) /* 184 */
+#define TkDebugPhotoStringMatchDef \
+ (tkIntStubsPtr->tkDebugPhotoStringMatchDef) /* 185 */
#endif /* defined(USE_TK_STUBS) */
@@ -1147,33 +1156,5 @@ extern const TkIntStubs *tkIntStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
-/*
- * On X11, these macros are just wrappers for the equivalent X Region calls.
- */
-#if !(defined(_WIN32) || defined(__CYGWIN__) || defined(MAC_OSX_TK)) /* X11 */
-
-#undef TkClipBox
-#undef TkCreateRegion
-#undef TkDestroyRegion
-#undef TkIntersectRegion
-#undef TkRectInRegion
-#undef TkSetRegion
-#undef TkSubtractRegion
-#undef TkUnionRectWithRegion
-
-#define TkClipBox(rgn, rect) XClipBox((Region) rgn, rect)
-#define TkCreateRegion() (TkRegion) XCreateRegion()
-#define TkDestroyRegion(rgn) XDestroyRegion((Region) rgn)
-#define TkIntersectRegion(a, b, r) XIntersectRegion((Region) a, \
- (Region) b, (Region) r)
-#define TkRectInRegion(r, x, y, w, h) XRectInRegion((Region) r, x, y, w, h)
-#define TkSetRegion(d, gc, rgn) XSetRegion(d, gc, (Region) rgn)
-#define TkSubtractRegion(a, b, r) XSubtractRegion((Region) a, \
- (Region) b, (Region) r)
-#define TkUnionRectWithRegion(rect, src, ret) XUnionRectWithRegion(rect, \
- (Region) src, (Region) ret)
-
-#endif /* UNIX */
-
#endif /* _TKINTDECLS */
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h
index f496e55..085700b 100644
--- a/generic/tkIntPlatDecls.h
+++ b/generic/tkIntPlatDecls.h
@@ -217,7 +217,7 @@ EXTERN void TkMacOSXUnregisterMacWindow(void *portPtr);
/* 34 */
EXTERN int TkMacOSXUseMenuID(short macID);
/* 35 */
-EXTERN TkRegion TkMacOSXVisableClipRgn(TkWindow *winPtr);
+EXTERN Region TkMacOSXVisableClipRgn(TkWindow *winPtr);
/* 36 */
EXTERN void TkMacOSXWinBounds(TkWindow *winPtr, void *geometry);
/* 37 */
@@ -243,7 +243,7 @@ EXTERN void TkMacOSXPreprocessMenu(void);
/* 46 */
EXTERN int TkpIsWindowFloating(void *window);
/* 47 */
-EXTERN Tk_Window TkMacOSXGetCapture(void);
+EXTERN Tk_Window TkpGetCapture(void);
/* Slot 48 is reserved */
/* 49 */
EXTERN Tk_Window TkGetTransientMaster(TkWindow *winPtr);
@@ -383,7 +383,7 @@ typedef struct TkIntPlatStubs {
void (*tkMacOSXUpdateClipRgn) (TkWindow *winPtr); /* 32 */
void (*tkMacOSXUnregisterMacWindow) (void *portPtr); /* 33 */
int (*tkMacOSXUseMenuID) (short macID); /* 34 */
- TkRegion (*tkMacOSXVisableClipRgn) (TkWindow *winPtr); /* 35 */
+ Region (*tkMacOSXVisableClipRgn) (TkWindow *winPtr); /* 35 */
void (*tkMacOSXWinBounds) (TkWindow *winPtr, void *geometry); /* 36 */
void (*tkMacOSXWindowOffset) (void *wRef, int *xOffset, int *yOffset); /* 37 */
int (*tkSetMacColor) (unsigned long pixel, void *macColor); /* 38 */
@@ -395,7 +395,7 @@ typedef struct TkIntPlatStubs {
MacDrawable * (*tkMacOSXGetHostToplevel) (TkWindow *winPtr); /* 44 */
void (*tkMacOSXPreprocessMenu) (void); /* 45 */
int (*tkpIsWindowFloating) (void *window); /* 46 */
- Tk_Window (*tkMacOSXGetCapture) (void); /* 47 */
+ Tk_Window (*tkpGetCapture) (void); /* 47 */
void (*reserved48)(void);
Tk_Window (*tkGetTransientMaster) (TkWindow *winPtr); /* 49 */
int (*tkGenerateButtonEvent) (int x, int y, Window window, unsigned int state); /* 50 */
@@ -619,8 +619,8 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
(tkIntPlatStubsPtr->tkMacOSXPreprocessMenu) /* 45 */
#define TkpIsWindowFloating \
(tkIntPlatStubsPtr->tkpIsWindowFloating) /* 46 */
-#define TkMacOSXGetCapture \
- (tkIntPlatStubsPtr->tkMacOSXGetCapture) /* 47 */
+#define TkpGetCapture \
+ (tkIntPlatStubsPtr->tkpGetCapture) /* 47 */
/* Slot 48 is reserved */
#define TkGetTransientMaster \
(tkIntPlatStubsPtr->tkGetTransientMaster) /* 49 */
@@ -672,4 +672,7 @@ extern const TkIntPlatStubs *tkIntPlatStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+#undef TkWinGetPlatformId
+#define TkWinGetPlatformId() (2) /* VER_PLATFORM_WIN32_NT */
+
#endif /* _TKINTPLATDECLS */
diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h
index 4b91440..83d3c0b 100644
--- a/generic/tkIntXlibDecls.h
+++ b/generic/tkIntXlibDecls.h
@@ -23,17 +23,19 @@
# include <tcl.h>
#endif
-/* Some (older) versions of X11/Xutil.h have a wrong signature of those
- two functions, so move them out of the way temporarly. */
-#define XOffsetRegion _XOffsetRegion
-#define XUnionRegion _XUnionRegion
+#ifndef EXTERN
+# define EXTERN extern TCL_STORAGE_CLASS
+#endif
+
#include "X11/Xutil.h"
-#undef XOffsetRegion
-#undef XUnionRegion
#ifdef BUILD_tk
-#undef TCL_STORAGE_CLASS
-#define TCL_STORAGE_CLASS DLLEXPORT
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#else
+# ifndef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
+# endif
#endif
typedef int (*XAfterFunction) ( /* WARNING, this type not in Xlib spec */
@@ -413,8 +415,54 @@ EXTERN int XReparentWindow(Display *d, Window w, Window p,
EXTERN int XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
int sx, int sy, int dx, int dy,
unsigned int w, unsigned int h);
+/* 138 */
+EXTERN Region XPolygonRegion(XPoint *pts, int n, int rule);
+/* 139 */
+EXTERN int XPointInRegion(Region rgn, int x, int y);
+/* 140 */
+EXTERN XVaNestedList XVaCreateNestedList(int dummy, ...);
+/* 141 */
+EXTERN char * XSetICValues(XIC xic, ...);
+/* 142 */
+EXTERN char * XGetICValues(XIC xic, ...);
+/* 143 */
+EXTERN void XSetICFocus(XIC xic);
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
+/* Slot 146 is reserved */
+/* 147 */
+EXTERN void XFreeFontSet(Display *display, XFontSet fontset);
+/* 148 */
+EXTERN int XCloseIM(XIM im);
+/* 149 */
+EXTERN Bool XRegisterIMInstantiateCallback(Display *dpy,
+ struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class,
+ XIDProc callback, XPointer client_data);
+/* 150 */
+EXTERN Bool XUnregisterIMInstantiateCallback(Display *dpy,
+ struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class,
+ XIDProc callback, XPointer client_data);
+/* 151 */
+EXTERN char * XSetLocaleModifiers(const char *modifier_list);
+/* 152 */
+EXTERN XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb,
+ char *res_name, char *res_class);
+/* 153 */
+EXTERN char * XGetIMValues(XIM im, ...);
+/* 154 */
+EXTERN char * XSetIMValues(XIM im, ...);
+/* 155 */
+EXTERN XFontSet XCreateFontSet(Display *display,
+ _Xconst char *base_font_name_list,
+ char ***missing_charset_list,
+ int *missing_charset_count,
+ char **def_string);
+/* 156 */
+EXTERN void XFreeStringList(char **list);
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
/* 0 */
EXTERN int XSetDashes(Display *display, GC gc, int dash_offset,
_Xconst char *dash_list, int n);
@@ -438,7 +486,7 @@ EXTERN Colormap XCreateColormap(Display *d, Window w, Visual *v,
/* 7 */
EXTERN GContext XGContextFromGC(GC g);
/* 8 */
-EXTERN KeySym XKeycodeToKeysym(Display *d, KeyCode k, int i);
+EXTERN KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i);
/* 9 */
EXTERN KeySym XStringToKeysym(_Xconst char *c);
/* 10 */
@@ -677,20 +725,39 @@ EXTERN Status XQueryTree(Display *d, Window w1, Window *w2,
Window *w3, Window **w4, unsigned int *ui);
/* 91 */
EXTERN int XSync(Display *display, Bool discard);
-/* Slot 92 is reserved */
-/* Slot 93 is reserved */
-/* Slot 94 is reserved */
-/* Slot 95 is reserved */
-/* Slot 96 is reserved */
-/* Slot 97 is reserved */
-/* Slot 98 is reserved */
-/* Slot 99 is reserved */
-/* Slot 100 is reserved */
-/* Slot 101 is reserved */
-/* Slot 102 is reserved */
-/* Slot 103 is reserved */
-/* Slot 104 is reserved */
-/* Slot 105 is reserved */
+/* 92 */
+EXTERN Bool XTranslateCoordinates(Display *d, Window w1,
+ Window w2, int i1, int i2, int *i3, int *i4,
+ Window *w3);
+/* 93 */
+EXTERN int XDeleteProperty(Display *d, Window w, Atom a);
+/* 94 */
+EXTERN int XFreeCursor(Display *d, Cursor c);
+/* 95 */
+EXTERN int XGetInputFocus(Display *d, Window *w, int *i);
+/* 96 */
+EXTERN int XmbLookupString(XIC xi, XKeyPressedEvent *xk,
+ char *c, int i, KeySym *k, Status *s);
+/* 97 */
+EXTERN int XNextEvent(Display *d, XEvent *x);
+/* 98 */
+EXTERN int XPutBackEvent(Display *d, XEvent *x);
+/* 99 */
+EXTERN int XSetCommand(Display *d, Window w, char **c, int i);
+/* 100 */
+EXTERN int XWindowEvent(Display *d, Window w, long l, XEvent *x);
+/* 101 */
+EXTERN Status XGetWindowAttributes(Display *d, Window w,
+ XWindowAttributes *x);
+/* 102 */
+EXTERN Status XGetWMColormapWindows(Display *d, Window w,
+ Window **wpp, int *ip);
+/* 103 */
+EXTERN Status XIconifyWindow(Display *d, Window w, int i);
+/* 104 */
+EXTERN Status XWithdrawWindow(Display *d, Window w, int i);
+/* 105 */
+EXTERN XHostAddress * XListHosts(Display *d, int *i, Bool *b);
/* Slot 106 is reserved */
/* 107 */
EXTERN int XFlush(Display *display);
@@ -704,7 +771,9 @@ EXTERN int XFree(void *data);
EXTERN int XNoOp(Display *display);
/* 112 */
EXTERN XAfterFunction XSynchronize(Display *display, Bool onoff);
-/* Slot 113 is reserved */
+/* 113 */
+EXTERN Status XLookupColor(Display *d, Colormap c1,
+ _Xconst char *c2, XColor *x1, XColor *x2);
/* 114 */
EXTERN VisualID XVisualIDFromVisual(Visual *visual);
/* Slot 115 is reserved */
@@ -712,28 +781,100 @@ EXTERN VisualID XVisualIDFromVisual(Visual *visual);
/* Slot 117 is reserved */
/* Slot 118 is reserved */
/* Slot 119 is reserved */
-/* Slot 120 is reserved */
-/* Slot 121 is reserved */
-/* Slot 122 is reserved */
+/* 120 */
+EXTERN int XOffsetRegion(Region rgn, int dx, int dy);
+/* 121 */
+EXTERN int XUnionRegion(Region srca, Region srcb,
+ Region dr_return);
+/* 122 */
+EXTERN Window XCreateWindow(Display *display, Window parent, int x,
+ int y, unsigned int width,
+ unsigned int height,
+ unsigned int border_width, int depth,
+ unsigned int clazz, Visual *visual,
+ unsigned long value_mask,
+ XSetWindowAttributes *attributes);
/* Slot 123 is reserved */
/* Slot 124 is reserved */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
-/* Slot 129 is reserved */
-/* Slot 130 is reserved */
-/* Slot 131 is reserved */
-/* Slot 132 is reserved */
+/* 129 */
+EXTERN int XLowerWindow(Display *d, Window w);
+/* 130 */
+EXTERN int XFillArcs(Display *d, Drawable dr, GC gc, XArc *a,
+ int n);
+/* 131 */
+EXTERN int XDrawArcs(Display *d, Drawable dr, GC gc, XArc *a,
+ int n);
+/* 132 */
+EXTERN int XDrawRectangles(Display *d, Drawable dr, GC gc,
+ XRectangle *r, int n);
/* Slot 133 is reserved */
/* Slot 134 is reserved */
/* Slot 135 is reserved */
-/* Slot 136 is reserved */
+/* 136 */
+EXTERN int XReparentWindow(Display *d, Window w, Window p,
+ int x, int y);
/* 137 */
EXTERN int XPutImage(Display *d, Drawable dr, GC gc, XImage *im,
int sx, int sy, int dx, int dy,
unsigned int w, unsigned int h);
-#endif /* AQUA */
+/* 138 */
+EXTERN Region XPolygonRegion(XPoint *pts, int n, int rule);
+/* 139 */
+EXTERN int XPointInRegion(Region rgn, int x, int y);
+/* 140 */
+EXTERN XVaNestedList XVaCreateNestedList(int dummy, ...);
+/* 141 */
+EXTERN char * XSetICValues(XIC xic, ...);
+/* 142 */
+EXTERN char * XGetICValues(XIC xic, ...);
+/* 143 */
+EXTERN void XSetICFocus(XIC xic);
+/* 144 */
+EXTERN void XDestroyIC(XIC xic);
+/* 145 */
+EXTERN Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
+ XColor *x1, XColor *x2, unsigned int ui1,
+ unsigned int ui2);
+/* 146 */
+EXTERN Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
+ unsigned int ui1, unsigned int ui2,
+ XColor _Xconst *x1, XColor _Xconst *x2);
+/* 147 */
+EXTERN void XFreeFontSet(Display *display, XFontSet fontset);
+/* 148 */
+EXTERN int XCloseIM(XIM im);
+/* 149 */
+EXTERN Bool XRegisterIMInstantiateCallback(Display *dpy,
+ struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class,
+ XIDProc callback, XPointer client_data);
+/* 150 */
+EXTERN Bool XUnregisterIMInstantiateCallback(Display *dpy,
+ struct _XrmHashBucketRec *rbd,
+ char *res_name, char *res_class,
+ XIDProc callback, XPointer client_data);
+/* 151 */
+EXTERN char * XSetLocaleModifiers(const char *modifier_list);
+/* 152 */
+EXTERN XIM XOpenIM(Display *dpy, struct _XrmHashBucketRec *rdb,
+ char *res_name, char *res_class);
+/* 153 */
+EXTERN char * XGetIMValues(XIM im, ...);
+/* 154 */
+EXTERN char * XSetIMValues(XIM im, ...);
+/* 155 */
+EXTERN XFontSet XCreateFontSet(Display *display,
+ _Xconst char *base_font_name_list,
+ char ***missing_charset_list,
+ int *missing_charset_count,
+ char **def_string);
+/* 156 */
+EXTERN void XFreeStringList(char **list);
+#endif /* MACOSX */
typedef struct TkIntXlibStubs {
int magic;
@@ -878,8 +1019,27 @@ typedef struct TkIntXlibStubs {
int (*xDrawPoints) (Display *d, Drawable dr, GC gc, XPoint *p, int n, int m); /* 135 */
int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */
int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */
+ Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */
+ int (*xPointInRegion) (Region rgn, int x, int y); /* 139 */
+ XVaNestedList (*xVaCreateNestedList) (int dummy, ...); /* 140 */
+ char * (*xSetICValues) (XIC xic, ...); /* 141 */
+ char * (*xGetICValues) (XIC xic, ...); /* 142 */
+ void (*xSetICFocus) (XIC xic); /* 143 */
+ void (*reserved144)(void);
+ void (*reserved145)(void);
+ void (*reserved146)(void);
+ void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */
+ int (*xCloseIM) (XIM im); /* 148 */
+ Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */
+ Bool (*xUnregisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 150 */
+ char * (*xSetLocaleModifiers) (const char *modifier_list); /* 151 */
+ XIM (*xOpenIM) (Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class); /* 152 */
+ char * (*xGetIMValues) (XIM im, ...); /* 153 */
+ char * (*xSetIMValues) (XIM im, ...); /* 154 */
+ XFontSet (*xCreateFontSet) (Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string); /* 155 */
+ void (*xFreeStringList) (char **list); /* 156 */
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
int (*xSetDashes) (Display *display, GC gc, int dash_offset, _Xconst char *dash_list, int n); /* 0 */
XModifierKeymap * (*xGetModifierMapping) (Display *d); /* 1 */
XImage * (*xCreateImage) (Display *d, Visual *v, unsigned int ui1, int i1, int i2, char *cp, unsigned int ui2, unsigned int ui3, int i3, int i4); /* 2 */
@@ -888,7 +1048,7 @@ typedef struct TkIntXlibStubs {
char * (*xKeysymToString) (KeySym k); /* 5 */
Colormap (*xCreateColormap) (Display *d, Window w, Visual *v, int i); /* 6 */
GContext (*xGContextFromGC) (GC g); /* 7 */
- KeySym (*xKeycodeToKeysym) (Display *d, KeyCode k, int i); /* 8 */
+ KeySym (*xKeycodeToKeysym) (Display *d, unsigned int k, int i); /* 8 */
KeySym (*xStringToKeysym) (_Xconst char *c); /* 9 */
Window (*xRootWindow) (Display *d, int i); /* 10 */
XErrorHandler (*xSetErrorHandler) (XErrorHandler x); /* 11 */
@@ -972,20 +1132,20 @@ typedef struct TkIntXlibStubs {
int (*xQueryColors) (Display *display, Colormap colormap, XColor *defs_in_out, int ncolors); /* 89 */
Status (*xQueryTree) (Display *d, Window w1, Window *w2, Window *w3, Window **w4, unsigned int *ui); /* 90 */
int (*xSync) (Display *display, Bool discard); /* 91 */
- void (*reserved92)(void);
- void (*reserved93)(void);
- void (*reserved94)(void);
- void (*reserved95)(void);
- void (*reserved96)(void);
- void (*reserved97)(void);
- void (*reserved98)(void);
- void (*reserved99)(void);
- void (*reserved100)(void);
- void (*reserved101)(void);
- void (*reserved102)(void);
- void (*reserved103)(void);
- void (*reserved104)(void);
- void (*reserved105)(void);
+ Bool (*xTranslateCoordinates) (Display *d, Window w1, Window w2, int i1, int i2, int *i3, int *i4, Window *w3); /* 92 */
+ int (*xDeleteProperty) (Display *d, Window w, Atom a); /* 93 */
+ int (*xFreeCursor) (Display *d, Cursor c); /* 94 */
+ int (*xGetInputFocus) (Display *d, Window *w, int *i); /* 95 */
+ int (*xmbLookupString) (XIC xi, XKeyPressedEvent *xk, char *c, int i, KeySym *k, Status *s); /* 96 */
+ int (*xNextEvent) (Display *d, XEvent *x); /* 97 */
+ int (*xPutBackEvent) (Display *d, XEvent *x); /* 98 */
+ int (*xSetCommand) (Display *d, Window w, char **c, int i); /* 99 */
+ int (*xWindowEvent) (Display *d, Window w, long l, XEvent *x); /* 100 */
+ Status (*xGetWindowAttributes) (Display *d, Window w, XWindowAttributes *x); /* 101 */
+ Status (*xGetWMColormapWindows) (Display *d, Window w, Window **wpp, int *ip); /* 102 */
+ Status (*xIconifyWindow) (Display *d, Window w, int i); /* 103 */
+ Status (*xWithdrawWindow) (Display *d, Window w, int i); /* 104 */
+ XHostAddress * (*xListHosts) (Display *d, int *i, Bool *b); /* 105 */
void (*reserved106)(void);
int (*xFlush) (Display *display); /* 107 */
int (*xGrabServer) (Display *display); /* 108 */
@@ -993,32 +1153,51 @@ typedef struct TkIntXlibStubs {
int (*xFree) (void *data); /* 110 */
int (*xNoOp) (Display *display); /* 111 */
XAfterFunction (*xSynchronize) (Display *display, Bool onoff); /* 112 */
- void (*reserved113)(void);
+ Status (*xLookupColor) (Display *d, Colormap c1, _Xconst char *c2, XColor *x1, XColor *x2); /* 113 */
VisualID (*xVisualIDFromVisual) (Visual *visual); /* 114 */
void (*reserved115)(void);
void (*reserved116)(void);
void (*reserved117)(void);
void (*reserved118)(void);
void (*reserved119)(void);
- void (*reserved120)(void);
- void (*reserved121)(void);
- void (*reserved122)(void);
+ int (*xOffsetRegion) (Region rgn, int dx, int dy); /* 120 */
+ int (*xUnionRegion) (Region srca, Region srcb, Region dr_return); /* 121 */
+ Window (*xCreateWindow) (Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clazz, Visual *visual, unsigned long value_mask, XSetWindowAttributes *attributes); /* 122 */
void (*reserved123)(void);
void (*reserved124)(void);
void (*reserved125)(void);
void (*reserved126)(void);
void (*reserved127)(void);
void (*reserved128)(void);
- void (*reserved129)(void);
- void (*reserved130)(void);
- void (*reserved131)(void);
- void (*reserved132)(void);
+ int (*xLowerWindow) (Display *d, Window w); /* 129 */
+ int (*xFillArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 130 */
+ int (*xDrawArcs) (Display *d, Drawable dr, GC gc, XArc *a, int n); /* 131 */
+ int (*xDrawRectangles) (Display *d, Drawable dr, GC gc, XRectangle *r, int n); /* 132 */
void (*reserved133)(void);
void (*reserved134)(void);
void (*reserved135)(void);
- void (*reserved136)(void);
+ int (*xReparentWindow) (Display *d, Window w, Window p, int x, int y); /* 136 */
int (*xPutImage) (Display *d, Drawable dr, GC gc, XImage *im, int sx, int sy, int dx, int dy, unsigned int w, unsigned int h); /* 137 */
-#endif /* AQUA */
+ Region (*xPolygonRegion) (XPoint *pts, int n, int rule); /* 138 */
+ int (*xPointInRegion) (Region rgn, int x, int y); /* 139 */
+ XVaNestedList (*xVaCreateNestedList) (int dummy, ...); /* 140 */
+ char * (*xSetICValues) (XIC xic, ...); /* 141 */
+ char * (*xGetICValues) (XIC xic, ...); /* 142 */
+ void (*xSetICFocus) (XIC xic); /* 143 */
+ void (*xDestroyIC) (XIC xic); /* 144 */
+ Cursor (*xCreatePixmapCursor) (Display *d, Pixmap p1, Pixmap p2, XColor *x1, XColor *x2, unsigned int ui1, unsigned int ui2); /* 145 */
+ Cursor (*xCreateGlyphCursor) (Display *d, Font f1, Font f2, unsigned int ui1, unsigned int ui2, XColor _Xconst *x1, XColor _Xconst *x2); /* 146 */
+ void (*xFreeFontSet) (Display *display, XFontSet fontset); /* 147 */
+ int (*xCloseIM) (XIM im); /* 148 */
+ Bool (*xRegisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 149 */
+ Bool (*xUnregisterIMInstantiateCallback) (Display *dpy, struct _XrmHashBucketRec *rbd, char *res_name, char *res_class, XIDProc callback, XPointer client_data); /* 150 */
+ char * (*xSetLocaleModifiers) (const char *modifier_list); /* 151 */
+ XIM (*xOpenIM) (Display *dpy, struct _XrmHashBucketRec *rdb, char *res_name, char *res_class); /* 152 */
+ char * (*xGetIMValues) (XIM im, ...); /* 153 */
+ char * (*xSetIMValues) (XIM im, ...); /* 154 */
+ XFontSet (*xCreateFontSet) (Display *display, _Xconst char *base_font_name_list, char ***missing_charset_list, int *missing_charset_count, char **def_string); /* 155 */
+ void (*xFreeStringList) (char **list); /* 156 */
+#endif /* MACOSX */
} TkIntXlibStubs;
extern const TkIntXlibStubs *tkIntXlibStubsPtr;
@@ -1298,8 +1477,43 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xReparentWindow) /* 136 */
#define XPutImage \
(tkIntXlibStubsPtr->xPutImage) /* 137 */
+#define XPolygonRegion \
+ (tkIntXlibStubsPtr->xPolygonRegion) /* 138 */
+#define XPointInRegion \
+ (tkIntXlibStubsPtr->xPointInRegion) /* 139 */
+#define XVaCreateNestedList \
+ (tkIntXlibStubsPtr->xVaCreateNestedList) /* 140 */
+#define XSetICValues \
+ (tkIntXlibStubsPtr->xSetICValues) /* 141 */
+#define XGetICValues \
+ (tkIntXlibStubsPtr->xGetICValues) /* 142 */
+#define XSetICFocus \
+ (tkIntXlibStubsPtr->xSetICFocus) /* 143 */
+/* Slot 144 is reserved */
+/* Slot 145 is reserved */
+/* Slot 146 is reserved */
+#define XFreeFontSet \
+ (tkIntXlibStubsPtr->xFreeFontSet) /* 147 */
+#define XCloseIM \
+ (tkIntXlibStubsPtr->xCloseIM) /* 148 */
+#define XRegisterIMInstantiateCallback \
+ (tkIntXlibStubsPtr->xRegisterIMInstantiateCallback) /* 149 */
+#define XUnregisterIMInstantiateCallback \
+ (tkIntXlibStubsPtr->xUnregisterIMInstantiateCallback) /* 150 */
+#define XSetLocaleModifiers \
+ (tkIntXlibStubsPtr->xSetLocaleModifiers) /* 151 */
+#define XOpenIM \
+ (tkIntXlibStubsPtr->xOpenIM) /* 152 */
+#define XGetIMValues \
+ (tkIntXlibStubsPtr->xGetIMValues) /* 153 */
+#define XSetIMValues \
+ (tkIntXlibStubsPtr->xSetIMValues) /* 154 */
+#define XCreateFontSet \
+ (tkIntXlibStubsPtr->xCreateFontSet) /* 155 */
+#define XFreeStringList \
+ (tkIntXlibStubsPtr->xFreeStringList) /* 156 */
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
#define XSetDashes \
(tkIntXlibStubsPtr->xSetDashes) /* 0 */
#define XGetModifierMapping \
@@ -1484,20 +1698,34 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xQueryTree) /* 90 */
#define XSync \
(tkIntXlibStubsPtr->xSync) /* 91 */
-/* Slot 92 is reserved */
-/* Slot 93 is reserved */
-/* Slot 94 is reserved */
-/* Slot 95 is reserved */
-/* Slot 96 is reserved */
-/* Slot 97 is reserved */
-/* Slot 98 is reserved */
-/* Slot 99 is reserved */
-/* Slot 100 is reserved */
-/* Slot 101 is reserved */
-/* Slot 102 is reserved */
-/* Slot 103 is reserved */
-/* Slot 104 is reserved */
-/* Slot 105 is reserved */
+#define XTranslateCoordinates \
+ (tkIntXlibStubsPtr->xTranslateCoordinates) /* 92 */
+#define XDeleteProperty \
+ (tkIntXlibStubsPtr->xDeleteProperty) /* 93 */
+#define XFreeCursor \
+ (tkIntXlibStubsPtr->xFreeCursor) /* 94 */
+#define XGetInputFocus \
+ (tkIntXlibStubsPtr->xGetInputFocus) /* 95 */
+#define XmbLookupString \
+ (tkIntXlibStubsPtr->xmbLookupString) /* 96 */
+#define XNextEvent \
+ (tkIntXlibStubsPtr->xNextEvent) /* 97 */
+#define XPutBackEvent \
+ (tkIntXlibStubsPtr->xPutBackEvent) /* 98 */
+#define XSetCommand \
+ (tkIntXlibStubsPtr->xSetCommand) /* 99 */
+#define XWindowEvent \
+ (tkIntXlibStubsPtr->xWindowEvent) /* 100 */
+#define XGetWindowAttributes \
+ (tkIntXlibStubsPtr->xGetWindowAttributes) /* 101 */
+#define XGetWMColormapWindows \
+ (tkIntXlibStubsPtr->xGetWMColormapWindows) /* 102 */
+#define XIconifyWindow \
+ (tkIntXlibStubsPtr->xIconifyWindow) /* 103 */
+#define XWithdrawWindow \
+ (tkIntXlibStubsPtr->xWithdrawWindow) /* 104 */
+#define XListHosts \
+ (tkIntXlibStubsPtr->xListHosts) /* 105 */
/* Slot 106 is reserved */
#define XFlush \
(tkIntXlibStubsPtr->xFlush) /* 107 */
@@ -1511,7 +1739,8 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
(tkIntXlibStubsPtr->xNoOp) /* 111 */
#define XSynchronize \
(tkIntXlibStubsPtr->xSynchronize) /* 112 */
-/* Slot 113 is reserved */
+#define XLookupColor \
+ (tkIntXlibStubsPtr->xLookupColor) /* 113 */
#define XVisualIDFromVisual \
(tkIntXlibStubsPtr->xVisualIDFromVisual) /* 114 */
/* Slot 115 is reserved */
@@ -1519,26 +1748,72 @@ extern const TkIntXlibStubs *tkIntXlibStubsPtr;
/* Slot 117 is reserved */
/* Slot 118 is reserved */
/* Slot 119 is reserved */
-/* Slot 120 is reserved */
-/* Slot 121 is reserved */
-/* Slot 122 is reserved */
+#define XOffsetRegion \
+ (tkIntXlibStubsPtr->xOffsetRegion) /* 120 */
+#define XUnionRegion \
+ (tkIntXlibStubsPtr->xUnionRegion) /* 121 */
+#define XCreateWindow \
+ (tkIntXlibStubsPtr->xCreateWindow) /* 122 */
/* Slot 123 is reserved */
/* Slot 124 is reserved */
/* Slot 125 is reserved */
/* Slot 126 is reserved */
/* Slot 127 is reserved */
/* Slot 128 is reserved */
-/* Slot 129 is reserved */
-/* Slot 130 is reserved */
-/* Slot 131 is reserved */
-/* Slot 132 is reserved */
+#define XLowerWindow \
+ (tkIntXlibStubsPtr->xLowerWindow) /* 129 */
+#define XFillArcs \
+ (tkIntXlibStubsPtr->xFillArcs) /* 130 */
+#define XDrawArcs \
+ (tkIntXlibStubsPtr->xDrawArcs) /* 131 */
+#define XDrawRectangles \
+ (tkIntXlibStubsPtr->xDrawRectangles) /* 132 */
/* Slot 133 is reserved */
/* Slot 134 is reserved */
/* Slot 135 is reserved */
-/* Slot 136 is reserved */
+#define XReparentWindow \
+ (tkIntXlibStubsPtr->xReparentWindow) /* 136 */
#define XPutImage \
(tkIntXlibStubsPtr->xPutImage) /* 137 */
-#endif /* AQUA */
+#define XPolygonRegion \
+ (tkIntXlibStubsPtr->xPolygonRegion) /* 138 */
+#define XPointInRegion \
+ (tkIntXlibStubsPtr->xPointInRegion) /* 139 */
+#define XVaCreateNestedList \
+ (tkIntXlibStubsPtr->xVaCreateNestedList) /* 140 */
+#define XSetICValues \
+ (tkIntXlibStubsPtr->xSetICValues) /* 141 */
+#define XGetICValues \
+ (tkIntXlibStubsPtr->xGetICValues) /* 142 */
+#define XSetICFocus \
+ (tkIntXlibStubsPtr->xSetICFocus) /* 143 */
+#define XDestroyIC \
+ (tkIntXlibStubsPtr->xDestroyIC) /* 144 */
+#define XCreatePixmapCursor \
+ (tkIntXlibStubsPtr->xCreatePixmapCursor) /* 145 */
+#define XCreateGlyphCursor \
+ (tkIntXlibStubsPtr->xCreateGlyphCursor) /* 146 */
+#define XFreeFontSet \
+ (tkIntXlibStubsPtr->xFreeFontSet) /* 147 */
+#define XCloseIM \
+ (tkIntXlibStubsPtr->xCloseIM) /* 148 */
+#define XRegisterIMInstantiateCallback \
+ (tkIntXlibStubsPtr->xRegisterIMInstantiateCallback) /* 149 */
+#define XUnregisterIMInstantiateCallback \
+ (tkIntXlibStubsPtr->xUnregisterIMInstantiateCallback) /* 150 */
+#define XSetLocaleModifiers \
+ (tkIntXlibStubsPtr->xSetLocaleModifiers) /* 151 */
+#define XOpenIM \
+ (tkIntXlibStubsPtr->xOpenIM) /* 152 */
+#define XGetIMValues \
+ (tkIntXlibStubsPtr->xGetIMValues) /* 153 */
+#define XSetIMValues \
+ (tkIntXlibStubsPtr->xSetIMValues) /* 154 */
+#define XCreateFontSet \
+ (tkIntXlibStubsPtr->xCreateFontSet) /* 155 */
+#define XFreeStringList \
+ (tkIntXlibStubsPtr->xFreeStringList) /* 156 */
+#endif /* MACOSX */
#endif /* defined(USE_TK_STUBS) */
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index d92325f..1264813 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -12,8 +12,8 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
+#include "default.h"
#ifdef _WIN32
#include "tkWinInt.h"
@@ -239,78 +239,78 @@ static const char *const activeStyleStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle",
- DEF_LISTBOX_ACTIVE_STYLE, -1, Tk_Offset(Listbox, activeStyle),
+ DEF_LISTBOX_ACTIVE_STYLE, -1, offsetof(Listbox, activeStyle),
0, activeStyleStrings, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_LISTBOX_BG_COLOR, -1, Tk_Offset(Listbox, normalBorder),
+ DEF_LISTBOX_BG_COLOR, -1, offsetof(Listbox, normalBorder),
0, DEF_LISTBOX_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_LISTBOX_BORDER_WIDTH, -1, Tk_Offset(Listbox, borderWidth),
+ DEF_LISTBOX_BORDER_WIDTH, -1, offsetof(Listbox, borderWidth),
0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_LISTBOX_CURSOR, -1, Tk_Offset(Listbox, cursor),
+ DEF_LISTBOX_CURSOR, -1, offsetof(Listbox, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_LISTBOX_DISABLED_FG, -1,
- Tk_Offset(Listbox, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(Listbox, dfgColorPtr), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
"ExportSelection", DEF_LISTBOX_EXPORT_SELECTION, -1,
- Tk_Offset(Listbox, exportSelection), 0, 0, 0},
+ offsetof(Listbox, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_LISTBOX_FONT, -1, Tk_Offset(Listbox, tkfont), 0, 0, 0},
+ DEF_LISTBOX_FONT, -1, offsetof(Listbox, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_LISTBOX_FG, -1, Tk_Offset(Listbox, fgColorPtr), 0, 0, 0},
+ DEF_LISTBOX_FG, -1, offsetof(Listbox, fgColorPtr), 0, 0, 0},
{TK_OPTION_INT, "-height", "height", "Height",
- DEF_LISTBOX_HEIGHT, -1, Tk_Offset(Listbox, height), 0, 0, 0},
+ DEF_LISTBOX_HEIGHT, -1, offsetof(Listbox, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_LISTBOX_HIGHLIGHT_BG, -1,
- Tk_Offset(Listbox, highlightBgColorPtr), 0, 0, 0},
+ offsetof(Listbox, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_LISTBOX_HIGHLIGHT, -1, Tk_Offset(Listbox, highlightColorPtr),
+ DEF_LISTBOX_HIGHLIGHT, -1, offsetof(Listbox, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_LISTBOX_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(Listbox, highlightWidth), 0, 0, 0},
+ offsetof(Listbox, highlightWidth), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_LISTBOX_JUSTIFY, -1, Tk_Offset(Listbox, justify), 0, 0, 0},
+ DEF_LISTBOX_JUSTIFY, -1, offsetof(Listbox, justify), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_LISTBOX_RELIEF, -1, Tk_Offset(Listbox, relief), 0, 0, 0},
+ DEF_LISTBOX_RELIEF, -1, offsetof(Listbox, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_LISTBOX_SELECT_COLOR, -1, Tk_Offset(Listbox, selBorder),
+ DEF_LISTBOX_SELECT_COLOR, -1, offsetof(Listbox, selBorder),
0, DEF_LISTBOX_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_LISTBOX_SELECT_BD, -1,
- Tk_Offset(Listbox, selBorderWidth), 0, 0, 0},
+ offsetof(Listbox, selBorderWidth), 0, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_LISTBOX_SELECT_FG_COLOR, -1, Tk_Offset(Listbox, selFgColorPtr),
+ DEF_LISTBOX_SELECT_FG_COLOR, -1, offsetof(Listbox, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_LISTBOX_SELECT_FG_MONO, 0},
{TK_OPTION_STRING, "-selectmode", "selectMode", "SelectMode",
- DEF_LISTBOX_SELECT_MODE, -1, Tk_Offset(Listbox, selectMode),
+ DEF_LISTBOX_SELECT_MODE, -1, offsetof(Listbox, selectMode),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid",
- DEF_LISTBOX_SET_GRID, -1, Tk_Offset(Listbox, setGrid), 0, 0, 0},
+ DEF_LISTBOX_SET_GRID, -1, offsetof(Listbox, setGrid), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_LISTBOX_STATE, -1, Tk_Offset(Listbox, state),
+ DEF_LISTBOX_STATE, -1, offsetof(Listbox, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_LISTBOX_TAKE_FOCUS, -1, Tk_Offset(Listbox, takeFocus),
+ DEF_LISTBOX_TAKE_FOCUS, -1, offsetof(Listbox, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_LISTBOX_WIDTH, -1, Tk_Offset(Listbox, width), 0, 0, 0},
+ DEF_LISTBOX_WIDTH, -1, offsetof(Listbox, width), 0, 0, 0},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_LISTBOX_SCROLL_COMMAND, -1, Tk_Offset(Listbox, xScrollCmd),
+ DEF_LISTBOX_SCROLL_COMMAND, -1, offsetof(Listbox, xScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- DEF_LISTBOX_SCROLL_COMMAND, -1, Tk_Offset(Listbox, yScrollCmd),
+ DEF_LISTBOX_SCROLL_COMMAND, -1, offsetof(Listbox, yScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-listvariable", "listVariable", "Variable",
- DEF_LISTBOX_LIST_VARIABLE, -1, Tk_Offset(Listbox, listVarName),
+ DEF_LISTBOX_LIST_VARIABLE, -1, offsetof(Listbox, listVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -322,7 +322,7 @@ static const Tk_OptionSpec optionSpecs[] = {
static const Tk_OptionSpec itemAttrOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- NULL, -1, Tk_Offset(ItemAttr, border),
+ NULL, -1, offsetof(ItemAttr, border),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
@@ -330,14 +330,14 @@ static const Tk_OptionSpec itemAttrOptionSpecs[] = {
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- NULL, -1, Tk_Offset(ItemAttr, fgColor),
+ NULL, -1, offsetof(ItemAttr, fgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- NULL, -1, Tk_Offset(ItemAttr, selBorder),
+ NULL, -1, offsetof(ItemAttr, selBorder),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_SELECT_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- NULL, -1, Tk_Offset(ItemAttr, selFgColor),
+ NULL, -1, offsetof(ItemAttr, selFgColor),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT,
DEF_LISTBOX_SELECT_FG_MONO, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
@@ -567,7 +567,7 @@ Tk_ListboxObjCmd(
ListboxEventProc, listPtr);
Tk_CreateSelHandler(listPtr->tkwin, XA_PRIMARY, XA_STRING,
ListboxFetchSelection, listPtr, XA_STRING);
- if (Tk_InitOptions(interp, (char *)listPtr,
+ if (Tk_InitOptions(interp, listPtr,
optionTables->listboxOptionTable, tkwin) != TCL_OK) {
Tk_DestroyWindow(listPtr->tkwin);
return TCL_ERROR;
@@ -682,7 +682,7 @@ ListboxWidgetObjCmd(
break;
}
- objPtr = Tk_GetOptionValue(interp, (char *) listPtr,
+ objPtr = Tk_GetOptionValue(interp, listPtr,
listPtr->optionTable, objv[2], listPtr->tkwin);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -694,7 +694,7 @@ ListboxWidgetObjCmd(
case COMMAND_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) listPtr,
+ objPtr = Tk_GetOptionInfo(interp, listPtr,
listPtr->optionTable,
(objc == 3) ? objv[2] : NULL, listPtr->tkwin);
if (objPtr == NULL) {
@@ -728,7 +728,7 @@ ListboxWidgetObjCmd(
objPtr = Tcl_NewObj();
for (i = 0; i < listPtr->nElements; i++) {
if (Tcl_FindHashEntry(listPtr->selection, KEY(i))) {
- Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewIntObj(i));
+ Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewWideIntObj(i));
}
}
Tcl_SetObjResult(interp, objPtr);
@@ -841,7 +841,7 @@ ListboxWidgetObjCmd(
if (result != TCL_OK) {
break;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
result = TCL_OK;
break;
@@ -926,7 +926,7 @@ ListboxWidgetObjCmd(
attrPtr = ListboxGetItemAttributes(interp, listPtr, index);
if (objc <= 4) {
- objPtr = Tk_GetOptionInfo(interp, (char *) attrPtr,
+ objPtr = Tk_GetOptionInfo(interp, attrPtr,
listPtr->itemAttrOptionTable,
(objc == 4) ? objv[3] : NULL, listPtr->tkwin);
if (objPtr == NULL) {
@@ -956,7 +956,7 @@ ListboxWidgetObjCmd(
break;
}
index = NearestListboxElement(listPtr, y);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
result = TCL_OK;
break;
}
@@ -1044,7 +1044,7 @@ ListboxWidgetObjCmd(
result = TCL_ERROR;
break;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(listPtr->nElements));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(listPtr->nElements));
result = TCL_OK;
break;
case COMMAND_XVIEW:
@@ -1102,7 +1102,8 @@ ListboxBboxSubCmd(
if ((listPtr->topIndex <= index) && (index < lastVisibleIndex)) {
Tcl_Obj *el, *results[4];
const char *stringRep;
- int pixelWidth, stringLen, x, y, result;
+ int pixelWidth, x, y, result;
+ TkSizeT stringLen;
Tk_FontMetrics fm;
/*
@@ -1114,7 +1115,7 @@ ListboxBboxSubCmd(
return result;
}
- stringRep = Tcl_GetStringFromObj(el, &stringLen);
+ stringRep = TkGetStringFromObj(el, &stringLen);
Tk_GetFontMetrics(listPtr->tkfont, &fm);
pixelWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen);
@@ -1129,10 +1130,10 @@ ListboxBboxSubCmd(
}
y = ((index - listPtr->topIndex)*listPtr->lineHeight)
+ listPtr->inset + listPtr->selBorderWidth;
- results[0] = Tcl_NewIntObj(x);
- results[1] = Tcl_NewIntObj(y);
- results[2] = Tcl_NewIntObj(pixelWidth);
- results[3] = Tcl_NewIntObj(fm.linespace);
+ results[0] = Tcl_NewWideIntObj(x);
+ results[1] = Tcl_NewWideIntObj(y);
+ results[2] = Tcl_NewWideIntObj(pixelWidth);
+ results[3] = Tcl_NewWideIntObj(fm.linespace);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -1415,7 +1416,7 @@ ListboxGetItemAttributes(
attrs->selBorder = NULL;
attrs->fgColor = NULL;
attrs->selFgColor = NULL;
- Tk_InitOptions(interp, (char *)attrs, listPtr->itemAttrOptionTable,
+ Tk_InitOptions(interp, attrs, listPtr->itemAttrOptionTable,
listPtr->tkwin);
Tcl_SetHashValue(entry, attrs);
} else {
@@ -1578,7 +1579,7 @@ ConfigureListbox(
* First pass: set options to new values.
*/
- if (Tk_SetOptions(interp, (char *) listPtr,
+ if (Tk_SetOptions(interp, listPtr,
listPtr->optionTable, objc, objv,
listPtr->tkwin, &savedOptions, NULL) != TCL_OK) {
continue;
@@ -1724,7 +1725,7 @@ ConfigureListboxItem(
{
Tk_SavedOptions savedOptions;
- if (Tk_SetOptions(interp, (char *)attrs,
+ if (Tk_SetOptions(interp, attrs,
listPtr->itemAttrOptionTable, objc, objv, listPtr->tkwin,
&savedOptions, NULL) != TCL_OK) {
Tk_RestoreSavedOptions(&savedOptions);
@@ -1840,7 +1841,8 @@ DisplayListbox(
register Listbox *listPtr = clientData;
register Tk_Window tkwin = listPtr->tkwin;
GC gc;
- int i, limit, x, y, prevSelected, freeGC, stringLen;
+ int i, limit, x, y, prevSelected, freeGC;
+ TkSizeT stringLen;
Tk_FontMetrics fm;
Tcl_Obj *curElement;
Tcl_HashEntry *entry;
@@ -2074,7 +2076,7 @@ DisplayListbox(
*/
Tcl_ListObjIndex(listPtr->interp, listPtr->listObj, i, &curElement);
- stringRep = Tcl_GetStringFromObj(curElement, &stringLen);
+ stringRep = TkGetStringFromObj(curElement, &stringLen);
textWidth = Tk_TextWidth(listPtr->tkfont, stringRep, stringLen);
Tk_GetFontMetrics(listPtr->tkfont, &fm);
@@ -2236,7 +2238,8 @@ ListboxComputeGeometry(
* Tk_UnsetGrid to update gridding for the
* window. */
{
- int width, height, pixelWidth, pixelHeight, textLength, i, result;
+ int width, height, pixelWidth, pixelHeight, i, result;
+ TkSizeT textLength;
Tk_FontMetrics fm;
Tcl_Obj *element;
const char *text;
@@ -2257,7 +2260,7 @@ ListboxComputeGeometry(
if (result != TCL_OK) {
continue;
}
- text = Tcl_GetStringFromObj(element, &textLength);
+ text = TkGetStringFromObj(element, &textLength);
Tk_GetFontMetrics(listPtr->tkfont, &fm);
pixelWidth = Tk_TextWidth(listPtr->tkfont, text, textLength);
if (pixelWidth > listPtr->maxWidth) {
@@ -2323,7 +2326,8 @@ ListboxInsertSubCmd(
int objc, /* Number of new elements to add. */
Tcl_Obj *const objv[]) /* New elements (one per entry). */
{
- int i, oldMaxWidth, pixelWidth, result, length;
+ int i, oldMaxWidth, pixelWidth, result;
+ TkSizeT length;
Tcl_Obj *newListObj;
const char *stringRep;
@@ -2334,7 +2338,7 @@ ListboxInsertSubCmd(
* if so, update our notion of "widest."
*/
- stringRep = Tcl_GetStringFromObj(objv[i], &length);
+ stringRep = TkGetStringFromObj(objv[i], &length);
pixelWidth = Tk_TextWidth(listPtr->tkfont, stringRep, length);
if (pixelWidth > listPtr->maxWidth) {
listPtr->maxWidth = pixelWidth;
@@ -2437,7 +2441,8 @@ ListboxDeleteSubCmd(
int first, /* Index of first element to delete. */
int last) /* Index of last element to delete. */
{
- int count, i, widthChanged, length, result, pixelWidth;
+ int count, i, widthChanged, result, pixelWidth;
+ TkSizeT length;
Tcl_Obj *newListObj, *element;
const char *stringRep;
Tcl_HashEntry *entry;
@@ -2492,7 +2497,7 @@ ListboxDeleteSubCmd(
if (widthChanged == 0) {
Tcl_ListObjIndex(listPtr->interp, listPtr->listObj, i, &element);
- stringRep = Tcl_GetStringFromObj(element, &length);
+ stringRep = TkGetStringFromObj(element, &length);
pixelWidth = Tk_TextWidth(listPtr->tkfont, stringRep, length);
if (pixelWidth == listPtr->maxWidth) {
widthChanged = 1;
@@ -3122,7 +3127,8 @@ ListboxFetchSelection(
{
register Listbox *listPtr = clientData;
Tcl_DString selection;
- int length, count, needNewline, stringLen, i;
+ int count, needNewline, i;
+ TkSizeT length, stringLen;
Tcl_Obj *curElement;
const char *stringRep;
Tcl_HashEntry *entry;
@@ -3145,7 +3151,7 @@ ListboxFetchSelection(
}
Tcl_ListObjIndex(listPtr->interp, listPtr->listObj, i,
&curElement);
- stringRep = Tcl_GetStringFromObj(curElement, &stringLen);
+ stringRep = TkGetStringFromObj(curElement, &stringLen);
Tcl_DStringAppend(&selection, stringRep, stringLen);
needNewline = 1;
}
@@ -3160,14 +3166,14 @@ ListboxFetchSelection(
* Copy the requested portion of the selection to the buffer.
*/
- count = length - offset;
- if (count <= 0) {
+ if (length <= (TkSizeT)offset) {
count = 0;
} else {
+ count = length - offset;
if (count > maxBytes) {
count = maxBytes;
}
- memcpy(buffer, Tcl_DStringValue(&selection) + offset, (size_t) count);
+ memcpy(buffer, Tcl_DStringValue(&selection) + offset, count);
}
buffer[count] = '\0';
Tcl_DStringFree(&selection);
diff --git a/generic/tkMacWinMenu.c b/generic/tkMacWinMenu.c
index ab92fec..0417185 100644
--- a/generic/tkMacWinMenu.c
+++ b/generic/tkMacWinMenu.c
@@ -66,7 +66,7 @@ PreprocessMenu(
do {
finished = 1;
- for (index = 0; index < menuPtr->numEntries; index++) {
+ for (index = 0; index < (int)menuPtr->numEntries; index++) {
register TkMenuEntry *entryPtr = menuPtr->entries[index];
if ((entryPtr->type == CASCADE_ENTRY)
diff --git a/generic/tkMain.c b/generic/tkMain.c
index f0b7b3e..17031dc 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -30,14 +30,6 @@
#endif
#include "tkInt.h"
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef NO_STDLIB_H
-# include "../compat/stdlib.h"
-#else
-# include <stdlib.h>
-#endif
extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
@@ -92,7 +84,8 @@ NewNativeObj(
Tcl_DString ds;
#ifdef UNICODE
- Tcl_WinTCharToUtf(string, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(string, wcslen(string), &ds);
#else
Tcl_ExternalToUtfDString(NULL, (char *) string, -1, &ds);
#endif
@@ -201,7 +194,7 @@ Tk_MainEx(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
abort();
} else {
@@ -302,7 +295,7 @@ Tk_MainEx(
argc--;
argv++;
- Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewIntObj(argc), TCL_GLOBAL_ONLY);
+ Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewWideIntObj(argc), TCL_GLOBAL_ONLY);
argvPtr = Tcl_NewListObj(0, NULL);
while (argc--) {
@@ -329,7 +322,7 @@ Tk_MainEx(
}
#endif
Tcl_SetVar2Ex(interp, "tcl_interactive", NULL,
- Tcl_NewIntObj(!path && (is.tty || nullStdin)), TCL_GLOBAL_ONLY);
+ Tcl_NewWideIntObj(!path && (is.tty || nullStdin)), TCL_GLOBAL_ONLY);
/*
* Invoke application-specific initialization.
@@ -429,14 +422,15 @@ StdinProc(
int mask) /* Not used. */
{
char *cmd;
- int code, count;
+ int code;
+ size_t count;
InteractiveState *isPtr = clientData;
Tcl_Channel chan = isPtr->input;
Tcl_Interp *interp = isPtr->interp;
- count = Tcl_Gets(chan, &isPtr->line);
+ count = (size_t)Tcl_Gets(chan, &isPtr->line);
- if (count == -1 && !isPtr->gotPartial) {
+ if (count == (size_t)-1 && !isPtr->gotPartial) {
if (isPtr->tty) {
Tcl_Exit(0);
} else {
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index d51febb..4c58981 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -38,7 +38,7 @@
* implemented using menu clones. Menu clones are full menus in their own
* right; they have a Tk window and pathname associated with them; they have a
* TkMenu structure and array of entries. However, they are linked with the
- * original menu that they were cloned from. The reflect the attributes of the
+ * original menu that they were cloned from. They reflect the attributes of the
* original, or "master", menu. So if an item is added to a menu, and that
* menu has clones, then the item must be added to all of its clones also.
* Menus are cloned when a menu is torn-off or when a menu is assigned as a
@@ -118,79 +118,79 @@ static const char *const compoundStrings[] = {
static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", NULL, NULL,
- DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1,
+ DEF_MENU_ENTRY_ACTIVE_BG, offsetof(TkMenuEntry, activeBorderPtr), -1,
TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-activeforeground", NULL, NULL,
DEF_MENU_ENTRY_ACTIVE_FG,
- Tk_Offset(TkMenuEntry, activeFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, activeFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-accelerator", NULL, NULL,
DEF_MENU_ENTRY_ACCELERATOR,
- Tk_Offset(TkMenuEntry, accelPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, accelPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BITMAP, "-bitmap", NULL, NULL,
DEF_MENU_ENTRY_BITMAP,
- Tk_Offset(TkMenuEntry, bitmapPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, bitmapPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-columnbreak", NULL, NULL,
DEF_MENU_ENTRY_COLUMN_BREAK,
- -1, Tk_Offset(TkMenuEntry, columnBreak), 0, NULL, 0},
+ -1, offsetof(TkMenuEntry, columnBreak), 0, NULL, 0},
{TK_OPTION_STRING, "-command", NULL, NULL,
DEF_MENU_ENTRY_COMMAND,
- Tk_Offset(TkMenuEntry, commandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, commandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_MENU_ENTRY_COMPOUND, -1, Tk_Offset(TkMenuEntry, compound), 0,
+ DEF_MENU_ENTRY_COMPOUND, -1, offsetof(TkMenuEntry, compound), 0,
(ClientData) compoundStrings, 0},
{TK_OPTION_FONT, "-font", NULL, NULL,
DEF_MENU_ENTRY_FONT,
- Tk_Offset(TkMenuEntry, fontPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, fontPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-foreground", NULL, NULL,
DEF_MENU_ENTRY_FG,
- Tk_Offset(TkMenuEntry, fgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, fgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-hidemargin", NULL, NULL,
DEF_MENU_ENTRY_HIDE_MARGIN,
- -1, Tk_Offset(TkMenuEntry, hideMargin), 0, NULL, 0},
+ -1, offsetof(TkMenuEntry, hideMargin), 0, NULL, 0},
{TK_OPTION_STRING, "-image", NULL, NULL,
DEF_MENU_ENTRY_IMAGE,
- Tk_Offset(TkMenuEntry, imagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, imagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-label", NULL, NULL,
DEF_MENU_ENTRY_LABEL,
- Tk_Offset(TkMenuEntry, labelPtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, labelPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING_TABLE, "-state", NULL, NULL,
DEF_MENU_ENTRY_STATE,
- -1, Tk_Offset(TkMenuEntry, state), 0,
+ -1, offsetof(TkMenuEntry, state), 0,
(ClientData) menuStateStrings, 0},
{TK_OPTION_INT, "-underline", NULL, NULL,
- DEF_MENU_ENTRY_UNDERLINE, -1, Tk_Offset(TkMenuEntry, underline), 0, NULL, 0},
+ DEF_MENU_ENTRY_UNDERLINE, -1, offsetof(TkMenuEntry, underline), 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
static const Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
static const Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
- -1, Tk_Offset(TkMenuEntry, indicatorOn), 0, NULL, 0},
+ -1, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
{TK_OPTION_STRING, "-offvalue", NULL, NULL,
DEF_MENU_ENTRY_OFF_VALUE,
- Tk_Offset(TkMenuEntry, offValuePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, offValuePtr), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-onvalue", NULL, NULL,
DEF_MENU_ENTRY_ON_VALUE,
- Tk_Offset(TkMenuEntry, onValuePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, onValuePtr), -1, 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", NULL, NULL,
DEF_MENU_ENTRY_SELECT,
- Tk_Offset(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-selectimage", NULL, NULL,
DEF_MENU_ENTRY_SELECT_IMAGE,
- Tk_Offset(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-variable", NULL, NULL,
DEF_MENU_ENTRY_CHECK_VARIABLE,
- Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
};
@@ -198,19 +198,19 @@ static const Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = {
static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
{TK_OPTION_BOOLEAN, "-indicatoron", NULL, NULL,
DEF_MENU_ENTRY_INDICATOR,
- -1, Tk_Offset(TkMenuEntry, indicatorOn), 0, NULL, 0},
+ -1, offsetof(TkMenuEntry, indicatorOn), 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", NULL, NULL,
DEF_MENU_ENTRY_SELECT,
- Tk_Offset(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, indicatorFgPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-selectimage", NULL, NULL,
DEF_MENU_ENTRY_SELECT_IMAGE,
- Tk_Offset(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, selectImagePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-value", NULL, NULL,
DEF_MENU_ENTRY_VALUE,
- Tk_Offset(TkMenuEntry, onValuePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, onValuePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-variable", NULL, NULL,
DEF_MENU_ENTRY_RADIO_VARIABLE,
- Tk_Offset(TkMenuEntry, namePtr), -1, 0, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), -1, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
};
@@ -218,7 +218,7 @@ static const Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = {
static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
{TK_OPTION_STRING, "-menu", NULL, NULL,
DEF_MENU_ENTRY_MENU,
- Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL,
NULL, 0, -1, 0, tkBasicMenuEntryConfigSpecs, 0}
};
@@ -226,9 +226,9 @@ static const Tk_OptionSpec tkCascadeEntryConfigSpecs[] = {
static const Tk_OptionSpec tkTearoffEntryConfigSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
DEF_MENU_ENTRY_BG,
- Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-state", NULL, NULL,
- DEF_MENU_ENTRY_STATE, -1, Tk_Offset(TkMenuEntry, state), 0,
+ DEF_MENU_ENTRY_STATE, -1, offsetof(TkMenuEntry, state), 0,
(ClientData) menuStateStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
@@ -250,17 +250,20 @@ static const char *const menuTypeStrings[] = {
static const Tk_OptionSpec tkMenuConfigSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground",
"Foreground", DEF_MENU_ACTIVE_BG_COLOR,
- Tk_Offset(TkMenu, activeBorderPtr), -1, 0,
+ offsetof(TkMenu, activeBorderPtr), -1, 0,
(ClientData) DEF_MENU_ACTIVE_BG_MONO, 0},
{TK_OPTION_PIXELS, "-activeborderwidth", "activeBorderWidth",
"BorderWidth", DEF_MENU_ACTIVE_BORDER_WIDTH,
- Tk_Offset(TkMenu, activeBorderWidthPtr), -1, 0, NULL, 0},
+ offsetof(TkMenu, activeBorderWidthPtr), -1, 0, NULL, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground",
"Background", DEF_MENU_ACTIVE_FG_COLOR,
- Tk_Offset(TkMenu, activeFgPtr), -1, 0,
+ offsetof(TkMenu, activeFgPtr), -1, 0,
(ClientData) DEF_MENU_ACTIVE_FG_MONO, 0},
+ {TK_OPTION_RELIEF, "-activerelief", "activeRelief", "Relief",
+ DEF_MENU_ACTIVE_RELIEF, offsetof(TkMenu, activeReliefPtr),
+ -1, 0, NULL, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MENU_BG_COLOR, Tk_Offset(TkMenu, borderPtr), -1, 0,
+ DEF_MENU_BG_COLOR, offsetof(TkMenu, borderPtr), -1, 0,
(ClientData) DEF_MENU_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
@@ -268,41 +271,41 @@ static const Tk_OptionSpec tkMenuConfigSpecs[] = {
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
DEF_MENU_BORDER_WIDTH,
- Tk_Offset(TkMenu, borderWidthPtr), -1, 0, NULL, 0},
+ offsetof(TkMenu, borderWidthPtr), -1, 0, NULL, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
DEF_MENU_CURSOR,
- Tk_Offset(TkMenu, cursorPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, cursorPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_MENU_DISABLED_FG_COLOR,
- Tk_Offset(TkMenu, disabledFgPtr), -1, TK_OPTION_NULL_OK,
+ offsetof(TkMenu, disabledFgPtr), -1, TK_OPTION_NULL_OK,
(ClientData) DEF_MENU_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MENU_FONT, Tk_Offset(TkMenu, fontPtr), -1, 0, NULL, 0},
+ DEF_MENU_FONT, offsetof(TkMenu, fontPtr), -1, 0, NULL, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MENU_FG, Tk_Offset(TkMenu, fgPtr), -1, 0, NULL, 0},
+ DEF_MENU_FG, offsetof(TkMenu, fgPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-postcommand", "postCommand", "Command",
DEF_MENU_POST_COMMAND,
- Tk_Offset(TkMenu, postCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, postCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENU_RELIEF, Tk_Offset(TkMenu, reliefPtr), -1, 0, NULL, 0},
+ DEF_MENU_RELIEF, offsetof(TkMenu, reliefPtr), -1, 0, NULL, 0},
{TK_OPTION_COLOR, "-selectcolor", "selectColor", "Background",
- DEF_MENU_SELECT_COLOR, Tk_Offset(TkMenu, indicatorFgPtr), -1, 0,
+ DEF_MENU_SELECT_COLOR, offsetof(TkMenu, indicatorFgPtr), -1, 0,
(ClientData) DEF_MENU_SELECT_MONO, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
DEF_MENU_TAKE_FOCUS,
- Tk_Offset(TkMenu, takeFocusPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, takeFocusPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_BOOLEAN, "-tearoff", "tearOff", "TearOff",
- DEF_MENU_TEAROFF, -1, Tk_Offset(TkMenu, tearoff), 0, NULL, 0},
+ DEF_MENU_TEAROFF, -1, offsetof(TkMenu, tearoff), 0, NULL, 0},
{TK_OPTION_STRING, "-tearoffcommand", "tearOffCommand",
"TearOffCommand", DEF_MENU_TEAROFF_CMD,
- Tk_Offset(TkMenu, tearoffCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
+ offsetof(TkMenu, tearoffCommandPtr), -1, TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING, "-title", "title", "Title",
- DEF_MENU_TITLE, Tk_Offset(TkMenu, titlePtr), -1,
+ DEF_MENU_TITLE, offsetof(TkMenu, titlePtr), -1,
TK_OPTION_NULL_OK, NULL, 0},
{TK_OPTION_STRING_TABLE, "-type", "type", "Type",
- DEF_MENU_TYPE, Tk_Offset(TkMenu, menuTypePtr), -1, TK_OPTION_NULL_OK,
+ DEF_MENU_TYPE, offsetof(TkMenu, menuTypePtr), -1, TK_OPTION_NULL_OK,
(ClientData) menuTypeStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0}
};
@@ -343,9 +346,9 @@ static void DestroyMenuHashTable(ClientData clientData,
Tcl_Interp *interp);
static void DestroyMenuInstance(TkMenu *menuPtr);
static void DestroyMenuEntry(void *memPtr);
-static int GetIndexFromCoords(Tcl_Interp *interp,
+static TkSizeT GetIndexFromCoords(Tcl_Interp *interp,
TkMenu *menuPtr, const char *string,
- int *indexPtr);
+ TkSizeT *indexPtr);
static int MenuDoYPosition(Tcl_Interp *interp,
TkMenu *menuPtr, Tcl_Obj *objPtr);
static int MenuDoXPosition(Tcl_Interp *interp,
@@ -354,7 +357,7 @@ static int MenuAddOrInsert(Tcl_Interp *interp,
TkMenu *menuPtr, Tcl_Obj *indexPtr, int objc,
Tcl_Obj *const objv[]);
static void MenuCmdDeletedProc(ClientData clientData);
-static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, int index, int type);
+static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, TkSizeT index, int type);
static char * MenuVarProc(ClientData clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
@@ -454,7 +457,7 @@ Tk_MenuObjCmd(
menuPtr->widgetCmd = Tcl_CreateObjCommand(interp,
Tk_PathName(menuPtr->tkwin), MenuWidgetObjCmd, menuPtr,
MenuCmdDeletedProc);
- menuPtr->active = -1;
+ menuPtr->active = TCL_INDEX_NONE;
menuPtr->cursorPtr = NULL;
menuPtr->masterMenuPtr = menuPtr;
menuPtr->menuType = UNKNOWN_TYPE;
@@ -465,7 +468,7 @@ Tk_MenuObjCmd(
Tk_CreateEventHandler(newWin,
ExposureMask|StructureNotifyMask|ActivateMask,
TkMenuEventProc, menuPtr);
- if (Tk_InitOptions(interp, (char *) menuPtr,
+ if (Tk_InitOptions(interp, menuPtr,
tsdPtr->menuOptionTable, menuPtr->tkwin)
!= TCL_OK) {
Tk_DestroyWindow(menuPtr->tkwin);
@@ -636,7 +639,7 @@ MenuWidgetObjCmd(
switch ((enum options) option) {
case MENU_ACTIVATE: {
- int index;
+ TkSizeT index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -648,9 +651,9 @@ MenuWidgetObjCmd(
if (menuPtr->active == index) {
goto done;
}
- if ((index >= 0) && ((menuPtr->entries[index]->type==SEPARATOR_ENTRY)
+ if ((index != TCL_INDEX_NONE) && ((menuPtr->entries[index]->type==SEPARATOR_ENTRY)
|| (menuPtr->entries[index]->state == ENTRY_DISABLED))) {
- index = -1;
+ index = TCL_INDEX_NONE;
}
result = TkActivateMenuEntry(menuPtr, index);
break;
@@ -672,7 +675,7 @@ MenuWidgetObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option");
goto error;
}
- resultPtr = Tk_GetOptionValue(interp, (char *) menuPtr,
+ resultPtr = Tk_GetOptionValue(interp, menuPtr,
tsdPtr->menuOptionTable, objv[2],
menuPtr->tkwin);
if (resultPtr == NULL) {
@@ -692,7 +695,7 @@ MenuWidgetObjCmd(
Tcl_Obj *resultPtr;
if (objc == 2) {
- resultPtr = Tk_GetOptionInfo(interp, (char *) menuPtr,
+ resultPtr = Tk_GetOptionInfo(interp, menuPtr,
tsdPtr->menuOptionTable, NULL,
menuPtr->tkwin);
if (resultPtr == NULL) {
@@ -702,7 +705,7 @@ MenuWidgetObjCmd(
Tcl_SetObjResult(interp, resultPtr);
}
} else if (objc == 3) {
- resultPtr = Tk_GetOptionInfo(interp, (char *) menuPtr,
+ resultPtr = Tk_GetOptionInfo(interp, menuPtr,
tsdPtr->menuOptionTable, objv[2],
menuPtr->tkwin);
if (resultPtr == NULL) {
@@ -720,7 +723,8 @@ MenuWidgetObjCmd(
break;
}
case MENU_DELETE: {
- int first, last;
+ TkSizeT first, last;
+ Tcl_WideInt w;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "first ?last?");
@@ -733,7 +737,8 @@ MenuWidgetObjCmd(
*/
if (isdigit(UCHAR(Tcl_GetString(objv[2])[0]))
- && Tcl_GetIntFromObj(NULL, objv[2], &first) == TCL_OK) {
+ && Tcl_GetWideIntFromObj(NULL, objv[2], &w) == TCL_OK) {
+ first = w;
if (first >= menuPtr->numEntries) {
goto done;
}
@@ -754,14 +759,14 @@ MenuWidgetObjCmd(
first = 1;
}
- if ((first == -1) || (last < first)) {
+ if ((first == TCL_INDEX_NONE) || (last < first)) {
goto done;
}
DeleteMenuCloneEntries(menuPtr, first, last);
break;
}
case MENU_ENTRYCGET: {
- int index;
+ TkSizeT index;
Tcl_Obj *resultPtr;
if (objc != 4) {
@@ -771,12 +776,12 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
goto done;
}
mePtr = menuPtr->entries[index];
Tcl_Preserve(mePtr);
- resultPtr = Tk_GetOptionValue(interp, (char *) mePtr,
+ resultPtr = Tk_GetOptionValue(interp, mePtr,
mePtr->optionTable, objv[3], menuPtr->tkwin);
Tcl_Release(mePtr);
if (resultPtr == NULL) {
@@ -786,7 +791,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_ENTRYCONFIGURE: {
- int index;
+ TkSizeT index;
Tcl_Obj *resultPtr;
if (objc < 3) {
@@ -796,13 +801,13 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
goto done;
}
mePtr = menuPtr->entries[index];
Tcl_Preserve(mePtr);
if (objc == 3) {
- resultPtr = Tk_GetOptionInfo(interp, (char *) mePtr,
+ resultPtr = Tk_GetOptionInfo(interp, mePtr,
mePtr->optionTable, NULL, menuPtr->tkwin);
if (resultPtr == NULL) {
result = TCL_ERROR;
@@ -811,7 +816,7 @@ MenuWidgetObjCmd(
Tcl_SetObjResult(interp, resultPtr);
}
} else if (objc == 4) {
- resultPtr = Tk_GetOptionInfo(interp, (char *) mePtr,
+ resultPtr = Tk_GetOptionInfo(interp, mePtr,
mePtr->optionTable, objv[3], menuPtr->tkwin);
if (resultPtr == NULL) {
result = TCL_ERROR;
@@ -827,7 +832,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_INDEX: {
- int index;
+ TkSizeT index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "string");
@@ -836,10 +841,10 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("none", -1));
} else {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(index));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index));
}
break;
}
@@ -854,7 +859,7 @@ MenuWidgetObjCmd(
}
break;
case MENU_INVOKE: {
- int index;
+ TkSizeT index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -863,14 +868,15 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
goto done;
}
result = TkInvokeMenu(interp, menuPtr, index);
break;
}
case MENU_POST: {
- int x, y, index = -1;
+ int x, y;
+ TkSizeT index = TCL_INDEX_NONE;
if (objc != 4 && objc != 5) {
Tcl_WrongNumArgs(interp, 2, objv, "x y ?index?");
@@ -905,7 +911,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_POSTCASCADE: {
- int index;
+ TkSizeT index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -915,7 +921,7 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if ((index < 0) || (menuPtr->entries[index]->type != CASCADE_ENTRY)) {
+ if ((index == TCL_INDEX_NONE) || (menuPtr->entries[index]->type != CASCADE_ENTRY)) {
result = TkPostSubmenu(interp, menuPtr, NULL);
} else {
result = TkPostSubmenu(interp, menuPtr, menuPtr->entries[index]);
@@ -923,7 +929,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_TYPE: {
- int index;
+ TkSizeT index;
const char *typeStr;
if (objc != 3) {
@@ -933,7 +939,7 @@ MenuWidgetObjCmd(
if (TkGetMenuIndex(interp, menuPtr, objv[2], 0, &index) != TCL_OK) {
goto error;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
goto done;
}
if (menuPtr->entries[index]->type == TEAROFF_ENTRY) {
@@ -998,13 +1004,13 @@ int
TkInvokeMenu(
Tcl_Interp *interp, /* The interp that the menu lives in. */
TkMenu *menuPtr, /* The menu we are invoking. */
- int index) /* The zero based index of the item we are
+ TkSizeT index) /* The zero based index of the item we are
* invoking. */
{
int result = TCL_OK;
TkMenuEntry *mePtr;
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
goto done;
}
mePtr = menuPtr->entries[index];
@@ -1486,7 +1492,7 @@ MenuWorldChanged(
ClientData instanceData) /* Information about widget. */
{
TkMenu *menuPtr = instanceData;
- int i;
+ TkSizeT i;
TkMenuConfigureDrawOptions(menuPtr);
for (i = 0; i < menuPtr->numEntries; i++) {
@@ -1533,7 +1539,7 @@ ConfigureMenu(
for (menuListPtr = menuPtr->masterMenuPtr; menuListPtr != NULL;
menuListPtr = menuListPtr->nextInstancePtr) {
menuListPtr->errorStructPtr = ckalloc(sizeof(Tk_SavedOptions));
- result = Tk_SetOptions(interp, (char *) menuListPtr,
+ result = Tk_SetOptions(interp, menuListPtr,
tsdPtr->menuOptionTable, objc, objv,
menuListPtr->tkwin, menuListPtr->errorStructPtr, NULL);
if (result != TCL_OK) {
@@ -1627,12 +1633,11 @@ ConfigureMenu(
Tcl_EventuallyFree(menuListPtr->entries[0], (Tcl_FreeProc *) DestroyMenuEntry);
- for (i = 0; i < menuListPtr->numEntries - 1; i++) {
+ for (i = 0; i < (int)menuListPtr->numEntries - 1; i++) {
menuListPtr->entries[i] = menuListPtr->entries[i + 1];
menuListPtr->entries[i]->index = i;
}
- menuListPtr->numEntries--;
- if (menuListPtr->numEntries == 0) {
+ if (--menuListPtr->numEntries == 0) {
ckfree(menuListPtr->entries);
menuListPtr->entries = NULL;
}
@@ -1647,7 +1652,7 @@ ConfigureMenu(
* parent.
*/
- for (i = 0; i < menuListPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuListPtr->numEntries; i++) {
TkMenuEntry *mePtr;
mePtr = menuListPtr->entries[i];
@@ -1705,12 +1710,12 @@ PostProcessEntry(
if (mePtr->labelPtr == NULL) {
mePtr->labelLength = 0;
} else {
- Tcl_GetStringFromObj(mePtr->labelPtr, &mePtr->labelLength);
+ (void)TkGetStringFromObj(mePtr->labelPtr, &mePtr->labelLength);
}
if (mePtr->accelPtr == NULL) {
mePtr->accelLength = 0;
} else {
- Tcl_GetStringFromObj(mePtr->accelPtr, &mePtr->accelLength);
+ (void)TkGetStringFromObj(mePtr->accelPtr, &mePtr->accelLength);
}
/*
@@ -1929,7 +1934,7 @@ ConfigureMenuEntry(
result = TCL_OK;
if (menuPtr->tkwin != NULL) {
- if (Tk_SetOptions(menuPtr->interp, (char *) mePtr,
+ if (Tk_SetOptions(menuPtr->interp, mePtr,
mePtr->optionTable, objc, objv, menuPtr->tkwin,
&errorStruct, NULL) != TCL_OK) {
return TCL_ERROR;
@@ -2115,7 +2120,7 @@ TkGetMenuIndex(
* manual entry for valid .*/
int lastOK, /* Non-zero means its OK to return index just
* *after* last entry. */
- int *indexPtr) /* Where to store converted index. */
+ TkSizeT *indexPtr) /* Where to store converted index. */
{
int i;
const char *string = Tcl_GetString(objPtr);
@@ -2132,7 +2137,7 @@ TkGetMenuIndex(
}
if ((string[0] == 'n') && (strcmp(string, "none") == 0)) {
- *indexPtr = -1;
+ *indexPtr = TCL_INDEX_NONE;
goto success;
}
@@ -2145,7 +2150,7 @@ TkGetMenuIndex(
if (isdigit(UCHAR(string[0]))) {
if (Tcl_GetInt(interp, string, &i) == TCL_OK) {
- if (i >= menuPtr->numEntries) {
+ if (i >= (int)menuPtr->numEntries) {
if (lastOK) {
i = menuPtr->numEntries;
} else {
@@ -2160,7 +2165,7 @@ TkGetMenuIndex(
Tcl_ResetResult(interp);
}
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
Tcl_Obj *labelPtr = menuPtr->entries[i]->labelPtr;
const char *label = (labelPtr == NULL) ? NULL : Tcl_GetString(labelPtr);
@@ -2243,13 +2248,13 @@ MenuCmdDeletedProc(
static TkMenuEntry *
MenuNewEntry(
TkMenu *menuPtr, /* Menu that will hold the new entry. */
- int index, /* Where in the menu the new entry is to
+ TkSizeT index, /* Where in the menu the new entry is to
* go. */
int type) /* The type of the new entry. */
{
TkMenuEntry *mePtr;
TkMenuEntry **newEntries;
- int i;
+ TkSizeT i;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -2303,7 +2308,7 @@ MenuNewEntry(
mePtr->entryFlags = 0;
mePtr->index = index;
mePtr->nextCascadePtr = NULL;
- if (Tk_InitOptions(menuPtr->interp, (char *) mePtr,
+ if (Tk_InitOptions(menuPtr->interp, mePtr,
mePtr->optionTable, menuPtr->tkwin) != TCL_OK) {
ckfree(mePtr);
return NULL;
@@ -2346,7 +2351,8 @@ MenuAddOrInsert(
Tcl_Obj *const objv[]) /* Arguments to command: first arg is type of
* entry, others are config options. */
{
- int type, index;
+ int type;
+ TkSizeT index;
TkMenuEntry *mePtr;
TkMenu *menuListPtr;
@@ -2357,7 +2363,7 @@ MenuAddOrInsert(
} else {
index = menuPtr->numEntries;
}
- if (index < 0) {
+ if (index == TCL_INDEX_NONE) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad index \"%s\"", Tcl_GetString(indexPtr)));
Tcl_SetErrorCode(interp, "TK", "MENU", "INDEX", NULL);
@@ -2389,7 +2395,7 @@ MenuAddOrInsert(
}
if (ConfigureMenuEntry(mePtr, objc - 1, objv + 1) != TCL_OK) {
TkMenu *errorMenuPtr;
- int i;
+ TkSizeT i;
for (errorMenuPtr = menuPtr->masterMenuPtr;
errorMenuPtr != NULL;
@@ -2400,8 +2406,7 @@ MenuAddOrInsert(
errorMenuPtr->entries[i] = errorMenuPtr->entries[i + 1];
errorMenuPtr->entries[i]->index = i;
}
- errorMenuPtr->numEntries--;
- if (errorMenuPtr->numEntries == 0) {
+ if (--errorMenuPtr->numEntries == 0) {
ckfree(errorMenuPtr->entries);
errorMenuPtr->entries = NULL;
}
@@ -2592,13 +2597,13 @@ MenuVarProc(
int
TkActivateMenuEntry(
register TkMenu *menuPtr, /* Menu in which to activate. */
- int index) /* Index of entry to activate, or -1 to
- * deactivate all entries. */
+ TkSizeT index) /* Index of entry to activate, or
+ * TCL_INDEX_NONE to deactivate all entries. */
{
register TkMenuEntry *mePtr;
int result = TCL_OK;
- if (menuPtr->active >= 0) {
+ if (menuPtr->active != TCL_INDEX_NONE) {
mePtr = menuPtr->entries[menuPtr->active];
/*
@@ -2612,7 +2617,7 @@ TkActivateMenuEntry(
TkEventuallyRedrawMenu(menuPtr, menuPtr->entries[menuPtr->active]);
}
menuPtr->active = index;
- if (index >= 0) {
+ if (index != TCL_INDEX_NONE) {
mePtr = menuPtr->entries[index];
mePtr->state = ENTRY_ACTIVE;
TkEventuallyRedrawMenu(menuPtr, mePtr);
@@ -2803,7 +2808,7 @@ CloneMenu(
* Clone all of the cascade menus that this menu points to.
*/
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
TkMenuReferences *cascadeRefPtr;
TkMenu *oldCascadePtr;
@@ -2867,17 +2872,17 @@ MenuDoXPosition(
TkMenu *menuPtr,
Tcl_Obj *objPtr)
{
- int index;
+ TkSizeT index;
TkRecomputeMenu(menuPtr);
if (TkGetMenuIndex(interp, menuPtr, objPtr, 0, &index) != TCL_OK) {
return TCL_ERROR;
}
Tcl_ResetResult(interp);
- if (index < 0) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
+ if (index == TCL_INDEX_NONE) {
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(0));
} else {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(menuPtr->entries[index]->x));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(menuPtr->entries[index]->x));
}
return TCL_OK;
}
@@ -2904,17 +2909,17 @@ MenuDoYPosition(
TkMenu *menuPtr,
Tcl_Obj *objPtr)
{
- int index;
+ TkSizeT index;
TkRecomputeMenu(menuPtr);
if (TkGetMenuIndex(interp, menuPtr, objPtr, 0, &index) != TCL_OK) {
goto error;
}
Tcl_ResetResult(interp);
- if (index < 0) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
+ if (index == TCL_INDEX_NONE) {
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(0));
} else {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(menuPtr->entries[index]->y));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(menuPtr->entries[index]->y));
}
return TCL_OK;
@@ -2942,12 +2947,12 @@ MenuDoYPosition(
*----------------------------------------------------------------------
*/
-static int
+static TkSizeT
GetIndexFromCoords(
Tcl_Interp *interp, /* Interpreter of menu. */
TkMenu *menuPtr, /* The menu we are searching. */
const char *string, /* The @string we are parsing. */
- int *indexPtr) /* The index of the item that matches. */
+ TkSizeT *indexPtr) /* The index of the item that matches. */
{
int x, y, i;
const char *p;
@@ -2982,7 +2987,7 @@ GetIndexFromCoords(
? Tk_Width(menuPtr->tkwin) : Tk_ReqWidth(menuPtr->tkwin);
max -= borderwidth;
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
if (menuPtr->entries[i]->entryFlags & ENTRY_LAST_COLUMN) {
x2 = max;
} else {
@@ -3025,7 +3030,7 @@ static void
RecursivelyDeleteMenu(
TkMenu *menuPtr) /* The menubar instance we are deleting. */
{
- int i;
+ TkSizeT i;
TkMenuEntry *mePtr;
/*
@@ -3112,7 +3117,7 @@ TkNewMenuName(
Tcl_AppendToObj(resultPtr, ".", -1);
}
Tcl_AppendObjToObj(resultPtr, childPtr);
- intPtr = Tcl_NewIntObj(i);
+ intPtr = Tcl_NewWideIntObj(i);
Tcl_AppendObjToObj(resultPtr, intPtr);
Tcl_DecrRefCount(intPtr);
}
@@ -3529,7 +3534,7 @@ DeleteMenuCloneEntries(
for (i = last; i >= first; i--) {
Tcl_EventuallyFree(menuListPtr->entries[i], (Tcl_FreeProc *) DestroyMenuEntry);
}
- for (i = last + 1; i < menuListPtr->numEntries; i++) {
+ for (i = last + 1; i < (int)menuListPtr->numEntries; i++) {
j = i - numDeleted;
menuListPtr->entries[j] = menuListPtr->entries[i];
menuListPtr->entries[j]->index = j;
@@ -3539,10 +3544,10 @@ DeleteMenuCloneEntries(
ckfree(menuListPtr->entries);
menuListPtr->entries = NULL;
}
- if ((menuListPtr->active >= first)
- && (menuListPtr->active <= last)) {
+ if (((int)menuListPtr->active >= first)
+ && ((int)menuListPtr->active <= last)) {
menuListPtr->active = -1;
- } else if (menuListPtr->active > last) {
+ } else if ((int)menuListPtr->active > last) {
menuListPtr->active -= numDeleted;
}
TkEventuallyRecomputeMenu(menuListPtr);
diff --git a/generic/tkMenu.h b/generic/tkMenu.h
index ae69d96..b759fb6 100644
--- a/generic/tkMenu.h
+++ b/generic/tkMenu.h
@@ -68,11 +68,11 @@ typedef struct TkMenuEntry {
Tk_OptionTable optionTable; /* Option table for this menu entry. */
Tcl_Obj *labelPtr; /* Main text label displayed in entry (NULL if
* no label). */
- int labelLength; /* Number of non-NULL characters in label. */
+ TkSizeT labelLength; /* Number of non-NULL characters in label. */
int state; /* State of button for display purposes:
* normal, active, or disabled. */
int underline; /* Value of -underline option: specifies index
- * of character to underline (<0 means don't
+ * of character to underline (-1 means don't
* underline anything). */
Tcl_Obj *underlinePtr; /* Index of character to underline. */
Tcl_Obj *bitmapPtr; /* Bitmap to display in menu entry, or NULL.
@@ -89,7 +89,7 @@ typedef struct TkMenuEntry {
Tcl_Obj *accelPtr; /* Accelerator string displayed at right of
* menu entry. NULL means no such accelerator.
* Malloc'ed. */
- int accelLength; /* Number of non-NULL characters in
+ TkSizeT accelLength; /* Number of non-NULL characters in
* accelerator. */
int indicatorOn; /* True means draw indicator, false means
* don't draw it. This field is ignored unless
@@ -267,9 +267,9 @@ typedef struct TkMenu {
Tcl_Command widgetCmd; /* Token for menu's widget command. */
TkMenuEntry **entries; /* Array of pointers to all the entries in the
* menu. NULL means no entries. */
- int numEntries; /* Number of elements in entries. */
- int active; /* Index of active entry. -1 means nothing
- * active. */
+ TkSizeT numEntries; /* Number of elements in entries. */
+ TkSizeT active; /* Index of active entry. TCL_INDEX_NONE means
+ * nothing active. */
int menuType; /* MASTER_MENU, TEAROFF_MENU, or MENUBAR. See
* below for definitions. */
Tcl_Obj *menuTypePtr; /* Used to control whether created tkwin is a
@@ -382,6 +382,7 @@ typedef struct TkMenu {
/* We actually have to allocate these because
* multiple menus get changed during one
* ConfigureMenu call. */
+ Tcl_Obj *activeReliefPtr; /* 3-d effect for active element. */
} TkMenu;
/*
@@ -481,7 +482,7 @@ typedef struct TkMenuReferences {
* the outside world:
*/
-MODULE_SCOPE int TkActivateMenuEntry(TkMenu *menuPtr, int index);
+MODULE_SCOPE int TkActivateMenuEntry(TkMenu *menuPtr, TkSizeT index);
MODULE_SCOPE void TkBindMenu(Tk_Window tkwin, TkMenu *menuPtr);
MODULE_SCOPE TkMenuReferences*TkCreateMenuReferences(Tcl_Interp *interp,
const char *name);
@@ -495,14 +496,14 @@ MODULE_SCOPE TkMenuReferences*TkFindMenuReferencesObj(Tcl_Interp *interp,
MODULE_SCOPE int TkFreeMenuReferences(TkMenuReferences *menuRefPtr);
MODULE_SCOPE Tcl_HashTable *TkGetMenuHashTable(Tcl_Interp *interp);
MODULE_SCOPE int TkGetMenuIndex(Tcl_Interp *interp, TkMenu *menuPtr,
- Tcl_Obj *objPtr, int lastOK, int *indexPtr);
+ Tcl_Obj *objPtr, int lastOK, TkSizeT *indexPtr);
MODULE_SCOPE void TkMenuInitializeDrawingFields(TkMenu *menuPtr);
MODULE_SCOPE void TkMenuInitializeEntryDrawingFields(TkMenuEntry *mePtr);
MODULE_SCOPE int TkInvokeMenu(Tcl_Interp *interp, TkMenu *menuPtr,
- int index);
+ TkSizeT index);
MODULE_SCOPE void TkMenuConfigureDrawOptions(TkMenu *menuPtr);
MODULE_SCOPE int TkMenuConfigureEntryDrawOptions(
- TkMenuEntry *mePtr, int index);
+ TkMenuEntry *mePtr, TkSizeT index);
MODULE_SCOPE void TkMenuFreeDrawOptions(TkMenu *menuPtr);
MODULE_SCOPE void TkMenuEntryFreeDrawOptions(TkMenuEntry *mePtr);
MODULE_SCOPE void TkMenuEventProc(ClientData clientData,
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c
index d91bc11..02f5a5b 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -298,7 +298,7 @@ TkMenuConfigureDrawOptions(
int
TkMenuConfigureEntryDrawOptions(
TkMenuEntry *mePtr,
- int index)
+ TkSizeT index)
{
XGCValues gcValues;
GC newGC, newActiveGC, newDisabledGC, newIndicatorGC;
@@ -487,7 +487,7 @@ TkEventuallyRedrawMenu(
register TkMenuEntry *mePtr)/* Entry to redraw. NULL means redraw all the
* entries in the menu. */
{
- int i;
+ TkSizeT i;
if (menuPtr->tkwin == NULL) {
return;
@@ -618,7 +618,8 @@ DisplayMenu(
register TkMenu *menuPtr = clientData;
register TkMenuEntry *mePtr;
register Tk_Window tkwin = menuPtr->tkwin;
- int index, strictMotif;
+ TkSizeT index;
+ int strictMotif;
Tk_Font tkfont;
Tk_FontMetrics menuMetrics;
int width;
@@ -911,8 +912,8 @@ TkPostSubmenu(
menuPtr->postedCascade = mePtr;
subary[0] = mePtr->namePtr;
subary[1] = Tcl_NewStringObj("post", -1);
- subary[2] = Tcl_NewIntObj(x);
- subary[3] = Tcl_NewIntObj(y);
+ subary[2] = Tcl_NewWideIntObj(x);
+ subary[3] = Tcl_NewWideIntObj(y);
Tcl_IncrRefCount(subary[1]);
Tcl_IncrRefCount(subary[2]);
Tcl_IncrRefCount(subary[3]);
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 2228a2e..4cf102f 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -61,98 +61,98 @@ static const char *const compoundStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
DEF_MENUBUTTON_ACTIVE_BG_COLOR, -1,
- Tk_Offset(TkMenuButton, activeBorder), 0,
+ offsetof(TkMenuButton, activeBorder), 0,
(ClientData) DEF_MENUBUTTON_ACTIVE_BG_MONO, 0},
{TK_OPTION_COLOR, "-activeforeground", "activeForeground", "Background",
DEF_MENUBUTTON_ACTIVE_FG_COLOR, -1,
- Tk_Offset(TkMenuButton, activeFg),
+ offsetof(TkMenuButton, activeFg),
0, DEF_MENUBUTTON_ACTIVE_FG_MONO, 0},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
DEF_MENUBUTTON_ANCHOR, -1,
- Tk_Offset(TkMenuButton, anchor), 0, 0, 0},
+ offsetof(TkMenuButton, anchor), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MENUBUTTON_BG_COLOR, -1, Tk_Offset(TkMenuButton, normalBorder),
+ DEF_MENUBUTTON_BG_COLOR, -1, offsetof(TkMenuButton, normalBorder),
0, DEF_MENUBUTTON_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0,
(ClientData) "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0,
(ClientData) "-background", 0},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap",
- DEF_MENUBUTTON_BITMAP, -1, Tk_Offset(TkMenuButton, bitmap),
+ DEF_MENUBUTTON_BITMAP, -1, offsetof(TkMenuButton, bitmap),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
DEF_MENUBUTTON_BORDER_WIDTH, -1,
- Tk_Offset(TkMenuButton, borderWidth), 0, 0, 0},
+ offsetof(TkMenuButton, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_MENUBUTTON_CURSOR, -1, Tk_Offset(TkMenuButton, cursor),
+ DEF_MENUBUTTON_CURSOR, -1, offsetof(TkMenuButton, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction",
- DEF_MENUBUTTON_DIRECTION, -1, Tk_Offset(TkMenuButton, direction),
+ DEF_MENUBUTTON_DIRECTION, -1, offsetof(TkMenuButton, direction),
0, directionStrings, 0},
{TK_OPTION_COLOR, "-disabledforeground", "disabledForeground",
"DisabledForeground", DEF_MENUBUTTON_DISABLED_FG_COLOR,
- -1, Tk_Offset(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
+ -1, offsetof(TkMenuButton, disabledFg), TK_OPTION_NULL_OK,
(ClientData) DEF_MENUBUTTON_DISABLED_FG_MONO, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL, NULL, 0, -1, 0,
(ClientData) "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MENUBUTTON_FONT, -1, Tk_Offset(TkMenuButton, tkfont), 0, 0, 0},
+ DEF_MENUBUTTON_FONT, -1, offsetof(TkMenuButton, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MENUBUTTON_FG, -1, Tk_Offset(TkMenuButton, normalFg), 0, 0, 0},
+ DEF_MENUBUTTON_FG, -1, offsetof(TkMenuButton, normalFg), 0, 0, 0},
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_MENUBUTTON_HEIGHT, -1, Tk_Offset(TkMenuButton, heightString),
+ DEF_MENUBUTTON_HEIGHT, -1, offsetof(TkMenuButton, heightString),
0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_MENUBUTTON_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
+ -1, offsetof(TkMenuButton, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
DEF_MENUBUTTON_HIGHLIGHT, -1,
- Tk_Offset(TkMenuButton, highlightColorPtr), 0, 0, 0},
+ offsetof(TkMenuButton, highlightColorPtr), 0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_MENUBUTTON_HIGHLIGHT_WIDTH,
- -1, Tk_Offset(TkMenuButton, highlightWidth), 0, 0, 0},
+ -1, offsetof(TkMenuButton, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-image", "image", "Image",
- DEF_MENUBUTTON_IMAGE, -1, Tk_Offset(TkMenuButton, imageString),
+ DEF_MENUBUTTON_IMAGE, -1, offsetof(TkMenuButton, imageString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_MENUBUTTON_INDICATOR, -1, Tk_Offset(TkMenuButton, indicatorOn),
+ DEF_MENUBUTTON_INDICATOR, -1, offsetof(TkMenuButton, indicatorOn),
0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_MENUBUTTON_JUSTIFY, -1, Tk_Offset(TkMenuButton, justify), 0, 0, 0},
+ DEF_MENUBUTTON_JUSTIFY, -1, offsetof(TkMenuButton, justify), 0, 0, 0},
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- DEF_MENUBUTTON_MENU, -1, Tk_Offset(TkMenuButton, menuName),
+ DEF_MENUBUTTON_MENU, -1, offsetof(TkMenuButton, menuName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_MENUBUTTON_PADX, -1, Tk_Offset(TkMenuButton, padX),
+ DEF_MENUBUTTON_PADX, -1, offsetof(TkMenuButton, padX),
0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_MENUBUTTON_PADY, -1, Tk_Offset(TkMenuButton, padY),
+ DEF_MENUBUTTON_PADY, -1, offsetof(TkMenuButton, padY),
0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MENUBUTTON_RELIEF, -1, Tk_Offset(TkMenuButton, relief),
+ DEF_MENUBUTTON_RELIEF, -1, offsetof(TkMenuButton, relief),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- DEF_BUTTON_COMPOUND, -1, Tk_Offset(TkMenuButton, compound), 0,
+ DEF_BUTTON_COMPOUND, -1, offsetof(TkMenuButton, compound), 0,
compoundStrings, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_MENUBUTTON_STATE, -1, Tk_Offset(TkMenuButton, state),
+ DEF_MENUBUTTON_STATE, -1, offsetof(TkMenuButton, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
DEF_MENUBUTTON_TAKE_FOCUS, -1,
- Tk_Offset(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(TkMenuButton, takeFocus), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_MENUBUTTON_TEXT, -1, Tk_Offset(TkMenuButton, text), 0, 0, 0},
+ DEF_MENUBUTTON_TEXT, -1, offsetof(TkMenuButton, text), 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
DEF_MENUBUTTON_TEXT_VARIABLE, -1,
- Tk_Offset(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-underline", "underline", "Underline",
- DEF_MENUBUTTON_UNDERLINE, -1, Tk_Offset(TkMenuButton, underline),
+ DEF_MENUBUTTON_UNDERLINE, -1, offsetof(TkMenuButton, underline),
0, 0, 0},
{TK_OPTION_STRING, "-width", "width", "Width",
- DEF_MENUBUTTON_WIDTH, -1, Tk_Offset(TkMenuButton, widthString),
+ DEF_MENUBUTTON_WIDTH, -1, offsetof(TkMenuButton, widthString),
0, 0, 0},
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- DEF_MENUBUTTON_WRAP_LENGTH, -1, Tk_Offset(TkMenuButton, wrapLength),
+ DEF_MENUBUTTON_WRAP_LENGTH, -1, offsetof(TkMenuButton, wrapLength),
0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -308,7 +308,7 @@ Tk_MenubuttonObjCmd(
ExposureMask|StructureNotifyMask|FocusChangeMask,
MenuButtonEventProc, mbPtr);
- if (Tk_InitOptions(interp, (char *) mbPtr, optionTable, tkwin) != TCL_OK) {
+ if (Tk_InitOptions(interp, mbPtr, optionTable, tkwin) != TCL_OK) {
Tk_DestroyWindow(mbPtr->tkwin);
return TCL_ERROR;
}
@@ -369,7 +369,7 @@ MenuButtonWidgetObjCmd(
goto error;
}
- objPtr = Tk_GetOptionValue(interp, (char *) mbPtr,
+ objPtr = Tk_GetOptionValue(interp, mbPtr,
mbPtr->optionTable, objv[2], mbPtr->tkwin);
if (objPtr == NULL) {
goto error;
@@ -379,7 +379,7 @@ MenuButtonWidgetObjCmd(
case COMMAND_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) mbPtr,
+ objPtr = Tk_GetOptionInfo(interp, mbPtr,
mbPtr->optionTable, (objc == 3) ? objv[2] : NULL,
mbPtr->tkwin);
if (objPtr == NULL) {
@@ -524,7 +524,7 @@ ConfigureMenuButton(
* First pass: set options to new values.
*/
- if (Tk_SetOptions(interp, (char *) mbPtr,
+ if (Tk_SetOptions(interp, mbPtr,
mbPtr->optionTable, objc, objv,
mbPtr->tkwin, &savedOptions, NULL) != TCL_OK) {
continue;
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index 1a3c6de..29daf3b 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -13,8 +13,8 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
+#include "default.h"
/*
* A data structure of the following type is kept for each message widget
@@ -109,11 +109,11 @@ typedef struct {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR,
- -1, Tk_Offset(Message, anchor), 0, 0, 0},
+ -1, offsetof(Message, anchor), 0, 0, 0},
{TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT,
- -1, Tk_Offset(Message, aspect), 0, 0, 0},
+ -1, offsetof(Message, aspect), 0, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_MESSAGE_BG_COLOR, -1, Tk_Offset(Message, border), 0,
+ DEF_MESSAGE_BG_COLOR, -1, offsetof(Message, border), 0,
DEF_MESSAGE_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL,
0, -1, 0, "-borderwidth", 0},
@@ -121,45 +121,45 @@ static const Tk_OptionSpec optionSpecs[] = {
0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
DEF_MESSAGE_BORDER_WIDTH, -1,
- Tk_Offset(Message, borderWidth), 0, 0, 0},
+ offsetof(Message, borderWidth), 0, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_MESSAGE_CURSOR, -1, Tk_Offset(Message, cursor),
+ DEF_MESSAGE_CURSOR, -1, offsetof(Message, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL,
0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_MESSAGE_FONT, -1, Tk_Offset(Message, tkfont), 0, 0, 0},
+ DEF_MESSAGE_FONT, -1, offsetof(Message, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_MESSAGE_FG, -1, Tk_Offset(Message, fgColorPtr), 0, 0, 0},
+ DEF_MESSAGE_FG, -1, offsetof(Message, fgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_MESSAGE_HIGHLIGHT_BG, -1,
- Tk_Offset(Message, highlightBgColorPtr), 0, 0, 0},
+ offsetof(Message, highlightBgColorPtr), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_MESSAGE_HIGHLIGHT, -1, Tk_Offset(Message, highlightColorPtr),
+ DEF_MESSAGE_HIGHLIGHT, -1, offsetof(Message, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_MESSAGE_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(Message, highlightWidth), 0, 0, 0},
+ offsetof(Message, highlightWidth), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_MESSAGE_JUSTIFY, -1, Tk_Offset(Message, justify), 0, 0, 0},
+ DEF_MESSAGE_JUSTIFY, -1, offsetof(Message, justify), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_MESSAGE_PADX, Tk_Offset(Message, padXPtr),
- Tk_Offset(Message, padX), 0, 0, 0},
+ DEF_MESSAGE_PADX, offsetof(Message, padXPtr),
+ offsetof(Message, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_MESSAGE_PADY, Tk_Offset(Message, padYPtr),
- Tk_Offset(Message, padY), 0, 0, 0},
+ DEF_MESSAGE_PADY, offsetof(Message, padYPtr),
+ offsetof(Message, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_MESSAGE_RELIEF, -1, Tk_Offset(Message, relief), 0, 0, 0},
+ DEF_MESSAGE_RELIEF, -1, offsetof(Message, relief), 0, 0, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_MESSAGE_TAKE_FOCUS, -1, Tk_Offset(Message, takeFocus),
+ DEF_MESSAGE_TAKE_FOCUS, -1, offsetof(Message, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-text", "text", "Text",
- DEF_MESSAGE_TEXT, -1, Tk_Offset(Message, string), 0, 0, 0},
+ DEF_MESSAGE_TEXT, -1, offsetof(Message, string), 0, 0, 0},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- DEF_MESSAGE_TEXT_VARIABLE, -1, Tk_Offset(Message, textVarName),
+ DEF_MESSAGE_TEXT_VARIABLE, -1, offsetof(Message, textVarName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_MESSAGE_WIDTH, -1, Tk_Offset(Message, width), 0, 0 ,0},
+ DEF_MESSAGE_WIDTH, -1, offsetof(Message, width), 0, 0 ,0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -242,7 +242,7 @@ Tk_MessageObjCmd(
optionTable = Tk_CreateOptionTable(interp, optionSpecs);
msgPtr = ckalloc(sizeof(Message));
- memset(msgPtr, 0, (size_t) sizeof(Message));
+ memset(msgPtr, 0, sizeof(Message));
/*
* Set values for those fields that don't take a 0 or NULL value.
@@ -267,7 +267,7 @@ Tk_MessageObjCmd(
Tk_CreateEventHandler(msgPtr->tkwin,
ExposureMask|StructureNotifyMask|FocusChangeMask,
MessageEventProc, msgPtr);
- if (Tk_InitOptions(interp, (char *)msgPtr, optionTable, tkwin) != TCL_OK) {
+ if (Tk_InitOptions(interp, msgPtr, optionTable, tkwin) != TCL_OK) {
Tk_DestroyWindow(msgPtr->tkwin);
return TCL_ERROR;
}
@@ -331,7 +331,7 @@ MessageWidgetObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option");
result = TCL_ERROR;
} else {
- objPtr = Tk_GetOptionValue(interp, (char *) msgPtr,
+ objPtr = Tk_GetOptionValue(interp, msgPtr,
msgPtr->optionTable, objv[2], msgPtr->tkwin);
if (objPtr == NULL) {
result = TCL_ERROR;
@@ -343,7 +343,7 @@ MessageWidgetObjCmd(
break;
case MESSAGE_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) msgPtr,
+ objPtr = Tk_GetOptionInfo(interp, msgPtr,
msgPtr->optionTable, (objc == 3) ? objv[2] : NULL,
msgPtr->tkwin);
if (objPtr == NULL) {
@@ -455,7 +455,7 @@ ConfigureMessage(
MessageTextVarProc, msgPtr);
}
- if (Tk_SetOptions(interp, (char *) msgPtr, msgPtr->optionTable, objc, objv,
+ if (Tk_SetOptions(interp, msgPtr, msgPtr->optionTable, objc, objv,
msgPtr->tkwin, &savedOptions, NULL) != TCL_OK) {
Tk_RestoreSavedOptions(&savedOptions);
return TCL_ERROR;
diff --git a/generic/tkObj.c b/generic/tkObj.c
index 559f0e2..1a98db6 100644
--- a/generic/tkObj.c
+++ b/generic/tkObj.c
@@ -73,8 +73,12 @@ typedef struct MMRep {
typedef struct WindowRep {
Tk_Window tkwin; /* Cached window; NULL if not found. */
TkMainInfo *mainPtr; /* MainWindow associated with tkwin. */
- long epoch; /* Value of mainPtr->deletionEpoch at last
+#if TCL_MAJOR_VERSION > 8
+ size_t epoch; /* Value of mainPtr->deletionEpoch at last
* successful lookup. */
+#else
+ long epoch;
+#endif
} WindowRep;
/*
@@ -104,7 +108,7 @@ static const Tcl_ObjType pixelObjType = {
FreePixelInternalRep, /* freeIntRepProc */
DupPixelInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetPixelFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -118,7 +122,7 @@ static const Tcl_ObjType mmObjType = {
FreeMMInternalRep, /* freeIntRepProc */
DupMMInternalRep, /* dupIntRepProc */
UpdateStringOfMM, /* updateStringProc */
- SetMMFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -131,7 +135,7 @@ static const Tcl_ObjType windowObjType = {
FreeWindowInternalRep, /* freeIntRepProc */
DupWindowInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetWindowFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -668,7 +672,7 @@ UpdateStringOfMM(
{
MMRep *mmPtr;
char buffer[TCL_DOUBLE_SPACE];
- size_t len;
+ TkSizeT len;
mmPtr = objPtr->internalRep.twoPtrValue.ptr1;
/* assert( mmPtr->units == -1 && objPtr->bytes == NULL ); */
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index f20f38f..d83c30b 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -25,20 +25,24 @@
#define INIT 0x20
+#ifndef TK_CONFIG_OPTION_SPECIFIED
+# define TK_CONFIG_OPTION_SPECIFIED (1 << 4)
+#endif
+
/*
* Forward declarations for functions defined later in this file:
*/
static int DoConfig(Tcl_Interp *interp, Tk_Window tkwin,
Tk_ConfigSpec *specPtr, Tk_Uid value,
- int valueIsUid, char *widgRec);
+ int valueIsUid, void *widgRec);
static Tk_ConfigSpec * FindConfigSpec(Tcl_Interp *interp,
Tk_ConfigSpec *specs, const char *argvName,
int needFlags, int hateFlags);
static char * FormatConfigInfo(Tcl_Interp *interp, Tk_Window tkwin,
- const Tk_ConfigSpec *specPtr, char *widgRec);
+ const Tk_ConfigSpec *specPtr, void *widgRec);
static const char * FormatConfigValue(Tcl_Interp *interp, Tk_Window tkwin,
- const Tk_ConfigSpec *specPtr, char *widgRec,
+ const Tk_ConfigSpec *specPtr, void *widgRec,
char *buffer, Tcl_FreeProc **freeProcPtr);
static Tk_ConfigSpec * GetCachedSpecs(Tcl_Interp *interp,
const Tk_ConfigSpec *staticSpecs);
@@ -340,10 +344,10 @@ DoConfig(
Tk_Uid value, /* Value to use to fill in widgRec. */
int valueIsUid, /* Non-zero means value is a Tk_Uid; zero
* means it's an ordinary string. */
- char *widgRec) /* Record whose fields are to be modified.
+ void *widgRec) /* Record whose fields are to be modified.
* Values must be properly initialized. */
{
- char *ptr;
+ void *ptr;
Tk_Uid uid;
int nullValue;
@@ -353,7 +357,7 @@ DoConfig(
}
do {
- ptr = widgRec + specPtr->offset;
+ ptr = (char *)widgRec + specPtr->offset;
switch (specPtr->type) {
case TK_CONFIG_BOOLEAN:
if (Tcl_GetBoolean(interp, value, (int *) ptr) != TCL_OK) {
@@ -689,7 +693,7 @@ FormatConfigInfo(
register const Tk_ConfigSpec *specPtr,
/* Pointer to information describing
* option. */
- char *widgRec) /* Pointer to record holding current values of
+ void *widgRec) /* Pointer to record holding current values of
* info for widget. */
{
const char *argv[6];
@@ -755,7 +759,7 @@ FormatConfigValue(
Tk_Window tkwin, /* Window corresponding to widget. */
const Tk_ConfigSpec *specPtr, /* Pointer to information describing option.
* Must not point to a synonym option. */
- char *widgRec, /* Pointer to record holding current values of
+ void *widgRec, /* Pointer to record holding current values of
* info for widget. */
char *buffer, /* Static buffer to use for small values.
* Must have at least 200 bytes of storage. */
@@ -763,10 +767,11 @@ FormatConfigValue(
* function to free the result, or NULL if
* result is static. */
{
- const char *ptr, *result;
+ void *ptr;
+ const char *result;
*freeProcPtr = NULL;
- ptr = widgRec + specPtr->offset;
+ ptr = (char *)widgRec + specPtr->offset;
result = "";
switch (specPtr->type) {
case TK_CONFIG_BOOLEAN:
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 713a6d5..5754dbf 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -260,7 +260,7 @@ Tk_AddOption(
register const char *p;
const char *field;
int count, firstField;
- ptrdiff_t length;
+ size_t length;
#define TMP_SIZE 100
char tmp[TMP_SIZE+1];
ThreadSpecificData *tsdPtr =
@@ -311,7 +311,7 @@ Tk_AddOption(
if (length > TMP_SIZE) {
length = TMP_SIZE;
}
- strncpy(tmp, field, (size_t) length);
+ strncpy(tmp, field, length);
tmp[length] = 0;
newEl.nameUid = Tk_GetUid(tmp);
if (isupper(UCHAR(*field))) {
@@ -1084,7 +1084,8 @@ ReadOptionFile(
{
const char *realName;
Tcl_Obj *buffer;
- int result, bufferSize;
+ int result;
+ size_t bufferSize;
Tcl_Channel chan;
Tcl_DString newName;
@@ -1115,7 +1116,7 @@ ReadOptionFile(
Tcl_IncrRefCount(buffer);
Tcl_SetChannelOption(NULL, chan, "-encoding", "utf-8");
bufferSize = Tcl_ReadChars(chan, buffer, -1, 0);
- if (bufferSize < 0) {
+ if (bufferSize == (size_t)-1) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"error reading file \"%s\": %s",
fileName, Tcl_PosixError(interp)));
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 9005d7f..faa3533 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -122,8 +122,10 @@ static int ConfigureSlaves(Tcl_Interp *interp, Tk_Window tkwin,
int objc, Tcl_Obj *const objv[]);
static void DestroyPacker(void *memPtr);
static Packer * GetPacker(Tk_Window tkwin);
+#ifndef TK_NO_DEPRECATED
static int PackAfter(Tcl_Interp *interp, Packer *prevPtr,
Packer *masterPtr, int objc,Tcl_Obj *const objv[]);
+#endif /* !TK_NO_DEPRECATED */
static void PackStructureProc(ClientData clientData,
XEvent *eventPtr);
static void Unlink(Packer *packPtr);
@@ -161,10 +163,10 @@ TkAppendPadAmount(
if (halfSpace*2 == allSpace) {
Tcl_DictObjPut(NULL, bufferObj, Tcl_NewStringObj(switchName, -1),
- Tcl_NewIntObj(halfSpace));
+ Tcl_NewWideIntObj(halfSpace));
} else {
- padding[0] = Tcl_NewIntObj(halfSpace);
- padding[1] = Tcl_NewIntObj(allSpace - halfSpace);
+ padding[0] = Tcl_NewWideIntObj(halfSpace);
+ padding[1] = Tcl_NewWideIntObj(allSpace - halfSpace);
Tcl_DictObjPut(NULL, bufferObj, Tcl_NewStringObj(switchName, -1),
Tcl_NewListObj(2, padding));
}
@@ -197,11 +199,14 @@ Tk_PackObjCmd(
Tk_Window tkwin = clientData;
const char *argv2;
static const char *const optionStrings[] = {
- /* after, append, before and unpack are deprecated */
+#ifndef TK_NO_DEPRECATED
"after", "append", "before", "unpack",
+#endif /* !TK_NO_DEPRECATED */
"configure", "forget", "info", "propagate", "slaves", NULL };
enum options {
+#ifndef TK_NO_DEPRECATED
PACK_AFTER, PACK_APPEND, PACK_BEFORE, PACK_UNPACK,
+#endif /* !TK_NO_DEPRECATED */
PACK_CONFIGURE, PACK_FORGET, PACK_INFO, PACK_PROPAGATE, PACK_SLAVES };
int index;
@@ -219,6 +224,7 @@ Tk_PackObjCmd(
if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
sizeof(char *), "option", 0, &index) != TCL_OK) {
+#ifndef TK_NO_DEPRECATED
/*
* Call it again without the deprecated ones to get a proper error
* message. This works well since there can't be any ambiguity between
@@ -228,11 +234,13 @@ Tk_PackObjCmd(
Tcl_ResetResult(interp);
Tcl_GetIndexFromObjStruct(interp, objv[1], &optionStrings[4],
sizeof(char *), "option", 0, &index);
+#endif /* TK_NO_DEPRECATED */
return TCL_ERROR;
}
argv2 = Tcl_GetString(objv[2]);
switch ((enum options) index) {
+#ifndef TK_NO_DEPRECATED
case PACK_AFTER: {
Packer *prevPtr;
Tk_Window tkwin2;
@@ -297,6 +305,7 @@ Tk_PackObjCmd(
}
return PackAfter(interp, prevPtr, masterPtr, objc-3, objv+3);
}
+#endif /* !TK_NO_DEPRECATED */
case PACK_CONFIGURE:
if (argv2[0] != '.') {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -458,6 +467,7 @@ Tk_PackObjCmd(
Tcl_SetObjResult(interp, resultObj);
break;
}
+#ifndef TK_NO_DEPRECATED
case PACK_UNPACK: {
Tk_Window tkwin2;
Packer *packPtr;
@@ -481,6 +491,7 @@ Tk_PackObjCmd(
}
break;
}
+#endif /* !TK_NO_DEPRECATED */
}
return TCL_OK;
@@ -599,8 +610,9 @@ ArrangePacking(
masterPtr->flags &= ~REQUESTED_REPACK;
/*
- * If the master has no slaves anymore, then don't do anything at all:
- * just leave the master's size as-is.
+ * If the master has no slaves anymore, then leave the master's size as-is.
+ * Otherwise there is no way to "relinquish" control over the master
+ * so another geometry manager can take over.
*/
if (masterPtr->slavePtr == NULL) {
@@ -1087,6 +1099,7 @@ GetPacker(
*------------------------------------------------------------------------
*/
+#ifndef TK_NO_DEPRECATED
static int
PackAfter(
Tcl_Interp *interp, /* Interpreter for error reporting. */
@@ -1169,8 +1182,8 @@ PackAfter(
packPtr->flags |= OLD_STYLE;
for (index = 0 ; index < optionCount; index++) {
Tcl_Obj *curOptPtr = options[index];
- const char *curOpt = Tcl_GetString(curOptPtr);
- size_t length = curOptPtr->length;
+ TkSizeT length;
+ const char *curOpt = TkGetStringFromObj(curOptPtr, &length);
c = curOpt[0];
@@ -1227,7 +1240,7 @@ PackAfter(
packPtr->iPadY = 0;
index++;
} else if ((c == 'f') && (length > 1)
- && (strncmp(curOpt, "frame", (size_t) length) == 0)) {
+ && (strncmp(curOpt, "frame", length) == 0)) {
if (optionCount < (index+2)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong # args: \"frame\""
@@ -1307,6 +1320,7 @@ PackAfter(
}
return TCL_OK;
}
+#endif /* !TK_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -1360,11 +1374,15 @@ Unlink(
/*
* If we have emptied this master from slaves it means we are no longer
* handling it and should mark it as free.
+ *
+ * Send the event "NoManagedChild" to the master to inform it about there
+ * being no managed children inside it.
*/
if ((masterPtr->slavePtr == NULL) && (masterPtr->flags & ALLOCED_MASTER)) {
TkFreeGeometryMaster(masterPtr->tkwin, "pack");
masterPtr->flags &= ~ALLOCED_MASTER;
+ TkSendVirtualEvent(masterPtr->tkwin, "NoManagedChild", NULL);
}
}
@@ -1456,7 +1474,7 @@ PackStructureProc(
if (packPtr->tkwin != NULL) {
TkDisplay *dispPtr = ((TkWindow *) packPtr->tkwin)->dispPtr;
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->packerHashTable,
- (char *) packPtr->tkwin));
+ packPtr->tkwin));
}
if (packPtr->flags & REQUESTED_REPACK) {
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index ac61ba8..a34a372 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -13,8 +13,8 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
+#include "default.h"
/*
* Flag values for "sticky"ness. The 16 combinations subsume the packer's
@@ -236,7 +236,7 @@ static void AdjustForSticky(int sticky, int cavityWidth,
int *slaveWidthPtr, int *slaveHeightPtr);
static void MoveSash(PanedWindow *pwPtr, int sash, int diff);
static int ObjectIsEmpty(Tcl_Obj *objPtr);
-static char * ComputeSlotAddress(char *recordPtr, int offset);
+static void * ComputeSlotAddress(void *recordPtr, size_t offset);
static int PanedWindowIdentifyCoords(PanedWindow *pwPtr,
Tcl_Interp *interp, int x, int y);
@@ -275,92 +275,92 @@ static const Tk_ObjCustomOption stickyOption = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, background), 0,
+ DEF_PANEDWINDOW_BG_COLOR, -1, offsetof(PanedWindow, background), 0,
DEF_PANEDWINDOW_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_PANEDWINDOW_BORDERWIDTH, -1, Tk_Offset(PanedWindow, borderWidth),
+ DEF_PANEDWINDOW_BORDERWIDTH, -1, offsetof(PanedWindow, borderWidth),
0, 0, GEOMETRY},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_PANEDWINDOW_CURSOR, -1, Tk_Offset(PanedWindow, cursor),
+ DEF_PANEDWINDOW_CURSOR, -1, offsetof(PanedWindow, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-handlepad", "handlePad", "HandlePad",
- DEF_PANEDWINDOW_HANDLEPAD, -1, Tk_Offset(PanedWindow, handlePad),
+ DEF_PANEDWINDOW_HANDLEPAD, -1, offsetof(PanedWindow, handlePad),
0, 0, GEOMETRY},
{TK_OPTION_PIXELS, "-handlesize", "handleSize", "HandleSize",
- DEF_PANEDWINDOW_HANDLESIZE, Tk_Offset(PanedWindow, handleSizePtr),
- Tk_Offset(PanedWindow, handleSize), 0, 0, GEOMETRY},
+ DEF_PANEDWINDOW_HANDLESIZE, offsetof(PanedWindow, handleSizePtr),
+ offsetof(PanedWindow, handleSize), 0, 0, GEOMETRY},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_PANEDWINDOW_HEIGHT, Tk_Offset(PanedWindow, heightPtr),
- Tk_Offset(PanedWindow, height), TK_OPTION_NULL_OK, 0, GEOMETRY},
+ DEF_PANEDWINDOW_HEIGHT, offsetof(PanedWindow, heightPtr),
+ offsetof(PanedWindow, height), TK_OPTION_NULL_OK, 0, GEOMETRY},
{TK_OPTION_BOOLEAN, "-opaqueresize", "opaqueResize", "OpaqueResize",
DEF_PANEDWINDOW_OPAQUERESIZE, -1,
- Tk_Offset(PanedWindow, resizeOpaque), 0, 0, 0},
+ offsetof(PanedWindow, resizeOpaque), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient),
+ DEF_PANEDWINDOW_ORIENT, -1, offsetof(PanedWindow, orient),
0, orientStrings, GEOMETRY},
{TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground",
- 0, -1, Tk_Offset(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
+ 0, -1, offsetof(PanedWindow, proxyBackground), TK_OPTION_NULL_OK,
(ClientData) DEF_PANEDWINDOW_BG_MONO, 0},
{TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth",
- DEF_PANEDWINDOW_PROXYBORDER, Tk_Offset(PanedWindow, proxyBorderWidthPtr),
- Tk_Offset(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
+ DEF_PANEDWINDOW_PROXYBORDER, offsetof(PanedWindow, proxyBorderWidthPtr),
+ offsetof(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY},
{TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief",
- 0, -1, Tk_Offset(PanedWindow, proxyRelief),
+ 0, -1, offsetof(PanedWindow, proxyRelief),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0},
+ DEF_PANEDWINDOW_RELIEF, -1, offsetof(PanedWindow, relief), 0, 0, 0},
{TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor",
- DEF_PANEDWINDOW_SASHCURSOR, -1, Tk_Offset(PanedWindow, sashCursor),
+ DEF_PANEDWINDOW_SASHCURSOR, -1, offsetof(PanedWindow, sashCursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-sashpad", "sashPad", "SashPad",
- DEF_PANEDWINDOW_SASHPAD, -1, Tk_Offset(PanedWindow, sashPad),
+ DEF_PANEDWINDOW_SASHPAD, -1, offsetof(PanedWindow, sashPad),
0, 0, GEOMETRY},
{TK_OPTION_RELIEF, "-sashrelief", "sashRelief", "Relief",
- DEF_PANEDWINDOW_SASHRELIEF, -1, Tk_Offset(PanedWindow, sashRelief),
+ DEF_PANEDWINDOW_SASHRELIEF, -1, offsetof(PanedWindow, sashRelief),
0, 0, 0},
{TK_OPTION_PIXELS, "-sashwidth", "sashWidth", "Width",
- DEF_PANEDWINDOW_SASHWIDTH, Tk_Offset(PanedWindow, sashWidthPtr),
- Tk_Offset(PanedWindow, sashWidth), 0, 0, GEOMETRY},
+ DEF_PANEDWINDOW_SASHWIDTH, offsetof(PanedWindow, sashWidthPtr),
+ offsetof(PanedWindow, sashWidth), 0, 0, GEOMETRY},
{TK_OPTION_BOOLEAN, "-showhandle", "showHandle", "ShowHandle",
- DEF_PANEDWINDOW_SHOWHANDLE, -1, Tk_Offset(PanedWindow, showHandle),
+ DEF_PANEDWINDOW_SHOWHANDLE, -1, offsetof(PanedWindow, showHandle),
0, 0, GEOMETRY},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_PANEDWINDOW_WIDTH, Tk_Offset(PanedWindow, widthPtr),
- Tk_Offset(PanedWindow, width), TK_OPTION_NULL_OK, 0, GEOMETRY},
+ DEF_PANEDWINDOW_WIDTH, offsetof(PanedWindow, widthPtr),
+ offsetof(PanedWindow, width), TK_OPTION_NULL_OK, 0, GEOMETRY},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
static const Tk_OptionSpec slaveOptionSpecs[] = {
{TK_OPTION_WINDOW, "-after", NULL, NULL,
- DEF_PANEDWINDOW_PANE_AFTER, -1, Tk_Offset(Slave, after),
+ DEF_PANEDWINDOW_PANE_AFTER, -1, offsetof(Slave, after),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_WINDOW, "-before", NULL, NULL,
- DEF_PANEDWINDOW_PANE_BEFORE, -1, Tk_Offset(Slave, before),
+ DEF_PANEDWINDOW_PANE_BEFORE, -1, offsetof(Slave, before),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-height", NULL, NULL,
- DEF_PANEDWINDOW_PANE_HEIGHT, Tk_Offset(Slave, heightPtr),
- Tk_Offset(Slave, height), TK_OPTION_NULL_OK, 0, 0},
+ DEF_PANEDWINDOW_PANE_HEIGHT, offsetof(Slave, heightPtr),
+ offsetof(Slave, height), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-hide", "hide", "Hide",
- DEF_PANEDWINDOW_PANE_HIDE, -1, Tk_Offset(Slave, hide), 0,0,GEOMETRY},
+ DEF_PANEDWINDOW_PANE_HIDE, -1, offsetof(Slave, hide), 0,0,GEOMETRY},
{TK_OPTION_PIXELS, "-minsize", NULL, NULL,
- DEF_PANEDWINDOW_PANE_MINSIZE, -1, Tk_Offset(Slave, minSize), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_MINSIZE, -1, offsetof(Slave, minSize), 0, 0, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- DEF_PANEDWINDOW_PANE_PADX, -1, Tk_Offset(Slave, padx), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_PADX, -1, offsetof(Slave, padx), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- DEF_PANEDWINDOW_PANE_PADY, -1, Tk_Offset(Slave, pady), 0, 0, 0},
+ DEF_PANEDWINDOW_PANE_PADY, -1, offsetof(Slave, pady), 0, 0, 0},
{TK_OPTION_CUSTOM, "-sticky", NULL, NULL,
- DEF_PANEDWINDOW_PANE_STICKY, -1, Tk_Offset(Slave, sticky), 0,
+ DEF_PANEDWINDOW_PANE_STICKY, -1, offsetof(Slave, sticky), 0,
&stickyOption, 0},
{TK_OPTION_STRING_TABLE, "-stretch", "stretch", "Stretch",
- DEF_PANEDWINDOW_PANE_STRETCH, -1, Tk_Offset(Slave, stretch), 0,
+ DEF_PANEDWINDOW_PANE_STRETCH, -1, offsetof(Slave, stretch), 0,
(ClientData) stretchStrings, 0},
{TK_OPTION_PIXELS, "-width", NULL, NULL,
- DEF_PANEDWINDOW_PANE_WIDTH, Tk_Offset(Slave, widthPtr),
- Tk_Offset(Slave, width), TK_OPTION_NULL_OK, 0, 0},
+ DEF_PANEDWINDOW_PANE_WIDTH, offsetof(Slave, widthPtr),
+ offsetof(Slave, width), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -459,7 +459,7 @@ Tk_PanedWindowObjCmd(
Tcl_Preserve(pwPtr->tkwin);
- if (Tk_InitOptions(interp, (char *) pwPtr, pwOpts->pwOptions,
+ if (Tk_InitOptions(interp, pwPtr, pwOpts->pwOptions,
tkwin) != TCL_OK) {
Tk_DestroyWindow(pwPtr->tkwin);
return TCL_ERROR;
@@ -578,7 +578,7 @@ PanedWindowWidgetObjCmd(
result = TCL_ERROR;
break;
}
- resultObj = Tk_GetOptionValue(interp, (char *) pwPtr,
+ resultObj = Tk_GetOptionValue(interp, pwPtr,
pwPtr->optionTable, objv[2], pwPtr->tkwin);
if (resultObj == NULL) {
result = TCL_ERROR;
@@ -590,7 +590,7 @@ PanedWindowWidgetObjCmd(
case PW_CONFIGURE:
resultObj = NULL;
if (objc <= 3) {
- resultObj = Tk_GetOptionInfo(interp, (char *) pwPtr,
+ resultObj = Tk_GetOptionInfo(interp, pwPtr,
pwPtr->optionTable,
(objc == 3) ? objv[2] : NULL, pwPtr->tkwin);
if (resultObj == NULL) {
@@ -669,7 +669,7 @@ PanedWindowWidgetObjCmd(
for (i = 0; i < pwPtr->numSlaves; i++) {
if (pwPtr->slaves[i]->tkwin == tkwin) {
resultObj = Tk_GetOptionValue(interp,
- (char *) pwPtr->slaves[i], pwPtr->slaveOpts,
+ pwPtr->slaves[i], pwPtr->slaveOpts,
objv[3], tkwin);
}
}
@@ -709,7 +709,7 @@ PanedWindowWidgetObjCmd(
for (i = 0; i < pwPtr->numSlaves; i++) {
if (pwPtr->slaves[i]->tkwin == tkwin) {
resultObj = Tk_GetOptionInfo(interp,
- (char *) pwPtr->slaves[i], pwPtr->slaveOpts,
+ pwPtr->slaves[i], pwPtr->slaveOpts,
(objc == 4) ? objv[3] : NULL,
pwPtr->tkwin);
if (resultObj == NULL) {
@@ -848,7 +848,7 @@ ConfigureSlaves(
*/
memset((void *)&options, 0, sizeof(Slave));
- if (Tk_SetOptions(interp, (char *) &options, pwPtr->slaveOpts,
+ if (Tk_SetOptions(interp, &options, pwPtr->slaveOpts,
objc - firstOptionArg, objv + firstOptionArg,
pwPtr->tkwin, NULL, NULL) != TCL_OK) {
return TCL_ERROR;
@@ -925,7 +925,7 @@ ConfigureSlaves(
found = 0;
for (j = 0; j < pwPtr->numSlaves; j++) {
if (pwPtr->slaves[j] != NULL && pwPtr->slaves[j]->tkwin == tkwin) {
- Tk_SetOptions(interp, (char *) pwPtr->slaves[j],
+ Tk_SetOptions(interp, pwPtr->slaves[j],
pwPtr->slaveOpts, objc - firstOptionArg,
objv + firstOptionArg, pwPtr->tkwin, NULL, NULL);
if (pwPtr->slaves[j]->minSize < 0) {
@@ -972,9 +972,9 @@ ConfigureSlaves(
slavePtr = ckalloc(sizeof(Slave));
memset(slavePtr, 0, sizeof(Slave));
- Tk_InitOptions(interp, (char *)slavePtr, pwPtr->slaveOpts,
+ Tk_InitOptions(interp, slavePtr, pwPtr->slaveOpts,
pwPtr->tkwin);
- Tk_SetOptions(interp, (char *)slavePtr, pwPtr->slaveOpts,
+ Tk_SetOptions(interp, slavePtr, pwPtr->slaveOpts,
objc - firstOptionArg, objv + firstOptionArg,
pwPtr->tkwin, NULL, NULL);
slavePtr->tkwin = tkwin;
@@ -1011,7 +1011,7 @@ ConfigureSlaves(
i = sizeof(Slave *) * (pwPtr->numSlaves + numNewSlaves);
newSlaves = ckalloc(i);
- memset(newSlaves, 0, (size_t) i);
+ memset(newSlaves, 0, i);
if (index == -1) {
/*
* If none of the existing slaves have to be moved, just copy the old
@@ -1132,8 +1132,8 @@ PanedWindowSashCommand(
}
slavePtr = pwPtr->slaves[sash];
- coords[0] = Tcl_NewIntObj(slavePtr->sashx);
- coords[1] = Tcl_NewIntObj(slavePtr->sashy);
+ coords[0] = Tcl_NewWideIntObj(slavePtr->sashx);
+ coords[1] = Tcl_NewWideIntObj(slavePtr->sashy);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, coords));
break;
@@ -1166,8 +1166,8 @@ PanedWindowSashCommand(
pwPtr->slaves[sash]->markx = x;
pwPtr->slaves[sash]->marky = y;
} else {
- coords[0] = Tcl_NewIntObj(pwPtr->slaves[sash]->markx);
- coords[1] = Tcl_NewIntObj(pwPtr->slaves[sash]->marky);
+ coords[0] = Tcl_NewWideIntObj(pwPtr->slaves[sash]->markx);
+ coords[1] = Tcl_NewWideIntObj(pwPtr->slaves[sash]->marky);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, coords));
}
break;
@@ -1249,7 +1249,7 @@ ConfigurePanedWindow(
Tk_SavedOptions savedOptions;
int typemask = 0;
- if (Tk_SetOptions(interp, (char *) pwPtr, pwPtr->optionTable, objc, objv,
+ if (Tk_SetOptions(interp, pwPtr, pwPtr->optionTable, objc, objv,
pwPtr->tkwin, &savedOptions, &typemask) != TCL_OK) {
Tk_RestoreSavedOptions(&savedOptions);
return TCL_ERROR;
@@ -1484,10 +1484,10 @@ DisplayPanedWindow(
*/
if (horizontal) {
- sashHeight = Tk_Height(tkwin) - (2 * Tk_InternalBorderWidth(tkwin));
+ sashHeight = Tk_Height(tkwin) - (2 * Tk_InternalBorderLeft(tkwin));
sashWidth = pwPtr->sashWidth;
} else {
- sashWidth = Tk_Width(tkwin) - (2 * Tk_InternalBorderWidth(tkwin));
+ sashWidth = Tk_Width(tkwin) - (2 * Tk_InternalBorderLeft(tkwin));
sashHeight = pwPtr->sashWidth;
}
@@ -1754,7 +1754,7 @@ ArrangePanes(
*/
paneDynSize = paneDynMinSize = 0;
- internalBW = Tk_InternalBorderWidth(pwPtr->tkwin);
+ internalBW = Tk_InternalBorderLeft(pwPtr->tkwin);
pwHeight = Tk_Height(pwPtr->tkwin) - (2 * internalBW);
pwWidth = Tk_Width(pwPtr->tkwin) - (2 * internalBW);
x = y = internalBW;
@@ -2200,7 +2200,7 @@ ComputeGeometry(
pwPtr->flags |= REQUESTED_RELAYOUT;
- x = y = internalBw = Tk_InternalBorderWidth(pwPtr->tkwin);
+ x = y = internalBw = Tk_InternalBorderLeft(pwPtr->tkwin);
reqWidth = reqHeight = 0;
/*
@@ -2455,7 +2455,8 @@ SetSticky(
int flags) /* Flags for the option, set Tk_SetOptions. */
{
int sticky = 0;
- char c, *internalPtr;
+ char c;
+ void *internalPtr;
const char *string;
internalPtr = ComputeSlotAddress(recordPtr, internalOffset);
@@ -2876,8 +2877,8 @@ PanedWindowProxyCommand(
return TCL_ERROR;
}
- coords[0] = Tcl_NewIntObj(pwPtr->proxyx);
- coords[1] = Tcl_NewIntObj(pwPtr->proxyy);
+ coords[0] = Tcl_NewWideIntObj(pwPtr->proxyx);
+ coords[1] = Tcl_NewWideIntObj(pwPtr->proxyy);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, coords));
break;
@@ -2906,7 +2907,7 @@ PanedWindowProxyCommand(
return TCL_ERROR;
}
- internalBW = Tk_InternalBorderWidth(pwPtr->tkwin);
+ internalBW = Tk_InternalBorderLeft(pwPtr->tkwin);
if (pwPtr->orient == ORIENT_HORIZONTAL) {
if (x < 0) {
x = 0;
@@ -2915,10 +2916,10 @@ PanedWindowProxyCommand(
if (x > pwWidth) {
x = pwWidth;
}
- y = Tk_InternalBorderWidth(pwPtr->tkwin);
+ y = Tk_InternalBorderLeft(pwPtr->tkwin);
sashWidth = pwPtr->sashWidth;
sashHeight = Tk_Height(pwPtr->tkwin) -
- (2 * Tk_InternalBorderWidth(pwPtr->tkwin));
+ (2 * Tk_InternalBorderLeft(pwPtr->tkwin));
} else {
if (y < 0) {
y = 0;
@@ -2927,10 +2928,10 @@ PanedWindowProxyCommand(
if (y > pwHeight) {
y = pwHeight;
}
- x = Tk_InternalBorderWidth(pwPtr->tkwin);
+ x = Tk_InternalBorderLeft(pwPtr->tkwin);
sashHeight = pwPtr->sashWidth;
sashWidth = Tk_Width(pwPtr->tkwin) -
- (2 * Tk_InternalBorderWidth(pwPtr->tkwin));
+ (2 * Tk_InternalBorderLeft(pwPtr->tkwin));
}
if (sashWidth < 1) {
@@ -3019,13 +3020,13 @@ ObjectIsEmpty(
*----------------------------------------------------------------------
*/
-static char *
+static void *
ComputeSlotAddress(
- char *recordPtr, /* Pointer to the start of a record. */
- int offset) /* Offset of a slot within that record; may be < 0. */
+ void *recordPtr, /* Pointer to the start of a record. */
+ size_t offset) /* Offset of a slot within that record; may be -1. */
{
- if (offset >= 0) {
- return recordPtr + offset;
+ if (offset != (size_t)-1) {
+ return (char *)recordPtr + offset;
} else {
return NULL;
}
@@ -3066,7 +3067,7 @@ PanedWindowIdentifyCoords(
} else {
sashHeight = Tk_ReqHeight(pwPtr->tkwin);
}
- sashHeight -= 2 * Tk_InternalBorderWidth(pwPtr->tkwin);
+ sashHeight -= 2 * Tk_InternalBorderLeft(pwPtr->tkwin);
if (pwPtr->showHandle && pwPtr->handleSize > pwPtr->sashWidth) {
sashWidth = pwPtr->handleSize;
lpad = (pwPtr->handleSize - pwPtr->sashWidth) / 2;
@@ -3094,7 +3095,7 @@ PanedWindowIdentifyCoords(
} else {
sashWidth = Tk_ReqWidth(pwPtr->tkwin);
}
- sashWidth -= 2 * Tk_InternalBorderWidth(pwPtr->tkwin);
+ sashWidth -= 2 * Tk_InternalBorderLeft(pwPtr->tkwin);
lpad = rpad = 0;
}
@@ -3141,7 +3142,7 @@ PanedWindowIdentifyCoords(
if (found != -1) {
Tcl_Obj *list[2];
- list[0] = Tcl_NewIntObj(found);
+ list[0] = Tcl_NewWideIntObj(found);
list[1] = Tcl_NewStringObj((isHandle ? "handle" : "sash"), -1);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, list));
}
diff --git a/generic/tkPkgConfig.c b/generic/tkPkgConfig.c
new file mode 100644
index 0000000..ac0583f
--- /dev/null
+++ b/generic/tkPkgConfig.c
@@ -0,0 +1,166 @@
+/*
+ * tkPkgConfig.c --
+ *
+ * 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>
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+/* Note, the definitions in this module are influenced by the following C
+ * preprocessor macros:
+ *
+ * OSCMa = shortcut for "old style configuration macro activates"
+ * NSCMdt = shortcut for "new style configuration macro declares that"
+ *
+ * - TCL_THREADS OSCMa compilation as threaded.
+ * - TCL_MEM_DEBUG OSCMa memory debugging.
+ *
+ * - TCL_CFG_DO64BIT NSCMdt tk is compiled for a 64bit system.
+ * - NDEBUG NSCMdt tk is compiled with symbol info off.
+ * - TCL_CFG_OPTIMIZED NSCMdt tk is compiled with cc optimizations on
+ * - TCL_CFG_PROFILED NSCMdt tk is compiled with profiling info.
+ *
+ * - _WIN32 || __CYGWIN__ The value for the fontsytem key will be
+ * MAC_OSX_TK chosen based on these macros/defines.
+ * HAVE_XFT NSCMdt xft font support was requested.
+ *
+ * - CFG_RUNTIME_* Paths to various stuff at runtime.
+ * - CFG_INSTALL_* Paths to various stuff at installation time.
+ *
+ * - TCL_CFGVAL_ENCODING string containing the encoding used for the
+ * configuration values.
+ */
+
+#include "tkInt.h"
+
+
+#ifndef TCL_CFGVAL_ENCODING
+#define TCL_CFGVAL_ENCODING "ascii"
+#endif
+
+/*
+ * Use C preprocessor statements to define the various values for the embedded
+ * configuration information.
+ */
+
+#ifdef TCL_THREADS
+# define CFG_THREADED "1"
+#else
+# define CFG_THREADED "0"
+#endif
+
+#ifdef TCL_MEM_DEBUG
+# define CFG_MEMDEBUG "1"
+#else
+# define CFG_MEMDEBUG "0"
+#endif
+
+#ifdef TCL_CFG_DO64BIT
+# define CFG_64 "1"
+#else
+# define CFG_64 "0"
+#endif
+
+#ifndef NDEBUG
+# define CFG_DEBUG "1"
+#else
+# define CFG_DEBUG "0"
+#endif
+
+#ifdef TCL_CFG_OPTIMIZED
+# define CFG_OPTIMIZED "1"
+#else
+# define CFG_OPTIMIZED "0"
+#endif
+
+#ifdef TCL_CFG_PROFILED
+# define CFG_PROFILED "1"
+#else
+# define CFG_PROFILED "0"
+#endif
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define CFG_FONTSYSTEM "gdi"
+#elif defined(MAC_OSX_TK)
+# define CFG_FONTSYSTEM "cocoa"
+#elif defined(HAVE_XFT)
+# define CFG_FONTSYSTEM "xft"
+#else
+# define CFG_FONTSYSTEM "x11"
+#endif
+
+static Tcl_Config const cfg[] = {
+ {"debug", CFG_DEBUG},
+ {"threaded", CFG_THREADED},
+ {"profiled", CFG_PROFILED},
+ {"64bit", CFG_64},
+ {"optimized", CFG_OPTIMIZED},
+ {"mem_debug", CFG_MEMDEBUG},
+ {"fontsystem", CFG_FONTSYSTEM},
+
+ /* Runtime paths to various stuff */
+
+#ifdef CFG_RUNTIME_LIBDIR
+ {"libdir,runtime", CFG_RUNTIME_LIBDIR},
+#endif
+#ifdef CFG_RUNTIME_BINDIR
+ {"bindir,runtime", CFG_RUNTIME_BINDIR},
+#endif
+#ifdef CFG_RUNTIME_SCRDIR
+ {"scriptdir,runtime", CFG_RUNTIME_SCRDIR},
+#endif
+#ifdef CFG_RUNTIME_INCDIR
+ {"includedir,runtime", CFG_RUNTIME_INCDIR},
+#endif
+#ifdef CFG_RUNTIME_DOCDIR
+ {"docdir,runtime", CFG_RUNTIME_DOCDIR},
+#endif
+#ifdef CFG_RUNTIME_DEMODIR
+ {"demodir,runtime", CFG_RUNTIME_DEMODIR},
+#endif
+
+ /* Installation paths to various stuff */
+
+#ifdef CFG_INSTALL_LIBDIR
+ {"libdir,install", CFG_INSTALL_LIBDIR},
+#endif
+#ifdef CFG_INSTALL_BINDIR
+ {"bindir,install", CFG_INSTALL_BINDIR},
+#endif
+#ifdef CFG_INSTALL_SCRDIR
+ {"scriptdir,install", CFG_INSTALL_SCRDIR},
+#endif
+#ifdef CFG_INSTALL_INCDIR
+ {"includedir,install", CFG_INSTALL_INCDIR},
+#endif
+#ifdef CFG_INSTALL_DOCDIR
+ {"docdir,install", CFG_INSTALL_DOCDIR},
+#endif
+#ifdef CFG_INSTALL_DEMODIR
+ {"demodir,install", CFG_INSTALL_DEMODIR},
+#endif
+
+ /* Last entry, closes the array */
+ {NULL, NULL}
+};
+
+void
+TkInitEmbeddedConfigurationInformation(
+ Tcl_Interp *interp) /* Interpreter the configuration command is
+ * registered in. */
+{
+ Tcl_RegisterConfig(interp, "tk", cfg, TCL_CFGVAL_ENCODING);
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index 59b8a2b..a64a64b 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -82,29 +82,29 @@ typedef struct Slave {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1,
- Tk_Offset(Slave, anchor), 0, 0, 0},
+ offsetof(Slave, anchor), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1,
- Tk_Offset(Slave, borderMode), 0, borderModeStrings, 0},
- {TK_OPTION_PIXELS, "-height", NULL, NULL, "", Tk_Offset(Slave, heightPtr),
- Tk_Offset(Slave, height), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_WINDOW, "-in", NULL, NULL, "", -1, Tk_Offset(Slave, inTkwin),
+ offsetof(Slave, borderMode), 0, borderModeStrings, 0},
+ {TK_OPTION_PIXELS, "-height", NULL, NULL, "", offsetof(Slave, heightPtr),
+ offsetof(Slave, height), TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_WINDOW, "-in", NULL, NULL, "", -1, offsetof(Slave, inTkwin),
0, 0, IN_MASK},
{TK_OPTION_DOUBLE, "-relheight", NULL, NULL, "",
- Tk_Offset(Slave, relHeightPtr), Tk_Offset(Slave, relHeight),
+ offsetof(Slave, relHeightPtr), offsetof(Slave, relHeight),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-relwidth", NULL, NULL, "",
- Tk_Offset(Slave, relWidthPtr), Tk_Offset(Slave, relWidth),
+ offsetof(Slave, relWidthPtr), offsetof(Slave, relWidth),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-relx", NULL, NULL, "0", -1,
- Tk_Offset(Slave, relX), 0, 0, 0},
+ offsetof(Slave, relX), 0, 0, 0},
{TK_OPTION_DOUBLE, "-rely", NULL, NULL, "0", -1,
- Tk_Offset(Slave, relY), 0, 0, 0},
- {TK_OPTION_PIXELS, "-width", NULL, NULL, "", Tk_Offset(Slave, widthPtr),
- Tk_Offset(Slave, width), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_PIXELS, "-x", NULL, NULL, "0", Tk_Offset(Slave, xPtr),
- Tk_Offset(Slave, x), TK_OPTION_NULL_OK, 0, 0},
- {TK_OPTION_PIXELS, "-y", NULL, NULL, "0", Tk_Offset(Slave, yPtr),
- Tk_Offset(Slave, y), TK_OPTION_NULL_OK, 0, 0},
+ offsetof(Slave, relY), 0, 0, 0},
+ {TK_OPTION_PIXELS, "-width", NULL, NULL, "", offsetof(Slave, widthPtr),
+ offsetof(Slave, width), TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_PIXELS, "-x", NULL, NULL, "0", offsetof(Slave, xPtr),
+ offsetof(Slave, x), TK_OPTION_NULL_OK, 0, 0},
+ {TK_OPTION_PIXELS, "-y", NULL, NULL, "0", offsetof(Slave, yPtr),
+ offsetof(Slave, y), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -290,7 +290,7 @@ Tk_PlaceObjCmd(
if (slavePtr == NULL) {
return TCL_OK;
}
- objPtr = Tk_GetOptionInfo(interp, (char *) slavePtr, optionTable,
+ objPtr = Tk_GetOptionInfo(interp, slavePtr, optionTable,
(objc == 4) ? objv[3] : NULL, tkwin);
if (objPtr == NULL) {
return TCL_ERROR;
@@ -315,7 +315,7 @@ Tk_PlaceObjCmd(
}
UnlinkSlave(slavePtr);
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->slaveTable,
- (char *) tkwin));
+ tkwin));
Tk_DeleteEventHandler(tkwin, StructureNotifyMask, SlaveStructureProc,
slavePtr);
Tk_ManageGeometry(tkwin, NULL, NULL);
@@ -455,7 +455,7 @@ FindSlave(
register Tcl_HashEntry *hPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
- hPtr = Tcl_FindHashEntry(&dispPtr->slaveTable, (char *) tkwin);
+ hPtr = Tcl_FindHashEntry(&dispPtr->slaveTable, tkwin);
if (hPtr == NULL) {
return NULL;
}
@@ -578,7 +578,7 @@ FindMaster(
register Tcl_HashEntry *hPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
- hPtr = Tcl_FindHashEntry(&dispPtr->masterTable, (char *) tkwin);
+ hPtr = Tcl_FindHashEntry(&dispPtr->masterTable, tkwin);
if (hPtr == NULL) {
return NULL;
}
@@ -629,7 +629,7 @@ ConfigureSlave(
slavePtr = CreateSlave(tkwin, table);
- if (Tk_SetOptions(interp, (char *) slavePtr, table, objc, objv,
+ if (Tk_SetOptions(interp, slavePtr, table, objc, objv,
slavePtr->tkwin, &savedOptions, &mask) != TCL_OK) {
goto error;
}
@@ -1104,7 +1104,7 @@ MasterStructureProc(
slavePtr->nextPtr = NULL;
}
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->masterTable,
- (char *) masterPtr->tkwin));
+ masterPtr->tkwin));
if (masterPtr->flags & PARENT_RECONFIG_PENDING) {
Tcl_CancelIdleCall(RecomputePlacement, masterPtr);
}
@@ -1171,7 +1171,7 @@ SlaveStructureProc(
UnlinkSlave(slavePtr);
}
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->slaveTable,
- (char *) slavePtr->tkwin));
+ slavePtr->tkwin));
FreeSlave(slavePtr);
}
}
@@ -1256,7 +1256,7 @@ PlaceLostSlaveProc(
Tk_UnmapWindow(tkwin);
UnlinkSlave(slavePtr);
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->slaveTable,
- (char *) tkwin));
+ tkwin));
Tk_DeleteEventHandler(tkwin, StructureNotifyMask, SlaveStructureProc,
slavePtr);
FreeSlave(slavePtr);
diff --git a/generic/tkPointer.c b/generic/tkPointer.c
index f764904..a8f10ac 100644
--- a/generic/tkPointer.c
+++ b/generic/tkPointer.c
@@ -20,7 +20,6 @@
#if defined(MAC_OSX_TK)
#include "tkMacOSXInt.h"
-#define Cursor XCursor
#endif
typedef struct {
@@ -254,7 +253,7 @@ Tk_UpdatePointer(
* between the current button state and the last known button state.
*/
- for (b = Button1; b <= Button5; b++) {
+ for (b = Button1; b <= Button9; b++) {
mask = TkGetButtonMask(b);
if (changes & mask) {
if (state & mask) {
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 87114c1..6b679f8 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -61,62 +61,62 @@ static const Tk_CustomOption pixelOption = {
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_CUSTOM, "-activedash", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.activeDash),
+ NULL, offsetof(RectOvalItem, outline.activeDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-activefill", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, activeFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-activeoutline", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, outline.activeColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activeoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.activeStipple),
+ NULL, offsetof(RectOvalItem, outline.activeStipple),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-activestipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, activeFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL,
- "0.0", Tk_Offset(RectOvalItem, outline.activeWidth),
+ "0.0", offsetof(RectOvalItem, outline.activeWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_CUSTOM, "-dash", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.dash),
+ NULL, offsetof(RectOvalItem, outline.dash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL,
- "0", Tk_Offset(RectOvalItem, outline.offset),
+ "0", offsetof(RectOvalItem, outline.offset),
TK_CONFIG_DONT_SET_DEFAULT, NULL},
{TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.disabledDash),
+ NULL, offsetof(RectOvalItem, outline.disabledDash),
TK_CONFIG_NULL_OK, &dashOption},
{TK_CONFIG_COLOR, "-disabledfill", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.disabledColor),
+ NULL, offsetof(RectOvalItem, outline.disabledColor),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledoutlinestipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.disabledStipple),
+ NULL, offsetof(RectOvalItem, outline.disabledStipple),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, disabledFillStipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-disabledwidth", NULL, NULL,
- "0.0", Tk_Offset(RectOvalItem, outline.disabledWidth),
+ "0.0", offsetof(RectOvalItem, outline.disabledWidth),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_COLOR, "-fill", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, fillColor), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, fillColor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-offset", NULL, NULL,
- "0,0", Tk_Offset(RectOvalItem, tsoffset),
+ "0,0", offsetof(RectOvalItem, tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_COLOR, "-outline", NULL, NULL,
- DEF_CANVITEM_OUTLINE, Tk_Offset(RectOvalItem, outline.color), TK_CONFIG_NULL_OK, NULL},
+ DEF_CANVITEM_OUTLINE, offsetof(RectOvalItem, outline.color), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-outlineoffset", NULL, NULL,
- "0,0", Tk_Offset(RectOvalItem, outline.tsoffset),
+ "0,0", offsetof(RectOvalItem, outline.tsoffset),
TK_CONFIG_DONT_SET_DEFAULT, &offsetOption},
{TK_CONFIG_BITMAP, "-outlinestipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, outline.stipple), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-state", NULL, NULL,
- NULL, Tk_Offset(Tk_Item, state),TK_CONFIG_NULL_OK, &stateOption},
+ NULL, offsetof(Tk_Item, state),TK_CONFIG_NULL_OK, &stateOption},
{TK_CONFIG_BITMAP, "-stipple", NULL, NULL,
- NULL, Tk_Offset(RectOvalItem, fillStipple),TK_CONFIG_NULL_OK, NULL},
+ NULL, offsetof(RectOvalItem, fillStipple),TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_CUSTOM, "-tags", NULL, NULL,
NULL, 0, TK_CONFIG_NULL_OK, &tagsOption},
{TK_CONFIG_CUSTOM, "-width", NULL, NULL,
- "1.0", Tk_Offset(RectOvalItem, outline.width),
+ "1.0", offsetof(RectOvalItem, outline.width),
TK_CONFIG_DONT_SET_DEFAULT, &pixelOption},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -149,6 +149,8 @@ static int RectToArea(Tk_Canvas canvas, Tk_Item *itemPtr,
double *areaPtr);
static double RectToPoint(Tk_Canvas canvas, Tk_Item *itemPtr,
double *pointPtr);
+static void RotateRectOval(Tk_Canvas canvas, Tk_Item *itemPtr,
+ double originX, double originY, double angleRad);
static void ScaleRectOval(Tk_Canvas canvas, Tk_Item *itemPtr,
double originX, double originY,
double scaleX, double scaleY);
@@ -181,7 +183,8 @@ Tk_ItemType tkRectangleType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateRectOval, /* rotateProc */
+ 0, NULL, NULL
};
Tk_ItemType tkOvalType = {
@@ -205,7 +208,8 @@ Tk_ItemType tkOvalType = {
NULL, /* insertProc */
NULL, /* dTextProc */
NULL, /* nextPtr */
- NULL, 0, NULL, NULL
+ RotateRectOval, /* rotateProc */
+ 0, NULL, NULL
};
/*
@@ -1286,6 +1290,57 @@ OvalToArea(
/*
*--------------------------------------------------------------
*
+ * RotateRectOval --
+ *
+ * This function is invoked to rotate a rectangle or oval item's
+ * coordinates. It works by rotating a computed point in the centre of
+ * the bounding box, NOT by rotating the corners of the bounding box.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The position of the rectangle or oval is rotated by angleRad about
+ * (originX, originY), and the bounding box is updated in the generic
+ * part of the item structure.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RotateRectOval(
+ Tk_Canvas canvas, /* Canvas containing rectangle. */
+ Tk_Item *itemPtr, /* Rectangle to be scaled. */
+ double originX, double originY,
+ /* Origin about which to rotate rect. */
+ double angleRad) /* Amount to scale in X direction. */
+{
+ RectOvalItem *rectOvalPtr = (RectOvalItem *) itemPtr;
+ double newX, newY, oldX, oldY;
+
+ /*
+ * Compute the centre of the box, then rotate that about the origin.
+ */
+
+ newX = oldX = (rectOvalPtr->bbox[0] + rectOvalPtr->bbox[2]) / 2.0;
+ newY = oldY = (rectOvalPtr->bbox[1] + rectOvalPtr->bbox[3]) / 2.0;
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &newX, &newY);
+
+ /*
+ * Apply the translation to the box.
+ */
+
+ rectOvalPtr->bbox[0] += newX - oldX;
+ rectOvalPtr->bbox[1] += newY - oldY;
+ rectOvalPtr->bbox[2] += newX - oldX;
+ rectOvalPtr->bbox[3] += newY - oldY;
+ ComputeRectOvalBbox(canvas, rectOvalPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
* ScaleRectOval --
*
* This function is invoked to rescale a rectangle or oval item.
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 5957b00..616d321 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -17,9 +17,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
#include "tkScale.h"
+#include "default.h"
#if defined(_WIN32)
#define snprintf _snprintf
@@ -45,96 +45,96 @@ static const char *const stateStrings[] = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCALE_ACTIVE_BG_COLOR, -1, Tk_Offset(TkScale, activeBorder),
+ DEF_SCALE_ACTIVE_BG_COLOR, -1, offsetof(TkScale, activeBorder),
0, DEF_SCALE_ACTIVE_BG_MONO, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_SCALE_BG_COLOR, -1, Tk_Offset(TkScale, bgBorder),
+ DEF_SCALE_BG_COLOR, -1, offsetof(TkScale, bgBorder),
0, DEF_SCALE_BG_MONO, 0},
{TK_OPTION_DOUBLE, "-bigincrement", "bigIncrement", "BigIncrement",
- DEF_SCALE_BIG_INCREMENT, -1, Tk_Offset(TkScale, bigIncrement),
+ DEF_SCALE_BIG_INCREMENT, -1, offsetof(TkScale, bigIncrement),
0, 0, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL,
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_SCALE_BORDER_WIDTH, -1, Tk_Offset(TkScale, borderWidth),
+ DEF_SCALE_BORDER_WIDTH, -1, offsetof(TkScale, borderWidth),
0, 0, 0},
{TK_OPTION_STRING, "-command", "command", "Command",
- DEF_SCALE_COMMAND, -1, Tk_Offset(TkScale, command),
+ DEF_SCALE_COMMAND, -1, offsetof(TkScale, command),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_SCALE_CURSOR, -1, Tk_Offset(TkScale, cursor),
+ DEF_SCALE_CURSOR, -1, offsetof(TkScale, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-digits", "digits", "Digits",
- DEF_SCALE_DIGITS, -1, Tk_Offset(TkScale, digits),
+ DEF_SCALE_DIGITS, -1, offsetof(TkScale, digits),
0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_SCALE_FONT, -1, Tk_Offset(TkScale, tkfont), 0, 0, 0},
+ DEF_SCALE_FONT, -1, offsetof(TkScale, tkfont), 0, 0, 0},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_SCALE_FG_COLOR, -1, Tk_Offset(TkScale, textColorPtr), 0,
+ DEF_SCALE_FG_COLOR, -1, offsetof(TkScale, textColorPtr), 0,
(ClientData) DEF_SCALE_FG_MONO, 0},
{TK_OPTION_DOUBLE, "-from", "from", "From", DEF_SCALE_FROM, -1,
- Tk_Offset(TkScale, fromValue), 0, 0, 0},
+ offsetof(TkScale, fromValue), 0, 0, 0},
{TK_OPTION_BORDER, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_SCALE_HIGHLIGHT_BG_COLOR,
- -1, Tk_Offset(TkScale, highlightBorder),
+ -1, offsetof(TkScale, highlightBorder),
0, DEF_SCALE_HIGHLIGHT_BG_MONO, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_SCALE_HIGHLIGHT, -1, Tk_Offset(TkScale, highlightColorPtr),
+ DEF_SCALE_HIGHLIGHT, -1, offsetof(TkScale, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_SCALE_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(TkScale, highlightWidth), 0, 0, 0},
+ offsetof(TkScale, highlightWidth), 0, 0, 0},
{TK_OPTION_STRING, "-label", "label", "Label",
- DEF_SCALE_LABEL, -1, Tk_Offset(TkScale, label),
+ DEF_SCALE_LABEL, -1, offsetof(TkScale, label),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_SCALE_LENGTH, -1, Tk_Offset(TkScale, length), 0, 0, 0},
+ DEF_SCALE_LENGTH, -1, offsetof(TkScale, length), 0, 0, 0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- DEF_SCALE_ORIENT, -1, Tk_Offset(TkScale, orient),
+ DEF_SCALE_ORIENT, -1, offsetof(TkScale, orient),
0, orientStrings, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_SCALE_RELIEF, -1, Tk_Offset(TkScale, relief), 0, 0, 0},
+ DEF_SCALE_RELIEF, -1, offsetof(TkScale, relief), 0, 0, 0},
{TK_OPTION_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SCALE_REPEAT_DELAY, -1, Tk_Offset(TkScale, repeatDelay),
+ DEF_SCALE_REPEAT_DELAY, -1, offsetof(TkScale, repeatDelay),
0, 0, 0},
{TK_OPTION_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_SCALE_REPEAT_INTERVAL, -1, Tk_Offset(TkScale, repeatInterval),
+ DEF_SCALE_REPEAT_INTERVAL, -1, offsetof(TkScale, repeatInterval),
0, 0, 0},
{TK_OPTION_DOUBLE, "-resolution", "resolution", "Resolution",
- DEF_SCALE_RESOLUTION, -1, Tk_Offset(TkScale, resolution),
+ DEF_SCALE_RESOLUTION, -1, offsetof(TkScale, resolution),
0, 0, 0},
{TK_OPTION_BOOLEAN, "-showvalue", "showValue", "ShowValue",
- DEF_SCALE_SHOW_VALUE, -1, Tk_Offset(TkScale, showValue),
+ DEF_SCALE_SHOW_VALUE, -1, offsetof(TkScale, showValue),
0, 0, 0},
{TK_OPTION_PIXELS, "-sliderlength", "sliderLength", "SliderLength",
- DEF_SCALE_SLIDER_LENGTH, -1, Tk_Offset(TkScale, sliderLength),
+ DEF_SCALE_SLIDER_LENGTH, -1, offsetof(TkScale, sliderLength),
0, 0, 0},
{TK_OPTION_RELIEF, "-sliderrelief", "sliderRelief", "SliderRelief",
- DEF_SCALE_SLIDER_RELIEF, -1, Tk_Offset(TkScale, sliderRelief),
+ DEF_SCALE_SLIDER_RELIEF, -1, offsetof(TkScale, sliderRelief),
0, 0, 0},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_SCALE_STATE, -1, Tk_Offset(TkScale, state),
+ DEF_SCALE_STATE, -1, offsetof(TkScale, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_SCALE_TAKE_FOCUS, Tk_Offset(TkScale, takeFocusPtr), -1,
+ DEF_SCALE_TAKE_FOCUS, offsetof(TkScale, takeFocusPtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_DOUBLE, "-tickinterval", "tickInterval", "TickInterval",
- DEF_SCALE_TICK_INTERVAL, -1, Tk_Offset(TkScale, tickInterval),
+ DEF_SCALE_TICK_INTERVAL, -1, offsetof(TkScale, tickInterval),
0, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To",
- DEF_SCALE_TO, -1, Tk_Offset(TkScale, toValue), 0, 0, 0},
+ DEF_SCALE_TO, -1, offsetof(TkScale, toValue), 0, 0, 0},
{TK_OPTION_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCALE_TROUGH_COLOR, -1, Tk_Offset(TkScale, troughColorPtr),
+ DEF_SCALE_TROUGH_COLOR, -1, offsetof(TkScale, troughColorPtr),
0, DEF_SCALE_TROUGH_MONO, 0},
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- DEF_SCALE_VARIABLE, Tk_Offset(TkScale, varNamePtr), -1,
+ DEF_SCALE_VARIABLE, offsetof(TkScale, varNamePtr), -1,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-width", "width", "Width",
- DEF_SCALE_WIDTH, -1, Tk_Offset(TkScale, width), 0, 0, 0},
+ DEF_SCALE_WIDTH, -1, offsetof(TkScale, width), 0, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0, 0, 0}
};
@@ -343,7 +343,7 @@ Tk_ScaleObjCmd(
ExposureMask|StructureNotifyMask|FocusChangeMask,
ScaleEventProc, scalePtr);
- if ((Tk_InitOptions(interp, (char *) scalePtr, optionTable, tkwin)
+ if ((Tk_InitOptions(interp, scalePtr, optionTable, tkwin)
!= TCL_OK) ||
(ConfigureScale(interp, scalePtr, objc - 2, objv + 2) != TCL_OK)) {
Tk_DestroyWindow(scalePtr->tkwin);
@@ -406,7 +406,7 @@ ScaleWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "cget option");
goto error;
}
- objPtr = Tk_GetOptionValue(interp, (char *) scalePtr,
+ objPtr = Tk_GetOptionValue(interp, scalePtr,
scalePtr->optionTable, objv[2], scalePtr->tkwin);
if (objPtr == NULL) {
goto error;
@@ -415,7 +415,7 @@ ScaleWidgetObjCmd(
break;
case COMMAND_CONFIGURE:
if (objc <= 3) {
- objPtr = Tk_GetOptionInfo(interp, (char *) scalePtr,
+ objPtr = Tk_GetOptionInfo(interp, scalePtr,
scalePtr->optionTable,
(objc == 3) ? objv[2] : NULL, scalePtr->tkwin);
if (objPtr == NULL) {
@@ -451,8 +451,8 @@ ScaleWidgetObjCmd(
y = scalePtr->horizTroughY + scalePtr->width/2
+ scalePtr->borderWidth;
}
- coords[0] = Tcl_NewIntObj(x);
- coords[1] = Tcl_NewIntObj(y);
+ coords[0] = Tcl_NewWideIntObj(x);
+ coords[1] = Tcl_NewWideIntObj(y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, coords));
break;
}
@@ -625,7 +625,7 @@ ConfigureScale(
* First pass: set options to new values.
*/
- if (Tk_SetOptions(interp, (char *) scalePtr,
+ if (Tk_SetOptions(interp, scalePtr,
scalePtr->optionTable, objc, objv, scalePtr->tkwin,
&savedOptions, NULL) != TCL_OK) {
continue;
@@ -682,7 +682,7 @@ ConfigureScale(
ComputeFormat(scalePtr, 0);
ComputeFormat(scalePtr, 1);
- scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0;
+ scalePtr->labelLength = scalePtr->label ? strlen(scalePtr->label) : 0;
Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder);
diff --git a/generic/tkScale.h b/generic/tkScale.h
index e68b786..4e4a3e7 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -87,7 +87,7 @@ typedef struct TkScale {
int repeatInterval; /* Interval between autorepeats (in ms). */
char *label; /* Label to display above or to right of
* scale; NULL means don't display a label. */
- int labelLength; /* Number of non-NULL chars. in label. */
+ TkSizeT labelLength; /* Number of non-NULL chars. in label. */
enum state state; /* Values are active, normal, or disabled.
* Value of scale cannot be changed when
* disabled. */
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c
index 9a85532..5b0f6af 100644
--- a/generic/tkScrollbar.c
+++ b/generic/tkScrollbar.c
@@ -33,62 +33,62 @@ char tkDefScrollbarWidth[TCL_INTEGER_SPACE] = DEF_SCROLLBAR_WIDTH;
static const Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCROLLBAR_ACTIVE_BG_COLOR, Tk_Offset(TkScrollbar, activeBorder),
+ DEF_SCROLLBAR_ACTIVE_BG_COLOR, offsetof(TkScrollbar, activeBorder),
TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_BORDER, "-activebackground", "activeBackground", "Foreground",
- DEF_SCROLLBAR_ACTIVE_BG_MONO, Tk_Offset(TkScrollbar, activeBorder),
+ DEF_SCROLLBAR_ACTIVE_BG_MONO, offsetof(TkScrollbar, activeBorder),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_RELIEF, "-activerelief", "activeRelief", "Relief",
- DEF_SCROLLBAR_ACTIVE_RELIEF, Tk_Offset(TkScrollbar, activeRelief), 0, NULL},
+ DEF_SCROLLBAR_ACTIVE_RELIEF, offsetof(TkScrollbar, activeRelief), 0, NULL},
{TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_SCROLLBAR_BG_COLOR, Tk_Offset(TkScrollbar, bgBorder),
+ DEF_SCROLLBAR_BG_COLOR, offsetof(TkScrollbar, bgBorder),
TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_BORDER, "-background", "background", "Background",
- DEF_SCROLLBAR_BG_MONO, Tk_Offset(TkScrollbar, bgBorder),
+ DEF_SCROLLBAR_BG_MONO, offsetof(TkScrollbar, bgBorder),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_SYNONYM, "-bd", "borderWidth", NULL, NULL, 0, 0, NULL},
{TK_CONFIG_SYNONYM, "-bg", "background", NULL, NULL, 0, 0, NULL},
{TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_SCROLLBAR_BORDER_WIDTH, Tk_Offset(TkScrollbar, borderWidth), 0, NULL},
+ DEF_SCROLLBAR_BORDER_WIDTH, offsetof(TkScrollbar, borderWidth), 0, NULL},
{TK_CONFIG_STRING, "-command", "command", "Command",
- DEF_SCROLLBAR_COMMAND, Tk_Offset(TkScrollbar, command),
+ DEF_SCROLLBAR_COMMAND, offsetof(TkScrollbar, command),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_SCROLLBAR_CURSOR, Tk_Offset(TkScrollbar, cursor), TK_CONFIG_NULL_OK, NULL},
+ DEF_SCROLLBAR_CURSOR, offsetof(TkScrollbar, cursor), TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_PIXELS, "-elementborderwidth", "elementBorderWidth",
"BorderWidth", DEF_SCROLLBAR_EL_BORDER_WIDTH,
- Tk_Offset(TkScrollbar, elementBorderWidth), 0, NULL},
+ offsetof(TkScrollbar, elementBorderWidth), 0, NULL},
{TK_CONFIG_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_SCROLLBAR_HIGHLIGHT_BG,
- Tk_Offset(TkScrollbar, highlightBgColorPtr), 0, NULL},
+ offsetof(TkScrollbar, highlightBgColorPtr), 0, NULL},
{TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
DEF_SCROLLBAR_HIGHLIGHT,
- Tk_Offset(TkScrollbar, highlightColorPtr), 0, NULL},
+ offsetof(TkScrollbar, highlightColorPtr), 0, NULL},
{TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness",
- DEF_SCROLLBAR_HIGHLIGHT_WIDTH, Tk_Offset(TkScrollbar, highlightWidth), 0, NULL},
+ DEF_SCROLLBAR_HIGHLIGHT_WIDTH, offsetof(TkScrollbar, highlightWidth), 0, NULL},
{TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump",
- DEF_SCROLLBAR_JUMP, Tk_Offset(TkScrollbar, jump), 0, NULL},
+ DEF_SCROLLBAR_JUMP, offsetof(TkScrollbar, jump), 0, NULL},
{TK_CONFIG_CUSTOM, "-orient", "orient", "Orient",
- DEF_SCROLLBAR_ORIENT, Tk_Offset(TkScrollbar, vertical), 0,
+ DEF_SCROLLBAR_ORIENT, offsetof(TkScrollbar, vertical), 0,
&orientOption},
{TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
- DEF_SCROLLBAR_RELIEF, Tk_Offset(TkScrollbar, relief), 0, NULL},
+ DEF_SCROLLBAR_RELIEF, offsetof(TkScrollbar, relief), 0, NULL},
{TK_CONFIG_INT, "-repeatdelay", "repeatDelay", "RepeatDelay",
- DEF_SCROLLBAR_REPEAT_DELAY, Tk_Offset(TkScrollbar, repeatDelay), 0, NULL},
+ DEF_SCROLLBAR_REPEAT_DELAY, offsetof(TkScrollbar, repeatDelay), 0, NULL},
{TK_CONFIG_INT, "-repeatinterval", "repeatInterval", "RepeatInterval",
- DEF_SCROLLBAR_REPEAT_INTERVAL, Tk_Offset(TkScrollbar, repeatInterval), 0, NULL},
+ DEF_SCROLLBAR_REPEAT_INTERVAL, offsetof(TkScrollbar, repeatInterval), 0, NULL},
{TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_SCROLLBAR_TAKE_FOCUS, Tk_Offset(TkScrollbar, takeFocus),
+ DEF_SCROLLBAR_TAKE_FOCUS, offsetof(TkScrollbar, takeFocus),
TK_CONFIG_NULL_OK, NULL},
{TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCROLLBAR_TROUGH_COLOR, Tk_Offset(TkScrollbar, troughColorPtr),
+ DEF_SCROLLBAR_TROUGH_COLOR, offsetof(TkScrollbar, troughColorPtr),
TK_CONFIG_COLOR_ONLY, NULL},
{TK_CONFIG_COLOR, "-troughcolor", "troughColor", "Background",
- DEF_SCROLLBAR_TROUGH_MONO, Tk_Offset(TkScrollbar, troughColorPtr),
+ DEF_SCROLLBAR_TROUGH_MONO, offsetof(TkScrollbar, troughColorPtr),
TK_CONFIG_MONO_ONLY, NULL},
{TK_CONFIG_PIXELS, "-width", "width", "Width",
- tkDefScrollbarWidth, Tk_Offset(TkScrollbar, width), 0, NULL},
+ tkDefScrollbarWidth, offsetof(TkScrollbar, width), 0, NULL},
{TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0, NULL}
};
@@ -179,10 +179,12 @@ Tk_ScrollbarObjCmd(
scrollPtr->sliderLast = 0;
scrollPtr->activeField = 0;
scrollPtr->activeRelief = TK_RELIEF_RAISED;
+#ifndef TK_NO_DEPRECATED
scrollPtr->totalUnits = 0;
scrollPtr->windowUnits = 0;
scrollPtr->firstUnit = 0;
scrollPtr->lastUnit = 0;
+#endif /* TK_NO_DEPRECATED */
scrollPtr->firstFraction = 0.0;
scrollPtr->lastFraction = 0.0;
scrollPtr->cursor = NULL;
@@ -224,8 +226,8 @@ ScrollbarWidgetObjCmd(
Tcl_Obj *const objv[]) /* Argument strings. */
{
register TkScrollbar *scrollPtr = clientData;
- int result = TCL_OK;
- int length, cmdIndex;
+ int result = TCL_OK, cmdIndex;
+ TkSizeT length;
static const char *const commandNames[] = {
"activate", "cget", "configure", "delta", "fraction",
"get", "identify", "set", NULL
@@ -269,7 +271,7 @@ ScrollbarWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "activate element");
goto error;
}
- c = Tcl_GetStringFromObj(objv[2], &length)[0];
+ c = TkGetStringFromObj(objv[2], &length)[0];
oldActiveField = scrollPtr->activeField;
if ((c == 'a') && (strcmp(Tcl_GetString(objv[2]), "arrow1") == 0)) {
scrollPtr->activeField = TOP_ARROW;
@@ -377,17 +379,19 @@ ScrollbarWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "get");
goto error;
}
- if (scrollPtr->flags & NEW_STYLE_COMMANDS) {
- resObjs[0] = Tcl_NewDoubleObj(scrollPtr->firstFraction);
- resObjs[1] = Tcl_NewDoubleObj(scrollPtr->lastFraction);
- Tcl_SetObjResult(interp, Tcl_NewListObj(2, resObjs));
- } else {
- resObjs[0] = Tcl_NewIntObj(scrollPtr->totalUnits);
- resObjs[1] = Tcl_NewIntObj(scrollPtr->windowUnits);
- resObjs[2] = Tcl_NewIntObj(scrollPtr->firstUnit);
- resObjs[3] = Tcl_NewIntObj(scrollPtr->lastUnit);
+#ifndef TK_NO_DEPRECATED
+ if (scrollPtr->flags & OLD_STYLE_COMMANDS) {
+ resObjs[0] = Tcl_NewWideIntObj(scrollPtr->totalUnits);
+ resObjs[1] = Tcl_NewWideIntObj(scrollPtr->windowUnits);
+ resObjs[2] = Tcl_NewWideIntObj(scrollPtr->firstUnit);
+ resObjs[3] = Tcl_NewWideIntObj(scrollPtr->lastUnit);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, resObjs));
+ break;
}
+#endif /* TK_NO_DEPRECATED */
+ resObjs[0] = Tcl_NewDoubleObj(scrollPtr->firstFraction);
+ resObjs[1] = Tcl_NewDoubleObj(scrollPtr->lastFraction);
+ Tcl_SetObjResult(interp, Tcl_NewListObj(2, resObjs));
break;
}
case COMMAND_IDENTIFY: {
@@ -413,8 +417,6 @@ ScrollbarWidgetObjCmd(
break;
}
case COMMAND_SET: {
- int totalUnits, windowUnits, firstUnit, lastUnit;
-
if (objc == 4) {
double first, last;
@@ -438,8 +440,10 @@ ScrollbarWidgetObjCmd(
} else {
scrollPtr->lastFraction = last;
}
- scrollPtr->flags |= NEW_STYLE_COMMANDS;
+#ifndef TK_NO_DEPRECATED
+ scrollPtr->flags &= ~OLD_STYLE_COMMANDS;
} else if (objc == 6) {
+ int totalUnits, windowUnits, firstUnit, lastUnit;
if (Tcl_GetIntFromObj(interp, objv[2], &totalUnits) != TCL_OK) {
goto error;
}
@@ -476,11 +480,10 @@ ScrollbarWidgetObjCmd(
scrollPtr->firstFraction = ((double) firstUnit)/totalUnits;
scrollPtr->lastFraction = ((double) (lastUnit+1))/totalUnits;
}
- scrollPtr->flags &= ~NEW_STYLE_COMMANDS;
+ scrollPtr->flags |= OLD_STYLE_COMMANDS;
+#endif /* !TK_NO_DEPRECATED */
} else {
Tcl_WrongNumArgs(interp, 1, objv, "set firstFraction lastFraction");
- Tcl_AppendResult(interp, " or \"", Tcl_GetString(objv[0]),
- " set totalUnits windowUnits firstUnit lastUnit\"", NULL);
goto error;
}
TkpComputeScrollbarGeometry(scrollPtr);
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 2d521ae..f7c39c8 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -93,21 +93,25 @@ typedef struct TkScrollbar {
* form (totalUnits, windowUnits, firstUnit, and lastUnit), or the "new"
* form (firstFraction and lastFraction). FirstFraction and lastFraction
* will always be valid, but the old-style information is only valid if
- * the NEW_STYLE_COMMANDS flag is 0.
+ * the OLD_STYLE_COMMANDS flag is 1.
*/
+#ifndef TK_NO_DEPRECATED
int totalUnits; /* Total dimension of application, in units.
- * Valid only if the NEW_STYLE_COMMANDS flag
- * isn't set. */
+ * Valid only if the OLD_STYLE_COMMANDS flag
+ * is set. */
int windowUnits; /* Maximum number of units that can be
* displayed in the window at once. Valid only
- * if the NEW_STYLE_COMMANDS flag isn't set. */
+ * if the OLD_STYLE_COMMANDS flag is set. */
int firstUnit; /* Number of last unit visible in
* application's window. Valid only if the
- * NEW_STYLE_COMMANDS flag isn't set. */
+ * OLD_STYLE_COMMANDS flag is set. */
int lastUnit; /* Index of last unit visible in window.
- * Valid only if the NEW_STYLE_COMMANDS flag
+ * Valid only if the OLD_STYLE_COMMANDS flag
* isn't set. */
+#else
+ int dummy1,dummy2,dummy3,dummy4; /* sizeof(TkScrollbar) should not depend on TK_NO_DEPRECATED */
+#endif /* TK_NO_DEPRECATED */
double firstFraction; /* Position of first visible thing in window,
* specified as a fraction between 0 and
* 1.0. */
@@ -144,16 +148,18 @@ typedef struct TkScrollbar {
*
* REDRAW_PENDING: Non-zero means a DoWhenIdle handler has
* already been queued to redraw this window.
- * NEW_STYLE_COMMANDS: Non-zero means the new style of commands
+ * OLD_STYLE_COMMANDS: Non-zero means the old style of commands
* should be used to communicate with the widget:
- * ".t yview scroll 2 lines", instead of
- * ".t yview 40", for example.
+ * ".t yview 40", instead of
+ * ".t yview scroll 2 lines", for example.
* GOT_FOCUS: Non-zero means this window has the input
* focus.
*/
#define REDRAW_PENDING 1
-#define NEW_STYLE_COMMANDS 2
+#ifndef TK_NO_DEPRECATED
+# define OLD_STYLE_COMMANDS 2
+#endif /* TK_NO_DEPRECATED */
#define GOT_FOCUS 4
/*
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index c64c93f..d4188b3 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -26,7 +26,7 @@ typedef struct {
int charOffset; /* The offset of the next char to retrieve. */
int byteOffset; /* The expected byte offset of the next
* chunk. */
- char buffer[4]; /* A buffer to hold part of a UTF character
+ char buffer[4]; /* A buffer to hold part of a UTF character
* that is split across chunks. */
char command[1]; /* Command to invoke. Actual space is
* allocated as large as necessary. This must
@@ -190,7 +190,7 @@ Tk_CreateSelHandler(
* should make a copy for this selPtr.
*/
- unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) + 1 +
+ size_t cmdInfoLen = offsetof(CommandInfo, command) + 1 +
((CommandInfo *)clientData)->cmdLength;
selPtr->clientData = ckalloc(cmdInfoLen);
@@ -357,7 +357,7 @@ Tk_OwnSelection(
TkDisplay *dispPtr = winPtr->dispPtr;
TkSelectionInfo *infoPtr;
Tk_LostSelProc *clearProc = NULL;
- ClientData clearData = NULL;/* Initialization needed only to prevent
+ void *clearData = NULL;/* Initialization needed only to prevent
* compiler warning. */
if (dispPtr->multipleAtom == None) {
@@ -466,7 +466,7 @@ Tk_ClearSelection(
TkSelectionInfo *prevPtr;
TkSelectionInfo *nextPtr;
Tk_LostSelProc *clearProc = NULL;
- ClientData clearData = NULL;/* Initialization needed only to prevent
+ void *clearData = NULL;/* Initialization needed only to prevent
* compiler warning. */
if (dispPtr->multipleAtom == None) {
@@ -831,7 +831,7 @@ Tk_SelectionObjCmd(
const char *targetName = NULL;
const char *formatName = NULL;
register CommandInfo *cmdInfoPtr;
- int cmdLength;
+ TkSizeT cmdLength;
static const char *const handleOptionStrings[] = {
"-format", "-selection", "-type", NULL
};
@@ -900,11 +900,11 @@ Tk_SelectionObjCmd(
} else {
format = XA_STRING;
}
- string = Tcl_GetStringFromObj(objs[1], &cmdLength);
+ string = TkGetStringFromObj(objs[1], &cmdLength);
if (cmdLength == 0) {
Tk_DeleteSelHandler(tkwin, selection, target);
} else {
- cmdInfoPtr = ckalloc(Tk_Offset(CommandInfo, command)
+ cmdInfoPtr = ckalloc(offsetof(CommandInfo, command)
+ 1 + cmdLength);
cmdInfoPtr->interp = interp;
cmdInfoPtr->charOffset = 0;
@@ -1246,7 +1246,7 @@ TkSelClearSelection(
}
if (infoPtr != NULL && (infoPtr->owner == tkwin) &&
- (eventPtr->xselectionclear.serial >= (unsigned) infoPtr->serial)) {
+ (eventPtr->xselectionclear.serial >= (unsigned long) infoPtr->serial)) {
if (prevPtr == NULL) {
dispPtr->selectionInfoPtr = infoPtr->nextPtr;
} else {
@@ -1387,7 +1387,7 @@ HandleTclCommand(
string = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), &length);
count = (length > maxBytes) ? maxBytes : length;
- memcpy(buffer, string, (size_t) count);
+ memcpy(buffer, string, count);
buffer[count] = '\0';
/*
@@ -1410,7 +1410,7 @@ HandleTclCommand(
cmdInfoPtr->charOffset += numChars;
length = p - string;
if (length > 0) {
- strncpy(cmdInfoPtr->buffer, string, (size_t) length);
+ strncpy(cmdInfoPtr->buffer, string, length);
}
cmdInfoPtr->buffer[length] = '\0';
}
@@ -1508,7 +1508,7 @@ TkSelDefaultSelection(
Tcl_DStringFree(&ds);
return -1;
}
- memcpy(buffer, Tcl_DStringValue(&ds), (unsigned) (1+length));
+ memcpy(buffer, Tcl_DStringValue(&ds), length + 1);
Tcl_DStringFree(&ds);
*typePtr = XA_ATOM;
return length;
diff --git a/generic/tkSelect.h b/generic/tkSelect.h
index 74326d0..d7df94e 100644
--- a/generic/tkSelect.h
+++ b/generic/tkSelect.h
@@ -25,14 +25,18 @@
typedef struct TkSelectionInfo {
Atom selection; /* Selection name, e.g. XA_PRIMARY. */
Tk_Window owner; /* Current owner of this selection. */
- int serial; /* Serial number of last XSelectionSetOwner
+#if TCL_MAJOR_VERSION > 8
+ unsigned long serial; /* Serial number of last XSelectionSetOwner
* request made to server for this selection
* (used to filter out redundant
* SelectionClear events). */
+#else
+ int serial;
+#endif
Time time; /* Timestamp used to acquire selection. */
Tk_LostSelProc *clearProc; /* Procedure to call when owner loses
* selection. */
- ClientData clearData; /* Info to pass to clearProc. */
+ void *clearData; /* Info to pass to clearProc. */
struct TkSelectionInfo *nextPtr;
/* Next in list of current selections on this
* display. NULL means end of list. */
@@ -52,8 +56,8 @@ typedef struct TkSelHandler {
* returned, such as STRING or ATOM. */
Tk_SelectionProc *proc; /* Procedure to generate selection in this
* format. */
- ClientData clientData; /* Argument to pass to proc. */
- int size; /* Size of units returned by proc (8 for
+ void *clientData; /* Argument to pass to proc. */
+ TkSizeT size; /* Size of units returned by proc (8 for
* STRING, 32 for almost anything else). */
struct TkSelHandler *nextPtr;
/* Next selection handler associated with same
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index e92c03c..8421988 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -66,29 +66,29 @@ typedef struct {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BORDER, "-background", "background", "Background",
- "#d9d9d9", Tk_Offset(Square, bgBorderPtr), -1, 0,
+ "#d9d9d9", offsetof(Square, bgBorderPtr), -1, 0,
"white", 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL, NULL, 0, -1, 0,
"-borderwidth", 0},
{TK_OPTION_SYNONYM, "-bg", NULL, NULL, NULL, 0, -1, 0,
"-background", 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- "2", Tk_Offset(Square, borderWidthPtr), -1, 0, NULL, 0},
+ "2", offsetof(Square, borderWidthPtr), -1, 0, NULL, 0},
{TK_OPTION_BOOLEAN, "-dbl", "doubleBuffer", "DoubleBuffer",
- "1", Tk_Offset(Square, doubleBufferPtr), -1, 0 , NULL, 0},
+ "1", offsetof(Square, doubleBufferPtr), -1, 0 , NULL, 0},
{TK_OPTION_SYNONYM, "-fg", NULL, NULL, NULL, 0, -1, 0,
"-foreground", 0},
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
- "#b03060", Tk_Offset(Square, fgBorderPtr), -1, 0,
+ "#b03060", offsetof(Square, fgBorderPtr), -1, 0,
"black", 0},
{TK_OPTION_PIXELS, "-posx", "posx", "PosX", "0",
- Tk_Offset(Square, xPtr), -1, 0, NULL, 0},
+ offsetof(Square, xPtr), -1, 0, NULL, 0},
{TK_OPTION_PIXELS, "-posy", "posy", "PosY", "0",
- Tk_Offset(Square, yPtr), -1, 0, NULL, 0},
+ offsetof(Square, yPtr), -1, 0, NULL, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- "raised", Tk_Offset(Square, reliefPtr), -1, 0, NULL, 0},
+ "raised", offsetof(Square, reliefPtr), -1, 0, NULL, 0},
{TK_OPTION_PIXELS, "-size", "size", "Size", "20",
- Tk_Offset(Square, sizeObjPtr), -1, 0, NULL, 0},
+ offsetof(Square, sizeObjPtr), -1, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -172,7 +172,7 @@ SquareObjCmd(
squarePtr->gc = NULL;
squarePtr->optionTable = optionTable;
- if (Tk_InitOptions(interp, (char *) squarePtr, optionTable, tkwin)
+ if (Tk_InitOptions(interp, squarePtr, optionTable, tkwin)
!= TCL_OK) {
Tk_DestroyWindow(squarePtr->tkwin);
ckfree(squarePtr);
@@ -181,7 +181,7 @@ SquareObjCmd(
Tk_CreateEventHandler(squarePtr->tkwin, ExposureMask|StructureNotifyMask,
SquareObjEventProc, squarePtr);
- if (Tk_SetOptions(interp, (char *) squarePtr, optionTable, objc - 2,
+ if (Tk_SetOptions(interp, squarePtr, optionTable, objc - 2,
objv + 2, tkwin, NULL, NULL) != TCL_OK) {
goto error;
}
@@ -250,7 +250,7 @@ SquareWidgetObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option");
goto error;
}
- resultObjPtr = Tk_GetOptionValue(interp, (char *) squarePtr,
+ resultObjPtr = Tk_GetOptionValue(interp, squarePtr,
squarePtr->optionTable, objv[2], squarePtr->tkwin);
if (resultObjPtr == NULL) {
result = TCL_ERROR;
@@ -261,19 +261,19 @@ SquareWidgetObjCmd(
case SQUARE_CONFIGURE:
resultObjPtr = NULL;
if (objc == 2) {
- resultObjPtr = Tk_GetOptionInfo(interp, (char *) squarePtr,
+ resultObjPtr = Tk_GetOptionInfo(interp, squarePtr,
squarePtr->optionTable, NULL, squarePtr->tkwin);
if (resultObjPtr == NULL) {
result = TCL_ERROR;
}
} else if (objc == 3) {
- resultObjPtr = Tk_GetOptionInfo(interp, (char *) squarePtr,
+ resultObjPtr = Tk_GetOptionInfo(interp, squarePtr,
squarePtr->optionTable, objv[2], squarePtr->tkwin);
if (resultObjPtr == NULL) {
result = TCL_ERROR;
}
} else {
- result = Tk_SetOptions(interp, (char *) squarePtr,
+ result = Tk_SetOptions(interp, squarePtr,
squarePtr->optionTable, objc - 2, objv + 2,
squarePtr->tkwin, NULL, NULL);
if (result == TCL_OK) {
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 288dfc8..ce9615f 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -38,13 +38,45 @@ MODULE_SCOPE const TkStubs tkStubs;
*/
#undef Tk_MainEx
-#undef XVisualIDFromVisual
-#undef XSynchronize
-#undef XUngrabServer
-#undef XNoOp
-#undef XGrabServer
-#undef XFree
-#undef XFlush
+#undef Tk_FreeXId
+#undef Tk_FreeStyleFromObj
+#undef Tk_GetStyleFromObj
+#undef TkWinGetPlatformId
+#undef TkPutImage
+#undef XPutImage
+
+#if defined(TK_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8
+#define Tk_MainEx 0
+#define Tk_FreeXId 0
+#define Tk_FreeStyleFromObj 0
+#define Tk_GetStyleFromObj 0
+#define TkWinGetPlatformId 0
+#define Tk_PhotoPutBlock_NoComposite 0
+#define Tk_PhotoPutZoomedBlock_NoComposite 0
+#define Tk_PhotoExpand_Panic 0
+#define Tk_PhotoPutBlock_Panic 0
+#define Tk_PhotoPutZoomedBlock_Panic 0
+#define Tk_PhotoSetSize_Panic 0
+#else
+static void
+doNothing(void)
+{
+ /* dummy implementation, no need to do anything */
+}
+#define Tk_FreeXId ((void (*)(Display *, XID)) doNothing)
+#define Tk_FreeStyleFromObj ((void (*)(Tcl_Obj *)) doNothing)
+#define Tk_GetStyleFromObj getStyleFromObj
+static Tk_Style Tk_GetStyleFromObj(Tcl_Obj *obj)
+{
+ return Tk_AllocStyleFromObj(NULL, obj);
+}
+#if defined(_WIN32) || defined(__CYGWIN__)
+#define TkWinGetPlatformId winGetPlatformId
+static int TkWinGetPlatformId(void) {
+ return 2;
+}
+#endif /* defined(_WIN32) || defined(__CYGWIN__) */
+#endif /* !TK_NO_DEPRECATED */
#ifdef _WIN32
@@ -69,9 +101,6 @@ TkCreateXEventSource(void)
# define TkUnixContainerId 0
# define TkUnixDoOneXEvent 0
# define TkUnixSetMenubar 0
-# define XCreateWindow 0
-# define XOffsetRegion 0
-# define XUnionRegion 0
# define TkWmCleanup (void (*)(TkDisplay *)) TkpSync
# define TkSendCleanup (void (*)(TkDisplay *)) TkpSync
# define TkpTestsendCmd 0
@@ -136,46 +165,6 @@ TkPutImage(
return XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
}
-TkRegion TkCreateRegion()
-{
- return (TkRegion) XCreateRegion();
-}
-
-int TkDestroyRegion(TkRegion r)
-{
- return XDestroyRegion((Region)r);
-}
-
-int TkSetRegion(Display *d, GC g, TkRegion r)
-{
- return XSetRegion(d, g, (Region)r);
-}
-
-int TkUnionRectWithRegion(XRectangle *a, TkRegion b, TkRegion c)
-{
- return XUnionRectWithRegion(a, (Region) b, (Region) c);
-}
-
-int TkClipBox(TkRegion a, XRectangle *b)
-{
- return XClipBox((Region) a, b);
-}
-
-int TkIntersectRegion(TkRegion a, TkRegion b, TkRegion c)
-{
- return XIntersectRegion((Region) a, (Region) b, (Region) c);
-}
-
-int TkRectInRegion (TkRegion r, int a, int b, unsigned int c, unsigned int d)
-{
- return XRectInRegion((Region) r, a, b, c, d);
-}
-
-int TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c)
-{
- return XSubtractRegion((Region) a, (Region) b, (Region) c);
-}
-
/* TODO: To be implemented for Cygwin */
# define Tk_AttachHWND 0
# define Tk_GetHWND 0
@@ -211,39 +200,48 @@ int TkSubtractRegion (TkRegion a, TkRegion b, TkRegion c)
# define TkWinSetForegroundWindow 0
# define TkWinDialogDebug 0
# define TkWinGetMenuSystemDefault 0
-# define TkWinGetPlatformId 0
# define TkWinSetHINSTANCE 0
# define TkWinGetPlatformTheme 0
# define TkWinChildProc 0
-# elif !defined(MAC_OSX_TK) /* UNIX */
-
-# undef TkClipBox
-# undef TkCreateRegion
-# undef TkDestroyRegion
-# undef TkIntersectRegion
-# undef TkRectInRegion
-# undef TkSetRegion
-# undef TkUnionRectWithRegion
-# undef TkSubtractRegion
-
-# define TkClipBox (int (*) (TkRegion, XRectangle *)) XClipBox
-# define TkCreateRegion (TkRegion (*) ()) XCreateRegion
-# define TkDestroyRegion (int (*) (TkRegion)) XDestroyRegion
-# define TkIntersectRegion (int (*) (TkRegion, TkRegion, TkRegion)) XIntersectRegion
-# define TkRectInRegion (int (*) (TkRegion, int, int, unsigned int, unsigned int)) XRectInRegion
-# define TkSetRegion (int (*) (Display *, GC, TkRegion)) XSetRegion
-# define TkUnionRectWithRegion (int (*) (XRectangle *, TkRegion, TkRegion)) XUnionRectWithRegion
-# define TkSubtractRegion (int (*) (TkRegion, TkRegion, TkRegion)) XSubtractRegion
# endif
#endif /* !_WIN32 */
+#if defined(MAC_OSX_TCL)
+
+int
+TkPutImage(
+ unsigned long *colors, /* Array of pixel values used by this image.
+ * May be NULL. */
+ int ncolors, /* Number of colors used, or 0. */
+ Display *display,
+ Drawable d, /* Destination drawable. */
+ GC gc,
+ XImage *image, /* Source image. */
+ int src_x, int src_y, /* Offset of subimage. */
+ int dest_x, int dest_y, /* Position of subimage origin in drawable. */
+ unsigned int width, unsigned int height)
+ /* Dimensions of subimage. */
+{
+ return XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
+}
+#endif /* MAC_OSX_TCL */
+
+
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
* below should be made in the generic/tk.decls script.
*/
+#ifdef __GNUC__
+/*
+ * The rest of this file shouldn't warn about deprecated functions; they're
+ * there because we intend them to be so and know that this file is OK to
+ * touch those fields.
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
/* !BEGIN!: Do not edit below this line. */
static const TkIntStubs tkIntStubs = {
@@ -362,13 +360,13 @@ static const TkIntStubs tkIntStubs = {
TkpGetSubFonts, /* 110 */
TkpGetSystemDefault, /* 111 */
TkpMenuThreadInit, /* 112 */
- TkClipBox, /* 113 */
- TkCreateRegion, /* 114 */
- TkDestroyRegion, /* 115 */
- TkIntersectRegion, /* 116 */
- TkRectInRegion, /* 117 */
- TkSetRegion, /* 118 */
- TkUnionRectWithRegion, /* 119 */
+ XClipBox, /* 113 */
+ XCreateRegion, /* 114 */
+ XDestroyRegion, /* 115 */
+ XIntersectRegion, /* 116 */
+ XRectInRegion, /* 117 */
+ XSetRegion, /* 118 */
+ XUnionRectWithRegion, /* 119 */
0, /* 120 */
#if !(defined(_WIN32) || defined(MAC_OSX_TK)) /* X11 */
0, /* 121 */
@@ -421,7 +419,7 @@ static const TkIntStubs tkIntStubs = {
TkFocusFree, /* 142 */
TkClipCleanup, /* 143 */
TkGCCleanup, /* 144 */
- TkSubtractRegion, /* 145 */
+ XSubtractRegion, /* 145 */
TkStylePkgInit, /* 146 */
TkStylePkgFree, /* 147 */
TkToplevelWindowForCommand, /* 148 */
@@ -461,6 +459,7 @@ static const TkIntStubs tkIntStubs = {
TkUnderlineAngledTextLayout, /* 182 */
TkIntersectAngledTextLayout, /* 183 */
TkDrawAngledChars, /* 184 */
+ TkDebugPhotoStringMatchDef, /* 185 */
};
static const TkIntPlatStubs tkIntPlatStubs = {
@@ -564,7 +563,7 @@ static const TkIntPlatStubs tkIntPlatStubs = {
TkMacOSXGetHostToplevel, /* 44 */
TkMacOSXPreprocessMenu, /* 45 */
TkpIsWindowFloating, /* 46 */
- TkMacOSXGetCapture, /* 47 */
+ TkpGetCapture, /* 47 */
0, /* 48 */
TkGetTransientMaster, /* 49 */
TkGenerateButtonEvent, /* 50 */
@@ -734,8 +733,27 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XDrawPoints, /* 135 */
XReparentWindow, /* 136 */
XPutImage, /* 137 */
+ XPolygonRegion, /* 138 */
+ XPointInRegion, /* 139 */
+ XVaCreateNestedList, /* 140 */
+ XSetICValues, /* 141 */
+ XGetICValues, /* 142 */
+ XSetICFocus, /* 143 */
+ 0, /* 144 */
+ 0, /* 145 */
+ 0, /* 146 */
+ XFreeFontSet, /* 147 */
+ XCloseIM, /* 148 */
+ XRegisterIMInstantiateCallback, /* 149 */
+ XUnregisterIMInstantiateCallback, /* 150 */
+ XSetLocaleModifiers, /* 151 */
+ XOpenIM, /* 152 */
+ XGetIMValues, /* 153 */
+ XSetIMValues, /* 154 */
+ XCreateFontSet, /* 155 */
+ XFreeStringList, /* 156 */
#endif /* WIN */
-#ifdef MAC_OSX_TK /* AQUA */
+#ifdef MAC_OSX_TCL /* MACOSX */
XSetDashes, /* 0 */
XGetModifierMapping, /* 1 */
XCreateImage, /* 2 */
@@ -828,20 +846,20 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XQueryColors, /* 89 */
XQueryTree, /* 90 */
XSync, /* 91 */
- 0, /* 92 */
- 0, /* 93 */
- 0, /* 94 */
- 0, /* 95 */
- 0, /* 96 */
- 0, /* 97 */
- 0, /* 98 */
- 0, /* 99 */
- 0, /* 100 */
- 0, /* 101 */
- 0, /* 102 */
- 0, /* 103 */
- 0, /* 104 */
- 0, /* 105 */
+ XTranslateCoordinates, /* 92 */
+ XDeleteProperty, /* 93 */
+ XFreeCursor, /* 94 */
+ XGetInputFocus, /* 95 */
+ XmbLookupString, /* 96 */
+ XNextEvent, /* 97 */
+ XPutBackEvent, /* 98 */
+ XSetCommand, /* 99 */
+ XWindowEvent, /* 100 */
+ XGetWindowAttributes, /* 101 */
+ XGetWMColormapWindows, /* 102 */
+ XIconifyWindow, /* 103 */
+ XWithdrawWindow, /* 104 */
+ XListHosts, /* 105 */
0, /* 106 */
XFlush, /* 107 */
XGrabServer, /* 108 */
@@ -849,32 +867,51 @@ static const TkIntXlibStubs tkIntXlibStubs = {
XFree, /* 110 */
XNoOp, /* 111 */
XSynchronize, /* 112 */
- 0, /* 113 */
+ XLookupColor, /* 113 */
XVisualIDFromVisual, /* 114 */
0, /* 115 */
0, /* 116 */
0, /* 117 */
0, /* 118 */
0, /* 119 */
- 0, /* 120 */
- 0, /* 121 */
- 0, /* 122 */
+ XOffsetRegion, /* 120 */
+ XUnionRegion, /* 121 */
+ XCreateWindow, /* 122 */
0, /* 123 */
0, /* 124 */
0, /* 125 */
0, /* 126 */
0, /* 127 */
0, /* 128 */
- 0, /* 129 */
- 0, /* 130 */
- 0, /* 131 */
- 0, /* 132 */
+ XLowerWindow, /* 129 */
+ XFillArcs, /* 130 */
+ XDrawArcs, /* 131 */
+ XDrawRectangles, /* 132 */
0, /* 133 */
0, /* 134 */
0, /* 135 */
- 0, /* 136 */
+ XReparentWindow, /* 136 */
XPutImage, /* 137 */
-#endif /* AQUA */
+ XPolygonRegion, /* 138 */
+ XPointInRegion, /* 139 */
+ XVaCreateNestedList, /* 140 */
+ XSetICValues, /* 141 */
+ XGetICValues, /* 142 */
+ XSetICFocus, /* 143 */
+ XDestroyIC, /* 144 */
+ XCreatePixmapCursor, /* 145 */
+ XCreateGlyphCursor, /* 146 */
+ XFreeFontSet, /* 147 */
+ XCloseIM, /* 148 */
+ XRegisterIMInstantiateCallback, /* 149 */
+ XUnregisterIMInstantiateCallback, /* 150 */
+ XSetLocaleModifiers, /* 151 */
+ XOpenIM, /* 152 */
+ XGetIMValues, /* 153 */
+ XSetIMValues, /* 154 */
+ XCreateFontSet, /* 155 */
+ XFreeStringList, /* 156 */
+#endif /* MACOSX */
};
static const TkPlatStubs tkPlatStubs = {
diff --git a/generic/tkStyle.c b/generic/tkStyle.c
index 5c0f204..393becc 100644
--- a/generic/tkStyle.c
+++ b/generic/tkStyle.c
@@ -155,7 +155,7 @@ static const Tcl_ObjType styleObjType = {
FreeStyleObjProc, /* freeIntRepProc */
DupStyleObjProc, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetStyleFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -1076,7 +1076,7 @@ Tk_GetElementSize(
Tk_Style style, /* The widget style. */
Tk_StyledElement element, /* The styled element, previously returned by
* Tk_GetStyledElement. */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_Window tkwin, /* The widget window. */
int width, int height, /* Requested size. */
int inner, /* If TRUE, compute the outer size according
@@ -1117,7 +1117,7 @@ Tk_GetElementBox(
Tk_Style style, /* The widget style. */
Tk_StyledElement element, /* The styled element, previously returned by
* Tk_GetStyledElement. */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_Window tkwin, /* The widget window. */
int x, int y, /* Top left corner of available area. */
int width, int height, /* Size of available area. */
@@ -1159,7 +1159,7 @@ Tk_GetElementBorderWidth(
Tk_Style style, /* The widget style. */
Tk_StyledElement element, /* The styled element, previously returned by
* Tk_GetStyledElement. */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_Window tkwin) /* The widget window. */
{
Style *stylePtr = (Style *) style;
@@ -1190,7 +1190,7 @@ Tk_DrawElement(
Tk_Style style, /* The widget style. */
Tk_StyledElement element, /* The styled element, previously returned by
* Tk_GetStyledElement. */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_Window tkwin, /* The widget window. */
Drawable d, /* Where to draw element. */
int x, int y, /* Top left corner of element. */
@@ -1405,62 +1405,15 @@ Tk_AllocStyleFromObj(
Tcl_Obj *objPtr) /* Object containing name of the style to
* retrieve. */
{
- Style *stylePtr;
-
- if (objPtr->typePtr != &styleObjType) {
- SetStyleFromAny(interp, objPtr);
- }
- stylePtr = objPtr->internalRep.twoPtrValue.ptr1;
-
- return (Tk_Style) stylePtr;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Tk_GetStyleFromObj --
- *
- * Find the style that corresponds to a given object. The style must have
- * already been created by Tk_CreateStyle.
- *
- * Results:
- * The return value is a token for the style that matches objPtr, or NULL
- * if none found.
- *
- * Side effects:
- * If the object is not already a style ref, the conversion will free any
- * old internal representation.
- *
- *----------------------------------------------------------------------
- */
-
-Tk_Style
-Tk_GetStyleFromObj(
- Tcl_Obj *objPtr) /* The object from which to get the style. */
-{
if (objPtr->typePtr != &styleObjType) {
- SetStyleFromAny(NULL, objPtr);
+ if (SetStyleFromAny(interp, objPtr) != TCL_OK) {
+ return NULL;
+ }
}
-
return objPtr->internalRep.twoPtrValue.ptr1;
}
/*
- *---------------------------------------------------------------------------
- *
- * Tk_FreeStyleFromObj --
- *
- * No-op. Present only for stubs compatibility.
- *
- *---------------------------------------------------------------------------
- */
-void
-Tk_FreeStyleFromObj(
- Tcl_Obj *objPtr)
-{
-}
-
-/*
*----------------------------------------------------------------------
*
* SetStyleFromAny --
@@ -1469,8 +1422,8 @@ Tk_FreeStyleFromObj(
* internal form.
*
* Results:
- * Always returns TCL_OK. If an error occurs is returned (e.g. the style
- * doesn't exist), an error message will be left in interp's result.
+ * If an error occurs is returned (e.g. the style doesn't exist), an
+ * error message will be left in interp's result and TCL_ERROR is returned.
*
* Side effects:
* The object is left with its typePtr pointing to styleObjType.
@@ -1485,6 +1438,7 @@ SetStyleFromAny(
{
const Tcl_ObjType *typePtr;
const char *name;
+ Tk_Style style;
/*
* Free the old internalRep before setting the new one.
@@ -1496,8 +1450,12 @@ SetStyleFromAny(
typePtr->freeIntRepProc(objPtr);
}
+ style = Tk_GetStyle(interp, name);
+ if (style == NULL) {
+ return TCL_ERROR;
+ }
objPtr->typePtr = &styleObjType;
- objPtr->internalRep.twoPtrValue.ptr1 = Tk_GetStyle(interp, name);
+ objPtr->internalRep.twoPtrValue.ptr1 = style;
return TCL_OK;
}
diff --git a/generic/tkTest.c b/generic/tkTest.c
index a8929b9..e697bf3 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -195,6 +195,9 @@ static void CustomOptionFree(ClientData clientData,
static int TestpropObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj * const objv[]);
+static int TestprintfObjCmd(ClientData dummy,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj * const objv[]);
#if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__))
static int TestwrapperObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
@@ -206,6 +209,9 @@ static int TrivialConfigObjCmd(ClientData dummy,
Tcl_Obj * const objv[]);
static void TrivialEventProc(ClientData clientData,
XEvent *eventPtr);
+static int TestPhotoStringMatchCmd(ClientData dummy,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj * const objv[]);
/*
*----------------------------------------------------------------------
@@ -230,7 +236,7 @@ Tktest_Init(
{
static int initialized = 0;
- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
return TCL_ERROR;
}
if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
@@ -242,7 +248,7 @@ Tktest_Init(
*/
if (Tcl_PkgProvideEx(interp, "Tktest", TK_PATCH_LEVEL, NULL) == TCL_ERROR) {
- return TCL_ERROR;
+ return TCL_ERROR;
}
Tcl_CreateObjCommand(interp, "square", SquareObjCmd, NULL, NULL);
@@ -266,8 +272,12 @@ Tktest_Init(
(ClientData) Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testprop", TestpropObjCmd,
(ClientData) Tk_MainWindow(interp), NULL);
+ Tcl_CreateObjCommand(interp, "testprintf", TestprintfObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testtext", TkpTesttextCmd,
(ClientData) Tk_MainWindow(interp), NULL);
+ Tcl_CreateObjCommand(interp, "testphotostringmatch",
+ TestPhotoStringMatchCmd, (ClientData) Tk_MainWindow(interp),
+ NULL);
#if defined(_WIN32)
Tcl_CreateObjCommand(interp, "testmetrics", TestmetricsObjCmd,
@@ -455,7 +465,7 @@ TestcursorObjCmd(
* A standard Tcl result.
*
* Side effects:
- * All the intepreters created by previous calls to "testnewapp" get
+ * All the interpreters created by previous calls to "testnewapp" get
* deleted.
*
*----------------------------------------------------------------------
@@ -527,7 +537,7 @@ TestobjconfigObjCmd(
CustomOptionFree,
INT2PTR(1)
};
- Tk_Window mainWin = (Tk_Window) clientData;
+ Tk_Window mainWin = clientData;
Tk_Window tkwin;
int index, result = TCL_OK;
@@ -546,9 +556,9 @@ TestobjconfigObjCmd(
} ExtensionWidgetRecord;
static const Tk_OptionSpec baseSpecs[] = {
{TK_OPTION_STRING, "-one", "one", "One", "one",
- Tk_Offset(ExtensionWidgetRecord, base1ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base1ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-two", "two", "Two", "two",
- Tk_Offset(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -590,47 +600,47 @@ TestobjconfigObjCmd(
};
static const Tk_OptionSpec typesSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
- Tk_Offset(TypesRecord, booleanPtr), -1, 0, 0, 0x1},
+ offsetof(TypesRecord, booleanPtr), -1, 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "7",
- Tk_Offset(TypesRecord, integerPtr), -1, 0, 0, 0x2},
+ offsetof(TypesRecord, integerPtr), -1, 0, 0, 0x2},
{TK_OPTION_DOUBLE, "-double", "double", "Double", "3.14159",
- Tk_Offset(TypesRecord, doublePtr), -1, 0, 0, 0x4},
+ offsetof(TypesRecord, doublePtr), -1, 0, 0, 0x4},
{TK_OPTION_STRING, "-string", "string", "String",
- "foo", Tk_Offset(TypesRecord, stringPtr), -1,
+ "foo", offsetof(TypesRecord, stringPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x8},
{TK_OPTION_STRING_TABLE,
"-stringtable", "StringTable", "stringTable",
- "one", Tk_Offset(TypesRecord, stringTablePtr), -1,
+ "one", offsetof(TypesRecord, stringTablePtr), -1,
TK_CONFIG_NULL_OK, stringTable, 0x10},
{TK_OPTION_COLOR, "-color", "color", "Color",
- "red", Tk_Offset(TypesRecord, colorPtr), -1,
+ "red", offsetof(TypesRecord, colorPtr), -1,
TK_CONFIG_NULL_OK, "black", 0x20},
{TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12",
- Tk_Offset(TypesRecord, fontPtr), -1,
+ offsetof(TypesRecord, fontPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x40},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", "gray50",
- Tk_Offset(TypesRecord, bitmapPtr), -1,
+ offsetof(TypesRecord, bitmapPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x80},
{TK_OPTION_BORDER, "-border", "border", "Border",
- "blue", Tk_Offset(TypesRecord, borderPtr), -1,
+ "blue", offsetof(TypesRecord, borderPtr), -1,
TK_CONFIG_NULL_OK, "white", 0x100},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised",
- Tk_Offset(TypesRecord, reliefPtr), -1,
+ offsetof(TypesRecord, reliefPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x200},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm",
- Tk_Offset(TypesRecord, cursorPtr), -1,
+ offsetof(TypesRecord, cursorPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x400},
{TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left",
- Tk_Offset(TypesRecord, justifyPtr), -1,
+ offsetof(TypesRecord, justifyPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x800},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL,
- Tk_Offset(TypesRecord, anchorPtr), -1,
+ offsetof(TypesRecord, anchorPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x1000},
{TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel",
- "1", Tk_Offset(TypesRecord, pixelPtr), -1,
+ "1", offsetof(TypesRecord, pixelPtr), -1,
TK_CONFIG_NULL_OK, 0, 0x2000},
{TK_OPTION_CUSTOM, "-custom", NULL, NULL,
- "", Tk_Offset(TypesRecord, customPtr), -1,
+ "", offsetof(TypesRecord, customPtr), -1,
TK_CONFIG_NULL_OK, &CustomOption, 0x4000},
{TK_OPTION_SYNONYM, "-synonym", NULL, NULL,
NULL, 0, -1, 0, "-color", 0x8000},
@@ -641,7 +651,7 @@ TestobjconfigObjCmd(
optionTable = Tk_CreateOptionTable(interp, typesSpecs);
tables[index] = optionTable;
- tkwin = Tk_CreateWindowFromPath(interp, (Tk_Window) clientData,
+ tkwin = Tk_CreateWindowFromPath(interp, clientData,
Tcl_GetString(objv[2]), NULL);
if (tkwin == NULL) {
return TCL_ERROR;
@@ -668,7 +678,7 @@ TestobjconfigObjCmd(
recordPtr->mmPtr = NULL;
recordPtr->stringTablePtr = NULL;
recordPtr->customPtr = NULL;
- result = Tk_InitOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_InitOptions(interp, recordPtr, optionTable,
tkwin);
if (result == TCL_OK) {
recordPtr->header.widgetCmd = Tcl_CreateObjCommand(interp,
@@ -676,7 +686,7 @@ TestobjconfigObjCmd(
(ClientData) recordPtr, TrivialCmdDeletedProc);
Tk_CreateEventHandler(tkwin, StructureNotifyMask,
TrivialEventProc, (ClientData) recordPtr);
- result = Tk_SetOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_SetOptions(interp, recordPtr, optionTable,
objc-3, objv+3, tkwin, NULL, NULL);
if (result != TCL_OK) {
Tk_DestroyWindow(tkwin);
@@ -696,7 +706,7 @@ TestobjconfigObjCmd(
Tk_Window tkwin;
Tk_OptionTable optionTable;
- tkwin = Tk_CreateWindowFromPath(interp, (Tk_Window) clientData,
+ tkwin = Tk_CreateWindowFromPath(interp, clientData,
Tcl_GetString(objv[2]), NULL);
if (tkwin == NULL) {
return TCL_ERROR;
@@ -711,12 +721,12 @@ TestobjconfigObjCmd(
recordPtr->header.tkwin = tkwin;
recordPtr->base1ObjPtr = recordPtr->base2ObjPtr = NULL;
recordPtr->extension3ObjPtr = recordPtr->extension4ObjPtr = NULL;
- result = Tk_InitOptions(interp, (char *)recordPtr, optionTable, tkwin);
+ result = Tk_InitOptions(interp, recordPtr, optionTable, tkwin);
if (result == TCL_OK) {
- result = Tk_SetOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_SetOptions(interp, recordPtr, optionTable,
objc-3, objv+3, tkwin, NULL, NULL);
if (result != TCL_OK) {
- Tk_FreeConfigOptions((char *) recordPtr, optionTable, tkwin);
+ Tk_FreeConfigOptions(recordPtr, optionTable, tkwin);
}
}
if (result == TCL_OK) {
@@ -735,21 +745,21 @@ TestobjconfigObjCmd(
ExtensionWidgetRecord *recordPtr;
static const Tk_OptionSpec extensionSpecs[] = {
{TK_OPTION_STRING, "-three", "three", "Three", "three",
- Tk_Offset(ExtensionWidgetRecord, extension3ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, extension3ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-four", "four", "Four", "four",
- Tk_Offset(ExtensionWidgetRecord, extension4ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, extension4ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-two", "two", "Two", "two and a half",
- Tk_Offset(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, base2ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_STRING,
"-oneAgain", "oneAgain", "OneAgain", "one again",
- Tk_Offset(ExtensionWidgetRecord, extension5ObjPtr), -1, 0, NULL, 0},
+ offsetof(ExtensionWidgetRecord, extension5ObjPtr), -1, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, -1, 0,
(ClientData) baseSpecs, 0}
};
Tk_Window tkwin;
Tk_OptionTable optionTable;
- tkwin = Tk_CreateWindowFromPath(interp, (Tk_Window) clientData,
+ tkwin = Tk_CreateWindowFromPath(interp, clientData,
Tcl_GetString(objv[2]), NULL);
if (tkwin == NULL) {
return TCL_ERROR;
@@ -765,9 +775,9 @@ TestobjconfigObjCmd(
recordPtr->base1ObjPtr = recordPtr->base2ObjPtr = NULL;
recordPtr->extension3ObjPtr = recordPtr->extension4ObjPtr = NULL;
recordPtr->extension5ObjPtr = NULL;
- result = Tk_InitOptions(interp, (char *)recordPtr, optionTable, tkwin);
+ result = Tk_InitOptions(interp, recordPtr, optionTable, tkwin);
if (result == TCL_OK) {
- result = Tk_SetOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_SetOptions(interp, recordPtr, optionTable,
objc-3, objv+3, tkwin, NULL, NULL);
if (result != TCL_OK) {
Tk_FreeConfigOptions((char *) recordPtr, optionTable, tkwin);
@@ -791,7 +801,7 @@ TestobjconfigObjCmd(
ErrorWidgetRecord widgetRecord;
static const Tk_OptionSpec errorSpecs[] = {
{TK_OPTION_INT, "-int", "integer", "Integer", "bogus",
- Tk_Offset(ErrorWidgetRecord, intPtr), 0, 0, NULL, 0},
+ offsetof(ErrorWidgetRecord, intPtr), 0, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tk_OptionTable optionTable;
@@ -799,7 +809,7 @@ TestobjconfigObjCmd(
widgetRecord.intPtr = NULL;
optionTable = Tk_CreateOptionTable(interp, errorSpecs);
tables[index] = optionTable;
- return Tk_InitOptions(interp, (char *) &widgetRecord, optionTable,
+ return Tk_InitOptions(interp, &widgetRecord, optionTable,
(Tk_Window) NULL);
}
@@ -865,50 +875,50 @@ TestobjconfigObjCmd(
};
static const Tk_OptionSpec internalSpecs[] = {
{TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1",
- -1, Tk_Offset(InternalRecord, boolean), 0, 0, 0x1},
+ -1, offsetof(InternalRecord, boolean), 0, 0, 0x1},
{TK_OPTION_INT, "-integer", "integer", "Integer", "148962237",
- -1, Tk_Offset(InternalRecord, integer), 0, 0, 0x2},
+ -1, offsetof(InternalRecord, integer), 0, 0, 0x2},
{TK_OPTION_DOUBLE, "-double", "double", "Double", "3.14159",
- -1, Tk_Offset(InternalRecord, doubleValue), 0, 0, 0x4},
+ -1, offsetof(InternalRecord, doubleValue), 0, 0, 0x4},
{TK_OPTION_STRING, "-string", "string", "String", "foo",
- -1, Tk_Offset(InternalRecord, string),
+ -1, offsetof(InternalRecord, string),
TK_CONFIG_NULL_OK, 0, 0x8},
{TK_OPTION_STRING_TABLE,
"-stringtable", "StringTable", "stringTable", "one",
- -1, Tk_Offset(InternalRecord, index),
+ -1, offsetof(InternalRecord, index),
TK_CONFIG_NULL_OK, internalStringTable, 0x10},
{TK_OPTION_COLOR, "-color", "color", "Color", "red",
- -1, Tk_Offset(InternalRecord, colorPtr),
+ -1, offsetof(InternalRecord, colorPtr),
TK_CONFIG_NULL_OK, "black", 0x20},
{TK_OPTION_FONT, "-font", "font", "Font", "Helvetica 12",
- -1, Tk_Offset(InternalRecord, tkfont),
+ -1, offsetof(InternalRecord, tkfont),
TK_CONFIG_NULL_OK, 0, 0x40},
{TK_OPTION_BITMAP, "-bitmap", "bitmap", "Bitmap", "gray50",
- -1, Tk_Offset(InternalRecord, bitmap),
+ -1, offsetof(InternalRecord, bitmap),
TK_CONFIG_NULL_OK, 0, 0x80},
{TK_OPTION_BORDER, "-border", "border", "Border", "blue",
- -1, Tk_Offset(InternalRecord, border),
+ -1, offsetof(InternalRecord, border),
TK_CONFIG_NULL_OK, "white", 0x100},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", "raised",
- -1, Tk_Offset(InternalRecord, relief),
+ -1, offsetof(InternalRecord, relief),
TK_CONFIG_NULL_OK, 0, 0x200},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", "xterm",
- -1, Tk_Offset(InternalRecord, cursor),
+ -1, offsetof(InternalRecord, cursor),
TK_CONFIG_NULL_OK, 0, 0x400},
{TK_OPTION_JUSTIFY, "-justify", NULL, NULL, "left",
- -1, Tk_Offset(InternalRecord, justify),
+ -1, offsetof(InternalRecord, justify),
TK_CONFIG_NULL_OK, 0, 0x800},
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", NULL,
- -1, Tk_Offset(InternalRecord, anchor),
+ -1, offsetof(InternalRecord, anchor),
TK_CONFIG_NULL_OK, 0, 0x1000},
{TK_OPTION_PIXELS, "-pixel", "pixel", "Pixel", "1",
- -1, Tk_Offset(InternalRecord, pixels),
+ -1, offsetof(InternalRecord, pixels),
TK_CONFIG_NULL_OK, 0, 0x2000},
{TK_OPTION_WINDOW, "-window", "window", "Window", NULL,
- -1, Tk_Offset(InternalRecord, tkwin),
+ -1, offsetof(InternalRecord, tkwin),
TK_CONFIG_NULL_OK, 0, 0},
{TK_OPTION_CUSTOM, "-custom", NULL, NULL, "",
- -1, Tk_Offset(InternalRecord, custom),
+ -1, offsetof(InternalRecord, custom),
TK_CONFIG_NULL_OK, &CustomOption, 0x4000},
{TK_OPTION_SYNONYM, "-synonym", NULL, NULL,
NULL, -1, -1, 0, "-color", 0x8000},
@@ -919,7 +929,7 @@ TestobjconfigObjCmd(
optionTable = Tk_CreateOptionTable(interp, internalSpecs);
tables[index] = optionTable;
- tkwin = Tk_CreateWindowFromPath(interp, (Tk_Window) clientData,
+ tkwin = Tk_CreateWindowFromPath(interp, clientData,
Tcl_GetString(objv[2]), NULL);
if (tkwin == NULL) {
return TCL_ERROR;
@@ -947,7 +957,7 @@ TestobjconfigObjCmd(
recordPtr->mm = 0.0;
recordPtr->tkwin = NULL;
recordPtr->custom = NULL;
- result = Tk_InitOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_InitOptions(interp, recordPtr, optionTable,
tkwin);
if (result == TCL_OK) {
recordPtr->header.widgetCmd = Tcl_CreateObjCommand(interp,
@@ -955,7 +965,7 @@ TestobjconfigObjCmd(
recordPtr, TrivialCmdDeletedProc);
Tk_CreateEventHandler(tkwin, StructureNotifyMask,
TrivialEventProc, recordPtr);
- result = Tk_SetOptions(interp, (char *) recordPtr, optionTable,
+ result = Tk_SetOptions(interp, recordPtr, optionTable,
objc - 3, objv + 3, tkwin, NULL, NULL);
if (result != TCL_OK) {
Tk_DestroyWindow(tkwin);
@@ -982,15 +992,15 @@ TestobjconfigObjCmd(
FiveRecord *recordPtr;
static const Tk_OptionSpec smallSpecs[] = {
{TK_OPTION_INT, "-one", "one", "One", "1",
- Tk_Offset(FiveRecord, one), -1, 0, NULL, 0},
+ offsetof(FiveRecord, one), -1, 0, NULL, 0},
{TK_OPTION_INT, "-two", "two", "Two", "2",
- Tk_Offset(FiveRecord, two), -1, 0, NULL, 0},
+ offsetof(FiveRecord, two), -1, 0, NULL, 0},
{TK_OPTION_INT, "-three", "three", "Three", "3",
- Tk_Offset(FiveRecord, three), -1, 0, NULL, 0},
+ offsetof(FiveRecord, three), -1, 0, NULL, 0},
{TK_OPTION_INT, "-four", "four", "Four", "4",
- Tk_Offset(FiveRecord, four), -1, 0, NULL, 0},
+ offsetof(FiveRecord, four), -1, 0, NULL, 0},
{TK_OPTION_STRING, "-five", NULL, NULL, NULL,
- Tk_Offset(FiveRecord, five), -1, 0, NULL, 0},
+ offsetof(FiveRecord, five), -1, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
@@ -1008,10 +1018,10 @@ TestobjconfigObjCmd(
recordPtr->one = recordPtr->two = recordPtr->three = NULL;
recordPtr->four = recordPtr->five = NULL;
Tcl_SetObjResult(interp, objv[2]);
- result = Tk_InitOptions(interp, (char *) recordPtr,
+ result = Tk_InitOptions(interp, recordPtr,
recordPtr->header.optionTable, (Tk_Window) NULL);
if (result == TCL_OK) {
- result = Tk_SetOptions(interp, (char *) recordPtr,
+ result = Tk_SetOptions(interp, recordPtr,
recordPtr->header.optionTable, objc - 3, objv + 3,
(Tk_Window) NULL, NULL, NULL);
if (result == TCL_OK) {
@@ -1019,7 +1029,7 @@ TestobjconfigObjCmd(
Tcl_GetString(objv[2]), TrivialConfigObjCmd,
(ClientData) recordPtr, TrivialCmdDeletedProc);
} else {
- Tk_FreeConfigOptions((char *) recordPtr,
+ Tk_FreeConfigOptions(recordPtr,
recordPtr->header.optionTable, (Tk_Window) NULL);
}
}
@@ -1036,7 +1046,7 @@ TestobjconfigObjCmd(
NotEnoughRecord record;
static const Tk_OptionSpec errorSpecs[] = {
{TK_OPTION_INT, "-foo", "foo", "Foo", "0",
- Tk_Offset(NotEnoughRecord, fooObjPtr), 0, 0, NULL, 0},
+ offsetof(NotEnoughRecord, fooObjPtr), 0, 0, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tcl_Obj *newObjPtr = Tcl_NewStringObj("-foo", -1);
@@ -1048,8 +1058,8 @@ TestobjconfigObjCmd(
Tk_SetClass(tkwin, "Config");
optionTable = Tk_CreateOptionTable(interp, errorSpecs);
tables[index] = optionTable;
- Tk_InitOptions(interp, (char *) &record, optionTable, tkwin);
- if (Tk_SetOptions(interp, (char *) &record, optionTable, 1,
+ Tk_InitOptions(interp, &record, optionTable, tkwin);
+ if (Tk_SetOptions(interp, &record, optionTable, 1,
&newObjPtr, tkwin, NULL, NULL) != TCL_OK) {
result = TCL_ERROR;
}
@@ -1067,11 +1077,11 @@ TestobjconfigObjCmd(
SlaveRecord *recordPtr;
static const Tk_OptionSpec slaveSpecs[] = {
{TK_OPTION_WINDOW, "-window", "window", "Window", ".bar",
- Tk_Offset(SlaveRecord, windowPtr), -1, TK_CONFIG_NULL_OK, NULL, 0},
+ offsetof(SlaveRecord, windowPtr), -1, TK_CONFIG_NULL_OK, NULL, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0}
};
Tk_Window tkwin = Tk_CreateWindowFromPath(interp,
- (Tk_Window) clientData, Tcl_GetString(objv[2]), NULL);
+ clientData, Tcl_GetString(objv[2]), NULL);
if (tkwin == NULL) {
return TCL_ERROR;
@@ -1086,10 +1096,10 @@ TestobjconfigObjCmd(
recordPtr->header.tkwin = tkwin;
recordPtr->windowPtr = NULL;
- result = Tk_InitOptions(interp, (char *) recordPtr,
+ result = Tk_InitOptions(interp, recordPtr,
recordPtr->header.optionTable, tkwin);
if (result == TCL_OK) {
- result = Tk_SetOptions(interp, (char *) recordPtr,
+ result = Tk_SetOptions(interp, recordPtr,
recordPtr->header.optionTable, objc - 3, objv + 3,
tkwin, NULL, NULL);
if (result == TCL_OK) {
@@ -1100,7 +1110,7 @@ TestobjconfigObjCmd(
TrivialEventProc, recordPtr);
Tcl_SetObjResult(interp, objv[2]);
} else {
- Tk_FreeConfigOptions((char *) recordPtr,
+ Tk_FreeConfigOptions(recordPtr,
recordPtr->header.optionTable, tkwin);
}
}
@@ -1148,7 +1158,7 @@ TrivialConfigObjCmd(
};
Tcl_Obj *resultObjPtr;
int index, mask;
- TrivialCommandHeader *headerPtr = (TrivialCommandHeader *) clientData;
+ TrivialCommandHeader *headerPtr = clientData;
Tk_Window tkwin = headerPtr->tkwin;
Tk_SavedOptions saved;
@@ -1171,7 +1181,7 @@ TrivialConfigObjCmd(
result = TCL_ERROR;
goto done;
}
- resultObjPtr = Tk_GetOptionValue(interp, (char *) clientData,
+ resultObjPtr = Tk_GetOptionValue(interp, clientData,
headerPtr->optionTable, objv[2], tkwin);
if (resultObjPtr != NULL) {
Tcl_SetObjResult(interp, resultObjPtr);
@@ -1182,7 +1192,7 @@ TrivialConfigObjCmd(
break;
case CONFIGURE:
if (objc == 2) {
- resultObjPtr = Tk_GetOptionInfo(interp, (char *) clientData,
+ resultObjPtr = Tk_GetOptionInfo(interp, clientData,
headerPtr->optionTable, NULL, tkwin);
if (resultObjPtr == NULL) {
result = TCL_ERROR;
@@ -1190,7 +1200,7 @@ TrivialConfigObjCmd(
Tcl_SetObjResult(interp, resultObjPtr);
}
} else if (objc == 3) {
- resultObjPtr = Tk_GetOptionInfo(interp, (char *) clientData,
+ resultObjPtr = Tk_GetOptionInfo(interp, clientData,
headerPtr->optionTable, objv[2], tkwin);
if (resultObjPtr == NULL) {
result = TCL_ERROR;
@@ -1198,21 +1208,21 @@ TrivialConfigObjCmd(
Tcl_SetObjResult(interp, resultObjPtr);
}
} else {
- result = Tk_SetOptions(interp, (char *) clientData,
+ result = Tk_SetOptions(interp, clientData,
headerPtr->optionTable, objc - 2, objv + 2,
tkwin, NULL, &mask);
if (result == TCL_OK) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(mask));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(mask));
}
}
break;
case CSAVE:
- result = Tk_SetOptions(interp, (char *) clientData,
+ result = Tk_SetOptions(interp, clientData,
headerPtr->optionTable, objc - 2, objv + 2,
tkwin, &saved, &mask);
Tk_FreeSavedOptions(&saved);
if (result == TCL_OK) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(mask));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(mask));
}
break;
}
@@ -1243,7 +1253,7 @@ static void
TrivialCmdDeletedProc(
ClientData clientData) /* Pointer to widget record for widget. */
{
- TrivialCommandHeader *headerPtr = (TrivialCommandHeader *) clientData;
+ TrivialCommandHeader *headerPtr = clientData;
Tk_Window tkwin = headerPtr->tkwin;
if (tkwin != NULL) {
@@ -1255,8 +1265,8 @@ TrivialCmdDeletedProc(
* here.
*/
- Tk_FreeConfigOptions((char *) clientData,
- headerPtr->optionTable, (Tk_Window) NULL);
+ Tk_FreeConfigOptions(clientData,
+ headerPtr->optionTable, NULL);
Tcl_EventuallyFree(clientData, TCL_DYNAMIC);
}
}
@@ -1282,11 +1292,11 @@ TrivialEventProc(
ClientData clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
- TrivialCommandHeader *headerPtr = (TrivialCommandHeader *) clientData;
+ TrivialCommandHeader *headerPtr = clientData;
if (eventPtr->type == DestroyNotify) {
if (headerPtr->tkwin != NULL) {
- Tk_FreeConfigOptions((char *) clientData,
+ Tk_FreeConfigOptions(clientData,
headerPtr->optionTable, headerPtr->tkwin);
headerPtr->optionTable = NULL;
headerPtr->tkwin = NULL;
@@ -1328,7 +1338,7 @@ TestfontObjCmd(
Tk_Window tkwin;
Tk_Font tkfont;
- tkwin = (Tk_Window) clientData;
+ tkwin = clientData;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option fontName");
@@ -1448,7 +1458,7 @@ ImageObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
- TImageMaster *timPtr = (TImageMaster *) clientData;
+ TImageMaster *timPtr = clientData;
int x, y, width, height;
if (objc < 2) {
@@ -1503,7 +1513,7 @@ ImageGet(
* used. */
ClientData clientData) /* Pointer to TImageMaster for image. */
{
- TImageMaster *timPtr = (TImageMaster *) clientData;
+ TImageMaster *timPtr = clientData;
TImageInstance *instPtr;
char buffer[100];
XGCValues gcValues;
@@ -1550,7 +1560,7 @@ ImageDisplay(
/* Coordinates in drawable corresponding to
* imageX and imageY. */
{
- TImageInstance *instPtr = (TImageInstance *) clientData;
+ TImageInstance *instPtr = clientData;
char buffer[200 + TCL_INTEGER_SPACE * 6];
/*
@@ -1625,7 +1635,7 @@ ImageFree(
ClientData clientData, /* Pointer to TImageInstance for instance. */
Display *display) /* Display where image was to be drawn. */
{
- TImageInstance *instPtr = (TImageInstance *) clientData;
+ TImageInstance *instPtr = clientData;
char buffer[200];
sprintf(buffer, "%s free", instPtr->masterPtr->imageName);
@@ -1659,7 +1669,7 @@ ImageDelete(
* this function is called, no more instances
* exist. */
{
- TImageMaster *timPtr = (TImageMaster *) clientData;
+ TImageMaster *timPtr = clientData;
char buffer[100];
sprintf(buffer, "%s delete", timPtr->imageName);
@@ -1698,7 +1708,7 @@ TestmakeexistObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
- Tk_Window mainWin = (Tk_Window) clientData;
+ Tk_Window mainWin = clientData;
int i;
Tk_Window tkwin;
@@ -1741,7 +1751,7 @@ TestmenubarObjCmd(
Tcl_Obj *const objv[]) /* Argument strings. */
{
#ifdef __UNIX__
- Tk_Window mainWin = (Tk_Window) clientData;
+ Tk_Window mainWin = clientData;
Tk_Window tkwin, menubar;
if (objc < 2) {
@@ -1854,7 +1864,7 @@ TestpropObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument strings. */
{
- Tk_Window mainWin = (Tk_Window) clientData;
+ Tk_Window mainWin = clientData;
int result, actualFormat;
unsigned long bytesAfter, length, value;
Atom actualType, propName;
@@ -1906,6 +1916,60 @@ TestpropObjCmd(
return TCL_OK;
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * TestpropObjCmd --
+ *
+ * This function implements the "testprop" command. It fetches and prints
+ * the value of a property on a window.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ /* ARGSUSED */
+static int
+TestprintfObjCmd(
+ ClientData clientData, /* Not used */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
+{
+ char buffer[256];
+ Tcl_WideInt wideInt;
+#ifdef _WIN32
+ __int64 longLongInt;
+#else
+ long long longLongInt;
+#endif
+
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "wideint");
+ return TCL_ERROR;
+ }
+ if (Tcl_GetWideIntFromObj(interp, objv[1], &wideInt) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ longLongInt = wideInt;
+
+ /* Just add a lot of arguments to sprintf. Reason: on AMD64, the first
+ * 4 or 6 arguments (we assume 8, just in case) might be put in registers,
+ * which still woudn't tell if the assumed size is correct: We want this
+ * test-case to fail if the 64-bit value is printed as truncated to 32-bit.
+ */
+ sprintf(buffer, "%s%s%s%s%s%s%s%s%" TCL_LL_MODIFIER "d %"
+ TCL_LL_MODIFIER "u", "", "", "", "", "", "", "", "",
+ (Tcl_WideInt)longLongInt, (Tcl_WideUInt)longLongInt);
+ Tcl_AppendResult(interp, buffer, NULL);
+ return TCL_OK;
+}
+
#if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__))
/*
*----------------------------------------------------------------------
@@ -1941,7 +2005,7 @@ TestwrapperObjCmd(
return TCL_ERROR;
}
- tkwin = (Tk_Window) clientData;
+ tkwin = clientData;
winPtr = (TkWindow *) Tk_NameToWindow(interp, Tcl_GetString(objv[1]), tkwin);
if (winPtr == NULL) {
return TCL_ERROR;
@@ -2000,7 +2064,7 @@ CustomOptionSet(
objEmpty = 0;
- if (internalOffset >= 0) {
+ if (internalOffset != -1) {
internalPtr = recordPtr + internalOffset;
} else {
internalPtr = NULL;
@@ -2076,6 +2140,54 @@ CustomOptionFree(
ckfree(*(char **)internalPtr);
}
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * TestPhotoStringMatchCmd --
+ *
+ * This function implements the "testphotostringmatch" command. It
+ * provides a way from Tcl to call the string match function for the
+ * default image handler directly.
+ *
+ * Results:
+ * A standard Tcl result. If data is in the proper format, the result in
+ * interp will contain width and height as a list. If the data cannot be
+ * parsed as default image format, returns TCL_ERROR and leaves an
+ * appropriate error message in interp.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ /* ARGSUSED */
+static int
+TestPhotoStringMatchCmd(
+ ClientData clientData, /* Main window for application. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument strings. */
+{
+ Tcl_Obj *dummy = NULL;
+ Tcl_Obj *resultObj[2];
+ int width, height;
+
+ if (objc != 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "imageData");
+ return TCL_ERROR;
+ }
+ if (TkDebugPhotoStringMatchDef(interp, objv[1], dummy, &width, &height)) {
+ resultObj[0] = Tcl_NewWideIntObj(width);
+ resultObj[1] = Tcl_NewWideIntObj(height);
+ Tcl_SetObjResult(interp, Tcl_NewListObj(2, resultObj));
+ return TCL_OK;
+ } else {
+ return TCL_ERROR;
+ }
+}
+
+
/*
* Local Variables:
diff --git a/generic/tkText.c b/generic/tkText.c
index 7c62621..f810010 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -14,9 +14,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
#include "tkUndo.h"
+#include "default.h"
#if defined(MAC_OSX_TK)
#define Style TkStyle
@@ -122,10 +122,10 @@ static const Tk_ObjCustomOption lineOption = {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_BOOLEAN, "-autoseparators", "autoSeparators",
"AutoSeparators", DEF_TEXT_AUTO_SEPARATORS, -1,
- Tk_Offset(TkText, autoSeparators),
+ offsetof(TkText, autoSeparators),
TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BORDER, "-background", "background", "Background",
- DEF_TEXT_BG_COLOR, -1, Tk_Offset(TkText, border),
+ DEF_TEXT_BG_COLOR, -1, offsetof(TkText, border),
0, DEF_TEXT_BG_MONO, 0},
{TK_OPTION_SYNONYM, "-bd", NULL, NULL,
NULL, 0, -1, 0, "-borderwidth",
@@ -134,126 +134,126 @@ static const Tk_OptionSpec optionSpecs[] = {
NULL, 0, -1, 0, "-background", 0},
{TK_OPTION_BOOLEAN, "-blockcursor", "blockCursor",
"BlockCursor", DEF_TEXT_BLOCK_CURSOR, -1,
- Tk_Offset(TkText, insertCursorType), 0, 0, 0},
+ offsetof(TkText, insertCursorType), 0, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEF_TEXT_BORDER_WIDTH, -1, Tk_Offset(TkText, borderWidth),
+ DEF_TEXT_BORDER_WIDTH, -1, offsetof(TkText, borderWidth),
0, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor",
- DEF_TEXT_CURSOR, -1, Tk_Offset(TkText, cursor),
+ DEF_TEXT_CURSOR, -1, offsetof(TkText, cursor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_CUSTOM, "-endline", NULL, NULL,
- NULL, -1, Tk_Offset(TkText, end), TK_OPTION_NULL_OK,
+ NULL, -1, offsetof(TkText, end), TK_OPTION_NULL_OK,
&lineOption, TK_TEXT_LINE_RANGE},
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
"ExportSelection", DEF_TEXT_EXPORT_SELECTION, -1,
- Tk_Offset(TkText, exportSelection), 0, 0, 0},
+ offsetof(TkText, exportSelection), 0, 0, 0},
{TK_OPTION_SYNONYM, "-fg", "foreground", NULL,
NULL, 0, -1, 0, "-foreground", 0},
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_TEXT_FONT, -1, Tk_Offset(TkText, tkfont), 0, 0,
+ DEF_TEXT_FONT, -1, offsetof(TkText, tkfont), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_COLOR, "-foreground", "foreground", "Foreground",
- DEF_TEXT_FG, -1, Tk_Offset(TkText, fgColor), 0,
+ DEF_TEXT_FG, -1, offsetof(TkText, fgColor), 0,
0, 0},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_TEXT_HEIGHT, -1, Tk_Offset(TkText, height), 0, 0, 0},
+ DEF_TEXT_HEIGHT, -1, offsetof(TkText, height), 0, 0, 0},
{TK_OPTION_COLOR, "-highlightbackground", "highlightBackground",
"HighlightBackground", DEF_TEXT_HIGHLIGHT_BG,
- -1, Tk_Offset(TkText, highlightBgColorPtr),
+ -1, offsetof(TkText, highlightBgColorPtr),
0, 0, 0},
{TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
- DEF_TEXT_HIGHLIGHT, -1, Tk_Offset(TkText, highlightColorPtr),
+ DEF_TEXT_HIGHLIGHT, -1, offsetof(TkText, highlightColorPtr),
0, 0, 0},
{TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness",
"HighlightThickness", DEF_TEXT_HIGHLIGHT_WIDTH, -1,
- Tk_Offset(TkText, highlightWidth), 0, 0, TK_TEXT_LINE_GEOMETRY},
+ offsetof(TkText, highlightWidth), 0, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_BORDER, "-inactiveselectbackground","inactiveSelectBackground",
"Foreground",
DEF_TEXT_INACTIVE_SELECT_COLOR,
- -1, Tk_Offset(TkText, inactiveSelBorder),
+ -1, offsetof(TkText, inactiveSelBorder),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_MONO, 0},
{TK_OPTION_BORDER, "-insertbackground", "insertBackground", "Foreground",
DEF_TEXT_INSERT_BG,
- -1, Tk_Offset(TkText, insertBorder),
+ -1, offsetof(TkText, insertBorder),
0, 0, 0},
{TK_OPTION_PIXELS, "-insertborderwidth", "insertBorderWidth",
"BorderWidth", DEF_TEXT_INSERT_BD_COLOR, -1,
- Tk_Offset(TkText, insertBorderWidth), 0,
+ offsetof(TkText, insertBorderWidth), 0,
(ClientData) DEF_TEXT_INSERT_BD_MONO, 0},
{TK_OPTION_INT, "-insertofftime", "insertOffTime", "OffTime",
- DEF_TEXT_INSERT_OFF_TIME, -1, Tk_Offset(TkText, insertOffTime),
+ DEF_TEXT_INSERT_OFF_TIME, -1, offsetof(TkText, insertOffTime),
0, 0, 0},
{TK_OPTION_INT, "-insertontime", "insertOnTime", "OnTime",
- DEF_TEXT_INSERT_ON_TIME, -1, Tk_Offset(TkText, insertOnTime),
+ DEF_TEXT_INSERT_ON_TIME, -1, offsetof(TkText, insertOnTime),
0, 0, 0},
{TK_OPTION_STRING_TABLE,
"-insertunfocussed", "insertUnfocussed", "InsertUnfocussed",
- DEF_TEXT_INSERT_UNFOCUSSED, -1, Tk_Offset(TkText, insertUnfocussed),
+ DEF_TEXT_INSERT_UNFOCUSSED, -1, offsetof(TkText, insertUnfocussed),
0, insertUnfocussedStrings, 0},
{TK_OPTION_PIXELS, "-insertwidth", "insertWidth", "InsertWidth",
- DEF_TEXT_INSERT_WIDTH, -1, Tk_Offset(TkText, insertWidth),
+ DEF_TEXT_INSERT_WIDTH, -1, offsetof(TkText, insertWidth),
0, 0, 0},
{TK_OPTION_INT, "-maxundo", "maxUndo", "MaxUndo",
- DEF_TEXT_MAX_UNDO, -1, Tk_Offset(TkText, maxUndo),
+ DEF_TEXT_MAX_UNDO, -1, offsetof(TkText, maxUndo),
TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_PIXELS, "-padx", "padX", "Pad",
- DEF_TEXT_PADX, -1, Tk_Offset(TkText, padX), 0, 0,
+ DEF_TEXT_PADX, -1, offsetof(TkText, padX), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_PIXELS, "-pady", "padY", "Pad",
- DEF_TEXT_PADY, -1, Tk_Offset(TkText, padY), 0, 0, 0},
+ DEF_TEXT_PADY, -1, offsetof(TkText, padY), 0, 0, 0},
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- DEF_TEXT_RELIEF, -1, Tk_Offset(TkText, relief), 0, 0, 0},
+ DEF_TEXT_RELIEF, -1, offsetof(TkText, relief), 0, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", "selectBackground", "Foreground",
- DEF_TEXT_SELECT_COLOR, -1, Tk_Offset(TkText, selBorder),
+ DEF_TEXT_SELECT_COLOR, -1, offsetof(TkText, selBorder),
0, DEF_TEXT_SELECT_MONO, 0},
{TK_OPTION_PIXELS, "-selectborderwidth", "selectBorderWidth",
"BorderWidth", DEF_TEXT_SELECT_BD_COLOR,
- Tk_Offset(TkText, selBorderWidthPtr),
- Tk_Offset(TkText, selBorderWidth),
+ offsetof(TkText, selBorderWidthPtr),
+ offsetof(TkText, selBorderWidth),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_BD_MONO, 0},
{TK_OPTION_COLOR, "-selectforeground", "selectForeground", "Background",
- DEF_TEXT_SELECT_FG_COLOR, -1, Tk_Offset(TkText, selFgColorPtr),
+ DEF_TEXT_SELECT_FG_COLOR, -1, offsetof(TkText, selFgColorPtr),
TK_OPTION_NULL_OK, DEF_TEXT_SELECT_FG_MONO, 0},
{TK_OPTION_BOOLEAN, "-setgrid", "setGrid", "SetGrid",
- DEF_TEXT_SET_GRID, -1, Tk_Offset(TkText, setGrid), 0, 0, 0},
+ DEF_TEXT_SET_GRID, -1, offsetof(TkText, setGrid), 0, 0, 0},
{TK_OPTION_PIXELS, "-spacing1", "spacing1", "Spacing",
- DEF_TEXT_SPACING1, -1, Tk_Offset(TkText, spacing1),
+ DEF_TEXT_SPACING1, -1, offsetof(TkText, spacing1),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing2", "spacing2", "Spacing",
- DEF_TEXT_SPACING2, -1, Tk_Offset(TkText, spacing2),
+ DEF_TEXT_SPACING2, -1, offsetof(TkText, spacing2),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_PIXELS, "-spacing3", "spacing3", "Spacing",
- DEF_TEXT_SPACING3, -1, Tk_Offset(TkText, spacing3),
+ DEF_TEXT_SPACING3, -1, offsetof(TkText, spacing3),
0, 0 , TK_TEXT_LINE_GEOMETRY },
{TK_OPTION_CUSTOM, "-startline", NULL, NULL,
- NULL, -1, Tk_Offset(TkText, start), TK_OPTION_NULL_OK,
+ NULL, -1, offsetof(TkText, start), TK_OPTION_NULL_OK,
&lineOption, TK_TEXT_LINE_RANGE},
{TK_OPTION_STRING_TABLE, "-state", "state", "State",
- DEF_TEXT_STATE, -1, Tk_Offset(TkText, state),
+ DEF_TEXT_STATE, -1, offsetof(TkText, state),
0, stateStrings, 0},
{TK_OPTION_STRING, "-tabs", "tabs", "Tabs",
- DEF_TEXT_TABS, Tk_Offset(TkText, tabOptionPtr), -1,
+ DEF_TEXT_TABS, offsetof(TkText, tabOptionPtr), -1,
TK_OPTION_NULL_OK, 0, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING_TABLE, "-tabstyle", "tabStyle", "TabStyle",
- DEF_TEXT_TABSTYLE, -1, Tk_Offset(TkText, tabStyle),
+ DEF_TEXT_TABSTYLE, -1, offsetof(TkText, tabStyle),
0, tabStyleStrings, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus",
- DEF_TEXT_TAKE_FOCUS, -1, Tk_Offset(TkText, takeFocus),
+ DEF_TEXT_TAKE_FOCUS, -1, offsetof(TkText, takeFocus),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-undo", "undo", "Undo",
- DEF_TEXT_UNDO, -1, Tk_Offset(TkText, undo),
+ DEF_TEXT_UNDO, -1, offsetof(TkText, undo),
TK_OPTION_DONT_SET_DEFAULT, 0 , 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_TEXT_WIDTH, -1, Tk_Offset(TkText, width), 0, 0,
+ DEF_TEXT_WIDTH, -1, offsetof(TkText, width), 0, 0,
TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING_TABLE, "-wrap", "wrap", "Wrap",
- DEF_TEXT_WRAP, -1, Tk_Offset(TkText, wrapMode),
+ DEF_TEXT_WRAP, -1, offsetof(TkText, wrapMode),
0, wrapStrings, TK_TEXT_LINE_GEOMETRY},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- DEF_TEXT_XSCROLL_COMMAND, -1, Tk_Offset(TkText, xScrollCmd),
+ DEF_TEXT_XSCROLL_COMMAND, -1, offsetof(TkText, xScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- DEF_TEXT_YSCROLL_COMMAND, -1, Tk_Offset(TkText, yScrollCmd),
+ DEF_TEXT_YSCROLL_COMMAND, -1, offsetof(TkText, yScrollCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0}
};
@@ -660,7 +660,7 @@ CreateWidget(
Tk_CreateSelHandler(textPtr->tkwin, XA_PRIMARY, XA_STRING,
TextFetchSelection, textPtr, XA_STRING);
- if (Tk_InitOptions(interp, (char *) textPtr, optionTable, textPtr->tkwin)
+ if (Tk_InitOptions(interp, textPtr, optionTable, textPtr->tkwin)
!= TCL_OK) {
Tk_DestroyWindow(textPtr->tkwin);
return TCL_ERROR;
@@ -748,10 +748,10 @@ TextWidgetObjCmd(
NULL) == 0) {
Tcl_Obj *listObj = Tcl_NewListObj(0, NULL);
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(x));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(y));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(width));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(height));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(x));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(y));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(width));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(height));
Tcl_SetObjResult(interp, listObj);
}
@@ -763,7 +763,7 @@ TextWidgetObjCmd(
result = TCL_ERROR;
goto done;
} else {
- Tcl_Obj *objPtr = Tk_GetOptionValue(interp, (char *) textPtr,
+ Tcl_Obj *objPtr = Tk_GetOptionValue(interp, textPtr,
textPtr->optionTable, objv[2], textPtr->tkwin);
if (objPtr == NULL) {
@@ -826,7 +826,7 @@ TextWidgetObjCmd(
}
case TEXT_CONFIGURE:
if (objc <= 3) {
- Tcl_Obj *objPtr = Tk_GetOptionInfo(interp, (char *) textPtr,
+ Tcl_Obj *objPtr = Tk_GetOptionInfo(interp, textPtr,
textPtr->optionTable, ((objc == 3) ? objv[2] : NULL),
textPtr->tkwin);
@@ -864,11 +864,10 @@ TextWidgetObjCmd(
for (i = 2; i < objc-2; i++) {
int value;
- size_t length;
- const char *option = Tcl_GetString(objv[i]);
+ TkSizeT length;
+ const char *option = TkGetStringFromObj(objv[i], &length);
char c;
- length = objv[i]->length;
if (length < 2 || option[0] != '-') {
goto badOption;
}
@@ -1020,7 +1019,7 @@ TextWidgetObjCmd(
countDone:
found++;
if (found == 1) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(value));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(value));
} else {
if (found == 2) {
/*
@@ -1032,7 +1031,7 @@ TextWidgetObjCmd(
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_GetObjResult(interp));
}
- Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewIntObj(value));
+ Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewWideIntObj(value));
}
}
@@ -1044,7 +1043,7 @@ TextWidgetObjCmd(
int value = CountIndices(textPtr, indexFromPtr, indexToPtr,
COUNT_INDICES);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(value));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(value));
} else if (found > 1) {
Tcl_SetObjResult(interp, objPtr);
}
@@ -1155,14 +1154,14 @@ TextWidgetObjCmd(
objc++;
}
useIdx = ckalloc(objc);
- memset(useIdx, 0, (size_t) objc);
+ memset(useIdx, 0, objc);
/*
* Do a decreasing order sort so that we delete the end ranges
* first to maintain index consistency.
*/
- qsort(indices, (size_t) objc / 2,
+ qsort(indices, objc / 2,
2 * sizeof(TkTextIndex), TextIndexSortProc);
lastStart = NULL;
@@ -1240,11 +1239,11 @@ TextWidgetObjCmd(
&base) == 0) {
Tcl_Obj *listObj = Tcl_NewListObj(0, NULL);
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(x));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(y));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(width));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(height));
- Tcl_ListObjAppendElement(interp, listObj, Tcl_NewIntObj(base));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(x));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(y));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(width));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(height));
+ Tcl_ListObjAppendElement(interp, listObj, Tcl_NewWideIntObj(base));
Tcl_SetObjResult(interp, listObj);
}
@@ -1260,7 +1259,7 @@ TextWidgetObjCmd(
Tcl_Obj *objPtr = NULL;
int i, found = 0, visible = 0;
const char *name;
- size_t length;
+ TkSizeT length;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv,
@@ -1276,14 +1275,12 @@ TextWidgetObjCmd(
i = 2;
if (objc > 3) {
- name = Tcl_GetString(objv[i]);
- length = objv[i]->length;
+ name = TkGetStringFromObj(objv[i], &length);
if (length > 1 && name[0] == '-') {
if (strncmp("-displaychars", name, length) == 0) {
i++;
visible = 1;
- name = Tcl_GetString(objv[i]);
- length = objv[i]->length;
+ name = TkGetStringFromObj(objv[i], &length);
}
if ((i < objc-1) && (length == 2) && !strcmp("--", name)) {
i++;
@@ -2634,14 +2631,13 @@ InsertChars(
int viewUpdate) /* Update the view if set. */
{
int lineIndex;
- size_t length;
+ TkSizeT length;
TkText *tPtr;
int *lineAndByteIndex;
int resetViewCount;
int pixels[2*PIXEL_CLIENTS];
- const char *string = Tcl_GetString(stringPtr);
+ const char *string = TkGetStringFromObj(stringPtr, &length);
- length = stringPtr->length;
if (sharedTextPtr == NULL) {
sharedTextPtr = textPtr->sharedTextPtr;
}
@@ -2782,6 +2778,9 @@ TextPushUndoAction(
{
TkUndoSubAtom *iAtom, *dAtom;
int canUndo, canRedo;
+ char lMarkName[20] = "tk::undoMarkL";
+ char rMarkName[20] = "tk::undoMarkR";
+ char stringUndoMarkId[16] = "";
/*
* Create the helpers.
@@ -2792,6 +2791,10 @@ TextPushUndoAction(
Tcl_Obj *markSet2InsertObj = NULL;
Tcl_Obj *insertCmdObj = Tcl_NewObj();
Tcl_Obj *deleteCmdObj = Tcl_NewObj();
+ Tcl_Obj *markSetLUndoMarkCmdObj = Tcl_NewObj();
+ Tcl_Obj *markSetRUndoMarkCmdObj = NULL;
+ Tcl_Obj *markGravityLUndoMarkCmdObj = Tcl_NewObj();
+ Tcl_Obj *markGravityRUndoMarkCmdObj = NULL;
/*
* Get the index positions.
@@ -2841,6 +2844,40 @@ TextPushUndoAction(
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index1Obj);
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index2Obj);
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj("mark", 4));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj("set", 3));
+ markSetRUndoMarkCmdObj = Tcl_DuplicateObj(markSetLUndoMarkCmdObj);
+ textPtr->sharedTextPtr->undoMarkId++;
+ sprintf(stringUndoMarkId, "%d", textPtr->sharedTextPtr->undoMarkId);
+ strcat(lMarkName, stringUndoMarkId);
+ strcat(rMarkName, stringUndoMarkId);
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj(lMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj,
+ Tcl_NewStringObj(rMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj, index1Obj);
+ Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj, index2Obj);
+
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("mark", 4));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("gravity", 7));
+ markGravityRUndoMarkCmdObj = Tcl_DuplicateObj(markGravityLUndoMarkCmdObj);
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj(lMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
+ Tcl_NewStringObj(rMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("left", 4));
+ Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
+ Tcl_NewStringObj("right", 5));
+
/*
* Note: we don't wish to use textPtr->widgetCmd in these callbacks
* because if we delete the textPtr, but peers still exist, we will then
@@ -2858,11 +2895,19 @@ TextPushUndoAction(
insertCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet2InsertObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, iAtom);
dAtom = TkUndoMakeSubAtom(&TextUndoRedoCallback, textPtr->sharedTextPtr,
deleteCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet1InsertObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, dAtom);
Tcl_DecrRefCount(seeInsertObj);
Tcl_DecrRefCount(index1Obj);
@@ -3464,7 +3509,7 @@ TextFetchSelection(
if ((segPtr->typePtr == &tkTextCharType)
&& !TkTextIsElided(textPtr, &textPtr->selIndex, NULL)) {
memcpy(buffer, segPtr->body.chars + offsetInSeg,
- (size_t) chunkSize);
+ chunkSize);
buffer += chunkSize;
maxBytes -= chunkSize;
count += chunkSize;
@@ -4228,7 +4273,7 @@ TextSearchFoundMatch(
int matchLength) /* Length also in bytes/chars as per search
* type. */
{
- int numChars;
+ TkSizeT numChars;
int leftToScan;
TkTextIndex curIndex, foundIndex;
TkTextSegment *segPtr;
@@ -4268,7 +4313,7 @@ TextSearchFoundMatch(
if (searchSpecPtr->strictLimits && lineNum == searchSpecPtr->stopLine) {
if (searchSpecPtr->backwards ^
- ((matchOffset + numChars) > searchSpecPtr->stopOffset)) {
+ ((matchOffset + numChars + 1) > (TkSizeT) searchSpecPtr->stopOffset + 1)) {
return 0;
}
}
@@ -4421,7 +4466,7 @@ TextSearchFoundMatch(
*/
if (searchSpecPtr->varPtr != NULL) {
- Tcl_Obj *tmpPtr = Tcl_NewIntObj(numChars);
+ Tcl_Obj *tmpPtr = Tcl_NewWideIntObj(numChars);
if (searchSpecPtr->all) {
if (searchSpecPtr->countPtr == NULL) {
searchSpecPtr->countPtr = Tcl_NewObj();
@@ -4708,14 +4753,13 @@ TextDumpCmd(
if (objc == arg) {
TkTextIndexForwChars(NULL, &index1, 1, &index2, COUNT_INDICES);
} else {
- size_t length;
+ TkSizeT length;
const char *str;
if (TkTextGetObjIndex(interp, textPtr, objv[arg], &index2) != TCL_OK) {
return TCL_ERROR;
}
- str = Tcl_GetString(objv[arg]);
- length = objv[arg]->length;
+ str = TkGetStringFromObj(objv[arg], &length);
if (strncmp(str, "end", length) == 0) {
atEnd = 1;
}
@@ -5031,7 +5075,7 @@ DumpSegment(
Tcl_DecrRefCount(tuple);
return 0;
} else {
- int oldStateEpoch = TkBTreeEpoch(textPtr->sharedTextPtr->tree);
+ TkSizeT oldStateEpoch = TkBTreeEpoch(textPtr->sharedTextPtr->tree);
Tcl_DString buf;
int code;
@@ -5074,6 +5118,8 @@ TextEditUndo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
+ Tcl_Obj *cmdObj;
+ int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
@@ -5097,6 +5143,22 @@ TextEditUndo(
}
textPtr->sharedTextPtr->undo = 1;
+ /*
+ * Convert undo/redo temporary marks set by TkUndoRevert() into
+ * indices left in the interp result.
+ */
+
+ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
+ Tk_PathName(textPtr->tkwin));
+ Tcl_IncrRefCount(cmdObj);
+ code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
+ if (code != TCL_OK) {
+ Tcl_AddErrorInfo(textPtr->interp,
+ "\n (on undoing)");
+ Tcl_BackgroundException(textPtr->interp, code);
+ }
+ Tcl_DecrRefCount(cmdObj);
+
return status;
}
@@ -5122,6 +5184,8 @@ TextEditRedo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
+ Tcl_Obj *cmdObj;
+ int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
@@ -5144,6 +5208,23 @@ TextEditRedo(
textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL;
}
textPtr->sharedTextPtr->undo = 1;
+
+ /*
+ * Convert undo/redo temporary marks set by TkUndoApply() into
+ * indices left in the interp result.
+ */
+
+ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
+ Tk_PathName(textPtr->tkwin));
+ Tcl_IncrRefCount(cmdObj);
+ code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
+ if (code != TCL_OK) {
+ Tcl_AddErrorInfo(textPtr->interp,
+ "\n (on undoing)");
+ Tcl_BackgroundException(textPtr->interp, code);
+ }
+ Tcl_DecrRefCount(cmdObj);
+
return status;
}
@@ -5523,7 +5604,7 @@ void
TkTextRunAfterSyncCmd(
ClientData clientData) /* Information about text widget. */
{
- register TkText *textPtr = (TkText *) clientData;
+ register TkText *textPtr = clientData;
int code;
if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
@@ -5541,7 +5622,7 @@ TkTextRunAfterSyncCmd(
code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL);
if (code == TCL_ERROR) {
Tcl_AddErrorInfo(textPtr->interp, "\n (text sync)");
- Tcl_BackgroundError(textPtr->interp);
+ Tcl_BackgroundException(textPtr->interp, TCL_ERROR);
}
Tcl_Release((ClientData) textPtr->interp);
Tcl_DecrRefCount(textPtr->afterSyncCmd);
@@ -5678,7 +5759,8 @@ SearchCore(
* they are Unicode char offsets.
*/
- int firstOffset, lastOffset, matchOffset, matchLength;
+ int firstOffset, lastOffset;
+ TkSizeT matchOffset, matchLength;
int passes;
int lineNum = searchSpecPtr->startLine;
int code = TCL_OK;
@@ -5699,9 +5781,9 @@ SearchCore(
#define LOTS_OF_MATCHES 20
int matchNum = LOTS_OF_MATCHES;
- int smArray[2 * LOTS_OF_MATCHES];
- int *storeMatch = smArray;
- int *storeLength = smArray + LOTS_OF_MATCHES;
+ TkSizeT smArray[2 * LOTS_OF_MATCHES];
+ TkSizeT *storeMatch = smArray;
+ TkSizeT *storeLength = smArray + LOTS_OF_MATCHES;
int lastBackwardsLineMatch = -1;
int lastBackwardsMatchOffset = -1;
@@ -5751,8 +5833,7 @@ SearchCore(
* it has dual purpose.
*/
- pattern = Tcl_GetString(patObj);
- matchLength = patObj->length;
+ pattern = TkGetStringFromObj(patObj, &matchLength);
nl = strchr(pattern, '\n');
/*
@@ -5877,7 +5958,7 @@ SearchCore(
* begin.
*/
- matchOffset = -1;
+ matchOffset = TCL_INDEX_NONE;
if (searchSpecPtr->exact) {
int maxExtraLines = 0;
@@ -5887,11 +5968,11 @@ SearchCore(
do {
int ch;
const char *p;
- int lastFullLine = lastOffset;
+ TkSizeT lastFullLine = lastOffset;
if (firstNewLine == -1) {
if (searchSpecPtr->strictLimits
- && (firstOffset + matchLength > lastOffset)) {
+ && (firstOffset + matchLength + 1 > (TkSizeT)lastOffset + 1)) {
/*
* Not enough characters to match.
*/
@@ -5921,7 +6002,7 @@ SearchCore(
}
while (p >= startOfLine + firstOffset) {
if (matchLength == 0 || (p[0] == c && !strncmp(
- p, pattern, (size_t) matchLength))) {
+ p, pattern, matchLength))) {
goto backwardsMatch;
}
p--;
@@ -5950,7 +6031,7 @@ SearchCore(
*/
p = startOfLine + lastOffset - firstNewLine - 1;
- if (strncmp(p, pattern, (unsigned) firstNewLine + 1)) {
+ if (strncmp(p, pattern, firstNewLine + 1)) {
/*
* No match.
*/
@@ -6009,14 +6090,14 @@ SearchCore(
* exact searches.
*/
- if ((lastTotal - skipFirst) >= matchLength) {
+ if ((TkSizeT)lastTotal - skipFirst + 1 >= matchLength + 1) {
/*
* We now have enough text to match, so we
* make a final test and break whatever the
* result.
*/
- if (strncmp(p,pattern,(size_t)matchLength)) {
+ if (strncmp(p, pattern, matchLength)) {
p = NULL;
}
break;
@@ -6091,7 +6172,7 @@ SearchCore(
}
} else {
firstOffset = matchLength ? p - startOfLine + matchLength
- : p - startOfLine + 1;
+ : p - startOfLine + (TkSizeT)1;
if (firstOffset >= lastOffset) {
/*
* Now, we have to be careful not to find
@@ -6131,7 +6212,7 @@ SearchCore(
do {
Tcl_RegExpInfo info;
int match;
- int lastFullLine = lastOffset;
+ TkSizeT lastFullLine = lastOffset;
match = Tcl_RegExpExecObj(interp, regexp, theLine,
firstOffset, 1, (firstOffset>0 ? TCL_REG_NOTBOL : 0));
@@ -6149,9 +6230,9 @@ SearchCore(
if (!match ||
((info.extendStart == info.matches[0].start)
- && (info.matches[0].end == lastOffset-firstOffset))) {
+ && (info.matches[0].end == (TkSizeT) (lastOffset - firstOffset)))) {
int extraLines = 0;
- int prevFullLine;
+ TkSizeT prevFullLine;
/*
* If we find a match that overlaps more than one line, we
@@ -6167,7 +6248,7 @@ SearchCore(
lastNonOverlap = lastTotal;
}
- if (info.extendStart < 0) {
+ if (info.extendStart == TCL_INDEX_NONE) {
/*
* No multi-line match is possible.
*/
@@ -6264,9 +6345,9 @@ SearchCore(
*/
if ((match &&
- firstOffset+info.matches[0].end != lastTotal &&
- firstOffset+info.matches[0].end < prevFullLine)
- || info.extendStart < 0) {
+ firstOffset + info.matches[0].end != (TkSizeT) lastTotal &&
+ firstOffset + info.matches[0].end + 1 < prevFullLine + 1)
+ || info.extendStart == TCL_INDEX_NONE) {
break;
}
@@ -6277,7 +6358,7 @@ SearchCore(
* that line.
*/
- if (match && (info.matches[0].start >= lastOffset)) {
+ if (match && (info.matches[0].start + 1 >= (TkSizeT) lastOffset + 1)) {
break;
}
if (match && ((firstOffset + info.matches[0].end)
@@ -6334,8 +6415,8 @@ SearchCore(
* Possible overlap or enclosure.
*/
- if (thisOffset-lastNonOverlap >=
- lastBackwardsMatchOffset+matchLength){
+ if ((TkSizeT)thisOffset - lastNonOverlap >=
+ lastBackwardsMatchOffset + matchLength + 1){
/*
* Totally encloses previous match, so
* forget the previous match.
@@ -6416,12 +6497,12 @@ SearchCore(
* previous match.
*/
- if (matchOffset == -1 ||
+ if (matchOffset == TCL_INDEX_NONE ||
((searchSpecPtr->all || searchSpecPtr->backwards)
- && ((firstOffset < matchOffset)
+ && (((TkSizeT)firstOffset + 1 < matchOffset + 1)
|| ((firstOffset + info.matches[0].end
- info.matches[0].start)
- > (matchOffset + matchLength))))) {
+ > matchOffset + matchLength)))) {
matchOffset = firstOffset;
matchLength = info.matches[0].end - info.matches[0].start;
@@ -6439,11 +6520,11 @@ SearchCore(
* matches on the heap.
*/
- int *newArray =
- ckalloc(4 * matchNum * sizeof(int));
- memcpy(newArray, storeMatch, matchNum*sizeof(int));
+ TkSizeT *newArray =
+ ckalloc(4 * matchNum * sizeof(TkSizeT));
+ memcpy(newArray, storeMatch, matchNum*sizeof(TkSizeT));
memcpy(newArray + 2*matchNum, storeLength,
- matchNum * sizeof(int));
+ matchNum * sizeof(TkSizeT));
if (storeMatch != smArray) {
ckfree(storeMatch);
}
@@ -6478,7 +6559,7 @@ SearchCore(
* explicitly disallow overlapping matches.
*/
- if (matchLength > 0 && !searchSpecPtr->overlap
+ if (matchLength + 1 > 1 && !searchSpecPtr->overlap
&& !searchSpecPtr->backwards) {
firstOffset += matchLength;
if (firstOffset >= lastOffset) {
@@ -6535,8 +6616,8 @@ SearchCore(
* found which would exercise such a problem.
*/
}
- if (storeMatch[matches] + storeLength[matches]
- >= matchOffset + matchLength) {
+ if (storeMatch[matches] + storeLength[matches] + 1
+ >= matchOffset + matchLength + 1) {
/*
* The new match totally encloses the previous one, so
* we overwrite the previous one.
@@ -6584,7 +6665,7 @@ SearchCore(
* we are done.
*/
- if ((lastBackwardsLineMatch == -1) && (matchOffset >= 0)
+ if ((lastBackwardsLineMatch == -1) && (matchOffset != TCL_INDEX_NONE)
&& !searchSpecPtr->all) {
searchSpecPtr->foundMatchProc(lineNum, searchSpecPtr, lineInfo,
theLine, matchOffset, matchLength);
@@ -6711,7 +6792,7 @@ GetLineStartEnd(
if (linePtr == NULL) {
return Tcl_NewObj();
}
- return Tcl_NewIntObj(1 + TkBTreeLinesTo(NULL, linePtr));
+ return Tcl_NewWideIntObj(1 + TkBTreeLinesTo(NULL, linePtr));
}
/*
@@ -6752,7 +6833,7 @@ SetLineStartEnd(
TkText *textPtr = (TkText *) recordPtr;
if (internalOffset >= 0) {
- internalPtr = recordPtr + internalOffset;
+ internalPtr = (char *)recordPtr + internalOffset;
} else {
internalPtr = NULL;
}
@@ -6859,7 +6940,7 @@ TkpTesttextCmd(
Tcl_Obj *const objv[]) /* Argument strings. */
{
TkText *textPtr;
- size_t len;
+ TkSizeT len;
int lineIndex, byteIndex, byteOffset;
TkTextIndex index;
char buf[64];
diff --git a/generic/tkText.h b/generic/tkText.h
index a8a17da..8fb4134 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -532,8 +532,16 @@ typedef enum {
* that are peers.
*/
+#ifndef TkSizeT
+# if TCL_MAJOR_VERSION > 8
+# define TkSizeT size_t
+# else
+# define TkSizeT int
+# endif
+#endif
+
typedef struct TkSharedText {
- int refCount; /* Reference count this shared object. */
+ TkSizeT refCount; /* Reference count this shared object. */
TkTextBTree tree; /* B-tree representation of text and tags for
* widget. */
Tcl_HashTable tagTable; /* Hash table that maps from tag names to
@@ -562,7 +570,7 @@ typedef struct TkSharedText {
* exist, so the table hasn't been created.
* Each "object" used for this table is the
* name of a tag. */
- int stateEpoch; /* This is incremented each time the B-tree's
+ TkSizeT stateEpoch; /* This is incremented each time the B-tree's
* contents change structurally, or when the
* start/end limits change, and means that any
* cached TkTextIndex objects are no longer
@@ -580,6 +588,8 @@ typedef struct TkSharedText {
* statements. */
int autoSeparators; /* Non-zero means the separators will be
* inserted automatically. */
+ int undoMarkId; /* Counts undo marks temporarily used during
+ undo and redo operations. */
int isDirty; /* Flag indicating the 'dirtyness' of the
* text widget. If the flag is not zero,
* unsaved modifications have been applied to
@@ -781,7 +791,7 @@ typedef struct TkText {
* definitions. */
Tk_OptionTable optionTable; /* Token representing the configuration
* specifications. */
- int refCount; /* Number of cached TkTextIndex objects
+ TkSizeT refCount; /* Number of cached TkTextIndex objects
* refering to us. */
int insertCursorType; /* 0 = standard insertion cursor, 1 = block
* cursor. */
@@ -1007,7 +1017,7 @@ MODULE_SCOPE void TkBTreeRemoveClient(TkTextBTree tree,
MODULE_SCOPE void TkBTreeDestroy(TkTextBTree tree);
MODULE_SCOPE void TkBTreeDeleteIndexRange(TkTextBTree tree,
TkTextIndex *index1Ptr, TkTextIndex *index2Ptr);
-MODULE_SCOPE int TkBTreeEpoch(TkTextBTree tree);
+MODULE_SCOPE TkSizeT TkBTreeEpoch(TkTextBTree tree);
MODULE_SCOPE TkTextLine *TkBTreeFindLine(TkTextBTree tree,
const TkText *textPtr, int line);
MODULE_SCOPE TkTextLine *TkBTreeFindPixelLine(TkTextBTree tree,
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c
index 81e31dc..07c3bbd 100644
--- a/generic/tkTextBTree.c
+++ b/generic/tkTextBTree.c
@@ -105,7 +105,7 @@ typedef struct BTree {
int clients; /* Number of clients of this B-tree. */
int pixelReferences; /* Number of clients of this B-tree which care
* about pixel heights. */
- int stateEpoch; /* Updated each time any aspect of the B-tree
+ TkSizeT stateEpoch; /* Updated each time any aspect of the B-tree
* changes. */
TkSharedText *sharedTextPtr;/* Used to find tagTable in consistency
* checking code, and to access list of all
@@ -140,10 +140,10 @@ int tkBTreeDebug = 0;
* Macros that determine how much space to allocate for new segments:
*/
-#define CSEG_SIZE(chars) ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + 1 + (chars)))
-#define TSEG_SIZE ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + sizeof(TkTextToggle)))
+#define CSEG_SIZE(chars) (offsetof(TkTextSegment, body) \
+ + 1 + (chars))
+#define TSEG_SIZE (offsetof(TkTextSegment, body) \
+ + sizeof(TkTextToggle))
/*
* Forward declarations for functions defined in this file:
@@ -501,7 +501,7 @@ TkBTreeDestroy(
*----------------------------------------------------------------------
*/
-int
+TkSizeT
TkBTreeEpoch(
TkTextBTree tree) /* Tree to get epoch for. */
{
@@ -1021,7 +1021,7 @@ TkBTreeInsertChars(
* this line). */
register TkTextSegment *segPtr;
TkTextLine *newLinePtr;
- int chunkSize; /* # characters in current chunk. */
+ size_t chunkSize; /* # characters in current chunk. */
register const char *eol; /* Pointer to character just after last one in
* current chunk. */
int changeToLineCount; /* Counts change to total number of lines in
@@ -1070,7 +1070,7 @@ TkBTreeInsertChars(
curPtr->nextPtr = segPtr;
}
segPtr->size = chunkSize;
- memcpy(segPtr->body.chars, string, (size_t) chunkSize);
+ memcpy(segPtr->body.chars, string, chunkSize);
segPtr->body.chars[chunkSize] = 0;
if (eol[-1] != '\n') {
@@ -4563,7 +4563,7 @@ CharSplitProc(
newPtr1->typePtr = &tkTextCharType;
newPtr1->nextPtr = newPtr2;
newPtr1->size = index;
- memcpy(newPtr1->body.chars, segPtr->body.chars, (size_t) index);
+ memcpy(newPtr1->body.chars, segPtr->body.chars, index);
newPtr1->body.chars[index] = 0;
newPtr2->typePtr = &tkTextCharType;
newPtr2->nextPtr = segPtr->nextPtr;
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index c848fd2..33b9720 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -16,12 +16,6 @@
#include "tkInt.h"
#include "tkText.h"
-#ifdef _WIN32
-#include "tkWinInt.h"
-#elif defined(__CYGWIN__)
-#include "tkUnixInt.h"
-#endif
-
#ifdef MAC_OSX_TK
#include "tkMacOSXInt.h"
#define OK_TO_LOG (!TkpAppIsDrawing())
@@ -173,7 +167,7 @@ typedef struct StyleValues {
*/
typedef struct TextStyle {
- int refCount; /* Number of times this structure is
+ TkSizeT refCount; /* Number of times this structure is
* referenced in Chunks. */
GC bgGC; /* Graphics context for background. None means
* use widget background. */
@@ -420,7 +414,7 @@ typedef struct TextDInfo {
* to so far... */
int metricPixelHeight; /* ...and this is for the height calculation
* so far...*/
- int metricEpoch; /* ...and this for the epoch of the partial
+ TkSizeT metricEpoch; /* ...and this for the epoch of the partial
* calculation so it can be cancelled if
* things change once more. This field will be
* -1 if there is no long-line calculation in
@@ -1074,8 +1068,7 @@ FreeStyle(
register TextStyle *stylePtr)
/* Information about style to free. */
{
- stylePtr->refCount--;
- if (stylePtr->refCount == 0) {
+ if (stylePtr->refCount-- <= 1) {
if (stylePtr->bgGC != NULL) {
Tk_FreeGC(textPtr->display, stylePtr->bgGC);
}
@@ -3066,7 +3059,7 @@ AsyncUpdateLineMetrics(
* and we've reached the last line, then we're done.
*/
- if (dInfoPtr->metricEpoch == -1
+ if (dInfoPtr->metricEpoch == TCL_AUTO_LENGTH
&& lineNum == dInfoPtr->lastMetricUpdateLine) {
/*
* We have looped over all lines, so we're done. We must release our
@@ -3084,7 +3077,7 @@ AsyncUpdateLineMetrics(
TCL_EVAL_GLOBAL);
if (code == TCL_ERROR) {
Tcl_AddErrorInfo(textPtr->interp, "\n (text sync)");
- Tcl_BackgroundError(textPtr->interp);
+ Tcl_BackgroundException(textPtr->interp, TCL_ERROR);
}
Tcl_Release((ClientData) textPtr->interp);
Tcl_DecrRefCount(textPtr->afterSyncCmd);
@@ -3250,7 +3243,8 @@ TkTextUpdateLineMetrics(
* then we can't be done.
*/
- if (textPtr->dInfoPtr->metricEpoch == -1 && lineNum == endLine) {
+ if (textPtr->dInfoPtr->metricEpoch == TCL_AUTO_LENGTH && lineNum == endLine) {
+
/*
* We have looped over all lines, so we're done.
@@ -6159,7 +6153,7 @@ TkTextYviewCmd(
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
int pickPlace, type;
int pixels, count;
- int switchLength;
+ TkSizeT switchLength;
double fraction;
TkTextIndex index;
@@ -6178,8 +6172,8 @@ TkTextYviewCmd(
pickPlace = 0;
if (Tcl_GetString(objv[2])[0] == '-') {
- register const char *switchStr =
- Tcl_GetStringFromObj(objv[2], &switchLength);
+ const char *switchStr =
+ TkGetStringFromObj(objv[2], &switchLength);
if ((switchLength >= 2) && (strncmp(switchStr, "-pickplace",
(unsigned) switchLength) == 0)) {
@@ -7763,9 +7757,9 @@ TkTextCharLayoutProc(
chunkPtr->breakIndex = -1;
#if !TK_LAYOUT_WITH_BASE_CHUNKS
- ciPtr = ckalloc((Tk_Offset(CharInfo, chars) + 1) + bytesThatFit);
+ ciPtr = ckalloc(offsetof(CharInfo, chars) + 1 + bytesThatFit);
chunkPtr->clientData = ciPtr;
- memcpy(ciPtr->chars, p, (unsigned) bytesThatFit);
+ memcpy(ciPtr->chars, p, bytesThatFit);
#endif /* TK_LAYOUT_WITH_BASE_CHUNKS */
ciPtr->numBytes = bytesThatFit;
@@ -8776,10 +8770,10 @@ TextGetScrollInfoObj(
VIEW_MOVETO, VIEW_SCROLL
};
static const char *const units[] = {
- "units", "pages", "pixels", NULL
+ "pages", "pixels", "units", NULL
};
enum viewUnits {
- VIEW_SCROLL_UNITS, VIEW_SCROLL_PAGES, VIEW_SCROLL_PIXELS
+ VIEW_SCROLL_PAGES, VIEW_SCROLL_PIXELS, VIEW_SCROLL_UNITS
};
int index;
@@ -8800,7 +8794,7 @@ TextGetScrollInfoObj(
return TKTEXT_SCROLL_MOVETO;
case VIEW_SCROLL:
if (objc != 5) {
- Tcl_WrongNumArgs(interp, 3, objv, "number units|pages|pixels");
+ Tcl_WrongNumArgs(interp, 3, objv, "number pages|pixels|units");
return TKTEXT_SCROLL_ERROR;
}
if (Tcl_GetIndexFromObjStruct(interp, objv[4], units,
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 41dd448..3384a1f 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -18,7 +18,7 @@
*/
#define EI_SEG_SIZE \
- ((unsigned) (Tk_Offset(TkTextSegment, body) + sizeof(TkTextEmbImage)))
+ (offsetof(TkTextSegment, body) + sizeof(TkTextEmbImage))
/*
* Prototypes for functions defined in this file:
@@ -83,17 +83,17 @@ typedef enum {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
- "center", -1, Tk_Offset(TkTextEmbImage, align),
+ "center", -1, offsetof(TkTextEmbImage, align),
0, alignStrings, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- "0", -1, Tk_Offset(TkTextEmbImage, padX), 0, 0, 0},
+ "0", -1, offsetof(TkTextEmbImage, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- "0", -1, Tk_Offset(TkTextEmbImage, padY), 0, 0, 0},
+ "0", -1, offsetof(TkTextEmbImage, padY), 0, 0, 0},
{TK_OPTION_STRING, "-image", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextEmbImage, imageString),
+ NULL, -1, offsetof(TkTextEmbImage, imageString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-name", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextEmbImage, imageName),
+ NULL, -1, offsetof(TkTextEmbImage, imageName),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -161,7 +161,7 @@ TkTextImageCmd(
Tcl_SetErrorCode(interp, "TK", "TEXT", "NO_IMAGE", NULL);
return TCL_ERROR;
}
- objPtr = Tk_GetOptionValue(interp, (char *) &eiPtr->body.ei,
+ objPtr = Tk_GetOptionValue(interp, &eiPtr->body.ei,
eiPtr->body.ei.optionTable, objv[4], textPtr->tkwin);
if (objPtr == NULL) {
return TCL_ERROR;
@@ -188,7 +188,7 @@ TkTextImageCmd(
}
if (objc <= 5) {
Tcl_Obj *objPtr = Tk_GetOptionInfo(interp,
- (char *) &eiPtr->body.ei, eiPtr->body.ei.optionTable,
+ &eiPtr->body.ei, eiPtr->body.ei.optionTable,
(objc == 5) ? objv[4] : NULL, textPtr->tkwin);
if (objPtr == NULL) {
@@ -337,7 +337,7 @@ EmbImageConfigure(
int conflict = 0; /* True if we have a name conflict */
size_t len; /* length of image name */
- if (Tk_SetOptions(textPtr->interp, (char *) &eiPtr->body.ei,
+ if (Tk_SetOptions(textPtr->interp, &eiPtr->body.ei,
eiPtr->body.ei.optionTable,
objc, objv, textPtr->tkwin, NULL, NULL) != TCL_OK) {
return TCL_ERROR;
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 056902a..523a8cb 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -11,9 +11,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
#include "tkText.h"
+#include "default.h"
/*
* Index to use to select last character in line (very large integer):
@@ -64,7 +64,7 @@ static void UpdateStringOfTextIndex(Tcl_Obj *objPtr);
#define SET_TEXTINDEX(objPtr, indexPtr) \
((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (indexPtr))
#define SET_INDEXEPOCH(objPtr, epoch) \
- ((objPtr)->internalRep.twoPtrValue.ptr2 = INT2PTR(epoch))
+ ((objPtr)->internalRep.twoPtrValue.ptr2 = (void *) (size_t) (epoch))
/*
* Define the 'textindex' object type, which Tk uses to represent indices in
@@ -104,7 +104,7 @@ DupTextIndexInternalRep(
Tcl_Obj *srcPtr, /* TextIndex obj with internal rep to copy. */
Tcl_Obj *copyPtr) /* TextIndex obj with internal rep to set. */
{
- int epoch;
+ TkSizeT epoch;
TkTextIndex *dupIndexPtr, *indexPtr;
dupIndexPtr = ckalloc(sizeof(TkTextIndex));
@@ -206,7 +206,7 @@ TkTextGetIndexFromObj(
int cache;
if (objPtr->typePtr == &tkTextIndexType) {
- int epoch;
+ TkSizeT epoch;
indexPtr = GET_TEXTINDEX(objPtr);
epoch = GET_INDEXEPOCH(objPtr);
@@ -923,7 +923,7 @@ GetIndex(
}
if ((string[0] == 'e')
&& (strncmp(string, "end",
- (size_t) (endOfBase-Tcl_DStringValue(&copy))) == 0)) {
+ endOfBase-Tcl_DStringValue(&copy)) == 0)) {
/*
* Base position is end of text.
*/
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index 6a41c77..c516697 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -19,8 +19,8 @@
* Macro that determines the size of a mark segment:
*/
-#define MSEG_SIZE ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + sizeof(TkTextMark)))
+#define MSEG_SIZE (offsetof(TkTextSegment, body) \
+ + sizeof(TkTextMark))
/*
* Forward references for functions defined in this file:
@@ -126,14 +126,14 @@ TkTextMarkCmd(
switch ((enum markOptions) optionIndex) {
case MARK_GRAVITY: {
char c;
- int length;
+ TkSizeT length;
const char *str;
if (objc < 4 || objc > 5) {
Tcl_WrongNumArgs(interp, 3, objv, "markName ?gravity?");
return TCL_ERROR;
}
- str = Tcl_GetStringFromObj(objv[3], &length);
+ str = TkGetStringFromObj(objv[3], &length);
if (length == 6 && !strcmp(str, "insert")) {
markPtr = textPtr->insertMarkPtr;
} else if (length == 7 && !strcmp(str, "current")) {
@@ -160,12 +160,12 @@ TkTextMarkCmd(
Tcl_SetObjResult(interp, Tcl_NewStringObj(typeStr, -1));
return TCL_OK;
}
- str = Tcl_GetStringFromObj(objv[4],&length);
+ str = TkGetStringFromObj(objv[4],&length);
c = str[0];
- if ((c == 'l') && (strncmp(str, "left", (unsigned) length) == 0)) {
+ if ((c == 'l') && (strncmp(str, "left", length) == 0)) {
newTypePtr = &tkTextLeftMarkType;
} else if ((c == 'r') &&
- (strncmp(str, "right", (unsigned) length) == 0)) {
+ (strncmp(str, "right", length) == 0)) {
newTypePtr = &tkTextRightMarkType;
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 0d223fe..7b89fd9 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -12,9 +12,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkInt.h"
#include "tkText.h"
+#include "default.h"
/*
* The 'TkWrapMode' enum in tkText.h is used to define a type for the -wrap
@@ -40,66 +40,66 @@ static const char *const tabStyleStrings[] = {
static const Tk_OptionSpec tagOptionSpecs[] = {
{TK_OPTION_BORDER, "-background", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, border), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BITMAP, "-bgstipple", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, bgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-borderwidth", NULL, NULL,
- NULL, Tk_Offset(TkTextTag, borderWidthPtr), Tk_Offset(TkTextTag, borderWidth),
+ NULL, offsetof(TkTextTag, borderWidthPtr), offsetof(TkTextTag, borderWidth),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_STRING, "-elide", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, elideString),
+ NULL, -1, offsetof(TkTextTag, elideString),
TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, 0, 0},
{TK_OPTION_BITMAP, "-fgstipple", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, fgStipple), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_FONT, "-font", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, tkfont), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-foreground", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, fgColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-justify", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, justifyString), TK_OPTION_NULL_OK, 0,0},
+ NULL, -1, offsetof(TkTextTag, justifyString), TK_OPTION_NULL_OK, 0,0},
{TK_OPTION_STRING, "-lmargin1", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,0,0},
+ NULL, -1, offsetof(TkTextTag, lMargin1String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-lmargin2", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, lMargin2String), TK_OPTION_NULL_OK,0,0},
+ NULL, -1, offsetof(TkTextTag, lMargin2String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_BORDER, "-lmargincolor", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, lMarginColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-offset", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, offsetString), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, offsetString), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-overstrike", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, overstrikeString),
+ NULL, -1, offsetof(TkTextTag, overstrikeString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-overstrikefg", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, overstrikeColor),
+ NULL, -1, offsetof(TkTextTag, overstrikeColor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-relief", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, reliefString), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, reliefString), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-rmargin", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, rMarginString), TK_OPTION_NULL_OK, 0,0},
+ NULL, -1, offsetof(TkTextTag, rMarginString), TK_OPTION_NULL_OK, 0,0},
{TK_OPTION_BORDER, "-rmargincolor", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, rMarginColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BORDER, "-selectbackground", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, selBorder), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-selectforeground", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextTag, selFgColor), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-spacing1", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0},
+ NULL, -1, offsetof(TkTextTag, spacing1String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-spacing2", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, spacing2String), TK_OPTION_NULL_OK,0,0},
+ NULL, -1, offsetof(TkTextTag, spacing2String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-spacing3", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, spacing3String), TK_OPTION_NULL_OK,0,0},
+ NULL, -1, offsetof(TkTextTag, spacing3String), TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-tabs", NULL, NULL,
- NULL, Tk_Offset(TkTextTag, tabStringPtr), -1, TK_OPTION_NULL_OK, 0, 0},
+ NULL, offsetof(TkTextTag, tabStringPtr), -1, TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-tabstyle", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, tabStyle),
+ NULL, -1, offsetof(TkTextTag, tabStyle),
TK_OPTION_NULL_OK, tabStyleStrings, 0},
{TK_OPTION_STRING, "-underline", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, underlineString),
+ NULL, -1, offsetof(TkTextTag, underlineString),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_COLOR, "-underlinefg", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, underlineColor),
+ NULL, -1, offsetof(TkTextTag, underlineColor),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING_TABLE, "-wrap", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextTag, wrapMode),
+ NULL, -1, offsetof(TkTextTag, wrapMode),
TK_OPTION_NULL_OK, wrapStrings, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -343,7 +343,7 @@ TkTextTagCmd(
if (tagPtr == NULL) {
return TCL_ERROR;
}
- objPtr = Tk_GetOptionValue(interp, (char *) tagPtr,
+ objPtr = Tk_GetOptionValue(interp, tagPtr,
tagPtr->optionTable, objv[4], textPtr->tkwin);
if (objPtr == NULL) {
return TCL_ERROR;
@@ -362,7 +362,7 @@ TkTextTagCmd(
}
tagPtr = TkTextCreateTag(textPtr, Tcl_GetString(objv[3]), &newTag);
if (objc <= 5) {
- Tcl_Obj *objPtr = Tk_GetOptionInfo(interp, (char *) tagPtr,
+ Tcl_Obj *objPtr = Tk_GetOptionInfo(interp, tagPtr,
tagPtr->optionTable,
(objc == 5) ? objv[4] : NULL, textPtr->tkwin);
@@ -374,7 +374,7 @@ TkTextTagCmd(
} else {
int result = TCL_OK;
- if (Tk_SetOptions(interp, (char *) tagPtr, tagPtr->optionTable,
+ if (Tk_SetOptions(interp, tagPtr, tagPtr->optionTable,
objc-4, objv+4, textPtr->tkwin, NULL, NULL) != TCL_OK) {
return TCL_ERROR;
}
@@ -1108,10 +1108,10 @@ FindTag(
Tcl_Obj *tagName) /* Name of desired tag. */
{
Tcl_HashEntry *hPtr;
- int len;
+ TkSizeT len;
const char *str;
- str = Tcl_GetStringFromObj(tagName, &len);
+ str = TkGetStringFromObj(tagName, &len);
if (len == 3 && !strcmp(str, "sel")) {
return textPtr->selTagPtr;
}
@@ -1457,7 +1457,7 @@ TkTextBindProc(
if (eventPtr->type == ButtonPress) {
textPtr->flags |= BUTTON_DOWN;
} else if (eventPtr->type == ButtonRelease) {
- unsigned int mask;
+ unsigned long mask;
mask = TkGetButtonMask(eventPtr->xbutton.button);
if ((eventPtr->xbutton.state & ALL_BUTTONS) == mask) {
@@ -1540,7 +1540,8 @@ TkTextPickCurrent(
TkTextTag **copyArrayPtr = NULL;
/* Initialization needed to prevent compiler
* warning. */
- int numOldTags, numNewTags, i, j, size, nearby;
+ int numOldTags, numNewTags, i, j, nearby;
+ size_t size;
XEvent event;
/*
@@ -1633,7 +1634,7 @@ TkTextPickCurrent(
if (numNewTags > 0) {
size = numNewTags * sizeof(TkTextTag *);
copyArrayPtr = ckalloc(size);
- memcpy(copyArrayPtr, newArrayPtr, (size_t) size);
+ memcpy(copyArrayPtr, newArrayPtr, size);
for (i = 0; i < textPtr->numCurTags; i++) {
for (j = 0; j < numNewTags; j++) {
if (textPtr->curTagArrayPtr[i] == copyArrayPtr[j]) {
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index c9fc20f..191c86c 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -35,8 +35,8 @@ static const Tk_GeomMgr textGeomType = {
* Macro that determines the size of an embedded window segment:
*/
-#define EW_SEG_SIZE ((unsigned) (Tk_Offset(TkTextSegment, body) \
- + sizeof(TkTextEmbWindow)))
+#define EW_SEG_SIZE (offsetof(TkTextSegment, body) \
+ + sizeof(TkTextEmbWindow))
/*
* Prototypes for functions defined in this file:
@@ -99,18 +99,18 @@ typedef enum {
static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-align", NULL, NULL,
- "center", -1, Tk_Offset(TkTextEmbWindow, align),
+ "center", -1, offsetof(TkTextEmbWindow, align),
0, alignStrings, 0},
{TK_OPTION_STRING, "-create", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextEmbWindow, create), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_PIXELS, "-padx", NULL, NULL,
- "0", -1, Tk_Offset(TkTextEmbWindow, padX), 0, 0, 0},
+ "0", -1, offsetof(TkTextEmbWindow, padX), 0, 0, 0},
{TK_OPTION_PIXELS, "-pady", NULL, NULL,
- "0", -1, Tk_Offset(TkTextEmbWindow, padY), 0, 0, 0},
+ "0", -1, offsetof(TkTextEmbWindow, padY), 0, 0, 0},
{TK_OPTION_BOOLEAN, "-stretch", NULL, NULL,
- "0", -1, Tk_Offset(TkTextEmbWindow, stretch), 0, 0, 0},
+ "0", -1, offsetof(TkTextEmbWindow, stretch), 0, 0, 0},
{TK_OPTION_WINDOW, "-window", NULL, NULL,
- NULL, -1, Tk_Offset(TkTextEmbWindow, tkwin), TK_OPTION_NULL_OK, 0, 0},
+ NULL, -1, offsetof(TkTextEmbWindow, tkwin), TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
@@ -191,7 +191,7 @@ TkTextWindowCmd(
ewPtr->body.ew.tkwin = NULL;
}
- objPtr = Tk_GetOptionValue(interp, (char *) &ewPtr->body.ew,
+ objPtr = Tk_GetOptionValue(interp, &ewPtr->body.ew,
ewPtr->body.ew.optionTable, objv[4], textPtr->tkwin);
if (objPtr == NULL) {
return TCL_ERROR;
@@ -233,7 +233,7 @@ TkTextWindowCmd(
ewPtr->body.ew.tkwin = NULL;
}
- objPtr = Tk_GetOptionInfo(interp, (char *) &ewPtr->body.ew,
+ objPtr = Tk_GetOptionInfo(interp, &ewPtr->body.ew,
ewPtr->body.ew.optionTable, (objc == 5) ? objv[4] : NULL,
textPtr->tkwin);
if (objPtr == NULL) {
@@ -403,7 +403,7 @@ EmbWinConfigure(
}
oldWindow = ewPtr->body.ew.tkwin;
- if (Tk_SetOptions(textPtr->interp, (char *) &ewPtr->body.ew,
+ if (Tk_SetOptions(textPtr->interp, &ewPtr->body.ew,
ewPtr->body.ew.optionTable, objc, objv, textPtr->tkwin, NULL,
NULL) != TCL_OK) {
return TCL_ERROR;
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 33faab8..098c286 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -668,7 +668,7 @@ Tk_GetScrollInfo(
if (argc != 5) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # args: should be \"%s %s %s\"",
- argv[0], argv[1], "scroll number units|pages"));
+ argv[0], argv[1], "scroll number pages|units"));
Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL);
return TK_SCROLL_ERROR;
}
@@ -684,7 +684,7 @@ Tk_GetScrollInfo(
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad argument \"%s\": must be units or pages", argv[4]));
+ "bad argument \"%s\": must be pages or units", argv[4]));
Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", NULL);
return TK_SCROLL_ERROR;
}
@@ -729,8 +729,8 @@ Tk_GetScrollInfoObj(
int *intPtr) /* Filled in with number of pages or lines to
* scroll, if any. */
{
- const char *arg = Tcl_GetString(objv[2]);
- size_t length = objv[2]->length;
+ TkSizeT length;
+ const char *arg = TkGetStringFromObj(objv[2], &length);
#define ArgPfxEq(str) \
((arg[0] == str[0]) && !strncmp(arg, str, length))
@@ -746,15 +746,14 @@ Tk_GetScrollInfoObj(
return TK_SCROLL_MOVETO;
} else if (ArgPfxEq("scroll")) {
if (objc != 5) {
- Tcl_WrongNumArgs(interp, 2, objv, "scroll number units|pages");
+ Tcl_WrongNumArgs(interp, 2, objv, "scroll number pages|units");
return TK_SCROLL_ERROR;
}
if (Tcl_GetIntFromObj(interp, objv[3], intPtr) != TCL_OK) {
return TK_SCROLL_ERROR;
}
- arg = Tcl_GetString(objv[4]);
- length = objv[4]->length;
+ arg = TkGetStringFromObj(objv[4], &length);
if (ArgPfxEq("pages")) {
return TK_SCROLL_PAGES;
} else if (ArgPfxEq("units")) {
@@ -762,7 +761,7 @@ Tk_GetScrollInfoObj(
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad argument \"%s\": must be units or pages", arg));
+ "bad argument \"%s\": must be pages or units", arg));
Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", NULL);
return TK_SCROLL_ERROR;
}
@@ -1187,7 +1186,7 @@ TkSendVirtualEvent(
event.general.xany.display = Tk_Display(target);
event.virtual.name = Tk_GetUid(eventName);
if (detail != NULL) {
- event.virtual.user_data = detail;
+ event.virtual.user_data = detail;
}
Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
@@ -1213,7 +1212,7 @@ TkSendVirtualEvent(
*---------------------------------------------------------------------------
*/
-int
+size_t
TkUtfToUniChar(
const char *src, /* The UTF-8 string. */
int *chPtr) /* Filled with the Unicode value represented by
@@ -1221,12 +1220,12 @@ TkUtfToUniChar(
{
Tcl_UniChar uniChar = 0;
- int len = Tcl_UtfToUniChar(src, &uniChar);
+ size_t len = Tcl_UtfToUniChar(src, &uniChar);
if ((uniChar & 0xFC00) == 0xD800) {
Tcl_UniChar low = uniChar;
/* This can only happen if Tcl is compiled with TCL_UTF_MAX=4,
* or when a high surrogate character is detected in UTF-8 form */
- int len2 = Tcl_UtfToUniChar(src+len, &low);
+ size_t len2 = Tcl_UtfToUniChar(src+len, &low);
if ((uniChar & 0xFC00) == 0xDC00) {
*chPtr = (((uniChar & 0x3FF) << 10) | (low & 0x3FF)) + 0x10000;
return len + len2;
@@ -1254,7 +1253,7 @@ TkUtfToUniChar(
*---------------------------------------------------------------------------
*/
-int TkUniCharToUtf(int ch, char *buf)
+size_t TkUniCharToUtf(int ch, char *buf)
{
if (((unsigned)(ch - 0x10000) <= 0xFFFFF)) {
/* Spit out a 4-byte UTF-8 character */
@@ -1270,6 +1269,19 @@ int TkUniCharToUtf(int ch, char *buf)
#endif
+
+#if TCL_MAJOR_VERSION > 8
+unsigned char *
+TkGetByteArrayFromObj(
+ Tcl_Obj *objPtr,
+ size_t *lengthPtr
+) {
+ unsigned char *result = Tcl_GetByteArrayFromObj(objPtr, NULL);
+ *lengthPtr = *(size_t *) objPtr->internalRep.twoPtrValue.ptr1;
+ return result;
+}
+#endif /* TCL_MAJOR_VERSION > 8 */
+
/*
* Local Variables:
* mode: c
diff --git a/generic/tkVisual.c b/generic/tkVisual.c
index 567c552..51ae3be 100644
--- a/generic/tkVisual.c
+++ b/generic/tkVisual.c
@@ -20,10 +20,10 @@
*/
typedef struct VisualDictionary {
- const char *name; /* Textual name of class. */
- int minLength; /* Minimum # characters that must be specified
+ char name[12]; /* Textual name of class. */
+ unsigned short minLength; /* Minimum # characters that must be specified
* for an unambiguous match. */
- int c_class; /* X symbol for class. */
+ short c_class; /* X symbol for class. */
} VisualDictionary;
static const VisualDictionary visualNames[] = {
{"best", 1, 0},
@@ -35,7 +35,7 @@ static const VisualDictionary visualNames[] = {
{"staticgray", 7, StaticGray},
{"staticgrey", 7, StaticGray},
{"truecolor", 1, TrueColor},
- {NULL, 0, 0},
+ {"", 0, 0},
};
/*
@@ -46,7 +46,7 @@ static const VisualDictionary visualNames[] = {
struct TkColormap {
Colormap colormap; /* X's identifier for the colormap. */
Visual *visual; /* Visual for which colormap was allocated. */
- int refCount; /* How many uses of the colormap are still
+ size_t refCount; /* How many uses of the colormap are still
* outstanding (calls to Tk_GetColormap minus
* calls to Tk_FreeColormap). */
int shareable; /* 0 means this colormap was allocated by a
@@ -99,7 +99,7 @@ Tk_GetVisual(
XVisualInfo template, *visInfoList, *bestPtr;
long mask;
Visual *visual;
- ptrdiff_t length;
+ size_t length;
int c, numVisuals, prio, bestPrio, i;
const char *p;
const VisualDictionary *dictPtr;
@@ -137,7 +137,7 @@ Tk_GetVisual(
for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL;
cmapPtr = cmapPtr->nextPtr) {
if (cmapPtr->colormap == *colormapPtr) {
- cmapPtr->refCount += 1;
+ cmapPtr->refCount++;
break;
}
}
@@ -193,10 +193,9 @@ Tk_GetVisual(
}
length = p - string;
template.c_class = -1;
- for (dictPtr = visualNames; dictPtr->name != NULL; dictPtr++) {
+ for (dictPtr = visualNames; dictPtr->minLength; dictPtr++) {
if ((dictPtr->name[0] == c) && (length >= dictPtr->minLength)
- && (strncmp(string, dictPtr->name,
- (size_t) length) == 0)) {
+ && (strncmp(string, dictPtr->name, length) == 0)) {
template.c_class = dictPtr->c_class;
break;
}
@@ -206,7 +205,7 @@ Tk_GetVisual(
"unknown or ambiguous visual name \"%s\": class must be ",
string);
- for (dictPtr = visualNames; dictPtr->name != NULL; dictPtr++) {
+ for (dictPtr = visualNames; dictPtr->minLength; dictPtr++) {
Tcl_AppendPrintfToObj(msgObj, "%s, ", dictPtr->name);
}
Tcl_AppendToObj(msgObj, "or default", -1);
@@ -324,7 +323,7 @@ Tk_GetVisual(
cmapPtr = cmapPtr->nextPtr) {
if (cmapPtr->shareable && (cmapPtr->visual == visual)) {
*colormapPtr = cmapPtr->colormap;
- cmapPtr->refCount += 1;
+ cmapPtr->refCount++;
goto done;
}
}
@@ -427,7 +426,7 @@ Tk_GetColormap(
for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL;
cmapPtr = cmapPtr->nextPtr) {
if (cmapPtr->colormap == colormap) {
- cmapPtr->refCount += 1;
+ cmapPtr->refCount++;
}
}
return colormap;
@@ -476,8 +475,7 @@ Tk_FreeColormap(
for (prevPtr = NULL, cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL;
prevPtr = cmapPtr, cmapPtr = cmapPtr->nextPtr) {
if (cmapPtr->colormap == colormap) {
- cmapPtr->refCount -= 1;
- if (cmapPtr->refCount == 0) {
+ if (cmapPtr->refCount-- <= 1) {
XFreeColormap(display, colormap);
if (prevPtr == NULL) {
dispPtr->cmapPtr = cmapPtr->nextPtr;
@@ -534,7 +532,7 @@ Tk_PreserveColormap(
for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL;
cmapPtr = cmapPtr->nextPtr) {
if (cmapPtr->colormap == colormap) {
- cmapPtr->refCount += 1;
+ cmapPtr->refCount++;
return;
}
}
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 00fb344..1b24477 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -336,9 +336,11 @@ CreateTopLevelWindow(
* Create built-in photo image formats.
*/
+ Tk_CreatePhotoImageFormat(&tkImgFmtDefault);
Tk_CreatePhotoImageFormat(&tkImgFmtGIF);
Tk_CreatePhotoImageFormat(&tkImgFmtPNG);
Tk_CreatePhotoImageFormat(&tkImgFmtPPM);
+ Tk_CreatePhotoImageFormat(&tkImgFmtSVGnano);
}
if ((parent != NULL) && (screenName != NULL) && (screenName[0] == '\0')) {
@@ -357,9 +359,7 @@ CreateTopLevelWindow(
* Set the flags specified in the call.
*/
-#ifdef TK_USE_INPUT_METHODS
winPtr->ximGeneration = 0;
-#endif /*TK_USE_INPUT_METHODS*/
winPtr->flags |= flags;
/*
@@ -654,10 +654,8 @@ TkAllocWindow(
winPtr->dirtyAtts = CWEventMask|CWColormap|CWBitGravity;
winPtr->flags = 0;
winPtr->handlerList = NULL;
-#ifdef TK_USE_INPUT_METHODS
winPtr->ximGeneration = 0;
winPtr->inputContext = NULL;
-#endif /* TK_USE_INPUT_METHODS */
winPtr->tagPtr = NULL;
winPtr->numTags = 0;
winPtr->optionLevel = -1;
@@ -950,7 +948,7 @@ TkCreateMainWindow(
}
/*
- * Set variables for the intepreter.
+ * Set variables for the interpreter.
*/
Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
@@ -1136,7 +1134,7 @@ Tk_CreateWindowFromPath(
char fixedSpace[FIXED_SPACE+1];
char *p;
Tk_Window parent;
- int numChars;
+ size_t numChars;
/*
* Strip the parent's name out of pathName (it's everything up to the last
@@ -1153,7 +1151,7 @@ Tk_CreateWindowFromPath(
Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", NULL);
return NULL;
}
- numChars = (int) (p-pathName);
+ numChars = p-pathName;
if (numChars > FIXED_SPACE) {
p = ckalloc(numChars + 1);
} else {
@@ -1163,7 +1161,7 @@ Tk_CreateWindowFromPath(
*p = '.';
p[1] = '\0';
} else {
- strncpy(p, pathName, (size_t) numChars);
+ strncpy(p, pathName, numChars);
p[numChars] = '\0';
}
@@ -1443,18 +1441,16 @@ Tk_DestroyWindow(
}
#endif
Tcl_DeleteHashEntry(Tcl_FindHashEntry(&dispPtr->winTable,
- (char *) winPtr->window));
+ winPtr->window));
winPtr->window = None;
}
UnlinkWindow(winPtr);
TkEventDeadWindow(winPtr);
-#ifdef TK_USE_INPUT_METHODS
if (winPtr->inputContext != NULL &&
- winPtr->ximGeneration == winPtr->dispPtr->ximGeneration) {
+ winPtr->ximGeneration == winPtr->dispPtr->ximGeneration) {
XDestroyIC(winPtr->inputContext);
}
winPtr->inputContext = NULL;
-#endif /* TK_USE_INPUT_METHODS */
if (winPtr->tagPtr != NULL) {
TkFreeBindingTags(winPtr);
}
@@ -2072,11 +2068,7 @@ Tk_DefineCursor(
{
register TkWindow *winPtr = (TkWindow *) tkwin;
-#if defined(MAC_OSX_TK)
- winPtr->atts.cursor = (XCursor) cursor;
-#else
winPtr->atts.cursor = (Cursor) cursor;
-#endif
if (winPtr->window != None) {
XDefineCursor(winPtr->display, winPtr->window, winPtr->atts.cursor);
@@ -2362,7 +2354,7 @@ Tk_IdToWindow(
return NULL;
}
- hPtr = Tcl_FindHashEntry(&dispPtr->winTable, (char *) window);
+ hPtr = Tcl_FindHashEntry(&dispPtr->winTable, window);
if (hPtr == NULL) {
return NULL;
}
@@ -2834,7 +2826,7 @@ static HMODULE tkcygwindll = NULL;
/*
* Run Tk_MainEx from libtk8.?.dll
*
- * This function is only ever called from wish8.4.exe, the cygwin port of Tcl.
+ * This function is only ever called from wish8.?.exe, the cygwin port of Tcl.
* This means that the system encoding is utf-8, so we don't have to do any
* encoding conversions.
*/
@@ -2850,7 +2842,7 @@ TkCygwinMainEx(
Tcl_Interp *interp)
{
WCHAR name[MAX_PATH];
- int len;
+ size_t len;
void (*tkmainex)(int, char **, Tcl_AppInitProc *, Tcl_Interp *);
/* construct "<path>/libtk8.?.dll", from "<path>/tk8?.dll" */
@@ -3060,11 +3052,17 @@ Initialize(
* Ensure that we are getting a compatible version of Tcl.
*/
- if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6-", 0) == NULL) {
return TCL_ERROR;
}
/*
+ * TIP #59: Make embedded configuration information available.
+ */
+
+ TkInitEmbeddedConfigurationInformation(interp);
+
+ /*
* Ensure that our obj-types are registered with the Tcl runtime.
*/
@@ -3170,7 +3168,7 @@ Initialize(
Tcl_SetVar2Ex(interp, "argv", NULL,
Tcl_NewListObj(objc-1, rest+1), TCL_GLOBAL_ONLY);
Tcl_SetVar2Ex(interp, "argc", NULL,
- Tcl_NewIntObj(objc-1), TCL_GLOBAL_ONLY);
+ Tcl_NewWideIntObj(objc-1), TCL_GLOBAL_ONLY);
ckfree(rest);
}
Tcl_DecrRefCount(parseList);
@@ -3202,8 +3200,8 @@ Initialize(
*/
{
- int numBytes;
- const char *bytes = Tcl_GetStringFromObj(nameObj, &numBytes);
+ TkSizeT numBytes;
+ const char *bytes = TkGetStringFromObj(nameObj, &numBytes);
classObj = Tcl_NewStringObj(bytes, numBytes);
diff --git a/generic/ttk/ttkBlink.c b/generic/ttk/ttkBlink.c
index 706a871..484e66b 100644
--- a/generic/ttk/ttkBlink.c
+++ b/generic/ttk/ttkBlink.c
@@ -14,7 +14,7 @@
* Add script-level access to configure application-wide blink rate.
*/
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -68,7 +68,7 @@ static CursorManager *GetCursorManager(Tcl_Interp *interp)
static void
CursorBlinkProc(ClientData clientData)
{
- CursorManager *cm = (CursorManager*)clientData;
+ CursorManager *cm = clientData;
int blinkTime;
if (cm->owner->flags & CURSOR_ON) {
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index 1be7ee6..47e704c 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -4,8 +4,7 @@
* label, button, checkbutton, radiobutton, and menubutton widgets.
*/
-#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -23,6 +22,7 @@ typedef struct
* Text element resources:
*/
Tcl_Obj *textObj;
+ Tcl_Obj *justifyObj;
Tcl_Obj *textVariableObj;
Tcl_Obj *underlineObj;
Tcl_Obj *widthObj;
@@ -56,43 +56,46 @@ typedef struct
static Tk_OptionSpec BaseOptionSpecs[] =
{
+ {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
+ "left", offsetof(Base,base.justifyObj), -1,
+ TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- Tk_Offset(Base,base.textObj), -1,
+ offsetof(Base,base.textObj), -1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable", "",
- Tk_Offset(Base,base.textVariableObj), -1,
+ offsetof(Base,base.textVariableObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline",
- "-1", Tk_Offset(Base,base.underlineObj), -1,
+ "-1", offsetof(Base,base.underlineObj), -1,
0,0,0 },
/* SB: OPTION_INT, see <<NOTE-NULLOPTIONS>> */
{TK_OPTION_STRING, "-width", "width", "Width",
- NULL, Tk_Offset(Base,base.widthObj), -1,
+ NULL, offsetof(Base,base.widthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Image options
*/
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
- Tk_Offset(Base,base.imageObj), -1,
+ offsetof(Base,base.imageObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
/*
* Compound base/image options
*/
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- NULL, Tk_Offset(Base,base.compoundObj), -1,
+ NULL, offsetof(Base,base.compoundObj), -1,
TK_OPTION_NULL_OK,(ClientData)ttkCompoundStrings,
GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad",
- NULL, Tk_Offset(Base,base.paddingObj), -1,
+ NULL, offsetof(Base,base.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
/*
* Compatibility/legacy options
*/
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", Tk_Offset(Base,base.stateObj), -1,
+ "normal", offsetof(Base,base.stateObj), -1,
0,0,STATE_CHANGED },
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
@@ -230,28 +233,28 @@ typedef struct
static Tk_OptionSpec LabelOptionSpecs[] =
{
{TK_OPTION_BORDER, "-background", "frameColor", "FrameColor",
- NULL, Tk_Offset(Label,label.backgroundObj), -1,
+ NULL, offsetof(Label,label.backgroundObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, Tk_Offset(Label,label.foregroundObj), -1,
+ NULL, offsetof(Label,label.foregroundObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- NULL, Tk_Offset(Label,label.fontObj), -1,
+ NULL, offsetof(Label,label.fontObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- NULL, Tk_Offset(Label,label.borderWidthObj), -1,
+ NULL, offsetof(Label,label.borderWidthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- NULL, Tk_Offset(Label,label.reliefObj), -1,
+ NULL, offsetof(Label,label.reliefObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, Tk_Offset(Label,label.anchorObj), -1,
+ NULL, offsetof(Label,label.anchorObj), -1,
TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- NULL, Tk_Offset(Label, label.justifyObj), -1,
+ NULL, offsetof(Label, label.justifyObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
- NULL, Tk_Offset(Label, label.wrapLengthObj), -1,
+ NULL, offsetof(Label, label.wrapLengthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED /*SB: SIZE_CHANGED*/ },
WIDGET_TAKEFOCUS_FALSE,
@@ -313,9 +316,9 @@ typedef struct
static Tk_OptionSpec ButtonOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command",
- "", Tk_Offset(Button, button.commandObj), -1, 0,0,0},
+ "", offsetof(Button, button.commandObj), -1, 0,0,0},
{TK_OPTION_STRING_TABLE, "-default", "default", "Default",
- "normal", Tk_Offset(Button, button.defaultStateObj), -1,
+ "normal", offsetof(Button, button.defaultStateObj), -1,
0, (ClientData) ttkDefaultStrings, DEFAULTSTATE_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -423,16 +426,16 @@ typedef struct
static Tk_OptionSpec CheckbuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- NULL, Tk_Offset(Checkbutton, checkbutton.variableObj), -1,
+ NULL, offsetof(Checkbutton, checkbutton.variableObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-onvalue", "onValue", "OnValue",
- "1", Tk_Offset(Checkbutton, checkbutton.onValueObj), -1,
+ "1", offsetof(Checkbutton, checkbutton.onValueObj), -1,
0,0,0},
{TK_OPTION_STRING, "-offvalue", "offValue", "OffValue",
- "0", Tk_Offset(Checkbutton, checkbutton.offValueObj), -1,
+ "0", offsetof(Checkbutton, checkbutton.offValueObj), -1,
0,0,0},
{TK_OPTION_STRING, "-command", "command", "Command",
- "", Tk_Offset(Checkbutton, checkbutton.commandObj), -1,
+ "", offsetof(Checkbutton, checkbutton.commandObj), -1,
0,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -492,7 +495,7 @@ CheckbuttonConfigure(Tcl_Interp *interp, void *recordPtr, int mask)
Checkbutton *checkPtr = recordPtr;
Tcl_Obj *varName = checkPtr->checkbutton.variableObj;
Ttk_TraceHandle *vt = NULL;
-
+
if (varName != NULL && *Tcl_GetString(varName) != '\0') {
vt = Ttk_TraceVariable(interp, varName,
CheckbuttonVariableChanged, checkPtr);
@@ -631,13 +634,13 @@ typedef struct
static Tk_OptionSpec RadiobuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-variable", "variable", "Variable",
- "::selectedButton", Tk_Offset(Radiobutton, radiobutton.variableObj),-1,
+ "::selectedButton", offsetof(Radiobutton, radiobutton.variableObj),-1,
0,0,0},
{TK_OPTION_STRING, "-value", "Value", "Value",
- "1", Tk_Offset(Radiobutton, radiobutton.valueObj), -1,
+ "1", offsetof(Radiobutton, radiobutton.valueObj), -1,
0,0,0},
{TK_OPTION_STRING, "-command", "command", "Command",
- "", Tk_Offset(Radiobutton, radiobutton.commandObj), -1,
+ "", offsetof(Radiobutton, radiobutton.commandObj), -1,
0,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -806,9 +809,9 @@ static const char *const directionStrings[] = {
static Tk_OptionSpec MenubuttonOptionSpecs[] =
{
{TK_OPTION_STRING, "-menu", "menu", "Menu",
- "", Tk_Offset(Menubutton, menubutton.menuObj), -1, 0,0,0},
+ "", offsetof(Menubutton, menubutton.menuObj), -1, 0,0,0},
{TK_OPTION_STRING_TABLE, "-direction", "direction", "Direction",
- "below", Tk_Offset(Menubutton, menubutton.directionObj), -1,
+ "below", offsetof(Menubutton, menubutton.directionObj), -1,
0,(ClientData)directionStrings,GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
diff --git a/generic/ttk/ttkCache.c b/generic/ttk/ttkCache.c
index 0ae2372..c29007c 100644
--- a/generic/ttk/ttkCache.c
+++ b/generic/ttk/ttkCache.c
@@ -28,8 +28,7 @@
* but this will be a transient effect.
*/
-#include <stdio.h> /* for sprintf */
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
struct Ttk_ResourceCache_ {
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 15ebcb7..8657fba 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -4,11 +4,11 @@
* "clam" theme; inspired by the XFCE family of Gnome themes.
*/
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
-/*
- * Under windows, the Tk-provided XDrawLine and XDrawArc have an
+/*
+ * Under windows, the Tk-provided XDrawLine and XDrawArc have an
* off-by-one error in the end point. This is especially apparent with this
* theme. Defining this macro as true handles this case.
*/
@@ -108,23 +108,23 @@ typedef struct {
static Ttk_ElementOptionSpec BorderElementOptions[] = {
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(BorderElement,borderColorObj), DARKEST_COLOR },
+ offsetof(BorderElement,borderColorObj), DARKEST_COLOR },
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(BorderElement,lightColorObj), LIGHT_COLOR },
+ offsetof(BorderElement,lightColorObj), LIGHT_COLOR },
{ "-darkcolor", TK_OPTION_COLOR,
- Tk_Offset(BorderElement,darkColorObj), DARK_COLOR },
+ offsetof(BorderElement,darkColorObj), DARK_COLOR },
{ "-relief", TK_OPTION_RELIEF,
- Tk_Offset(BorderElement,reliefObj), "flat" },
+ offsetof(BorderElement,reliefObj), "flat" },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(BorderElement,borderWidthObj), "2" },
+ offsetof(BorderElement,borderWidthObj), "2" },
{ NULL, 0, 0, NULL }
};
/*
* <<NOTE-BORDERWIDTH>>: -borderwidth is only partially supported:
* in this theme, borders are always exactly 2 pixels thick.
- * With -borderwidth 0, border is not drawn at all;
- * otherwise a 2-pixel border is used. For -borderwidth > 2,
+ * With -borderwidth 0, border is not drawn at all;
+ * otherwise a 2-pixel border is used. For -borderwidth > 2,
* the excess is used as padding.
*/
@@ -198,13 +198,13 @@ typedef struct {
static Ttk_ElementOptionSpec FieldElementOptions[] = {
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(FieldElement,borderColorObj), DARKEST_COLOR },
+ offsetof(FieldElement,borderColorObj), DARKEST_COLOR },
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(FieldElement,lightColorObj), LIGHT_COLOR },
+ offsetof(FieldElement,lightColorObj), LIGHT_COLOR },
{ "-darkcolor", TK_OPTION_COLOR,
- Tk_Offset(FieldElement,darkColorObj), DARK_COLOR },
+ offsetof(FieldElement,darkColorObj), DARK_COLOR },
{ "-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(FieldElement,backgroundObj), "white" },
+ offsetof(FieldElement,backgroundObj), "white" },
{ NULL, 0, 0, NULL }
};
@@ -280,17 +280,17 @@ typedef struct {
static Ttk_ElementOptionSpec IndicatorElementOptions[] = {
{ "-indicatorsize", TK_OPTION_PIXELS,
- Tk_Offset(IndicatorElement,sizeObj), "10" },
+ offsetof(IndicatorElement,sizeObj), "10" },
{ "-indicatormargin", TK_OPTION_STRING,
- Tk_Offset(IndicatorElement,marginObj), "1" },
+ offsetof(IndicatorElement,marginObj), "1" },
{ "-indicatorbackground", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,backgroundObj), "white" },
+ offsetof(IndicatorElement,backgroundObj), "white" },
{ "-indicatorforeground", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,foregroundObj), "black" },
+ offsetof(IndicatorElement,foregroundObj), "black" },
{ "-upperbordercolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,upperColorObj), DARKEST_COLOR },
+ offsetof(IndicatorElement,upperColorObj), DARKEST_COLOR },
{ "-lowerbordercolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,lowerColorObj), DARK_COLOR },
+ offsetof(IndicatorElement,lowerColorObj), DARK_COLOR },
{ NULL, 0, 0, NULL }
};
@@ -402,13 +402,13 @@ typedef struct {
static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] =
{
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,sizeObj),
+ offsetof(MenuIndicatorElement,sizeObj),
STR(MENUBUTTON_ARROW_SIZE)},
{ "-arrowcolor",TK_OPTION_COLOR,
- Tk_Offset(MenuIndicatorElement,colorObj),
+ offsetof(MenuIndicatorElement,colorObj),
"black" },
{ "-arrowpadding",TK_OPTION_STRING,
- Tk_Offset(MenuIndicatorElement,paddingObj),
+ offsetof(MenuIndicatorElement,paddingObj),
"3" },
{ NULL, 0, 0, NULL }
};
@@ -471,11 +471,11 @@ typedef struct {
static Ttk_ElementOptionSpec GripElementOptions[] = {
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(GripElement,lightColorObj), LIGHT_COLOR },
+ offsetof(GripElement,lightColorObj), LIGHT_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(GripElement,borderColorObj), DARKEST_COLOR },
+ offsetof(GripElement,borderColorObj), DARKEST_COLOR },
{ "-gripcount", TK_OPTION_INT,
- Tk_Offset(GripElement,gripCountObj), "5" },
+ offsetof(GripElement,gripCountObj), "5" },
{ NULL, 0, 0, NULL }
};
@@ -556,25 +556,25 @@ typedef struct { /* Common element record for scrollbar elements */
static Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
{ "-orient", TK_OPTION_ANY,
- Tk_Offset(ScrollbarElement, orientObj), "horizontal" },
+ offsetof(ScrollbarElement, orientObj), "horizontal" },
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(ScrollbarElement,backgroundObj), FRAME_COLOR },
+ offsetof(ScrollbarElement,backgroundObj), FRAME_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(ScrollbarElement,borderColorObj), DARKEST_COLOR },
+ offsetof(ScrollbarElement,borderColorObj), DARKEST_COLOR },
{ "-troughcolor", TK_OPTION_COLOR,
- Tk_Offset(ScrollbarElement,troughColorObj), DARKER_COLOR },
+ offsetof(ScrollbarElement,troughColorObj), DARKER_COLOR },
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(ScrollbarElement,lightColorObj), LIGHT_COLOR },
+ offsetof(ScrollbarElement,lightColorObj), LIGHT_COLOR },
{ "-darkcolor", TK_OPTION_COLOR,
- Tk_Offset(ScrollbarElement,darkColorObj), DARK_COLOR },
+ offsetof(ScrollbarElement,darkColorObj), DARK_COLOR },
{ "-arrowcolor", TK_OPTION_COLOR,
- Tk_Offset(ScrollbarElement,arrowColorObj), "#000000" },
+ offsetof(ScrollbarElement,arrowColorObj), "#000000" },
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
+ offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
{ "-gripcount", TK_OPTION_INT,
- Tk_Offset(ScrollbarElement,gripCountObj), "5" },
+ offsetof(ScrollbarElement,gripCountObj), "5" },
{ "-sliderlength", TK_OPTION_INT,
- Tk_Offset(ScrollbarElement,sliderlengthObj), "30" },
+ offsetof(ScrollbarElement,sliderlengthObj), "30" },
{ NULL, 0, 0, NULL }
};
@@ -630,7 +630,7 @@ static void ThumbElementDraw(
Tcl_GetIntFromObj(NULL, sb->gripCountObj, &gripCount);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
-
+
if (orient == TTK_ORIENT_HORIZONTAL) {
dx = 1; dy = 0;
x1 = x2 = b.x + b.width / 2 - gripCount;
@@ -710,12 +710,12 @@ static void PbarElementDraw(
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = elementRecord;
-
+
b = Ttk_PadBox(b, Ttk_UniformPadding(2));
if (b.width > 4 && b.height > 4) {
DrawSmoothBorder(tkwin, d, b,
sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
- XFillRectangle(Tk_Display(tkwin), d,
+ XFillRectangle(Tk_Display(tkwin), d,
BackgroundGC(tkwin, sb->backgroundObj),
b.x+2, b.y+2, b.width-4, b.height-4);
}
@@ -780,8 +780,8 @@ static Ttk_ElementSpec ArrowElementSpec = {
/*------------------------------------------------------------------------
* +++ Notebook elements.
- *
- * Note: Tabs, except for the rightmost, overlap the neighbor to
+ *
+ * Note: Tabs, except for the rightmost, overlap the neighbor to
* their right by one pixel.
*/
@@ -794,13 +794,13 @@ typedef struct {
static Ttk_ElementOptionSpec NotebookElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(NotebookElement,backgroundObj), FRAME_COLOR },
+ offsetof(NotebookElement,backgroundObj), FRAME_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(NotebookElement,borderColorObj), DARKEST_COLOR },
+ offsetof(NotebookElement,borderColorObj), DARKEST_COLOR },
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(NotebookElement,lightColorObj), LIGHT_COLOR },
+ offsetof(NotebookElement,lightColorObj), LIGHT_COLOR },
{ "-darkcolor", TK_OPTION_COLOR,
- Tk_Offset(NotebookElement,darkColorObj), DARK_COLOR },
+ offsetof(NotebookElement,darkColorObj), DARK_COLOR },
{ NULL, 0, 0, NULL }
};
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index e0886f2..b22e5d5 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -23,9 +23,9 @@ typedef struct {
static Ttk_ElementOptionSpec HighlightElementOptions[] = {
{ "-highlightcolor",TK_OPTION_COLOR,
- Tk_Offset(HighlightElement,highlightColorObj), DEFAULT_BACKGROUND },
+ offsetof(HighlightElement,highlightColorObj), DEFAULT_BACKGROUND },
{ "-highlightthickness",TK_OPTION_PIXELS,
- Tk_Offset(HighlightElement,highlightThicknessObj), "0" },
+ offsetof(HighlightElement,highlightThicknessObj), "0" },
{ NULL, 0, 0, NULL }
};
@@ -66,7 +66,7 @@ static Ttk_ElementSpec HighlightElementSpec =
/*------------------------------------------------------------------------
* +++ Button Border element:
- *
+ *
* The Motif-style button border on X11 consists of (from outside-in):
*
* + focus indicator (controlled by -highlightcolor and -highlightthickness),
@@ -83,14 +83,14 @@ typedef struct {
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
{
- { "-background", TK_OPTION_BORDER,
- Tk_Offset(ButtonBorderElement,borderObj), DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(ButtonBorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF,
- Tk_Offset(ButtonBorderElement,reliefObj), "flat" },
- { "-default", TK_OPTION_ANY,
- Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" },
+ { "-background", TK_OPTION_BORDER,
+ offsetof(ButtonBorderElement,borderObj), DEFAULT_BACKGROUND },
+ { "-borderwidth", TK_OPTION_PIXELS,
+ offsetof(ButtonBorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ { "-relief", TK_OPTION_RELIEF,
+ offsetof(ButtonBorderElement,reliefObj), "flat" },
+ { "-default", TK_OPTION_ANY,
+ offsetof(ButtonBorderElement,defaultStateObj), "disabled" },
{ NULL, 0, 0, NULL }
};
@@ -113,7 +113,7 @@ static void ButtonBorderElementSize(
/*
* (@@@ Note: ButtonBorderElement still still still buggy:
- * padding for default ring is drawn in the wrong color
+ * padding for default ring is drawn in the wrong color
* when the button is active.)
*/
static void ButtonBorderElementDraw(
@@ -197,13 +197,13 @@ typedef struct
static Ttk_ElementOptionSpec ArrowElementOptions[] =
{
- { "-arrowsize", TK_OPTION_PIXELS, Tk_Offset(ArrowElement,sizeObj),
+ { "-arrowsize", TK_OPTION_PIXELS, offsetof(ArrowElement,sizeObj),
DEFAULT_ARROW_SIZE },
- { "-background", TK_OPTION_BORDER, Tk_Offset(ArrowElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(ArrowElement,borderObj),
DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(ArrowElement,borderWidthObj),
+ { "-borderwidth", TK_OPTION_PIXELS, offsetof(ArrowElement,borderWidthObj),
DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF, Tk_Offset(ArrowElement,reliefObj),"raised" },
+ { "-relief", TK_OPTION_RELIEF, offsetof(ArrowElement,reliefObj),"raised" },
{ NULL, 0, 0, NULL }
};
@@ -279,19 +279,19 @@ static Ttk_ElementSpec ArrowElementSpec =
/*------------------------------------------------------------------------
* +++ Sash element (for ttk::panedwindow)
*
- * NOTES:
+ * NOTES:
*
* panedwindows with -orient horizontal use vertical sashes, and vice versa.
*
* Interpretation of -sashrelief 'groove' and 'ridge' are
* swapped wrt. the core panedwindow, which (I think) has them backwards.
*
- * Default -sashrelief is sunken; the core panedwindow has default
+ * Default -sashrelief is sunken; the core panedwindow has default
* -sashrelief raised, but that looks wrong to me.
*/
static Ttk_Orient SashClientData[] = {
- TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
+ TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
};
typedef struct {
@@ -304,18 +304,18 @@ typedef struct {
} SashElement;
static Ttk_ElementOptionSpec SashOptions[] = {
- { "-background", TK_OPTION_BORDER,
- Tk_Offset(SashElement,borderObj), DEFAULT_BACKGROUND },
- { "-sashrelief", TK_OPTION_RELIEF,
- Tk_Offset(SashElement,sashReliefObj), "sunken" },
+ { "-background", TK_OPTION_BORDER,
+ offsetof(SashElement,borderObj), DEFAULT_BACKGROUND },
+ { "-sashrelief", TK_OPTION_RELIEF,
+ offsetof(SashElement,sashReliefObj), "sunken" },
{ "-sashthickness", TK_OPTION_PIXELS,
- Tk_Offset(SashElement,sashThicknessObj), "6" },
- { "-sashpad", TK_OPTION_PIXELS,
- Tk_Offset(SashElement,sashPadObj), "2" },
+ offsetof(SashElement,sashThicknessObj), "6" },
+ { "-sashpad", TK_OPTION_PIXELS,
+ offsetof(SashElement,sashPadObj), "2" },
{ "-handlesize", TK_OPTION_PIXELS,
- Tk_Offset(SashElement,handleSizeObj), "8" },
+ offsetof(SashElement,handleSizeObj), "8" },
{ "-handlepad", TK_OPTION_PIXELS,
- Tk_Offset(SashElement,handlePadObj), "8" },
+ offsetof(SashElement,handlePadObj), "8" },
{ NULL, 0, 0, NULL }
};
@@ -365,10 +365,10 @@ static void SashElementDraw(
gc1 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
break;
- case TK_RELIEF_SOLID:
+ case TK_RELIEF_SOLID:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
break;
- case TK_RELIEF_FLAT:
+ case TK_RELIEF_FLAT:
default:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
break;
@@ -396,7 +396,7 @@ static void SashElementDraw(
hb = Ttk_StickBox(b, handleSize, handleSize, TTK_STICK_N);
hb.y += handlePad;
}
- Tk_Fill3DRectangle(tkwin, d, border,
+ Tk_Fill3DRectangle(tkwin, d, border,
hb.x, hb.y, hb.width, hb.height, 1, TK_RELIEF_RAISED);
}
}
@@ -493,7 +493,7 @@ MODULE_SCOPE int TtkClassicTheme_Init(Tcl_Interp *interp)
Ttk_RegisterElement(interp, theme, "arrow",
&ArrowElementSpec, &ArrowElements[0]);
- Ttk_RegisterElement(interp, theme, "hsash",
+ Ttk_RegisterElement(interp, theme, "hsash",
&SashElementSpec, &SashClientData[0]);
Ttk_RegisterElement(interp, theme, "vsash",
&SashElementSpec, &SashClientData[1]);
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index 89bf028..002448b 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -245,15 +245,15 @@ typedef struct {
} BorderElement;
static Ttk_ElementOptionSpec BorderElementOptions[] = {
- { "-background", TK_OPTION_BORDER, Tk_Offset(BorderElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(BorderElement,borderObj),
DEFAULT_BACKGROUND },
{ "-bordercolor",TK_OPTION_COLOR,
- Tk_Offset(BorderElement,borderColorObj), "black" },
- { "-default", TK_OPTION_ANY, Tk_Offset(BorderElement,defaultStateObj),
+ offsetof(BorderElement,borderColorObj), "black" },
+ { "-default", TK_OPTION_ANY, offsetof(BorderElement,defaultStateObj),
"disabled" },
- { "-borderwidth",TK_OPTION_PIXELS,Tk_Offset(BorderElement,borderWidthObj),
+ { "-borderwidth",TK_OPTION_PIXELS, offsetof(BorderElement,borderWidthObj),
STRINGIFY(BORDERWIDTH) },
- { "-relief", TK_OPTION_RELIEF, Tk_Offset(BorderElement,reliefObj),
+ { "-relief", TK_OPTION_RELIEF, offsetof(BorderElement,reliefObj),
"flat" },
{ NULL, 0, 0, NULL }
};
@@ -325,9 +325,9 @@ typedef struct {
} FieldElement;
static Ttk_ElementOptionSpec FieldElementOptions[] = {
- { "-fieldbackground", TK_OPTION_BORDER, Tk_Offset(FieldElement,borderObj),
+ { "-fieldbackground", TK_OPTION_BORDER, offsetof(FieldElement,borderObj),
"white" },
- { "-bordercolor",TK_OPTION_COLOR, Tk_Offset(FieldElement,borderColorObj),
+ { "-bordercolor",TK_OPTION_COLOR, offsetof(FieldElement,borderColorObj),
"black" },
{ NULL, 0, 0, NULL }
};
@@ -467,19 +467,19 @@ typedef struct {
static Ttk_ElementOptionSpec IndicatorElementOptions[] = {
{ "-background", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(IndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
{ "-foreground", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,foregroundObj), DEFAULT_FOREGROUND },
+ offsetof(IndicatorElement,foregroundObj), DEFAULT_FOREGROUND },
{ "-indicatorcolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,colorObj), "#FFFFFF" },
+ offsetof(IndicatorElement,colorObj), "#FFFFFF" },
{ "-lightcolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,lightColorObj), "#DDDDDD" },
+ offsetof(IndicatorElement,lightColorObj), "#DDDDDD" },
{ "-shadecolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,shadeColorObj), "#888888" },
+ offsetof(IndicatorElement,shadeColorObj), "#888888" },
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(IndicatorElement,borderColorObj), "black" },
+ offsetof(IndicatorElement,borderColorObj), "black" },
{ "-indicatormargin", TK_OPTION_STRING,
- Tk_Offset(IndicatorElement,marginObj), "0 2 4 2" },
+ offsetof(IndicatorElement,marginObj), "0 2 4 2" },
{ NULL, 0, 0, NULL }
};
@@ -654,15 +654,15 @@ typedef struct {
static Ttk_ElementOptionSpec ArrowElementOptions[] = {
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(ArrowElement,sizeObj), STRINGIFY(SCROLLBAR_WIDTH) },
+ offsetof(ArrowElement,sizeObj), STRINGIFY(SCROLLBAR_WIDTH) },
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(ArrowElement,borderObj), DEFAULT_BACKGROUND },
+ offsetof(ArrowElement,borderObj), DEFAULT_BACKGROUND },
{ "-bordercolor", TK_OPTION_COLOR,
- Tk_Offset(ArrowElement,borderColorObj), "black" },
+ offsetof(ArrowElement,borderColorObj), "black" },
{ "-relief", TK_OPTION_RELIEF,
- Tk_Offset(ArrowElement,reliefObj),"raised"},
+ offsetof(ArrowElement,reliefObj),"raised"},
{ "-arrowcolor", TK_OPTION_COLOR,
- Tk_Offset(ArrowElement,colorObj),"black"},
+ offsetof(ArrowElement,colorObj),"black"},
{ NULL, 0, 0, NULL }
};
@@ -731,18 +731,18 @@ typedef struct {
Tcl_Obj *colorObj;
} MenubuttonArrowElement;
-static const char *directionStrings[] = { /* See also: button.c */
+static const char *const directionStrings[] = { /* See also: button.c */
"above", "below", "left", "right", "flush", NULL
};
enum { POST_ABOVE, POST_BELOW, POST_LEFT, POST_RIGHT, POST_FLUSH };
static Ttk_ElementOptionSpec MenubuttonArrowElementOptions[] = {
{ "-direction", TK_OPTION_STRING,
- Tk_Offset(MenubuttonArrowElement,directionObj), "below" },
+ offsetof(MenubuttonArrowElement,directionObj), "below" },
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(MenubuttonArrowElement,sizeObj), STRINGIFY(MENUBUTTON_ARROW_SIZE)},
+ offsetof(MenubuttonArrowElement,sizeObj), STRINGIFY(MENUBUTTON_ARROW_SIZE)},
{ "-arrowcolor",TK_OPTION_COLOR,
- Tk_Offset(MenubuttonArrowElement,colorObj), "black"},
+ offsetof(MenubuttonArrowElement,colorObj), "black"},
{ NULL, 0, 0, NULL }
};
@@ -822,15 +822,15 @@ typedef struct {
static Ttk_ElementOptionSpec TroughElementOptions[] = {
{ "-orient", TK_OPTION_ANY,
- Tk_Offset(TroughElement, orientObj), "horizontal" },
+ offsetof(TroughElement, orientObj), "horizontal" },
{ "-troughborderwidth", TK_OPTION_PIXELS,
- Tk_Offset(TroughElement,borderWidthObj), "1" },
+ offsetof(TroughElement,borderWidthObj), "1" },
{ "-troughcolor", TK_OPTION_BORDER,
- Tk_Offset(TroughElement,colorObj), DEFAULT_BACKGROUND },
+ offsetof(TroughElement,colorObj), DEFAULT_BACKGROUND },
{ "-troughrelief",TK_OPTION_RELIEF,
- Tk_Offset(TroughElement,reliefObj), "sunken" },
+ offsetof(TroughElement,reliefObj), "sunken" },
{ "-groovewidth", TK_OPTION_PIXELS,
- Tk_Offset(TroughElement,grooveWidthObj), "-1" },
+ offsetof(TroughElement,grooveWidthObj), "-1" },
{ NULL, 0, 0, NULL }
};
@@ -901,14 +901,14 @@ typedef struct {
} ThumbElement;
static Ttk_ElementOptionSpec ThumbElementOptions[] = {
- { "-width", TK_OPTION_PIXELS, Tk_Offset(ThumbElement,sizeObj),
+ { "-width", TK_OPTION_PIXELS, offsetof(ThumbElement,sizeObj),
STRINGIFY(SCROLLBAR_WIDTH) },
- { "-background", TK_OPTION_BORDER, Tk_Offset(ThumbElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(ThumbElement,borderObj),
DEFAULT_BACKGROUND },
- { "-bordercolor", TK_OPTION_COLOR, Tk_Offset(ThumbElement,borderColorObj),
+ { "-bordercolor", TK_OPTION_COLOR, offsetof(ThumbElement,borderColorObj),
"black" },
- { "-relief", TK_OPTION_RELIEF,Tk_Offset(ThumbElement,reliefObj),"raised" },
- { "-orient", TK_OPTION_ANY,Tk_Offset(ThumbElement,orientObj),"horizontal"},
+ { "-relief", TK_OPTION_RELIEF, offsetof(ThumbElement,reliefObj),"raised" },
+ { "-orient", TK_OPTION_ANY, offsetof(ThumbElement,orientObj),"horizontal"},
{ NULL, 0, 0, NULL }
};
@@ -984,19 +984,19 @@ typedef struct {
} SliderElement;
static Ttk_ElementOptionSpec SliderElementOptions[] = {
- { "-sliderlength", TK_OPTION_PIXELS, Tk_Offset(SliderElement,lengthObj),
+ { "-sliderlength", TK_OPTION_PIXELS, offsetof(SliderElement,lengthObj),
"15" },
- { "-sliderthickness",TK_OPTION_PIXELS,Tk_Offset(SliderElement,thicknessObj),
+ { "-sliderthickness",TK_OPTION_PIXELS, offsetof(SliderElement,thicknessObj),
"15" },
- { "-sliderrelief", TK_OPTION_RELIEF, Tk_Offset(SliderElement,reliefObj),
+ { "-sliderrelief", TK_OPTION_RELIEF, offsetof(SliderElement,reliefObj),
"raised" },
- { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(SliderElement,borderWidthObj),
+ { "-borderwidth", TK_OPTION_PIXELS, offsetof(SliderElement,borderWidthObj),
STRINGIFY(BORDERWIDTH) },
- { "-background", TK_OPTION_BORDER, Tk_Offset(SliderElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(SliderElement,borderObj),
DEFAULT_BACKGROUND },
- { "-bordercolor", TK_OPTION_COLOR, Tk_Offset(ThumbElement,borderColorObj),
+ { "-bordercolor", TK_OPTION_COLOR, offsetof(ThumbElement,borderColorObj),
"black" },
- { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj),
+ { "-orient", TK_OPTION_ANY, offsetof(SliderElement,orientObj),
"horizontal" },
{ NULL, 0, 0, NULL }
};
@@ -1067,11 +1067,11 @@ typedef struct {
static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
- Tk_Offset(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
+ offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
{ "-diameter", TK_OPTION_PIXELS,
- Tk_Offset(TreeitemIndicator,diameterObj), "9" },
+ offsetof(TreeitemIndicator,diameterObj), "9" },
{ "-indicatormargins", TK_OPTION_STRING,
- Tk_Offset(TreeitemIndicator,marginObj), "2 2 4 2" },
+ offsetof(TreeitemIndicator,marginObj), "2 2 4 2" },
{ NULL, 0, 0, NULL }
};
diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c
index 5c95dba..b6bc1fd 100644
--- a/generic/ttk/ttkElements.c
+++ b/generic/ttk/ttkElements.c
@@ -5,9 +5,7 @@
*
*/
-#include <tcl.h>
-#include <tk.h>
-#include <string.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -60,7 +58,7 @@ typedef struct {
static Ttk_ElementOptionSpec BackgroundElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(BackgroundElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(BackgroundElement,backgroundObj), DEFAULT_BACKGROUND },
{ NULL, 0, 0, NULL }
};
@@ -113,11 +111,11 @@ typedef struct {
static Ttk_ElementOptionSpec BorderElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(BorderElement,borderObj), DEFAULT_BACKGROUND },
+ offsetof(BorderElement,borderObj), DEFAULT_BACKGROUND },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(BorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ offsetof(BorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ "-relief", TK_OPTION_RELIEF,
- Tk_Offset(BorderElement,reliefObj), "flat" },
+ offsetof(BorderElement,reliefObj), "flat" },
{ NULL, 0, 0, NULL }
};
@@ -168,9 +166,9 @@ typedef struct {
static Ttk_ElementOptionSpec FieldElementOptions[] = {
{ "-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(FieldElement,borderObj), "white" },
+ offsetof(FieldElement,borderObj), "white" },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(FieldElement,borderWidthObj), "2" },
+ offsetof(FieldElement,borderWidthObj), "2" },
{ NULL, 0, 0, NULL }
};
@@ -224,11 +222,11 @@ typedef struct {
static Ttk_ElementOptionSpec PaddingElementOptions[] = {
{ "-padding", TK_OPTION_STRING,
- Tk_Offset(PaddingElement,paddingObj), "0" },
+ offsetof(PaddingElement,paddingObj), "0" },
{ "-relief", TK_OPTION_RELIEF,
- Tk_Offset(PaddingElement,reliefObj), "flat" },
+ offsetof(PaddingElement,reliefObj), "flat" },
{ "-shiftrelief", TK_OPTION_INT,
- Tk_Offset(PaddingElement,shiftreliefObj), "0" },
+ offsetof(PaddingElement,shiftreliefObj), "0" },
{ NULL, 0, 0, NULL }
};
@@ -290,9 +288,9 @@ static void DrawFocusRing(
static Ttk_ElementOptionSpec FocusElementOptions[] = {
{ "-focuscolor",TK_OPTION_COLOR,
- Tk_Offset(FocusElement,focusColorObj), "black" },
+ offsetof(FocusElement,focusColorObj), "black" },
{ "-focusthickness",TK_OPTION_PIXELS,
- Tk_Offset(FocusElement,focusThicknessObj), "1" },
+ offsetof(FocusElement,focusThicknessObj), "1" },
{ NULL, 0, 0, NULL }
};
@@ -342,9 +340,9 @@ typedef struct {
static Ttk_ElementOptionSpec SeparatorElementOptions[] = {
{ "-orient", TK_OPTION_ANY,
- Tk_Offset(SeparatorElement, orientObj), "horizontal" },
+ offsetof(SeparatorElement, orientObj), "horizontal" },
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(SeparatorElement,borderObj), DEFAULT_BACKGROUND },
+ offsetof(SeparatorElement,borderObj), DEFAULT_BACKGROUND },
{ NULL, 0, 0, NULL }
};
@@ -434,7 +432,7 @@ typedef struct {
static Ttk_ElementOptionSpec SizegripOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(SizegripElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(SizegripElement,backgroundObj), DEFAULT_BACKGROUND },
{0,0,0,0}
};
@@ -495,17 +493,17 @@ typedef struct {
static Ttk_ElementOptionSpec IndicatorElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(IndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(IndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
{ "-indicatorcolor", TK_OPTION_BORDER,
- Tk_Offset(IndicatorElement,colorObj), DEFAULT_BACKGROUND },
+ offsetof(IndicatorElement,colorObj), DEFAULT_BACKGROUND },
{ "-indicatorrelief", TK_OPTION_RELIEF,
- Tk_Offset(IndicatorElement,reliefObj), "raised" },
+ offsetof(IndicatorElement,reliefObj), "raised" },
{ "-indicatordiameter", TK_OPTION_PIXELS,
- Tk_Offset(IndicatorElement,diameterObj), "12" },
+ offsetof(IndicatorElement,diameterObj), "12" },
{ "-indicatormargin", TK_OPTION_STRING,
- Tk_Offset(IndicatorElement,marginObj), "0 2 4 2" },
+ offsetof(IndicatorElement,marginObj), "0 2 4 2" },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(IndicatorElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ offsetof(IndicatorElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ NULL, 0, 0, NULL }
};
@@ -641,17 +639,17 @@ typedef struct {
static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(MenuIndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(MenuIndicatorElement,backgroundObj), DEFAULT_BACKGROUND },
{ "-indicatorwidth", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,widthObj), "4.0m" },
+ offsetof(MenuIndicatorElement,widthObj), "4.0m" },
{ "-indicatorheight", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,heightObj), "1.7m" },
+ offsetof(MenuIndicatorElement,heightObj), "1.7m" },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ offsetof(MenuIndicatorElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ "-indicatorrelief", TK_OPTION_RELIEF,
- Tk_Offset(MenuIndicatorElement,reliefObj),"raised" },
+ offsetof(MenuIndicatorElement,reliefObj),"raised" },
{ "-indicatormargin", TK_OPTION_STRING,
- Tk_Offset(MenuIndicatorElement,marginObj), "5 0" },
+ offsetof(MenuIndicatorElement,marginObj), "5 0" },
{ NULL, 0, 0, NULL }
};
@@ -710,15 +708,15 @@ typedef struct {
static Ttk_ElementOptionSpec ArrowElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(ArrowElement,borderObj), DEFAULT_BACKGROUND },
+ offsetof(ArrowElement,borderObj), DEFAULT_BACKGROUND },
{ "-relief",TK_OPTION_RELIEF,
- Tk_Offset(ArrowElement,reliefObj),"raised"},
+ offsetof(ArrowElement,reliefObj),"raised"},
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(ArrowElement,borderWidthObj), "1" },
+ offsetof(ArrowElement,borderWidthObj), "1" },
{ "-arrowcolor",TK_OPTION_COLOR,
- Tk_Offset(ArrowElement,colorObj),"black"},
+ offsetof(ArrowElement,colorObj),"black"},
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(ArrowElement,sizeObj), "14" },
+ offsetof(ArrowElement,sizeObj), "14" },
{ NULL, 0, 0, NULL }
};
@@ -781,11 +779,11 @@ typedef struct {
static Ttk_ElementOptionSpec TroughElementOptions[] = {
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(TroughElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ offsetof(TroughElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ "-troughcolor", TK_OPTION_BORDER,
- Tk_Offset(TroughElement,colorObj), DEFAULT_BACKGROUND },
+ offsetof(TroughElement,colorObj), DEFAULT_BACKGROUND },
{ "-troughrelief",TK_OPTION_RELIEF,
- Tk_Offset(TroughElement,reliefObj), "sunken" },
+ offsetof(TroughElement,reliefObj), "sunken" },
{ NULL, 0, 0, NULL }
};
@@ -841,15 +839,15 @@ typedef struct {
static Ttk_ElementOptionSpec ThumbElementOptions[] = {
{ "-orient", TK_OPTION_ANY,
- Tk_Offset(ThumbElement, orientObj), "horizontal" },
+ offsetof(ThumbElement, orientObj), "horizontal" },
{ "-width", TK_OPTION_PIXELS,
- Tk_Offset(ThumbElement,thicknessObj), DEFAULT_ARROW_SIZE },
+ offsetof(ThumbElement,thicknessObj), DEFAULT_ARROW_SIZE },
{ "-relief", TK_OPTION_RELIEF,
- Tk_Offset(ThumbElement,reliefObj), "raised" },
+ offsetof(ThumbElement,reliefObj), "raised" },
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(ThumbElement,borderObj), DEFAULT_BACKGROUND },
+ offsetof(ThumbElement,borderObj), DEFAULT_BACKGROUND },
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(ThumbElement,borderWidthObj), DEFAULT_BORDERWIDTH },
+ offsetof(ThumbElement,borderWidthObj), DEFAULT_BORDERWIDTH },
{ NULL, 0, 0, NULL }
};
@@ -911,17 +909,17 @@ typedef struct {
} SliderElement;
static Ttk_ElementOptionSpec SliderElementOptions[] = {
- { "-sliderlength", TK_OPTION_PIXELS, Tk_Offset(SliderElement,lengthObj),
+ { "-sliderlength", TK_OPTION_PIXELS, offsetof(SliderElement,lengthObj),
"30" },
- { "-sliderthickness",TK_OPTION_PIXELS,Tk_Offset(SliderElement,thicknessObj),
+ { "-sliderthickness",TK_OPTION_PIXELS, offsetof(SliderElement,thicknessObj),
"15" },
- { "-sliderrelief", TK_OPTION_RELIEF, Tk_Offset(SliderElement,reliefObj),
+ { "-sliderrelief", TK_OPTION_RELIEF, offsetof(SliderElement,reliefObj),
"raised" },
- { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(SliderElement,borderWidthObj),
+ { "-borderwidth", TK_OPTION_PIXELS, offsetof(SliderElement,borderWidthObj),
DEFAULT_BORDERWIDTH },
- { "-background", TK_OPTION_BORDER, Tk_Offset(SliderElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(SliderElement,borderObj),
DEFAULT_BACKGROUND },
- { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj),
+ { "-orient", TK_OPTION_ANY, offsetof(SliderElement,orientObj),
"horizontal" },
{ NULL, 0, 0, NULL }
};
@@ -1022,17 +1020,17 @@ typedef struct {
} PbarElement;
static Ttk_ElementOptionSpec PbarElementOptions[] = {
- { "-orient", TK_OPTION_ANY, Tk_Offset(PbarElement,orientObj),
+ { "-orient", TK_OPTION_ANY, offsetof(PbarElement,orientObj),
"horizontal" },
- { "-thickness", TK_OPTION_PIXELS, Tk_Offset(PbarElement,thicknessObj),
+ { "-thickness", TK_OPTION_PIXELS, offsetof(PbarElement,thicknessObj),
DEFAULT_PBAR_THICKNESS },
- { "-barsize", TK_OPTION_PIXELS, Tk_Offset(PbarElement,lengthObj),
+ { "-barsize", TK_OPTION_PIXELS, offsetof(PbarElement,lengthObj),
DEFAULT_PBAR_LENGTH },
- { "-pbarrelief", TK_OPTION_RELIEF, Tk_Offset(PbarElement,reliefObj),
+ { "-pbarrelief", TK_OPTION_RELIEF, offsetof(PbarElement,reliefObj),
"raised" },
- { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(PbarElement,borderWidthObj),
+ { "-borderwidth", TK_OPTION_PIXELS, offsetof(PbarElement,borderWidthObj),
DEFAULT_BORDERWIDTH },
- { "-background", TK_OPTION_BORDER, Tk_Offset(PbarElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(PbarElement,borderObj),
DEFAULT_BACKGROUND },
{ NULL, 0, 0, NULL }
};
@@ -1096,9 +1094,9 @@ typedef struct {
static Ttk_ElementOptionSpec TabElementOptions[] = {
{ "-borderwidth", TK_OPTION_PIXELS,
- Tk_Offset(TabElement,borderWidthObj),"1" },
+ offsetof(TabElement,borderWidthObj),"1" },
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(TabElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(TabElement,backgroundObj), DEFAULT_BACKGROUND },
{0,0,0,0}
};
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 4862e99..37b4dbc 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -69,6 +69,7 @@ static const char *const validateReasonStrings[] = {
/* Style parameters:
*/
typedef struct {
+ Tcl_Obj *placeholderForegroundObj;/* Foreground color for placeholder text */
Tcl_Obj *foregroundObj; /* Foreground color for normal text */
Tcl_Obj *backgroundObj; /* Entry widget background color */
Tcl_Obj *selBorderObj; /* Border and background for selection */
@@ -114,6 +115,8 @@ typedef struct {
Tcl_Obj *stateObj; /* Compatibility option -- see CheckStateObj */
+ Tcl_Obj *placeholderObj; /* Text to display for placeholder text */
+
/*
* Derived resources:
*/
@@ -143,55 +146,63 @@ typedef struct {
/*
* Default option values:
*/
-#define DEF_SELECT_BG "#000000"
-#define DEF_SELECT_FG "#ffffff"
-#define DEF_INSERT_BG "black"
-#define DEF_ENTRY_WIDTH "20"
-#define DEF_ENTRY_FONT "TkTextFont"
-#define DEF_LIST_HEIGHT "10"
+#define DEF_SELECT_BG "#000000"
+#define DEF_SELECT_FG "#ffffff"
+#define DEF_PLACEHOLDER_FG "#b3b3b3"
+#define DEF_INSERT_BG "black"
+#define DEF_ENTRY_WIDTH "20"
+#define DEF_ENTRY_FONT "TkTextFont"
+#define DEF_LIST_HEIGHT "10"
static Tk_OptionSpec EntryOptionSpecs[] = {
{TK_OPTION_BOOLEAN, "-exportselection", "exportSelection",
- "ExportSelection", "1", -1, Tk_Offset(Entry, entry.exportSelection),
+ "ExportSelection", "1", -1, offsetof(Entry, entry.exportSelection),
0,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- DEF_ENTRY_FONT, Tk_Offset(Entry, entry.fontObj),-1,
+ DEF_ENTRY_FONT, offsetof(Entry, entry.fontObj),-1,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-invalidcommand", "invalidCommand", "InvalidCommand",
- NULL, -1, Tk_Offset(Entry, entry.invalidCmd),
+ NULL, -1, offsetof(Entry, entry.invalidCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- "left", -1, Tk_Offset(Entry, entry.justify),
+ "left", -1, offsetof(Entry, entry.justify),
0, 0, GEOMETRY_CHANGED},
+ {TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
+ NULL, offsetof(Entry, entry.placeholderObj), -1,
+ TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-show", "show", "Show",
- NULL, -1, Tk_Offset(Entry, entry.showChar),
+ NULL, -1, offsetof(Entry, entry.showChar),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", Tk_Offset(Entry, entry.stateObj), -1,
+ "normal", offsetof(Entry, entry.stateObj), -1,
0,0,STATE_CHANGED},
{TK_OPTION_STRING, "-textvariable", "textVariable", "Variable",
- NULL, Tk_Offset(Entry, entry.textVariableObj), -1,
+ NULL, offsetof(Entry, entry.textVariableObj), -1,
TK_OPTION_NULL_OK,0,TEXTVAR_CHANGED},
{TK_OPTION_STRING_TABLE, "-validate", "validate", "Validate",
- "none", -1, Tk_Offset(Entry, entry.validate),
+ "none", -1, offsetof(Entry, entry.validate),
0, (ClientData) validateStrings, 0},
{TK_OPTION_STRING, "-validatecommand", "validateCommand", "ValidateCommand",
- NULL, -1, Tk_Offset(Entry, entry.validateCmd),
+ NULL, -1, offsetof(Entry, entry.validateCmd),
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_ENTRY_WIDTH, Tk_Offset(Entry, entry.widthObj), -1,
+ DEF_ENTRY_WIDTH, offsetof(Entry, entry.widthObj), -1,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- NULL, -1, Tk_Offset(Entry, entry.xscroll.scrollCmd),
+ NULL, -1, offsetof(Entry, entry.xscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
/* EntryStyleData options:
*/
+ {TK_OPTION_COLOR, "-background", "windowColor", "WindowColor",
+ NULL, offsetof(Entry, entry.styleData.backgroundObj), -1,
+ TK_OPTION_NULL_OK,0,0},
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, Tk_Offset(Entry, entry.styleData.foregroundObj), -1,
+ NULL, offsetof(Entry, entry.styleData.foregroundObj), -1,
TK_OPTION_NULL_OK,0,0},
- {TK_OPTION_COLOR, "-background", "windowColor", "WindowColor",
- NULL, Tk_Offset(Entry, entry.styleData.backgroundObj), -1,
+ {TK_OPTION_COLOR, "-placeholderforeground", "placeholderForeground",
+ "PlaceholderForeground", NULL,
+ offsetof(Entry, entry.styleData.placeholderForegroundObj), -1,
TK_OPTION_NULL_OK,0,0},
WIDGET_TAKEFOCUS_TRUE,
@@ -212,6 +223,7 @@ static void EntryInitStyleDefaults(EntryStyleData *es)
#define INIT(member, value) \
es->member = Tcl_NewStringObj(value, -1); \
Tcl_IncrRefCount(es->member);
+ INIT(placeholderForegroundObj, DEF_PLACEHOLDER_FG)
INIT(foregroundObj, DEFAULT_FOREGROUND)
INIT(selBorderObj, DEF_SELECT_BG)
INIT(selForegroundObj, DEF_SELECT_FG)
@@ -223,6 +235,7 @@ static void EntryInitStyleDefaults(EntryStyleData *es)
static void EntryFreeStyleDefaults(EntryStyleData *es)
{
+ Tcl_DecrRefCount(es->placeholderForegroundObj);
Tcl_DecrRefCount(es->foregroundObj);
Tcl_DecrRefCount(es->selBorderObj);
Tcl_DecrRefCount(es->selForegroundObj);
@@ -249,6 +262,7 @@ static void EntryInitStyleData(Entry *entryPtr, EntryStyleData *es)
# define INIT(member, name) \
if ((tmp=Ttk_QueryOption(entryPtr->core.layout,name,state))) \
es->member=tmp;
+ INIT(placeholderForegroundObj, "-placeholderforeground");
INIT(foregroundObj, "-foreground");
INIT(selBorderObj, "-selectbackground")
INIT(selBorderWidthObj, "-selectborderwidth")
@@ -259,6 +273,7 @@ static void EntryInitStyleData(Entry *entryPtr, EntryStyleData *es)
/* Reacquire color & border resources from resource cache.
*/
+ es->placeholderForegroundObj = Ttk_UseColor(cache, tkwin, es->placeholderForegroundObj);
es->foregroundObj = Ttk_UseColor(cache, tkwin, es->foregroundObj);
es->selForegroundObj = Ttk_UseColor(cache, tkwin, es->selForegroundObj);
es->insertColorObj = Ttk_UseColor(cache, tkwin, es->insertColorObj);
@@ -300,12 +315,23 @@ static char *EntryDisplayString(const char *showChar, int numChars)
*/
static void EntryUpdateTextLayout(Entry *entryPtr)
{
+ TkSizeT length;
+ char *text;
Tk_FreeTextLayout(entryPtr->entry.textLayout);
- entryPtr->entry.textLayout = Tk_ComputeTextLayout(
+ if ((entryPtr->entry.numChars != 0) || (entryPtr->entry.placeholderObj == NULL)) {
+ entryPtr->entry.textLayout = Tk_ComputeTextLayout(
Tk_GetFontFromObj(entryPtr->core.tkwin, entryPtr->entry.fontObj),
entryPtr->entry.displayString, entryPtr->entry.numChars,
0/*wraplength*/, entryPtr->entry.justify, TK_IGNORE_NEWLINES,
&entryPtr->entry.layoutWidth, &entryPtr->entry.layoutHeight);
+ } else {
+ text = TkGetStringFromObj(entryPtr->entry.placeholderObj, &length);
+ entryPtr->entry.textLayout = Tk_ComputeTextLayout(
+ Tk_GetFontFromObj(entryPtr->core.tkwin, entryPtr->entry.fontObj),
+ text, length,
+ 0/*wraplength*/, entryPtr->entry.justify, TK_IGNORE_NEWLINES,
+ &entryPtr->entry.layoutWidth, &entryPtr->entry.layoutHeight);
+ }
}
/* EntryEditable --
@@ -328,7 +354,7 @@ static int
EntryFetchSelection(
ClientData clientData, int offset, char *buffer, int maxBytes)
{
- Entry *entryPtr = (Entry *) clientData;
+ Entry *entryPtr = clientData;
int byteCount;
const char *string;
const char *selStart, *selEnd;
@@ -361,7 +387,7 @@ EntryFetchSelection(
*/
static void EntryLostSelection(ClientData clientData)
{
- Entry *entryPtr = (Entry *) clientData;
+ Entry *entryPtr = clientData;
entryPtr->core.flags &= ~GOT_SELECTION;
entryPtr->entry.selectFirst = entryPtr->entry.selectLast = -1;
TtkRedisplayWidget(&entryPtr->core);
@@ -557,7 +583,7 @@ static int EntryNeedsValidation(VMODE vmode, VREASON reason)
* Returns:
* TCL_OK if the change is accepted
* TCL_BREAK if the change is rejected
- * TCL_ERROR if any errors occured
+ * TCL_ERROR if any errors occurred
*
* The change will be rejected if -validatecommand returns 0,
* or if -validatecommand or -invalidcommand modifies the value.
@@ -896,7 +922,7 @@ DeleteChars(
static void
EntryEventProc(ClientData clientData, XEvent *eventPtr)
{
- Entry *entryPtr = (Entry *) clientData;
+ Entry *entryPtr = clientData;
Tcl_Preserve(clientData);
switch (eventPtr->type) {
@@ -1174,6 +1200,7 @@ static void EntryDisplay(void *clientData, Drawable d)
Ttk_Box textarea;
TkRegion clipRegion;
XRectangle rect;
+ Tcl_Obj *foregroundObj;
EntryInitStyleData(entryPtr, &es);
@@ -1269,7 +1296,21 @@ static void EntryDisplay(void *clientData, Drawable d)
/* Draw the text:
*/
- gc = EntryGetGC(entryPtr, es.foregroundObj, clipRegion);
+ if ((*(entryPtr->entry.displayString) == '\0')
+ && (entryPtr->entry.placeholderObj != NULL)) {
+ /* No text displayed, but -placeholder is given */
+ if (Tcl_GetCharLength(es.placeholderForegroundObj) > 0) {
+ foregroundObj = es.placeholderForegroundObj;
+ } else {
+ foregroundObj = es.foregroundObj;
+ }
+ /* Use placeholder text width */
+ leftIndex = 0;
+ Tcl_GetStringFromObj(entryPtr->entry.placeholderObj,&rightIndex);
+ } else {
+ foregroundObj = es.foregroundObj;
+ }
+ gc = EntryGetGC(entryPtr, foregroundObj, clipRegion);
Tk_DrawTextLayout(
Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout,
entryPtr->entry.layoutX, entryPtr->entry.layoutY,
@@ -1321,8 +1362,8 @@ EntryIndex(
int *indexPtr) /* Return value */
{
# define EntryWidth(e) (Tk_Width(entryPtr->core.tkwin)) /* Not Right */
- const char *string = Tcl_GetString(indexObj);
- size_t length = indexObj->length;
+ TkSizeT length;
+ const char *string = TkGetStringFromObj(indexObj, &length);
if (strncmp(string, "end", length) == 0) {
*indexPtr = entryPtr->entry.numChars;
@@ -1565,7 +1606,7 @@ static int EntrySelectionPresentCommand(
return TCL_ERROR;
}
Tcl_SetObjResult(interp,
- Tcl_NewBooleanObj(entryPtr->entry.selectFirst >= 0));
+ Tcl_NewWideIntObj(entryPtr->entry.selectFirst >= 0));
return TCL_OK;
}
@@ -1642,7 +1683,7 @@ static int EntryValidateCommand(
if (code == TCL_ERROR)
return code;
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(code == TCL_OK));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(code == TCL_OK));
return TCL_OK;
}
@@ -1729,13 +1770,13 @@ typedef struct {
static Tk_OptionSpec ComboboxOptionSpecs[] = {
{TK_OPTION_STRING, "-height", "height", "Height",
- DEF_LIST_HEIGHT, Tk_Offset(Combobox, combobox.heightObj), -1,
+ DEF_LIST_HEIGHT, offsetof(Combobox, combobox.heightObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-postcommand", "postCommand", "PostCommand",
- "", Tk_Offset(Combobox, combobox.postCommandObj), -1,
+ "", offsetof(Combobox, combobox.postCommandObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-values", "values", "Values",
- "", Tk_Offset(Combobox, combobox.valuesObj), -1,
+ "", offsetof(Combobox, combobox.valuesObj), -1,
0,0,0 },
WIDGET_INHERIT_OPTIONS(EntryOptionSpecs)
};
@@ -1920,27 +1961,27 @@ typedef struct {
static Tk_OptionSpec SpinboxOptionSpecs[] = {
{TK_OPTION_STRING, "-values", "values", "Values",
- "", Tk_Offset(Spinbox, spinbox.valuesObj), -1,
+ "", offsetof(Spinbox, spinbox.valuesObj), -1,
0,0,0 },
{TK_OPTION_DOUBLE, "-from", "from", "From",
- "0", Tk_Offset(Spinbox,spinbox.fromObj), -1,
+ "0", offsetof(Spinbox,spinbox.fromObj), -1,
0,0,0 },
{TK_OPTION_DOUBLE, "-to", "to", "To",
- "0", Tk_Offset(Spinbox,spinbox.toObj), -1,
+ "0", offsetof(Spinbox,spinbox.toObj), -1,
0,0,0 },
{TK_OPTION_DOUBLE, "-increment", "increment", "Increment",
- "1", Tk_Offset(Spinbox,spinbox.incrementObj), -1,
+ "1", offsetof(Spinbox,spinbox.incrementObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-format", "format", "Format",
- "", Tk_Offset(Spinbox, spinbox.formatObj), -1,
+ "", offsetof(Spinbox, spinbox.formatObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-command", "command", "Command",
- "", Tk_Offset(Spinbox, spinbox.commandObj), -1,
+ "", offsetof(Spinbox, spinbox.commandObj), -1,
0,0,0 },
{TK_OPTION_BOOLEAN, "-wrap", "wrap", "Wrap",
- "0", Tk_Offset(Spinbox,spinbox.wrapObj), -1,
+ "0", offsetof(Spinbox,spinbox.wrapObj), -1,
0,0,0 },
WIDGET_INHERIT_OPTIONS(EntryOptionSpecs)
@@ -2022,9 +2063,9 @@ typedef struct {
static Ttk_ElementOptionSpec TextareaElementOptions[] = {
{ "-font", TK_OPTION_FONT,
- Tk_Offset(TextareaElement,fontObj), DEF_ENTRY_FONT },
+ offsetof(TextareaElement,fontObj), DEF_ENTRY_FONT },
{ "-width", TK_OPTION_INT,
- Tk_Offset(TextareaElement,widthObj), "20" },
+ offsetof(TextareaElement,widthObj), "20" },
{ NULL, 0, 0, NULL }
};
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 8a15e5b..bb3dd35 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -4,8 +4,7 @@
* ttk::frame and ttk::labelframe widgets.
*/
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
#include "ttkManager.h"
@@ -29,19 +28,19 @@ typedef struct {
static Tk_OptionSpec FrameOptionSpecs[] = {
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", NULL,
- Tk_Offset(Frame,frame.borderWidthObj), -1,
+ offsetof(Frame,frame.borderWidthObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- Tk_Offset(Frame,frame.paddingObj), -1,
+ offsetof(Frame,frame.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_RELIEF, "-relief", "relief", "Relief", NULL,
- Tk_Offset(Frame,frame.reliefObj), -1,
+ offsetof(Frame,frame.reliefObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_PIXELS, "-width", "width", "Width", "0",
- Tk_Offset(Frame,frame.widthObj), -1,
+ offsetof(Frame,frame.widthObj), -1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-height", "height", "Height", "0",
- Tk_Offset(Frame,frame.heightObj), -1,
+ offsetof(Frame,frame.heightObj), -1,
0,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
@@ -250,16 +249,16 @@ typedef struct {
static Tk_OptionSpec LabelframeOptionSpecs[] = {
{TK_OPTION_STRING, "-labelanchor", "labelAnchor", "LabelAnchor",
- "nw", Tk_Offset(Labelframe, label.labelAnchorObj),-1,
+ "nw", offsetof(Labelframe, label.labelAnchorObj),-1,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-text", "text", "Text", "",
- Tk_Offset(Labelframe,label.textObj), -1,
+ offsetof(Labelframe,label.textObj), -1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline",
- "-1", Tk_Offset(Labelframe,label.underlineObj), -1,
+ "-1", offsetof(Labelframe,label.underlineObj), -1,
0,0,0 },
{TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL,
- -1, Tk_Offset(Labelframe,label.labelWidget),
+ -1, offsetof(Labelframe,label.labelWidget),
TK_OPTION_NULL_OK,0,LABELWIDGET_CHANGED|GEOMETRY_CHANGED },
WIDGET_INHERIT_OPTIONS(FrameOptionSpecs)
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
deleted file mode 100644
index 8047e3f..0000000
--- a/generic/ttk/ttkGenStubs.tcl
+++ /dev/null
@@ -1,963 +0,0 @@
-# ttkGenStubs.tcl --
-#
-# This script generates a set of stub files for a given
-# interface.
-#
-#
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 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.
-#
-# SOURCE: tcl/tools/genStubs.tcl, revision 1.44
-#
-# CHANGES:
-# + Second argument to "declare" is used as a status guard
-# instead of a platform guard.
-# + Allow trailing semicolon in function declarations
-#
-
-namespace eval genStubs {
- # libraryName --
- #
- # The name of the entire library. This value is used to compute
- # the USE_*_STUBS macro and the name of the init file.
-
- variable libraryName "UNKNOWN"
-
- # interfaces --
- #
- # An array indexed by interface name that is used to maintain
- # the set of valid interfaces. The value is empty.
-
- array set interfaces {}
-
- # curName --
- #
- # The name of the interface currently being defined.
-
- variable curName "UNKNOWN"
-
- # scspec --
- #
- # Storage class specifier for external function declarations.
- # Normally "EXTERN", may be set to something like XYZAPI
- #
- variable scspec "EXTERN"
-
- # epoch, revision --
- #
- # The epoch and revision numbers of the interface currently being defined.
- # (@@@TODO: should be an array mapping interface names -> numbers)
- #
-
- variable epoch {}
- variable revision 0
-
- # hooks --
- #
- # An array indexed by interface name that contains the set of
- # subinterfaces that should be defined for a given interface.
-
- array set hooks {}
-
- # stubs --
- #
- # This three dimensional array is indexed first by interface name,
- # second by field name, and third by a numeric offset or the
- # constant "lastNum". The lastNum entry contains the largest
- # numeric offset used for a given interface.
- #
- # Field "decl,$i" contains the C function specification that
- # should be used for the given entry in the stub table. The spec
- # consists of a list in the form returned by parseDecl.
- # Other fields TBD later.
-
- array set stubs {}
-
- # outDir --
- #
- # The directory where the generated files should be placed.
-
- variable outDir .
-}
-
-# genStubs::library --
-#
-# This function is used in the declarations file to set the name
-# of the library that the interfaces are associated with (e.g. "tcl").
-# This value will be used to define the inline conditional macro.
-#
-# Arguments:
-# name The library name.
-#
-# Results:
-# None.
-
-proc genStubs::library {name} {
- variable libraryName $name
-}
-
-# genStubs::interface --
-#
-# This function is used in the declarations file to set the name
-# of the interface currently being defined.
-#
-# Arguments:
-# name The name of the interface.
-#
-# Results:
-# None.
-
-proc genStubs::interface {name} {
- variable curName $name
- variable interfaces
- variable stubs
-
- set interfaces($name) {}
- set stubs($name,lastNum) 0
- return
-}
-
-# genStubs::scspec --
-#
-# Define the storage class macro used for external function declarations.
-# Typically, this will be a macro like XYZAPI or EXTERN that
-# expands to either DLLIMPORT or DLLEXPORT, depending on whether
-# -DBUILD_XYZ has been set.
-#
-proc genStubs::scspec {value} {
- variable scspec $value
-}
-
-# genStubs::epoch --
-#
-# Define the epoch number for this library. The epoch
-# should be incrememented when a release is made that
-# contains incompatible changes to the public API.
-#
-proc genStubs::epoch {value} {
- variable epoch $value
-}
-
-# genStubs::hooks --
-#
-# This function defines the subinterface hooks for the current
-# interface.
-#
-# Arguments:
-# names The ordered list of interfaces that are reachable through the
-# hook vector.
-#
-# Results:
-# None.
-
-proc genStubs::hooks {names} {
- variable curName
- variable hooks
-
- set hooks($curName) $names
- return
-}
-
-# genStubs::declare --
-#
-# This function is used in the declarations file to declare a new
-# interface entry.
-#
-# Arguments:
-# index The index number of the interface.
-# status Status of the interface: one of "current",
-# "deprecated", or "obsolete".
-# decl The C function declaration, or {} for an undefined
-# entry.
-#
-# Results:
-# None.
-
-proc genStubs::declare {args} {
- variable stubs
- variable curName
- variable revision
-
- incr revision
- if {[llength $args] == 2} {
- lassign $args index decl
- set status current
- } elseif {[llength $args] == 3} {
- lassign $args index status decl
- } else {
- puts stderr "wrong # args: declare $args"
- return
- }
-
- # Check for duplicate declarations, then add the declaration and
- # bump the lastNum counter if necessary.
-
- if {[info exists stubs($curName,decl,$index)]} {
- puts stderr "Duplicate entry: $index"
- }
- regsub -all "\[ \t\n\]+" [string trim $decl] " " decl
- set decl [parseDecl $decl]
-
- set stubs($curName,status,$index) $status
- set stubs($curName,decl,$index) $decl
-
- if {$index > $stubs($curName,lastNum)} {
- set stubs($curName,lastNum) $index
- }
- return
-}
-
-# genStubs::export --
-#
-# This function is used in the declarations file to declare a symbol
-# that is exported from the library but is not in the stubs table.
-#
-# Arguments:
-# decl The C function declaration, or {} for an undefined
-# entry.
-#
-# Results:
-# None.
-
-proc genStubs::export {args} {
- if {[llength $args] != 1} {
- puts stderr "wrong # args: export $args"
- }
- return
-}
-
-# genStubs::rewriteFile --
-#
-# This function replaces the machine generated portion of the
-# specified file with new contents. It looks for the !BEGIN! and
-# !END! comments to determine where to place the new text.
-#
-# Arguments:
-# file The name of the file to modify.
-# text The new text to place in the file.
-#
-# Results:
-# None.
-
-proc genStubs::rewriteFile {file text} {
- if {![file exists $file]} {
- puts stderr "Cannot find file: $file"
- return
- }
- set in [open ${file} r]
- set out [open ${file}.new w]
- fconfigure $out -translation lf
-
- while {![eof $in]} {
- set line [gets $in]
- if {[string match "*!BEGIN!*" $line]} {
- break
- }
- puts $out $line
- }
- puts $out "/* !BEGIN!: Do not edit below this line. */"
- puts $out $text
- while {![eof $in]} {
- set line [gets $in]
- if {[string match "*!END!*" $line]} {
- break
- }
- }
- puts $out "/* !END!: Do not edit above this line. */"
- puts -nonewline $out [read $in]
- close $in
- close $out
- file rename -force ${file}.new ${file}
- return
-}
-
-# genStubs::addPlatformGuard --
-#
-# Wrap a string inside a platform #ifdef.
-#
-# Arguments:
-# plat Platform to test.
-#
-# Results:
-# Returns the original text inside an appropriate #ifdef.
-
-proc genStubs::addPlatformGuard {plat iftxt {eltxt {}}} {
- set text ""
- switch $plat {
- win {
- append text "#ifdef _WIN32 /* WIN */\n${iftxt}"
- if {$eltxt ne ""} {
- append text "#else /* WIN */\n${eltxt}"
- }
- append text "#endif /* WIN */\n"
- }
- unix {
- append text "#if !defined(_WIN32) && !defined(MAC_OSX_TCL)\
- /* UNIX */\n${iftxt}"
- if {$eltxt ne ""} {
- append text "#else /* UNIX */\n${eltxt}"
- }
- append text "#endif /* UNIX */\n"
- }
- macosx {
- append text "#ifdef MAC_OSX_TCL /* MACOSX */\n${iftxt}"
- if {$eltxt ne ""} {
- append text "#else /* MACOSX */\n${eltxt}"
- }
- append text "#endif /* MACOSX */\n"
- }
- aqua {
- append text "#ifdef MAC_OSX_TK /* AQUA */\n${iftxt}"
- if {$eltxt ne ""} {
- append text "#else /* AQUA */\n${eltxt}"
- }
- append text "#endif /* AQUA */\n"
- }
- x11 {
- append text "#if !(defined(_WIN32) || defined(MAC_OSX_TK))\
- /* X11 */\n${iftxt}"
- if {$eltxt ne ""} {
- append text "#else /* X11 */\n${eltxt}"
- }
- append text "#endif /* X11 */\n"
- }
- default {
- append text "${iftxt}${eltxt}"
- }
- }
- return $text
-}
-
-# genStubs::emitSlots --
-#
-# Generate the stub table slots for the given interface. If there
-# are no generic slots, then one table is generated for each
-# platform, otherwise one table is generated for all platforms.
-#
-# Arguments:
-# name The name of the interface being emitted.
-# textVar The variable to use for output.
-#
-# Results:
-# None.
-
-proc genStubs::emitSlots {name textVar} {
- upvar $textVar text
-
- forAllStubs $name makeSlot noGuard text {" void (*reserved$i)(void);\n"}
- return
-}
-
-# genStubs::parseDecl --
-#
-# Parse a C function declaration into its component parts.
-#
-# Arguments:
-# decl The function declaration.
-#
-# Results:
-# Returns a list of the form {returnType name args}. The args
-# element consists of a list of type/name pairs, or a single
-# element "void". If the function declaration is malformed
-# then an error is displayed and the return value is {}.
-
-proc genStubs::parseDecl {decl} {
- if {![regexp {^(.*)\((.*)\);?$} $decl all prefix args]} {
- set prefix $decl
- set args {}
- }
- set prefix [string trim $prefix]
- if {![regexp {^(.+[ ][*]*)([^ *]+)$} $prefix all rtype fname]} {
- puts stderr "Bad return type: $decl"
- return
- }
- set rtype [string trim $rtype]
- if {$args eq ""} {
- return [list $rtype $fname {}]
- }
- foreach arg [split $args ,] {
- lappend argList [string trim $arg]
- }
- if {![string compare [lindex $argList end] "..."]} {
- set args TCL_VARARGS
- foreach arg [lrange $argList 0 end-1] {
- set argInfo [parseArg $arg]
- if {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
- lappend args $argInfo
- } else {
- puts stderr "Bad argument: '$arg' in '$decl'"
- return
- }
- }
- } else {
- set args {}
- foreach arg $argList {
- set argInfo [parseArg $arg]
- if {![string compare $argInfo "void"]} {
- lappend args "void"
- break
- } elseif {[llength $argInfo] == 2 || [llength $argInfo] == 3} {
- lappend args $argInfo
- } else {
- puts stderr "Bad argument: '$arg' in '$decl'"
- return
- }
- }
- }
- return [list $rtype $fname $args]
-}
-
-# genStubs::parseArg --
-#
-# This function parses a function argument into a type and name.
-#
-# Arguments:
-# arg The argument to parse.
-#
-# Results:
-# Returns a list of type and name with an optional third array
-# indicator. If the argument is malformed, returns "".
-
-proc genStubs::parseArg {arg} {
- if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
- if {$arg eq "void"} {
- return $arg
- } else {
- return
- }
- }
- set result [list [string trim $type] $name]
- if {$array ne ""} {
- lappend result $array
- }
- return $result
-}
-
-# genStubs::makeDecl --
-#
-# Generate the prototype for a function.
-#
-# Arguments:
-# name The interface name.
-# decl The function declaration.
-# index The slot index for this function.
-#
-# Results:
-# Returns the formatted declaration string.
-
-proc genStubs::makeDecl {name decl index} {
- variable scspec
- lassign $decl rtype fname args
-
- append text "/* $index */\n"
- set line "$scspec $rtype"
- set count [expr {2 - ([string length $line] / 8)}]
- append line [string range "\t\t\t" 0 $count]
- set pad [expr {24 - [string length $line]}]
- if {$pad <= 0} {
- append line " "
- set pad 0
- }
- if {$args eq ""} {
- append line $fname
- append text $line
- append text ";\n"
- return $text
- }
- append line $fname
-
- set arg1 [lindex $args 0]
- switch -exact $arg1 {
- void {
- append line "(void)"
- }
- TCL_VARARGS {
- set sep "("
- foreach arg [lrange $args 1 end] {
- append line $sep
- set next {}
- append next [lindex $arg 0]
- if {[string index $next end] ne "*"} {
- append next " "
- }
- append next [lindex $arg 1] [lindex $arg 2]
- if {[string length $line] + [string length $next] \
- + $pad > 76} {
- append text [string trimright $line] \n
- set line "\t\t\t\t"
- set pad 28
- }
- append line $next
- set sep ", "
- }
- append line ", ...)"
- }
- default {
- set sep "("
- foreach arg $args {
- append line $sep
- set next {}
- append next [lindex $arg 0]
- if {[string index $next end] ne "*"} {
- append next " "
- }
- append next [lindex $arg 1] [lindex $arg 2]
- if {[string length $line] + [string length $next] \
- + $pad > 76} {
- append text [string trimright $line] \n
- set line "\t\t\t\t"
- set pad 28
- }
- append line $next
- set sep ", "
- }
- append line ")"
- }
- }
- return "$text$line;\n"
-}
-
-# genStubs::makeMacro --
-#
-# Generate the inline macro for a function.
-#
-# Arguments:
-# name The interface name.
-# decl The function declaration.
-# index The slot index for this function.
-#
-# Results:
-# Returns the formatted macro definition.
-
-proc genStubs::makeMacro {name decl index} {
- lassign $decl rtype fname args
-
- set lfname [string tolower [string index $fname 0]]
- append lfname [string range $fname 1 end]
-
- set text "#define $fname \\\n\t("
- if {$args eq ""} {
- append text "*"
- }
- append text "${name}StubsPtr->$lfname)"
- append text " /* $index */\n"
- return $text
-}
-
-# genStubs::makeSlot --
-#
-# Generate the stub table entry for a function.
-#
-# Arguments:
-# name The interface name.
-# decl The function declaration.
-# index The slot index for this function.
-#
-# Results:
-# Returns the formatted table entry.
-
-proc genStubs::makeSlot {name decl index} {
- lassign $decl rtype fname args
-
- set lfname [string tolower [string index $fname 0]]
- append lfname [string range $fname 1 end]
-
- set text " "
- if {$args eq ""} {
- append text $rtype " *" $lfname "; /* $index */\n"
- return $text
- }
- if {[string range $rtype end-8 end] eq "__stdcall"} {
- append text [string trim [string range $rtype 0 end-9]] " (__stdcall *" $lfname ") "
- } else {
- append text $rtype " (*" $lfname ") "
- }
- set arg1 [lindex $args 0]
- switch -exact $arg1 {
- void {
- append text "(void)"
- }
- TCL_VARARGS {
- set sep "("
- foreach arg [lrange $args 1 end] {
- append text $sep [lindex $arg 0]
- if {[string index $text end] ne "*"} {
- append text " "
- }
- append text [lindex $arg 1] [lindex $arg 2]
- set sep ", "
- }
- append text ", ...)"
- }
- default {
- set sep "("
- foreach arg $args {
- append text $sep [lindex $arg 0]
- if {[string index $text end] ne "*"} {
- append text " "
- }
- append text [lindex $arg 1] [lindex $arg 2]
- set sep ", "
- }
- append text ")"
- }
- }
-
- append text "; /* $index */\n"
- return $text
-}
-
-# genStubs::makeInit --
-#
-# Generate the prototype for a function.
-#
-# Arguments:
-# name The interface name.
-# decl The function declaration.
-# index The slot index for this function.
-#
-# Results:
-# Returns the formatted declaration string.
-
-proc genStubs::makeInit {name decl index} {
- if {[lindex $decl 2] eq ""} {
- append text " &" [lindex $decl 1] ", /* " $index " */\n"
- } else {
- append text " " [lindex $decl 1] ", /* " $index " */\n"
- }
- return $text
-}
-
-# genStubs::forAllStubs --
-#
-# This function iterates over all of the slots and invokes
-# a callback for each slot. The result of the callback is then
-# placed inside appropriate guards.
-#
-# Arguments:
-# name The interface name.
-# slotProc The proc to invoke to handle the slot. It will
-# have the interface name, the declaration, and
-# the index appended.
-# guardProc The proc to invoke to add guards. It will have
-# the slot status and text appended.
-# textVar The variable to use for output.
-# skipString The string to emit if a slot is skipped. This
-# string will be subst'ed in the loop so "$i" can
-# be used to substitute the index value.
-#
-# Results:
-# None.
-
-proc genStubs::forAllStubs {name slotProc guardProc textVar
- {skipString {"/* Slot $i is reserved */\n"}}} {
- variable stubs
- upvar $textVar text
-
- set lastNum $stubs($name,lastNum)
-
- for {set i 0} {$i <= $lastNum} {incr i} {
- if {[info exists stubs($name,decl,$i)]} {
- append text [$guardProc $stubs($name,status,$i) \
- [$slotProc $name $stubs($name,decl,$i) $i]]
- } else {
- eval {append text} $skipString
- }
- }
-}
-
-proc genStubs::noGuard {status text} { return $text }
-
-proc genStubs::addGuard {status text} {
- variable libraryName
- set upName [string toupper $libraryName]
-
- switch -- $status {
- current {
- # No change
- }
- deprecated {
- set text [ifdeffed "${upName}_DEPRECATED" $text]
- }
- obsolete {
- set text ""
- }
- default {
- puts stderr "Unrecognized status code $status"
- }
- }
- return $text
-}
-
-proc genStubs::ifdeffed {macro text} {
- join [list "#ifdef $macro" $text "#endif" ""] \n
-}
-
-# genStubs::emitDeclarations --
-#
-# This function emits the function declarations for this interface.
-#
-# Arguments:
-# name The interface name.
-# textVar The variable to use for output.
-#
-# Results:
-# None.
-
-proc genStubs::emitDeclarations {name textVar} {
- upvar $textVar text
-
- append text "\n/*\n * Exported function declarations:\n */\n\n"
- forAllStubs $name makeDecl noGuard text
- return
-}
-
-# genStubs::emitMacros --
-#
-# This function emits the inline macros for an interface.
-#
-# Arguments:
-# name The name of the interface being emitted.
-# textVar The variable to use for output.
-#
-# Results:
-# None.
-
-proc genStubs::emitMacros {name textVar} {
- variable libraryName
- upvar $textVar text
-
- set upName [string toupper $libraryName]
- append text "\n#if defined(USE_${upName}_STUBS)\n"
- append text "\n/*\n * Inline function declarations:\n */\n\n"
-
- forAllStubs $name makeMacro addGuard text
-
- append text "\n#endif /* defined(USE_${upName}_STUBS) */\n"
- return
-}
-
-# genStubs::emitHeader --
-#
-# This function emits the body of the <name>Decls.h file for
-# the specified interface.
-#
-# Arguments:
-# name The name of the interface being emitted.
-#
-# Results:
-# None.
-
-proc genStubs::emitHeader {name} {
- variable outDir
- variable hooks
- variable epoch
- variable revision
-
- set capName [string toupper [string index $name 0]]
- append capName [string range $name 1 end]
-
- if {$epoch ne ""} {
- set CAPName [string toupper $name]
- append text "\n"
- append text "#define ${CAPName}_STUBS_EPOCH $epoch\n"
- append text "#define ${CAPName}_STUBS_REVISION $revision\n"
- }
-
- append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
-
- emitDeclarations $name text
-
- if {[info exists hooks($name)]} {
- append text "\ntypedef struct {\n"
- foreach hook $hooks($name) {
- set capHook [string toupper [string index $hook 0]]
- append capHook [string range $hook 1 end]
- append text " const struct ${capHook}Stubs *${hook}Stubs;\n"
- }
- append text "} ${capName}StubHooks;\n"
- }
- append text "\ntypedef struct ${capName}Stubs {\n"
- append text " int magic;\n"
- if {$epoch ne ""} {
- append text " int epoch;\n"
- append text " int revision;\n"
- }
- if {[info exists hooks($name)]} {
- append text " const ${capName}StubHooks *hooks;\n\n"
- } else {
- append text " void *hooks;\n\n"
- }
-
- emitSlots $name text
-
- append text "} ${capName}Stubs;\n\n"
-
- append text "extern const ${capName}Stubs *${name}StubsPtr;\n\n"
- append text "#ifdef __cplusplus\n}\n#endif\n"
-
- emitMacros $name text
-
- rewriteFile [file join $outDir ${name}Decls.h] $text
- return
-}
-
-# genStubs::emitInit --
-#
-# Generate the table initializers for an interface.
-#
-# Arguments:
-# name The name of the interface to initialize.
-# textVar The variable to use for output.
-#
-# Results:
-# Returns the formatted output.
-
-proc genStubs::emitInit {name textVar} {
- variable hooks
- variable interfaces
- variable epoch
- upvar $textVar text
- set root 1
-
- set capName [string toupper [string index $name 0]]
- append capName [string range $name 1 end]
-
- if {[info exists hooks($name)]} {
- append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n"
- set sep " "
- foreach sub $hooks($name) {
- append text $sep "&${sub}Stubs"
- set sep ",\n "
- }
- append text "\n\};\n"
- }
- foreach intf [array names interfaces] {
- if {[info exists hooks($intf)]} {
- if {[lsearch -exact $hooks($intf) $name] >= 0} {
- set root 0
- break
- }
- }
- }
-
- append text "\n"
- if {!$root} {
- append text "static "
- }
- append text "const ${capName}Stubs ${name}Stubs = \{\n TCL_STUB_MAGIC,\n"
- if {$epoch ne ""} {
- set CAPName [string toupper $name]
- append text " ${CAPName}_STUBS_EPOCH,\n"
- append text " ${CAPName}_STUBS_REVISION,\n"
- }
- if {[info exists hooks($name)]} {
- append text " &${name}StubHooks,\n"
- } else {
- append text " 0,\n"
- }
-
- forAllStubs $name makeInit noGuard text {" 0, /* $i */\n"}
-
- append text "\};\n"
- return
-}
-
-# genStubs::emitInits --
-#
-# This function emits the body of the <name>StubInit.c file for
-# the specified interface.
-#
-# Arguments:
-# name The name of the interface being emitted.
-#
-# Results:
-# None.
-
-proc genStubs::emitInits {} {
- variable hooks
- variable outDir
- variable libraryName
- variable interfaces
-
- # Assuming that dependencies only go one level deep, we need to emit
- # all of the leaves first to avoid needing forward declarations.
-
- set leaves {}
- set roots {}
- foreach name [lsort [array names interfaces]] {
- if {[info exists hooks($name)]} {
- lappend roots $name
- } else {
- lappend leaves $name
- }
- }
- foreach name $leaves {
- emitInit $name text
- }
- foreach name $roots {
- emitInit $name text
- }
-
- rewriteFile [file join $outDir ${libraryName}StubInit.c] $text
-}
-
-# genStubs::init --
-#
-# This is the main entry point.
-#
-# Arguments:
-# None.
-#
-# Results:
-# None.
-
-proc genStubs::init {} {
- global argv argv0
- variable outDir
- variable interfaces
-
- if {[llength $argv] < 2} {
- puts stderr "usage: $argv0 outDir declFile ?declFile...?"
- exit 1
- }
-
- set outDir [lindex $argv 0]
-
- foreach file [lrange $argv 1 end] {
- source $file
- }
-
- foreach name [lsort [array names interfaces]] {
- puts "Emitting $name"
- emitHeader $name
- }
-
- emitInits
-}
-
-# lassign --
-#
-# This function emulates the TclX lassign command.
-#
-# Arguments:
-# valueList A list containing the values to be assigned.
-# args The list of variables to be assigned.
-#
-# Results:
-# Returns any values that were not assigned to variables.
-
-if {[string length [namespace which lassign]] == 0} {
- proc lassign {valueList args} {
- if {[llength $args] == 0} {
- error "wrong # args: should be \"lassign list varName ?varName ...?\""
- }
- uplevel [list foreach $args $valueList {break}]
- return [lrange $valueList [llength $args] end]
- }
-}
-
-genStubs::init
diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c
index e403e2d..002a753 100644
--- a/generic/ttk/ttkImage.c
+++ b/generic/ttk/ttkImage.c
@@ -10,8 +10,7 @@
* [style map].
*/
-#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#define MIN(a,b) ((a) < (b) ? (a) : (b))
@@ -345,7 +344,7 @@ Ttk_CreateImageElement(
const char *elementName,
int objc, Tcl_Obj *const objv[])
{
- static const char *optionStrings[] =
+ static const char *const optionStrings[] =
{ "-border","-height","-padding","-sticky","-width",NULL };
enum { O_BORDER, O_HEIGHT, O_PADDING, O_STICKY, O_WIDTH };
diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c
index dc6e994..63df71d 100644
--- a/generic/ttk/ttkInit.c
+++ b/generic/ttk/ttkInit.c
@@ -4,8 +4,7 @@
* Ttk package: initialization routine and miscellaneous utilities.
*/
-#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -62,7 +61,7 @@ int Ttk_GetOrientFromObj(
* Recognized values for the -state compatibility option.
* Other options are accepted and interpreted as synonyms for "normal".
*/
-static const char *ttkStateStrings[] = {
+static const char *const ttkStateStrings[] = {
"normal", "readonly", "disabled", "active", NULL
};
enum {
@@ -179,11 +178,11 @@ int TtkGetOptionValue(
Tk_OptionSpec ttkCoreOptionSpecs[] =
{
{TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", NULL,
- Tk_Offset(WidgetCore, cursorObj), -1, TK_OPTION_NULL_OK,0,0 },
+ offsetof(WidgetCore, cursorObj), -1, TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "-style", "style", "Style", "",
- Tk_Offset(WidgetCore,styleObj), -1, 0,0,STYLE_CHANGED},
+ offsetof(WidgetCore,styleObj), -1, 0,0,STYLE_CHANGED},
{TK_OPTION_STRING, "-class", "", "", NULL,
- Tk_Offset(WidgetCore,classObj), -1, 0,0,READONLY_OPTION},
+ offsetof(WidgetCore,classObj), -1, 0,0,READONLY_OPTION},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0}
};
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 3cebc14..2367f99 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -48,23 +48,23 @@ typedef struct {
*/
static Ttk_ElementOptionSpec TextElementOptions[] = {
{ "-text", TK_OPTION_STRING,
- Tk_Offset(TextElement,textObj), "" },
+ offsetof(TextElement,textObj), "" },
{ "-font", TK_OPTION_FONT,
- Tk_Offset(TextElement,fontObj), DEFAULT_FONT },
+ offsetof(TextElement,fontObj), DEFAULT_FONT },
{ "-foreground", TK_OPTION_COLOR,
- Tk_Offset(TextElement,foregroundObj), "black" },
+ offsetof(TextElement,foregroundObj), "black" },
{ "-underline", TK_OPTION_INT,
- Tk_Offset(TextElement,underlineObj), "-1"},
+ offsetof(TextElement,underlineObj), "-1"},
{ "-width", TK_OPTION_INT,
- Tk_Offset(TextElement,widthObj), "-1"},
+ offsetof(TextElement,widthObj), "-1"},
{ "-anchor", TK_OPTION_ANCHOR,
- Tk_Offset(TextElement,anchorObj), "w"},
+ offsetof(TextElement,anchorObj), "w"},
{ "-justify", TK_OPTION_JUSTIFY,
- Tk_Offset(TextElement,justifyObj), "left" },
+ offsetof(TextElement,justifyObj), "left" },
{ "-wraplength", TK_OPTION_PIXELS,
- Tk_Offset(TextElement,wrapLengthObj), "0" },
+ offsetof(TextElement,wrapLengthObj), "0" },
{ "-embossed", TK_OPTION_INT,
- Tk_Offset(TextElement,embossedObj), "0"},
+ offsetof(TextElement,embossedObj), "0"},
{ NULL, 0, 0, NULL }
};
@@ -138,7 +138,7 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b)
gcValues.foreground = WhitePixelOfScreen(Tk_Screen(tkwin));
gc2 = Tk_GetGC(tkwin, GCFont | GCForeground, &gcValues);
- /*
+ /*
* Place text according to -anchor:
*/
Tk_GetAnchorFromObj(NULL, text->anchorObj, &anchor);
@@ -248,11 +248,11 @@ typedef struct {
*/
static Ttk_ElementOptionSpec ImageElementOptions[] = {
{ "-image", TK_OPTION_STRING,
- Tk_Offset(ImageElement,imageObj), "" },
+ offsetof(ImageElement,imageObj), "" },
{ "-stipple", TK_OPTION_STRING, /* Really: TK_OPTION_BITMAP */
- Tk_Offset(ImageElement,stippleObj), "gray50" },
+ offsetof(ImageElement,stippleObj), "gray50" },
{ "-background", TK_OPTION_COLOR,
- Tk_Offset(ImageElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(ImageElement,backgroundObj), DEFAULT_BACKGROUND },
{ NULL, 0, 0, NULL }
};
@@ -341,15 +341,15 @@ static void ImageDraw(
Tk_RedrawImage(image->tkimg, 0,0, width, height, d, b.x, b.y);
- /* If we're disabled there's no state-specific 'disabled' image,
+ /* If we're disabled there's no state-specific 'disabled' image,
* stipple the image.
* @@@ Possibly: Don't do disabled-stippling at all;
* @@@ it's ugly and out of fashion.
- * Do not stipple at all under Aqua, just draw the image: it shows up
+ * Do not stipple at all under Aqua, just draw the image: it shows up
* as a white rectangle otherwise.
*/
-
+
if (state & TTK_STATE_DISABLED) {
if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
#ifndef MAC_OSX_TK
@@ -442,41 +442,41 @@ typedef struct {
static Ttk_ElementOptionSpec LabelElementOptions[] = {
{ "-compound", TK_OPTION_ANY,
- Tk_Offset(LabelElement,compoundObj), "none" },
+ offsetof(LabelElement,compoundObj), "none" },
{ "-space", TK_OPTION_PIXELS,
- Tk_Offset(LabelElement,spaceObj), "4" },
+ offsetof(LabelElement,spaceObj), "4" },
/* Text element part:
* NB: Keep in sync with TextElementOptions.
*/
{ "-text", TK_OPTION_STRING,
- Tk_Offset(LabelElement,text.textObj), "" },
+ offsetof(LabelElement,text.textObj), "" },
{ "-font", TK_OPTION_FONT,
- Tk_Offset(LabelElement,text.fontObj), DEFAULT_FONT },
+ offsetof(LabelElement,text.fontObj), DEFAULT_FONT },
{ "-foreground", TK_OPTION_COLOR,
- Tk_Offset(LabelElement,text.foregroundObj), "black" },
+ offsetof(LabelElement,text.foregroundObj), "black" },
{ "-underline", TK_OPTION_INT,
- Tk_Offset(LabelElement,text.underlineObj), "-1"},
+ offsetof(LabelElement,text.underlineObj), "-1"},
{ "-width", TK_OPTION_INT,
- Tk_Offset(LabelElement,text.widthObj), ""},
+ offsetof(LabelElement,text.widthObj), ""},
{ "-anchor", TK_OPTION_ANCHOR,
- Tk_Offset(LabelElement,text.anchorObj), "w"},
+ offsetof(LabelElement,text.anchorObj), "w"},
{ "-justify", TK_OPTION_JUSTIFY,
- Tk_Offset(LabelElement,text.justifyObj), "left" },
+ offsetof(LabelElement,text.justifyObj), "left" },
{ "-wraplength", TK_OPTION_PIXELS,
- Tk_Offset(LabelElement,text.wrapLengthObj), "0" },
+ offsetof(LabelElement,text.wrapLengthObj), "0" },
{ "-embossed", TK_OPTION_INT,
- Tk_Offset(LabelElement,text.embossedObj), "0"},
+ offsetof(LabelElement,text.embossedObj), "0"},
/* Image element part:
* NB: Keep in sync with ImageElementOptions.
*/
{ "-image", TK_OPTION_STRING,
- Tk_Offset(LabelElement,image.imageObj), "" },
+ offsetof(LabelElement,image.imageObj), "" },
{ "-stipple", TK_OPTION_STRING, /* Really: TK_OPTION_BITMAP */
- Tk_Offset(LabelElement,image.stippleObj), "gray50" },
+ offsetof(LabelElement,image.stippleObj), "gray50" },
{ "-background", TK_OPTION_COLOR,
- Tk_Offset(LabelElement,image.backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(LabelElement,image.backgroundObj), DEFAULT_BACKGROUND },
{ NULL, 0, 0, NULL }
};
@@ -576,7 +576,7 @@ static void LabelElementSize(
if (label->compound != TTK_COMPOUND_IMAGE)
textReqWidth = TextReqWidth(&label->text);
- switch (label->compound)
+ switch (label->compound)
{
case TTK_COMPOUND_TEXT:
*widthPtr = textReqWidth;
@@ -587,11 +587,11 @@ static void LabelElementSize(
case TTK_COMPOUND_TOP:
case TTK_COMPOUND_BOTTOM:
case TTK_COMPOUND_CENTER:
- *widthPtr = MAX(label->image.width, textReqWidth);
+ *widthPtr = MAX(label->image.width, textReqWidth);
break;
case TTK_COMPOUND_LEFT:
case TTK_COMPOUND_RIGHT:
- *widthPtr = label->image.width + textReqWidth + label->space;
+ *widthPtr = label->image.width + textReqWidth + label->space;
break;
case TTK_COMPOUND_NONE:
break; /* Can't happen */
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index 2512c4b..795ffb5 100644
--- a/generic/ttk/ttkLayout.c
+++ b/generic/ttk/ttkLayout.c
@@ -6,7 +6,6 @@
* Copyright (c) 2003 Joe English. Freely redistributable.
*/
-#include <string.h>
#include "tkInt.h"
#include "ttkThemeInt.h"
@@ -604,13 +603,13 @@ Ttk_InstantiateLayout(Ttk_Theme theme, Ttk_TemplateNode *op)
*/
/* NB: This must match bit definitions TTK_PACK_LEFT etc. */
-static const char *packSideStrings[] =
+static const char *const packSideStrings[] =
{ "left", "right", "top", "bottom", NULL };
Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr)
{
enum { OP_SIDE, OP_STICKY, OP_EXPAND, OP_BORDER, OP_UNIT, OP_CHILDREN };
- static const char *optStrings[] = {
+ static const char *const optStrings[] = {
"-side", "-sticky", "-expand", "-border", "-unit", "-children", 0 };
int i = 0, objc;
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c
index 24a0fb1..bf93699 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -4,8 +4,7 @@
* Support routines for geometry managers.
*/
-#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkManager.h"
/*------------------------------------------------------------------------
@@ -320,7 +319,7 @@ void Ttk_GeometryRequestProc(ClientData clientData, Tk_Window slaveWindow)
int reqHeight= Tk_ReqHeight(slaveWindow);
if (mgr->managerSpec->SlaveRequest(
- mgr->managerData, slaveIndex, reqWidth, reqHeight))
+ mgr->managerData, slaveIndex, reqWidth, reqHeight))
{
ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED);
}
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h
index d22ff98..07fcea1 100644
--- a/generic/ttk/ttkManager.h
+++ b/generic/ttk/ttkManager.h
@@ -22,7 +22,7 @@ typedef struct TtkManager_ Ttk_Manager;
* SlaveRemoved() is called immediately before a slave is removed.
* NB: the associated slave window may have been destroyed when this
* routine is called.
- *
+ *
* SlaveRequest() is called when a slave requests a size change.
* It should return 1 if the request should propagate, 0 otherwise.
*/
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 39ed6aa..e167374 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -2,11 +2,7 @@
* Copyright (c) 2004, Joe English
*/
-#include <string.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
#include "ttkManager.h"
@@ -62,26 +58,26 @@ typedef struct
static Tk_OptionSpec TabOptionSpecs[] =
{
{TK_OPTION_STRING_TABLE, "-state", "", "",
- "normal", -1,Tk_Offset(Tab,state),
+ "normal", -1, offsetof(Tab,state),
0,(ClientData)TabStateStrings,0 },
{TK_OPTION_STRING, "-text", "text", "Text", "",
- Tk_Offset(Tab,textObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,textObj), -1, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-image", "image", "Image", NULL/*default*/,
- Tk_Offset(Tab,imageObj), -1, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
+ offsetof(Tab,imageObj), -1, TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING_TABLE, "-compound", "compound", "Compound",
- NULL, Tk_Offset(Tab,compoundObj), -1,
+ NULL, offsetof(Tab,compoundObj), -1,
TK_OPTION_NULL_OK,(ClientData)ttkCompoundStrings,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-underline", "underline", "Underline", "-1",
- Tk_Offset(Tab,underlineObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,underlineObj), -1, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }
};
static Tk_OptionSpec PaneOptionSpecs[] =
{
{TK_OPTION_STRING, "-padding", "padding", "Padding", "0",
- Tk_Offset(Tab,paddingObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,paddingObj), -1, 0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-sticky", "sticky", "Sticky", "nsew",
- Tk_Offset(Tab,stickyObj), -1, 0,0,GEOMETRY_CHANGED },
+ offsetof(Tab,stickyObj), -1, 0,0,GEOMETRY_CHANGED },
WIDGET_INHERIT_OPTIONS(TabOptionSpecs)
};
@@ -114,13 +110,13 @@ typedef struct
static Tk_OptionSpec NotebookOptionSpecs[] =
{
{TK_OPTION_INT, "-width", "width", "Width", "0",
- Tk_Offset(Notebook,notebook.widthObj),-1,
+ offsetof(Notebook,notebook.widthObj),-1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-height", "height", "Height", "0",
- Tk_Offset(Notebook,notebook.heightObj),-1,
+ offsetof(Notebook,notebook.heightObj),-1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-padding", "padding", "Padding", NULL,
- Tk_Offset(Notebook,notebook.paddingObj),-1,
+ offsetof(Notebook,notebook.paddingObj),-1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_TRUE,
@@ -221,7 +217,7 @@ static int ConfigureTab(
Tk_SavedOptions savedOptions;
int mask = 0;
- if (Tk_SetOptions(interp, (ClientData)tab, nb->notebook.paneOptionTable,
+ if (Tk_SetOptions(interp, tab, nb->notebook.paneOptionTable,
objc, objv, slaveWindow, &savedOptions, &mask) != TCL_OK)
{
return TCL_ERROR;
@@ -1053,7 +1049,7 @@ static int NotebookHideCommand(
static int NotebookIdentifyCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
- static const char *whatTable[] = { "element", "tab", NULL };
+ static const char *const whatTable[] = { "element", "tab", NULL };
enum { IDENTIFY_ELEMENT, IDENTIFY_TAB };
int what = IDENTIFY_ELEMENT;
Notebook *nb = recordPtr;
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index adc2aef..1b6ff3d 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -6,8 +6,7 @@
* TODO: track active/pressed sash.
*/
-#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkManager.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -77,13 +76,13 @@ typedef struct {
*/
static Tk_OptionSpec PanedOptionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "vertical",
- Tk_Offset(Paned,paned.orientObj), Tk_Offset(Paned,paned.orient),
+ offsetof(Paned,paned.orientObj), offsetof(Paned,paned.orient),
0,(ClientData)ttkOrientStrings,READONLY_OPTION|STYLE_CHANGED },
{TK_OPTION_INT, "-width", "width", "Width", "0",
- -1,Tk_Offset(Paned,paned.width),
+ -1, offsetof(Paned,paned.width),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-height", "height", "Height", "0",
- -1,Tk_Offset(Paned,paned.height),
+ -1, offsetof(Paned,paned.height),
0,0,GEOMETRY_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
@@ -101,7 +100,7 @@ typedef struct {
static Tk_OptionSpec PaneOptionSpecs[] = {
{TK_OPTION_INT, "-weight", "weight", "Weight", "0",
- -1,Tk_Offset(Pane,weight), 0,0,GEOMETRY_CHANGED },
+ -1, offsetof(Pane,weight), 0,0,GEOMETRY_CHANGED },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
};
@@ -148,7 +147,7 @@ static int ConfigurePane(
Tk_SavedOptions savedOptions;
int mask = 0;
- if (Tk_SetOptions(interp, (void*)pane, pw->paned.paneOptionTable,
+ if (Tk_SetOptions(interp, pane, pw->paned.paneOptionTable,
objc, objv, slaveWindow, &savedOptions, &mask) != TCL_OK)
{
return TCL_ERROR;
@@ -715,7 +714,7 @@ static int PanedForgetCommand(
static int PanedIdentifyCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
- static const char *whatTable[] = { "element", "sash", NULL };
+ static const char *const whatTable[] = { "element", "sash", NULL };
enum { IDENTIFY_ELEMENT, IDENTIFY_SASH };
int what = IDENTIFY_SASH;
Paned *pw = recordPtr;
@@ -923,7 +922,7 @@ typedef struct {
static Ttk_ElementOptionSpec SashElementOptions[] = {
{ "-sashthickness", TK_OPTION_INT,
- Tk_Offset(SashElement,thicknessObj), "5" },
+ offsetof(SashElement,thicknessObj), "5" },
{ NULL, 0, 0, NULL }
};
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 6c13992..f1dbb2f 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -4,9 +4,7 @@
* ttk::progressbar widget.
*/
-#include <math.h>
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -23,13 +21,19 @@ static const char *const ProgressbarModeStrings[] = {
};
typedef struct {
- Tcl_Obj *orientObj;
+ Tcl_Obj *anchorObj;
+ Tcl_Obj *fontObj;
+ Tcl_Obj *foregroundObj;
+ Tcl_Obj *justifyObj;
Tcl_Obj *lengthObj;
- Tcl_Obj *modeObj;
- Tcl_Obj *variableObj;
Tcl_Obj *maximumObj;
- Tcl_Obj *valueObj;
+ Tcl_Obj *modeObj;
+ Tcl_Obj *orientObj;
Tcl_Obj *phaseObj;
+ Tcl_Obj *textObj;
+ Tcl_Obj *valueObj;
+ Tcl_Obj *variableObj;
+ Tcl_Obj *wrapLengthObj;
int mode;
Ttk_TraceHandle *variableTrace; /* Trace handle for -variable option */
@@ -46,28 +50,46 @@ typedef struct {
static Tk_OptionSpec ProgressbarOptionSpecs[] =
{
- {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
- "horizontal", Tk_Offset(Progressbar,progress.orientObj), -1,
- 0, (ClientData)ttkOrientStrings, STYLE_CHANGED },
+ {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
+ "w", offsetof(Progressbar,progress.anchorObj), -1,
+ TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED},
+ {TK_OPTION_FONT, "-font", "font", "Font",
+ DEFAULT_FONT, offsetof(Progressbar,progress.fontObj), -1,
+ TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
+ {TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
+ "black", offsetof(Progressbar,progress.foregroundObj), -1,
+ TK_OPTION_NULL_OK,0,0 },
+ {TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
+ "left", offsetof(Progressbar,progress.justifyObj), -1,
+ TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_PROGRESSBAR_LENGTH, Tk_Offset(Progressbar,progress.lengthObj), -1,
+ DEF_PROGRESSBAR_LENGTH, offsetof(Progressbar,progress.lengthObj), -1,
0, 0, GEOMETRY_CHANGED },
+ {TK_OPTION_DOUBLE, "-maximum", "maximum", "Maximum",
+ "100", offsetof(Progressbar,progress.maximumObj), -1,
+ 0, 0, 0 },
{TK_OPTION_STRING_TABLE, "-mode", "mode", "ProgressMode", "determinate",
- Tk_Offset(Progressbar,progress.modeObj),
- Tk_Offset(Progressbar,progress.mode),
+ offsetof(Progressbar,progress.modeObj),
+ offsetof(Progressbar,progress.mode),
0, (ClientData)ProgressbarModeStrings, 0 },
- {TK_OPTION_DOUBLE, "-maximum", "maximum", "Maximum",
- "100", Tk_Offset(Progressbar,progress.maximumObj), -1,
+ {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient",
+ "horizontal", offsetof(Progressbar,progress.orientObj), -1,
+ 0, (ClientData)ttkOrientStrings, STYLE_CHANGED },
+ {TK_OPTION_INT, "-phase", "phase", "Phase",
+ "0", offsetof(Progressbar,progress.phaseObj), -1,
0, 0, 0 },
- {TK_OPTION_STRING, "-variable", "variable", "Variable",
- NULL, Tk_Offset(Progressbar,progress.variableObj), -1,
- TK_OPTION_NULL_OK, 0, 0 },
+ {TK_OPTION_STRING, "-text", "text", "Text", "",
+ offsetof(Progressbar,progress.textObj), -1,
+ 0,0,GEOMETRY_CHANGED },
{TK_OPTION_DOUBLE, "-value", "value", "Value",
- "0.0", Tk_Offset(Progressbar,progress.valueObj), -1,
- 0, 0, 0 },
- {TK_OPTION_INT, "-phase", "phase", "Phase",
- "0", Tk_Offset(Progressbar,progress.phaseObj), -1,
+ "0.0", offsetof(Progressbar,progress.valueObj), -1,
0, 0, 0 },
+ {TK_OPTION_STRING, "-variable", "variable", "Variable",
+ NULL, offsetof(Progressbar,progress.variableObj), -1,
+ TK_OPTION_NULL_OK, 0, 0 },
+ {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength",
+ "0", offsetof(Progressbar, progress.wrapLengthObj), -1,
+ TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_FALSE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
@@ -137,7 +159,7 @@ static void CheckAnimation(Progressbar *pb)
if (AnimationEnabled(pb)) {
if (pb->progress.timer == 0) {
pb->progress.timer = Tcl_CreateTimerHandler(
- pb->progress.period, AnimateProgressProc, (ClientData)pb);
+ pb->progress.period, AnimateProgressProc, pb);
}
} else {
if (pb->progress.timer != 0) {
@@ -398,7 +420,7 @@ static int ProgressbarStepCommand(
{
Progressbar *pb = recordPtr;
double value = 0.0, stepAmount = 1.0;
- Tcl_Obj *newValueObj;
+ Tcl_Obj *newValueObj;
if (objc == 3) {
if (Tcl_GetDoubleFromObj(interp, objv[2], &stepAmount) != TCL_OK) {
@@ -425,7 +447,7 @@ static int ProgressbarStepCommand(
TtkRedisplayWidget(&pb->core);
- /* Update value by setting the linked -variable, if there is one:
+ /* Update value by setting the linked -variable, if there is one:
*/
if (pb->progress.variableTrace) {
int result = Tcl_ObjSetVar2(
@@ -446,7 +468,7 @@ static int ProgressbarStepCommand(
}
/* $sb start|stop ?args? --
- * Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
+ * Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
* and pass to interpreter.
*/
static int ProgressbarStartStopCommand(
@@ -524,7 +546,8 @@ TTK_END_LAYOUT
TTK_BEGIN_LAYOUT(HorizontalProgressbarLayout)
TTK_GROUP("Horizontal.Progressbar.trough", TTK_FILL_BOTH,
- TTK_NODE("Horizontal.Progressbar.pbar", TTK_PACK_LEFT|TTK_FILL_Y))
+ TTK_NODE("Horizontal.Progressbar.pbar", TTK_PACK_LEFT|TTK_FILL_Y)
+ TTK_NODE("Horizontal.Progressbar.text", TTK_PACK_LEFT))
TTK_END_LAYOUT
/*
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 279fc7a..0e20621 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -4,9 +4,7 @@
* ttk::scale widget.
*/
-#include <tk.h>
-#include <string.h>
-#include <stdio.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -55,28 +53,28 @@ typedef struct
static Tk_OptionSpec ScaleOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- Tk_Offset(Scale,scale.commandObj), -1,
+ offsetof(Scale,scale.commandObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
- Tk_Offset(Scale,scale.variableObj), -1,
+ offsetof(Scale,scale.variableObj), -1,
0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
- Tk_Offset(Scale,scale.orientObj),
- Tk_Offset(Scale,scale.orient), 0,
+ offsetof(Scale,scale.orientObj),
+ offsetof(Scale,scale.orient), 0,
(ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
- Tk_Offset(Scale,scale.fromObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.fromObj), -1, 0, 0, 0},
{TK_OPTION_DOUBLE, "-to", "to", "To", "1.0",
- Tk_Offset(Scale,scale.toObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.toObj), -1, 0, 0, 0},
{TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
- Tk_Offset(Scale,scale.valueObj), -1, 0, 0, 0},
+ offsetof(Scale,scale.valueObj), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_SCALE_LENGTH, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
+ DEF_SCALE_LENGTH, offsetof(Scale,scale.lengthObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-state", "state", "State",
- "normal", Tk_Offset(Scale,scale.stateObj), -1,
+ "normal", offsetof(Scale,scale.stateObj), -1,
0,0,STATE_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -89,7 +87,7 @@ static double PointToValue(Scale *scalePtr, int x, int y);
/* ScaleVariableChanged --
* Variable trace procedure for scale -variable;
* Updates the scale's value.
- * If the linked variable is not a valid double,
+ * If the linked variable is not a valid double,
* sets the 'invalid' state.
*/
static void ScaleVariableChanged(void *recordPtr, const char *value)
@@ -189,7 +187,7 @@ static int ScalePostConfigure(
/* ScaleGetLayout --
* getLayout hook.
*/
-static Ttk_Layout
+static Ttk_Layout
ScaleGetLayout(Tcl_Interp *interp, Ttk_Theme theme, void *recordPtr)
{
Scale *scalePtr = recordPtr;
@@ -253,7 +251,7 @@ static double ScaleFraction(Scale *scalePtr, double value)
}
/* $scale get ?x y? --
- * Returns the current value of the scale widget, or if $x and
+ * Returns the current value of the scale widget, or if $x and
* $y are specified, the value represented by point @x,y.
*/
static int
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 5b0c212..2825c54 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -4,8 +4,7 @@
* ttk::scrollbar widget.
*/
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -22,7 +21,7 @@ typedef struct
double first; /* top fraction */
double last; /* bottom fraction */
- Ttk_Box troughBox; /* trough parcel */
+ Ttk_Box troughBox; /* trough parcel */
int minSize; /* minimum size of thumb */
} ScrollbarPart;
@@ -35,11 +34,11 @@ typedef struct
static Tk_OptionSpec ScrollbarOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- Tk_Offset(Scrollbar,scrollbar.commandObj), -1, 0,0,0},
+ offsetof(Scrollbar,scrollbar.commandObj), -1, 0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "vertical",
- Tk_Offset(Scrollbar,scrollbar.orientObj),
- Tk_Offset(Scrollbar,scrollbar.orient),
+ offsetof(Scrollbar,scrollbar.orientObj),
+ offsetof(Scrollbar,scrollbar.orient),
0,(ClientData)ttkOrientStrings,STYLE_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
@@ -50,7 +49,7 @@ static Tk_OptionSpec ScrollbarOptionSpecs[] =
* +++ Widget hooks.
*/
-static void
+static void
ScrollbarInitialize(Tcl_Interp *interp, void *recordPtr)
{
Scrollbar *sb = recordPtr;
@@ -241,7 +240,7 @@ ScrollbarDeltaCommand(
/* $sb fraction $x $y --
* Returns a real number between 0 and 1 indicating where the
- * point given by x and y lies in the trough area of the scrollbar.
+ * point given by x and y lies in the trough area of the scrollbar.
*/
static int
ScrollbarFractionCommand(
diff --git a/generic/ttk/ttkSeparator.c b/generic/ttk/ttkSeparator.c
index b52e6f4..f7bacdc 100644
--- a/generic/ttk/ttkSeparator.c
+++ b/generic/ttk/ttkSeparator.c
@@ -4,8 +4,7 @@
* ttk::separator and ttk::sizegrip widgets.
*/
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -25,8 +24,8 @@ typedef struct
static Tk_OptionSpec SeparatorOptionSpecs[] = {
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
- Tk_Offset(Separator,separator.orientObj),
- Tk_Offset(Separator,separator.orient),
+ offsetof(Separator,separator.orientObj),
+ offsetof(Separator,separator.orient),
0,(ClientData)ttkOrientStrings,STYLE_CHANGED },
WIDGET_TAKEFOCUS_FALSE,
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index d002f2f..b82faa2 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -3,7 +3,7 @@
* Minimal sample ttk widget.
*/
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -51,29 +51,29 @@ typedef struct
static Tk_OptionSpec SquareOptionSpecs[] =
{
{TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
- DEFAULT_BORDERWIDTH, Tk_Offset(Square,square.borderWidthObj), -1,
+ DEFAULT_BORDERWIDTH, offsetof(Square,square.borderWidthObj), -1,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
- DEFAULT_BACKGROUND, Tk_Offset(Square,square.foregroundObj),
+ DEFAULT_BACKGROUND, offsetof(Square,square.foregroundObj),
-1, 0, 0, 0},
-
+
{TK_OPTION_PIXELS, "-width", "width", "Width",
- "50", Tk_Offset(Square,square.widthObj), -1, 0, 0,
+ "50", offsetof(Square,square.widthObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_PIXELS, "-height", "height", "Height",
- "50", Tk_Offset(Square,square.heightObj), -1, 0, 0,
+ "50", offsetof(Square,square.heightObj), -1, 0, 0,
GEOMETRY_CHANGED},
-
+
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- Tk_Offset(Square,square.paddingObj), -1,
+ offsetof(Square,square.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
-
+
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
- NULL, Tk_Offset(Square,square.reliefObj), -1, TK_OPTION_NULL_OK, 0, 0},
-
+ NULL, offsetof(Square,square.reliefObj), -1, TK_OPTION_NULL_OK, 0, 0},
+
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, Tk_Offset(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
-
+ NULL, offsetof(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
+
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
@@ -138,7 +138,7 @@ static const Ttk_Ensemble SquareCommands[] = {
};
/*
- * The Widget specification structure holds all the implementation
+ * The Widget specification structure holds all the implementation
* information about this widget and this is what must be registered
* with Tk in the package initialization code (see bottom).
*/
@@ -159,7 +159,7 @@ static WidgetSpec SquareWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
-/* ----------------------------------------------------------------------
+/* ----------------------------------------------------------------------
* Square element
*
* In this section we demonstrate what is required to create a new themed
@@ -176,18 +176,18 @@ typedef struct
Tcl_Obj *heightObj;
} SquareElement;
-static Ttk_ElementOptionSpec SquareElementOptions[] =
+static Ttk_ElementOptionSpec SquareElementOptions[] =
{
- { "-background", TK_OPTION_BORDER, Tk_Offset(SquareElement,borderObj),
+ { "-background", TK_OPTION_BORDER, offsetof(SquareElement,borderObj),
DEFAULT_BACKGROUND },
- { "-foreground", TK_OPTION_BORDER, Tk_Offset(SquareElement,foregroundObj),
+ { "-foreground", TK_OPTION_BORDER, offsetof(SquareElement,foregroundObj),
DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS, Tk_Offset(SquareElement,borderWidthObj),
+ { "-borderwidth", TK_OPTION_PIXELS, offsetof(SquareElement,borderWidthObj),
DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF, Tk_Offset(SquareElement,reliefObj),
+ { "-relief", TK_OPTION_RELIEF, offsetof(SquareElement,reliefObj),
"raised" },
- { "-width", TK_OPTION_PIXELS, Tk_Offset(SquareElement,widthObj), "20"},
- { "-height", TK_OPTION_PIXELS, Tk_Offset(SquareElement,heightObj), "20"},
+ { "-width", TK_OPTION_PIXELS, offsetof(SquareElement,widthObj), "20"},
+ { "-height", TK_OPTION_PIXELS, offsetof(SquareElement,heightObj), "20"},
{ NULL, 0, 0, NULL }
};
@@ -248,7 +248,7 @@ static Ttk_ElementSpec SquareElementSpec =
* engine is similar to the Tk pack geometry manager. Read the documentation
* for the details. In this example we just need to have the square element
* that has been defined for this widget placed on a background. We will
- * also need some padding to keep it away from the edges.
+ * also need some padding to keep it away from the edges.
*/
TTK_BEGIN_LAYOUT(SquareLayout)
@@ -257,12 +257,12 @@ TTK_BEGIN_LAYOUT(SquareLayout)
TTK_NODE("Square.square", 0))
TTK_END_LAYOUT
-/* ----------------------------------------------------------------------
+/* ----------------------------------------------------------------------
*
* Widget initialization.
*
* This file defines a new element and a new widget. We need to register
- * the element with the themes that will need it. In this case we will
+ * the element with the themes that will need it. In this case we will
* register with the default theme that is the root of the theme inheritance
* tree. This means all themes will find this element.
* We then need to register the widget class style. This is the layout
@@ -287,10 +287,10 @@ TtkSquareWidget_Init(Tcl_Interp *interp)
/* register the new elements for this theme engine */
Ttk_RegisterElement(interp, theme, "square", &SquareElementSpec, NULL);
-
+
/* register the layout for this theme */
Ttk_RegisterLayout(theme, "TSquare", SquareLayout);
-
+
/* register the widget */
RegisterWidget(interp, "ttk::square", &SquareWidgetSpec);
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index 5b62f3c..9e5cf4b 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -5,9 +5,7 @@
*
*/
-#include <string.h>
-
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
/*
diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c
index 2c07b9d..c17f1e9 100644
--- a/generic/ttk/ttkStubLib.c
+++ b/generic/ttk/ttkStubLib.c
@@ -67,7 +67,7 @@ error:
"Error loading ", packageName, " package",
" (requested version '", version,
"', loaded version '", actualVersion, "'): ",
- errMsg,
+ errMsg,
NULL);
return NULL;
}
diff --git a/generic/ttk/ttkTagSet.c b/generic/ttk/ttkTagSet.c
index f2108b9..f0354d8 100644
--- a/generic/ttk/ttkTagSet.c
+++ b/generic/ttk/ttkTagSet.c
@@ -4,10 +4,7 @@
* Copyright (C) 2005, Joe English. Freely redistributable.
*/
-#include <string.h> /* for memset() */
-#include <tcl.h>
-#include <tk.h>
-
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -188,7 +185,7 @@ int Ttk_TagSetAdd(Ttk_TagSet tagset, Ttk_Tag tag)
return 0;
}
}
- tagset->tags = ckrealloc(tagset->tags,
+ tagset->tags = ckrealloc(tagset->tags,
(tagset->nTags+1)*sizeof(tagset->tags[0]));
tagset->tags[tagset->nTags++] = tag;
return 1;
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index cc75238..9cb1b92 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -15,13 +15,6 @@
#define PKG_ASSOC_KEY "Ttk"
-#ifdef MAC_OSX_TK
- extern void TkMacOSXFlushWindows(void);
- #define UPDATE_WINDOWS() TkMacOSXFlushWindows()
-#else
- #define UPDATE_WINDOWS()
-#endif
-
/*------------------------------------------------------------------------
* +++ Styles.
*
@@ -149,7 +142,7 @@ static const Tk_OptionSpec *TTKGetOptionSpec(
/* Make sure widget option has a Tcl_Obj* entry:
*/
- if (optionSpec->objOffset < 0) {
+ if (optionSpec->objOffset == TCL_AUTO_LENGTH) {
return 0;
}
@@ -517,7 +510,9 @@ static void ThemeChangedProc(ClientData clientData)
Tcl_BackgroundException(pkgPtr->interp, code);
}
pkgPtr->themeChangePending = 0;
- UPDATE_WINDOWS();
+#ifdef MAC_OSX_TK
+ XSync(NULL, False);
+#endif
}
/*
@@ -978,12 +973,12 @@ static
int InitializeElementRecord(
Ttk_ElementClass *eclass, /* Element instance to initialize */
Ttk_Style style, /* Style table */
- char *widgetRecord, /* Source of widget option values */
+ void *widgetRecord, /* Source of widget option values */
Tk_OptionTable optionTable, /* Option table describing widget record */
Tk_Window tkwin, /* Corresponding window */
Ttk_State state) /* Widget or element state */
{
- char *elementRecord = eclass->elementRecord;
+ void *elementRecord = eclass->elementRecord;
OptionMap optionMap = GetOptionMap(eclass,optionTable);
int nResources = eclass->nResources;
Ttk_ResourceCache cache = style->cache;
@@ -992,7 +987,7 @@ int InitializeElementRecord(
int i;
for (i=0; i<nResources; ++i, ++elementOption) {
Tcl_Obj **dest = (Tcl_Obj **)
- (elementRecord + elementOption->offset);
+ ((char *)elementRecord + elementOption->offset);
const char *optionName = elementOption->optionName;
Tcl_Obj *dynamicSetting = Ttk_StyleMap(style, optionName, state);
Tcl_Obj *widgetValue = 0;
@@ -1000,7 +995,7 @@ int InitializeElementRecord(
if (optionMap[i]) {
widgetValue = *(Tcl_Obj **)
- (widgetRecord + optionMap[i]->objOffset);
+ ((char *)widgetRecord + optionMap[i]->objOffset);
}
if (widgetValue) {
@@ -1072,7 +1067,7 @@ void
Ttk_ElementSize(
Ttk_ElementClass *eclass, /* Element to query */
Ttk_Style style, /* Style settings */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_OptionTable optionTable, /* Description of widget record */
Tk_Window tkwin, /* The widget window. */
Ttk_State state, /* Current widget state */
@@ -1102,7 +1097,7 @@ void
Ttk_DrawElement(
Ttk_ElementClass *eclass, /* Element instance */
Ttk_Style style, /* Style settings */
- char *recordPtr, /* The widget record. */
+ void *recordPtr, /* The widget record. */
Tk_OptionTable optionTable, /* Description of option table */
Tk_Window tkwin, /* The widget window. */
Drawable d, /* Where to draw element. */
@@ -1382,7 +1377,7 @@ static int StyleThemeCreateCmd(
ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
StylePackageData *pkgPtr = clientData;
- static const char *optStrings[] =
+ static const char *const optStrings[] =
{ "-parent", "-settings", NULL };
enum { OP_PARENT, OP_SETTINGS };
Ttk_Theme parentTheme = pkgPtr->defaultTheme, newTheme;
diff --git a/generic/ttk/ttkTheme.h b/generic/ttk/ttkTheme.h
index cf0a07c..e067337 100644
--- a/generic/ttk/ttkTheme.h
+++ b/generic/ttk/ttkTheme.h
@@ -238,11 +238,19 @@ typedef void (Ttk_ElementSizeProc)(void *clientData, void *elementRecord,
typedef void (Ttk_ElementDrawProc)(void *clientData, void *elementRecord,
Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state);
+#ifndef TkSizeT
+# if TCL_MAJOR_VERSION > 8
+# define TkSizeT size_t
+# else
+# define TkSizeT int
+# endif
+#endif
+
typedef struct Ttk_ElementOptionSpec
{
const char *optionName; /* Command-line name of the widget option */
Tk_OptionType type; /* Accepted option types */
- int offset; /* Offset of Tcl_Obj* field in element record */
+ TkSizeT offset; /* Offset of Tcl_Obj* field in element record */
const char *defaultValue; /* Default value to used if resource missing */
} Ttk_ElementOptionSpec;
diff --git a/generic/ttk/ttkThemeInt.h b/generic/ttk/ttkThemeInt.h
index 3aaada8..25a5fdf 100644
--- a/generic/ttk/ttkThemeInt.h
+++ b/generic/ttk/ttkThemeInt.h
@@ -15,11 +15,11 @@ MODULE_SCOPE Ttk_ElementClass *Ttk_GetElement(Ttk_Theme, const char *name);
MODULE_SCOPE const char *Ttk_ElementClassName(Ttk_ElementClass *);
MODULE_SCOPE void Ttk_ElementSize(
- Ttk_ElementClass *, Ttk_Style, char *recordPtr, Tk_OptionTable,
+ Ttk_ElementClass *, Ttk_Style, void *recordPtr, Tk_OptionTable,
Tk_Window tkwin, Ttk_State state,
int *widthPtr, int *heightPtr, Ttk_Padding*);
MODULE_SCOPE void Ttk_DrawElement(
- Ttk_ElementClass *, Ttk_Style, char *recordPtr, Tk_OptionTable,
+ Ttk_ElementClass *, Ttk_Style, void *recordPtr, Tk_OptionTable,
Tk_Window tkwin, Drawable d, Ttk_Box b, Ttk_State state);
MODULE_SCOPE Tcl_Obj *Ttk_QueryStyle(
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c
index 7c4345d..f7cdf43 100644
--- a/generic/ttk/ttkTrace.c
+++ b/generic/ttk/ttkTrace.c
@@ -3,11 +3,11 @@
*
* Simplified interface to Tcl_TraceVariable.
*
- * PROBLEM: Can't distinguish "variable does not exist" (which is OK)
+ * PROBLEM: Can't distinguish "variable does not exist" (which is OK)
* from other errors (which are not).
*/
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
diff --git a/generic/ttk/ttkTrack.c b/generic/ttk/ttkTrack.c
index 396b073..fa2a7e0 100644
--- a/generic/ttk/ttkTrack.c
+++ b/generic/ttk/ttkTrack.c
@@ -23,7 +23,7 @@
* TODO: Handle "chords" properly (e.g., <B1-ButtonPress-2>)
*/
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index ccc5e2e..a11389b 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -4,8 +4,6 @@
* ttk::treeview widget implementation.
*/
-#include <string.h>
-#include <stdio.h>
#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -63,19 +61,19 @@ struct TreeItemRec {
static Tk_OptionSpec ItemOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- "", Tk_Offset(TreeItem,textObj), -1,
+ "", offsetof(TreeItem,textObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- NULL, Tk_Offset(TreeItem,imageObj), -1,
+ NULL, offsetof(TreeItem,imageObj), -1,
TK_OPTION_NULL_OK,0,ITEM_OPTION_IMAGE_CHANGED },
{TK_OPTION_STRING, "-values", "values", "Values",
- NULL, Tk_Offset(TreeItem,valuesObj), -1,
+ NULL, offsetof(TreeItem,valuesObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_BOOLEAN, "-open", "open", "Open",
- "0", Tk_Offset(TreeItem,openObj), -1,
+ "0", offsetof(TreeItem,openObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-tags", "tags", "Tags",
- NULL, Tk_Offset(TreeItem,tagsObj), -1,
+ NULL, offsetof(TreeItem,tagsObj), -1,
TK_OPTION_NULL_OK,0,ITEM_OPTION_TAGS_CHANGED },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
@@ -191,22 +189,22 @@ typedef struct {
static Tk_OptionSpec TagOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- NULL, Tk_Offset(DisplayItem,textObj), -1,
+ NULL, offsetof(DisplayItem,textObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- NULL, Tk_Offset(DisplayItem,imageObj), -1,
+ NULL, offsetof(DisplayItem,imageObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- NULL, Tk_Offset(DisplayItem,anchorObj), -1,
+ NULL, offsetof(DisplayItem,anchorObj), -1,
TK_OPTION_NULL_OK, 0, GEOMETRY_CHANGED}, /* <<NOTE-ANCHOR>> */
{TK_OPTION_COLOR, "-background", "windowColor", "WindowColor",
- NULL, Tk_Offset(DisplayItem,backgroundObj), -1,
+ NULL, offsetof(DisplayItem,backgroundObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_COLOR, "-foreground", "textColor", "TextColor",
- NULL, Tk_Offset(DisplayItem,foregroundObj), -1,
+ NULL, offsetof(DisplayItem,foregroundObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_FONT, "-font", "font", "Font",
- NULL, Tk_Offset(DisplayItem,fontObj), -1,
+ NULL, offsetof(DisplayItem,fontObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
@@ -275,38 +273,38 @@ static void FreeColumn(TreeColumn *column)
static Tk_OptionSpec ColumnOptionSpecs[] = {
{TK_OPTION_INT, "-width", "width", "Width",
- DEF_COLWIDTH, -1, Tk_Offset(TreeColumn,width),
+ DEF_COLWIDTH, -1, offsetof(TreeColumn,width),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INT, "-minwidth", "minWidth", "MinWidth",
- DEF_MINWIDTH, -1, Tk_Offset(TreeColumn,minWidth),
+ DEF_MINWIDTH, -1, offsetof(TreeColumn,minWidth),
0,0,0 },
{TK_OPTION_BOOLEAN, "-stretch", "stretch", "Stretch",
- "1", -1, Tk_Offset(TreeColumn,stretch),
+ "1", -1, offsetof(TreeColumn,stretch),
0,0,GEOMETRY_CHANGED },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- "w", Tk_Offset(TreeColumn,anchorObj), -1, /* <<NOTE-ANCHOR>> */
+ "w", offsetof(TreeColumn,anchorObj), -1, /* <<NOTE-ANCHOR>> */
0,0,0 },
{TK_OPTION_STRING, "-id", "id", "ID",
- NULL, Tk_Offset(TreeColumn,idObj), -1,
+ NULL, offsetof(TreeColumn,idObj), -1,
TK_OPTION_NULL_OK,0,READONLY_OPTION },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
};
static Tk_OptionSpec HeadingOptionSpecs[] = {
{TK_OPTION_STRING, "-text", "text", "Text",
- "", Tk_Offset(TreeColumn,headingObj), -1,
+ "", offsetof(TreeColumn,headingObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-image", "image", "Image",
- "", Tk_Offset(TreeColumn,headingImageObj), -1,
+ "", offsetof(TreeColumn,headingImageObj), -1,
0,0,0 },
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
- "center", Tk_Offset(TreeColumn,headingAnchorObj), -1,
+ "center", offsetof(TreeColumn,headingAnchorObj), -1,
0,0,0 },
{TK_OPTION_STRING, "-command", "", "",
- "", Tk_Offset(TreeColumn,headingCommandObj), -1,
+ "", offsetof(TreeColumn,headingCommandObj), -1,
TK_OPTION_NULL_OK,0,0 },
{TK_OPTION_STRING, "state", "", "",
- "", Tk_Offset(TreeColumn,headingStateObj), -1,
+ "", offsetof(TreeColumn,headingStateObj), -1,
0,0,STATE_CHANGED },
{TK_OPTION_END, 0,0,0, NULL, -1,-1, 0,0,0}
};
@@ -321,14 +319,14 @@ static Tk_OptionSpec HeadingOptionSpecs[] = {
#define DEFAULT_SHOW "tree headings"
-static const char *showStrings[] = {
+static const char *const showStrings[] = {
"tree", "headings", NULL
};
static int GetEnumSetFromObj(
Tcl_Interp *interp,
Tcl_Obj *objPtr,
- const char *table[],
+ const char *const table[],
unsigned *resultPtr)
{
unsigned result = 0;
@@ -435,35 +433,35 @@ typedef struct {
#define SCROLLCMD_CHANGED (USER_MASK<<2)
#define SHOW_CHANGED (USER_MASK<<3)
-static const char *SelectModeStrings[] = { "none", "browse", "extended", NULL };
+static const char *const SelectModeStrings[] = { "none", "browse", "extended", NULL };
static Tk_OptionSpec TreeviewOptionSpecs[] = {
{TK_OPTION_STRING, "-columns", "columns", "Columns",
- "", Tk_Offset(Treeview,tree.columnsObj), -1,
+ "", offsetof(Treeview,tree.columnsObj), -1,
0,0,COLUMNS_CHANGED | GEOMETRY_CHANGED /*| READONLY_OPTION*/ },
{TK_OPTION_STRING, "-displaycolumns","displayColumns","DisplayColumns",
- "#all", Tk_Offset(Treeview,tree.displayColumnsObj), -1,
+ "#all", offsetof(Treeview,tree.displayColumnsObj), -1,
0,0,DCOLUMNS_CHANGED | GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-show", "show", "Show",
- DEFAULT_SHOW, Tk_Offset(Treeview,tree.showObj), -1,
+ DEFAULT_SHOW, offsetof(Treeview,tree.showObj), -1,
0,0,SHOW_CHANGED | GEOMETRY_CHANGED },
{TK_OPTION_STRING_TABLE, "-selectmode", "selectMode", "SelectMode",
- "extended", Tk_Offset(Treeview,tree.selectModeObj), -1,
+ "extended", offsetof(Treeview,tree.selectModeObj), -1,
0,(ClientData)SelectModeStrings,0 },
{TK_OPTION_PIXELS, "-height", "height", "Height",
- DEF_TREE_ROWS, Tk_Offset(Treeview,tree.heightObj), -1,
+ DEF_TREE_ROWS, offsetof(Treeview,tree.heightObj), -1,
0,0,GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-padding", "padding", "Pad",
- NULL, Tk_Offset(Treeview,tree.paddingObj), -1,
+ NULL, offsetof(Treeview,tree.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
- NULL, -1, Tk_Offset(Treeview, tree.xscroll.scrollCmd),
+ NULL, -1, offsetof(Treeview, tree.xscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
{TK_OPTION_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
- NULL, -1, Tk_Offset(Treeview, tree.yscroll.scrollCmd),
+ NULL, -1, offsetof(Treeview, tree.yscroll.scrollCmd),
TK_OPTION_NULL_OK, 0, SCROLLCMD_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -1131,7 +1129,7 @@ static int ConfigureItem(
Ttk_ImageSpec *newImageSpec = NULL;
Ttk_TagSet newTagSet = NULL;
- if (Tk_SetOptions(interp, (ClientData)item, tv->tree.itemOptionTable,
+ if (Tk_SetOptions(interp, item, tv->tree.itemOptionTable,
objc, objv, tv->core.tkwin, &savedOptions, &mask)
!= TCL_OK)
{
@@ -1211,7 +1209,7 @@ static int ConfigureColumn(
Tk_SavedOptions savedOptions;
int mask;
- if (Tk_SetOptions(interp, (ClientData)column,
+ if (Tk_SetOptions(interp, column,
tv->tree.columnOptionTable, objc, objv, tv->core.tkwin,
&savedOptions,&mask) != TCL_OK)
{
@@ -1257,7 +1255,7 @@ static int ConfigureHeading(
Tk_SavedOptions savedOptions;
int mask;
- if (Tk_SetOptions(interp, (ClientData)column,
+ if (Tk_SetOptions(interp, column,
tv->tree.headingOptionTable, objc, objv, tv->core.tkwin,
&savedOptions,&mask) != TCL_OK)
{
@@ -1503,7 +1501,7 @@ typedef enum {
REGION_CELL
} TreeRegion;
-static const char *regionStrings[] = {
+static const char *const regionStrings[] = {
"nothing", "heading", "separator", "tree", "cell", 0
};
@@ -2143,7 +2141,7 @@ static int TreeviewExistsCommand(
}
entryPtr = Tcl_FindHashEntry(&tv->tree.items, Tcl_GetString(objv[2]));
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(entryPtr != 0));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(entryPtr != 0));
return TCL_OK;
}
@@ -2265,7 +2263,7 @@ done:
static int TreeviewIdentifyCommand(
void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
- static const char *submethodStrings[] =
+ static const char *const submethodStrings[] =
{ "region", "item", "column", "row", "element", NULL };
enum { I_REGION, I_ITEM, I_COLUMN, I_ROW, I_ELEMENT };
@@ -2952,7 +2950,7 @@ static int TreeviewSelectionCommand(
enum {
SELECTION_SET, SELECTION_ADD, SELECTION_REMOVE, SELECTION_TOGGLE
};
- static const char *selopStrings[] = {
+ static const char *const selopStrings[] = {
"set", "add", "remove", "toggle", NULL
};
@@ -3132,7 +3130,7 @@ static int TreeviewTagHasCommand(
return TCL_ERROR;
}
Tcl_SetObjResult(interp,
- Tcl_NewBooleanObj(Ttk_TagSetContains(item->tagset, tag)));
+ Tcl_NewWideIntObj(Ttk_TagSetContains(item->tagset, tag)));
return TCL_OK;
} else {
Tcl_WrongNumArgs(interp, 3, objv, "tagName ?item?");
@@ -3352,11 +3350,11 @@ typedef struct {
static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
- Tk_Offset(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
+ offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
{ "-indicatorsize", TK_OPTION_PIXELS,
- Tk_Offset(TreeitemIndicator,sizeObj), "12" },
+ offsetof(TreeitemIndicator,sizeObj), "12" },
{ "-indicatormargins", TK_OPTION_STRING,
- Tk_Offset(TreeitemIndicator,marginsObj), "2 2 4 2" },
+ offsetof(TreeitemIndicator,marginsObj), "2 2 4 2" },
{ NULL, 0, 0, NULL }
};
@@ -3421,9 +3419,9 @@ typedef struct {
static Ttk_ElementOptionSpec RowElementOptions[] = {
{ "-background", TK_OPTION_COLOR,
- Tk_Offset(RowElement,backgroundObj), DEFAULT_BACKGROUND },
+ offsetof(RowElement,backgroundObj), DEFAULT_BACKGROUND },
{ "-rownumber", TK_OPTION_INT,
- Tk_Offset(RowElement,rowNumberObj), "0" },
+ offsetof(RowElement,rowNumberObj), "0" },
{ NULL, 0, 0, NULL }
};
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index d7f4b25..a7f7e55 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -4,7 +4,6 @@
* Core widget utilities.
*/
-#include <string.h>
#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
@@ -335,7 +334,7 @@ static void WidgetWorldChanged(ClientData clientData)
TtkRedisplayWidget(corePtr);
}
-static Tk_ClassProcs widgetClassProcs = {
+static const Tk_ClassProcs widgetClassProcs = {
sizeof(Tk_ClassProcs), /* size */
WidgetWorldChanged, /* worldChangedProc */
NULL, /* createProc */
@@ -739,7 +738,7 @@ int TtkWidgetInstateCommand(
if (objc == 3) {
Tcl_SetObjResult(interp,
- Tcl_NewBooleanObj(Ttk_StateMatches(state,&spec)));
+ Tcl_NewWideIntObj(Ttk_StateMatches(state,&spec)));
} else if (objc == 4) {
if (Ttk_StateMatches(state,&spec)) {
status = Tcl_EvalObjEx(interp, objv[3], 0);
@@ -757,7 +756,7 @@ int TtkWidgetIdentifyCommand(
{
WidgetCore *corePtr = recordPtr;
Ttk_Element element;
- static const char *whatTable[] = { "element", NULL };
+ static const char *const whatTable[] = { "element", NULL };
int x, y, what;
if (objc < 4 || objc > 5) {
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index 8a94bb7..e764c3a 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -111,16 +111,16 @@ MODULE_SCOPE int TtkWidgetConstructorObjCmd(
/* WIDGET_TAKEFOCUS_TRUE --
* WIDGET_TAKEFOCUS_FALSE --
- * Add one or the other of these to each OptionSpecs table
- * to indicate whether the widget should take focus
+ * Add one or the other of these to each OptionSpecs table
+ * to indicate whether the widget should take focus
* during keyboard traversal.
*/
#define WIDGET_TAKEFOCUS_TRUE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
- "ttk::takefocus", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }
+ "ttk::takefocus", offsetof(WidgetCore, takeFocusPtr), -1, 0,0,0 }
#define WIDGET_TAKEFOCUS_FALSE \
{TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", \
- "", Tk_Offset(WidgetCore, takeFocusPtr), -1, 0,0,0 }
+ "", offsetof(WidgetCore, takeFocusPtr), -1, 0,0,0 }
/* WIDGET_INHERIT_OPTIONS(baseOptionSpecs) --
* Add this at the end of an OptionSpecs table to inherit
diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl
index 8631904..acab497 100644
--- a/library/demos/combo.tcl
+++ b/library/demos/combo.tcl
@@ -43,7 +43,8 @@ set secondValue unchangable
set ozCity Sydney
ttk::labelframe $w.c1 -text "Fully Editable"
-ttk::combobox $w.c1.c -textvariable firstValue
+ttk::combobox $w.c1.c -textvariable firstValue -placeholder {Enter text here}
+ttk::style configure TEntry -placeholderforeground gray50
ttk::labelframe $w.c2 -text Disabled
ttk::combobox $w.c2.c -textvariable secondValue -state disabled
ttk::labelframe $w.c3 -text "Defined List Only"
diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl
index 443b102..f534d99 100644
--- a/library/demos/cscroll.tcl
+++ b/library/demos/cscroll.tcl
@@ -72,11 +72,25 @@ if {[tk windowingsystem] eq "aqua"} {
%W xview scroll [expr {-10 * (%D)}] units
}
} else {
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/30 = 0,
+ # but
+ # (int)-1/30 = -1
+ # The following code ensure equal +/- behaviour.
bind $c <MouseWheel> {
- %W yview scroll [expr {-(%D / 30)}] units
+ if {%D >= 0} {
+ %W yview scroll [expr {-%D/30}] units
+ } else {
+ %W yview scroll [expr {(29-%D)/30}] units
+ }
}
bind $c <Shift-MouseWheel> {
- %W xview scroll [expr {-(%D / 30)}] units
+ if {%D >= 0} {
+ %W xview scroll [expr {-%D/30}] units
+ } else {
+ %W xview scroll [expr {(29-%D)/30}] units
+ }
}
}
@@ -105,6 +119,18 @@ if {[tk windowingsystem] eq "x11"} {
%W xview scroll 5 units
}
}
+ if {[package vsatisfies [package provide Tk] 8.7]} {
+ bind $c <6> {
+ if {!$tk_strictMotif} {
+ %W xview scroll -5 units
+ }
+ }
+ bind $c <7> {
+ if {!$tk_strictMotif} {
+ %W xview scroll 5 units
+ }
+ }
+ }
}
diff --git a/library/demos/entry1.tcl b/library/demos/entry1.tcl
index eef8964..bd74310 100644
--- a/library/demos/entry1.tcl
+++ b/library/demos/entry1.tcl
@@ -25,7 +25,7 @@ pack $btns -side bottom -fill x
entry $w.e1
entry $w.e2
-entry $w.e3
+entry $w.e3 -placeholder {Enter text here} -placeholderforeground gray75
pack $w.e1 $w.e2 $w.e3 -side top -pady 5 -padx 10 -fill x
$w.e1 insert 0 "Initial value"
diff --git a/library/demos/entry2.tcl b/library/demos/entry2.tcl
index 9e3f4ef..10e45df 100644
--- a/library/demos/entry2.tcl
+++ b/library/demos/entry2.tcl
@@ -44,3 +44,4 @@ $w.frame.e1 insert 0 "Initial value"
$w.frame.e2 insert end "This entry contains a long value, much too long "
$w.frame.e2 insert end "to fit in the window at one time, so long in fact "
$w.frame.e2 insert end "that you'll have to scan or scroll to see the end."
+$w.frame.e3 configure -placeholder {Enter text here} -placeholderforeground gray75
diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl
index a788a65..abe70a3 100644
--- a/library/demos/menu.tcl
+++ b/library/demos/menu.tcl
@@ -131,7 +131,7 @@ $m entryconfigure 2 -columnbreak 1
set m $w.menu.more
$w.menu add cascade -label "More" -menu $m -underline 0
menu $m -tearoff 0
-foreach i {{An entry} {Another entry} {Does nothing} {Does almost nothing} {Make life meaningful}} {
+foreach i {{An entry} {Another entry} {Does nothing} {Does almost nothing} {Does almost nothing also} {Make life meaningful}} {
$m add command -label $i -command [list puts "You invoked \"$i\""]
}
$m entryconfigure "Does almost nothing" -bitmap questhead -compound left \
@@ -141,6 +141,13 @@ $m entryconfigure "Does almost nothing" -bitmap questhead -compound left \
text string. Other than this, it is just like any other\
menu entry." {} 0 OK ]
+$m entryconfigure "Does almost nothing also" -image lilearth -compound left \
+ -command [list \
+ tk_dialog $w.compound {Compound Menu Entry} \
+ "The menu entry you invoked displays both a image and a\
+ text string. Other than this, it is just like any other\
+ menu entry." {} 0 OK ]
+
set m $w.menu.colors
$w.menu add cascade -label "Colors" -menu $m -underline 1
menu $m -tearoff 1
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
index 8decdf2..1cc70f8 100644
--- a/library/demos/tree.tcl
+++ b/library/demos/tree.tcl
@@ -39,6 +39,7 @@ proc populateTree {tree node} {
set path [$tree set $node fullpath]
$tree delete [$tree children $node]
foreach f [lsort -dictionary [glob -nocomplain -dir $path *]] {
+ set f [file normalize $f]
set type [file type $f]
set id [$tree insert $node end -text [file tail $f] \
-values [list $f $type]]
diff --git a/library/demos/unicodeout.tcl b/library/demos/unicodeout.tcl
index bb4d8f8..ca325a4 100644
--- a/library/demos/unicodeout.tcl
+++ b/library/demos/unicodeout.tcl
@@ -22,8 +22,8 @@ label $w.msg -font $font -wraplength 4i -anchor w -justify left \
below depends largely on what character sets you have installed,\
and what you see for characters that are not present varies greatly\
between platforms as well. The strings are written in Tcl using\
- UNICODE characters using the \\uXXXX escape so as to do so in a\
- portable fashion."
+ UNICODE characters using the \\uXXXX (or \\UXXXXXX) escape so as to\
+ do so in a portable fashion."
pack $w.msg -side top
## See Code / Dismiss buttons
diff --git a/library/iconlist.tcl b/library/iconlist.tcl
index eed7476..753f183 100644
--- a/library/iconlist.tcl
+++ b/library/iconlist.tcl
@@ -455,6 +455,8 @@ package require Tk 8.6
if {[tk windowingsystem] eq "x11"} {
bind $canvas <Shift-4> [namespace code {my MouseWheel 120}]
bind $canvas <Shift-5> [namespace code {my MouseWheel -120}]
+ bind $canvas <6> [namespace code {my MouseWheel 120}]
+ bind $canvas <7> [namespace code {my MouseWheel -120}]
}
bind $canvas <<PrevLine>> [namespace code {my UpDown -1}]
@@ -507,6 +509,12 @@ package require Tk 8.6
if {$noScroll || $::tk_strictMotif} {
return
}
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/120 = 0,
+ # but
+ # (int)-1/120 = -1
+ # The following code ensure equal +/- behaviour.
if {$amount > 0} {
$canvas xview scroll [expr {(-119-$amount) / 120}] units
} else {
diff --git a/library/images/logo.eps b/library/images/logo.eps
index 0d05d34..006e72a 100644
--- a/library/images/logo.eps
+++ b/library/images/logo.eps
@@ -28,7 +28,7 @@
%%BeginProlog
%%BeginResource: procset Adobe_level2_AI5 1.0 0
%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation)
-%%Version: 1.0
+%%Version: 1.0
%%CreationDate: (04/10/93) ()
%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved)
userdict /Adobe_level2_AI5 21 dict dup begin
@@ -77,7 +77,7 @@ userdict /Adobe_level2_AI5 21 dict dup begin
}
def
} if
-
+
/gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def
userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put
userdict /level2?
@@ -178,7 +178,7 @@ userdict /Adobe_level2_AI5 21 dict dup begin
%%EndResource
%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0
%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog)
-%%Version: 1.1
+%%Version: 1.1
%%CreationDate: (3/7/1994) ()
%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved)
currentpacking true setpacking
@@ -1062,7 +1062,7 @@ end
}
{
/clipForward? true def
-
+
/Tx /pop load def
/Tj /pop load def
currentdict end clipRenderOff begin begin
@@ -1089,7 +1089,7 @@ end
end
end
begin
-
+
/clipForward? false ddef
} if
} ifelse
diff --git a/library/images/pwrdLogo.eps b/library/images/pwrdLogo.eps
index e11d9e9..674250f 100644
--- a/library/images/pwrdLogo.eps
+++ b/library/images/pwrdLogo.eps
@@ -28,7 +28,7 @@
%%BeginProlog
%%BeginResource: procset Adobe_level2_AI5 1.0 0
%%Title: (Adobe Illustrator (R) Version 5.0 Level 2 Emulation)
-%%Version: 1.0
+%%Version: 1.0
%%CreationDate: (04/10/93) ()
%%Copyright: ((C) 1987-1993 Adobe Systems Incorporated All Rights Reserved)
userdict /Adobe_level2_AI5 21 dict dup begin
@@ -77,7 +77,7 @@ userdict /Adobe_level2_AI5 21 dict dup begin
}
def
} if
-
+
/gt38? mark {version cvx exec} stopped {cleartomark true} {38 gt exch pop} ifelse def
userdict /deviceDPI 72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt put
userdict /level2?
@@ -178,7 +178,7 @@ userdict /Adobe_level2_AI5 21 dict dup begin
%%EndResource
%%BeginResource: procset Adobe_IllustratorA_AI5 1.1 0
%%Title: (Adobe Illustrator (R) Version 5.0 Abbreviated Prolog)
-%%Version: 1.1
+%%Version: 1.1
%%CreationDate: (3/7/1994) ()
%%Copyright: ((C) 1987-1994 Adobe Systems Incorporated All Rights Reserved)
currentpacking true setpacking
@@ -1062,7 +1062,7 @@ end
}
{
/clipForward? true def
-
+
/Tx /pop load def
/Tj /pop load def
currentdict end clipRenderOff begin begin
@@ -1089,7 +1089,7 @@ end
end
end
begin
-
+
/clipForward? false ddef
} if
} ifelse
diff --git a/library/listbox.tcl b/library/listbox.tcl
index a094883..3802223 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -194,6 +194,12 @@ if {[tk windowingsystem] eq "aqua"} {
%W xview scroll [expr {-10 * (%D)}] units
}
} else {
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/30 = 0,
+ # but
+ # (int)-1/30 = -1
+ # The following code ensure equal +/- behaviour.
bind Listbox <MouseWheel> {
if {%D >= 0} {
%W yview scroll [expr {-%D/30}] units
@@ -235,6 +241,16 @@ if {[tk windowingsystem] eq "x11"} {
%W xview scroll 5 units
}
}
+ bind Listbox <6> {
+ if {!$tk_strictMotif} {
+ %W xview scroll -5 units
+ }
+ }
+ bind Listbox <7> {
+ if {!$tk_strictMotif} {
+ %W xview scroll 5 units
+ }
+ }
}
# ::tk::ListboxBeginSelect --
diff --git a/library/msgs/cs.msg b/library/msgs/cs.msg
index d6be730..a93c4ec 100644
--- a/library/msgs/cs.msg
+++ b/library/msgs/cs.msg
@@ -1,77 +1,77 @@
namespace eval ::tk {
- ::msgcat::mcset cs "&Abort" "&P\u0159eru\u0161it"
+ ::msgcat::mcset cs "&Abort" "&Přerušit"
::msgcat::mcset cs "&About..." "&O programu..."
- ::msgcat::mcset cs "All Files" "V\u0161echny soubory"
+ ::msgcat::mcset cs "All Files" "Všechny soubory"
::msgcat::mcset cs "Application Error" "Chyba programu"
::msgcat::mcset cs "Bold Italic"
- ::msgcat::mcset cs "&Blue" "&Modr\341"
- ::msgcat::mcset cs "Cancel" "Zru\u0161it"
- ::msgcat::mcset cs "&Cancel" "&Zru\u0161it"
- ::msgcat::mcset cs "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nemohu zm\u011bnit atku\341ln\355 adres\341\u0159 na \"%1\$s\".\nP\u0159\355stup odm\355tnut."
- ::msgcat::mcset cs "Choose Directory" "V\375b\u011br adres\341\u0159e"
+ ::msgcat::mcset cs "&Blue" "&Modá"
+ ::msgcat::mcset cs "Cancel" "Zrušit"
+ ::msgcat::mcset cs "&Cancel" "&Zrušit"
+ ::msgcat::mcset cs "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nemohu změnit atkálí adreář na \"%1\$s\".\nPístup odítnut."
+ ::msgcat::mcset cs "Choose Directory" "ýběr adreáře"
::msgcat::mcset cs "Cl&ear" "Sma&zat"
::msgcat::mcset cs "&Clear Console" "&Smazat konzolu"
::msgcat::mcset cs "Color" "Barva"
::msgcat::mcset cs "Console" "Konzole"
- ::msgcat::mcset cs "&Copy" "&Kop\355rovat"
- ::msgcat::mcset cs "Cu&t" "V&y\u0159\355znout"
+ ::msgcat::mcset cs "&Copy" "&Koírovat"
+ ::msgcat::mcset cs "Cu&t" "V&yíznout"
::msgcat::mcset cs "&Delete" "&Smazat"
::msgcat::mcset cs "Details >>" "Detaily >>"
- ::msgcat::mcset cs "Directory \"%1\$s\" does not exist." "Adres\341\u0159 \"%1\$s\" neexistuje."
- ::msgcat::mcset cs "&Directory:" "&Adres\341\u0159:"
- ::msgcat::mcset cs "&Edit" "&\332pravy"
+ ::msgcat::mcset cs "Directory \"%1\$s\" does not exist." "Adreář \"%1\$s\" neexistuje."
+ ::msgcat::mcset cs "&Directory:" "&Adreář:"
+ ::msgcat::mcset cs "&Edit" "Úpravy"
::msgcat::mcset cs "Error: %1\$s" "Chyba: %1\$s"
::msgcat::mcset cs "E&xit" "&Konec"
::msgcat::mcset cs "&File" "&Soubor"
- ::msgcat::mcset cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Soubor \"%1\$s\" ji\u017e existuje.\nChcete jej p\u0159epsat?"
- ::msgcat::mcset cs "File \"%1\$s\" already exists.\n\n" "Soubor \"%1\$s\" ji\u017e existuje.\n\n"
+ ::msgcat::mcset cs "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Soubor \"%1\$s\" již existuje.\nChcete jej přepsat?"
+ ::msgcat::mcset cs "File \"%1\$s\" already exists.\n\n" "Soubor \"%1\$s\" již existuje.\n\n"
::msgcat::mcset cs "File \"%1\$s\" does not exist." "Soubor \"%1\$s\" neexistuje."
- ::msgcat::mcset cs "File &name:" "&Jm\351no souboru:"
- ::msgcat::mcset cs "File &names:" "&Jm\351na soubor\u016f:"
- ::msgcat::mcset cs "Files of &type:" "&Typy soubor\u016f:"
+ ::msgcat::mcset cs "File &name:" "&Jéno souboru:"
+ ::msgcat::mcset cs "File &names:" "&Jéna souborů:"
+ ::msgcat::mcset cs "Files of &type:" "&Typy souborů:"
::msgcat::mcset cs "Fi&les:" "Sou&bory:"
::msgcat::mcset cs "&Filter" "&Filtr"
::msgcat::mcset cs "Fil&ter:" "Fil&tr:"
::msgcat::mcset cs "Font st&yle:"
- ::msgcat::mcset cs "&Green" "Ze&len\341"
- ::msgcat::mcset cs "&Help" "&N\341pov\u011bda"
+ ::msgcat::mcset cs "&Green" "Ze&leá"
+ ::msgcat::mcset cs "&Help" "&ápověda"
::msgcat::mcset cs "Hi" "Ahoj"
::msgcat::mcset cs "&Hide Console" "&Schovat Konzolu"
::msgcat::mcset cs "&Ignore" "&Ignorovat"
- ::msgcat::mcset cs "Invalid file name \"%1\$s\"." "\u0160patn\351 jm\351no souboru \"%1\$s\"."
+ ::msgcat::mcset cs "Invalid file name \"%1\$s\"." "Špaté jéno souboru \"%1\$s\"."
::msgcat::mcset cs "Log Files" "Log soubory"
::msgcat::mcset cs "&No" "&Ne"
::msgcat::mcset cs "&OK"
::msgcat::mcset cs "OK"
::msgcat::mcset cs "Ok"
- ::msgcat::mcset cs "Open" "Otev\u0159\355t"
- ::msgcat::mcset cs "&Open" "&Otev\u0159\355t"
- ::msgcat::mcset cs "Open Multiple Files" "Otev\u0159\355t v\355ce soubor\u016f"
- ::msgcat::mcset cs "P&aste" "&Vlo\u017eit"
- ::msgcat::mcset cs "&Quit" "&Ukon\u010dit"
- ::msgcat::mcset cs "&Red" "\u010ce&rven\341"
- ::msgcat::mcset cs "Replace existing file?" "Nahradit st\341vaj\355c\355 soubor?"
+ ::msgcat::mcset cs "Open" "Otevít"
+ ::msgcat::mcset cs "&Open" "&Otevít"
+ ::msgcat::mcset cs "Open Multiple Files" "Otevít íce souborů"
+ ::msgcat::mcset cs "P&aste" "&Vložit"
+ ::msgcat::mcset cs "&Quit" "&Ukončit"
+ ::msgcat::mcset cs "&Red" "Če&rveá"
+ ::msgcat::mcset cs "Replace existing file?" "Nahradit sávaíí soubor?"
::msgcat::mcset cs "&Retry" "Z&novu"
- ::msgcat::mcset cs "&Save" "&Ulo\u017eit"
- ::msgcat::mcset cs "Save As" "Ulo\u017eit jako"
- ::msgcat::mcset cs "Save To Log" "Ulo\u017eit do logu"
+ ::msgcat::mcset cs "&Save" "&Uložit"
+ ::msgcat::mcset cs "Save As" "Uložit jako"
+ ::msgcat::mcset cs "Save To Log" "Uložit do logu"
::msgcat::mcset cs "Select Log File" "Vybrat log soubor"
- ::msgcat::mcset cs "Select a file to source" "Vybrat soubor k nahr\341n\355"
- ::msgcat::mcset cs "&Selection:" "&V\375b\u011br:"
- ::msgcat::mcset cs "Skip Messages" "P\u0159esko\u010dit zpr\341vy"
+ ::msgcat::mcset cs "Select a file to source" "Vybrat soubor k naháí"
+ ::msgcat::mcset cs "&Selection:" "&ýběr:"
+ ::msgcat::mcset cs "Skip Messages" "Přeskočit zpávy"
::msgcat::mcset cs "&Source..." "&Zdroj..."
::msgcat::mcset cs "Tcl Scripts" "Tcl skripty"
::msgcat::mcset cs "Tcl for Windows" "Tcl pro Windows"
- ::msgcat::mcset cs "Text Files" "Textov\351 soubory"
- ::msgcat::mcset cs "abort" "p\u0159eru\u0161it"
- ::msgcat::mcset cs "blue" "modr\341"
- ::msgcat::mcset cs "cancel" "zru\u0161it"
- ::msgcat::mcset cs "extension" "p\u0159\355pona"
- ::msgcat::mcset cs "extensions" "p\u0159\355pony"
- ::msgcat::mcset cs "green" "zelen\341"
+ ::msgcat::mcset cs "Text Files" "Textoé soubory"
+ ::msgcat::mcset cs "abort" "přerušit"
+ ::msgcat::mcset cs "blue" "modá"
+ ::msgcat::mcset cs "cancel" "zrušit"
+ ::msgcat::mcset cs "extension" "pípona"
+ ::msgcat::mcset cs "extensions" "pípony"
+ ::msgcat::mcset cs "green" "zeleá"
::msgcat::mcset cs "ignore" "ignorovat"
::msgcat::mcset cs "ok"
- ::msgcat::mcset cs "red" "\u010derven\341"
+ ::msgcat::mcset cs "red" "červeá"
::msgcat::mcset cs "retry" "znovu"
::msgcat::mcset cs "yes" "ano"
}
diff --git a/library/msgs/de.msg b/library/msgs/de.msg
index e420f8a..6dee507 100644
--- a/library/msgs/de.msg
+++ b/library/msgs/de.msg
@@ -1,6 +1,6 @@
namespace eval ::tk {
::msgcat::mcset de "&Abort" "&Abbruch"
- ::msgcat::mcset de "&About..." "&\u00dcber..."
+ ::msgcat::mcset de "&About..." "&Über..."
::msgcat::mcset de "All Files" "Alle Dateien"
::msgcat::mcset de "Application Error" "Applikationsfehler"
::msgcat::mcset de "&Apply" "&Anwenden"
@@ -10,14 +10,14 @@ namespace eval ::tk {
::msgcat::mcset de "Cancel" "Abbruch"
::msgcat::mcset de "&Cancel" "&Abbruch"
::msgcat::mcset de "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kann nicht in das Verzeichnis \"%1\$s\" wechseln.\nKeine Rechte vorhanden."
- ::msgcat::mcset de "Choose Directory" "W\u00e4hle Verzeichnis"
- ::msgcat::mcset de "Cl&ear" "&R\u00fccksetzen"
- ::msgcat::mcset de "&Clear Console" "&Konsole l\u00f6schen"
+ ::msgcat::mcset de "Choose Directory" "Wähle Verzeichnis"
+ ::msgcat::mcset de "Cl&ear" "&Rücksetzen"
+ ::msgcat::mcset de "&Clear Console" "&Konsole löschen"
::msgcat::mcset de "Color" "Farbe"
::msgcat::mcset de "Console" "Konsole"
::msgcat::mcset de "&Copy" "&Kopieren"
::msgcat::mcset de "Cu&t" "Aus&schneiden"
- ::msgcat::mcset de "&Delete" "&L\u00f6schen"
+ ::msgcat::mcset de "&Delete" "&Löschen"
::msgcat::mcset de "Details >>"
::msgcat::mcset de "Directory \"%1\$s\" does not exist." "Das Verzeichnis \"%1\$s\" existiert nicht."
::msgcat::mcset de "&Directory:" "&Verzeichnis:"
@@ -26,7 +26,7 @@ namespace eval ::tk {
::msgcat::mcset de "Error: %1\$s" "Fehler: %1\$s"
::msgcat::mcset de "E&xit" "&Ende"
::msgcat::mcset de "&File" "&Datei"
- ::msgcat::mcset de "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei \u00fcberschreiben ?"
+ ::msgcat::mcset de "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Die Datei \"%1\$s\" ist bereits vorhanden.\nWollen sie diese Datei überschreiben ?"
::msgcat::mcset de "File \"%1\$s\" already exists.\n\n" "Die Datei \"%1\$s\" ist bereits vorhanden.\n\n"
::msgcat::mcset de "File \"%1\$s\" does not exist." "Die Datei \"%1\$s\" existiert nicht."
::msgcat::mcset de "File &name:" "Datei&name:"
@@ -38,22 +38,22 @@ namespace eval ::tk {
::msgcat::mcset de "Font" "Schriftart"
::msgcat::mcset de "&Font:" "Schriftart:"
::msgcat::mcset de "Font st&yle:" "Schriftschnitt:"
- ::msgcat::mcset de "&Green" "&Gr\u00fcn"
+ ::msgcat::mcset de "&Green" "&Grün"
::msgcat::mcset de "&Help" "&Hilfe"
::msgcat::mcset de "Hi" "Hallo"
::msgcat::mcset de "&Hide Console" "&Konsole unsichtbar machen"
::msgcat::mcset de "&Ignore" "&Ignorieren"
- ::msgcat::mcset de "Invalid file name \"%1\$s\"." "Ung\u00fcltiger Dateiname \"%1\$s\"."
+ ::msgcat::mcset de "Invalid file name \"%1\$s\"." "Ungültiger Dateiname \"%1\$s\"."
::msgcat::mcset de "Italic" "Kursiv"
::msgcat::mcset de "Log Files" "Protokolldatei"
::msgcat::mcset de "&No" "&Nein"
::msgcat::mcset de "&OK"
::msgcat::mcset de "OK"
::msgcat::mcset de "Ok"
- ::msgcat::mcset de "Open" "\u00d6ffnen"
- ::msgcat::mcset de "&Open" "\u00d6&ffnen"
+ ::msgcat::mcset de "Open" "Öffnen"
+ ::msgcat::mcset de "&Open" "Ö&ffnen"
::msgcat::mcset de "Open Multiple Files" "Mehrere Dateien \u00F6ffnen"
- ::msgcat::mcset de "P&aste" "E&inf\u00fcgen"
+ ::msgcat::mcset de "P&aste" "E&infügen"
::msgcat::mcset de "&Quit" "&Beenden"
::msgcat::mcset de "&Red" "&Rot"
::msgcat::mcset de "Regular" "Standard"
@@ -63,17 +63,17 @@ namespace eval ::tk {
::msgcat::mcset de "&Save" "&Speichern"
::msgcat::mcset de "Save As" "Speichern unter"
::msgcat::mcset de "Save To Log" "In Protokoll speichern"
- ::msgcat::mcset de "Select Log File" "Protokolldatei ausw\u00e4hlen"
- ::msgcat::mcset de "Select a file to source" "Auszuf\u00fchrende Datei ausw\u00e4hlen"
+ ::msgcat::mcset de "Select Log File" "Protokolldatei auswählen"
+ ::msgcat::mcset de "Select a file to source" "Auszuführende Datei auswählen"
::msgcat::mcset de "&Selection:" "Auswah&l:"
::msgcat::mcset de "&Size:" "Schriftgrad:"
::msgcat::mcset de "Show &Hidden Directories" "Zeige versteckte Dateien"
::msgcat::mcset de "Show &Hidden Files and Directories" "Zeige versteckte Dateien und Verzeichnisse"
- ::msgcat::mcset de "Skip Messages" "Weitere Nachrichten \u00fcberspringen"
- ::msgcat::mcset de "&Source..." "&Ausf\u00fchren..."
+ ::msgcat::mcset de "Skip Messages" "Weitere Nachrichten überspringen"
+ ::msgcat::mcset de "&Source..." "&Ausführen..."
::msgcat::mcset de "Stri&keout" "&Durchgestrichen"
::msgcat::mcset de "Tcl Scripts" "Tcl-Skripte"
- ::msgcat::mcset de "Tcl for Windows" "Tcl f\u00fcr Windows"
+ ::msgcat::mcset de "Tcl for Windows" "Tcl für Windows"
::msgcat::mcset de "Text Files" "Textdateien"
::msgcat::mcset de "&Underline" "&Unterstrichen"
::msgcat::mcset de "&Yes" "&Ja"
@@ -82,7 +82,7 @@ namespace eval ::tk {
::msgcat::mcset de "cancel" "abbrechen"
::msgcat::mcset de "extension" "Erweiterung"
::msgcat::mcset de "extensions" "Erweiterungen"
- ::msgcat::mcset de "green" "gr\u00fcn"
+ ::msgcat::mcset de "green" "grün"
::msgcat::mcset de "ignore" "ignorieren"
::msgcat::mcset de "ok"
::msgcat::mcset de "red" "rot"
diff --git a/library/msgs/el.msg b/library/msgs/el.msg
index 2e3f236..34f4aa7 100644
--- a/library/msgs/el.msg
+++ b/library/msgs/el.msg
@@ -3,84 +3,84 @@
## petasis@iit.demokritos.gr
namespace eval ::tk {
- ::msgcat::mcset el "&Abort" "\u03a4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "About..." "\u03a3\u03c7\u03b5\u03c4\u03b9\u03ba\u03ac..."
- ::msgcat::mcset el "All Files" "\u038c\u03bb\u03b1 \u03c4\u03b1 \u0391\u03c1\u03c7\u03b5\u03af\u03b1"
- ::msgcat::mcset el "Application Error" "\u039b\u03ac\u03b8\u03bf\u03c2 \u0395\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2"
- ::msgcat::mcset el "&Blue" "\u039c\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "&Cancel" "\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7"
+ ::msgcat::mcset el "&Abort" "Τερματισμός"
+ ::msgcat::mcset el "About..." "Σχετικά..."
+ ::msgcat::mcset el "All Files" "Όλα τα Αρχεία"
+ ::msgcat::mcset el "Application Error" "Λάθος Εφαρμογής"
+ ::msgcat::mcset el "&Blue" "Μπλε"
+ ::msgcat::mcset el "&Cancel" "Ακύρωση"
::msgcat::mcset el \
"Cannot change to the directory \"%1\$s\".\nPermission denied." \
-"\u0394\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03b4\u03c5\u03bd\u03b1\u03c4\u03ae \u03b7 \u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03ba\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5 \u03c3\u03b5 \"%1\$s\".\n\u0397 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c4\u03c1\u03ad\u03c0\u03b5\u03c4\u03b1\u03b9."
- ::msgcat::mcset el "Choose Directory" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u039a\u03b1\u03c4\u03b1\u03bb\u03cc\u03b3\u03bf\u03c5"
- ::msgcat::mcset el "Clear" "\u039a\u03b1\u03b8\u03b1\u03c1\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "Color" "\u03a7\u03c1\u03ce\u03bc\u03b1"
- ::msgcat::mcset el "Console" "\u039a\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1"
- ::msgcat::mcset el "Copy" "\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae"
- ::msgcat::mcset el "Cut" "\u0391\u03c0\u03bf\u03ba\u03bf\u03c0\u03ae"
- ::msgcat::mcset el "Delete" "\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae"
- ::msgcat::mcset el "Details >>" "\u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03ad\u03c1\u03b5\u03b9\u03b5\u03c2 >>"
+"Δεν είναι δυνατή η αλλαγή καταλόγου σε \"%1\$s\".\nΗ πρόσβαση δεν επιτρέπεται."
+ ::msgcat::mcset el "Choose Directory" "Επιλογή Καταλόγου"
+ ::msgcat::mcset el "Clear" "Καθαρισμός"
+ ::msgcat::mcset el "Color" "Χρώμα"
+ ::msgcat::mcset el "Console" "Κονσόλα"
+ ::msgcat::mcset el "Copy" "Αντιγραφή"
+ ::msgcat::mcset el "Cut" "Αποκοπή"
+ ::msgcat::mcset el "Delete" "Διαγραφή"
+ ::msgcat::mcset el "Details >>" "Λεπτομέρειες >>"
::msgcat::mcset el "Directory \"%1\$s\" does not exist." \
- "\u039f \u03ba\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2 \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9."
- ::msgcat::mcset el "&Directory:" "&\u039a\u03b1\u03c4\u03ac\u03bb\u03bf\u03b3\u03bf\u03c2:"
- ::msgcat::mcset el "Error: %1\$s" "\u039b\u03ac\u03b8\u03bf\u03c2: %1\$s"
- ::msgcat::mcset el "Exit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2"
+ "Ο κατάλογος \"%1\$s\" δεν υπάρχει."
+ ::msgcat::mcset el "&Directory:" "&Κατάλογος:"
+ ::msgcat::mcset el "Error: %1\$s" "Λάθος: %1\$s"
+ ::msgcat::mcset el "Exit" "Έξοδος"
::msgcat::mcset el \
"File \"%1\$s\" already exists.\nDo you want to overwrite it?" \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\u0398\u03ad\u03bb\u03b5\u03c4\u03b5 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03ba\u03b1\u03bb\u03c5\u03c6\u03b8\u03b5\u03af;"
+ "Το αρχείο \"%1\$s\" ήδη υπάρχει.\nΘέλετε να επικαλυφθεί;"
::msgcat::mcset el "File \"%1\$s\" already exists.\n\n" \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03ae\u03b4\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9.\n\n"
+ "Το αρχείο \"%1\$s\" ήδη υπάρχει.\n\n"
::msgcat::mcset el "File \"%1\$s\" does not exist." \
- "\u03a4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \"%1\$s\" \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9."
- ::msgcat::mcset el "File &name:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5:"
- ::msgcat::mcset el "File &names:" "\u038c&\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd:"
- ::msgcat::mcset el "Files of &type:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u03c4\u03bf\u03c5 &\u03c4\u03cd\u03c0\u03bf\u03c5:"
- ::msgcat::mcset el "Fi&les:" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1:"
- ::msgcat::mcset el "&Filter" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf"
- ::msgcat::mcset el "Fil&ter:" "\u03a6\u03af\u03bb\u03c4\u03c1\u03bf:"
- ::msgcat::mcset el "&Green" "\u03a0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "Hi" "\u0393\u03b5\u03b9\u03b1"
- ::msgcat::mcset el "Hide Console" "\u0391\u03c0\u03cc\u03ba\u03c1\u03c5\u03c8\u03b7 \u03ba\u03bf\u03bd\u03c3\u03cc\u03bb\u03b1\u03c2"
- ::msgcat::mcset el "&Ignore" "\u0391\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7"
+ "Το αρχείο \"%1\$s\" δεν υπάρχει."
+ ::msgcat::mcset el "File &name:" "Ό&νομα αρχείου:"
+ ::msgcat::mcset el "File &names:" "Ό&νομα αρχείων:"
+ ::msgcat::mcset el "Files of &type:" "Αρχεία του &τύπου:"
+ ::msgcat::mcset el "Fi&les:" "Αρχεία:"
+ ::msgcat::mcset el "&Filter" "Φίλτρο"
+ ::msgcat::mcset el "Fil&ter:" "Φίλτρο:"
+ ::msgcat::mcset el "&Green" "Πράσινο"
+ ::msgcat::mcset el "Hi" "Γεια"
+ ::msgcat::mcset el "Hide Console" "Απόκρυψη κονσόλας"
+ ::msgcat::mcset el "&Ignore" "Αγνόηση"
::msgcat::mcset el "Invalid file name \"%1\$s\"." \
- "\u0386\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \"%1\$s\"."
- ::msgcat::mcset el "Log Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
- ::msgcat::mcset el "&No" "\u038c\u03c7\u03b9"
- ::msgcat::mcset el "&OK" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "OK" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "Ok" "\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1"
- ::msgcat::mcset el "&Open" "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1"
+ "Άκυρο όνομα αρχείου \"%1\$s\"."
+ ::msgcat::mcset el "Log Files" "Αρχεία Καταγραφής"
+ ::msgcat::mcset el "&No" "Όχι"
+ ::msgcat::mcset el "&OK" "Εντάξει"
+ ::msgcat::mcset el "OK" "Εντάξει"
+ ::msgcat::mcset el "Ok" "Εντάξει"
+ ::msgcat::mcset el "Open" "Άνοιγμα"
+ ::msgcat::mcset el "&Open" "Άνοιγμα"
::msgcat::mcset el "Open Multiple Files" \
- "\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ce\u03bd \u03b1\u03c1\u03c7\u03b5\u03af\u03c9\u03bd"
- ::msgcat::mcset el "P&aste" "\u0395\u03c0\u03b9\u03ba\u03cc\u03bb\u03bb\u03b7\u03c3\u03b7"
- ::msgcat::mcset el "Quit" "\u0388\u03be\u03bf\u03b4\u03bf\u03c2"
- ::msgcat::mcset el "&Red" "\u039a\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
+ "Άνοιγμα πολλαπλών αρχείων"
+ ::msgcat::mcset el "P&aste" "Επικόλληση"
+ ::msgcat::mcset el "Quit" "Έξοδος"
+ ::msgcat::mcset el "&Red" "Κόκκινο"
::msgcat::mcset el "Replace existing file?" \
- "\u0395\u03c0\u03b9\u03ba\u03ac\u03bb\u03c5\u03c8\u03b7 \u03c5\u03c0\u03ac\u03c1\u03c7\u03bf\u03bd\u03c4\u03bf\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5;"
- ::msgcat::mcset el "&Retry" "\u03a0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac"
- ::msgcat::mcset el "&Save" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7"
- ::msgcat::mcset el "Save As" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03b1\u03bd"
- ::msgcat::mcset el "Save To Log" "\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03c3\u03c4\u03bf \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
- ::msgcat::mcset el "Select Log File" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae \u03b1\u03c1\u03c7\u03b5\u03af\u03bf\u03c5 \u03ba\u03b1\u03c4\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2"
+ "Επικάλυψη υπάρχοντος αρχείου;"
+ ::msgcat::mcset el "&Retry" "Προσπάθησε ξανά"
+ ::msgcat::mcset el "&Save" "Αποθήκευση"
+ ::msgcat::mcset el "Save As" "Αποθήκευση σαν"
+ ::msgcat::mcset el "Save To Log" "Αποθήκευση στο αρχείο καταγραφής"
+ ::msgcat::mcset el "Select Log File" "Επιλογή αρχείου καταγραφής"
::msgcat::mcset el "Select a file to source" \
- "\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b1\u03c1\u03c7\u03b5\u03af\u03bf \u03b3\u03b9\u03b1 \u03b5\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7"
- ::msgcat::mcset el "&Selection:" "\u0395\u03c0\u03b9\u03bb\u03bf\u03b3\u03ae:"
- ::msgcat::mcset el "Skip Messages" "\u0391\u03c0\u03bf\u03c6\u03c5\u03b3\u03ae\u03bc\u03b7\u03bd\u03c5\u03bc\u03ac\u03c4\u03c9\u03bd"
- ::msgcat::mcset el "&Source..." "\u0395\u03ba\u03c4\u03ad\u03bb\u03b5\u03c3\u03b7..."
+ "Επιλέξτε αρχείο για εκτέλεση"
+ ::msgcat::mcset el "&Selection:" "Επιλογή:"
+ ::msgcat::mcset el "Skip Messages" "Αποφυγήμηνυμάτων"
+ ::msgcat::mcset el "&Source..." "Εκτέλεση..."
::msgcat::mcset el "Tcl Scripts" "Tcl Scripts"
- ::msgcat::mcset el "Tcl for Windows" "Tcl \u03b3\u03b9\u03b1 Windows"
- ::msgcat::mcset el "Text Files" "\u0391\u03c1\u03c7\u03b5\u03af\u03b1 \u039a\u03b5\u03b9\u03bc\u03ad\u03bd\u03bf\u03c5"
- ::msgcat::mcset el "&Yes" "\u039d\u03b1\u03b9"
- ::msgcat::mcset el "abort" "\u03c4\u03b5\u03c1\u03bc\u03b1\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2"
- ::msgcat::mcset el "blue" "\u03bc\u03c0\u03bb\u03b5"
- ::msgcat::mcset el "cancel" "\u03b1\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7"
- ::msgcat::mcset el "extension" "\u03b5\u03c0\u03ad\u03ba\u03c4\u03b1\u03c3\u03b7"
- ::msgcat::mcset el "extensions" "\u03b5\u03c0\u03b5\u03ba\u03c4\u03ac\u03c3\u03b5\u03b9\u03c2"
- ::msgcat::mcset el "green" "\u03c0\u03c1\u03ac\u03c3\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "ignore" "\u03b1\u03b3\u03bd\u03cc\u03b7\u03c3\u03b7"
- ::msgcat::mcset el "ok" "\u03b5\u03bd\u03c4\u03ac\u03be\u03b5\u03b9"
- ::msgcat::mcset el "red" "\u03ba\u03cc\u03ba\u03ba\u03b9\u03bd\u03bf"
- ::msgcat::mcset el "retry" "\u03c0\u03c1\u03bf\u03c3\u03c0\u03ac\u03b8\u03b7\u03c3\u03b5 \u03be\u03b1\u03bd\u03ac"
- ::msgcat::mcset el "yes" "\u03bd\u03b1\u03b9"
+ ::msgcat::mcset el "Tcl for Windows" "Tcl για Windows"
+ ::msgcat::mcset el "Text Files" "Αρχεία Κειμένου"
+ ::msgcat::mcset el "&Yes" "Ναι"
+ ::msgcat::mcset el "abort" "τερματισμός"
+ ::msgcat::mcset el "blue" "μπλε"
+ ::msgcat::mcset el "cancel" "ακύρωση"
+ ::msgcat::mcset el "extension" "επέκταση"
+ ::msgcat::mcset el "extensions" "επεκτάσεις"
+ ::msgcat::mcset el "green" "πράσινο"
+ ::msgcat::mcset el "ignore" "αγνόηση"
+ ::msgcat::mcset el "ok" "εντάξει"
+ ::msgcat::mcset el "red" "κόκκινο"
+ ::msgcat::mcset el "retry" "προσπάθησε ξανά"
+ ::msgcat::mcset el "yes" "ναι"
}
diff --git a/library/msgs/eo.msg b/library/msgs/eo.msg
index 3645630..d285fb8 100644
--- a/library/msgs/eo.msg
+++ b/library/msgs/eo.msg
@@ -1,19 +1,19 @@
namespace eval ::tk {
- ::msgcat::mcset eo "&Abort" "&\u0108esigo"
+ ::msgcat::mcset eo "&Abort" "&Ĉesigo"
::msgcat::mcset eo "&About..." "Pri..."
- ::msgcat::mcset eo "All Files" "\u0108ioj dosieroj"
+ ::msgcat::mcset eo "All Files" "Ĉioj dosieroj"
::msgcat::mcset eo "Application Error" "Aplikoerraro"
::msgcat::mcset eo "&Blue" "&Blua"
::msgcat::mcset eo "Cancel" "Rezignu"
::msgcat::mcset eo "&Cancel" "&Rezignu"
- ::msgcat::mcset eo "Cannot change to the directory \"%1\$s\".\nPermission denied." "Neeble \u0109angi al dosierulon \"%1\$s\".\nVi ne rajtas tion."
+ ::msgcat::mcset eo "Cannot change to the directory \"%1\$s\".\nPermission denied." "Neeble ĉangi al dosierulon \"%1\$s\".\nVi ne rajtas tion."
::msgcat::mcset eo "Choose Directory" "Elektu Dosierujo"
::msgcat::mcset eo "Cl&ear" "&Klaru"
::msgcat::mcset eo "&Clear Console" "&Klaru konzolon"
::msgcat::mcset eo "Color" "Farbo"
::msgcat::mcset eo "Console" "Konzolo"
::msgcat::mcset eo "&Copy" "&Kopiu"
- ::msgcat::mcset eo "Cu&t" "&Enpo\u015digu"
+ ::msgcat::mcset eo "Cu&t" "&Enpoŝigu"
::msgcat::mcset eo "&Delete" "&Forprenu"
::msgcat::mcset eo "Details >>" "Detaloj >>"
::msgcat::mcset eo "Directory \"%1\$s\" does not exist." "La dosierujo \"%1\$s\" ne ekzistas."
@@ -22,7 +22,7 @@ namespace eval ::tk {
::msgcat::mcset eo "Error: %1\$s" "Eraro: %1\$s"
::msgcat::mcset eo "E&xit" "&Eliru"
::msgcat::mcset eo "&File" "&Dosiero"
- ::msgcat::mcset eo "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "La dosiero \"%1\$s\" jam ekzistas.\n\u0108u vi volas anstata\u00fbigi la dosieron?"
+ ::msgcat::mcset eo "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "La dosiero \"%1\$s\" jam ekzistas.\nĈu vi volas anstataûigi la dosieron?"
::msgcat::mcset eo "File \"%1\$s\" already exists.\n\n" "La dosiero \"%1\$s\" jam egzistas. \n\n"
::msgcat::mcset eo "File \"%1\$s\" does not exist." "La dosierp \"%1\$s\" ne estas."
::msgcat::mcset eo "File &name:" "Dosiero&nomo:"
@@ -34,7 +34,7 @@ namespace eval ::tk {
::msgcat::mcset eo "&Green" "&Verda"
::msgcat::mcset eo "&Help" "&Helpu"
::msgcat::mcset eo "Hi" "Saluton"
- ::msgcat::mcset eo "&Hide Console" "&Ka\u015du konzolon"
+ ::msgcat::mcset eo "&Hide Console" "&Kaŝu konzolon"
::msgcat::mcset eo "&Ignore" "&Ignoru"
::msgcat::mcset eo "Invalid file name \"%1\$s\"." "Malvalida dosieronomo \"%1\$s\"."
::msgcat::mcset eo "Log Files" "Protokolo"
@@ -45,10 +45,10 @@ namespace eval ::tk {
::msgcat::mcset eo "Open" "Malfermu"
::msgcat::mcset eo "&Open" "&Malfermu"
::msgcat::mcset eo "Open Multiple Files" "Melfermu multan dosierojn"
- ::msgcat::mcset eo "P&aste" "&Elpo\u015digi"
+ ::msgcat::mcset eo "P&aste" "&Elpoŝigi"
::msgcat::mcset eo "&Quit" "&Finigu"
::msgcat::mcset eo "&Red" "&Rosa"
- ::msgcat::mcset eo "Replace existing file?" "\u0108u anstata\u00fbu ekzistantan dosieron?"
+ ::msgcat::mcset eo "Replace existing file?" "Ĉu anstataûu ekzistantan dosieron?"
::msgcat::mcset eo "&Retry" "&Ripetu"
::msgcat::mcset eo "&Save" "&Savu"
::msgcat::mcset eo "Save As" "Savu kiel"
@@ -56,20 +56,20 @@ namespace eval ::tk {
::msgcat::mcset eo "Select Log File" "Elektu prokolodosieron"
::msgcat::mcset eo "Select a file to source" "Elektu dosieron por interpreti"
::msgcat::mcset eo "&Selection:" "&Elekto:"
- ::msgcat::mcset eo "Skip Messages" "transsaltu pluajn mesa\u011dojn"
+ ::msgcat::mcset eo "Skip Messages" "transsaltu pluajn mesaĝojn"
::msgcat::mcset eo "&Source..." "&Fontoprogramo..."
::msgcat::mcset eo "Tcl Scripts" "Tcl-skriptoj"
::msgcat::mcset eo "Tcl for Windows" "Tcl por vindoso"
::msgcat::mcset eo "Text Files" "Tekstodosierojn"
::msgcat::mcset eo "&Yes" "&Jes"
- ::msgcat::mcset eo "abort" "\u0109esigo"
+ ::msgcat::mcset eo "abort" "ĉesigo"
::msgcat::mcset eo "blue" "blua"
::msgcat::mcset eo "cancel" "rezignu"
::msgcat::mcset eo "extension" "ekspansio"
::msgcat::mcset eo "extensions" "ekspansioj"
::msgcat::mcset eo "green" "verda"
::msgcat::mcset eo "ignore" "ignorieren"
- ::msgcat::mcset eo "red" "ru\u011da"
+ ::msgcat::mcset eo "red" "ruĝa"
::msgcat::mcset eo "retry" "ripetu"
::msgcat::mcset eo "yes" "jes"
}
diff --git a/library/msgs/es.msg b/library/msgs/es.msg
index 578c52c..f7082b8 100644
--- a/library/msgs/es.msg
+++ b/library/msgs/es.msg
@@ -2,7 +2,7 @@ namespace eval ::tk {
::msgcat::mcset es "&Abort" "&Abortar"
::msgcat::mcset es "&About..." "&Acerca de ..."
::msgcat::mcset es "All Files" "Todos los archivos"
- ::msgcat::mcset es "Application Error" "Error de la aplicaci\u00f3n"
+ ::msgcat::mcset es "Application Error" "Error de la aplicación"
::msgcat::mcset es "&Blue" "&Azul"
::msgcat::mcset es "Cancel" "Cancelar"
::msgcat::mcset es "&Cancel" "&Cancelar"
@@ -22,7 +22,7 @@ namespace eval ::tk {
::msgcat::mcset es "Error: %1\$s"
::msgcat::mcset es "E&xit" "Salir"
::msgcat::mcset es "&File" "&Archivo"
- ::msgcat::mcset es "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "El archivo \"%1\$s\" ya existe.\n\u00bfDesea sobreescribirlo?"
+ ::msgcat::mcset es "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "El archivo \"%1\$s\" ya existe.\n¿Desea sobreescribirlo?"
::msgcat::mcset es "File \"%1\$s\" already exists.\n\n" "El archivo \"%1\$s\" ya existe.\n\n"
::msgcat::mcset es "File \"%1\$s\" does not exist." "El archivo \"%1\$s\" no existe."
::msgcat::mcset es "File &name:" "&Nombre de archivo:"
@@ -36,7 +36,7 @@ namespace eval ::tk {
::msgcat::mcset es "Hi" "Hola"
::msgcat::mcset es "&Hide Console" "&Esconder la consola"
::msgcat::mcset es "&Ignore" "&Ignorar"
- ::msgcat::mcset es "Invalid file name \"%1\$s\"." "Nombre de archivo inv\u00e1lido \"%1\$s\"."
+ ::msgcat::mcset es "Invalid file name \"%1\$s\"." "Nombre de archivo inválido \"%1\$s\"."
::msgcat::mcset es "Log Files" "Ficheros de traza"
::msgcat::mcset es "&No"
::msgcat::mcset es "&OK"
@@ -44,33 +44,33 @@ namespace eval ::tk {
::msgcat::mcset es "Ok"
::msgcat::mcset es "Open" "Abrir"
::msgcat::mcset es "&Open" "&Abrir"
- ::msgcat::mcset es "Open Multiple Files" "Abrir m\u00faltiples archivos"
+ ::msgcat::mcset es "Open Multiple Files" "Abrir múltiples archivos"
::msgcat::mcset es "P&aste" "Peg&ar"
::msgcat::mcset es "&Quit" "&Abandonar"
::msgcat::mcset es "&Red" "&Rojo"
- ::msgcat::mcset es "Replace existing file?" "\u00bfReemplazar el archivo existente?"
+ ::msgcat::mcset es "Replace existing file?" "¿Reemplazar el archivo existente?"
::msgcat::mcset es "&Retry" "&Reintentar"
::msgcat::mcset es "&Save" "&Guardar"
::msgcat::mcset es "Save As" "Guardar como"
::msgcat::mcset es "Save To Log" "Guardar al archivo de traza"
::msgcat::mcset es "Select Log File" "Elegir un archivo de traza"
::msgcat::mcset es "Select a file to source" "Seleccionar un archivo a evaluar"
- ::msgcat::mcset es "&Selection:" "&Selecci\u00f3n:"
+ ::msgcat::mcset es "&Selection:" "&Selección:"
::msgcat::mcset es "Skip Messages" "Omitir los mensajes"
::msgcat::mcset es "&Source..." "E&valuar..."
::msgcat::mcset es "Tcl Scripts" "Scripts Tcl"
::msgcat::mcset es "Tcl for Windows" "Tcl para Windows"
::msgcat::mcset es "Text Files" "Archivos de texto"
- ::msgcat::mcset es "&Yes" "&S\u00ed"
+ ::msgcat::mcset es "&Yes" "&Sí"
::msgcat::mcset es "abort" "abortar"
::msgcat::mcset es "blue" "azul"
::msgcat::mcset es "cancel" "cancelar"
- ::msgcat::mcset es "extension" "extensi\u00f3n"
+ ::msgcat::mcset es "extension" "extensión"
::msgcat::mcset es "extensions" "extensiones"
::msgcat::mcset es "green" "verde"
::msgcat::mcset es "ignore" "ignorar"
::msgcat::mcset es "ok"
::msgcat::mcset es "red" "rojo"
::msgcat::mcset es "retry" "reintentar"
- ::msgcat::mcset es "yes" "s\u00ed"
+ ::msgcat::mcset es "yes" "sí"
}
diff --git a/library/msgs/fr.msg b/library/msgs/fr.msg
index 7f42aca..cab8c50 100644
--- a/library/msgs/fr.msg
+++ b/library/msgs/fr.msg
@@ -1,26 +1,26 @@
namespace eval ::tk {
::msgcat::mcset fr "&Abort" "&Annuler"
- ::msgcat::mcset fr "About..." "\u00c0 propos..."
+ ::msgcat::mcset fr "About..." "À propos..."
::msgcat::mcset fr "All Files" "Tous les fichiers"
::msgcat::mcset fr "Application Error" "Erreur d'application"
::msgcat::mcset fr "&Blue" "&Bleu"
::msgcat::mcset fr "Cancel" "Annuler"
::msgcat::mcset fr "&Cancel" "&Annuler"
- ::msgcat::mcset fr "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossible d'acc\u00e9der au r\u00e9pertoire \"%1\$s\".\nPermission refus\u00e9e."
- ::msgcat::mcset fr "Choose Directory" "Choisir r\u00e9pertoire"
+ ::msgcat::mcset fr "Cannot change to the directory \"%1\$s\".\nPermission denied." "Impossible d'accéder au répertoire \"%1\$s\".\nPermission refusée."
+ ::msgcat::mcset fr "Choose Directory" "Choisir répertoire"
::msgcat::mcset fr "Cl&ear" "Effacer"
::msgcat::mcset fr "Color" "Couleur"
::msgcat::mcset fr "Console"
::msgcat::mcset fr "Copy" "Copier"
::msgcat::mcset fr "Cu&t" "Couper"
::msgcat::mcset fr "Delete" "Effacer"
- ::msgcat::mcset fr "Details >>" "D\u00e9tails >>"
- ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." "Le r\u00e9pertoire \"%1\$s\" n'existe pas."
- ::msgcat::mcset fr "&Directory:" "&R\u00e9pertoire:"
+ ::msgcat::mcset fr "Details >>" "Détails >>"
+ ::msgcat::mcset fr "Directory \"%1\$s\" does not exist." "Le répertoire \"%1\$s\" n'existe pas."
+ ::msgcat::mcset fr "&Directory:" "&Répertoire:"
::msgcat::mcset fr "Error: %1\$s" "Erreur: %1\$s"
::msgcat::mcset fr "E&xit" "Quitter"
- ::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\nVoulez-vous l'\u00e9craser?"
- ::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe d\u00e9j\u00e0.\n\n"
+ ::msgcat::mcset fr "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Le fichier \"%1\$s\" existe déjà.\nVoulez-vous l'écraser?"
+ ::msgcat::mcset fr "File \"%1\$s\" already exists.\n\n" "Le fichier \"%1\$s\" existe déjà.\n\n"
::msgcat::mcset fr "File \"%1\$s\" does not exist." "Le fichier \"%1\$s\" n'existe pas."
::msgcat::mcset fr "File &name:" "&Nom de fichier:"
::msgcat::mcset fr "File &names:" "&Noms de fichiers:"
@@ -45,15 +45,15 @@ namespace eval ::tk {
::msgcat::mcset fr "&Quit" "&Quitter"
::msgcat::mcset fr "&Red" "&Rouge"
::msgcat::mcset fr "Replace existing file?" "Remplacer le fichier existant?"
- ::msgcat::mcset fr "&Retry" "&R\u00e9-essayer"
+ ::msgcat::mcset fr "&Retry" "&Ré-essayer"
::msgcat::mcset fr "&Save" "&Sauvegarder"
::msgcat::mcset fr "Save As" "Sauvegarder sous"
::msgcat::mcset fr "Save To Log" "Sauvegarde au fichier de trace"
::msgcat::mcset fr "Select Log File" "Choisir un fichier de trace"
- ::msgcat::mcset fr "Select a file to source" "Choisir un fichier \u00e0 \u00e9valuer"
- ::msgcat::mcset fr "&Selection:" "&S\u00e9lection:"
+ ::msgcat::mcset fr "Select a file to source" "Choisir un fichier à évaluer"
+ ::msgcat::mcset fr "&Selection:" "&Sélection:"
::msgcat::mcset fr "Skip Messages" "Omettre les messages"
- ::msgcat::mcset fr "&Source..." "\u00c9valuer..."
+ ::msgcat::mcset fr "&Source..." "Évaluer..."
::msgcat::mcset fr "Tcl Scripts" "Scripts Tcl"
::msgcat::mcset fr "Tcl for Windows" "Tcl pour Windows"
::msgcat::mcset fr "Text Files" "Fichiers texte"
@@ -67,6 +67,6 @@ namespace eval ::tk {
::msgcat::mcset fr "ignore" "ignorer"
::msgcat::mcset fr "ok"
::msgcat::mcset fr "red" "rouge"
- ::msgcat::mcset fr "retry" "r\u00e9essayer"
+ ::msgcat::mcset fr "retry" "réessayer"
::msgcat::mcset fr "yes" "oui"
}
diff --git a/library/msgs/hu.msg b/library/msgs/hu.msg
index 38ef0b8..6d60cc6 100644
--- a/library/msgs/hu.msg
+++ b/library/msgs/hu.msg
@@ -1,78 +1,78 @@
namespace eval ::tk {
- ::msgcat::mcset hu "&Abort" "&Megszak\u00edt\u00e1s"
- ::msgcat::mcset hu "&About..." "N\u00e9vjegy..."
- ::msgcat::mcset hu "All Files" "Minden f\u00e1jl"
- ::msgcat::mcset hu "Application Error" "Alkalmaz\u00e1s hiba"
- ::msgcat::mcset hu "&Blue" "&K\u00e9k"
- ::msgcat::mcset hu "Cancel" "M\u00e9gsem"
- ::msgcat::mcset hu "&Cancel" "M\u00e9g&sem"
- ::msgcat::mcset hu "Cannot change to the directory \"%1\$s\".\nPermission denied." "A k\u00f6nyvt\u00e1rv\u00e1lt\u00e1s nem siker\u00fclt: \"%1\$s\".\nHozz\u00e1f\u00e9r\u00e9s megtagadva."
- ::msgcat::mcset hu "Choose Directory" "K\u00f6nyvt\u00e1r kiv\u00e1laszt\u00e1sa"
- ::msgcat::mcset hu "Cl&ear" "T\u00f6rl\u00e9s"
- ::msgcat::mcset hu "&Clear Console" "&T\u00f6rl\u00e9s Konzol"
- ::msgcat::mcset hu "Color" "Sz\u00edn"
+ ::msgcat::mcset hu "&Abort" "&Megszakítás"
+ ::msgcat::mcset hu "&About..." "Névjegy..."
+ ::msgcat::mcset hu "All Files" "Minden fájl"
+ ::msgcat::mcset hu "Application Error" "Alkalmazás hiba"
+ ::msgcat::mcset hu "&Blue" "&Kék"
+ ::msgcat::mcset hu "Cancel" "Mégsem"
+ ::msgcat::mcset hu "&Cancel" "Még&sem"
+ ::msgcat::mcset hu "Cannot change to the directory \"%1\$s\".\nPermission denied." "A könyvtárváltás nem sikerült: \"%1\$s\".\nHozzáférés megtagadva."
+ ::msgcat::mcset hu "Choose Directory" "Könyvtár kiválasztása"
+ ::msgcat::mcset hu "Cl&ear" "Törlés"
+ ::msgcat::mcset hu "&Clear Console" "&Törlés Konzol"
+ ::msgcat::mcset hu "Color" "Szín"
::msgcat::mcset hu "Console" "Konzol"
- ::msgcat::mcset hu "&Copy" "&M\u00e1sol\u00e1s"
- ::msgcat::mcset hu "Cu&t" "&Kiv\u00e1g\u00e1s"
- ::msgcat::mcset hu "&Delete" "&T\u00f6rl\u00e9s"
- ::msgcat::mcset hu "Details >>" "R\u00e9szletek >>"
- ::msgcat::mcset hu "Directory \"%1\$s\" does not exist." "\"%1\$s\" k\u00f6nyvt\u00e1r nem l\u00e9tezik."
- ::msgcat::mcset hu "&Directory:" "&K\u00f6nyvt\u00e1r:"
+ ::msgcat::mcset hu "&Copy" "&Másolás"
+ ::msgcat::mcset hu "Cu&t" "&Kivágás"
+ ::msgcat::mcset hu "&Delete" "&Törlés"
+ ::msgcat::mcset hu "Details >>" "Részletek >>"
+ ::msgcat::mcset hu "Directory \"%1\$s\" does not exist." "\"%1\$s\" könyvtár nem létezik."
+ ::msgcat::mcset hu "&Directory:" "&Könyvtár:"
#::msgcat::mcset hu "&Edit"
::msgcat::mcset hu "Error: %1\$s" "Hiba: %1\$s"
- ::msgcat::mcset hu "E&xit" "Kil\u00e9p\u00e9s"
- ::msgcat::mcset hu "&File" "&F\u00e1jl"
- ::msgcat::mcset hu "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "\"%1\$s\" f\u00e1jl m\u00e1r l\u00e9tezik.\nFel\u00fcl\u00edrjam?"
- ::msgcat::mcset hu "File \"%1\$s\" already exists.\n\n" "\"%1\$s\" f\u00e1jl m\u00e1r l\u00e9tezik.\n\n"
- ::msgcat::mcset hu "File \"%1\$s\" does not exist." "\"%1\$s\" f\u00e1jl nem l\u00e9tezik."
- ::msgcat::mcset hu "File &name:" "F\u00e1jl &neve:"
- ::msgcat::mcset hu "File &names:" "F\u00e1jlok &nevei:"
- ::msgcat::mcset hu "Files of &type:" "F\u00e1jlok &t\u00edpusa:"
- ::msgcat::mcset hu "Fi&les:" "F\u00e1j&lok:"
- ::msgcat::mcset hu "&Filter" "&Sz\u0171r\u0151"
- ::msgcat::mcset hu "Fil&ter:" "S&z\u0171r\u0151:"
- ::msgcat::mcset hu "&Green" "&Z\u00f6ld"
+ ::msgcat::mcset hu "E&xit" "Kilépés"
+ ::msgcat::mcset hu "&File" "&Fájl"
+ ::msgcat::mcset hu "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "\"%1\$s\" fájl már létezik.\nFelülírjam?"
+ ::msgcat::mcset hu "File \"%1\$s\" already exists.\n\n" "\"%1\$s\" fájl már létezik.\n\n"
+ ::msgcat::mcset hu "File \"%1\$s\" does not exist." "\"%1\$s\" fájl nem létezik."
+ ::msgcat::mcset hu "File &name:" "Fájl &neve:"
+ ::msgcat::mcset hu "File &names:" "Fájlok &nevei:"
+ ::msgcat::mcset hu "Files of &type:" "Fájlok &típusa:"
+ ::msgcat::mcset hu "Fi&les:" "Fáj&lok:"
+ ::msgcat::mcset hu "&Filter" "&Szűrő"
+ ::msgcat::mcset hu "Fil&ter:" "S&zűrő:"
+ ::msgcat::mcset hu "&Green" "&Zöld"
#::msgcat::mcset hu "&Help"
- ::msgcat::mcset hu "Hi" "\u00dcdv"
- ::msgcat::mcset hu "&Hide Console" "Konzol &elrejt\u00e9se"
- ::msgcat::mcset hu "&Ignore" "K&ihagy\u00e1s"
- ::msgcat::mcset hu "Invalid file name \"%1\$s\"." "\u00c9rv\u00e9nytelen f\u00e1jln\u00e9v: \"%1\$s\"."
- ::msgcat::mcset hu "Log Files" "Log f\u00e1jlok"
+ ::msgcat::mcset hu "Hi" "Üdv"
+ ::msgcat::mcset hu "&Hide Console" "Konzol &elrejtése"
+ ::msgcat::mcset hu "&Ignore" "K&ihagyás"
+ ::msgcat::mcset hu "Invalid file name \"%1\$s\"." "Érvénytelen fájlnév: \"%1\$s\"."
+ ::msgcat::mcset hu "Log Files" "Log fájlok"
::msgcat::mcset hu "&No" "&Nem"
::msgcat::mcset hu "&OK"
::msgcat::mcset hu "OK"
::msgcat::mcset hu "Ok"
- ::msgcat::mcset hu "Open" "Megnyit\u00e1s"
- ::msgcat::mcset hu "&Open" "&Megnyit\u00e1s"
- ::msgcat::mcset hu "Open Multiple Files" "T\u00f6bb f\u00e1jl megnyit\u00e1sa"
- ::msgcat::mcset hu "P&aste" "&Beilleszt\u00e9s"
- ::msgcat::mcset hu "&Quit" "&Kil\u00e9p\u00e9s"
- ::msgcat::mcset hu "&Red" "&V\u00f6r\u00f6s"
- ::msgcat::mcset hu "Replace existing file?" "Megl\u00e9v\u0151 f\u00e1jl cser\u00e9je?"
- ::msgcat::mcset hu "&Retry" "\u00daj&ra"
- ::msgcat::mcset hu "&Save" "&Ment\u00e9s"
- ::msgcat::mcset hu "Save As" "Ment\u00e9s m\u00e1sk\u00e9nt"
- ::msgcat::mcset hu "Save To Log" "Ment\u00e9s log f\u00e1jlba"
- ::msgcat::mcset hu "Select Log File" "Log f\u00e1jl kiv\u00e1laszt\u00e1sa"
- ::msgcat::mcset hu "Select a file to source" "Forr\u00e1sf\u00e1jl kiv\u00e1laszt\u00e1sa"
- ::msgcat::mcset hu "&Selection:" "&Kijel\u00f6l\u00e9s:"
- ::msgcat::mcset hu "Show &Hidden Directories" "&Rejtett k\u00f6nyvt\u00e1rak megjelen\u00edt\u00e9se"
- ::msgcat::mcset hu "Show &Hidden Files and Directories" "&Rejtett f\u00e1jlok \u00e9s k\u00f6nyvt\u00e1rak megjelen\u00edt\u00e9se"
- ::msgcat::mcset hu "Skip Messages" "\u00dczenetek kihagy\u00e1sa"
- ::msgcat::mcset hu "&Source..." "&Forr\u00e1s..."
+ ::msgcat::mcset hu "Open" "Megnyitás"
+ ::msgcat::mcset hu "&Open" "&Megnyitás"
+ ::msgcat::mcset hu "Open Multiple Files" "Több fájl megnyitása"
+ ::msgcat::mcset hu "P&aste" "&Beillesztés"
+ ::msgcat::mcset hu "&Quit" "&Kilépés"
+ ::msgcat::mcset hu "&Red" "&Vörös"
+ ::msgcat::mcset hu "Replace existing file?" "Meglévő fájl cseréje?"
+ ::msgcat::mcset hu "&Retry" "Új&ra"
+ ::msgcat::mcset hu "&Save" "&Mentés"
+ ::msgcat::mcset hu "Save As" "Mentés másként"
+ ::msgcat::mcset hu "Save To Log" "Mentés log fájlba"
+ ::msgcat::mcset hu "Select Log File" "Log fájl kiválasztása"
+ ::msgcat::mcset hu "Select a file to source" "Forrásfájl kiválasztása"
+ ::msgcat::mcset hu "&Selection:" "&Kijelölés:"
+ ::msgcat::mcset hu "Show &Hidden Directories" "&Rejtett könyvtárak megjelenítése"
+ ::msgcat::mcset hu "Show &Hidden Files and Directories" "&Rejtett fájlok és könyvtárak megjelenítése"
+ ::msgcat::mcset hu "Skip Messages" "Üzenetek kihagyása"
+ ::msgcat::mcset hu "&Source..." "&Forrás..."
::msgcat::mcset hu "Tcl Scripts" "Tcl scriptek"
::msgcat::mcset hu "Tcl for Windows" "Tcl Windows-hoz"
- ::msgcat::mcset hu "Text Files" "Sz\u00f6vegf\u00e1jlok"
+ ::msgcat::mcset hu "Text Files" "Szövegfájlok"
::msgcat::mcset hu "&Yes" "&Igen"
- ::msgcat::mcset hu "abort" "megszak\u00edt\u00e1s"
- ::msgcat::mcset hu "blue" "k\u00e9k"
- ::msgcat::mcset hu "cancel" "m\u00e9gsem"
- ::msgcat::mcset hu "extension" "kiterjeszt\u00e9s"
- ::msgcat::mcset hu "extensions" "kiterjeszt\u00e9sek"
- ::msgcat::mcset hu "green" "z\u00f6ld"
+ ::msgcat::mcset hu "abort" "megszakítás"
+ ::msgcat::mcset hu "blue" "kék"
+ ::msgcat::mcset hu "cancel" "mégsem"
+ ::msgcat::mcset hu "extension" "kiterjesztés"
+ ::msgcat::mcset hu "extensions" "kiterjesztések"
+ ::msgcat::mcset hu "green" "zöld"
::msgcat::mcset hu "ignore" "ignorer"
::msgcat::mcset hu "ok"
- ::msgcat::mcset hu "red" "v\u00f6r\u00f6s"
- ::msgcat::mcset hu "retry" "\u00fajra"
+ ::msgcat::mcset hu "red" "vörös"
+ ::msgcat::mcset hu "retry" "újra"
::msgcat::mcset hu "yes" "igen"
}
diff --git a/library/msgs/it.msg b/library/msgs/it.msg
index 2e1b4bd..f6ad124 100644
--- a/library/msgs/it.msg
+++ b/library/msgs/it.msg
@@ -20,8 +20,8 @@ namespace eval ::tk {
::msgcat::mcset it "&Directory:"
::msgcat::mcset it "Error: %1\$s" "Errore: %1\$s"
::msgcat::mcset it "E&xit" "Esci"
- ::msgcat::mcset it "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Il file \"%1\$s\" esiste gi\u00e0.\nVuoi sovrascriverlo?"
- ::msgcat::mcset it "File \"%1\$s\" already exists.\n\n" "Il file \"%1\$s\" esiste gi\u00e0.\n\n"
+ ::msgcat::mcset it "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Il file \"%1\$s\" esiste già.\nVuoi sovrascriverlo?"
+ ::msgcat::mcset it "File \"%1\$s\" already exists.\n\n" "Il file \"%1\$s\" esiste già.\n\n"
::msgcat::mcset it "File \"%1\$s\" does not exist." "Il file \"%1\$s\" non esiste."
::msgcat::mcset it "File &name:" "&Nome del file:"
::msgcat::mcset it "File &names:" "&Nomi dei file:"
@@ -58,7 +58,7 @@ namespace eval ::tk {
::msgcat::mcset it "Tcl Scripts" "Script Tcl"
::msgcat::mcset it "Tcl for Windows" "Tcl per Windows"
::msgcat::mcset it "Text Files" "File di testo"
- ::msgcat::mcset it "&Yes" "&S\u00ec"
+ ::msgcat::mcset it "&Yes" "&Sì"
::msgcat::mcset it "abort" "interrompi"
::msgcat::mcset it "blue" "blu"
::msgcat::mcset it "cancel" "annulla"
@@ -69,5 +69,5 @@ namespace eval ::tk {
::msgcat::mcset it "ok"
::msgcat::mcset it "red" "rosso"
::msgcat::mcset it "retry" "riprova"
- ::msgcat::mcset it "yes" "s\u00ec"
+ ::msgcat::mcset it "yes" "sì"
}
diff --git a/library/msgs/nl.msg b/library/msgs/nl.msg
index 148a9e6..fd0348b 100644
--- a/library/msgs/nl.msg
+++ b/library/msgs/nl.msg
@@ -15,7 +15,7 @@ namespace eval ::tk {
::msgcat::mcset nl "&Clear Console" "&Wis Console"
::msgcat::mcset nl "Color" "Kleur"
::msgcat::mcset nl "Console"
- ::msgcat::mcset nl "&Copy" "Kopi\u00ebren"
+ ::msgcat::mcset nl "&Copy" "Kopiëren"
::msgcat::mcset nl "Cu&t" "Knippen"
::msgcat::mcset nl "&Delete" "Wissen"
::msgcat::mcset nl "Details >>"
@@ -24,7 +24,7 @@ namespace eval ::tk {
::msgcat::mcset nl "&Edit" "Bewerken"
::msgcat::mcset nl "Effects" "Effecten"
::msgcat::mcset nl "Error: %1\$s" "Fout: %1\$s"
- ::msgcat::mcset nl "E&xit" "Be\u00ebindigen"
+ ::msgcat::mcset nl "E&xit" "Beëindigen"
::msgcat::mcset nl "&File" "Bestand"
::msgcat::mcset nl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Bestand \"%1\$s\" bestaat al.\nWilt u het overschrijven?"
::msgcat::mcset nl "File \"%1\$s\" already exists.\n\n" "Bestand \"%1\$s\" bestaat al.\n\n"
@@ -40,7 +40,7 @@ namespace eval ::tk {
::msgcat::mcset nl "Font st&yle:" "Font stijl:"
::msgcat::mcset nl "&Green" "&Groen"
::msgcat::mcset nl "&Help"
- ::msgcat::mcset nl "Hi" "H\u00e9"
+ ::msgcat::mcset nl "Hi" "Hé"
::msgcat::mcset nl "&Hide Console" "Verberg Console"
::msgcat::mcset nl "&Ignore" "&Negeren"
::msgcat::mcset nl "Invalid file name \"%1\$s\"." "Ongeldige bestandsnaam \"%1\$s\"."
diff --git a/library/msgs/pl.msg b/library/msgs/pl.msg
index c20f41e..f616397 100644
--- a/library/msgs/pl.msg
+++ b/library/msgs/pl.msg
@@ -2,35 +2,35 @@ namespace eval ::tk {
::msgcat::mcset pl "&Abort" "&Przerwij"
::msgcat::mcset pl "&About..." "O programie..."
::msgcat::mcset pl "All Files" "Wszystkie pliki"
- ::msgcat::mcset pl "Application Error" "B\u0142\u0105d w programie"
+ ::msgcat::mcset pl "Application Error" "Błąd w programie"
::msgcat::mcset pl "&Apply" "Zastosuj"
::msgcat::mcset pl "Bold" "Pogrubienie"
::msgcat::mcset pl "Bold Italic" "Pogrubiona kursywa"
::msgcat::mcset pl "&Blue" "&Niebieski"
::msgcat::mcset pl "Cancel" "Anuluj"
::msgcat::mcset pl "&Cancel" "&Anuluj"
- ::msgcat::mcset pl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nie mo\u017cna otworzy\u0107 katalogu \"%1\$s\".\nOdmowa dost\u0119pu."
+ ::msgcat::mcset pl "Cannot change to the directory \"%1\$s\".\nPermission denied." "Nie można otworzyć katalogu \"%1\$s\".\nOdmowa dostępu."
::msgcat::mcset pl "Choose Directory" "Wybierz katalog"
- ::msgcat::mcset pl "Cl&ear" "&Wyczy\u015b\u0107"
- ::msgcat::mcset pl "&Clear Console" "&Wyczy\u015b\u0107 konsol\u0119"
+ ::msgcat::mcset pl "Cl&ear" "&Wyczyść"
+ ::msgcat::mcset pl "&Clear Console" "&Wyczyść konsolę"
::msgcat::mcset pl "Color" "Kolor"
::msgcat::mcset pl "Console" "Konsola"
::msgcat::mcset pl "&Copy" "&Kopiuj"
::msgcat::mcset pl "Cu&t" "&Wytnij"
- ::msgcat::mcset pl "&Delete" "&Usu\u0144"
- ::msgcat::mcset pl "Details >>" "Szczeg\u00f3\u0142y >>"
+ ::msgcat::mcset pl "&Delete" "&Usuń"
+ ::msgcat::mcset pl "Details >>" "Szczegóły >>"
::msgcat::mcset pl "Directory \"%1\$s\" does not exist." "Katalog \"%1\$s\" nie istnieje."
::msgcat::mcset pl "&Directory:" "&Katalog:"
::msgcat::mcset pl "&Edit" "&Edytuj"
::msgcat::mcset pl "Effects" "Efekty"
- ::msgcat::mcset pl "Error: %1\$s" "B\u0142\u0105d: %1\$s"
- ::msgcat::mcset pl "E&xit" "&Wyjd\u017a"
+ ::msgcat::mcset pl "Error: %1\$s" "Błąd: %1\$s"
+ ::msgcat::mcset pl "E&xit" "&Wyjdź"
::msgcat::mcset pl "&File" "&Plik"
- ::msgcat::mcset pl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Plik \"%1\$s\" ju\u017c istnieje.\nCzy chcesz go nadpisa\u0107?"
- ::msgcat::mcset pl "File \"%1\$s\" already exists.\n\n" "Plik \"%1\$s\" ju\u017c istnieje.\n\n"
+ ::msgcat::mcset pl "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Plik \"%1\$s\" już istnieje.\nCzy chcesz go nadpisać?"
+ ::msgcat::mcset pl "File \"%1\$s\" already exists.\n\n" "Plik \"%1\$s\" już istnieje.\n\n"
::msgcat::mcset pl "File \"%1\$s\" does not exist." "Plik \"%1\$s\" nie istnieje."
::msgcat::mcset pl "File &name:" "Nazwa &pliku:"
- ::msgcat::mcset pl "File &names:" "Nazwy &plik\u00f3w:"
+ ::msgcat::mcset pl "File &names:" "Nazwy &plików:"
::msgcat::mcset pl "Files of &type:" "Pliki &typu:"
::msgcat::mcset pl "Fi&les:" "Pli&ki:"
::msgcat::mcset pl "&Filter" "&Filtr"
@@ -41,41 +41,41 @@ namespace eval ::tk {
::msgcat::mcset pl "&Green" "&Zielony"
::msgcat::mcset pl "&Help" "&Pomoc"
::msgcat::mcset pl "Hi" "Witaj"
- ::msgcat::mcset pl "&Hide Console" "&Ukryj konsol\u0119"
+ ::msgcat::mcset pl "&Hide Console" "&Ukryj konsolę"
::msgcat::mcset pl "&Ignore" "&Ignoruj"
- ::msgcat::mcset pl "Invalid file name \"%1\$s\"." "Niew\u0142a\u015bciwa nazwa pliku \"%1\$s\"."
+ ::msgcat::mcset pl "Invalid file name \"%1\$s\"." "Niewłaściwa nazwa pliku \"%1\$s\"."
::msgcat::mcset pl "Italic" "Kursywa"
::msgcat::mcset pl "Log Files" "Pliki dziennika"
::msgcat::mcset pl "&No" "&Nie"
::msgcat::mcset pl "&OK"
::msgcat::mcset pl "OK"
::msgcat::mcset pl "Ok"
- ::msgcat::mcset pl "Open" "Otw\u00f3rz"
- ::msgcat::mcset pl "&Open" "&Otw\u00f3rz"
- ::msgcat::mcset pl "Open Multiple Files" "Otw\u00f3rz wiele plik\u00f3w"
+ ::msgcat::mcset pl "Open" "Otwórz"
+ ::msgcat::mcset pl "&Open" "&Otwórz"
+ ::msgcat::mcset pl "Open Multiple Files" "Otwórz wiele plików"
::msgcat::mcset pl "P&aste" "&Wklej"
- ::msgcat::mcset pl "&Quit" "&Zako\u0144cz"
+ ::msgcat::mcset pl "&Quit" "&Zakończ"
::msgcat::mcset pl "&Red" "&Czerwony"
::msgcat::mcset pl "Regular" "Regularne"
- ::msgcat::mcset pl "Replace existing file?" "Czy zast\u0105pi\u0107 istniej\u0105cy plik?"
- ::msgcat::mcset pl "&Retry" "&Pon\u00f3w"
- ::msgcat::mcset pl "Sample" "Przyk\u0142ad"
+ ::msgcat::mcset pl "Replace existing file?" "Czy zastąpić istniejący plik?"
+ ::msgcat::mcset pl "&Retry" "&Ponów"
+ ::msgcat::mcset pl "Sample" "Przykład"
::msgcat::mcset pl "&Save" "&Zapisz"
::msgcat::mcset pl "Save As" "Zapisz jako"
::msgcat::mcset pl "Save To Log" "Wpisz do dziennika"
::msgcat::mcset pl "Select Log File" "Wybierz plik dziennika"
::msgcat::mcset pl "Select a file to source" "Wybierz plik do wykonania"
- ::msgcat::mcset pl "&Selection:" "&Wyb\u00f3r:"
+ ::msgcat::mcset pl "&Selection:" "&Wybór:"
::msgcat::mcset pl "&Size:" "&Rozmiar:"
- ::msgcat::mcset pl "Show &Hidden Directories" "Poka\u017c &ukryte katalogi"
- ::msgcat::mcset pl "Show &Hidden Files and Directories" "Poka\u017c &ukryte pliki i katalogi"
- ::msgcat::mcset pl "Skip Messages" "Pomi\u0144 pozosta\u0142e komunikaty"
- ::msgcat::mcset pl "&Source..." "&Kod \u017ar\u00f3d\u0142owy..."
- ::msgcat::mcset pl "Stri&keout" "&Przekre\u015blenie"
+ ::msgcat::mcset pl "Show &Hidden Directories" "Pokaż &ukryte katalogi"
+ ::msgcat::mcset pl "Show &Hidden Files and Directories" "Pokaż &ukryte pliki i katalogi"
+ ::msgcat::mcset pl "Skip Messages" "Pomiń pozostałe komunikaty"
+ ::msgcat::mcset pl "&Source..." "&Kod źródłowy..."
+ ::msgcat::mcset pl "Stri&keout" "&Przekreślenie"
::msgcat::mcset pl "Tcl Scripts" "Skrypty Tcl"
::msgcat::mcset pl "Tcl for Windows" "Tcl dla Windows"
::msgcat::mcset pl "Text Files" "Pliki tekstowe"
- ::msgcat::mcset pl "&Underline" "Po&dkre\u015blenie"
+ ::msgcat::mcset pl "&Underline" "Po&dkreślenie"
::msgcat::mcset pl "&Yes" "&Tak"
::msgcat::mcset pl "abort" "przerwij"
::msgcat::mcset pl "blue" "niebieski"
@@ -86,6 +86,6 @@ namespace eval ::tk {
::msgcat::mcset pl "ignore" "ignoruj"
::msgcat::mcset pl "ok"
::msgcat::mcset pl "red" "czerwony"
- ::msgcat::mcset pl "retry" "pon\u00f3w"
+ ::msgcat::mcset pl "retry" "ponów"
::msgcat::mcset pl "yes" "tak"
}
diff --git a/library/msgs/pt.msg b/library/msgs/pt.msg
index c29e293..91c7f7a 100644
--- a/library/msgs/pt.msg
+++ b/library/msgs/pt.msg
@@ -2,12 +2,12 @@ namespace eval ::tk {
::msgcat::mcset pt "&Abort" "&Abortar"
::msgcat::mcset pt "About..." "Sobre ..."
::msgcat::mcset pt "All Files" "Todos os arquivos"
- ::msgcat::mcset pt "Application Error" "Erro de aplica\u00e7\u00e3o"
+ ::msgcat::mcset pt "Application Error" "Erro de aplicação"
::msgcat::mcset pt "&Blue" "&Azul"
::msgcat::mcset pt "Cancel" "Cancelar"
::msgcat::mcset pt "&Cancel" "&Cancelar"
- ::msgcat::mcset pt "Cannot change to the directory \"%1\$s\".\nPermission denied." "N\u00e3o foi poss\u00edvel mudar para o diret\u00f3rio \"%1\$s\".\nPermiss\u00e3o negada."
- ::msgcat::mcset pt "Choose Directory" "Escolha um diret\u00f3rio"
+ ::msgcat::mcset pt "Cannot change to the directory \"%1\$s\".\nPermission denied." "Não foi possível mudar para o diretório \"%1\$s\".\nPermissão negada."
+ ::msgcat::mcset pt "Choose Directory" "Escolha um diretório"
::msgcat::mcset pt "Cl&ear" "Apagar"
::msgcat::mcset pt "&Clear Console" "Apagar Console"
::msgcat::mcset pt "Color" "Cor"
@@ -16,14 +16,14 @@ namespace eval ::tk {
::msgcat::mcset pt "Cu&t" "Recortar"
::msgcat::mcset pt "&Delete" "Excluir"
::msgcat::mcset pt "Details >>" "Detalhes >>"
- ::msgcat::mcset pt "Directory \"%1\$s\" does not exist." "O diret\u00f3rio \"%1\$s\" n\u00e3o existe."
- ::msgcat::mcset pt "&Directory:" "&Diret\u00f3rio:"
+ ::msgcat::mcset pt "Directory \"%1\$s\" does not exist." "O diretório \"%1\$s\" não existe."
+ ::msgcat::mcset pt "&Directory:" "&Diretório:"
::msgcat::mcset pt "Error: %1\$s" "Erro: %1\$s"
::msgcat::mcset pt "E&xit" "Sair"
::msgcat::mcset pt "&File" "Arquivo"
- ::msgcat::mcset pt "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "O arquivo \"%1\$s\" j\u00e1 existe.\nDeseja sobrescreve-lo?"
- ::msgcat::mcset pt "File \"%1\$s\" already exists.\n\n" "O arquivo \"%1\$s\" j\u00e1 existe.\n\n"
- ::msgcat::mcset pt "File \"%1\$s\" does not exist." "Arquivo \"%1\$s\" n\u00e3o existe."
+ ::msgcat::mcset pt "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "O arquivo \"%1\$s\" já existe.\nDeseja sobrescreve-lo?"
+ ::msgcat::mcset pt "File \"%1\$s\" already exists.\n\n" "O arquivo \"%1\$s\" já existe.\n\n"
+ ::msgcat::mcset pt "File \"%1\$s\" does not exist." "Arquivo \"%1\$s\" não existe."
::msgcat::mcset pt "File &name:" "&Nome do arquivo:"
::msgcat::mcset pt "File &names:" "&Nomes dos arquivos:"
::msgcat::mcset pt "Files of &type:" "Arquivos do &tipo:"
@@ -34,15 +34,15 @@ namespace eval ::tk {
::msgcat::mcset pt "Hi" "Oi"
::msgcat::mcset pt "&Hide Console" "Ocultar console"
::msgcat::mcset pt "&Ignore" "&Ignorar"
- ::msgcat::mcset pt "Invalid file name \"%1\$s\"." "O nome do arquivo \u00e9 inv\u00e1lido \"%1\$s\"."
+ ::msgcat::mcset pt "Invalid file name \"%1\$s\"." "O nome do arquivo é inválido \"%1\$s\"."
::msgcat::mcset pt "Log Files" "Arquivos de log"
- ::msgcat::mcset pt "&No" "&N\u00e3o"
+ ::msgcat::mcset pt "&No" "&Não"
::msgcat::mcset pt "&OK"
::msgcat::mcset pt "OK"
::msgcat::mcset pt "Ok"
::msgcat::mcset pt "Open" "Abrir"
::msgcat::mcset pt "&Open" "&Abrir"
- ::msgcat::mcset pt "Open Multiple Files" "Abrir m\u00faltiplos arquivos"
+ ::msgcat::mcset pt "Open Multiple Files" "Abrir múltiplos arquivos"
::msgcat::mcset pt "P&aste" "Col&ar"
::msgcat::mcset pt "Quit" "Encerrar"
::msgcat::mcset pt "&Red" "&Vermelho"
@@ -53,7 +53,7 @@ namespace eval ::tk {
::msgcat::mcset pt "Save To Log" "Salvar arquivo de log"
::msgcat::mcset pt "Select Log File" "Selecionar arquivo de log"
::msgcat::mcset pt "Select a file to source" "Selecione um arquivo como fonte"
- ::msgcat::mcset pt "&Selection:" "&Sele\u00e7\u00e3o:"
+ ::msgcat::mcset pt "&Selection:" "&Seleção:"
::msgcat::mcset pt "Skip Messages" "Omitir as mensagens"
::msgcat::mcset pt "&Source..." "&Fonte..."
::msgcat::mcset pt "Tcl Scripts" "Scripts Tcl"
@@ -63,8 +63,8 @@ namespace eval ::tk {
::msgcat::mcset pt "abort" "abortar"
::msgcat::mcset pt "blue" "azul"
::msgcat::mcset pt "cancel" "cancelar"
- ::msgcat::mcset pt "extension" "extens\u00e3o"
- ::msgcat::mcset pt "extensions" "extens\u00f5es"
+ ::msgcat::mcset pt "extension" "extensão"
+ ::msgcat::mcset pt "extensions" "extensões"
::msgcat::mcset pt "green" "verde"
::msgcat::mcset pt "ignore" "ignorar"
::msgcat::mcset pt "ok"
diff --git a/library/msgs/ru.msg b/library/msgs/ru.msg
index 2aac5bb..3389ce8 100644
--- a/library/msgs/ru.msg
+++ b/library/msgs/ru.msg
@@ -1,75 +1,75 @@
namespace eval ::tk {
- ::msgcat::mcset ru "&Abort" "&\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c"
- ::msgcat::mcset ru "&About..." "\u041f\u0440\u043e..."
- ::msgcat::mcset ru "All Files" "\u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b"
- ::msgcat::mcset ru "Application Error" "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435"
- ::msgcat::mcset ru "&Blue" " &\u0413\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "Cancel" "\u041e\u0442&\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "&Cancel" "\u041e\u0442&\u043c\u0435\u043d\u0430"
+ ::msgcat::mcset ru "&Abort" "&Отменить"
+ ::msgcat::mcset ru "&About..." "Про..."
+ ::msgcat::mcset ru "All Files" "Все файлы"
+ ::msgcat::mcset ru "Application Error" "Ошибка в программе"
+ ::msgcat::mcset ru "&Blue" " &Голубой"
+ ::msgcat::mcset ru "Cancel" "От&мена"
+ ::msgcat::mcset ru "&Cancel" "От&мена"
::msgcat::mcset ru "Cannot change to the directory \"%1\$s\".\nPermission denied." \
- "\u041d\u0435 \u043c\u043e\u0433\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \"%1\$s\".\n\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430"
- ::msgcat::mcset ru "Choose Directory" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433"
- ::msgcat::mcset ru "Cl&ear" "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c"
- ::msgcat::mcset ru "Color" "\u0426\u0432\u0435\u0442"
- ::msgcat::mcset ru "Console" "\u041a\u043e\u043d\u0441\u043e\u043b\u044c"
- ::msgcat::mcset ru "&Copy" "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c"
- ::msgcat::mcset ru "Cu&t" "\u0412\u044b\u0440\u0435\u0437\u0430\u0442\u044c"
- ::msgcat::mcset ru "&Delete" "\u0423\u0434\u0430\u043b\u0438\u0442\u044c"
- ::msgcat::mcset ru "Details >>" "\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 >>"
- ::msgcat::mcset ru "Directory \"%1\$s\" does not exist." "\u041a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \"%1\$s\" \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442."
- ::msgcat::mcset ru "&Directory:" "&\u041a\u0430\u0442\u0430\u043b\u043e\u0433:"
- ::msgcat::mcset ru "Error: %1\$s" "\u041e\u0448\u0438\u0431\u043a\u0430: %1\$s"
- ::msgcat::mcset ru "E&xit" "\u0412\u044b\u0445\u043e\u0434"
+ "Не могу перейти в каталог \"%1\$s\".\nНедостаточно прав доступа"
+ ::msgcat::mcset ru "Choose Directory" "Выберите каталог"
+ ::msgcat::mcset ru "Cl&ear" "Очистить"
+ ::msgcat::mcset ru "Color" "Цвет"
+ ::msgcat::mcset ru "Console" "Консоль"
+ ::msgcat::mcset ru "&Copy" "Копировать"
+ ::msgcat::mcset ru "Cu&t" "Вырезать"
+ ::msgcat::mcset ru "&Delete" "Удалить"
+ ::msgcat::mcset ru "Details >>" "Подробнее >>"
+ ::msgcat::mcset ru "Directory \"%1\$s\" does not exist." "Каталога \"%1\$s\" не существует."
+ ::msgcat::mcset ru "&Directory:" "&Каталог:"
+ ::msgcat::mcset ru "Error: %1\$s" "Ошибка: %1\$s"
+ ::msgcat::mcset ru "E&xit" "Выход"
::msgcat::mcset ru "File \"%1\$s\" already exists.\nDo you want to overwrite it?" \
- "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e?"
- ::msgcat::mcset ru "File \"%1\$s\" already exists.\n\n" "\u0424\u0430\u0439\u043b \"%1\$s\" \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\n"
- ::msgcat::mcset ru "File \"%1\$s\" does not exist." "\u0424\u0430\u0439\u043b \"%1\$s\" \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."
- ::msgcat::mcset ru "File &name:" "&\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430:"
- ::msgcat::mcset ru "File &names:" "&\u0418\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432:"
- ::msgcat::mcset ru "Files of &type:" "&\u0422\u0438\u043f \u0444\u0430\u0439\u043b\u043e\u0432:"
- ::msgcat::mcset ru "Fi&les:" "\u0424\u0430\u0439&\u043b\u044b:"
- ::msgcat::mcset ru "&Filter" "&\u0424\u0438\u043b\u044c\u0442\u0440"
- ::msgcat::mcset ru "Fil&ter:" "\u0424\u0438\u043b\u044c&\u0442\u0440:"
- ::msgcat::mcset ru "&Green" " &\u0417\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "Hi" "\u041f\u0440\u0438\u0432\u0435\u0442"
- ::msgcat::mcset ru "&Hide Console" "\u0421\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c"
- ::msgcat::mcset ru "&Ignore" "&\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c"
- ::msgcat::mcset ru "Invalid file name \"%1\$s\"." "\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \"%1\$s\"."
- ::msgcat::mcset ru "Log Files" "\u0424\u0430\u0439\u043b\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0430"
- ::msgcat::mcset ru "&No" "&\u041d\u0435\u0442"
- ::msgcat::mcset ru "&OK" "&\u041e\u041a"
- ::msgcat::mcset ru "OK" "\u041e\u041a"
- ::msgcat::mcset ru "Ok" "\u0414\u0430"
- ::msgcat::mcset ru "Open" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c"
- ::msgcat::mcset ru "&Open" "&\u041e\u0442\u043a\u0440\u044b\u0442\u044c"
- ::msgcat::mcset ru "Open Multiple Files" "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432"
- ::msgcat::mcset ru "P&aste" "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c"
- ::msgcat::mcset ru "&Quit" "\u0412\u044b\u0445\u043e\u0434"
- ::msgcat::mcset ru "&Red" " &\u041a\u0440\u0430\u0441\u043d\u044b\u0439"
- ::msgcat::mcset ru "Replace existing file?" "\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b?"
- ::msgcat::mcset ru "&Retry" "&\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"
- ::msgcat::mcset ru "&Save" "&\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"
- ::msgcat::mcset ru "Save As" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a"
- ::msgcat::mcset ru "Save To Log" "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0436\u0443\u0440\u043d\u0430\u043b"
- ::msgcat::mcset ru "Select Log File" "\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b"
- ::msgcat::mcset ru "Select a file to source" "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438"
+ "Файл \"%1\$s\" уже существует.\nЗаменить его?"
+ ::msgcat::mcset ru "File \"%1\$s\" already exists.\n\n" "Файл \"%1\$s\" уже существует.\n\n"
+ ::msgcat::mcset ru "File \"%1\$s\" does not exist." "Файл \"%1\$s\" не найден."
+ ::msgcat::mcset ru "File &name:" "&Имя файла:"
+ ::msgcat::mcset ru "File &names:" "&Имена файлов:"
+ ::msgcat::mcset ru "Files of &type:" "&Тип файлов:"
+ ::msgcat::mcset ru "Fi&les:" "Фай&лы:"
+ ::msgcat::mcset ru "&Filter" "&Фильтр"
+ ::msgcat::mcset ru "Fil&ter:" "Филь&тр:"
+ ::msgcat::mcset ru "&Green" " &Зеленый"
+ ::msgcat::mcset ru "Hi" "Привет"
+ ::msgcat::mcset ru "&Hide Console" "Спрятать консоль"
+ ::msgcat::mcset ru "&Ignore" "&Игнорировать"
+ ::msgcat::mcset ru "Invalid file name \"%1\$s\"." "Неверное имя файла \"%1\$s\"."
+ ::msgcat::mcset ru "Log Files" "Файлы журнала"
+ ::msgcat::mcset ru "&No" "&Нет"
+ ::msgcat::mcset ru "&OK" "&ОК"
+ ::msgcat::mcset ru "OK" "ОК"
+ ::msgcat::mcset ru "Ok" "Да"
+ ::msgcat::mcset ru "Open" "Открыть"
+ ::msgcat::mcset ru "&Open" "&Открыть"
+ ::msgcat::mcset ru "Open Multiple Files" "Открыть несколько файлов"
+ ::msgcat::mcset ru "P&aste" "Вставить"
+ ::msgcat::mcset ru "&Quit" "Выход"
+ ::msgcat::mcset ru "&Red" " &Красный"
+ ::msgcat::mcset ru "Replace existing file?" "Заменить существующий файл?"
+ ::msgcat::mcset ru "&Retry" "&Повторить"
+ ::msgcat::mcset ru "&Save" "&Сохранить"
+ ::msgcat::mcset ru "Save As" "Сохранить как"
+ ::msgcat::mcset ru "Save To Log" "Сохранить в журнал"
+ ::msgcat::mcset ru "Select Log File" "Выбрать журнал"
+ ::msgcat::mcset ru "Select a file to source" "Выберите файл для интерпретации"
::msgcat::mcset ru "&Selection:"
- ::msgcat::mcset ru "Skip Messages" "\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f"
- ::msgcat::mcset ru "&Source..." "\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b..."
- ::msgcat::mcset ru "Tcl Scripts" "\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 TCL"
- ::msgcat::mcset ru "Tcl for Windows" "TCL \u0434\u043b\u044f Windows"
- ::msgcat::mcset ru "Text Files" "\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b"
- ::msgcat::mcset ru "&Yes" "&\u0414\u0430"
- ::msgcat::mcset ru "abort" "\u043e\u0442\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "blue" " \u0433\u043e\u043b\u0443\u0431\u043e\u0439"
- ::msgcat::mcset ru "cancel" "\u043e\u0442\u043c\u0435\u043d\u0430"
- ::msgcat::mcset ru "extension" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435"
- ::msgcat::mcset ru "extensions" "\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f"
- ::msgcat::mcset ru "green" " \u0437\u0435\u043b\u0435\u043d\u044b\u0439"
- ::msgcat::mcset ru "ignore" "\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"
- ::msgcat::mcset ru "ok" "\u043e\u043a"
- ::msgcat::mcset ru "red" " \u043a\u0440\u0430\u0441\u043d\u044b\u0439"
- ::msgcat::mcset ru "retry" "\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"
- ::msgcat::mcset ru "yes" "\u0434\u0430"
+ ::msgcat::mcset ru "Skip Messages" "Пропустить сообщения"
+ ::msgcat::mcset ru "&Source..." "Интерпретировать файл..."
+ ::msgcat::mcset ru "Tcl Scripts" "Программа на языке TCL"
+ ::msgcat::mcset ru "Tcl for Windows" "TCL для Windows"
+ ::msgcat::mcset ru "Text Files" "Текстовые файлы"
+ ::msgcat::mcset ru "&Yes" "&Да"
+ ::msgcat::mcset ru "abort" "отмена"
+ ::msgcat::mcset ru "blue" " голубой"
+ ::msgcat::mcset ru "cancel" "отмена"
+ ::msgcat::mcset ru "extension" "расширение"
+ ::msgcat::mcset ru "extensions" "расширения"
+ ::msgcat::mcset ru "green" " зеленый"
+ ::msgcat::mcset ru "ignore" "пропустить"
+ ::msgcat::mcset ru "ok" "ок"
+ ::msgcat::mcset ru "red" " красный"
+ ::msgcat::mcset ru "retry" "повторить"
+ ::msgcat::mcset ru "yes" "да"
}
diff --git a/library/msgs/sv.msg b/library/msgs/sv.msg
index 62bfcbd..a1ef8c5 100644
--- a/library/msgs/sv.msg
+++ b/library/msgs/sv.msg
@@ -3,14 +3,14 @@ namespace eval ::tk {
::msgcat::mcset sv "&About..." "&Om..."
::msgcat::mcset sv "All Files" "Samtliga filer"
::msgcat::mcset sv "Application Error" "Programfel"
- ::msgcat::mcset sv "&Blue" "&Bl\u00e5"
+ ::msgcat::mcset sv "&Blue" "&Blå"
::msgcat::mcset sv "Cancel" "Avbryt"
::msgcat::mcset sv "&Cancel" "&Avbryt"
- ::msgcat::mcset sv "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan ej n\u00e5 mappen \"%1\$s\".\nSaknar r\u00e4ttigheter."
- ::msgcat::mcset sv "Choose Directory" "V\u00e4lj mapp"
+ ::msgcat::mcset sv "Cannot change to the directory \"%1\$s\".\nPermission denied." "Kan ej nå mappen \"%1\$s\".\nSaknar rättigheter."
+ ::msgcat::mcset sv "Choose Directory" "Välj mapp"
::msgcat::mcset sv "Cl&ear" "&Radera"
::msgcat::mcset sv "&Clear Console" "&Radera konsollen"
- ::msgcat::mcset sv "Color" "F\u00e4rg"
+ ::msgcat::mcset sv "Color" "Färg"
::msgcat::mcset sv "Console" "Konsoll"
::msgcat::mcset sv "&Copy" "&Kopiera"
::msgcat::mcset sv "Cu&t" "Klipp u&t"
@@ -22,7 +22,7 @@ namespace eval ::tk {
::msgcat::mcset sv "Error: %1\$s" "Fel: %1\$s"
::msgcat::mcset sv "E&xit" "&Avsluta"
::msgcat::mcset sv "&File" "&Fil"
- ::msgcat::mcset sv "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Filen \"%1\$s\" finns redan.\nVill du skriva \u00f6ver den?"
+ ::msgcat::mcset sv "File \"%1\$s\" already exists.\nDo you want to overwrite it?" "Filen \"%1\$s\" finns redan.\nVill du skriva över den?"
::msgcat::mcset sv "File \"%1\$s\" already exists.\n\n" "Filen \"%1\$s\" finns redan.\n\n"
::msgcat::mcset sv "File \"%1\$s\" does not exist." "Filen \"%1\$s\" finns ej."
::msgcat::mcset sv "File &name:" "Fil&namn:"
@@ -31,10 +31,10 @@ namespace eval ::tk {
::msgcat::mcset sv "Fi&les:" "Fi&ler:"
::msgcat::mcset sv "&Filter"
::msgcat::mcset sv "Fil&ter:"
- ::msgcat::mcset sv "&Green" "&Gr\u00f6n"
- ::msgcat::mcset sv "&Help" "&Hj\u00e4lp"
+ ::msgcat::mcset sv "&Green" "&Grön"
+ ::msgcat::mcset sv "&Help" "&Hjälp"
::msgcat::mcset sv "Hi" "Hej"
- ::msgcat::mcset sv "&Hide Console" "&G\u00f6m konsollen"
+ ::msgcat::mcset sv "&Hide Console" "&Göm konsollen"
::msgcat::mcset sv "&Ignore" "&Ignorera"
::msgcat::mcset sv "Invalid file name \"%1\$s\"." "Ogiltigt filnamn \"%1\$s\"."
::msgcat::mcset sv "Log Files" "Loggfiler"
@@ -42,35 +42,35 @@ namespace eval ::tk {
::msgcat::mcset sv "&OK"
::msgcat::mcset sv "OK"
::msgcat::mcset sv "Ok"
- ::msgcat::mcset sv "Open" "\u00d6ppna"
- ::msgcat::mcset sv "&Open" "&\u00d6ppna"
- ::msgcat::mcset sv "Open Multiple Files" "\u00d6ppna flera filer"
+ ::msgcat::mcset sv "Open" "Öppna"
+ ::msgcat::mcset sv "&Open" "&Öppna"
+ ::msgcat::mcset sv "Open Multiple Files" "Öppna flera filer"
::msgcat::mcset sv "P&aste" "&Klistra in"
::msgcat::mcset sv "&Quit" "&Avsluta"
- ::msgcat::mcset sv "&Red" "&R\u00f6d"
- ::msgcat::mcset sv "Replace existing file?" "Ers\u00e4tt existerande fil?"
- ::msgcat::mcset sv "&Retry" "&F\u00f6rs\u00f6k igen"
+ ::msgcat::mcset sv "&Red" "&Röd"
+ ::msgcat::mcset sv "Replace existing file?" "Ersätt existerande fil?"
+ ::msgcat::mcset sv "&Retry" "&Försök igen"
::msgcat::mcset sv "&Save" "&Spara"
::msgcat::mcset sv "Save As" "Spara som"
::msgcat::mcset sv "Save To Log" "Spara till logg"
- ::msgcat::mcset sv "Select Log File" "V\u00e4lj loggfil"
- ::msgcat::mcset sv "Select a file to source" "V\u00e4lj k\u00e4llfil"
+ ::msgcat::mcset sv "Select Log File" "Välj loggfil"
+ ::msgcat::mcset sv "Select a file to source" "Välj källfil"
::msgcat::mcset sv "&Selection:" "&Val:"
- ::msgcat::mcset sv "Skip Messages" "Hoppa \u00f6ver meddelanden"
- ::msgcat::mcset sv "&Source..." "&K\u00e4lla..."
+ ::msgcat::mcset sv "Skip Messages" "Hoppa över meddelanden"
+ ::msgcat::mcset sv "&Source..." "&Källa..."
::msgcat::mcset sv "Tcl Scripts" "Tcl skript"
- ::msgcat::mcset sv "Tcl for Windows" "Tcl f\u00f6r Windows"
+ ::msgcat::mcset sv "Tcl for Windows" "Tcl för Windows"
::msgcat::mcset sv "Text Files" "Textfiler"
::msgcat::mcset sv "&Yes" "&Ja"
::msgcat::mcset sv "abort" "avbryt"
- ::msgcat::mcset sv "blue" "bl\u00e5"
+ ::msgcat::mcset sv "blue" "blå"
::msgcat::mcset sv "cancel" "avbryt"
::msgcat::mcset sv "extension" "utvidgning"
::msgcat::mcset sv "extensions" "utvidgningar"
- ::msgcat::mcset sv "green" "gr\u00f6n"
+ ::msgcat::mcset sv "green" "grön"
::msgcat::mcset sv "ignore" "ignorera"
::msgcat::mcset sv "ok"
- ::msgcat::mcset sv "red" "r\u00f6d"
- ::msgcat::mcset sv "retry" "f\u00f6rs\u00f6k igen"
+ ::msgcat::mcset sv "red" "röd"
+ ::msgcat::mcset sv "retry" "försök igen"
::msgcat::mcset sv "yes" "ja"
}
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index a1c4398..df4b8ab 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -143,6 +143,12 @@ if {[tk windowingsystem] eq "aqua"} {
tk::ScrollByUnits %W h [expr {-10 * (%D)}]
}
} else {
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/30 = 0,
+ # but
+ # (int)-1/30 = -1
+ # The following code ensure equal +/- behaviour.
bind Scrollbar <MouseWheel> {
if {%D >= 0} {
tk::ScrollByUnits %W v [expr {-%D/30}]
@@ -164,6 +170,8 @@ if {[tk windowingsystem] eq "x11"} {
bind Scrollbar <5> {tk::ScrollByUnits %W v 5}
bind Scrollbar <Shift-4> {tk::ScrollByUnits %W h -5}
bind Scrollbar <Shift-5> {tk::ScrollByUnits %W h 5}
+ bind Scrollbar <6> {tk::ScrollByUnits %W h -5}
+ bind Scrollbar <7> {tk::ScrollByUnits %W h 5}
}
# tk::ScrollButtonDown --
diff --git a/library/tclIndex b/library/tclIndex
index b3f37fa..919fa8a 100644
--- a/library/tclIndex
+++ b/library/tclIndex
@@ -247,7 +247,6 @@ set auto_index(::tk::ListBoxKeyAccel_Unset) [list source [file join $dir xmfbox.
set auto_index(::tk::ListBoxKeyAccel_Key) [list source [file join $dir xmfbox.tcl]]
set auto_index(::tk::ListBoxKeyAccel_Goto) [list source [file join $dir xmfbox.tcl]]
set auto_index(::tk::ListBoxKeyAccel_Reset) [list source [file join $dir xmfbox.tcl]]
-set auto_index(tk_getFileType) [list source [file join $dir xmfbox.tcl]]
set auto_index(::tk::unsupported::ExposePrivateCommand) [list source [file join $dir unsupported.tcl]]
set auto_index(::tk::unsupported::ExposePrivateVariable) [list source [file join $dir unsupported.tcl]]
set auto_index(::tk::fontchooser) [list source [file join $dir fontchooser.tcl]]
diff --git a/library/text.tcl b/library/text.tcl
index bdfb78e..e9c8bfe 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -507,6 +507,16 @@ if {[tk windowingsystem] eq "x11"} {
%W xview scroll 50 pixels
}
}
+ bind Text <6> {
+ if {!$tk_strictMotif} {
+ %W xview scroll -50 pixels
+ }
+ }
+ bind Text <7> {
+ if {!$tk_strictMotif} {
+ %W xview scroll 50 pixels
+ }
+ }
}
# ::tk::TextClosestGap --
@@ -1227,3 +1237,92 @@ proc ::tk::TextScanDrag {w x y} {
$w scan dragto $x $y
}
}
+# ::tk::TextUndoRedoProcessMarks --
+#
+# This proc is executed after an undo or redo action.
+# It processes the list of undo/redo marks temporarily set in the
+# text widget to positions delimiting where changes happened, and
+# returns a flat list of ranges. The temporary marks are removed
+# from the text widget.
+#
+# Arguments:
+# w - The text widget
+
+proc ::tk::TextUndoRedoProcessMarks {w} {
+ set indices {}
+ set undoMarks {}
+
+ # only consider the temporary marks set by an undo/redo action
+ foreach mark [$w mark names] {
+ if {[string range $mark 0 11] eq "tk::undoMark"} {
+ lappend undoMarks $mark
+ }
+ }
+
+ # transform marks into indices
+ # the number of undo/redo marks is always even, each right mark
+ # completes a left mark to give a range
+ # this is true because:
+ # - undo/redo only deals with insertions and deletions of text
+ # - insertions may move marks but not delete them
+ # - when deleting text, marks located inside the deleted range
+ # are not erased but moved to the start of the deletion range
+ # . this is done in TkBTreeDeleteIndexRange ("This segment
+ # refuses to die...")
+ # . because MarkDeleteProc does nothing else than returning
+ # a value indicating that marks are not deleted by this
+ # deleteProc
+ # . mark deletion rather happen through [.text mark unset xxx]
+ # which was not used _up to this point of the code_ (it
+ # is a bit later just before exiting the present proc)
+ set nUndoMarks [llength $undoMarks]
+ set n [expr {$nUndoMarks / 2}]
+ set undoMarks [lsort -dictionary $undoMarks]
+ set Lmarks [lrange $undoMarks 0 [expr {$n - 1}]]
+ set Rmarks [lrange $undoMarks $n [llength $undoMarks]]
+ foreach Lmark $Lmarks Rmark $Rmarks {
+ lappend indices [$w index $Lmark] [$w index $Rmark]
+ $w mark unset $Lmark $Rmark
+ }
+
+ # process ranges to:
+ # - remove those already fully included in another range
+ # - merge overlapping ranges
+ set ind [lsort -dictionary -stride 2 $indices]
+ set indices {}
+
+ for {set i 0} {$i < $nUndoMarks} {incr i 2} {
+ set il1 [lindex $ind $i]
+ set ir1 [lindex $ind [expr {$i + 1}]]
+ lappend indices $il1 $ir1
+
+ for {set j [expr {$i + 2}]} {$j < $nUndoMarks} {incr j 2} {
+ set il2 [lindex $ind $j]
+ set ir2 [lindex $ind [expr {$j + 1}]]
+
+ if {[$w compare $il2 > $ir1]} {
+ # second range starts after the end of first range
+ # -> further second ranges do not need to be considered
+ # because ranges were sorted by increasing first index
+ set j $nUndoMarks
+ } else {
+ if {[$w compare $ir2 > $ir1]} {
+ # second range overlaps first range
+ # -> merge them into a single range
+ set indices [lreplace $indices end-1 end]
+ lappend indices $il1 $ir2
+ } else {
+ # second range is fully included in first range
+ # -> ignore it
+ }
+ # in both cases above, the second range shall be
+ # trimmed out from the list of ranges
+ set ind [lreplace $ind $j [expr {$j + 1}]]
+ incr j -2
+ incr nUndoMarks -2
+ }
+ }
+ }
+
+ return $indices
+}
diff --git a/library/tk.tcl b/library/tk.tcl
index 87e0586..45952be 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.6.10
+package require -exact Tk 8.7a3
# Create a ::tk namespace
namespace eval ::tk {
diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl
index e8009be..8bba226 100644
--- a/library/ttk/aquaTheme.tcl
+++ b/library/ttk/aquaTheme.tcl
@@ -15,7 +15,7 @@ namespace eval ttk::theme::aqua {
-insertwidth 1
ttk::style map . \
- -foreground {
+ -foreground {
disabled systemDisabledControlTextColor
background systemLabelColor} \
-selectbackground {
@@ -49,7 +49,7 @@ namespace eval ttk::theme::aqua {
-selectbackground {
background systemTextBackgroundColor
}
-
+
# Workaround for #1100117:
# Actually, on Aqua we probably shouldn't stipple images in
@@ -100,7 +100,7 @@ namespace eval ttk::theme::aqua {
!focus systemTextBackgroundColor
focus systemSelectedTextBackgroundColor
}
-
+
# Treeview:
ttk::style configure Heading \
-font TkHeadingFont \
diff --git a/library/ttk/button.tcl b/library/ttk/button.tcl
index 9f2cec7..24065c2 100644
--- a/library/ttk/button.tcl
+++ b/library/ttk/button.tcl
@@ -8,7 +8,7 @@
# (If the button is released off the widget, the grab deactivates and
# we get a <Leave> event then, which turns off the "active" state)
#
-# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
+# Normally, <ButtonRelease> and <ButtonN-Enter/Leave> events are
# delivered to the widget which received the initial <ButtonPress>
# event. However, Tk [grab]s (#1223103) and menu interactions
# (#1222605) can interfere with this. To guard against spurious
diff --git a/library/ttk/clamTheme.tcl b/library/ttk/clamTheme.tcl
index 6935fc7..bfcb194 100644
--- a/library/ttk/clamTheme.tcl
+++ b/library/ttk/clamTheme.tcl
@@ -5,7 +5,7 @@
#
namespace eval ttk::theme::clam {
- variable colors
+ variable colors
array set colors {
-disabledfg "#999999"
-frame "#dcdad5"
diff --git a/library/ttk/cursors.tcl b/library/ttk/cursors.tcl
index 75f7791..852f01c 100644
--- a/library/ttk/cursors.tcl
+++ b/library/ttk/cursors.tcl
@@ -99,23 +99,20 @@ namespace eval ttk {
}
"aqua" {
- if {[package vsatisfies [package provide Tk] 8.5]} {
- # appeared 2007-04-23, Tk 8.5a6
- array set Cursors {
- standard arrow
- text ibeam
- link pointinghand
- crosshair crosshair
- busy watch
- forbidden notallowed
-
- hresize resizeleftright
- vresize resizeupdown
- nresize resizeup
- sresize resizedown
- wresize resizeleft
- eresize resizeright
- }
+ array set Cursors {
+ standard arrow
+ text ibeam
+ link pointinghand
+ crosshair crosshair
+ busy watch
+ forbidden notallowed
+
+ hresize resizeleftright
+ vresize resizeupdown
+ nresize resizeup
+ sresize resizedown
+ wresize resizeleft
+ eresize resizeright
}
}
}
diff --git a/library/ttk/defaults.tcl b/library/ttk/defaults.tcl
index a15d1d9..2db9a37 100644
--- a/library/ttk/defaults.tcl
+++ b/library/ttk/defaults.tcl
@@ -43,7 +43,7 @@ namespace eval ttk::theme::default {
ttk::style configure TButton \
-anchor center -padding "3 3" -width -9 \
-relief raised -shiftrelief 1
- ttk::style map TButton -relief [list {!disabled pressed} sunken]
+ ttk::style map TButton -relief [list {!disabled pressed} sunken]
ttk::style configure TCheckbutton \
-indicatorcolor "#ffffff" -indicatorrelief sunken -padding 1
diff --git a/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl
index 43b3cd8..bb947c2 100644
--- a/library/ttk/menubutton.tcl
+++ b/library/ttk/menubutton.tcl
@@ -10,7 +10,7 @@
# (In addition, when menu system is active, "dropdown" -- menu posts
# on mouse-over. Ttk menubuttons don't implement this).
#
-# For keyboard and popdown mode, we hand off to tk_popup and let
+# For keyboard and popdown mode, we hand off to tk_popup and let
# the built-in Tk bindings handle the rest of the interaction.
#
# ON X11:
@@ -22,13 +22,13 @@
# rely on the passive grab that occurs on <ButtonPress> events,
# and transition to popdown mode when the mouse is released
# or dragged outside the menubutton.
-#
+#
# ON WINDOWS:
#
-# I'm not sure what the hell is going on here. [$menu post] apparently
+# I'm not sure what the hell is going on here. [$menu post] apparently
# sets up some kind of internal grab for native menus.
# On this platform, just use [tk_popup] for all menu actions.
-#
+#
# ON MACOS:
#
# Same probably applies here.
@@ -97,7 +97,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
below {
set entry ""
- incr y $bh
+ incr y $bh
}
left {
incr y $menuPad
@@ -105,7 +105,7 @@ if {[tk windowingsystem] eq "aqua"} {
}
right {
incr y $menuPad
- incr x $bw
+ incr x $bw
}
default {
incr y $bbh
@@ -182,7 +182,7 @@ proc ttk::menubutton::Popdown {mb} {
# Pulldown (X11 only) --
# Called when Button1 is pressed on a menubutton.
-# Posts the menu; a subsequent ButtonRelease
+# Posts the menu; a subsequent ButtonRelease
# or Leave event will set a grab on the menu.
#
proc ttk::menubutton::Pulldown {mb} {
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl
index 72b85e6..92efe40 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -70,7 +70,7 @@ proc ttk::notebook::CycleTab {w dir} {
}
# MnemonicTab $nb $key --
-# Scan all tabs in the specified notebook for one with the
+# Scan all tabs in the specified notebook for one with the
# specified mnemonic. If found, returns path name of tab;
# otherwise returns ""
#
@@ -94,8 +94,8 @@ proc ttk::notebook::MnemonicTab {nb key} {
# Enable keyboard traversal for a notebook widget
# by adding bindings to the containing toplevel window.
#
-# TLNotebooks($top) keeps track of the list of all traversal-enabled
-# notebooks contained in the toplevel
+# TLNotebooks($top) keeps track of the list of all traversal-enabled
+# notebooks contained in the toplevel
#
proc ttk::notebook::enableTraversal {nb} {
variable TLNotebooks
@@ -145,7 +145,7 @@ proc ttk::notebook::Cleanup {nb} {
}
}
-# EnclosingNotebook $w --
+# EnclosingNotebook $w --
# Return the nearest traversal-enabled notebook widget
# that contains $w.
#
@@ -171,7 +171,7 @@ proc ttk::notebook::EnclosingNotebook {w} {
# TLCycleTab --
# toplevel binding procedure for Control-Tab / Control-Shift-Tab
-# Select the next/previous tab in the nearest ancestor notebook.
+# Select the next/previous tab in the nearest ancestor notebook.
#
proc ttk::notebook::TLCycleTab {w dir} {
set nb [EnclosingNotebook $w]
diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl
index d08e1e2..e1e16e0 100644
--- a/library/ttk/scrollbar.tcl
+++ b/library/ttk/scrollbar.tcl
@@ -68,7 +68,7 @@ proc ttk::scrollbar::Press {w x y} {
proc ttk::scrollbar::Drag {w x y} {
variable State
if {![info exists State(first)]} {
- # Initial buttonpress was not on the thumb,
+ # Initial buttonpress was not on the thumb,
# or something screwy has happened. In either case, ignore:
return;
}
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl
index df188b7..ebf1451 100644
--- a/library/ttk/treeview.tcl
+++ b/library/ttk/treeview.tcl
@@ -46,7 +46,7 @@ bind Treeview <Shift-ButtonPress-1> \
bind Treeview <<ToggleSelection>> \
{ ttk::treeview::Select %W %x %y toggle }
-ttk::copyBindings TtkScrollable Treeview
+ttk::copyBindings TtkScrollable Treeview
### Binding procedures.
#
diff --git a/library/ttk/ttk.tcl b/library/ttk/ttk.tcl
index 7bae211..665222d 100644
--- a/library/ttk/ttk.tcl
+++ b/library/ttk/ttk.tcl
@@ -122,7 +122,7 @@ proc ttk::LoadThemes {} {
variable library
# "default" always present:
- uplevel #0 [list source [file join $library defaults.tcl]]
+ uplevel #0 [list source [file join $library defaults.tcl]]
set builtinThemes [style theme names]
foreach {theme scripts} {
diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl
index 857f4cd..05f0a0c 100644
--- a/library/ttk/utils.tcl
+++ b/library/ttk/utils.tcl
@@ -308,7 +308,15 @@ proc ttk::bindMouseWheel {bindtag callback} {
bind $bindtag <MouseWheel> [append callback { [expr {-(%D)}]} ]
bind $bindtag <Option-MouseWheel> [append callback { [expr {-10 *(%D)}]} ]
} else {
- bind $bindtag <MouseWheel> [append callback { [expr {-(%D / 120)}]}]
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/120 = 0,
+ # but
+ # (int)-1/120 = -1
+ # The following code ensure equal +/- behaviour.
+ bind $bindtag <MouseWheel> [append callback { [
+ expr {%D>=0 ? (-%D/120) : ((119-%D)/120)}
+ ]}]
}
}
@@ -327,19 +335,39 @@ if {[tk windowingsystem] eq "x11"} {
bind TtkScrollable <Shift-ButtonPress-5> { %W xview scroll 5 units }
}
if {[tk windowingsystem] eq "aqua"} {
- bind TtkScrollable <MouseWheel> \
- { %W yview scroll [expr {-(%D)}] units }
- bind TtkScrollable <Shift-MouseWheel> \
- { %W xview scroll [expr {-(%D)}] units }
- bind TtkScrollable <Option-MouseWheel> \
- { %W yview scroll [expr {-10 * (%D)}] units }
- bind TtkScrollable <Shift-Option-MouseWheel> \
- { %W xview scroll [expr {-10 * (%D)}] units }
+ bind TtkScrollable <MouseWheel> {
+ %W yview scroll [expr {-(%D)}] units
+ }
+ bind TtkScrollable <Shift-MouseWheel> {
+ %W xview scroll [expr {-(%D)}] units
+ }
+ bind TtkScrollable <Option-MouseWheel> {
+ %W yview scroll [expr {-10 * (%D)}] units
+ }
+ bind TtkScrollable <Shift-Option-MouseWheel> {
+ %W xview scroll [expr {-10 * (%D)}] units
+ }
} else {
- bind TtkScrollable <MouseWheel> \
- { %W yview scroll [expr {-(%D / 120)}] units }
- bind TtkScrollable <Shift-MouseWheel> \
- { %W xview scroll [expr {-(%D / 120)}] units }
+ # We must make sure that positive and negative movements are rounded
+ # equally to integers, avoiding the problem that
+ # (int)1/120 = 0,
+ # but
+ # (int)-1/120 = -1
+ # The following code ensure equal +/- behaviour.
+ bind TtkScrollable <MouseWheel> {
+ if {%D >= 0} {
+ %W yview scroll [expr {-%D/120}] units
+ } else {
+ %W yview scroll [expr {(119-%D)/120}] units
+ }
+ }
+ bind TtkScrollable <Shift-MouseWheel> {
+ if {%D >= 0} {
+ %W xview scroll [expr {-%D/120}] units
+ } else {
+ %W xview scroll [expr {(119-%D)/120}] units
+ }
+ }
}
#*EOF*
diff --git a/library/ttk/vistaTheme.tcl b/library/ttk/vistaTheme.tcl
index 094288c..165b496 100644
--- a/library/ttk/vistaTheme.tcl
+++ b/library/ttk/vistaTheme.tcl
@@ -3,7 +3,7 @@
#
# The Vista theme can only be defined on Windows Vista and above. The theme
-# is created in C due to the need to assign a theme-enabled function for
+# is created in C due to the need to assign a theme-enabled function for
# detecting when themeing is disabled. On systems that cannot support the
# Vista theme, there will be no such theme created and we must not
# evaluate this script.
@@ -151,7 +151,7 @@ namespace eval ttk::theme::vista {
-selectforeground [list !focus SystemWindowText] \
;
-
+
# SCROLLBAR elements (Vista includes a state for 'hover')
ttk::style element create Vertical.Scrollbar.uparrow vsapi \
SCROLLBAR 1 {disabled 4 pressed 3 active 2 hover 17 {} 1} \
@@ -187,6 +187,7 @@ namespace eval ttk::theme::vista {
ttk::style layout Horizontal.TProgressbar {
Horizontal.Progressbar.trough -sticky nswe -children {
Horizontal.Progressbar.pbar -side left -sticky ns
+ Horizontal.Progressbar.text -sticky nesw
}
}
ttk::style element create Vertical.Progressbar.pbar vsapi \
@@ -196,7 +197,7 @@ namespace eval ttk::theme::vista {
Vertical.Progressbar.pbar -side bottom -sticky we
}
}
-
+
# Scale
ttk::style element create Horizontal.Scale.slider vsapi \
TRACKBAR 3 {disabled 5 focus 4 pressed 3 active 2 {} 1} \
@@ -220,10 +221,10 @@ namespace eval ttk::theme::vista {
}
}
}
-
+
# Treeview
ttk::style configure Item -padding {4 0 0 0}
-
+
package provide ttk::theme::vista 1.0
}
}
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 14d2be5..f1daea0 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -210,7 +210,6 @@ proc ::tk::MotifFDialog_SetFilter {w type} {
variable ::tk::Priv
set data(filter) [lindex $type 1]
- set Priv(selectFileType) [lindex [lindex $type 0] 0]
MotifFDialog_Update $w
}
@@ -981,9 +980,3 @@ proc ::tk::ListBoxKeyAccel_Reset {w} {
unset -nocomplain Priv(lbAccel,$w)
}
-proc ::tk_getFileType {} {
- variable ::tk::Priv
-
- return $Priv(selectFileType)
-}
-
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 97a11d3..2263e37 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -102,7 +102,7 @@ PROJECT := tk
PRODUCT_NAME := Tk
UNIX_DIR := ${CURDIR}/../unix
-VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in)
+VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.ac)
TCL_VERSION := ${VERSION}
wish := wish
WISH = wish${VERSION}
@@ -180,7 +180,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \
if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \
--prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
- --mandir="${MANDIR}" --enable-threads --enable-framework \
+ --mandir="${MANDIR}" --enable-framework \
--with-tcl="${TCL_DIR}" \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
ifneq (${VERSION},${TCL_VERSION})
diff --git a/macosx/README b/macosx/README
index c21d445..4989ec7 100644
--- a/macosx/README
+++ b/macosx/README
@@ -169,12 +169,12 @@ newAppearance option: "aqua", "darkaqua", or "auto". If the appearance is set
to aqua or darkaqua then the window will be displayed with the corresponding
appearance independent of any preferences settings. If it is set to "auto"
the appearance will be determined by the preferences. This command can be
-used to opt out of Dark Mode on a per-window basis. It may be best to run the "update" command before setting the appearance property, to allow the event loop to run.
+used to opt out of Dark Mode on a per-window basis. It may be best to run the "update" command before setting the appearance property, to allow the event loop to run.
- To determine the current appearance of a window in macOS 10.14 (Mojave) and
higher, one can use the command:
- tk::unsupported::MacWindowStyle isdark window?
+ tk::unsupported::MacWindowStyle isdark
The boolean return value is true if the window is currently displayed with the
dark appearance.
diff --git a/macosx/Tk-Common.xcconfig b/macosx/Tk-Common.xcconfig
index 4ec1a52..6219135 100644
--- a/macosx/Tk-Common.xcconfig
+++ b/macosx/Tk-Common.xcconfig
@@ -36,11 +36,11 @@ MANDIR = $(PREFIX)/man
PER_ARCH_CFLAGS_ppc = -mcpu=G3 -mtune=G4 $(PER_ARCH_CFLAGS_ppc)
PREFIX = /usr/local
TCL_BUILD_DIR = $(OBJROOT)/../tcl/Tcl.build/$(CONFIGURATION)/Tcl.build/Objects
-TCL_CONFIGURE_ARGS = --enable-threads --enable-dtrace
+TCL_CONFIGURE_ARGS = --enable-dtrace
TCL_FRAMEWORK_DIR = $(SYMROOT)/../tcl/$(CONFIGURATION)
TCL_LIBRARY = $(LIBDIR)/tcl$(VERSION)
TCL_PACKAGE_PATH = "$(LIBDIR)"
TCL_DEFS = HAVE_TCL_CONFIG_H
TK_LIBRARY = $(LIBDIR)/tk$(VERSION)
-TK_DEFS = HAVE_TK_CONFIG_H
-VERSION = 8.6
+TK_DEFS = HAVE_TK_CONFIG_H TCL_NO_DEPRECATED
+VERSION = 8.7
diff --git a/macosx/Tk.xcode/project.pbxproj b/macosx/Tk.xcode/project.pbxproj
index 93143f7..9598af9 100644
--- a/macosx/Tk.xcode/project.pbxproj
+++ b/macosx/Tk.xcode/project.pbxproj
@@ -1043,7 +1043,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEmbed.c; sourceTree = "<group>"; };
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEntry.c; sourceTree = "<group>"; };
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEvent.c; sourceTree = "<group>"; };
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXEvent.h; sourceTree = "<group>"; };
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXFont.c; sourceTree = "<group>"; };
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXHLEvents.c; sourceTree = "<group>"; };
F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXInit.c; sourceTree = "<group>"; };
@@ -1172,7 +1171,7 @@
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -1211,16 +1210,14 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
- F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
F966BCF208F27A3E005CB29B /* wish.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wish.rc; sourceTree = "<group>"; };
F966BCF308F27A3E005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
- F966BCF408F27A3E005CB29B /* rmd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rmd.bat; sourceTree = "<group>"; };
F966BCF508F27A3F005CB29B /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F966BCF608F27A3F005CB29B /* stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stubs.c; sourceTree = "<group>"; };
F966BCF708F27A3F005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
@@ -1915,7 +1912,7 @@
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
@@ -1940,7 +1937,7 @@
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
@@ -1984,7 +1981,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
@@ -2586,7 +2583,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */,
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */,
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */,
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */,
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */,
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */,
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */,
@@ -2740,7 +2736,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2787,10 +2783,9 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
- F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
@@ -3722,7 +3717,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3755,7 +3750,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3816,7 +3811,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
@@ -3968,7 +3963,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -3981,7 +3976,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
@@ -3991,7 +3986,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4002,7 +3997,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
@@ -4012,7 +4007,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -4025,7 +4020,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
@@ -4035,7 +4030,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4046,7 +4041,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj
index 53ebe3e..121c8a0 100644
--- a/macosx/Tk.xcodeproj/project.pbxproj
+++ b/macosx/Tk.xcodeproj/project.pbxproj
@@ -1043,7 +1043,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEmbed.c; sourceTree = "<group>"; };
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEntry.c; sourceTree = "<group>"; };
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEvent.c; sourceTree = "<group>"; };
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXEvent.h; sourceTree = "<group>"; };
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXFont.c; sourceTree = "<group>"; };
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXHLEvents.c; sourceTree = "<group>"; };
F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXInit.c; sourceTree = "<group>"; };
@@ -1172,7 +1171,7 @@
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -1211,16 +1210,14 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
- F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
F966BCF208F27A3E005CB29B /* wish.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wish.rc; sourceTree = "<group>"; };
F966BCF308F27A3E005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
- F966BCF408F27A3E005CB29B /* rmd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rmd.bat; sourceTree = "<group>"; };
F966BCF508F27A3F005CB29B /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F966BCF608F27A3F005CB29B /* stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stubs.c; sourceTree = "<group>"; };
F966BCF708F27A3F005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
@@ -1915,7 +1912,7 @@
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
@@ -1940,7 +1937,7 @@
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
@@ -1984,7 +1981,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
@@ -2586,7 +2583,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */,
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */,
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */,
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */,
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */,
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */,
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */,
@@ -2740,7 +2736,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2787,14 +2783,12 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
- F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
- F966BCF408F27A3E005CB29B /* rmd.bat */,
F966BCF508F27A3F005CB29B /* rules.vc */,
F966BCF608F27A3F005CB29B /* stubs.c */,
F966BCF708F27A3F005CB29B /* tcl.m4 */,
@@ -3722,7 +3716,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3755,7 +3749,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3816,7 +3810,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
@@ -3971,7 +3965,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -3984,7 +3978,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
@@ -3994,7 +3988,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4005,7 +3999,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
@@ -4015,7 +4009,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -4028,7 +4022,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
@@ -4038,7 +4032,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4049,7 +4043,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/macosx/configure.ac b/macosx/configure.ac
index 69573c5..41f39d6 100644
--- a/macosx/configure.ac
+++ b/macosx/configure.ac
@@ -8,4 +8,4 @@ dnl include the configure sources from ../unix:
m4_include(../unix/aclocal.m4)
m4_define(SC_USE_CONFIG_HEADERS)
-m4_include(../unix/configure.in)
+m4_include(../unix/configure.ac)
diff --git a/macosx/tkMacOSX.h b/macosx/tkMacOSX.h
index 05ea6c2..a9e3082 100644
--- a/macosx/tkMacOSX.h
+++ b/macosx/tkMacOSX.h
@@ -26,7 +26,7 @@
typedef int (Tk_MacOSXEmbedRegisterWinProc) (long winID, Tk_Window window);
typedef void* (Tk_MacOSXEmbedGetGrafPortProc) (Tk_Window window);
typedef int (Tk_MacOSXEmbedMakeContainerExistProc) (Tk_Window window);
-typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, TkRegion rgn);
+typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, Region rgn);
typedef void (Tk_MacOSXEmbedGetOffsetInParentProc) (Tk_Window window, void *ulCorner);
#include "tkPlatDecls.h"
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index db45428..6717afa 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -35,7 +35,10 @@ static Tk_Window clipboardOwner = NULL;
targetPtr->type == dispPtr->utf8Atom) {
for (TkClipboardBuffer *cbPtr = targetPtr->firstBufferPtr;
cbPtr; cbPtr = cbPtr->nextPtr) {
- NSString *s = TclUniToNSString(cbPtr->buffer, cbPtr->length);
+ NSString *s = [[NSString alloc] initWithBytesNoCopy:
+ cbPtr->buffer length:cbPtr->length
+ encoding:NSUTF8StringEncoding freeWhenDone:NO];
+
[string appendString:s];
[s release];
}
@@ -127,6 +130,7 @@ TkSelGetSelection(
&& selection == dispPtr->clipboardAtom
&& (target == XA_STRING || target == dispPtr->utf8Atom)) {
NSString *string = nil;
+ NSString *clean;
NSPasteboard *pb = [NSPasteboard generalPasteboard];
NSString *type = [pb availableTypeFromArray:[NSArray arrayWithObject:
NSStringPboardType]];
@@ -135,20 +139,25 @@ TkSelGetSelection(
string = [pb stringForType:type];
}
if (string) {
-
/*
- * Encode the string using the encoding which is used in Tcl
- * when TCL_UTF_MAX = 3. This replaces each UTF-16 surrogate with
- * a 3-byte sequence generated using the UTF-8 algorithm. (Even
- * though UTF-8 does not allow encoding surrogates, the algorithm
- * does produce a 3-byte sequence.)
+ * Replace all non-BMP characters by the replacement character 0xfffd.
+ * This is a workaround until Tcl supports TCL_UTF_MAX > 3.
*/
-
- char *bytes = NSStringToTclUni(string, NULL);
- result = proc(clientData, interp, bytes);
- if (bytes) {
- ckfree(bytes);
+ int i, j, len = [string length];
+ CFRange all = CFRangeMake(0, len);
+ UniChar *buffer = ckalloc(len*sizeof(UniChar));
+ CFStringGetCharacters((CFStringRef) string, all, buffer);
+ for (i = 0, j = 0 ; j < len ; i++, j++) {
+ if (CFStringIsSurrogateHighCharacter(buffer[j])) {
+ buffer[i] = 0xfffd;
+ j++;
+ } else {
+ buffer[i] = buffer[j];
+ }
}
+ clean = (NSString *)CFStringCreateWithCharacters(NULL, buffer, i);
+ ckfree(buffer);
+ result = proc(clientData, interp, [clean UTF8String]);
}
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -271,7 +280,7 @@ TkSelUpdateClipboard(
void
TkSelEventProc(
Tk_Window tkwin, /* Window for which event was targeted. */
- register XEvent *eventPtr) /* X event: either SelectionClear,
+ XEvent *eventPtr) /* X event: either SelectionClear,
* SelectionRequest, or SelectionNotify. */
{
if (eventPtr->type == SelectionClear) {
@@ -299,7 +308,7 @@ TkSelEventProc(
void
TkSelPropProc(
- register XEvent *eventPtr) /* X PropertyChange event. */
+ XEvent *eventPtr) /* X PropertyChange event. */
{
}
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index 4e73ac9..efaaa91 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -192,6 +192,8 @@
#define DEF_ENTRY_INSERT_ON_TIME "600"
#define DEF_ENTRY_INSERT_WIDTH "1"
#define DEF_ENTRY_JUSTIFY "left"
+#define DEF_ENTRY_PLACEHOLDER ""
+#define DEF_ENTRY_PLACEHOLDERFG "#b3b3b3"
#define DEF_ENTRY_READONLY_BG_COLOR NORMAL_BG
#define DEF_ENTRY_READONLY_BG_MONO WHITE
#define DEF_ENTRY_RELIEF "sunken"
@@ -213,7 +215,9 @@
*/
#define DEF_FRAME_BG_COLOR NORMAL_BG
+#define DEF_FRAME_BG_IMAGE NULL
#define DEF_FRAME_BG_MONO WHITE
+#define DEF_FRAME_BG_TILE "0"
#define DEF_FRAME_BORDER_WIDTH "0"
#define DEF_FRAME_CLASS "Frame"
#define DEF_FRAME_COLORMAP ""
@@ -312,6 +316,7 @@
#define DEF_MENU_ACTIVE_BORDER_WIDTH "0"
#define DEF_MENU_ACTIVE_FG_COLOR "systemMenuActiveText"
#define DEF_MENU_ACTIVE_FG_MONO WHITE
+#define DEF_MENU_ACTIVE_RELIEF "flat"
#define DEF_MENU_BG_COLOR "systemMenu"
#define DEF_MENU_BG_MONO WHITE
#define DEF_MENU_BORDER_WIDTH "0"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 10a756d..c5681b3 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -1573,7 +1573,7 @@ Tk_MessageBoxObjCmd(
*----------------------------------------------------------------------
*/
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXFont.h"
typedef struct FontchooserData {
@@ -1787,8 +1787,8 @@ FontchooserCget(
}
break;
case FontchooserVisible:
- resObj = Tcl_NewBooleanObj([[[NSFontManager sharedFontManager]
- fontPanel:NO] isVisible]);
+ resObj = Tcl_NewWideIntObj([[[NSFontManager sharedFontManager]
+ fontPanel:NO] isVisible] != 0);
break;
default:
resObj = Tcl_NewObj();
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 1bf2572..724f637 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -946,7 +946,6 @@ XDrawRectangle(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -971,7 +970,7 @@ XDrawRectangle(
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangles(
Display *display,
Drawable drawable,
@@ -985,8 +984,8 @@ XDrawRectangles(
int i, lw = gc->line_width;
display->request++;
- if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ if (!TkMacOSXSetupDrawingContext(drawable, gc, 1, &dc)) {
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -1004,8 +1003,8 @@ XDrawRectangles(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -1176,7 +1175,6 @@ XDrawArc(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -1257,7 +1255,6 @@ XDrawArcs(
TkMacOSXRestoreDrawingContext(&dc);
return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -1338,7 +1335,6 @@ XFillArc(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -1355,7 +1351,7 @@ XFillArc(
*----------------------------------------------------------------------
*/
-void
+int
XFillArcs(
Display *display,
Drawable d,
@@ -1370,7 +1366,7 @@ XFillArcs(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -1418,25 +1414,8 @@ XFillArcs(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
-#endif
-
-#ifdef TK_MACOSXDRAW_UNUSED
-/*
- *----------------------------------------------------------------------
- *
- * XMaxRequestSize --
- *
- *----------------------------------------------------------------------
- */
-
-long
-XMaxRequestSize(
- Display *display)
-{
- return (SHRT_MAX / 4);
-}
-#endif
/*
*----------------------------------------------------------------------
@@ -1463,7 +1442,7 @@ TkScrollWindow(
int x, int y, /* Position rectangle to be scrolled. */
int width, int height,
int dx, int dy, /* Distance rectangle should be moved. */
- TkRegion damageRgn) /* Region to accumulate damage in. */
+ Region damageRgn) /* Region to accumulate damage in. */
{
Drawable drawable = Tk_WindowId(tkwin);
MacDrawable *macDraw = (MacDrawable *) drawable;
@@ -1967,12 +1946,12 @@ ClipToGC(
{
if (gc && gc->clip_mask &&
((TkpClipMask *) gc->clip_mask)->type == TKP_CLIP_REGION) {
- TkRegion gcClip = ((TkpClipMask *) gc->clip_mask)->value.region;
+ Region gcClip = ((TkpClipMask *) gc->clip_mask)->value.region;
int xOffset = ((MacDrawable *) d)->xOff + gc->clip_x_origin;
int yOffset = ((MacDrawable *) d)->yOff + gc->clip_y_origin;
HIShapeRef clipRgn = *clipRgnPtr, gcClipRgn;
- TkMacOSXOffsetRegion(gcClip, xOffset, yOffset);
+ XOffsetRegion(gcClip, xOffset, yOffset);
gcClipRgn = TkMacOSXGetNativeRegion(gcClip);
if (clipRgn) {
*clipRgnPtr = HIShapeCreateIntersection(gcClipRgn, clipRgn);
@@ -1981,7 +1960,7 @@ ClipToGC(
*clipRgnPtr = HIShapeCreateCopy(gcClipRgn);
}
CFRelease(gcClipRgn);
- TkMacOSXOffsetRegion(gcClip, -xOffset, -yOffset);
+ XOffsetRegion(gcClip, -xOffset, -yOffset);
}
}
@@ -2057,7 +2036,7 @@ TkpDrawHighlightBorder (
/*
*----------------------------------------------------------------------
*
- * TkpDrawFrame --
+ * TkpDrawFrameEx --
*
* This procedure draws the rectangular frame area. If the user has
* requested themeing, it draws with the background theme.
@@ -2072,8 +2051,9 @@ TkpDrawHighlightBorder (
*/
void
-TkpDrawFrame(
+TkpDrawFrameEx(
Tk_Window tkwin,
+ Drawable drawable,
Tk_3DBorder border,
int highlightWidth,
int borderWidth,
@@ -2091,11 +2071,9 @@ TkpDrawFrame(
}
}
- Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin),
- border, highlightWidth, highlightWidth,
- Tk_Width(tkwin) - 2 * highlightWidth,
- Tk_Height(tkwin) - 2 * highlightWidth,
- borderWidth, relief);
+ Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth,
+ highlightWidth, Tk_Width(tkwin) - 2 * highlightWidth,
+ Tk_Height(tkwin) - 2 * highlightWidth, borderWidth, relief);
}
/*
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 6c4ac1f..ccd107a 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -596,7 +596,8 @@ TkpTestembedCmd(
if (containerPtr->parent == None) {
Tcl_DStringAppendElement(&dString, "");
} else if (all) {
- sprintf(buffer, "0x%lx", containerPtr->parent);
+ sprintf(buffer, "0x%" TCL_Z_MODIFIER "x",
+ (size_t) containerPtr->parent);
Tcl_DStringAppendElement(&dString, buffer);
} else {
Tcl_DStringAppendElement(&dString, "XXX");
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index b9c9b6a..1b9e077 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -12,7 +12,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -110,9 +110,9 @@ enum {
/*
*----------------------------------------------------------------------
*
- * TkMacOSXFlushWindows --
+ * XSync --
*
- * This routine is a stub called by XSync, which is called during the Tk
+ * This routine is a stub called XSync, which is called during the Tk
* update command. The language specification does not require that the
* update command be synchronous but many of the tests implicitly assume
* that it is. It is definitely asynchronous on macOS since many idle
@@ -128,18 +128,22 @@ enum {
*----------------------------------------------------------------------
*/
-MODULE_SCOPE void
-TkMacOSXFlushWindows(void)
+int
+XSync(
+ Display *display,
+ Bool discard)
{
- if (Tk_GetNumMainWindows() == 0) {
- return;
+ if (display) {
+ display->request++;
}
- while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
- for (NSWindow *w in [NSApp orderedWindows]) {
- [w display];
+ if (Tk_GetNumMainWindows() != 0) {
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
+ for (NSWindow *w in [NSApp orderedWindows]) {
+ [w display];
+ }
}
+ return Success;
}
-
/*
* Local Variables:
diff --git a/macosx/tkMacOSXEvent.h b/macosx/tkMacOSXEvent.h
deleted file mode 100644
index 46d1585..0000000
--- a/macosx/tkMacOSXEvent.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * tkMacOSXEvent.h --
- *
- * Declarations of Macintosh specific functions for implementing the
- * Mac OS X Notifier.
- *
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 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.
- */
-
-#ifndef _TKMACEVENT
-#define _TKMACEVENT
-
-#ifndef _TKMACINT
-#include "tkMacOSXInt.h"
-#endif
-
-MODULE_SCOPE void TkMacOSXFlushWindows(void);
-
-#endif
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 9b2d11c..41da390 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -101,148 +101,6 @@ static void DrawCharsInContext(Display *display, Drawable drawable,
#pragma mark -
#pragma mark Font Helpers:
-/*
- *---------------------------------------------------------------------------
- *
- * TclUniToNSString --
- *
- * When Tcl is compiled with TCL_UTF_MAX = 3 (the default for 8.6) it cannot
- * deal directly with UTF-8 encoded non-BMP characters, since their UTF-8
- * encoding requires 4 bytes.
- *
- * As a workaround, these versions of Tcl encode non-BMP characters as a string
- * of length 6 in which the high and low UTF-16 surrogates have been encoded
- * using the UTF-8 algorithm. The UTF-8 encoding does not allow encoding
- * surrogates, so these 6-byte strings are not valid UTF-8, and hence Apple's
- * NString class will refuse to instantiate an NSString from the 6-byte
- * encoding. This function allows creating an NSString from a C-string which
- * has been encoded using this scheme.
- *
- * Results:
- * An NSString, which may be nil.
- *
- * Side effects:
- * None.
- *---------------------------------------------------------------------------
- */
-
-MODULE_SCOPE NSString*
-TclUniToNSString(
- const char *source,
- int numBytes)
-{
- NSString *string = [[NSString alloc] initWithBytesNoCopy:(void *)source
- length:numBytes
- encoding:NSUTF8StringEncoding
- freeWhenDone:NO];
- if (!string) {
- const unichar *characters = ckalloc(numBytes*sizeof(unichar));
- const char *in = source;
- unichar *out = (unichar *) characters;
- while (in < source + numBytes) {
- in += Tcl_UtfToUniChar(in, out++);
- }
- string = [[NSString alloc] initWithCharacters:characters
- length:(out - characters)];
- ckfree(characters);
- }
- return string;
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TclUniAtIndex --
- *
- * Write a sequence of bytes up to length 6 which is an encoding of a UTF-16
- * character in an NSString. Also record the unicode code point of the character.
- * this may be a non-BMP character constructed by reading two surrogates from
- * the NSString.
- *
- * Results:
- * Returns the number of bytes written.
- *
- * Side effects:
- * Bytes are written to the char array referenced by the pointer uni and
- * the unicode code point is written to the integer referenced by the
- * pointer code.
- *
- */
-
-MODULE_SCOPE int
-TclUniAtIndex(
- NSString *string,
- int index,
- char *uni,
- unsigned int *code)
-{
- char *ptr = uni;
- UniChar uniChar = [string characterAtIndex: index];
- if (CFStringIsSurrogateHighCharacter(uniChar)) {
- UniChar lowChar = [string characterAtIndex: ++index];
- *code = CFStringGetLongCharacterForSurrogatePair(
- uniChar, lowChar);
- ptr += Tcl_UniCharToUtf(uniChar, ptr);
- ptr += Tcl_UniCharToUtf(lowChar, ptr);
- return ptr - uni;
- } else {
- *code = (int) uniChar;
- [[string substringWithRange: NSMakeRange(index, 1)]
- getCString: uni
- maxLength: XMaxTransChars
- encoding: NSUTF8StringEncoding];
- return strlen(uni);
- }
-}
-
-/*
- *---------------------------------------------------------------------------
- *
- * NSStringToTclUni --
- *
- * Encodes the unicode string represented by an NSString object with the
- * internal encoding that Tcl uses when TCL_UTF_MAX = 3. This encoding
- * is similar to UTF-8 except that non-BMP characters are encoded as two
- * successive 3-byte sequences which are constructed from UTF-16 surrogates
- * by applying the UTF-8 algorithm. Even though the UTF-8 encoding does not
- * allow encoding surrogates, the algorithm does produce a well-defined
- * 3-byte sequence.
- *
- * Results:
- * Returns a pointer to a null-terminated byte array which encodes the
- * NSString.
- *
- * Side effects:
- * Memory is allocated to hold the byte array, which must be freed with
- * ckalloc. If the pointer numBytes is not NULL the number of non-null
- * bytes written to the array is stored in the integer it references.
- */
-
-MODULE_SCOPE char*
-NSStringToTclUni(
- NSString *string,
- int *numBytes)
-{
- unsigned int code;
- int i;
- char *ptr, *bytes = ckalloc(6*[string length] + 1);
-
- ptr = bytes;
- if (ptr) {
- for (i = 0; i < [string length]; i++) {
- ptr += TclUniAtIndex(string, i, ptr, &code);
- if (code > 0xffff){
- i++;
- }
- }
- *ptr = '\0';
- }
- if (numBytes) {
- *numBytes = ptr - bytes;
- }
- return bytes;
-}
-
#define GetNSFontTraitsFromTkFontAttributes(faPtr) \
((faPtr)->weight == TK_FW_BOLD ? NSBoldFontMask : NSUnboldFontMask) | \
((faPtr)->slant == TK_FS_ITALIC ? NSItalicFontMask : NSUnitalicFontMask)
@@ -986,7 +844,8 @@ TkpMeasureCharsInContext(
if (maxLength > 32767) {
maxLength = 32767;
}
- string = TclUniToNSString((const char *)source, numBytes);
+ string = [[NSString alloc] initWithBytesNoCopy:(void*)source
+ length:numBytes encoding:NSUTF8StringEncoding freeWhenDone:NO];
if (!string) {
length = 0;
fit = rangeLength;
@@ -1265,10 +1124,12 @@ DrawCharsInContext(
!TkMacOSXSetupDrawingContext(drawable, gc, 1, &drawingContext)) {
return;
}
- string = TclUniToNSString((const char *)source, numBytes);
+ string = [[NSString alloc] initWithBytesNoCopy:(void*)source
+ length:numBytes encoding:NSUTF8StringEncoding freeWhenDone:NO];
if (!string) {
return;
}
+
context = drawingContext.context;
fg = TkMacOSXCreateCGColor(gc, gc->foreground);
attributes = [fontPtr->nsAttributes mutableCopy];
@@ -1422,8 +1283,8 @@ TkMacOSXFontDescriptionForNSFontAndNSFontAttributes(
NSStrikethroughStyleAttributeName];
objv[i++] = Tcl_NewStringObj(familyName, -1);
- objv[i++] = Tcl_NewIntObj([nsFont pointSize]);
-#define S(s) Tcl_NewStringObj(STRINGIFY(s),(int)(sizeof(STRINGIFY(s))-1))
+ objv[i++] = Tcl_NewWideIntObj([nsFont pointSize]);
+#define S(s) Tcl_NewStringObj(STRINGIFY(s), (int)(sizeof(STRINGIFY(s))-1))
objv[i++] = (traits & NSBoldFontMask) ? S(bold) : S(normal);
objv[i++] = (traits & NSItalicFontMask) ? S(italic) : S(roman);
if ([underline respondsToSelector:@selector(intValue)] &&
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index d15abde..f9c26c6 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -53,11 +53,11 @@ static void ProcessAppleEvent(ClientData clientData);
* Names of the procedures which can be used to process AppleEvents.
*/
-static const char *openDocumentProc = "::tk::mac::OpenDocument";
-static const char *launchURLProc = "::tk::mac::LaunchURL";
-static const char *printDocProc = "::tk::mac::PrintDocument";
-static const char *scriptFileProc = "::tk::mac::DoScriptFile";
-static const char *scriptTextProc = "::tk::mac::DoScriptText";
+static const char* openDocumentProc = "::tk::mac::OpenDocument";
+static const char* launchURLProc = "::tk::mac::LaunchURL";
+static const char* printDocProc = "::tk::mac::PrintDocument";
+static const char* scriptFileProc = "::tk::mac::DoScriptFile";
+static const char* scriptTextProc = "::tk::mac::DoScriptText";
#pragma mark TKApplication(TKHLEvents)
@@ -578,8 +578,7 @@ MissedAnyParameters(
typeWildCard, &returnedType, NULL, 0, &actualSize);
return (err != errAEDescNotFound);
-}
-
+}
/*
* Local Variables:
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 2e576a5..0d8be32 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -516,7 +516,7 @@ XCreateImage(
/*
*----------------------------------------------------------------------
*
- * TkPutImage, XPutImage --
+ * XPutImage --
*
* Copies a rectangular subimage of an XImage into a drawable. Currently
* this is only called by TkImgPhotoDisplay, using a Window as the
@@ -589,23 +589,6 @@ XPutImage(
TkMacOSXRestoreDrawingContext(&dc);
return Success;
}
-
-int
-TkPutImage(
- unsigned long *colors, /* Array of pixel values used by this image.
- * May be NULL. */
- int ncolors, /* Number of colors used, or 0. */
- Display *display,
- Drawable d, /* Destination drawable. */
- GC gc,
- XImage *image, /* Source image. */
- int src_x, int src_y, /* Offset of subimage. */
- int dest_x, int dest_y, /* Position of subimage origin in drawable. */
- unsigned int width, unsigned int height)
- /* Dimensions of subimage. */
-{
- return XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
-}
/*
* Local Variables:
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index e3ea481..3d15442 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -28,6 +28,13 @@ static char tkLibPath[PATH_MAX + 1] = "";
static char scriptPath[PATH_MAX + 1] = "";
+/*
+ * Forward declarations...
+ */
+
+static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
+ int objc, Tcl_Obj *const objv[]);
+
#pragma mark TKApplication(TKInit)
@implementation TKApplication
@@ -425,7 +432,8 @@ TkpInit(
TkMacOSXStandardAboutPanelObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "::tk::mac::iconBitmap",
TkMacOSXIconBitmapObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath",
+ TkMacOSXGetAppPathCmd, NULL, NULL);
return TCL_OK;
}
@@ -465,11 +473,11 @@ TkpGetAppName(
}
Tcl_DStringAppend(namePtr, name, -1);
}
-
+
/*
*----------------------------------------------------------------------
*
- * TkMacOSXGetAppPath --
+ * TkMacOSXGetAppPathCmd --
*
* Returns the path of the Wish application bundle.
*
@@ -481,42 +489,39 @@ TkpGetAppName(
*
*----------------------------------------------------------------------
*/
-int TkMacOSXGetAppPath(
- ClientData cd,
- Tcl_Interp *ip,
- int objc,
- Tcl_Obj *const objv[])
-{
-
- CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle());
-
-
- /*
- * Convert the URL reference into a string reference.
- */
-
- CFStringRef appPath = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
- /*
- * Get the system encoding method.
- */
-
- CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
+static int
+TkMacOSXGetAppPathCmd(
+ ClientData ignored,
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *const objv[])
+{
+ if (objc != 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, NULL);
+ return TCL_ERROR;
+ }
- /*
- * Convert the string reference into a C string.
- */
+ /*
+ * Get the application path URL and convert it to a string path reference.
+ */
- char *path = (char *) CFStringGetCStringPtr(appPath, encodingMethod);
+ CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef appPath =
+ CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
- Tcl_SetResult(ip, path, NULL);
+ /*
+ * Convert (and copy) the string reference into a Tcl result.
+ */
- CFRelease(mainBundleURL);
- CFRelease(appPath);
- return TCL_OK;
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ CFStringGetCStringPtr(appPath, CFStringGetSystemEncoding()), -1));
+ CFRelease(mainBundleURL);
+ CFRelease(appPath);
+ return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -583,7 +588,7 @@ TkMacOSXDefaultStartupScript(void)
CFURLRef scriptFldrURL;
char startupScript[PATH_MAX + 1];
- if (CFURLGetFileSystemRepresentation (appMainURL, true,
+ if (CFURLGetFileSystemRepresentation(appMainURL, true,
(unsigned char *) startupScript, PATH_MAX)) {
Tcl_SetStartupScript(Tcl_NewStringObj(startupScript,-1), NULL);
scriptFldrURL = CFURLCreateCopyDeletingLastPathComponent(NULL,
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 9cb75d2..bd669c0 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -191,14 +191,10 @@ MODULE_SCOPE void TkpFreeGCCache(GC gc);
*/
MODULE_SCOPE void TkMacOSXDefaultStartupScript(void);
-#if 0
-MODULE_SCOPE int XSetClipRectangles(Display *d, GC gc, int clip_x_origin,
- int clip_y_origin, XRectangle* rectangles, int n, int ordering);
-#endif
MODULE_SCOPE void TkpClipDrawableToRect(Display *display, Drawable d, int x,
int y, int width, int height);
-MODULE_SCOPE void TkpRetainRegion(TkRegion r);
-MODULE_SCOPE void TkpReleaseRegion(TkRegion r);
+MODULE_SCOPE void TkpRetainRegion(Region r);
+MODULE_SCOPE void TkpReleaseRegion(Region r);
MODULE_SCOPE void TkpShiftButton(NSButton *button, NSPoint delta);
MODULE_SCOPE Bool TkpAppIsDrawing(void);
MODULE_SCOPE void TkpDisplayWindow(Tk_Window tkwin);
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index 7ea085b..e3aed98 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -331,30 +331,42 @@ static unsigned isFunctionKey(unsigned int code);
}
/*
- * Next we generate an XEvent for each unicode character in our string.
- *
- * NSString uses UTF-16 internally, which means that a non-BMP character is
- * represented by a sequence of two 16-bit "surrogates". In principle we
- * could record this in the XEvent by setting the keycode to the 32-bit
- * unicode code point and setting the trans_chars string to the 4-byte
- * UTF-8 string for the non-BMP character. However, that will not work
- * when TCL_UTF_MAX is set to 3, as is the case for Tcl 8.6. A workaround
- * used internally by Tcl 8.6 is to encode each surrogate as a 3-byte
- * sequence using the UTF-8 algorithm (ignoring the fact that the UTF-8
- * encoding specification does not allow encoding UTF-16 surrogates).
- * This gives a 6-byte encoding of the non-BMP character which we write into
- * the trans_chars field of the XEvent.
+ * NSString represents a non-BMP character as a string of length 2 where
+ * the first character is the high surrogate and the second character is
+ * the low surrogate. We could record this in the XEvent by setting the
+ * keycode to the unicode code point and setting the trans_chars to the
+ * 4-byte UTF-8 string. However, that will not help as long as TCL_UTF_MAX
+ * is set to 3. Until that changes, we just replace non-BMP characters by
+ * the "replacement character" U+FFFD.
*/
for (i = 0; i < len; i++) {
- xEvent.xkey.nbytes = TclUniAtIndex(str, i, xEvent.xkey.trans_chars,
- &xEvent.xkey.keycode);
- if (xEvent.xkey.keycode > 0xffff){
+ UniChar nextChar = [str characterAtIndex: i];
+ if (CFStringIsSurrogateHighCharacter(nextChar)) {
+#if 0
+ UniChar lowChar = [str characterAtIndex: ++i];
+ xEvent.xkey.keycode = CFStringGetLongCharacterForSurrogatePair(
+ nextChar, lowChar);
+ xEvent.xkey.nbytes = TkUniCharToUtf(xEvent.xkey.keycode,
+ &xEvent.xkey.trans_chars);
+#else
i++;
+ xEvent.xkey.keycode = 0xfffd;
+ strcpy(xEvent.xkey.trans_chars, "\xef\xbf\xbd");
+ xEvent.xkey.nbytes = strlen(xEvent.xkey.trans_chars);
+#endif
+ } else {
+ xEvent.xkey.keycode = (int) nextChar;
+ [[str substringWithRange: NSMakeRange(i,1)]
+ getCString: xEvent.xkey.trans_chars
+ maxLength: XMaxTransChars encoding: NSUTF8StringEncoding];
+ xEvent.xkey.nbytes = strlen(xEvent.xkey.trans_chars);
}
- xEvent.xany.type = KeyPress;
- Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL);
+ xEvent.xany.type = KeyPress;
+ releaseCode = (UInt16) nextChar;
+ Tk_QueueWindowEvent(&xEvent, TCL_QUEUE_TAIL);
}
+
releaseCode = (UInt16) [str characterAtIndex: 0];
}
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index b2c78d3..e91dfe2 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -12,7 +12,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXConstants.h"
/*
* A couple of simple definitions to make code a bit more self-explaining.
@@ -358,10 +358,10 @@ KeycodeToUnicode(
KeySym
XKeycodeToKeysym(
Display* display,
- KeyCode keycode,
+ unsigned int keycode,
int index)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int newKeycode;
UniChar newChar;
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index 53adb01..2e2838d 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -246,7 +246,7 @@ TkpDestroyMenuButton(
void
TkpComputeMenuButtonGeometry(butPtr)
- register TkMenuButton *butPtr; /* Widget record for menu button. */
+ TkMenuButton *butPtr; /* Widget record for menu button. */
{
int width, height, avgWidth, haveImage = 0, haveText = 0;
int txtWidth, txtHeight;
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 1c033a4..82bcda7 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -322,19 +322,18 @@ static Tcl_Obj *
GetWidgetDemoPath(
Tcl_Interp *interp)
{
- Tcl_Obj *libpath, *result = NULL;
+ Tcl_Obj *result = NULL;
- libpath = Tcl_GetVar2Ex(interp, "tk_library", NULL, TCL_GLOBAL_ONLY);
- if (libpath) {
- Tcl_Obj *demo[2] = { Tcl_NewStringObj("demos", 5),
- Tcl_NewStringObj("widget", 6) };
+ if (Tcl_EvalEx(interp, "::tk::pkgconfig get demodir,runtime",
+ -1, TCL_EVAL_GLOBAL) == TCL_OK) {
+ Tcl_Obj *libpath, *demo[1] = { Tcl_NewStringObj("widget", 6) };
+ libpath = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(libpath);
- result = Tcl_FSJoinToPath(libpath, 2, demo);
+ result = Tcl_FSJoinToPath(libpath, 1, demo);
Tcl_DecrRefCount(libpath);
- } else {
- Tcl_ResetResult(interp);
}
+ Tcl_ResetResult(interp);
return result;
}
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 0ad8492..b18b4ef 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -13,7 +13,7 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -95,7 +95,7 @@ enum {
if (eventWindow) {
local = [theEvent locationInWindow];
global = [eventWindow tkConvertPointToScreen: local];
- tkwin = TkMacOSXGetCapture();
+ tkwin = TkpGetCapture();
if (tkwin) {
winPtr = (TkWindow *) tkwin;
eventWindow = TkMacOSXDrawableWindow(winPtr->window);
@@ -114,7 +114,7 @@ enum {
*/
global = [theEvent locationInWindow];
- tkwin = TkMacOSXGetCapture();
+ tkwin = TkpGetCapture();
if (tkwin) {
winPtr = (TkWindow *) tkwin;
eventWindow = TkMacOSXDrawableWindow(winPtr->window);
@@ -218,8 +218,10 @@ enum {
typeUInt32, NULL, sizeof(UInt32), NULL, &buttons);
if (err == noErr) {
- state |= (buttons & 0x1F) * Button1Mask;
- } else if (button <= Button5) {
+ state |= (buttons & 0x7F) * Button1Mask;
+ /* Handle buttons 8/9 */
+ state |= (buttons & 0x180) * (Button8Mask >> 7);
+ } else if (button <= Button9) {
switch (eventType) {
case NSLeftMouseDown:
case NSRightMouseDown:
@@ -396,10 +398,12 @@ ButtonModifiers2State(
unsigned int state;
/*
- * Tk on OSX supports at most 5 buttons.
+ * Tk on OSX supports at most 9 buttons.
*/
- state = (buttonState & 0x1F) * Button1Mask;
+ state = (buttonState & 0x7F) * Button1Mask;
+ /* Handle buttons 8/9 */
+ state |= (buttonState & 0x180) * (Button8Mask >> 7);
if (keyModifiers & alphaLock) {
state |= LockMask;
@@ -619,7 +623,7 @@ GenerateButtonEvent(
if ((medPtr->activeNonFloating == NULL)
|| ((!(TkpIsWindowFloating(medPtr->whichWin))
&& (medPtr->activeNonFloating != medPtr->whichWin))
- && TkMacOSXGetCapture() == NULL)) {
+ && TkpGetCapture() == NULL)) {
return false;
}
#endif
@@ -715,7 +719,7 @@ TkpSetCapture(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXGetCapture --
+ * TkpGetCapture --
*
* Results:
* Returns the current grab window
@@ -727,7 +731,7 @@ TkpSetCapture(
*/
Tk_Window
-TkMacOSXGetCapture(void)
+TkpGetCapture(void)
{
return captureWinPtr;
}
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index afee942..098fe4c 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -14,7 +14,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXConstants.h"
#include <tclInt.h>
#import <objc/objc-auto.h>
@@ -173,7 +173,7 @@ GetRunLoopMode(NSModalSession modalSession)
if (modalSession) {
runLoopMode = NSModalPanelRunLoopMode;
- } else if (TkMacOSXGetCapture()) {
+ } else if (TkpGetCapture()) {
runLoopMode = NSEventTrackingRunLoopMode;
}
if (!runLoopMode) {
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index ba6e329..96b06da 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -107,26 +107,6 @@
#define REDO_KEYSYM_LOOKUP
/*
- * Defines for X functions that are used by Tk but are treated as
- * no-op functions on the Macintosh.
- */
-
-#undef XFlush
-#define XFlush(display) (0)
-#undef XFree
-#define XFree(data) (((data) != NULL) ? (ckfree(data),0) : 0)
-#undef XGrabServer
-#define XGrabServer(display) (0)
-#undef XNoOp
-#define XNoOp(display) (display->request++,0)
-#undef XUngrabServer
-#define XUngrabServer(display) (0)
-#undef XSynchronize
-#define XSynchronize(display, onoff) (display->request++,NULL)
-#undef XVisualIDFromVisual
-#define XVisualIDFromVisual(visual) (visual->visualid)
-
-/*
* The following functions are not used on the Mac, so we stub them out.
*/
@@ -136,17 +116,6 @@
#define TkpSync(display)
/*
- * TkMacOSXGetCapture is a legacy function used on the Mac. When fixing
- * [943d5ebe51], TkpGetCapture was added to the Windows port. Both
- * are actually the same feature and should bear the same name. However,
- * in order to avoid potential backwards incompatibilities, renaming
- * TkMacOSXGetCapture into TkpGetCapture in *PlatDecls.h shall not be
- * done in a patch release, therefore use a define here.
- */
-
-#define TkpGetCapture TkMacOSXGetCapture
-
-/*
* This macro stores a representation of the window handle in a string.
*/
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 9417b62..7aa6840 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -115,9 +115,10 @@
* Macro abstracting use of TkMacOSXGetNamedSymbol to init named symbols.
*/
+#define UNINITIALISED_SYMBOL ((void*)(-1L))
#define TkMacOSXInitNamedSymbol(module, ret, symbol, ...) \
- static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \
- if (symbol == (void*)(-1L)) { \
+ static ret (* symbol)(__VA_ARGS__) = UNINITIALISED_SYMBOL; \
+ if (symbol == UNINITIALISED_SYMBOL) { \
symbol = TkMacOSXGetNamedSymbol(STRINGIFY(module), \
STRINGIFY(symbol)); \
}
@@ -144,13 +145,12 @@ MODULE_SCOPE long tkMacOSXMacOSXVersion;
*/
#if 0
-MODULE_SCOPE void TkMacOSXEmtpyRegion(TkRegion r);
-MODULE_SCOPE int TkMacOSXIsEmptyRegion(TkRegion r);
+MODULE_SCOPE void TkMacOSXEmtpyRegion(Region r);
+MODULE_SCOPE int TkMacOSXIsEmptyRegion(Region r);
#endif
-MODULE_SCOPE HIShapeRef TkMacOSXGetNativeRegion(TkRegion r);
-MODULE_SCOPE void TkMacOSXSetWithNativeRegion(TkRegion r,
+MODULE_SCOPE HIShapeRef TkMacOSXGetNativeRegion(Region r);
+MODULE_SCOPE void TkMacOSXSetWithNativeRegion(Region r,
HIShapeRef rgn);
-MODULE_SCOPE void TkMacOSXOffsetRegion(TkRegion r, short dx, short dy);
MODULE_SCOPE HIShapeRef TkMacOSXHIShapeCreateEmpty(void);
MODULE_SCOPE HIMutableShapeRef TkMacOSXHIShapeCreateMutableWithRect(
const CGRect *inRect);
@@ -239,10 +239,6 @@ MODULE_SCOPE int TkMacOSXServices_Init(Tcl_Interp *interp);
MODULE_SCOPE int TkMacOSXRegisterServiceWidgetObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-MODULE_SCOPE NSString* TclUniToNSString(const char *source, int numBytes);
-MODULE_SCOPE int TclUniAtIndex(NSString *string, int index, char *uni,
- unsigned int *code);
-MODULE_SCOPE char* NSStringToTclUni(NSString *string, int *numBytes);
#pragma mark Private Objective-C Classes
@@ -434,9 +430,7 @@ VISIBILITY_HIDDEN
@end
#endif /* _TKMACPRIV */
-
-int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]);
-
+
/*
* Local Variables:
* mode: objc
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c
index 1511f90..0afc752 100644
--- a/macosx/tkMacOSXRegion.c
+++ b/macosx/tkMacOSXRegion.c
@@ -17,7 +17,7 @@
/*
*----------------------------------------------------------------------
*
- * TkCreateRegion --
+ * XCreateRegion --
*
* Implements the equivelent of the X window function XCreateRegion. See
* Xwindow documentation for more details.
@@ -31,16 +31,16 @@
*----------------------------------------------------------------------
*/
-TkRegion
-TkCreateRegion(void)
+Region
+XCreateRegion(void)
{
- return (TkRegion) HIShapeCreateMutable();
+ return (Region) HIShapeCreateMutable();
}
/*
*----------------------------------------------------------------------
*
- * TkDestroyRegion --
+ * XDestroyRegion --
*
* Implements the equivelent of the X window function XDestroyRegion. See
* Xwindow documentation for more details.
@@ -55,8 +55,8 @@ TkCreateRegion(void)
*/
int
-TkDestroyRegion(
- TkRegion r)
+XDestroyRegion(
+ Region r)
{
if (r) {
CFRelease(r);
@@ -67,7 +67,7 @@ TkDestroyRegion(
/*
*----------------------------------------------------------------------
*
- * TkIntersectRegion --
+ * XIntersectRegion --
*
* Implements the equivalent of the X window function XIntersectRegion.
* See Xwindow documentation for more details.
@@ -82,10 +82,10 @@ TkDestroyRegion(
*/
int
-TkIntersectRegion(
- TkRegion sra,
- TkRegion srb,
- TkRegion dr_return)
+XIntersectRegion(
+ Region sra,
+ Region srb,
+ Region dr_return)
{
ChkErr(HIShapeIntersect, (HIShapeRef) sra, (HIShapeRef) srb,
(HIMutableShapeRef) dr_return);
@@ -95,7 +95,7 @@ TkIntersectRegion(
/*
*----------------------------------------------------------------------
*
- * TkSubtractRegion --
+ * XSubtractRegion --
*
* Implements the equivalent of the X window function XSubtractRegion.
* See X window documentation for more details.
@@ -110,10 +110,10 @@ TkIntersectRegion(
*/
int
-TkSubtractRegion(
- TkRegion sra,
- TkRegion srb,
- TkRegion dr_return)
+XSubtractRegion(
+ Region sra,
+ Region srb,
+ Region dr_return)
{
ChkErr(HIShapeDifference, (HIShapeRef) sra, (HIShapeRef) srb,
(HIMutableShapeRef) dr_return);
@@ -123,7 +123,7 @@ TkSubtractRegion(
/*
*----------------------------------------------------------------------
*
- * TkUnionRectWithRegion --
+ * XUnionRectWithRegion --
*
* Implements the equivelent of the X window function
* XUnionRectWithRegion. See Xwindow documentation for more details.
@@ -138,10 +138,10 @@ TkSubtractRegion(
*/
int
-TkUnionRectWithRegion(
+XUnionRectWithRegion(
XRectangle* rectangle,
- TkRegion src_region,
- TkRegion dest_region_return)
+ Region src_region,
+ Region dest_region_return)
{
const CGRect r = CGRectMake(rectangle->x, rectangle->y,
rectangle->width, rectangle->height);
@@ -177,7 +177,7 @@ TkUnionRectWithRegion(
int
TkMacOSXIsEmptyRegion(
- TkRegion r)
+ Region r)
{
return HIShapeIsEmpty((HIMutableShapeRef) r) ? 1 : 0;
}
@@ -185,7 +185,7 @@ TkMacOSXIsEmptyRegion(
/*
*----------------------------------------------------------------------
*
- * TkRectInRegion --
+ * XRectInRegion --
*
* Implements the equivelent of the X window function XRectInRegion. See
* Xwindow documentation for more details.
@@ -201,8 +201,8 @@ TkMacOSXIsEmptyRegion(
*/
int
-TkRectInRegion(
- TkRegion region,
+XRectInRegion(
+ Region region,
int x,
int y,
unsigned int width,
@@ -221,7 +221,7 @@ TkRectInRegion(
/*
*----------------------------------------------------------------------
*
- * TkClipBox --
+ * XClipBox --
*
* Implements the equivelent of the X window function XClipBox. See
* Xwindow documentation for more details.
@@ -236,8 +236,8 @@ TkRectInRegion(
*/
int
-TkClipBox(
- TkRegion r,
+XClipBox(
+ Region r,
XRectangle *rect_return)
{
CGRect rect;
@@ -269,7 +269,7 @@ TkClipBox(
void
TkpBuildRegionFromAlphaData(
- TkRegion region, /* Region to update. */
+ Region region, /* Region to update. */
unsigned int x, /* Where in region to update. */
unsigned int y, /* Where in region to update. */
unsigned int width, /* Size of rectangle to update. */
@@ -310,7 +310,7 @@ TkpBuildRegionFromAlphaData(
rect.y = y + y1;
rect.width = end - x1;
rect.height = 1;
- TkUnionRectWithRegion(&rect, region, region);
+ XUnionRectWithRegion(&rect, region, region);
}
}
dataPtr += lineStride;
@@ -335,7 +335,7 @@ TkpBuildRegionFromAlphaData(
void
TkpRetainRegion(
- TkRegion r)
+ Region r)
{
CFRetain(r);
}
@@ -358,7 +358,7 @@ TkpRetainRegion(
void
TkpReleaseRegion(
- TkRegion r)
+ Region r)
{
CFRelease(r);
}
@@ -381,7 +381,7 @@ TkpReleaseRegion(
void
TkMacOSXSetEmptyRegion(
- TkRegion r)
+ Region r)
{
ChkErr(HIShapeSetEmpty, (HIMutableShapeRef) r);
}
@@ -404,7 +404,7 @@ TkMacOSXSetEmptyRegion(
HIShapeRef
TkMacOSXGetNativeRegion(
- TkRegion r)
+ Region r)
{
return (HIShapeRef) CFRetain(r);
}
@@ -427,7 +427,7 @@ TkMacOSXGetNativeRegion(
void
TkMacOSXSetWithNativeRegion(
- TkRegion r,
+ Region r,
HIShapeRef rgn)
{
ChkErr(TkMacOSXHIShapeSetWithShape, (HIMutableShapeRef) r, rgn);
@@ -436,7 +436,7 @@ TkMacOSXSetWithNativeRegion(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXOffsetRegion --
+ * XOffsetRegion --
*
* Offsets region by given distances.
*
@@ -449,13 +449,14 @@ TkMacOSXSetWithNativeRegion(
*----------------------------------------------------------------------
*/
-void
-TkMacOSXOffsetRegion(
- TkRegion r,
- short dx,
- short dy)
+int
+XOffsetRegion(
+ Region r,
+ int dx,
+ int dy)
{
ChkErr(HIShapeOffset, (HIMutableShapeRef) r, dx, dy);
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index ce7ac58..dff6cc9 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -246,9 +246,9 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
- register TkScrollbar *scrollPtr = clientData;
+ TkScrollbar *scrollPtr = clientData;
MacScrollbar *msPtr = (MacScrollbar *) scrollPtr;
- register Tk_Window tkwin = scrollPtr->tkwin;
+ Tk_Window tkwin = scrollPtr->tkwin;
TkWindow *winPtr = (TkWindow *) tkwin;
TkMacOSXDrawingContext dc;
@@ -354,7 +354,7 @@ TkpDisplayScrollbar(
extern void
TkpComputeScrollbarGeometry(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Scrollbar whose geometry may have
* changed. */
{
@@ -484,7 +484,7 @@ TkpDestroyScrollbar(
void
TkpConfigureScrollbar(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
{
/* empty */
}
@@ -509,7 +509,7 @@ TkpConfigureScrollbar(
int
TkpScrollbarPosition(
- register TkScrollbar *scrollPtr,
+ TkScrollbar *scrollPtr,
/* Scrollbar widget record. */
int x, int y) /* Coordinates within scrollPtr's window. */
{
@@ -519,7 +519,7 @@ TkpScrollbarPosition(
*/
int length, width, tmp;
- register const int inset = scrollPtr->inset;
+ const int inset = scrollPtr->inset;
if (scrollPtr->vertical) {
length = Tk_Height(scrollPtr->tkwin);
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c
index 0434f10..e92158f 100644
--- a/macosx/tkMacOSXServices.c
+++ b/macosx/tkMacOSXServices.c
@@ -43,8 +43,8 @@ ServicesEventProc(
- (void) provideService:(NSPasteboard *)pboard
userData:(NSString *)data
error:(NSString **)error;
-- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard
- types:(NSArray *)types;
+- (BOOL) writeSelectionToPasteboard:(NSPasteboard *)pboard
+ types:(NSArray *)types;
@end
@@ -131,6 +131,7 @@ ServicesEventProc(
@end
/*
+
* Instantiate a TkService object and register it with the NSApplication.
* This is called exactly one time from TkpInit.
*/
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 5063fa3..5cbbbf1 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -615,7 +615,6 @@ XRaiseWindow(
return Success;
}
-#if 0
/*
*----------------------------------------------------------------------
*
@@ -632,7 +631,7 @@ XRaiseWindow(
*----------------------------------------------------------------------
*/
-void
+int
XLowerWindow(
Display *display, /* Display. */
Window window) /* Window. */
@@ -643,12 +642,12 @@ XLowerWindow(
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
TkWmRestackToplevel(macWin->winPtr, Below, NULL);
} else {
- /*
+ /*
* TODO: this should generate damage
*/
}
+ return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -856,7 +855,7 @@ TkMacOSXUpdateClipRgn(
ChkErr(HIShapeIntersect,
win2Ptr->privatePtr->aboveVisRgn, rgn, rgn);
} else if (tkMacOSXEmbedHandler != NULL) {
- TkRegion r = TkCreateRegion();
+ Region r = XCreateRegion();
HIShapeRef visRgn;
tkMacOSXEmbedHandler->getClipProc((Tk_Window) winPtr, r);
@@ -947,7 +946,7 @@ TkMacOSXUpdateClipRgn(
*
* This function returns the Macintosh clipping region for the given
* window. The caller is responsible for disposing of the returned region
- * via TkDestroyRegion().
+ * via XDestroyRegion().
*
* Results:
* The region.
@@ -958,14 +957,14 @@ TkMacOSXUpdateClipRgn(
*----------------------------------------------------------------------
*/
-TkRegion
+Region
TkMacOSXVisableClipRgn(
TkWindow *winPtr)
{
if (winPtr->privatePtr->flags & TK_CLIP_INVALID) {
TkMacOSXUpdateClipRgn(winPtr);
}
- return (TkRegion) HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn);
+ return (Region) HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn);
}
/*
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 6c0f335..fe6981d 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -15,7 +15,7 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index ceb3f3f..4e53282 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -18,7 +18,7 @@
#include "tkMacOSXPrivate.h"
#include "tkScrollbar.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -1117,7 +1117,7 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(wmTracing));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(wmTracing != 0));
return TCL_OK;
}
return Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing);
@@ -1241,7 +1241,7 @@ WmAspectCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int numer1, denom1, numer2, denom2;
if ((objc != 3) && (objc != 7)) {
@@ -1253,10 +1253,10 @@ WmAspectCmd(
if (wmPtr->sizeHintsFlags & PAspect) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->minAspect.x);
- results[1] = Tcl_NewIntObj(wmPtr->minAspect.y);
- results[2] = Tcl_NewIntObj(wmPtr->maxAspect.x);
- results[3] = Tcl_NewIntObj(wmPtr->maxAspect.y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->minAspect.x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->minAspect.y);
+ results[2] = Tcl_NewWideIntObj(wmPtr->maxAspect.x);
+ results[3] = Tcl_NewWideIntObj(wmPtr->maxAspect.y);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -1456,23 +1456,23 @@ WmGetAttribute(
result = Tcl_NewDoubleObj([macWindow alphaValue]);
break;
case WMATT_FULLSCREEN:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_FULLSCREEN);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_FULLSCREEN) != 0);
break;
case WMATT_MODIFIED:
- result = Tcl_NewBooleanObj([macWindow isDocumentEdited]);
+ result = Tcl_NewWideIntObj([macWindow isDocumentEdited] != 0);
break;
case WMATT_NOTIFY:
- result = Tcl_NewBooleanObj(tkMacOSXWmAttrNotifyVal);
+ result = Tcl_NewWideIntObj(tkMacOSXWmAttrNotifyVal != 0);
break;
case WMATT_TITLEPATH:
result = Tcl_NewStringObj([[macWindow representedFilename] UTF8String],
-1);
break;
case WMATT_TOPMOST:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_TOPMOST);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_TOPMOST) != 0);
break;
case WMATT_TRANSPARENT:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_TRANSPARENT);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_TRANSPARENT) != 0);
break;
case WMATT_TYPE:
result = Tcl_NewStringObj("unsupported", -1);
@@ -1581,7 +1581,7 @@ WmClientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char *argv3;
int length;
@@ -1637,7 +1637,7 @@ WmColormapwindowsCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow **cmapList, *winPtr2;
int i, windowObjc, gotToplevel = 0;
Tcl_Obj **windowObjv, *resultObj;
@@ -1726,7 +1726,7 @@ WmCommandCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int len;
if ((objc != 3) && (objc != 4)) {
@@ -1783,7 +1783,7 @@ WmDeiconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
if (objc != 3) {
@@ -1862,7 +1862,7 @@ WmFocusmodelCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"active", "passive", NULL };
enum options {
@@ -1916,7 +1916,7 @@ WmForgetCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
if (Tk_IsTopLevel(frameWin)) {
MacDrawable *macWin;
@@ -1982,7 +1982,7 @@ WmFrameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Window window;
char buf[TCL_INTEGER_SPACE];
@@ -2024,7 +2024,7 @@ WmGeometryCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
char xSign = '+', ySign = '+';
int width, height, x = wmPtr->x, y= wmPtr->y;
@@ -2095,7 +2095,7 @@ WmGridCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int reqWidth, reqHeight, widthInc, heightInc;
const char *errorMsg;
@@ -2108,10 +2108,10 @@ WmGridCmd(
if (wmPtr->sizeHintsFlags & PBaseSize) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->reqGridWidth);
- results[1] = Tcl_NewIntObj(wmPtr->reqGridHeight);
- results[2] = Tcl_NewIntObj(wmPtr->widthInc);
- results[3] = Tcl_NewIntObj(wmPtr->heightInc);
+ results[0] = Tcl_NewWideIntObj(wmPtr->reqGridWidth);
+ results[1] = Tcl_NewWideIntObj(wmPtr->reqGridHeight);
+ results[2] = Tcl_NewWideIntObj(wmPtr->widthInc);
+ results[3] = Tcl_NewWideIntObj(wmPtr->heightInc);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -2189,7 +2189,7 @@ WmGroupCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
char *argv3;
int length;
@@ -2253,7 +2253,7 @@ WmIconbitmapCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
char *str;
int len;
@@ -2322,7 +2322,7 @@ WmIconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
return TCL_ERROR;
@@ -2403,7 +2403,7 @@ WmIconmaskCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
char *argv3;
@@ -2463,7 +2463,7 @@ WmIconnameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
int length;
@@ -2534,7 +2534,7 @@ WmIconphotoCmd(
isDefault = 1;
if (objc == 4) {
Tcl_WrongNumArgs(interp, 2, objv,
- "window ?-default? image1 ?image2 ...?");
+ "window ?-default? image1 ?image2 ...?");
return TCL_ERROR;
}
}
@@ -2605,7 +2605,7 @@ WmIconpositionCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y;
if ((objc != 3) && (objc != 5)) {
@@ -2617,8 +2617,8 @@ WmIconpositionCmd(
if (wmPtr->hints.flags & IconPositionHint) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewIntObj(wmPtr->hints.icon_x);
- results[1] = Tcl_NewIntObj(wmPtr->hints.icon_y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->hints.icon_x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->hints.icon_y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
}
return TCL_OK;
@@ -2663,7 +2663,7 @@ WmIconwindowCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
WmInfo *wmPtr2;
@@ -2766,8 +2766,8 @@ WmManageCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!Tk_IsTopLevel(frameWin)) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
@@ -2830,7 +2830,7 @@ WmMaxsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2842,8 +2842,8 @@ WmMaxsizeCmd(
Tcl_Obj *results[2];
GetMaxSize(winPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2884,7 +2884,7 @@ WmMinsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2896,8 +2896,8 @@ WmMinsizeCmd(
Tcl_Obj *results[2];
GetMinSize(winPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2948,8 +2948,8 @@ WmOverrideredirectCmd(
}
if (objc == 3) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- Tk_Attributes((Tk_Window) winPtr)->override_redirect));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+ Tk_Attributes((Tk_Window) winPtr)->override_redirect != 0));
return TCL_OK;
}
@@ -2987,7 +2987,7 @@ WmPositionfromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3053,8 +3053,8 @@ WmProtocolCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
- register ProtocolHandler *protPtr, *prevPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
+ ProtocolHandler *protPtr, *prevPtr;
Atom protocol;
char *cmd;
int cmdLength;
@@ -3154,7 +3154,7 @@ WmResizableCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
UInt64 oldAttributes = wmPtr->attributes;
int oldFlags = wmPtr->flags;
@@ -3167,8 +3167,10 @@ WmResizableCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewBooleanObj(!(wmPtr->flags & WM_WIDTH_NOT_RESIZABLE));
- results[1] = Tcl_NewBooleanObj(!(wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE));
+ results[0] = Tcl_NewWideIntObj(
+ (wmPtr->flags & WM_WIDTH_NOT_RESIZABLE) == 0);
+ results[1] = Tcl_NewWideIntObj(
+ (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE) == 0);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -3231,7 +3233,7 @@ WmSizefromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3393,7 +3395,7 @@ WmStackorderCmd(
} else { /* OPT_ISBELOW */
result = index1 < index2;
}
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result != 0));
return TCL_OK;
}
}
@@ -3423,7 +3425,7 @@ WmStateCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", "zoomed", NULL };
enum options {
@@ -3543,7 +3545,7 @@ WmTitleCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char *argv3;
int length;
@@ -3591,7 +3593,7 @@ WmTransientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window master;
TkWindow *masterPtr, *w;
WmInfo *wmPtr2;
@@ -3719,7 +3721,7 @@ RemoveTransient(
if (wmPtr == NULL || wmPtr->master == NULL) {
return;
}
- masterPtr = (TkWindow*)wmPtr->master;
+ masterPtr = (TkWindow *) wmPtr->master;
wmPtr2 = masterPtr->wmInfoPtr;
if (wmPtr2 == NULL) {
return;
@@ -3771,7 +3773,7 @@ WmWithdrawCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 6aeec36..77d05c3 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -16,7 +16,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include <IOKit/IOKitLib.h>
#include <IOKit/hidsystem/IOHIDShared.h>
@@ -640,6 +640,94 @@ XQueryColor(
return Success;
}
+Bool
+XTranslateCoordinates(
+ Display *display,
+ Window src_w,
+ Window dest_w,
+ int src_x,
+ int src_y,
+ int *dest_x_return,
+ int *dest_y_return,
+ Window *child_return)
+{
+ return 0;
+}
+
+int
+XSetCommand(
+ Display *display,
+ Window w,
+ char **argv,
+ int argc)
+{
+ return Success;
+}
+
+int
+XGetWindowAttributes(
+ Display *display,
+ Window w,
+ XWindowAttributes *window_attributes_return)
+{
+ return Success;
+}
+
+Status
+XGetWMColormapWindows(
+ Display *display,
+ Window w,
+ Window **windows_return,
+ int *count_return)
+{
+ return Success;
+}
+
+int
+XIconifyWindow(
+ Display *display,
+ Window w,
+ int screen_number)
+{
+ return Success;
+}
+
+XHostAddress *
+XListHosts(
+ Display *display,
+ int *nhosts_return,
+ Bool *state_return)
+{
+ return NULL;
+}
+
+int
+XLookupColor(
+ Display *display,
+ Colormap colormap,
+ _Xconst char *color_name,
+ XColor *exact_def_return,
+ XColor *screen_def_return)
+{
+ return Success;
+}
+
+int
+XNextEvent(
+ Display *display,
+ XEvent *event_return)
+{
+ return Success;
+}
+
+int
+XPutBackEvent(
+ Display *display,
+ XEvent *event)
+{
+ return Success;
+}
+
int
XQueryColors(
Display* display,
@@ -703,6 +791,37 @@ XGetWindowProperty(
}
int
+XWindowEvent(
+ Display *display,
+ Window w,
+ long event_mask,
+ XEvent *event_return)
+{
+ return Success;
+}
+
+int
+XWithdrawWindow(
+ Display *display,
+ Window w,
+ int screen_number)
+{
+ return Success;
+}
+
+int
+XmbLookupString(
+ XIC ic,
+ XKeyPressedEvent *event,
+ char *buffer_return,
+ int bytes_buffer,
+ KeySym *keysym_return,
+ Status *status_return)
+{
+ return Success;
+}
+
+int
XRefreshKeyboardMapping(
XMappingEvent *x)
{
@@ -739,24 +858,6 @@ XForceScreenSaver(
return Success;
}
-void
-Tk_FreeXId(
- Display *display,
- XID xid)
-{
- /* no-op function needed for stubs implementation. */
-}
-
-int
-XSync(
- Display *display,
- Bool discard)
-{
- TkMacOSXFlushWindows();
- display->request++;
- return 0;
-}
-
#if 0
int
XSetClipRectangles(
@@ -768,18 +869,18 @@ XSetClipRectangles(
int n,
int ordering)
{
- TkRegion clipRgn = TkCreateRegion();
+ Region clipRgn = XCreateRegion();
while (n--) {
XRectangle rect = *rectangles;
rect.x += clip_x_origin;
rect.y += clip_y_origin;
- TkUnionRectWithRegion(&rect, clipRgn, clipRgn);
+ XUnionRectWithRegion(&rect, clipRgn, clipRgn);
rectangles++;
}
- TkSetRegion(d, gc, clipRgn);
- TkDestroyRegion(clipRgn);
+ XSetRegion(d, gc, clipRgn);
+ XDestroyRegion(clipRgn);
return 1;
}
#endif
@@ -912,7 +1013,7 @@ XStringListToTextProperty(
XTextProperty *text_prop_return)
{
Debugger();
- return (Status) 0;
+ return Success;
}
void
@@ -931,7 +1032,25 @@ XCreateIC(XIM xim, ...)
return (XIC) 0;
}
-#undef XVisualIDFromVisual
+int
+XDeleteProperty(
+ Display *display,
+ Window w,
+ Atom property)
+{
+ return Success;
+}
+
+int
+XGetInputFocus(
+ Display *display,
+ Window *focus_return,
+ int *revert_to_return)
+{
+ display->request++;
+ return Success;
+}
+
VisualID
XVisualIDFromVisual(
Visual *visual)
@@ -939,7 +1058,6 @@ XVisualIDFromVisual(
return visual->visualid;
}
-#undef XSynchronize
XAfterFunction
XSynchronize(
Display *display,
@@ -949,7 +1067,6 @@ XSynchronize(
return NULL;
}
-#undef XUngrabServer
int
XUngrabServer(
Display *display)
@@ -957,7 +1074,14 @@ XUngrabServer(
return 0;
}
-#undef XNoOp
+int
+XFreeCursor(
+ Display *display,
+ Cursor cursor)
+{
+ return Success;
+}
+
int
XNoOp(
Display *display)
@@ -966,7 +1090,6 @@ XNoOp(
return 0;
}
-#undef XGrabServer
int
XGrabServer(
Display *display)
@@ -974,7 +1097,6 @@ XGrabServer(
return 0;
}
-#undef XFree
int
XFree(
void *data)
@@ -984,7 +1106,7 @@ XFree(
}
return 0;
}
-#undef XFlush
+
int
XFlush(
Display *display)
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 7e8377e..52534ce 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -1699,9 +1699,9 @@ typedef struct {
static Ttk_ElementOptionSpec EntryElementOptions[] = {
{"-background", TK_OPTION_BORDER,
- Tk_Offset(EntryElement, backgroundObj), ENTRY_DEFAULT_BACKGROUND},
+ offsetof(EntryElement, backgroundObj), ENTRY_DEFAULT_BACKGROUND},
{"-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(EntryElement, fieldbackgroundObj), ENTRY_DEFAULT_BACKGROUND},
+ offsetof(EntryElement, fieldbackgroundObj), ENTRY_DEFAULT_BACKGROUND},
{0}
};
@@ -2058,10 +2058,10 @@ typedef struct {
} TrackElement;
static Ttk_ElementOptionSpec TrackElementOptions[] = {
- {"-from", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, fromObj)},
- {"-to", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, toObj)},
- {"-value", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, valueObj)},
- {"-orient", TK_OPTION_STRING, Tk_Offset(TrackElement, orientObj)},
+ {"-from", TK_OPTION_DOUBLE, offsetof(TrackElement, fromObj)},
+ {"-to", TK_OPTION_DOUBLE, offsetof(TrackElement, toObj)},
+ {"-value", TK_OPTION_DOUBLE, offsetof(TrackElement, valueObj)},
+ {"-orient", TK_OPTION_STRING, offsetof(TrackElement, orientObj)},
{0, 0, 0}
};
static void TrackElementSize(
@@ -2193,15 +2193,15 @@ typedef struct {
static Ttk_ElementOptionSpec PbarElementOptions[] = {
{"-orient", TK_OPTION_STRING,
- Tk_Offset(PbarElement, orientObj), "horizontal"},
+ offsetof(PbarElement, orientObj), "horizontal"},
{"-value", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement, valueObj), "0"},
+ offsetof(PbarElement, valueObj), "0"},
{"-maximum", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement, maximumObj), "100"},
+ offsetof(PbarElement, maximumObj), "100"},
{"-phase", TK_OPTION_INT,
- Tk_Offset(PbarElement, phaseObj), "0"},
+ offsetof(PbarElement, phaseObj), "0"},
{"-mode", TK_OPTION_STRING,
- Tk_Offset(PbarElement, modeObj), "determinate"},
+ offsetof(PbarElement, modeObj), "determinate"},
{0, 0, 0, 0}
};
static void PbarElementSize(
@@ -2290,7 +2290,7 @@ typedef struct
static Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
{"-orient", TK_OPTION_STRING,
- Tk_Offset(ScrollbarElement, orientObj), "horizontal"},
+ offsetof(ScrollbarElement, orientObj), "horizontal"},
{0, 0, 0, 0}
};
static void TroughElementSize(
@@ -2808,7 +2808,7 @@ typedef struct {
static Ttk_ElementOptionSpec FieldElementOptions[] = {
{"-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(FieldElement, backgroundObj), "white"},
+ offsetof(FieldElement, backgroundObj), "white"},
{NULL, 0, 0, NULL}
};
diff --git a/tests/bell.test b/tests/bell.test
index 4f7df97..bbafeac 100644
--- a/tests/bell.test
+++ b/tests/bell.test
@@ -15,7 +15,7 @@ test bell-1.1 {bell command} -body {
} -returnCodes {error} -result {bad option "a": must be -displayof or -nice}
test bell-1.2 {bell command} -body {
- bell a b
+ bell a b
} -returnCodes {error} -result {bad option "a": must be -displayof or -nice}
test bell-1.3 {bell command} -body {
diff --git a/tests/bind.test b/tests/bind.test
index 20582df..b0cb68a 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -5439,6 +5439,42 @@ test bind-25.49 {modifier names} -setup {
destroy .t.f
} -result <Extended-Key-Return>
+test bind-25.50 {modifier names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+} -body {
+ bind .t.f <Button6-a> foo
+ bind .t.f
+} -cleanup {
+ destroy .t.f
+} -result <B6-Key-a>
+
+test bind-25.51 {modifier names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+} -body {
+ bind .t.f <Button7-a> foo
+ bind .t.f
+} -cleanup {
+ destroy .t.f
+} -result <B7-Key-a>
+
+test bind-25.52 {modifier names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+} -body {
+ bind .t.f <Button8-a> foo
+ bind .t.f
+} -cleanup {
+ destroy .t.f
+} -result <B8-Key-a>
+
+test bind-25.53 {modifier names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+} -body {
+ bind .t.f <Button9-a> foo
+ bind .t.f
+} -cleanup {
+ destroy .t.f
+} -result <B9-Key-a>
+
test bind-26.1 {event names} -setup {
@@ -5772,8 +5808,8 @@ test bind-27.1 {button names} -body {
bind .t <Expose-1> foo
} -returnCodes error -result {specified button "1" for non-button event}
test bind-27.2 {button names} -body {
- bind .t <Button-6> foo
-} -returnCodes error -result {bad button number "6"}
+ bind .t <Button-10> foo
+} -returnCodes error -result {bad button number "10"}
test bind-27.3 {button names} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
@@ -5844,6 +5880,62 @@ test bind-27.7 {button names} -setup {
} -cleanup {
destroy .t.f
} -result {<Button-5> {button 5}}
+test bind-27.8 {button names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+ pack .t.f
+ focus -force .t.f
+ update
+} -body {
+ bind .t.f <Button-6> {lappend x "button 6"}
+ set x [bind .t.f]
+ event generate .t.f <Button-6>
+ event generate .t.f <ButtonRelease-6>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {<Button-6> {button 6}}
+test bind-27.9 {button names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+ pack .t.f
+ focus -force .t.f
+ update
+} -body {
+ bind .t.f <Button-7> {lappend x "button 7"}
+ set x [bind .t.f]
+ event generate .t.f <Button-7>
+ event generate .t.f <ButtonRelease-7>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {<Button-7> {button 7}}
+test bind-27.10 {button names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+ pack .t.f
+ focus -force .t.f
+ update
+} -body {
+ bind .t.f <Button-8> {lappend x "button 8"}
+ set x [bind .t.f]
+ event generate .t.f <Button-8>
+ event generate .t.f <ButtonRelease-8>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {<Button-8> {button 8}}
+test bind-27.11 {button names} -setup {
+ frame .t.f -class Test -width 150 -height 100
+ pack .t.f
+ focus -force .t.f
+ update
+} -body {
+ bind .t.f <Button-9> {lappend x "button 9"}
+ set x [bind .t.f]
+ event generate .t.f <Button-9>
+ event generate .t.f <ButtonRelease-9>
+ set x
+} -cleanup {
+ destroy .t.f
+} -result {<Button-9> {button 9}}
test bind-28.1 {keysym names} -body {
bind .t <Expose-a> foo
@@ -6386,7 +6478,7 @@ test bind-33.1 {prefer longest match} -setup {
} -cleanup {
destroy .t.f
} -result {a11}
-test bind-33.2 {should prefer most specific event} -setup {
+test bind-33.2 {prefer most specific event} -setup {
pack [frame .t.f]
focus -force .t.f
update
@@ -6399,12 +6491,8 @@ test bind-33.2 {should prefer most specific event} -setup {
set x
} -cleanup {
destroy .t.f
- # This test case shows that old implementation has an issue, because
- # it is expected that <Double-1> is matching, this binding
- # is more specific. But new implementation will be conform to old,
- # and so "11" is the expected result.
-} -result {11}
-test bind-33.3 {should prefer most specific event} -setup {
+} -result {Double}
+test bind-33.3 {prefer most specific event} -setup {
pack [frame .t.f]
focus -force .t.f
update
@@ -6419,11 +6507,7 @@ test bind-33.3 {should prefer most specific event} -setup {
set x
} -cleanup {
destroy .t.f
- # Also this test case shows that old implementation has an issue, it is
- # expected that <a><Double-1><a> is matching, because <Double-1> is more
- # specific than <1><1>. But new implementation will be conform to old,
- # and so "11" is the expected result.
-} -result {11}
+} -result {Double}
test bind-33.4 {prefer most specific event} -setup {
pack [frame .t.f]
focus -force .t.f
@@ -6553,11 +6637,7 @@ test bind-33.11 {should prefer most specific} -setup {
set x
} -cleanup {
destroy .t.f
- # This test case shows that old implementation has an issue, because
- # it is expected that first one is matching, this binding
- # is more specific. But new implementation will be conform to old,
- # and so "last" is the expected result.
-} -result {last}
+} -result {first}
test bind-33.12 {prefer last in case of homogeneous equal patterns} -setup {
pack [frame .t.f]
focus -force .t.f
@@ -6629,7 +6709,7 @@ test bind-34.1 {-warp works relatively to a window} -setup {
toplevel .top
} -body {
# In order to avoid platform-dependent coordinate results due to
- # decorations and borders, this test warps the pointer twice
+ # decorations and borders, this test warps the pointer twice
# relatively to a window that moved in the meantime, and checks
# how much the pointer moved
wm geometry .top +200+200
diff --git a/tests/bitmap.test b/tests/bitmap.test
index fea675d..6996f88 100644
--- a/tests/bitmap.test
+++ b/tests/bitmap.test
@@ -15,7 +15,7 @@ test bitmap-1.1 {Tk_AllocBitmapFromObj - converting internal reps} -constraints
testbitmap
} -body {
set x gray25
- lindex $x 0
+ lindex $x 0
button .b -bitmap $x
lindex $x 0
testbitmap gray25
@@ -54,12 +54,12 @@ test bitmap-1.3 {Tk_AllocBitmapFromObj - reuse existing bitmap} -constraints {
test bitmap-2.1 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap bad_name
} -cleanup {
- destroy .b1
+ destroy .b1
} -returnCodes error -result {bitmap "bad_name" not defined}
test bitmap-2.2 {Tk_GetBitmap procedure} -body {
button .b1 -bitmap @xyzzy
} -cleanup {
- destroy .b1
+ destroy .b1
} -returnCodes error -result {error reading bitmap file "xyzzy"}
test bitmap-3.1 {Tk_FreeBitmapFromObj - reference counts} -constraints {
diff --git a/tests/border.test b/tests/border.test
index f610ad8..d6ff5c7 100644
--- a/tests/border.test
+++ b/tests/border.test
@@ -10,8 +10,8 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
-test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints {
- testborder
+test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints {
+ testborder
} -body {
set x orange
lindex $x 0
@@ -21,8 +21,8 @@ test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} -constraints
} -cleanup {
destroy .b1
} -result {{1 0}}
-test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints {
- testborder
+test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints {
+ testborder
} -setup {
set result {}
} -body {
@@ -35,8 +35,8 @@ test border-1.2 {Tk_AllocBorderFromObj - discard stale border} -constraints {
} -cleanup {
destroy .b1 .b2
} -result {{} {{1 1}}}
-test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints {
- testborder
+test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints {
+ testborder
} -setup {
set result {}
} -body {
@@ -49,7 +49,7 @@ test border-1.3 {Tk_AllocBorderFromObj - reuse existing border} -constraints {
} -cleanup {
destroy .b1 .b2
} -result {{{1 1}} {{2 1}}}
-test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints {
+test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
@@ -70,7 +70,7 @@ test border-1.4 {Tk_AllocBorderFromObj - try other borders in list} -constraints
destroy .b1 .b2 .t
} -result {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}}
-test border-2.1 {Tk_Free3DBorder - reference counts} -constraints {
+test border-2.1 {Tk_Free3DBorder - reference counts} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
@@ -94,7 +94,7 @@ test border-2.1 {Tk_Free3DBorder - reference counts} -constraints {
} -cleanup {
destroy .b1 .b2 .t
} -result {{{1 0} {2 1}} {{1 0} {1 1}} {{1 0}} {}}
-test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints {
+test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints {
testborder pseudocolor8
} -setup {
toplevel .t -visual {pseudocolor 8} -colormap new
@@ -127,8 +127,9 @@ test border-2.2 {Tk_Free3DBorder - unlinking from list} -constraints {
destroy .b .t2 .t3 .t
} -result {{{4 1} {3 0} {2 0} {1 0}} {{4 1} {2 0} {1 0}} {{4 1} {2 0}} {{2 0}} {}}
-test border-3.1 {FreeBorderObjProc} -constraints {
- testborder
+
+test border-3.1 {FreeBorderObjProc} -constraints {
+ testborder
} -setup {
set result {}
proc copy {s} {return [string index $s 0][string range $s 1 end]}
diff --git a/tests/busy.test b/tests/busy.test
index cdce30e..001bb6c 100644
--- a/tests/busy.test
+++ b/tests/busy.test
@@ -23,53 +23,59 @@ test busy-2.1 {tk busy hold} -returnCodes error -body {
tk busy hold
} -result {wrong # args: should be "tk busy hold window ?option value ...?"}
test busy-2.2 {tk busy hold root window} -body {
- tk busy hold .
+ set res [tk busy hold .]
update
+ set res
} -cleanup {
tk busy forget .
-} -result {}
+} -result {._Busy}
test busy-2.3 {tk busy hold root window with shortcut} -body {
- tk busy .
+ set res [tk busy .]
update
+ set res
} -cleanup {
tk busy forget .
-} -result {}
+} -result {._Busy}
test busy-2.4 {tk busy hold nested window} -setup {
pack [frame .f]
} -body {
- tk busy hold .f
+ set res [tk busy hold .f]
update
+ set res
} -cleanup {
tk busy forget .f
destroy .f
-} -result {}
+} -result {.f_Busy}
test busy-2.5 {tk busy hold nested window with shortcut} -setup {
pack [frame .f]
} -body {
- tk busy .f
+ set res [tk busy .f]
update
+ set res
} -cleanup {
tk busy forget .f
destroy .f
-} -result {}
+} -result {.f_Busy}
test busy-2.6 {tk busy hold toplevel window} -setup {
toplevel .f
} -body {
- tk busy hold .f
+ set res [tk busy hold .f]
update
+ set res
} -cleanup {
tk busy forget .f
destroy .f
-} -result {}
+} -result {.f._Busy}
test busy-2.7 {tk busy hold toplevel window with shortcut} -setup {
toplevel .f
} -body {
- tk busy .f
+ set res [tk busy .f]
update
+ set res
} -cleanup {
tk busy forget .f
destroy .f
-} -result {}
+} -result {.f._Busy}
test busy-2.8 {tk busy hold non existing window} -body {
tk busy hold .f
update
@@ -79,17 +85,19 @@ test busy-2.9 {tk busy hold (shortcut) non existing window} -body {
update
} -returnCodes {error} -result {bad window path name ".f"}
test busy-2.10 {tk busy hold root window with cursor} -body {
- tk busy hold . -cursor arrow
+ set res [tk busy hold . -cursor arrow]
update
+ set res
} -cleanup {
tk busy forget .
-} -result {}
+} -result {._Busy}
test busy-2.11 {tk busy hold (shortcut) root window, cursor} -body {
- tk busy . -cursor arrow
+ set res [tk busy . -cursor arrow]
update
+ set res
} -cleanup {
tk busy forget .
-} -result {}
+} -result {._Busy}
test busy-2.12 {tk busy hold root window, invalid cursor} -body {
tk busy hold . -cursor nonExistingCursor
update
@@ -473,5 +481,29 @@ test busy-7.9 {tk busy current 2 busy with non matching filter after forget} -se
destroy .f1 .f2
} -result {}
+test busy-8.1 {tk busy busywindow with a busy toplevel} -body {
+ toplevel .top
+ tk busy .top
+ tk busy busywindow .top
+} -cleanup {
+ tk busy forget .top
+ destroy .top
+} -result {.top._Busy}
+test busy-8.2 {tk busy busywindow with a busy widget} -body {
+ pack [frame .f]
+ tk busy .f
+ tk busy busywindow .f
+} -cleanup {
+ tk busy forget .f
+ destroy .f
+} -result {.f_Busy}
+test busy-8.3 {tk busy busywindow with a nonexisting widget} -body {
+ tk busy .
+ tk busy busywindow .nonExistingWidget
+} -cleanup {
+ tk busy forget .
+} -result {}
+
+
::tcltest::cleanupTests
return
diff --git a/tests/button.test b/tests/button.test
index e5cb1b9..f3292b31 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -562,7 +562,7 @@ test button-1.57 {configuration option: "borderwidth" for label} -setup {
update
} -body {
.l configure -borderwidth 1.3
- .l cget -borderwidth
+ .l cget -borderwidth
} -cleanup {
destroy .l
} -result {1.3}
@@ -581,7 +581,7 @@ test button-1.59 {configuration option: "borderwidth" for button} -setup {
update
} -body {
.b configure -borderwidth 1.3
- .b cget -borderwidth
+ .b cget -borderwidth
} -cleanup {
destroy .b
} -result {1.3}
@@ -600,7 +600,7 @@ test button-1.61 {configuration option: "borderwidth" for checkbutton} -setup {
update
} -body {
.c configure -borderwidth 1.3
- .c cget -borderwidth
+ .c cget -borderwidth
} -cleanup {
destroy .c
} -result {1.3}
@@ -619,7 +619,7 @@ test button-1.63 {configuration option: "borderwidth" for radiobutton} -setup {
update
} -body {
.r configure -borderwidth 1.3
- .r cget -borderwidth
+ .r cget -borderwidth
} -cleanup {
destroy .r
} -result {1.3}
@@ -1003,7 +1003,7 @@ test button-1.102 {configuration option: "fg" for radiobutton} -setup {
} -returnCodes {error} -result {unknown color name "non-existent"}
test button-1.103 {configuration option: "font" for label} -setup {
- label .l -borderwidth 2 -highlightthickness 2
+ label .l -borderwidth 2 -highlightthickness 2
pack .l
update
} -body {
@@ -1013,7 +1013,7 @@ test button-1.103 {configuration option: "font" for label} -setup {
destroy .l
} -result {Helvetica -12}
test button-1.104 {configuration option: "activebackground" for label} -setup {
- label .l -borderwidth 2 -highlightthickness 2
+ label .l -borderwidth 2 -highlightthickness 2
pack .l
update
} -body {
@@ -1022,7 +1022,7 @@ test button-1.104 {configuration option: "activebackground" for label} -setup {
destroy .l
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.105 {configuration option: "font" for button} -setup {
- button .b -borderwidth 2 -highlightthickness 2
+ button .b -borderwidth 2 -highlightthickness 2
pack .b
update
} -body {
@@ -1032,7 +1032,7 @@ test button-1.105 {configuration option: "font" for button} -setup {
destroy .b
} -result {Helvetica -12}
test button-1.106 {configuration option: "activebackground" for button} -setup {
- button .b -borderwidth 2 -highlightthickness 2
+ button .b -borderwidth 2 -highlightthickness 2
pack .b
update
} -body {
@@ -1041,7 +1041,7 @@ test button-1.106 {configuration option: "activebackground" for button} -setup {
destroy .b
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.107 {configuration option: "font" for checkbutton} -setup {
- checkbutton .c -borderwidth 2 -highlightthickness 2
+ checkbutton .c -borderwidth 2 -highlightthickness 2
pack .c
update
} -body {
@@ -1051,7 +1051,7 @@ test button-1.107 {configuration option: "font" for checkbutton} -setup {
destroy .c
} -result {Helvetica -12}
test button-1.108 {configuration option: "activebackground" for checkbutton} -setup {
- checkbutton .c -borderwidth 2 -highlightthickness 2
+ checkbutton .c -borderwidth 2 -highlightthickness 2
pack .c
update
} -body {
@@ -1060,7 +1060,7 @@ test button-1.108 {configuration option: "activebackground" for checkbutton} -se
destroy .c
} -returnCodes {error} -result {font "" doesn't exist}
test button-1.109 {configuration option: "font" for radiobutton} -setup {
- radiobutton .r -borderwidth 2 -highlightthickness 2
+ radiobutton .r -borderwidth 2 -highlightthickness 2
pack .r
update
} -body {
@@ -1070,7 +1070,7 @@ test button-1.109 {configuration option: "font" for radiobutton} -setup {
destroy .r
} -result {Helvetica -12}
test button-1.110 {configuration option: "activebackground" for radiobutton} -setup {
- radiobutton .r -borderwidth 2 -highlightthickness 2
+ radiobutton .r -borderwidth 2 -highlightthickness 2
pack .r
update
} -body {
@@ -2669,7 +2669,7 @@ test button-1.270 {configuration options} -body {
} -result {}
# ex-tests 3.*
-test button-2.1 {ButtonCreate - not enough arguments} -body {
+test button-2.1 {ButtonCreate - not enough arguments} -body {
button
} -returnCodes {error} -result {wrong # args: should be "button pathName ?-option value ...?"}
@@ -2709,16 +2709,16 @@ test button-2.6 {ButtonCreate - setting class} -body {
test button-2.7 {ButtonCreate - bad window name} -body {
button foo
} -cleanup {
- destroy foo
+ destroy foo
} -returnCodes {error} -result {bad window path name "foo"}
-######### test ex 3.8
-test button-2.8 {ButtonCreate procedure - error in default option value} -body {
+######### test ex 3.8
+test button-2.8 {ButtonCreate procedure - error in default option value} -body {
option add *funny.background bogus
button .funny
} -cleanup {
option clear
destroy .funny
-} -returnCodes {error} -result {unknown color name "bogus"}
+} -returnCodes {error} -result {unknown color name "bogus"}
test button-2.9 {ButtonCreate procedure - error in default option value} -body {
option add *funny.background bogus
catch {button .funny}
@@ -2731,13 +2731,13 @@ test button-2.9 {ButtonCreate procedure - error in default option value} -body {
invoked from within
"button .funny"}
-test button-2.10 {ButtonCreate procedure - option error} -body {
+test button-2.10 {ButtonCreate procedure - option error} -body {
button .x -gorp foo
} -cleanup {
destroy .x
-} -returnCodes {error} -result {unknown option "-gorp"}
+} -returnCodes {error} -result {unknown option "-gorp"}
test button-2.11 {ButtonCreate procedure - option error} -body {
- catch {button .x -gorp foo}
+ catch {button .x -gorp foo}
winfo exists .x
} -cleanup {
destroy .x
@@ -2788,13 +2788,13 @@ test button-3.6 {ButtonWidgetCmd procedure, "cget" option} -body {
.l cget -disabledforeground
} -cleanup {
destroy .l
-} -returnCodes {ok} -match {glob} -result {*}
+} -returnCodes {ok} -match {glob} -result {*}
test button-3.7 {ButtonWidgetCmd procedure, "cget" option} -body {
button .b
.b cget -disabledforeground
} -cleanup {
destroy .b
-} -returnCodes {ok} -match {glob} -result {*}
+} -returnCodes {ok} -match {glob} -result {*}
test button-3.8 {ButtonWidgetCmd procedure, "cget" option} -body {
button .b
.b cget -variable
@@ -2807,7 +2807,7 @@ test button-3.9 {ButtonWidgetCmd procedure, "cget" option} -body {
.c cget -variable
} -cleanup {
destroy .c
-} -returnCodes {ok} -match {glob} -result {*}
+} -returnCodes {ok} -match {glob} -result {*}
test button-3.10 {ButtonWidgetCmd procedure, "cget" option} -body {
checkbutton .c
.c cget -value
@@ -2820,7 +2820,7 @@ test button-3.11 {ButtonWidgetCmd procedure, "cget" option} -body {
.r cget -value
} -cleanup {
destroy .r
-} -returnCodes {ok} -match {glob} -result {*}
+} -returnCodes {ok} -match {glob} -result {*}
test button-3.12 {ButtonWidgetCmd procedure, "cget" option} -body {
radiobutton .r
.r cget -onvalue
@@ -2840,7 +2840,7 @@ test button-3.14 {ButtonWidgetCmd procedure, "configure" option} -body {
llength [.c configure]
} -cleanup {
destroy .c
-} -result {41}
+} -result {41}
test button-3.15 {ButtonWidgetCmd procedure, "configure" option} -body {
button .b
.b configure -gorp
@@ -2889,7 +2889,7 @@ test button-3.21 {ButtonWidgetCmd procedure, "deselect" option} -body {
return $checkvar
} -cleanup {
destroy .c
-} -result {0}
+} -result {0}
test button-3.22 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar green
@@ -2897,7 +2897,7 @@ test button-3.22 {ButtonWidgetCmd procedure, "deselect" option} -body {
return $radiovar
} -cleanup {
destroy .r
-} -result {green}
+} -result {green}
test button-3.23 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
@@ -2905,9 +2905,9 @@ test button-3.23 {ButtonWidgetCmd procedure, "deselect" option} -body {
return $radiovar
} -cleanup {
destroy .r
-} -result {}
+} -result {}
-test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
+test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
trace variable checkvar w bogusTrace
@@ -2915,7 +2915,7 @@ test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
} -cleanup {
destroy .c
trace vdelete checkvar w bogusTrace
-} -returnCodes {error} -result {can't set "checkvar": trace aborted}
+} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.25 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
@@ -2937,7 +2937,7 @@ test button-3.26 {ButtonWidgetCmd procedure, "deselect" option} -body {
} -cleanup {
destroy .r
trace vdelete radiovar w bogusTrace
-} -match {glob} -returnCodes {error} -result {can't set "radiovar": trace aborted}
+} -match {glob} -returnCodes {error} -result {can't set "radiovar": trace aborted}
test button-3.27 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
@@ -2964,19 +2964,19 @@ test button-3.29 {ButtonWidgetCmd procedure, "flash" option} -body {
} -cleanup {
destroy .l
} -returnCodes {error} -result {bad option "flash": must be cget or configure}
-test button-3.30 {ButtonWidgetCmd procedure, "flash" option} -body {
+test button-3.30 {ButtonWidgetCmd procedure, "flash" option} -body {
button .b
catch {.b flash}
} -cleanup {
destroy .b
} -returnCodes {ok} -match {glob} -result {*}
-test button-3.31 {ButtonWidgetCmd procedure, "flash" option} -body {
+test button-3.31 {ButtonWidgetCmd procedure, "flash" option} -body {
checkbutton .c
catch {.c flash}
} -cleanup {
destroy .c
} -returnCodes {ok} -match {glob} -result {*}
-test button-3.32 {ButtonWidgetCmd procedure, "flash" option} -body {
+test button-3.32 {ButtonWidgetCmd procedure, "flash" option} -body {
radiobutton .r
catch {.r f}
} -cleanup {
@@ -3060,14 +3060,14 @@ test button-3.42 {ButtonWidgetCmd procedure, "select" option} -body {
destroy .c
} -result {lovely}
test button-3.43 {ButtonWidgetCmd procedure, "select" option} -body {
- radiobutton .r -variable radiovar -value red
+ radiobutton .r -variable radiovar -value red
set radiovar green
.r select
return $radiovar
} -cleanup {
destroy .r
} -result {red}
-test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
+test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
trace variable radiovar w bogusTrace
@@ -3075,7 +3075,7 @@ test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
} -cleanup {
destroy .r
trace vdelete radiovar w bogusTrace
-} -returnCodes {error} -result {can't set "radiovar": trace aborted}
+} -returnCodes {error} -result {can't set "radiovar": trace aborted}
test button-3.45 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
@@ -3128,7 +3128,7 @@ test button-3.50 {ButtonWidgetCmd procedure, "toggle" option} -body {
} -cleanup {
destroy .c
} -result {sunshine rain sunshine}
-test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
+test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
trace variable checkvar w bogusTrace
@@ -3136,12 +3136,12 @@ test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
} -cleanup {
destroy .c
trace vdelete checkvar w bogusTrace
-} -returnCodes {error} -result {can't set "checkvar": trace aborted}
+} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
trace variable checkvar w bogusTrace
- catch {.c toggle}
+ catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
trace vdelete checkvar w bogusTrace
@@ -3150,7 +3150,7 @@ test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body {
while executing
*
".c toggle"} abc}
-test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
+test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
trace variable checkvar w bogusTrace
@@ -3158,12 +3158,12 @@ test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
} -cleanup {
trace vdelete checkvar w bogusTrace
destroy .c
-} -returnCodes {error} -result {can't set "checkvar": trace aborted}
+} -returnCodes {error} -result {can't set "checkvar": trace aborted}
test button-3.54 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
trace variable checkvar w bogusTrace
- catch {.c toggle}
+ catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
trace vdelete checkvar w bogusTrace
@@ -3174,17 +3174,17 @@ test button-3.54 {ButtonWidgetCmd procedure, "toggle" option} -body {
".c toggle"} xyz}
test button-3.55 {ButtonWidgetCmd procedure, "toggle" option} -setup {
unset -nocomplain checkvar
-} -body {
+} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
unset checkvar
set checkvar(1) 1
.c toggle
} -cleanup {
destroy .c
-} -returnCodes {error} -result {can't set "checkvar": variable is array}
+} -returnCodes {error} -result {can't set "checkvar": variable is array}
test button-3.56 {ButtonWidgetCmd procedure, "toggle" option} -setup {
unset -nocomplain checkvar
-} -body {
+} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
unset checkvar
set checkvar(1) 1
@@ -3209,22 +3209,22 @@ test button-4.1 {DestroyButton procedure} -constraints {
checkbutton .b5 -variable x -text "Checkbutton 5"
set x 1
pack .b1 .b2 .b3 .b4 .b5
- update
- deleteWindows
+ update
+ deleteWindows
} -cleanup {
destroy .b1 .b2 .b3 .b4 .b5
image delete image1
-} -result {}
+} -result {}
test button-5.1 {ConfigureButton - textvariable trace} -body {
button .b -bd 4 -bg green
.b configure -bd 7 -bg red -fg bogus
} -cleanup {
destroy .b
-} -returnCodes {error} -result {unknown color name "bogus"}
+} -returnCodes {error} -result {unknown color name "bogus"}
test button-5.2 {ConfigureButton - textvariable trace} -body {
button .b -bd 4 -bg green
- catch {.b configure -bd 7 -bg red -fg bogus}
+ catch {.b configure -bd 7 -bg red -fg bogus}
list [.b cget -bd] [.b cget -bg]
} -cleanup {
destroy .b
@@ -3271,7 +3271,7 @@ test button-5.6 {ConfigureButton - default value for variable} -body {
checkbutton .c
.c cget -variable
} -cleanup {
- destroy .c
+ destroy .c
} -result {c}
test button-5.7 {ConfigureButton - setting selected state from variable} -body {
set x 0
@@ -3305,7 +3305,7 @@ test button-5.10 {ConfigureButton - error in setting variable} -setup {
unset -nocomplain x
} -body {
trace variable x w bogusTrace
- radiobutton .r -variable x
+ radiobutton .r -variable x
} -cleanup {
destroy .r
trace vdelete x w bogusTrace
@@ -3342,7 +3342,7 @@ test button-5.14 {ConfigureButton - variable handling} -setup {
} -cleanup {
trace vdelete x w bogusTrace
destroy .r
-} -returnCodes {error} -result {can't set "x": trace aborted}
+} -returnCodes {error} -result {can't set "x": trace aborted}
test button-5.15 {ConfigureButton - variable handling} -setup {
unset -nocomplain x
} -body {
@@ -3355,12 +3355,12 @@ test button-5.15 {ConfigureButton - variable handling} -setup {
} -result {foo}
#ex 6.14
-test button-5.16 {ConfigureButton - -width option} -body {
+test button-5.16 {ConfigureButton - -width option} -body {
button .b -text "Button 1"
.b configure -width 1i
} -cleanup {
destroy .b
-} -returnCodes {error} -result {expected integer but got "1i"}
+} -returnCodes {error} -result {expected integer but got "1i"}
test button-5.17 {ConfigureButton - -width option} -body {
button .b -text "Button 1"
catch {.b configure -width 1i}
@@ -3371,15 +3371,15 @@ test button-5.17 {ConfigureButton - -width option} -body {
(processing -width option)
invoked from within
".b configure -width 1i"}
-test button-5.18 {ConfigureButton - -height option} -body {
+test button-5.18 {ConfigureButton - -height option} -body {
button .b -text "Button 1"
.b configure -height 0.5c
} -cleanup {
destroy .b
-} -returnCodes {error} -result {expected integer but got "0.5c"}
-test button-5.19 {ConfigureButton - -height option} -body {
+} -returnCodes {error} -result {expected integer but got "0.5c"}
+test button-5.19 {ConfigureButton - -height option} -body {
button .b -text "Button 1"
- catch {.b configure -height 0.5c}
+ catch {.b configure -height 0.5c}
return $errorInfo
} -cleanup {
destroy .b
@@ -3393,10 +3393,10 @@ test button-5.20 {ConfigureButton - -width option} -body {
.b configure -width abc
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "abc"}
+} -returnCodes {error} -result {bad screen distance "abc"}
test button-5.21 {ConfigureButton - -width option} -body {
button .b -bitmap questhead
- catch {.b configure -width abc}
+ catch {.b configure -width abc}
return $errorInfo
} -cleanup {
destroy .b
@@ -3414,7 +3414,7 @@ test button-5.22 {ConfigureButton - -height option} -constraints {
} -cleanup {
destroy .b
image delete image1
-} -returnCodes {error} -result {bad screen distance "0.5x"}
+} -returnCodes {error} -result {bad screen distance "0.5x"}
test button-5.23 {ConfigureButton - -height option} -constraints {
testImageType
} -setup {
@@ -3422,7 +3422,7 @@ test button-5.23 {ConfigureButton - -height option} -constraints {
} -body {
#ztestImageType
button .b -image image1
- catch {.b configure -height 0.5x}
+ catch {.b configure -height 0.5x}
return $errorInfo
} -cleanup {
destroy .b
@@ -3523,7 +3523,7 @@ test button-7.1 {ButtonCmdDeletedProc procedure} -body {
test button-8.1 {TkInvokeButton procedure} -setup {
set x 0
-} -body {
+} -body {
checkbutton .c -variable x
set result $x
.c invoke
@@ -3534,9 +3534,9 @@ test button-8.1 {TkInvokeButton procedure} -setup {
destroy .c
} -result {0 1 0}
-test button-8.2 {TkInvokeButton procedure} -setup {
+test button-8.2 {TkInvokeButton procedure} -setup {
set x 0
-} -body {
+} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
.c invoke
@@ -3546,7 +3546,7 @@ test button-8.2 {TkInvokeButton procedure} -setup {
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-8.3 {TkInvokeButton procedure} -setup {
set x 0
-} -body {
+} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
catch {.c invoke}
@@ -3555,9 +3555,9 @@ test button-8.3 {TkInvokeButton procedure} -setup {
destroy .c
trace vdelete x w bogusTrace
} -result {1}
-test button-8.4 {TkInvokeButton procedure} -setup {
+test button-8.4 {TkInvokeButton procedure} -setup {
set x 1
-} -body {
+} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
.c invoke
@@ -3567,7 +3567,7 @@ test button-8.4 {TkInvokeButton procedure} -setup {
} -returnCodes {error} -result {can't set "x": trace aborted}
test button-8.5 {TkInvokeButton procedure} -setup {
set x 1
-} -body {
+} -body {
checkbutton .c -variable x
trace variable x w bogusTrace
catch {.c invoke}
@@ -3579,7 +3579,7 @@ test button-8.5 {TkInvokeButton procedure} -setup {
test button-8.6 {TkInvokeButton procedure} -setup {
set x 0
-} -body {
+} -body {
radiobutton .r -variable x -value red
set result $x
.r invoke
@@ -3590,7 +3590,7 @@ test button-8.6 {TkInvokeButton procedure} -setup {
destroy .r
} -result {0 red red}
-test button-8.7 {TkInvokeButton procedure} -body {
+test button-8.7 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
trace variable x w bogusTrace
@@ -3599,7 +3599,7 @@ test button-8.7 {TkInvokeButton procedure} -body {
destroy .r
trace vdelete x w bogusTrace
} -returnCodes {error} -result {can't set "x": trace aborted}
-test button-8.8 {TkInvokeButton procedure} -body {
+test button-8.8 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
trace variable x w bogusTrace
@@ -3754,7 +3754,7 @@ test button-10.2 {ButtonTextVarProc procedure} -setup {
} -result {0}
test button-11.1 {ButtonImageProc procedure} -constraints {
- testImageType
+ testImageType
} -setup {
label .l -highlightthickness 0 -font {Helvetica -12 bold}
image create test image1
@@ -3788,7 +3788,7 @@ test button-13.1 {size behavior: label} -setup {
label .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3800,14 +3800,14 @@ test button-13.1 {size behavior: label} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.2 {size behavior: label} -setup {
label .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
label .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3819,7 +3819,7 @@ test button-13.2 {size behavior: label} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.3 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -3827,7 +3827,7 @@ test button-13.3 {size behavior: button} -setup {
button .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3839,14 +3839,14 @@ test button-13.3 {size behavior: button} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.4 {size behavior: button} -setup {
button .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .b -borderwidth 2 -highlightthickness 2 -font {Arial 20}
button .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3858,7 +3858,7 @@ test button-13.4 {size behavior: button} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.5 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -3866,7 +3866,7 @@ test button-13.5 {size behavior: radiobutton} -setup {
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3878,7 +3878,7 @@ test button-13.5 {size behavior: radiobutton} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.6 {size behavior: radiobutton} -setup {
radiobutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
@@ -3886,7 +3886,7 @@ test button-13.6 {size behavior: radiobutton} -setup {
radiobutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3898,7 +3898,7 @@ test button-13.6 {size behavior: radiobutton} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.7 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -3906,7 +3906,7 @@ test button-13.7 {size behavior: checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3918,7 +3918,7 @@ test button-13.7 {size behavior: checkbutton} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-13.8 {size behavior: checkbutton} -setup {
checkbutton .a -borderwidth 2 -highlightthickness 2 -font {Arial 20}
@@ -3926,7 +3926,7 @@ test button-13.8 {size behavior: checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Arial 20}
set result {}
} -body {
- .a configure -text Hej
+ .a configure -text Hej
.b configure -text Hej -width 10 -height 1
.c configure -text "" -width 10 -height 1
@@ -3938,7 +3938,7 @@ test button-13.8 {size behavior: checkbutton} -setup {
lappend result [expr {[winfo reqheight .a] == [winfo reqheight .b]}]
} -cleanup {
destroy .a .b .c
-} -result {1 1 1}
+} -result {1 1 1}
test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destruction} -body {
proc destroy_button {} {
@@ -3956,7 +3956,7 @@ test button-14.1 {bug fix: [011706ec42] tk::ButtonInvoke unsafe wrt widget destr
update ; # shall not trigger error invalid command name ".top.b"
} -cleanup {
destroy .top.b .top
-} -result {}
+} -result {}
test button-15.1 {Bug [5d991b822e]} {
# Want this not to segfault
diff --git a/tests/canvImg.test b/tests/canvImg.test
index a5e8e10..bd9edb5 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -322,7 +322,7 @@ test canvImg-6.9 {ComputeImageBbox procedure} -constraints testImageType -setup
imageCleanup
} -result {5 15 35 30}
test canvImg-6.10 {ComputeImageBbox procedure} -constraints {
- testImageType
+ testImageType
} -setup {
image create test foo
.c delete all
@@ -335,7 +335,7 @@ test canvImg-6.10 {ComputeImageBbox procedure} -constraints {
image delete foo
} -result {20 15 50 30}
test canvImg-6.11 {ComputeImageBbox procedure} -constraints {
- testImageType
+ testImageType
} -setup {
image create test foo
.c delete all
@@ -348,7 +348,7 @@ test canvImg-6.11 {ComputeImageBbox procedure} -constraints {
image delete foo
} -result {20 23 50 38}
test canvImg-6.12 {ComputeImageBbox procedure} -constraints {
- testImageType
+ testImageType
} -setup {
image create test foo
.c delete all
@@ -731,7 +731,7 @@ if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image.
set result_10_1 {{foo display 0 0 30 15}}
} else {
- set result_10_1 {{foo display 2 4 6 8}}
+ set result_10_1 {{foo display 2 4 6 8}}
}
test canvImg-10.1 {TranslateImage procedure} -constraints testImageType -setup {
.c delete all
@@ -771,7 +771,7 @@ test canvImg-11.1 {TranslateImage procedure} -constraints testImageType -setup {
image delete foo
} -result {{foo display 0 0 40 50}}
test canvImg-11.2 {ImageChangedProc procedure} -constraints {
- testImageType
+ testImageType
} -setup {
.c delete all
} -body {
@@ -789,10 +789,10 @@ if {[tk windowingsystem] == "aqua" && $tcl_platform(osVersion) > 18} {
# Aqua >= 10.14 will redraw the entire image.
set result_11_3 {{foo2 display 0 0 80 60}}
} else {
- set result_11_3 {{foo2 display 0 0 20 40}}
+ set result_11_3 {{foo2 display 0 0 20 40}}
}
test canvImg-11.3 {ImageChangedProc procedure} -constraints {
- testImageType
+ testImageType
} -setup {
.c delete all
update
diff --git a/tests/canvMoveto.test b/tests/canvMoveto.test
index 79761a4..60eb6f3 100644
--- a/tests/canvMoveto.test
+++ b/tests/canvMoveto.test
@@ -33,7 +33,7 @@ test canvMoveto-1.5 {Bad args handling for "moveto" command} -body {
test canvMoveto-2.1 {Canvas "moveto" command coordinates} {
.c moveto test 200 150
.c bbox test
-} {200 150 272 232}
+} {200 150 272 232}
test canvMoveto-2.2 {Canvas "moveto" command, blank y coordinate} {
.c moveto test 200 150
.c moveto test 150 {}
diff --git a/tests/canvRect.test b/tests/canvRect.test
index a2cc51c..ec59e8b 100644
--- a/tests/canvRect.test
+++ b/tests/canvRect.test
@@ -228,7 +228,7 @@ test canvRect-6.2 {RectToPoint procedure} -body {
[expr {[.c find closest 20 25.1] eq $yId}] \
[expr {[.c find closest 20 29.9] eq $yId}] \
[expr {[.c find closest 20 30.1] eq $xId}]
-
+
} -cleanup {
.c delete all
} -result {1 1 1 1}
@@ -250,7 +250,7 @@ test canvRect-6.4 {RectToPoint procedure} -body {
list [expr {[.c find closest 20 24.4] eq $xId}] \
[expr {[.c find closest 20 24.6] eq $yId}] \
[expr {[.c find closest 20 30.4] eq $yId}] \
- [expr {[.c find closest 20 30.6] eq $xId}]
+ [expr {[.c find closest 20 30.6] eq $xId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
@@ -275,18 +275,18 @@ test canvRect-6.6 {RectToPoint procedure} -body {
list [expr {[.c find closest 20 23.2] eq $xId}] \
[expr {[.c find closest 20 23.3] eq $yId}] \
[expr {[.c find closest 20 31.7] eq $yId}] \
- [expr {[.c find closest 20 31.8] eq $xId}]
+ [expr {[.c find closest 20 31.8] eq $xId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
-
+
test canvRect-6.7 {RectToPoint procedure} -body {
- set xId [.c create rectangle 10 20 30 40 -outline {} -fill black]
+ set xId [.c create rectangle 10 20 30 40 -outline {} -fill black]
set yId [.c create rectangle 40 40 50 50 -outline {} -fill black]
list [expr {[.c find closest 35 35] eq $xId}] \
[expr {[.c find closest 36 36] eq $yId}] \
[expr {[.c find closest 37 37] eq $yId}] \
- [expr {[.c find closest 38 38] eq $yId}]
+ [expr {[.c find closest 38 38] eq $yId}]
} -cleanup {
.c delete all
} -result {1 1 1 1}
diff --git a/tests/canvas.test b/tests/canvas.test
index fe4c2b7..2dcc48b 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -340,8 +340,10 @@ test canvas-8.1 {canvas arc bbox} -setup {
set coordBox [.c bbox arc2]
.c create arc 300 10 500 210 -start 10 -extent 50 -style pieslice -tags arc3
set pieBox [.c bbox arc3]
- list $arcBox $coordBox $pieBox
-} -result {{48 21 100 94} {248 21 300 94} {398 21 500 112}}
+ .c create arc 100 200 300 200 -height [expr {(1-0.5*sqrt(3))*200}] -style arc -tags arc4
+ set arcSegBox [.c bbox arc4]
+ list $arcBox $coordBox $pieBox $arcSegBox
+} -result {{48 21 100 94} {248 21 300 94} {398 21 500 112} {98 171 302 202}}
test canvas-9.1 {canvas id creation and deletion} -setup {
catch {destroy .c}
@@ -537,10 +539,10 @@ test canvas-12.1 {canvas mm obj, patch SF-403327, 102471} -setup {
destroy .c
pack [canvas .c]
} -body {
- set qx [expr {1.+1.}]
- # qx has type double and no string representation
+ set qx [expr {1.+1.}]
+ # qx has type double and no string representation
.c scale all $qx 0 1. 1.
- # qx has now type MMRep and no string representation
+ # qx has now type MMRep and no string representation
list $qx [string length $qx]
} -result {2.0 3}
test canvas-12.2 {canvas mm obj, patch SF-403327, 102471} -setup {
@@ -549,9 +551,9 @@ test canvas-12.2 {canvas mm obj, patch SF-403327, 102471} -setup {
} -body {
set val 10
incr val
- # qx has type double and no string representation
+ # qx has type double and no string representation
.c scale all $val 0 1 1
- # qx has now type MMRep and no string representation
+ # qx has now type MMRep and no string representation
incr val
} -result 12
@@ -727,7 +729,7 @@ test canvas-15.19 "basic coords check: centimeters are larger than pixels" -setu
destroy .c
canvas .c
} -body {
- set id [.c create rect 0 0 1cm 1cm]
+ set id [.c create rect 0 0 1cm 1cm]
expr {[lindex [.c coords $id] 2]>1}
} -result {1}
destroy .c
@@ -950,6 +952,295 @@ test canvas-19.11 {rchars method - errors} -setup {
destroy .c
} -returnCodes error -result {bad index "foo"}
+# Procedure used in test cases 20.1 20.2 20.3
+proc matchPixels {pixels expected} {
+ set matched 1
+ foreach pline $pixels eline $expected {
+ foreach ppixel $pline epixel $eline {
+ if {$ppixel != $epixel} {
+ set matched 0
+ break
+ }
+ }
+ }
+ return $matched
+}
+
+test canvas-20.1 {canvas image} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 0 9 -fill #000080 -outline #000080
+ .c image testimage
+ matchPixels [testimage data] { \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#000080 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
+test canvas-20.2 {canvas image with subsample} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 1 9 -fill #008000 -outline #008000
+ .c image testimage 2
+ matchPixels [testimage data] { \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#008000 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
+test canvas-20.3 {canvas image with subsample and zoom} -setup {
+ canvas .c
+ image create photo testimage
+} -body {
+ .c configure -background #c0c0c0 -scrollregion {0 0 9 9}
+ .c create rectangle 0 0 9 0 -fill #800000 -outline #800000
+ .c image testimage 1 2
+ matchPixels [testimage data] { \
+ {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \
+ {#800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000 #800000} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0} \
+ {#c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0 #c0c0c0}}
+} -cleanup {
+ destroy .c
+ image delete testimage
+} -result 1
+
+test canvas-21.1 {canvas very small arc} -setup {
+ catch {destroy .c}
+ canvas .c
+} -body {
+ # no Inf or NaN must be generated even for very small arcs
+ .c create arc 0 100 0 100 -height 100 -style arc -outline "" -tags arc1
+ set arcBox [.c bbox arc1]
+ .c create arc 0 100 0 100 -height 100 -style arc -outline blue -tags arc2
+ set outlinedArcBox [.c bbox arc2]
+ set coords [.c coords arc1]
+ set start [.c itemcget arc1 -start]
+ set extent [.c itemcget arc1 -extent]
+ set width [.c itemcget arc1 -width]
+ set height [.c itemcget arc1 -height]
+ list $arcBox $outlinedArcBox $coords $start $extent $width $height
+} -result {{-1 99 1 101} {-2 98 2 102} {0.0 100.0 0.0 100.0} 0.0 0.0 1.0 0.0}
+
+
+destroy .c
+test canvas-21.1 {canvas rotate} -setup {
+ pack [canvas .c]
+} -body {
+ .c create line 50 50 50 100 100 100
+ .c rotate all 75 75 90
+ lmap c [.c coords all] {format %.2f $c}
+} -cleanup {
+ destroy .c
+} -result {50.00 100.00 100.00 100.00 100.00 50.00}
+test canvas-21.2 {canvas rotate} -setup {
+ pack [canvas .c]
+} -body {
+ .c create line 50 50 50 100 100 100
+ .c rotate all 75 75 -10
+ lmap c [.c coords all] {format %.2f $c}
+} -cleanup {
+ destroy .c
+} -result {54.72 46.04 46.04 95.28 95.28 103.96}
+test canvas-21.3 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all 75 75
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {wrong # args: should be ".c rotate tagOrId x y angle"}
+test canvas-21.4 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all 75 75 123 123
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {wrong # args: should be ".c rotate tagOrId x y angle"}
+test canvas-21.5 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate {!} 1 1 1
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {missing tag in tag search expression}
+test canvas-21.6 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all x 1 1
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {bad screen distance "x"}
+test canvas-21.7 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all 1 x 1
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {bad screen distance "x"}
+test canvas-21.8 {canvas rotate: syntax} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all 1 1 x
+} -returnCodes error -cleanup {
+ destroy .c
+} -result {expected floating-point number but got "x"}
+test canvas-21.9 {canvas rotate: nothing to rotate} -setup {
+ pack [canvas .c]
+} -body {
+ .c rotate all 75 75 10
+} -cleanup {
+ destroy .c
+} -result {}
+test canvas-21.10 {canvas rotate: multiple things to rotate} -setup {
+ pack [canvas .c]
+} -body {
+ .c create line 50 50 50 100 -tag a
+ .c create line 50 50 100 50 -tag b
+ .c rotate all 75 75 45
+ list [lmap c [.c coords a] {format %.2f $c}] [lmap c [.c coords b] {format %.2f $c}]
+} -cleanup {
+ destroy .c
+} -result {{39.64 75.00 75.00 110.36} {39.64 75.00 75.00 39.64}}
+
+test canvas-22.1 {canvas rotate: arc item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create arc 50 50 75 75 -start 45 -extent 90
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {-start -extent} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 125.00 75.00 150.00} {45.0 90.0} {52 123 73 140}}
+test canvas-22.2 {canvas rotate: bitmap item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create bitmap 50 50 -bitmap info -anchor se
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {-bitmap -anchor} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 150.00} {info se} {42 129 50 150}}
+test canvas-22.3 {canvas rotate: image item rotation behaviour} -setup {
+ pack [canvas .c]
+ image create photo dummy -width 50 -height 50
+} -body {
+ .c create image 50 50 -image dummy -anchor se
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {-image -anchor} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+ image delete dummy
+} -result {{50.00 150.00} {dummy se} {0 100 50 150}}
+test canvas-22.4 {canvas rotate: line item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create line 50 50 75 50 50 75 75 75
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 150.00 50.00 125.00 75.00 150.00 75.00 125.00} {} {48 123 77 152}}
+test canvas-22.5 {canvas rotate: oval item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create oval 50 50 65 85
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{60.00 125.00 75.00 160.00} {} {59 124 76 161}}
+test canvas-22.6 {canvas rotate: polygon item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create polygon 50 50 75 50 50 75 75 75
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 150.00 50.00 125.00 75.00 150.00 75.00 125.00} {} {48 123 77 152}}
+test canvas-22.7 {canvas rotate: rectangle item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create rectangle 50 50 75 75
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 125.00 75.00 150.00} {} {49 124 76 151}}
+test canvas-22.8 {canvas rotate: text item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create text 50 50 -text foo -angle 45
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {-text -angle} {.c itemcget all $o}]
+ # [.c bbox all]
+ # No testing of text bounding box; fonts too variable!
+} -cleanup {
+ destroy .c
+} -result {{50.00 150.00} {foo 45.0}}
+test canvas-22.9 {canvas rotate: window item rotation behaviour} -setup {
+ pack [canvas .c]
+} -body {
+ .c create window 50 50 -window [frame .c.f -width 25 -height 25] \
+ -anchor se
+ .c rotate all 100 100 90
+ list [lmap c [.c coords all] {format %.2f $c}] \
+ [lmap o {} {.c itemcget all $o}] \
+ [.c bbox all]
+} -cleanup {
+ destroy .c
+} -result {{50.00 150.00} {} {25 125 50 150}}
+
# cleanup
imageCleanup
cleanupTests
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 9689942..81534d5 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -180,7 +180,7 @@ test clipboard-4.4 {ClipboardLostSel procedure} -setup {
clipboard get
} -cleanup {
clipboard clear
-} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined}
+} -returnCodes error -result {CLIPBOARD selection doesn't exist or form "STRING" not defined}
test clipboard-4.5 {ClipboardLostSel procedure} -setup {
clipboard clear
} -body {
diff --git a/tests/cmds.test b/tests/cmds.test
index fa7e788..caf5afe 100644
--- a/tests/cmds.test
+++ b/tests/cmds.test
@@ -39,7 +39,7 @@ test cmds-1.5 {tkwait visibility, window gets deleted} -setup {
} -body {
after 100 {set x deleted; destroy .f}
tkwait visibility .f.b
-} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed}
+} -returnCodes {error} -result {window ".f.b" was deleted before its visibility changed}
test cmds-1.6 {tkwait visibility, window gets deleted} -setup {
frame .f
button .f.b -text "Test"
diff --git a/tests/config.test b/tests/config.test
index 833e288..9fd048a 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -196,7 +196,7 @@ test config-3.7 {Tk_InitOptions - bad initial value} -constraints {
testobjconfig
} -body {
option add *a.color non-existent
- catch {testobjconfig alltypes .a}
+ catch {testobjconfig alltypes .a}
return $errorInfo
} -cleanup {
killTables
@@ -558,7 +558,7 @@ test config-4.41 {DoObjConfig - null color} -constraints testobjconfig -body {
killTables
} -returnCodes ok
test config-4.42 {DoObjConfig - getting rid of old color} -constraints {
- testobjconfig
+ testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
@@ -566,7 +566,7 @@ test config-4.42 {DoObjConfig - getting rid of old color} -constraints {
killTables
} -returnCodes ok -result {32}
test config-4.43 {DoObjConfig - getting rid of old color} -constraints {
- testobjconfig
+ testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
@@ -575,7 +575,7 @@ test config-4.43 {DoObjConfig - getting rid of old color} -constraints {
killTables
} -returnCodes ok -result {#444444}
test config-4.44 {DoObjConfig - getting rid of old color} -constraints {
- testobjconfig
+ testobjconfig
} -body {
testobjconfig alltypes .foo -color #333333
.foo configure -color #444444
@@ -665,13 +665,13 @@ test config-4.54 {DoObjConfig - bitmap} -constraints testobjconfig -body {
} -returnCodes ok -result {gray75}
test config-4.55 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
- .foo configure -bitmap gray50
+ .foo configure -bitmap gray50
} -cleanup {
killTables
} -returnCodes ok -result {128}
test config-4.56 {DoObjConfig - new bitmap} -constraints testobjconfig -body {
testobjconfig alltypes .foo -bitmap gray75
- .foo configure -bitmap gray50
+ .foo configure -bitmap gray50
.foo cget -bitmap
} -cleanup {
killTables
@@ -745,7 +745,7 @@ test config-4.66 {DoObjConfig - border internal value} -constraints {
killTables
} -result {#123456}
test config-4.67 {DoObjConfig - getting rid of old border} -constraints {
- testobjconfig
+ testobjconfig
} -body {
testobjconfig alltypes .foo -border #333333
.foo configure -border #444444
@@ -753,7 +753,7 @@ test config-4.67 {DoObjConfig - getting rid of old border} -constraints {
killTables
} -returnCodes ok -result {256}
test config-4.68 {DoObjConfig - getting rid of old border} -constraints {
- testobjconfig
+ testobjconfig
} -body {
testobjconfig alltypes .foo -border #333333
.foo configure -border #444444
@@ -790,13 +790,13 @@ test config-4.72 {DoObjConfig - relief internal value} -constraints testobjconfi
} -result {ridge}
test config-4.73 {DoObjConfig - new relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief raised
- .foo configure -relief flat
+ .foo configure -relief flat
} -cleanup {
killTables
} -returnCodes ok -result {512}
test config-4.74 {DoObjConfig - new relief} -constraints testobjconfig -body {
testobjconfig alltypes .foo -relief raised
- .foo configure -relief flat
+ .foo configure -relief flat
.foo cget -relief
} -cleanup {
killTables
@@ -915,7 +915,7 @@ test config-4.91 {DoObjConfig - invalid anchor} -constraints testobjconfig -body
} -returnCodes error -result {bad anchor "foo": must be n, ne, e, se, s, sw, w, nw, or center}
test config-4.92 {DoObjConfig - new anchor} -constraints testobjconfig -body {
testobjconfig alltypes .foo -anchor e
- .foo configure -anchor n
+ .foo configure -anchor n
} -cleanup {
killTables
} -returnCodes ok -result {4096}
@@ -993,7 +993,7 @@ test config-4.102 {DoObjConfig - window} -constraints testobjconfig -body {
} -returnCodes ok -result {.bar}
test config-4.103 {DoObjConfig - invalid window} -constraints testobjconfig -body {
toplevel .bar
- testobjconfig twowindows .foo -window foo
+ testobjconfig twowindows .foo -window foo
} -cleanup {
killTables
} -returnCodes error -result {bad window path name "foo"}
@@ -1205,19 +1205,19 @@ test config-7.3 {Tk_SetOptions - synonym} -constraints testobjconfig -body {
test config-7.4 {Tk_SetOptions - missing value} -constraints {
testobjconfig
} -body {
- .a configure -color green -relief
+ .a configure -color green -relief
} -returnCodes error -result {value for "-relief" missing}
test config-7.5 {Tk_SetOptions - missing value} -constraints {
testobjconfig
} -body {
- catch {.a configure -color green -relief}
+ catch {.a configure -color green -relief}
.a cget -color
} -result {green}
test config-7.6 {Tk_SetOptions - saving old values} -constraints {
testobjconfig
} -body {
.a configure -color red -int 7 -relief raised -double 3.14159
- .a csave -color green -int 432 -relief sunken -double 2.0 -color bogus
+ .a csave -color green -int 432 -relief sunken -double 2.0 -color bogus
} -returnCodes error -result {unknown color name "bogus"}
test config-7.7 {Tk_SetOptions - saving old values} -constraints {
testobjconfig
@@ -1230,7 +1230,7 @@ test config-7.7 {Tk_SetOptions - saving old values} -constraints {
test config-7.8 {Tk_SetOptions - error in DoObjConfig call} -constraints {
testobjconfig
} -body {
- .a configure -color bogus
+ .a configure -color bogus
} -returnCodes error -result {unknown color name "bogus"}
test config-7.9 {Tk_SetOptions - error in DoObjConfig call} -constraints {
testobjconfig
@@ -1262,7 +1262,7 @@ test config-7.12 {Tk_SetOptions - returning mask} -constraints testobjconfig -bo
test config-7.13 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints {
testobjconfig
} -body {
- .a configure -custom bad
+ .a configure -custom bad
} -returnCodes error -result {expected good value, got "BAD"}
test config-7.14 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints {
testobjconfig
diff --git a/tests/cursor.test b/tests/cursor.test
index 172c982..8d7ebb0 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -108,7 +108,7 @@ test cursor-2.3 {Tk_GetCursor procedure: cursor specs are lists} -constraints {
} -cleanup {
destroy .b
removeDirectory $wincur(dir)
- unset wincur
+ unset wincur
} -result {.b}
test cursor-2.4 {Tk_GetCursor procedure: cursor specs are lists} -constraints {
win
diff --git a/tests/entry.test b/tests/entry.test
index 3c80e07..b92c894 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -16,7 +16,7 @@ proc scroll args {
global scrollInfo
set scrollInfo $args
}
-# For trace variable
+# For trace variable
proc override args {
global x
set x 12345
@@ -106,7 +106,7 @@ test entry-1.7 {configuration option: "borderwidth" for entry} -setup {
update
} -body {
.e configure -borderwidth 1.3
- .e cget -borderwidth
+ .e cget -borderwidth
} -cleanup {
destroy .e
} -result {1}
@@ -221,7 +221,7 @@ test entry-1.18 {configuration option: "fg" for entry} -setup {
} -returnCodes {error} -result {unknown color name "non-existent"}
test entry-1.19 {configuration option: "font" for entry} -setup {
- entry .e -borderwidth 2 -highlightthickness 2
+ entry .e -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -231,7 +231,7 @@ test entry-1.19 {configuration option: "font" for entry} -setup {
destroy .e
} -result {Helvetica -12}
test entry-1.20 {configuration option: "font" for entry} -setup {
- entry .e -borderwidth 2 -highlightthickness 2
+ entry .e -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -627,6 +627,23 @@ test entry-1.58 {configuration option: "xscrollcommand" for entry} -setup {
destroy .e
} -result {Some command}
+test entry-1.59 {configuration option: "-placeholder"} -setup {
+ pack [entry .e]
+} -body {
+ .e configure -placeholder {Some text}
+ .e cget -placeholder
+} -cleanup {
+ destroy .e
+} -result {Some text}
+
+test entry-1.60 {configuration option: "-placeholderforeground"} -setup {
+ pack [entry .e]
+} -body {
+ .e configure -placeholder {Some text} -placeholderforeground red
+ .e cget -placeholderforeground
+} -cleanup {
+ destroy .e
+} -result {red}
test entry-2.1 {Tk_EntryCmd procedure} -body {
@@ -662,7 +679,7 @@ test entry-2.5 {Tk_EntryCmd procedure} -body {
test entry-3.1 {EntryWidgetCmd procedure} -setup {
- entry .e
+ entry .e
pack .e
update
} -body {
@@ -671,7 +688,7 @@ test entry-3.1 {EntryWidgetCmd procedure} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e option ?arg ...?"}
test entry-3.2 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -680,7 +697,7 @@ test entry-3.2 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.3 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -689,7 +706,7 @@ test entry-3.3 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.4 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
- entry .e
+ entry .e
pack .e
update
} -body {
@@ -698,7 +715,7 @@ test entry-3.4 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {bad entry index "bogus"}
test entry-3.5 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -707,7 +724,7 @@ test entry-3.5 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -result [list 5 5 0 $cy]
-# Previously the result was count using previousli counted font measurements
+# Previously the result was count using previousli counted font measurements
# and metrics. It was changed to less verbose solution - the result is the one
# that passes fonts constraint (this concerns tests 3.6, 3.7, 3.8, 3.10)
test entry-3.6 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
@@ -726,7 +743,7 @@ test entry-3.6 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
test entry-3.7 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -739,7 +756,7 @@ test entry-3.7 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
test entry-3.8 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -750,7 +767,7 @@ test entry-3.8 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
destroy .e
} -result {31 5 7 13}
test entry-3.9 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -762,7 +779,7 @@ test entry-3.9 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
test entry-3.10 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -772,28 +789,28 @@ test entry-3.10 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
destroy .e
} -result {{5 5 7 13} {12 5 7 13} {75 5 12 13} {122 5 7 13}}
test entry-3.11 {EntryWidgetCmd procedure, "cget" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e cget
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test entry-3.12 {EntryWidgetCmd procedure, "cget" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e cget a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test entry-3.13 {EntryWidgetCmd procedure, "cget" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e cget -gorp
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-gorp"}
test entry-3.14 {EntryWidgetCmd procedure, "cget" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e configure -bd 4
.e cget -bd
@@ -801,23 +818,23 @@ test entry-3.14 {EntryWidgetCmd procedure, "cget" widget command} -setup {
destroy .e
} -result {4}
test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -setup {
- entry .e
+ entry .e
pack .e
update
} -body {
llength [.e configure]
} -cleanup {
destroy .e
-} -result {36}
+} -result {38}
test entry-3.16 {EntryWidgetCmd procedure, "configure" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e configure -foo
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-foo"}
test entry-3.17 {EntryWidgetCmd procedure, "configure" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e configure -bd 4
.e configure -bg #ffffff
@@ -826,28 +843,28 @@ test entry-3.17 {EntryWidgetCmd procedure, "configure" widget command} -setup {
destroy .e
} -result {4}
test entry-3.18 {EntryWidgetCmd procedure, "delete" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e delete
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test entry-3.19 {EntryWidgetCmd procedure, "delete" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e delete a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test entry-3.20 {EntryWidgetCmd procedure, "delete" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e delete foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.21 {EntryWidgetCmd procedure, "delete" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e delete 0 bar
} -cleanup {
@@ -856,7 +873,7 @@ test entry-3.21 {EntryWidgetCmd procedure, "delete" widget command} -setup {
test entry-3.22 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e delete 2 4
@@ -865,7 +882,7 @@ test entry-3.22 {EntryWidgetCmd procedure, "delete" widget command} -setup {
destroy .e
} -result {014567890}
test entry-3.23 {EntryWidgetCmd procedure, "delete" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert end "01234567890"
.e delete 6
@@ -876,7 +893,7 @@ test entry-3.23 {EntryWidgetCmd procedure, "delete" widget command} -setup {
test entry-3.24 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
- update
+ update
set x {}
} -body {
# UTF
@@ -897,7 +914,7 @@ test entry-3.24 {EntryWidgetCmd procedure, "delete" widget command} -setup {
test entry-3.25 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e delete 6 5
@@ -908,7 +925,7 @@ test entry-3.25 {EntryWidgetCmd procedure, "delete" widget command} -setup {
test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state disabled
@@ -921,7 +938,7 @@ test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup {
test entry-3.26a {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state readonly
@@ -932,28 +949,28 @@ test entry-3.26a {EntryWidgetCmd procedure, "delete" widget command} -setup {
destroy .e
} -result {01234567890}
test entry-3.27 {EntryWidgetCmd procedure, "get" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e get foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e get"}
test entry-3.28 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e icursor
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e icursor pos"}
test entry-3.29 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e icursor foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad entry index "foo"}
test entry-3.30 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert end "01234567890"
.e icursor 4
@@ -962,21 +979,21 @@ test entry-3.30 {EntryWidgetCmd procedure, "icursor" widget command} -setup {
destroy .e
} -result {4}
test entry-3.31 {EntryWidgetCmd procedure, "index" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e in
} -cleanup {
destroy .e
} -returnCodes error -result {ambiguous option "in": must be bbox, cget, configure, delete, get, icursor, index, insert, scan, selection, validate, or xview}
test entry-3.32 {EntryWidgetCmd procedure, "index" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e index
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e index string"}
test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e index foo
} -cleanup {
@@ -985,7 +1002,7 @@ test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup {
test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e index 0
} -cleanup {
@@ -994,7 +1011,7 @@ test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup {
test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
# UTF
.e insert 0 abc\u4e4e\u0153def
@@ -1003,21 +1020,21 @@ test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup {
destroy .e
} -result {3 4 8}
test entry-3.36 {EntryWidgetCmd procedure, "insert" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.37 {EntryWidgetCmd procedure, "insert" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert foo Text
} -cleanup {
@@ -1026,7 +1043,7 @@ test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup {
test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e insert 3 xxx
@@ -1037,7 +1054,7 @@ test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup {
test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state disabled
@@ -1050,7 +1067,7 @@ test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup {
test entry-3.40a {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state readonly
@@ -1061,14 +1078,14 @@ test entry-3.40a {EntryWidgetCmd procedure, "insert" widget command} -setup {
destroy .e
} -result {01234567890}
test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup {
- entry .e
+ entry .e
pack .e
update
} -body {
@@ -1079,7 +1096,7 @@ test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup {
test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e scan a b c
} -cleanup {
@@ -1088,7 +1105,7 @@ test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup {
test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e scan foobar 20
} -cleanup {
@@ -1097,7 +1114,7 @@ test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup {
test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e scan mark 20.1
} -cleanup {
@@ -1108,7 +1125,7 @@ test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup {
test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -constraints {
fonts
} -setup {
- entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1121,14 +1138,14 @@ test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -constraints {
destroy .e
} -result {2}
test entry-3.47 {EntryWidgetCmd procedure, "select" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e select
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection option ?index?"}
test entry-3.48 {EntryWidgetCmd procedure, "select" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e select foo
} -cleanup {
@@ -1136,28 +1153,28 @@ test entry-3.48 {EntryWidgetCmd procedure, "select" widget command} -setup {
} -returnCodes error -result {bad selection option "foo": must be adjust, clear, from, present, range, or to}
test entry-3.49 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e select clear gorp
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection clear"}
test entry-3.50 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test entry-3.50.1 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end "0123456789"
.e select from 1
@@ -1171,7 +1188,7 @@ test entry-3.50.1 {EntryWidgetCmd procedure, "select clear" widget command} -set
} -result {.e}
test entry-3.51 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
- entry .e
+ entry .e
} -body {
.e selection present foo
} -cleanup {
@@ -1180,7 +1197,7 @@ test entry-3.51 {EntryWidgetCmd procedure, "selection present" widget command} -
test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1192,7 +1209,7 @@ test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -
test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1205,7 +1222,7 @@ test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -
test entry-3.54 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1344,7 +1361,7 @@ test entry-3.64b {EntryWidgetCmd procedure, "selection to" widget command} -setu
} -returnCodes error -result {wrong # args: should be ".e selection to index"}
test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1356,7 +1373,7 @@ test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.0537634 0.2688172}
test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1365,7 +1382,7 @@ test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {bad entry index "gorp"}
test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1379,7 +1396,7 @@ test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.107527 0.322581}
test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1388,7 +1405,7 @@ test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"}
test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1397,7 +1414,7 @@ test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {expected floating-point number but got "foo"}
test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1409,7 +1426,7 @@ test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.505376 0.720430}
test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1418,9 +1435,9 @@ test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 24
} -cleanup {
destroy .e
-} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
+} -returnCodes error -result {wrong # args: should be ".e xview scroll number pages|units"}
test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1431,7 +1448,7 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {expected integer but got "gorp"}
test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1444,7 +1461,7 @@ test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.193548 0.408602}
test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1458,7 +1475,7 @@ test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.397849 0.612903}
test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1466,13 +1483,13 @@ test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview 30
update
- .e xview scroll 2 units
+ .e xview scroll 2 units
.e index @0
} -cleanup {
destroy .e
} -result {32}
test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1480,13 +1497,13 @@ test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview 30
update
- .e xview scroll -1 units
+ .e xview scroll -1 units
.e index @0
} -cleanup {
destroy .e
} -result {29}
test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1495,9 +1512,9 @@ test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 23 foobars
} -cleanup {
destroy .e
-} -returnCodes error -result {bad argument "foobars": must be units or pages}
+} -returnCodes error -result {bad argument "foobars": must be pages or units}
test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1508,7 +1525,7 @@ test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {unknown option "eat": must be moveto or scroll}
test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1522,7 +1539,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0}
test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1534,7 +1551,7 @@ test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {73}
test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1556,7 +1573,7 @@ test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.095745 0.106383 0.117021}
test entry-3.82 {EntryWidgetCmd procedure} -setup {
- entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1615,7 +1632,7 @@ test entry-5.4 {ConfigureEntry procedure, -textvariable} -setup {
} -cleanup {
destroy .e
trace vdelete x w override
- unset x;
+ unset x;
} -result {12345 12345}
test entry-5.5 {ConfigureEntry procedure} -setup {
@@ -1640,14 +1657,14 @@ test entry-5.5 {ConfigureEntry procedure} -setup {
destroy .e1 .e2
} -result {{This is so} {This is so} 1234}
test entry-5.6 {ConfigureEntry procedure} -setup {
- entry .e
+ entry .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
@@ -1659,14 +1676,14 @@ test entry-5.6.1 {ConfigureEntry procedure} -setup {
.e select from 1
.e select to 5
.e configure -exportselection 0
- catch {selection get}
+ catch {selection get}
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5}
test entry-5.7 {ConfigureEntry procedure} -setup {
- entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
+ entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
@@ -1684,7 +1701,7 @@ test entry-5.7 {ConfigureEntry procedure} -setup {
test entry-5.8 {ConfigureEntry procedure} -constraints {
fonts
} -setup {
- entry .e -borderwidth 2 -highlightthickness 2
+ entry .e -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -width 0 -font {Helvetica -12}
@@ -1739,7 +1756,7 @@ test entry-5.11 {ConfigureEntry procedure} -setup {
test entry-6.1 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
- entry .e
+ entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
@@ -1753,7 +1770,7 @@ test entry-6.1 {EntryComputeGeometry procedure} -constraints {
test entry-6.2 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
- entry .e
+ entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
@@ -1767,7 +1784,7 @@ test entry-6.2 {EntryComputeGeometry procedure} -constraints {
test entry-6.3 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
- entry .e
+ entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
@@ -1779,7 +1796,7 @@ test entry-6.3 {EntryComputeGeometry procedure} -constraints {
destroy .e
} -result {3 4}
test entry-6.4 {EntryComputeGeometry procedure} -setup {
- entry .e
+ entry .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
@@ -1794,7 +1811,7 @@ test entry-6.5 {EntryComputeGeometry procedure} -setup {
entry .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Courier -12} -bd 2 -relief raised -width 5
+ .e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 7
@@ -1808,7 +1825,7 @@ test entry-6.6 {EntryComputeGeometry procedure} -constraints {
entry .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Courier -12} -bd 2 -relief raised -width 10
+ .e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e insert end "01234\t67890"
update
.e xview 3
@@ -1848,14 +1865,14 @@ test entry-6.9 {EntryComputeGeometry procedure} -constraints {
entry .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
+ .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
update
list [winfo reqwidth .e] [winfo reqheight .e]
} -cleanup {
destroy .e
} -result {25 39}
test entry-6.10 {EntryComputeGeometry procedure} -constraints {
- unix fonts
+ unix fonts
} -setup {
entry .e -highlightthickness 2 -font {Helvetica -12}
pack .e
@@ -1910,7 +1927,7 @@ test entry-6.12 {EntryComputeGeometry procedure} -constraints {
test entry-7.1 {InsertChars procedure} -setup {
- unset -nocomplain contents
+ unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
@@ -1927,8 +1944,8 @@ test entry-7.1 {InsertChars procedure} -setup {
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test entry-7.2 {InsertChars procedure} -setup {
- unset -nocomplain contents
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ unset -nocomplain contents
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -1999,7 +2016,7 @@ test entry-7.6 {InsertChars procedure} -setup {
destroy .e
} -result {2 6 2 5}
test entry-7.7 {InsertChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -xscrollcommand scroll
@@ -2011,7 +2028,7 @@ test entry-7.7 {InsertChars procedure} -setup {
destroy .e
} -result {7}
test entry-7.8 {InsertChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789
@@ -2022,7 +2039,7 @@ test entry-7.8 {InsertChars procedure} -setup {
destroy .e
} -result {4}
test entry-7.9 {InsertChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
@@ -2034,7 +2051,7 @@ test entry-7.9 {InsertChars procedure} -setup {
destroy .e
} -result {7}
test entry-7.10 {InsertChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
@@ -2049,7 +2066,7 @@ test entry-7.10 {InsertChars procedure} -setup {
test entry-7.11 {InsertChars procedure} -constraints {
fonts
} -setup {
- entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "xyzzy"
@@ -2062,7 +2079,7 @@ test entry-7.11 {InsertChars procedure} -constraints {
test entry-8.1 {DeleteChars procedure} -setup {
unset -nocomplain contents
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2078,7 +2095,7 @@ test entry-8.1 {DeleteChars procedure} -setup {
} -result {abe abe {0.000000 1.000000}}
test entry-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2094,7 +2111,7 @@ test entry-8.2 {DeleteChars procedure} -setup {
} -result {cde cde {0.000000 1.000000}}
test entry-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2109,7 +2126,7 @@ test entry-8.3 {DeleteChars procedure} -setup {
after cancel $timeout
} -result {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2125,7 +2142,7 @@ test entry-8.4 {DeleteChars procedure} -setup {
destroy .e
} -result {1 6 1 5}
test entry-8.5 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2141,7 +2158,7 @@ test entry-8.5 {DeleteChars procedure} -setup {
destroy .e
} -result {1 5 1 4}
test entry-8.6 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2157,7 +2174,7 @@ test entry-8.6 {DeleteChars procedure} -setup {
destroy .e
} -result {1 2 1 5}
test entry-8.7 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2171,7 +2188,7 @@ test entry-8.7 {DeleteChars procedure} -setup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.8 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2187,7 +2204,7 @@ test entry-8.8 {DeleteChars procedure} -setup {
destroy .e
} -result {3 4 3 8}
test entry-8.9 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789abcde
@@ -2200,7 +2217,7 @@ test entry-8.9 {DeleteChars procedure} -setup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.10 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2216,7 +2233,7 @@ test entry-8.10 {DeleteChars procedure} -setup {
destroy .e
} -result {3 5 5 8}
test entry-8.11 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2232,7 +2249,7 @@ test entry-8.11 {DeleteChars procedure} -setup {
destroy .e
} -result {3 8 4 8}
test entry-8.12 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2245,7 +2262,7 @@ test entry-8.12 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test entry-8.13 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2258,7 +2275,7 @@ test entry-8.13 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test entry-8.14 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2271,7 +2288,7 @@ test entry-8.14 {DeleteChars procedure} -setup {
destroy .e
} -result {4}
test entry-8.15 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2284,7 +2301,7 @@ test entry-8.15 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test entry-8.16 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2297,7 +2314,7 @@ test entry-8.16 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test entry-8.17 {DeleteChars procedure} -setup {
- entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2310,17 +2327,27 @@ test entry-8.17 {DeleteChars procedure} -setup {
destroy .e
} -result {4}
test entry-8.18 {DeleteChars procedure} -setup {
- entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
+ entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "xyzzy"
update
.e delete 2 4
- winfo reqwidth .e
-} -cleanup {
- destroy .e
-} -result {31}
+ # To check that deletion actually happened we measure the new width
+ # of the widget, based on the measuring width of the remaining text ("xyy")
+ # in the widget. For that purpose we have to mirror the code in tkEntry.c
+ # for computation of the reqwidth
+ # note: XPAD corresponds to the hardcoded #define XPAD 1
+ set XPAD 1
+ set expected [expr { [font measure [.e cget -font] "xyy"] \
+ + 2 * ( [.e cget -borderwidth] + \
+ [.e cget -highlightthickness] + $XPAD ) } ]
+ expr {[winfo reqwidth .e] == $expected}
+} -cleanup {
+ destroy .e
+ unset XPAD expected
+} -result {1}
test entry-9.1 {EntryValueChanged procedure} -setup {
unset -nocomplain x
@@ -2341,7 +2368,7 @@ test entry-10.1 {EntrySetValue procedure} -constraints fonts -body {
set y ab
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0
pack .e
- .e configure -textvariable x
+ .e configure -textvariable x
.e configure -textvariable y
update
list [.e get] [winfo reqwidth .e]
@@ -2350,7 +2377,7 @@ test entry-10.1 {EntrySetValue procedure} -constraints fonts -body {
} -result {ab 24}
test entry-10.2 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
- entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2363,7 +2390,7 @@ test entry-10.2 {EntrySetValue procedure, updating selection} -setup {
} -returnCodes error -result {selection isn't in widget .e}
test entry-10.3 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
- entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2376,7 +2403,7 @@ test entry-10.3 {EntrySetValue procedure, updating selection} -setup {
} -result {4 7}
test entry-10.4 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
- entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2389,7 +2416,7 @@ test entry-10.4 {EntrySetValue procedure, updating selection} -setup {
} -result {4 10}
test entry-10.5 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
- entry .e -highlightthickness 2 -bd 2
+ entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2404,7 +2431,7 @@ test entry-10.5 {EntrySetValue procedure, updating display position} -setup {
} -result {0}
test entry-10.6 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
- entry .e -highlightthickness 2 -bd 2
+ entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2420,7 +2447,7 @@ test entry-10.6 {EntrySetValue procedure, updating display position} -setup {
} -result {10}
test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
- entry .e -highlightthickness 2 -bd 2
+ entry .e -highlightthickness 2 -bd 2
pack .e
update
} -body {
@@ -2435,7 +2462,7 @@ test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup {
} -result {3}
test entry-10.8 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
- entry .e -highlightthickness 2 -bd 2
+ entry .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2492,7 +2519,7 @@ test entry-13.1 {GetEntryIndex procedure} -setup {
destroy .e
} -result {21}
test entry-13.2 {GetEntryIndex procedure} -body {
- entry .e
+ entry .e
.e index abogus
} -cleanup {
destroy .e
@@ -2583,7 +2610,7 @@ test entry-13.9 {GetEntryIndex procedure} -setup {
test entry-13.10 {GetEntryIndex procedure} -constraints x11 -body {
-# On unix, when selection is cleared, entry widget's internal
+# On unix, when selection is cleared, entry widget's internal
# selection range is reset.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2603,7 +2630,7 @@ test entry-13.10 {GetEntryIndex procedure} -constraints x11 -body {
test entry-13.11 {GetEntryIndex procedure} -constraints aquaOrWin32 -body {
# On mac and pc, when selection is cleared, entry widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2620,7 +2647,7 @@ test entry-13.11 {GetEntryIndex procedure} -constraints aquaOrWin32 -body {
.e index sel.first
} -cleanup {
destroy .e
-} -result {1}
+} -result {1}
test entry-13.12 {GetEntryIndex procedure} -constraints x11 -body {
# Previous settings:
@@ -2639,7 +2666,7 @@ test entry-13.12 {GetEntryIndex procedure} -constraints x11 -body {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
-# why when string in .e index changed to not beginning with s,
+# why when string in .e index changed to not beginning with s,
# it behaves differently?
test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body {
# Previous settings:
@@ -2677,7 +2704,7 @@ test entry-13.13 {GetEntryIndex procedure} -constraints win -body {
test entry-13.14 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2690,14 +2717,14 @@ test entry-13.14 {GetEntryIndex procedure} -constraints win -body {
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, entry widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2709,9 +2736,9 @@ test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body {
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
- selection clear .e
- catch {selection get}
- .e index sbogus
+ selection clear .e
+ catch {selection get}
+ .e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
@@ -2726,7 +2753,7 @@ test entry-13.15 {GetEntryIndex procedure} -body {
test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -2759,7 +2786,7 @@ test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body {
} -result {5}
test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -2791,7 +2818,7 @@ test entry-13.21 {GetEntryIndex procedure} -body {
destroy .e
} -result {9}
test entry-13.22 {GetEntryIndex procedure} -setup {
- entry .e
+ entry .e
pack .e
update
} -body {
@@ -2801,7 +2828,7 @@ test entry-13.22 {GetEntryIndex procedure} -setup {
} -returnCodes error -result {bad entry index "1xyz"}
test entry-13.23 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -2812,7 +2839,7 @@ test entry-13.23 {GetEntryIndex procedure} -body {
} -result {0}
test entry-13.24 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -2823,7 +2850,7 @@ test entry-13.24 {GetEntryIndex procedure} -body {
} -result {12}
test entry-13.25 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -2872,7 +2899,7 @@ test entry-14.3 {EntryFetchSelection procedure} -setup {
}
} -body {
entry .e
- .e insert end $x
+ .e insert end $x
.e select from 0
.e select to end
string compare [selection get] $x
@@ -2899,7 +2926,7 @@ test entry-16.1 {EntryVisibleRange procedure} -constraints fonts -body {
entry .e -width 10 -font {Helvetica -12}
pack .e
update
- .e insert 0 "............................."
+ .e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
@@ -2998,7 +3025,7 @@ test entry-18.1 {Entry widget vs hiding} -setup {
set res1 [list [winfo children .] [interp hidden]]
set res2 [list {} $l]
expr {$res1 == $res2}
-} -result {1}
+} -result {1}
##
## Entry widget VALIDATION tests
@@ -3352,7 +3379,7 @@ test entry-19.19 {entry widget validation} -setup {
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
-
+
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V]
.e validate
list [.e cget -validate] [.e get] $::vVals
@@ -3377,7 +3404,7 @@ test entry-19.20 {entry widget validation} -setup {
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev
.e validate ;# previous settings
-
+
.e configure -validate all
set ::e testdata
list [.e cget -validate] [.e get] $::e $::vVals
diff --git a/tests/event.test b/tests/event.test
index a95815e..98b877c 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -245,7 +245,7 @@ test event-2.2(keypress) {type into entry widget and then delete some text} -set
set e [entry $t.e]
pack $e
tkwait visibility $e
- # Avoid a hang when macOS puts the mouse pointer on the green button
+ # Avoid a hang when macOS puts the mouse pointer on the green button
wm geometry .t +200+100
_keypress_string $e MELLO
_keypress $e BackSpace
@@ -359,7 +359,7 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests
# Save the position of the insert cursor
lappend result [$e index insert]
-
+
# Now drag until selend is highlighted, then click up
set current $anchor
@@ -426,7 +426,7 @@ test event-3.1(click-drag) {click and drag in a text widget, this tests
# Save the position of the insert cursor
lappend result [$e index insert]
-
+
# Now drag until selend is highlighted, then click up
set current $anchor
@@ -612,7 +612,7 @@ test event-4.2(double-click-drag) {click down, click up, click down again,
deleteWindows
} -result {select 11 7 select 4 { select} {Word select} 2}
-test event-5.1(triple-click-drag) {Triple click and drag across lines in a
+test event-5.1(triple-click-drag) {Triple click and drag across lines in a
text widget, this should extend the selection to the new line} -setup {
deleteWindows
} -body {
@@ -797,7 +797,7 @@ test event-7.2(double-click) {A double click on a lone character
set result [list]
lappend result [$e index insert]
lappend result [_get_selection $e]
-
+
# Clear selection by clicking at 0,0
event generate $e <ButtonPress-1> -x 0 -y 0
@@ -825,7 +825,7 @@ test event-7.2(double-click) {A double click on a lone character
} -result {4 A 4 A}
test event-8 {event generate with keysyms corresponding to
- multi-byte virtual keycodes - bug
+ multi-byte virtual keycodes - bug
e36963bfe8df9f5e528134707a91b9c0051de723} -constraints nonPortable -setup {
deleteWindows
set res [list ]
diff --git a/tests/filebox.test b/tests/filebox.test
index 0114a07..e373d73 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -167,7 +167,7 @@ foreach mode $modes {
catch {tk_getOpenFile -foo 1} msg
regsub -all , $msg "" options
regsub \"-foo\" $options "" options
-
+
foreach option $options {
if {[string index $option 0] eq "-"} {
test filebox-1.2-$mode$option "tk_getOpenFile command" -body {
diff --git a/tests/focus.test b/tests/focus.test
index 45cf73b..73bb9fd 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -104,7 +104,7 @@ test focus-1.7 {Tk_FocusCmd procedure} -constraints unix -body {
focus .gorp a
} -returnCodes error -result {bad option ".gorp": must be -displayof, -force, or -lastfor}
test focus-1.8 {Tk_FocusCmd procedure, focussing on dead window} -constraints {
- unix
+ unix
} -setup {
destroy .t2
} -body {
@@ -130,29 +130,29 @@ test focus-1.8 {Tk_FocusCmd procedure, focussing on dead window} -constraints {
destroy .t2
} -result {.t2.f2 .t2 .t2}
test focus-1.9 {Tk_FocusCmd procedure, -displayof option} -constraints {
- unix
+ unix
} -body {
focus -displayof
} -returnCodes error -result {wrong # args: should be "focus -displayof window"}
test focus-1.10 {Tk_FocusCmd procedure, -displayof option} -constraints {
- unix
+ unix
} -body {
focus -displayof a b
} -returnCodes error -result {wrong # args: should be "focus -displayof window"}
test focus-1.11 {Tk_FocusCmd procedure, -displayof option} -constraints {
- unix
+ unix
} -body {
focus -displayof .lousy
} -returnCodes error -result {bad window path name ".lousy"}
test focus-1.12 {Tk_FocusCmd procedure, -displayof option} -constraints {
- unix
+ unix
} -body {
focusClear
focus .t
focus -displayof .t.b3
} -result {}
test focus-1.13 {Tk_FocusCmd procedure, -displayof option} -constraints {
- unix
+ unix
} -body {
focusClear
focus -force .t
@@ -185,22 +185,22 @@ test focus-1.19 {Tk_FocusCmd procedure, -force option} -constraints unix -body {
lappend x [focus]
} -result {{} .t.b1}
test focus-1.20 {Tk_FocusCmd procedure, -lastfor option} -constraints {
- unix
+ unix
} -body {
focus -lastfor
} -returnCodes error -result {wrong # args: should be "focus -lastfor window"}
test focus-1.21 {Tk_FocusCmd procedure, -lastfor option} -constraints {
- unix
+ unix
} -body {
focus -lastfor 1 2
} -returnCodes error -result {wrong # args: should be "focus -lastfor window"}
test focus-1.22 {Tk_FocusCmd procedure, -lastfor option} -constraints {
- unix
+ unix
} -body {
focus -lastfor who_knows?
} -returnCodes error -result {bad window path name "who_knows?"}
test focus-1.23 {Tk_FocusCmd procedure, -lastfor option} -constraints {
- unix
+ unix
} -body {
focusClear
focusSetup
@@ -209,7 +209,7 @@ test focus-1.23 {Tk_FocusCmd procedure, -lastfor option} -constraints {
list [focus -lastfor .] [focus -lastfor .t.b3]
} -result {.b .t.b1}
test focus-1.24 {Tk_FocusCmd procedure, -lastfor option} -constraints {
- unix
+ unix
} -body {
focusClear
focusSetup
diff --git a/tests/font.test b/tests/font.test
index 8894d85..09c2dc6 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -141,7 +141,7 @@ test font-4.9 {font command: actual} -constraints {unix noExceed} -body {
test font-4.10 {font command: actual} -constraints win -body {
# (objc > 3) so objPtr = objv[3 + skip]
font actual {-family times} -family
-} -result {Times New Roman}
+} -result {times}
test font-4.11 {font command: bad option} -body {
font actual xyz -style
} -returnCodes error -result {bad option "-style": must be -family, -size, -weight, -slant, -underline, or -overstrike}
@@ -153,7 +153,7 @@ test font-4.13 {font command: actual} -body {
} -match glob -result {*}
test font-4.14 {font command: actual} -constraints win -body {
font actual {-family times} -family -- \ud800\udc00
-} -result {Times New Roman}
+} -result {times}
test font-4.15 {font command: actual} -body {
font actual {-family times} -- \udc00\ud800
} -returnCodes 1 -match glob -result {expected a single character but got "*"}
@@ -2355,7 +2355,7 @@ test font-45.1 {TkFontGetAliasList: no match} -body {
} -result [font actual {-size 10} -family]
test font-45.2 {TkFontGetAliasList: match} -constraints win -body {
font actual {times 10} -family
-} -result {Times New Roman}
+} -result {times}
test font-45.3 {TkFontGetAliasList: match} -constraints {noExceed} -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
diff --git a/tests/frame.test b/tests/frame.test
index 88f74f9..77eae31 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -1,5 +1,5 @@
-# This file is a Tcl script to test out the "frame" and "toplevel"
-# commands of Tk. It is organized in the standard fashion for Tcl
+# This file is a Tcl script to test out the "frame", "labelframe" and
+# "toplevel" commands of Tk. It is organized in the standard fashion for Tcl
# tests.
#
# Copyright (c) 1994 The Regents of the University of California.
@@ -9,12 +9,14 @@
package require tcltest 2.2
namespace import ::tcltest::*
-eval tcltest::configure $argv
+tcltest::configure {*}$argv
tcltest::loadTestedCommands
+tcltest::testConstraint x11 [expr {[tk windowingsystem] eq "x11"}]
+
# eatColors --
-# Creates a toplevel window and allocates enough colors in it to
-# use up all the slots in the colormap.
+# Creates a toplevel window and allocates enough colors in it to use up all
+# the slots in an 8-bit colormap.
#
# Arguments:
# w - Name of toplevel window to create.
@@ -27,10 +29,10 @@ proc eatColors {w} {
pack $w.c
for {set y 0} {$y < 8} {incr y} {
for {set x 0} {$x < 40} {incr x} {
- set color [format #%02x%02x%02x [expr $x*6] [expr $y*30] 0]
- $w.c create rectangle [expr 10*$x] [expr 20*$y] \
- [expr 10*$x + 10] [expr 20*$y + 20] -outline {} \
- -fill $color
+ set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0]
+ $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \
+ [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \
+ -fill $color
}
}
update
@@ -38,8 +40,8 @@ proc eatColors {w} {
# colorsFree --
#
-# Returns 1 if there appear to be free colormap entries in a window,
-# 0 otherwise.
+# Returns 1 if there appear to be free colormap entries in a window, 0
+# otherwise.
#
# Arguments:
# w - Name of window in which to check.
@@ -47,14 +49,36 @@ proc eatColors {w} {
# to see if there are colormap entries free.
proc colorsFree {w {red 31} {green 245} {blue 192}} {
- set vals [winfo rgb $w [format #%02x%02x%02x $red $green $blue]]
- expr ([lindex $vals 0]/256 == $red) && ([lindex $vals 1]/256 == $green) \
- && ([lindex $vals 2]/256 == $blue)
+ lassign [winfo rgb $w [format "#%02x%02x%02x" $red $green $blue]] r g b
+ expr {($r/256 == $red) && ($g/256 == $green) && ($b/256 == $blue)}
}
+# uniq --
+#
+# Returns the unique items of a list in the order they first appear.
+#
+# Arguments:
+# list - The list to uniq-ify.
+proc uniq {list} {
+ set d {}
+ foreach item $list {
+ dict set d $item {}
+ }
+ return [dict keys $d]
+}
+# optnames --
+#
+# Returns the option names out of a list of option details.
+#
+# Arguments:
+# options - The option detail list.
+proc optnames {options} {
+ lsort [lmap desc $options {lindex $desc 0}]
+}
+
test frame-1.1 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -class NewFrame
.f configure -class
@@ -66,12 +90,11 @@ test frame-1.2 {frame configuration options} -setup {
} -body {
frame .f -class NewFrame
.f configure -class Different
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -class option after widget is created}
-
+} -result {can't modify -class option after widget is created}
test frame-1.3 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -colormap new
.f configure -colormap
@@ -83,12 +106,11 @@ test frame-1.4 {frame configuration options} -setup {
} -body {
frame .f -colormap new
.f configure -colormap .
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -colormap option after widget is created}
-
+} -result {can't modify -colormap option after widget is created}
test frame-1.5 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -visual default
.f configure -visual
@@ -100,19 +122,18 @@ test frame-1.6 {frame configuration options} -setup {
} -body {
frame .f -visual default
.f configure -visual best
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -visual option after widget is created}
-
+} -result {can't modify -visual option after widget is created}
test frame-1.7 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -screen bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {unknown option "-screen"}
test frame-1.8 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -container true
} -cleanup {
@@ -127,22 +148,22 @@ test frame-1.9 {frame configuration options} -setup {
deleteWindows
} -result {-container container Container 0 1}
test frame-1.10 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -container bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {expected boolean value but got "bogus"}
test frame-1.11 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f
.f configure -container 1
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -container option after widget is created}
+} -result {can't modify -container option after widget is created}
test frame-1.12 {frame configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Make sure all options can be set to the default value
frame .f
@@ -152,11 +173,11 @@ test frame-1.12 {frame configuration options} -setup {
lappend opts [lindex $opt 0] [lindex $opt 4]
}
}
- eval frame .g $opts
- destroy .f .g
+ frame .g {*}$opts
} -cleanup {
+ destroy .f .g
deleteWindows
-} -result {}
+} -result .g
destroy .f
frame .f
@@ -165,7 +186,7 @@ test frame-1.13 {frame configuration options} -body {
lindex [.f configure -background] 4
} -cleanup {
.f configure -background [lindex [.f configure -background] 3]
-} -result {#ff0000}
+} -result "#ff0000"
test frame-1.14 {frame configuration options} -body {
.f configure -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -183,7 +204,7 @@ test frame-1.17 {frame configuration options} -body {
lindex [.f configure -bg] 4
} -cleanup {
.f configure -bg [lindex [.f configure -bg] 3]
-} -result {#00ff00}
+} -result "#00ff00"
test frame-1.18 {frame configuration options} -body {
.f configure -bg non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -219,7 +240,7 @@ test frame-1.25 {frame configuration options} -body {
lindex [.f configure -highlightbackground] 4
} -cleanup {
.f configure -highlightbackground [lindex [.f configure -highlightbackground] 3]
-} -result {#112233}
+} -result "#112233"
test frame-1.26 {frame configuration options} -body {
.f configure -highlightbackground ugly
} -returnCodes error -result {unknown color name "ugly"}
@@ -228,7 +249,7 @@ test frame-1.27 {frame configuration options} -body {
lindex [.f configure -highlightcolor] 4
} -cleanup {
.f configure -highlightcolor [lindex [.f configure -highlightcolor] 3]
-} -result {#123456}
+} -result "#123456"
test frame-1.28 {frame configuration options} -body {
.f configure -highlightcolor non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -265,9 +286,9 @@ test frame-1.35 {frame configuration options} -body {
} -cleanup {
.f configure -relief [lindex [.f configure -relief] 3]
} -result {ridge}
-test frame-1.36 {frame configuration options} -body {
+test frame-1.36 {frame configuration options} -returnCodes error -body {
.f configure -relief badValue
-} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
+} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
test frame-1.37 {frame configuration options} -body {
.f configure -takefocus {any string}
lindex [.f configure -takefocus] 4
@@ -285,9 +306,8 @@ test frame-1.39 {frame configuration options} -body {
} -returnCodes error -result {bad screen distance "badValue"}
destroy .f
-
test frame-2.1 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100 -class NewClass
wm geometry .t +0+0
@@ -301,12 +321,11 @@ test frame-2.2 {toplevel configuration options} -setup {
toplevel .t -width 200 -height 100 -class NewClass
wm geometry .t +0+0
.t configure -class Another
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -class option after widget is created}
-
+} -result {can't modify -class option after widget is created}
test frame-2.3 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100 -colormap new
wm geometry .t +0+0
@@ -320,23 +339,21 @@ test frame-2.4 {toplevel configuration options} -setup {
toplevel .t -width 200 -height 100 -colormap new
wm geometry .t +0+0
.t configure -colormap .
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -colormap option after widget is created}
-
+} -result {can't modify -colormap option after widget is created}
test frame-2.5 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100
wm geometry .t +0+0
.t configure -container 1
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -container option after widget is created}
+} -result {can't modify -container option after widget is created}
test frame-2.6 {toplevel configuration options} -setup {
deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
catch {.t configure -container 1}
@@ -344,34 +361,25 @@ test frame-2.6 {toplevel configuration options} -setup {
} -cleanup {
deleteWindows
} -result {-container container Container 0 0}
-
test frame-2.7 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100 -colormap bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {bad window path name "bogus"}
-
-
-test frame-2.8 {toplevel configuration options} -constraints {
- win
-} -setup {
- deleteWindows
+test frame-2.8 {toplevel configuration options} -constraints win -setup {
+ deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
.t configure -use 0x44022
} -cleanup {
deleteWindows
} -returnCodes error -result {window "0x44022" doesn't exist}
-test frame-2.9 {toplevel configuration options} -constraints {
- win
-} -setup {
+test frame-2.9 {toplevel configuration options} -constraints win -setup {
deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
catch {.t configure -use 0x44022}
@@ -379,25 +387,18 @@ test frame-2.9 {toplevel configuration options} -constraints {
} -cleanup {
deleteWindows
} -result {-use use Use {} {}}
-
-test frame-2.10 {toplevel configuration options} -constraints {
- nonwin
-} -setup {
+test frame-2.10 {toplevel configuration options} -constraints nonwin -setup {
deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
.t configure -use 0x44022
} -cleanup {
deleteWindows
} -returnCodes error -result {can't modify -use option after widget is created}
-test frame-2.11 {toplevel configuration options} -constraints {
- nonwin
-} -setup {
- deleteWindows
+test frame-2.11 {toplevel configuration options} -constraints nonwin -setup {
+ deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100
wm geometry .t +0+0
catch {.t configure -use 0x44022}
@@ -405,11 +406,9 @@ test frame-2.11 {toplevel configuration options} -constraints {
} -cleanup {
deleteWindows
} -result {-use use Use {} {}}
-
test frame-2.12 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100 -visual default
wm geometry .t +0+0
.t configure -visual
@@ -419,58 +418,59 @@ test frame-2.12 {toplevel configuration options} -setup {
test frame-2.13 {toplevel configuration options} -setup {
deleteWindows
} -body {
- catch {destroy .t}
toplevel .t -width 200 -height 100 -visual default
wm geometry .t +0+0
.t configure -visual best
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -visual option after widget is created}
-
+} -result {can't modify -visual option after widget is created}
test frame-2.14 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100 -visual who_knows?
-} -cleanup {
+} -returnCodes error -cleanup {
+ deleteWindows
+} -result {unknown or ambiguous visual name "who_knows?": class must be best, directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, truecolor, or default}
+set expectedScreen ""
+if {[tcltest::testConstraint haveDISPLAY]} {
+ set expectedScreen [list -screen screen Screen {} $env(DISPLAY)]
+}
+test frame-2.15 {toplevel configuration options} -constraints {x11 haveDISPLAY} -setup {
deleteWindows
-} -returnCodes error -result {unknown or ambiguous visual name "who_knows?": class must be best, directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, truecolor, or default}
-test frame-2.15 {toplevel configuration options} -constraints haveDISPLAY -setup {
- deleteWindows
} -body {
toplevel .t -width 200 -height 100 -screen $env(DISPLAY)
wm geometry .t +0+0
- string compare [.t configure -screen] "-screen screen Screen {} $env(DISPLAY)"
+ .t configure -screen
} -cleanup {
deleteWindows
-} -result {0}
-test frame-2.16 {toplevel configuration options} -constraints haveDISPLAY -setup {
+} -result $expectedScreen
+test frame-2.16 {toplevel configuration options} -constraints {x11 haveDISPLAY} -setup {
deleteWindows
} -body {
toplevel .t -width 200 -height 100 -screen $env(DISPLAY)
wm geometry .t +0+0
.t configure -screen another
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -screen option after widget is created}
-
+} -result {can't modify -screen option after widget is created}
test frame-2.17 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 200 -height 100 -screen bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {couldn't connect to display "bogus"}
test frame-2.18 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -container 1 -width 300 -height 120
wm geometry .t +0+0
toplevel .x -container 1 -use [winfo id .t]
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {windows cannot have both the -use and the -container option set}
+} -result {windows cannot have both the -use and the -container option set}
test frame-2.19 {toplevel configuration options} -setup {
- deleteWindows
+ deleteWindows
set opts {}
} -body {
# Make sure all options can be set to the default value
@@ -480,12 +480,11 @@ test frame-2.19 {toplevel configuration options} -setup {
lappend opts [lindex $opt 0] [lindex $opt 4]
}
}
- eval toplevel .g $opts
- destroy .f .g
+ toplevel .g {*}$opts
} -cleanup {
+ destroy .f .g
deleteWindows
-} -result {}
-
+} -result .g
destroy .t
toplevel .t -width 300 -height 150
@@ -494,7 +493,7 @@ update
test frame-2.20 {toplevel configuration options} -body {
.t configure -background #ff0000
lindex [.t configure -background] 4
-} -result {#ff0000}
+} -result "#ff0000"
test frame-2.21 {toplevel configuration options} -body {
.t configure -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -508,7 +507,7 @@ test frame-2.23 {toplevel configuration options} -body {
test frame-2.24 {toplevel configuration options} -body {
.t configure -bg #00ff00
lindex [.t configure -bg] 4
-} -result {#00ff00}
+} -result "#00ff00"
test frame-2.25 {toplevel configuration options} -body {
.t configure -bg non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -536,7 +535,7 @@ test frame-2.31 {toplevel configuration options} -body {
test frame-2.32 {toplevel configuration options} -body {
.t configure -highlightcolor #123456
lindex [.t configure -highlightcolor] 4
-} -result {#123456}
+} -result "#123456"
test frame-2.33 {toplevel configuration options} -body {
.t configure -highlightcolor non-existent
} -returnCodes error -result {unknown color name "non-existent"}
@@ -565,9 +564,9 @@ test frame-2.40 {toplevel configuration options} -body {
.t configure -relief ridge
lindex [.t configure -relief] 4
} -result {ridge}
-test frame-2.41 {toplevel configuration options} -body {
+test frame-2.41 {toplevel configuration options} -returnCodes error -body {
.t configure -relief badValue
-} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
+} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
test frame-2.42 {toplevel configuration options} -body {
.t configure -width 32
lindex [.t configure -width] 4
@@ -577,12 +576,11 @@ test frame-2.43 {toplevel configuration options} -body {
} -returnCodes error -result {bad screen distance "badValue"}
destroy .t
-
-test frame-3.1 {TkCreateFrame procedure} -body {
+test frame-3.1 {TkCreateFrame procedure} -returnCodes error -body {
frame
-} -returnCodes error -result {wrong # args: should be "frame pathName ?-option value ...?"}
+} -result {wrong # args: should be "frame pathName ?-option value ...?"}
test frame-3.2 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
frame .f
} -body {
.f configure -class
@@ -590,7 +588,7 @@ test frame-3.2 {TkCreateFrame procedure} -setup {
deleteWindows
} -result {-class class Class Frame Frame}
test frame-3.3 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
toplevel .t
wm geometry .t +0+0
} -body {
@@ -599,7 +597,7 @@ test frame-3.3 {TkCreateFrame procedure} -setup {
deleteWindows
} -result {-class class Class Toplevel Toplevel}
test frame-3.4 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 350 -class NewClass -bg black -visual default -height 90
wm geometry .t +0+0
@@ -610,11 +608,10 @@ test frame-3.4 {TkCreateFrame procedure} -setup {
} -cleanup {
deleteWindows
} -result {350 black 90}
-
# Be sure that the -class, -colormap, and -visual options are processed
# before configuring the widget.
test frame-3.5 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
option add *NewFrame.background #123456
frame .f -class NewFrame
@@ -624,7 +621,7 @@ test frame-3.5 {TkCreateFrame procedure} -setup {
option clear
} -result {#123456}
test frame-3.7 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
option add *NewFrame.background #332211
option add *f.class NewFrame
@@ -635,7 +632,7 @@ test frame-3.7 {TkCreateFrame procedure} -setup {
option clear
} -result {NewFrame #332211}
test frame-3.8 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
option add *Silly.background #122334
option add *f.Class Silly
@@ -648,7 +645,7 @@ test frame-3.8 {TkCreateFrame procedure} -setup {
test frame-3.9 {TkCreateFrame procedure, -use option} -constraints {
unix
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -container 1 -width 300 -height 120
wm geometry .t +0+0
@@ -658,11 +655,11 @@ test frame-3.9 {TkCreateFrame procedure, -use option} -constraints {
[expr {[winfo rooty .x] - [winfo rooty .t]}] \
[winfo width .t] [winfo height .t]
} -cleanup {
-# This call to update idletasks was added to prevent a crash that was
-# observed on OSX 10.12 (Sierra) only. Any change, such as using the
-# Development version to make debugging symbols available, adding a print
-# statement, or calling update idletasks here, would make the test pass
-# with no segfault.
+ # This call to update idletasks was added to prevent a crash that was
+ # observed on OSX 10.12 (Sierra) only. Any change, such as using the
+ # Development version to make debugging symbols available, adding a print
+ # statement, or calling update idletasks here, would make the test pass
+ # with no segfault.
update idletasks
deleteWindows
} -result {0 0 140 300}
@@ -685,42 +682,40 @@ test frame-3.10 {TkCreateFrame procedure, -use option} -constraints {
destroy .t
option clear
} -result {0 0 140 300}
-
-# The tests below require specific display characteristics (i.e. that
-# they are run on a pseudocolor display of depth 8). Even so, they
-# are non-portable: some machines don't seem to ever run out of
-# colors.
+# The tests below require specific display characteristics (i.e. that they are
+# run on a pseudocolor display of depth 8). Even so, they are non-portable:
+# some machines don't seem to ever run out of colors.
if {[testConstraint defaultPseudocolor8]} {
eatColors .t1
}
test frame-3.11 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -width 300 -height 200 -bg #475601
wm geometry .t +0+0
update
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {0}
test frame-3.12 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -width 300 -height 200 -bg #475601 -colormap new
wm geometry .t +0+0
update
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
test frame-3.13 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
option add *t.class Toplevel2
option add *Toplevel2.colormap new
@@ -730,12 +725,12 @@ test frame-3.13 {TkCreateFrame procedure} -constraints {
option clear
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
test frame-3.14 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
option add *t.class Toplevel3
option add *Toplevel3.Colormap new
@@ -745,12 +740,12 @@ test frame-3.14 {TkCreateFrame procedure} -constraints {
option clear
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
test frame-3.15 {TkCreateFrame procedure, -use and -colormap} -constraints {
defaultPseudocolor8 unix nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -container 1 -width 300 -height 120
wm geometry .t +0+0
@@ -761,21 +756,21 @@ test frame-3.15 {TkCreateFrame procedure, -use and -colormap} -constraints {
destroy .t
} -result {0 1}
test frame-3.16 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -width 300 -height 200 -bg #475601 -visual default
wm geometry .t +0+0
update
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {0}
test frame-3.17 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 nonPortable
+ defaultPseudocolor8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -width 300 -height 200 -bg #475601 -visual default \
-colormap new
@@ -783,24 +778,24 @@ test frame-3.17 {TkCreateFrame procedure} -constraints {
update
colorsFree .t
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
test frame-3.18 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 haveGrayscale8 nonPortable
+ defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
test frame-3.19 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 haveGrayscale8 nonPortable
+ defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
option add *t.class T4
option add *T4.visual {grayscale 8}
@@ -810,14 +805,13 @@ test frame-3.19 {TkCreateFrame procedure} -constraints {
option clear
list [colorsFree .t 131 131 131] [lindex [.t configure -visual] 4]
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1 {grayscale 8}}
test frame-3.20 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 haveGrayscale8 nonPortable
+ defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
- set x ok
option add *t.class T5
option add *T5.Visual {grayscale 8}
toplevel .t -width 300 -height 200 -bg #434343
@@ -826,27 +820,25 @@ test frame-3.20 {TkCreateFrame procedure} -constraints {
option clear
list [colorsFree .t 131 131 131] [lindex [.t configure -visual] 4]
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1 {grayscale 8}}
test frame-3.21 {TkCreateFrame procedure} -constraints {
- defaultPseudocolor8 haveGrayscale8 nonPortable
+ defaultPseudocolor8 haveGrayscale8 nonPortable
} -setup {
- deleteWindows
+ destroy .t
} -body {
- set x ok
toplevel .t -visual {grayscale 8} -width 300 -height 200 -bg #434343
wm geometry .t +0+0
update
colorsFree .t 131 131 131
} -cleanup {
- deleteWindows
+ destroy .t
} -result {1}
if {[testConstraint defaultPseudocolor8]} {
destroy .t1
}
-
test frame-3.22 {TkCreateFrame procedure, default dimensions} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t
wm geometry .t +0+0
@@ -871,22 +863,20 @@ test frame-3.24 {TkCreateFrame procedure} -setup {
wm geometry .t +0+0
} -returnCodes error -result {unknown option "-bogus"}
-
test frame-4.1 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
catch {frame .f -gorp glob}
winfo exists .f
} -result 0
test frame-4.2 {TkCreateFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
list [frame .f -width 200 -height 100] [winfo exists .f]
} -cleanup {
deleteWindows
} -result {.f 1}
-
frame .f -highlightcolor black
test frame-5.1 {FrameWidgetCommand procedure} -body {
.f
@@ -914,10 +904,9 @@ test frame-5.7 {FrameWidgetCommand procedure, cget option} -setup {
} -cleanup {
destroy .t
} -returnCodes ok -match glob -result *
-
test frame-5.8 {FrameWidgetCommand procedure, configure option} -body {
- llength [.f configure]
-} -result {18}
+ optnames [.f configure]
+} -result {-background -backgroundimage -bd -bg -bgimg -borderwidth -class -colormap -container -cursor -height -highlightbackground -highlightcolor -highlightthickness -padx -pady -relief -takefocus -tile -visual -width}
test frame-5.9 {FrameWidgetCommand procedure, configure option} -body {
.f configure -gorp
} -returnCodes error -result {unknown option "-gorp"}
@@ -931,12 +920,12 @@ test frame-5.12 {FrameWidgetCommand procedure} -body {
.f swizzle
} -returnCodes error -result {bad option "swizzle": must be cget or configure}
test frame-5.13 {FrameWidgetCommand procedure, configure option} -body {
- llength [. configure]
-} -result {21}
+ optnames [. configure]
+} -result {-background -backgroundimage -bd -bg -bgimg -borderwidth -class -colormap -container -cursor -height -highlightbackground -highlightcolor -highlightthickness -menu -padx -pady -relief -screen -takefocus -tile -use -visual -width}
destroy .f
test frame-6.1 {ConfigureFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -width 150
list [winfo reqwidth .f] [winfo reqheight .f]
@@ -944,7 +933,7 @@ test frame-6.1 {ConfigureFrame procedure} -setup {
deleteWindows
} -result {150 1}
test frame-6.2 {ConfigureFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f -height 97
list [winfo reqwidth .f] [winfo reqheight .f]
@@ -952,7 +941,7 @@ test frame-6.2 {ConfigureFrame procedure} -setup {
deleteWindows
} -result {1 97}
test frame-6.3 {ConfigureFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f
set result {}
@@ -966,7 +955,7 @@ test frame-6.3 {ConfigureFrame procedure} -setup {
} -result {1 1 100 180 100 180}
test frame-7.1 {FrameEventProc procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .frame2
set result [info commands .frame2]
@@ -974,7 +963,7 @@ test frame-7.1 {FrameEventProc procedure} -setup {
lappend result [info commands .frame2]
} -result {.frame2 {}}
test frame-7.2 {FrameEventProc procedure} -setup {
- deleteWindows
+ deleteWindows
set x {}
} -body {
frame .f1 -bg #543210
@@ -988,7 +977,7 @@ test frame-7.2 {FrameEventProc procedure} -setup {
} -result {.f1 #543210 {} {}}
test frame-8.1 {FrameCmdDeletedProc procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
frame .f1
rename .f1 {}
@@ -997,7 +986,7 @@ test frame-8.1 {FrameCmdDeletedProc procedure} -setup {
deleteWindows
} -result {{} {}}
test frame-8.2 {FrameCmdDeletedProc procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .f1 -menu .m
wm geometry .f1 +0+0
@@ -1012,7 +1001,6 @@ test frame-8.2 {FrameCmdDeletedProc procedure} -setup {
# This one fails with the dash-patch!!!! Still don't know why :-(
#
#test frame-8.3 {FrameCmdDeletedProc procedure} -setup {
-# eval destroy [winfo children .]
# deleteWindows
#} -body {
# toplevel .f1 -menu .m
@@ -1023,12 +1011,11 @@ test frame-8.2 {FrameCmdDeletedProc procedure} -setup {
# update
# list [info command .f*] [winfo children .]
#} -cleanup {
-# eval destroy [winfo children .]
# deleteWindows
#} -result {{} .m}
test frame-9.1 {MapFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 100 -height 400
wm geometry .t +0+0
@@ -1039,7 +1026,7 @@ test frame-9.1 {MapFrame procedure} -setup {
deleteWindows
} -result {0 1}
test frame-9.2 {MapFrame procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t -width 100 -height 400
wm geometry .t +0+0
@@ -1048,7 +1035,7 @@ test frame-9.2 {MapFrame procedure} -setup {
winfo exists .t
} -result {0}
test frame-9.3 {MapFrame procedure, window deleted while mapping} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -width 200 -height 200
wm geometry .t2 +0+0
@@ -1064,22 +1051,17 @@ test frame-9.3 {MapFrame procedure, window deleted while mapping} -setup {
deleteWindows
} -result {0}
-
test frame-10.1 {frame widget vs hidden commands} -setup {
- deleteWindows
+ deleteWindows
} -body {
- set l [interp hidden]
frame .t
interp hide {} .t
destroy .t
- set res1 [list [winfo children .] [interp hidden]]
- set res2 [list {} $l]
- expr {$res1 eq $res2}
-} -result 1
-
+ list [winfo children .] [lsort [interp hidden]]
+} -result [list {} [lsort [interp hidden]]]
test frame-11.1 {TkInstallFrameMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m1.system
@@ -1090,9 +1072,9 @@ test frame-11.1 {TkInstallFrameMenu} -setup {
deleteWindows
} -result {.t}
test frame-11.2 {TkInstallFrameMenu - frame renamed} -setup {
- deleteWindows
-} -body {
+ deleteWindows
catch {rename foo {}}
+} -body {
menu .m1
.m1 add cascade -menu .m1.system
menu .m1.system -tearoff 0
@@ -1103,9 +1085,8 @@ test frame-11.2 {TkInstallFrameMenu - frame renamed} -setup {
deleteWindows
} -result {}
-
test frame-12.1 {FrameWorldChanged procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test -bd -padx and -pady
frame .f -borderwidth 2 -padx 3 -pady 4
@@ -1117,19 +1098,16 @@ test frame-12.1 {FrameWorldChanged procedure} -setup {
deleteWindows
} -result {5 6 30 28}
test frame-12.2 {FrameWorldChanged procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test all -labelanchor positions
set font {helvetica 12}
labelframe .f -highlightthickness 1 -bd 3 -padx 1 -pady 2 -font $font \
-text "Mupp"
- set fh [expr {[font metrics $font -linespace] + 2 - 3}]
- set fw [expr {[font measure $font "Mupp"] + 2 - 3}]
- if {$fw < 0} {set fw 0}
- if {$fh < 0} {set fh 0}
+ set fh [expr {max([font metrics $font -linespace] + 2 - 3, 0)}]
+ set fw [expr {max([font measure $font "Mupp"] + 2 - 3, 0)}]
place .f -x 0 -y 0 -width 100 -height 100
pack [frame .f.f] -fill both -expand 1
-
set result {}
foreach lp {nw n ne en e es se s sw ws w wn} {
.f configure -labelanchor $lp
@@ -1144,16 +1122,17 @@ test frame-12.2 {FrameWorldChanged procedure} -setup {
w* {incr expx $fw ; incr expw -$fw}
e* {incr expw -$fw}
}
- lappend result [expr {\
- [winfo x .f.f] == $expx && [winfo y .f.f] == $expy &&\
- [winfo width .f.f] == $expw && [winfo height .f.f] == $exph}]
+ lappend result [expr {
+ [winfo x .f.f] == $expx && [winfo y .f.f] == $expy &&
+ [winfo width .f.f] == $expw && [winfo height .f.f] == $exph
+ }]
}
return $result
} -cleanup {
deleteWindows
} -result {1 1 1 1 1 1 1 1 1 1 1 1}
test frame-12.3 {FrameWorldChanged procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Check reaction on font change
font create myfont -family courier -size 10
@@ -1173,9 +1152,8 @@ test frame-12.3 {FrameWorldChanged procedure} -setup {
font delete myfont
} -result {0}
-
test frame-13.1 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -class NewFrame
.f configure -class
@@ -1187,32 +1165,32 @@ test frame-13.2 {labelframe configuration options} -setup {
} -body {
labelframe .f -class NewFrame
.f configure -class Different
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -class option after widget is created}
+} -result {can't modify -class option after widget is created}
test frame-13.3 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -colormap new
} -cleanup {
deleteWindows
} -result {.f}
test frame-13.4 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -visual default
} -cleanup {
deleteWindows
} -result {.f}
test frame-13.5 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -screen bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {unknown option "-screen"}
test frame-13.6 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -container true
} -cleanup {
@@ -1227,21 +1205,20 @@ test frame-13.7 {labelframe configuration options} -setup {
deleteWindows
} -result {-container container Container 0 1}
test frame-13.8 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f -container bogus
} -cleanup {
deleteWindows
} -returnCodes error -result {expected boolean value but got "bogus"}
test frame-13.9 {labelframe configuration options} -setup {
- deleteWindows
+ deleteWindows
} -body {
labelframe .f
.f configure -container 1
-} -cleanup {
+} -returnCodes error -cleanup {
deleteWindows
-} -returnCodes error -result {can't modify -container option after widget is created}
-
+} -result {can't modify -container option after widget is created}
destroy .f
labelframe .f
test frame-13.10 {labelframe configuration options} -body {
@@ -1249,9 +1226,9 @@ test frame-13.10 {labelframe configuration options} -body {
lindex [.f configure -background] 4
} -cleanup {
.f configure -background [lindex [.f configure -background] 3]
-} -result {#ff0000}
+} -result "#ff0000"
test frame-13.11 {labelframe configuration options} -body {
- .f configure -background non-existent
+ .f configure -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test frame-13.12 {labelframe configuration options} -body {
.f configure -bd 4
@@ -1260,16 +1237,16 @@ test frame-13.12 {labelframe configuration options} -body {
.f configure -bd [lindex [.f configure -bd] 3]
} -result {4}
test frame-13.13 {labelframe configuration options} -body {
- .f configure -bd badValue
+ .f configure -bd badValue
} -returnCodes error -result {bad screen distance "badValue"}
test frame-13.14 {labelframe configuration options} -body {
.f configure -bg #00ff00
lindex [.f configure -bg] 4
} -cleanup {
.f configure -bg [lindex [.f configure -bg] 3]
-} -result {#00ff00}
+} -result "#00ff00"
test frame-13.15 {labelframe configuration options} -body {
- .f configure -bg non-existent
+ .f configure -bg non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test frame-13.16 {labelframe configuration options} -body {
.f configure -borderwidth 1.3
@@ -1278,7 +1255,7 @@ test frame-13.16 {labelframe configuration options} -body {
.f configure -borderwidth [lindex [.f configure -borderwidth] 3]
} -result {1}
test frame-13.17 {labelframe configuration options} -body {
- .f configure -borderwidth badValue
+ .f configure -borderwidth badValue
} -returnCodes error -result {bad screen distance "badValue"}
test frame-13.18 {labelframe configuration options} -body {
.f configure -cursor arrow
@@ -1287,16 +1264,16 @@ test frame-13.18 {labelframe configuration options} -body {
.f configure -cursor [lindex [.f configure -cursor] 3]
} -result {arrow}
test frame-13.19 {labelframe configuration options} -body {
- .f configure -cursor badValue
+ .f configure -cursor badValue
} -returnCodes error -result {bad cursor spec "badValue"}
test frame-13.20 {labelframe configuration options} -body {
.f configure -fg #0000ff
lindex [.f configure -fg] 4
} -cleanup {
.f configure -fg [lindex [.f configure -fg] 3]
-} -result {#0000ff}
+} -result "#0000ff"
test frame-13.21 {labelframe configuration options} -body {
- .f configure -fg non-existent
+ .f configure -fg non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test frame-13.22 {labelframe configuration options} -body {
.f configure -font {courier 8}
@@ -1309,9 +1286,9 @@ test frame-13.23 {labelframe configuration options} -body {
lindex [.f configure -foreground] 4
} -cleanup {
.f configure -foreground [lindex [.f configure -foreground] 3]
-} -result {#ff0000}
+} -result "#ff0000"
test frame-13.24 {labelframe configuration options} -body {
- .f configure -foreground non-existent
+ .f configure -foreground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test frame-13.25 {labelframe configuration options} -body {
.f configure -height 100
@@ -1320,25 +1297,25 @@ test frame-13.25 {labelframe configuration options} -body {
.f configure -height [lindex [.f configure -height] 3]
} -result {100}
test frame-13.26 {labelframe configuration options} -body {
- .f configure -height not_a_number
+ .f configure -height not_a_number
} -returnCodes error -result {bad screen distance "not_a_number"}
test frame-13.27 {labelframe configuration options} -body {
.f configure -highlightbackground #112233
lindex [.f configure -highlightbackground] 4
} -cleanup {
.f configure -highlightbackground [lindex [.f configure -highlightbackground] 3]
-} -result {#112233}
+} -result "#112233"
test frame-13.28 {labelframe configuration options} -body {
- .f configure -highlightbackground ugly
+ .f configure -highlightbackground ugly
} -returnCodes error -result {unknown color name "ugly"}
test frame-13.29 {labelframe configuration options} -body {
.f configure -highlightcolor #123456
lindex [.f configure -highlightcolor] 4
} -cleanup {
.f configure -highlightcolor [lindex [.f configure -highlightcolor] 3]
-} -result {#123456}
+} -result "#123456"
test frame-13.30 {labelframe configuration options} -body {
- .f configure -highlightcolor non-existent
+ .f configure -highlightcolor non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test frame-13.31 {labelframe configuration options} -body {
.f configure -highlightthickness 6
@@ -1347,7 +1324,7 @@ test frame-13.31 {labelframe configuration options} -body {
.f configure -highlightthickness [lindex [.f configure -highlightthickness] 3]
} -result {6}
test frame-13.32 {labelframe configuration options} -body {
- .f configure -highlightthickness badValue
+ .f configure -highlightthickness badValue
} -returnCodes error -result {bad screen distance "badValue"}
test frame-13.33 {labelframe configuration options} -body {
.f configure -labelanchor se
@@ -1355,9 +1332,9 @@ test frame-13.33 {labelframe configuration options} -body {
} -cleanup {
.f configure -labelanchor [lindex [.f configure -labelanchor] 3]
} -result {se}
-test frame-13.34 {labelframe configuration options} -body {
- .f configure -labelanchor badValue
-} -returnCodes error -result {bad labelanchor "badValue": must be e, en, es, n, ne, nw, s, se, sw, w, wn, or ws}
+test frame-13.34 {labelframe configuration options} -returnCodes error -body {
+ .f configure -labelanchor badValue
+} -result {bad labelanchor "badValue": must be e, en, es, n, ne, nw, s, se, sw, w, wn, or ws}
test frame-13.35 {labelframe configuration options} -body {
.f configure -padx 3
lindex [.f configure -padx] 4
@@ -1365,7 +1342,7 @@ test frame-13.35 {labelframe configuration options} -body {
.f configure -padx [lindex [.f configure -padx] 3]
} -result {3}
test frame-13.36 {labelframe configuration options} -body {
- .f configure -padx badValue
+ .f configure -padx badValue
} -returnCodes error -result {bad screen distance "badValue"}
test frame-13.37 {labelframe configuration options} -body {
.f configure -pady 4
@@ -1374,7 +1351,7 @@ test frame-13.37 {labelframe configuration options} -body {
.f configure -pady [lindex [.f configure -pady] 3]
} -result {4}
test frame-13.38 {labelframe configuration options} -body {
- .f configure -pady badValue
+ .f configure -pady badValue
} -returnCodes error -result {bad screen distance "badValue"}
test frame-13.39 {labelframe configuration options} -body {
.f configure -relief ridge
@@ -1382,9 +1359,9 @@ test frame-13.39 {labelframe configuration options} -body {
} -cleanup {
.f configure -relief [lindex [.f configure -relief] 3]
} -result {ridge}
-test frame-13.40 {labelframe configuration options} -body {
- .f configure -relief badValue
-} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
+test frame-13.40 {labelframe configuration options} -returnCodes error -body {
+ .f configure -relief badValue
+} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
test frame-13.41 {labelframe configuration options} -body {
.f configure -takefocus {any string}
lindex [.f configure -takefocus] 4
@@ -1404,13 +1381,12 @@ test frame-13.43 {labelframe configuration options} -body {
.f configure -width [lindex [.f configure -width] 3]
} -result {32}
test frame-13.44 {labelframe configuration options} -body {
- .f configure -width badValue
+ .f configure -width badValue
} -returnCodes error -result {bad screen distance "badValue"}
destroy .f
-
test frame-14.1 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test that label is moved in stacking order
label .l -text Mupp -font {helvetica 8}
@@ -1425,7 +1401,7 @@ test frame-14.1 {labelframe labelwidget option} -setup {
deleteWindows
} -result {{.f .l} 54 52}
test frame-14.2 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test the labelframe's reaction if the label is destroyed
label .l -text Aratherlonglabel
@@ -1444,7 +1420,7 @@ test frame-14.2 {labelframe labelwidget option} -setup {
deleteWindows
} -result {.l 12 {} 4}
test frame-14.3 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test the labelframe's reaction if the label is stolen
label .l -text Aratherlonglabel
@@ -1463,7 +1439,7 @@ test frame-14.3 {labelframe labelwidget option} -setup {
deleteWindows
} -result {.l 12 {} 4}
test frame-14.4 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test the label's reaction if the labelframe is destroyed
label .l -text Mupp
@@ -1477,7 +1453,7 @@ test frame-14.4 {labelframe labelwidget option} -setup {
deleteWindows
} -result {labelframe {}}
test frame-14.5 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Test that the labelframe reacts on changes in label
label .l -text Aratherlonglabel
@@ -1500,12 +1476,12 @@ test frame-14.5 {labelframe labelwidget option} -setup {
deleteWindows
} -result {12 12 1 12 1}
test frame-14.6 {labelframe labelwidget option} -setup {
- deleteWindows
+ deleteWindows
} -body {
- # Destroying a labelframe with a child label caused a crash
- # when not handling mapping of the label correctly.
- # This test does not test anything directly, it's just ment
- # to catch if the same mistake is made again.
+ # Destroying a labelframe with a child label caused a crash when not
+ # handling mapping of the label correctly.
+ # This test does not test anything directly, it's just ment to catch if
+ # the same mistake is made again.
labelframe .f
pack .f
label .f.l -text Mupp
@@ -1514,14 +1490,298 @@ test frame-14.6 {labelframe labelwidget option} -setup {
} -cleanup {
deleteWindows
} -result {}
-deleteWindows
-rename eatColors {}
-rename colorsFree {}
+test frame-15.1 {TIP 262: frame background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ frame .f -width 100 -height 100
+ pack .f
+ list [image inuse gorp] [.f configure -backgroundimage gorp;update] \
+ [image inuse gorp] [winfo width .f] [winfo height .f]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {0 {} 1 100 100}
+test frame-15.2 {TIP 262: frame background images} -setup {
+ deleteWindows
+ catch {rename gorp ""}
+} -body {
+ frame .f -width 100 -height 100
+ pack .f
+ update
+ .f configure -backgroundimage gorp
+} -returnCodes error -cleanup {
+ deleteWindows
+} -result {image "gorp" doesn't exist}
+test frame-15.3 {TIP 262: frame background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ frame .f -width 100 -height 100 -backgroundimage gorp
+ pack .f
+ .f configure -tile yes
+ update
+ list [.f cget -bgimg] [.f cget -tile]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {gorp 1}
+test frame-15.4 {TIP 262: frame background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ frame .f -width 100 -height 100 -backgroundimage gorp
+ pack .f
+ .f configure -tile yes
+ update
+ gorp put red -to 15 15 20 20
+ update
+ list [.f cget -bgimg] [.f cget -tile]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {gorp 1}
+test frame-15.5 {TIP 262: frame background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+ set result {}
+} -body {
+ frame .f -width 100 -height 100 -backgroundimage gorp
+ pack .f
+ .f configure -tile yes
+ update
+ image delete gorp
+ update
+ set result [list [.f cget -bgimg] [.f cget -tile]]
+ image create photo gorp -width 250 -height 250
+ update
+ lappend result [.f cget -backgroundimage]
+} -cleanup {
+ catch {image delete gorp}
+ deleteWindows
+} -result {gorp 1 gorp}
+test frame-15.6 {TIP 262: frame background images} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 100 -height 100 -bgimg gorp]
+ update idletasks; update
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15}}
+test frame-15.6a {TIP 262: frame background images (offsets)} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 10 -height 10 -bgimg gorp]
+ update idletasks; update
+ # On MacOS must wait for the test image display procedure to run.
+ set timer [after 300 {lappend result "timedout"}]
+ while {"timedout" ni $result &&
+ "gorp display 10 2 10 10" ni $result} {
+ vwait result
+ }
+ after cancel $timer
+ update idletasks; update
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 10 2 10 10}}
+test frame-15.7 {TIP 262: frame background images} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1]
+ update idletasks; update
+ # On MacOS must wait for the test image display procedure to run.
+ set timer [after 300 {lappend result "timedout"}]
+ while {"timedout" ni $result &&
+ "gorp display 0 0 20 10" ni $result} {
+ vwait result
+ }
+ after cancel $timer
+ if {[lindex $result end] eq "timedout"} {
+ return [lreplace $result end end]
+ }
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15} {gorp display 0 0 30 10} {gorp display 0 0 20 15} {gorp display 0 0 20 10}}
+test frame-15.7a {TIP 262: frame background images (offsets)} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -highlightthick 1]
+ update idletasks; update
+ # On MacOS must wait for the test image display procedure to run.
+ set timer [after 300 {lappend result "timedout"}]
+ while {"timedout" ni $result &&
+ "gorp display 0 0 18 8" ni $result} {
+ vwait result
+ }
+ after cancel $timer
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15} {gorp display 0 0 30 8} {gorp display 0 0 18 15} {gorp display 0 0 18 8}}
+test frame-15.7b {TIP 262: frame background images (offsets)} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -bd 2]
+ update idletasks; update
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15} {gorp display 0 0 30 6} {gorp display 0 0 16 15} {gorp display 0 0 16 6}}
+test frame-15.7c {TIP 262: frame background images (offsets)} -setup {
+ deleteWindows
+ set result {}
+ . configure -width 200 -height 200
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ pack [frame .f -width 50 -height 25 -bgimg gorp -tile 1 -bd 2 -highlightthick 1]
+ update idletasks; update
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15} {gorp display 0 0 30 4} {gorp display 0 0 14 15} {gorp display 0 0 14 4}}
+test frame-15.8 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ toplevel .t -width 100 -height 100
+ update
+ # Used to verify that setting a background image doesn't change the widget size
+ set w [winfo width .t]
+ set h [winfo height .t]
+ list [image inuse gorp] [.t configure -backgroundimage gorp;update] \
+ [image inuse gorp] \
+ [expr {$w-[winfo width .t]}] [expr {$h-[winfo height .t]}]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {0 {} 1 0 0}
+test frame-15.9 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ catch {rename gorp ""}
+} -body {
+ toplevel .t -width 100 -height 100
+ update
+ .t configure -backgroundimage gorp
+} -returnCodes error -cleanup {
+ deleteWindows
+} -result {image "gorp" doesn't exist}
+test frame-15.10 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes
+ update
+ list [.t cget -bgimg] [.t cget -tile]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {gorp 1}
+test frame-15.11 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+} -body {
+ toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes
+ update
+ gorp put red -to 15 15 20 20
+ update
+ list [.t cget -bgimg] [.t cget -tile]
+} -cleanup {
+ image delete gorp
+ deleteWindows
+} -result {gorp 1}
+test frame-15.12 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ image create photo gorp -width 10 -height 10
+ gorp put black -to 2 2 7 7
+ set result {}
+} -body {
+ toplevel .t -width 100 -height 100 -backgroundimage gorp -tile yes
+ update
+ image delete gorp
+ update
+ set result [list [.t cget -bgimg] [.t cget -tile]]
+ image create photo gorp -width 250 -height 250
+ update
+ lappend result [.t cget -backgroundimage]
+} -cleanup {
+ catch {image delete gorp}
+ deleteWindows
+} -result {gorp 1 gorp}
+test frame-15.13 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ set result {}
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ toplevel .t -width 100 -height 100 -bgimg gorp
+ wm overrideredirect .t 1; # Reduce trouble from window managers
+ update idletasks; update
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15}}
+test frame-15.14 {TIP 262: toplevel background images} -setup {
+ deleteWindows
+ set result {}
+} -constraints testImageType -body {
+ image create test gorp -variable result
+ toplevel .t -width 50 -height 25 -bgimg gorp -tile 1
+ wm overrideredirect .t 1; # Reduce trouble from window managers
+ update idletasks; update
+ # On MacOS must wait for the test image display procedure to run.
+ set timer [after 300 {lappend result "timedout"}]
+ while {"timedout" ni $result &&
+ "gorp display 0 0 20 10" ni $result} {
+ vwait result
+ }
+ after cancel $timer
+ return [uniq $result]
+} -cleanup {
+ deleteWindows
+ catch {image delete gorp}
+} -result {{gorp get} {gorp display 0 0 30 15} {gorp display 0 0 30 10} {gorp display 0 0 20 15} {gorp display 0 0 20 10}}
+
# cleanup
+deleteWindows
+apply {cmds {foreach cmd $cmds {rename $cmd {}}}} {
+ eatColors colorsFree uniq optnames
+}
+
cleanupTests
return
-
-
-
+# Local Variables:
+# mode: tcl
+# End:
diff --git a/tests/geometry.test b/tests/geometry.test
index 13cc515..c10a119 100644
--- a/tests/geometry.test
+++ b/tests/geometry.test
@@ -270,7 +270,7 @@ test geometry-4.10 {Tk_MaintainGeometry and Tk_UnmaintainGeometry} -setup {
wm geometry .t +0+0
tkwait visibility .t
update
- pack [frame .t.f]
+ pack [frame .t.f]
button .t.quit -text Quit -command exit
pack .t.quit -in .t.f
wm iconify .t
diff --git a/tests/grid.test b/tests/grid.test
index 62474ff..53f8be5 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -1825,7 +1825,6 @@ test grid-17.1 {forget and pending idle handlers} -body {
set result ok
} -result ok
-
test grid-18.1 {test respect for internalborder} -body {
toplevel .pack
wm geometry .pack 200x200
@@ -2042,6 +2041,121 @@ test grid-23 {grid configure -in leaked from previous master - bug
winfo ismapped .t ; # must return 1
} {1}
grid_reset 23
+
+test grid-24.1 {<<NoManagedChild>> fires on last grid forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ grid forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.1
+} -result {1}
+test grid-24.2 {<<NoManagedChild>> fires on last grid remove} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ grid remove .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.2
+} -result {1}
+test grid-24.3 {<<NoManagedChild>> fires on last gridded child destruction} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ update
+ bind . <<NoManagedChild>> {incr A}
+ destroy .1
+ update
+ set A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.3
+} -result {1}
+test grid-24.4 {<Configure> does not fire on last grid forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ update
+ bind . <Configure> {set A 1}
+ grid forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ grid_reset 24.4
+} -result {0}
+test grid-24.5 {<Configure> fires on forelast grid forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ grid [frame .2]
+ update
+ bind . <Configure> {set A 1}
+ grid forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ grid_reset 24.5
+} -result {1}
+test grid-24.6 {<<NoManagedChild>> does not fire on forelast grid forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ grid [frame .2]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ grid forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.6
+} -result {0}
+test grid-24.7 {<<NoManagedChild>> does not fire on grid anchor} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ bind . <<NoManagedChild>> {set A 1}
+ grid anchor . w
+ update
+ info exists A
+} -cleanup {
+ grid anchor . nw
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.7
+} -result {0}
+test grid-24.8 {<<NoManagedChild>> does not fire on last grid forget if propagation is off} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ grid [frame .1]
+ grid propagate . 0
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ grid forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ grid_reset 24.8
+} -result {0}
# cleanup
cleanupTests
diff --git a/tests/imgListFormat.test b/tests/imgListFormat.test
new file mode 100644
index 0000000..331b572
--- /dev/null
+++ b/tests/imgListFormat.test
@@ -0,0 +1,661 @@
+# This file is a Tcl script to test out the default image data format
+# ("list format") implementend in the file tkImgListFormat.c.
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2017 Simon Bachmann
+# All rights reserved.
+#
+# Author: Simon Bachmann (simonbachmann@bluewin.ch)
+
+package require tcltest 2.2
+namespace import ::tcltest::*
+tcltest::configure {*}$argv
+tcltest::loadTestedCommands
+
+imageInit
+
+# find the teapot.ppm file for use in these tests
+set teapotPhotoFile [file join [file dirname [info script]] teapot.ppm]
+testConstraint hasTeapotPhoto [file exists $teapotPhotoFile]
+# let's see if we have the semi-transparent one as well
+set transpTeapotPhotoFile [file join [file dirname [info script]] teapotTransparent.png]
+testConstraint hasTranspTeapotPhoto [file exists $transpTeapotPhotoFile]
+
+# ---------------------------------------------------------------------
+
+
+test imgListFormat-1.1 {ParseFormatOptions: default values} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{red green} {blue black}}
+ lindex [photo1 data] 1 1
+} -cleanup {
+ imageCleanup
+} -result {#000000}
+test imgListFormat-1.2 {ParseFormatOptions: format name as first arg} -setup {
+ image create photo photo1
+} -body {
+ photo1 put #1256ef -format {default} -to 0 0 10 10
+} -cleanup {
+ imageCleanup
+} -result {}
+test imgListFormat-1.3 {ParseFormatOptions: unknown option} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -bogus}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {bad format option "-bogus": must be -colorformat}
+test imgListFormat-1.4 {ParseFormatOptions: option not allowed} -setup {
+ image create photo photo1
+} -body {
+ photo1 put yellow -format {default -colorformat rgb}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {bad format option "-colorformat": no options allowed}
+test imgListFormat-1.5 {ParseFormatOptions: no -colorformat value} -setup {
+ image create photo photo1 -data black
+} -body {
+ photo1 data -format {default -colorformat}
+} -returnCodes error -result {the "-colorformat" option requires a value}
+test imgListFormat-1.6 {ParseFormatOptions: bad -colorformat val #1} -setup {
+ image create photo photo1
+} -body {
+ photo1 put yellow
+ photo1 data -format {default -colorformat bogus}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {bad color format "bogus": must be rgb, rgba, or list}
+test imgListFormat-1.7 {ParseFormatOptions: bad -colorformat val #2} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat tkcolor}
+} -returnCodes error -result \
+ {bad color format "tkcolor": must be rgb, rgba, or list}
+test imgListFormat-1.8 {ParseFormatOptions: bad -colorformat #3} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat emptystring}
+} -returnCodes error -result \
+ {bad color format "emptystring": must be rgb, rgba, or list}
+test imgListFormat-1.9 {ParseFormatOptions: bad -colorformat #4} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat rgb-short}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {bad color format "rgb-short": must be rgb, rgba, or list}
+test imgListFormat-1.10 {ParseFormatOptions: bad -colorformat #5} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat rgba-short}
+} -returnCodes error -result \
+ {bad color format "rgba-short": must be rgb, rgba, or list}
+test imgListFormat-1.11 {valid colorformats} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white#78
+ set result {}
+ lappend result [photo1 data -format {default -colorformat rgb}]
+ lappend result [photo1 data -format {default -colorformat rgba}]
+ lappend result [photo1 data -format {default -colorformat list}]
+ set result
+} -cleanup {
+ imageCleanup
+ unset result
+} -result {{{#ffffff}} {{#ffffff78}} {{{255 255 255 120}}}}
+
+# GetBadOptMsg: only use case already tested with imgListFormat-1.4
+
+test imgListFormat-3.1 {StringMatchDef: data is not a list} -body {
+ testphotostringmatch {not a " proper list}
+ # " (this comment is here only for editor highlighting)
+} -returnCodes error -result {unmatched open quote in list}
+# empty data case tested with imgPhoto-4.95 (imgPhoto.test)
+test imgListFormat-3.2 {StringMatchDef: \
+ list element not a proper list} -body {
+ testphotostringmatch {{red white} {not "} {blue green}}
+ # "
+} -returnCodes error -result {unmatched open quote in list}
+test imgListFormat-3.3 {StringMatchDef: \
+ sublists with differen lengths} -body {
+ testphotostringmatch {{#001122 #334455 #667788}
+ {#99AABB #CCDDEE}
+ {#FF0011 #223344 #556677}}
+} -returnCodes error -result \
+ {invalid row # 1: all rows must have the same number of elements}
+test imgListFormat-3.4 {StringMatchDef: base64 data is not parsed as valid \
+} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {
+ iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCA
+ YAAAEFsT2yAAAABGdBTUEAAYagMeiWXwAA
+ ABdJREFUCJkFwQEBAAAAgiD6P9pACRoqDk
+ fUBvt1wUFKAAAAAElFTkSuQmCC
+ } -format default
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCA"}
+test imgListFormat-3.5 {StringMatchDef: valid data} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{blue green}
+ {yellow magenta}
+ {#000000 #FFFFFFFF}}
+ list [image width photo1] [image height photo1] \
+ [photo1 get 0 2 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {2 3 {0 0 0 255}}
+
+# ImgStringRead: most of the error cases cannot be tested with current code,
+# as the errors are detected by StringMatchDef
+test imgListFormat-4.1 {StringReadDef: use with -format opt} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -format "default"
+ photo1 get 0 0
+} -cleanup {
+ imageCleanup
+} -result {255 255 255}
+test imgListFormat-4.2 {StringReadDef: suboptions to format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -format {default -bogus}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {bad format option "-bogus": no options allowed}
+test imgListFormat-4.3 {StringReadDef: erroneous non-option argument} -setup {
+ image create photo photo1
+} -body {
+ photo1 put orange -format {default bogus}
+} -returnCodes error -result {bad format option "bogus": no options allowed}
+test imgListFormat-4.4 {StringReadDef: normal use case} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ set imgData [photo1 data]
+ photo2 put $imgData
+ string equal [photo1 data] [photo2 data]
+} -cleanup {
+ imageCleanup
+ unset imgData
+} -result {1}
+test imgListFormat-4.5 {StringReadDef: correct compositing rule} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+ image create photo photo2
+} -body {
+ photo2 put #FF0000 -to 0 0 50 50
+ photo2 put [photo1 data -format {default -colorformat rgba}] -to 10 10 40 40
+ list [photo2 get 0 0 -withalpha] [photo2 get 20 25 -withalpha] \
+ [photo2 get 49 49 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {{255 0 0 255} {0 78 185 225} {255 0 0 255}}
+
+test imgListFormat-5.1 {StringWriteDef: format options not a list} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default " bogus}
+ # "
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {unmatched open quote in list}
+test imgListFormat-5.2 {StringWriteDef: invalid format option} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -bogus}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {bad format option "-bogus": must be -colorformat}
+test imgListFormat-5.3 {StringWriteDef: non-option arg in format} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat list bogus}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {bad format option "bogus": must be -colorformat}
+test imgListFormat-5.4 {StringWriteDef: empty image} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format {default -colorformat rgba}
+} -cleanup {
+ imageCleanup
+} -result {}
+test imgListFormat-5.5 {StirngWriteDef: size of data} -setup {
+ image create photo photo1
+} -body {
+ photo1 put blue -to 0 0 35 64
+ set imgData [photo1 data]
+ list [llength [lindex $imgData 0]] [llength $imgData]
+} -cleanup {
+ unset imgData
+ imageCleanup
+} -result {35 64}
+test imgListFormat-5.6 {StringWriteDef: test some pixels #1} -constraints {
+ hasTeapotPhoto
+} -setup {
+ set result {}
+ image create photo photo1 -file $teapotPhotoFile
+} -body {
+ set imgData [photo1 data]
+ # note: with [lindex], the coords are inverted (y x)
+ lappend result [lindex $imgData 0 0]
+ lappend result [lindex $imgData 3 2]
+ lappend result [lindex $imgData 107 53]
+ lappend result [lindex $imgData 203 157]
+ lappend result [lindex $imgData 255 255]
+ set result
+} -cleanup {
+ unset result
+ unset imgData
+ imageCleanup
+} -result {{#135cc0} #135cc0 #a06d52 #e1c8ba #135cc0}
+test imgListFormat-5.7 {StringWriteDef: test some pixels #2} -constraints {
+ hasTeapotPhoto
+} -setup {
+ set result {}
+ image create photo photo1 -file $teapotPhotoFile
+} -body {
+ set imgData [photo1 data -format {default -colorformat rgba}]
+ # note: with [lindex], the coords are inverted (y x)
+ lappend result [lindex $imgData 0 0]
+ lappend result [lindex $imgData 3 2]
+ lappend result [lindex $imgData 107 53]
+ lappend result [lindex $imgData 203 157]
+ lappend result [lindex $imgData 255 255]
+ set result
+} -cleanup {
+ unset result
+ unset imgData
+ imageCleanup
+} -result {{#135cc0ff} #135cc0ff #a06d52ff #e1c8baff #135cc0ff}
+test imgListFormat-5.8 {StringWriteDef: test some pixels #3} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+} -body {
+ set imgData [photo1 data -format {default -colorformat rgb}]
+ set result {}
+ lappend result [lindex $imgData 3 2]
+ lappend result [lindex $imgData 107 53]
+ lappend result [lindex $imgData 203 157]
+ set result
+} -cleanup {
+ unset result
+ unset imgData
+ imageCleanup
+} -result {{#004eb9} #a14100 #ffca9f}
+test imgListFormat-5.9 {StringWriteDef: test some pixels #4} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+} -body {
+ set imgData [photo1 data -format {default -colorformat rgba}]
+ set result [lindex $imgData 3 2]
+ lappend result [lindex $imgData 107 53]
+ lappend result [lindex $imgData 203 157]
+ set result
+} -cleanup {
+ unset result
+ unset imgData
+ imageCleanup
+} -result {{#004eb9e1} #a14100aa #ffca9faf}
+test imgListFormat-5.10 {StringWriteDef: test some pixels #5} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+} -body {
+ set imgData [photo1 data -format {default -colorformat list}]
+ set result {}
+ lappend result [lindex $imgData 3 2]
+ lappend result [lindex $imgData 107 53]
+ lappend result [lindex $imgData 203 157]
+ set result
+} -cleanup {
+ unset imgData
+ unset result
+ imageCleanup
+} -result {{0 78 185 225} {161 65 0 170} {255 202 159 175}}
+
+test imgListFormat-6.1 {ParseColor: empty string} -setup {
+ image create photo photo1
+ set result {}
+} -body {
+ photo1 put {{"" ""} {"" ""}}
+ lappend result [image width photo1]
+ lappend result [image height photo1]
+ lappend result [photo1 get 1 1 -withalpha]
+ set result
+} -cleanup {
+ unset result
+ imageCleanup
+} -result {2 2 {0 0 0 0}}
+test imgListFormat-6.2 {ParseColor: empty string, mixed} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{black white} {{} white}}
+ list [photo1 get 0 0 -withalpha] [photo1 get 0 1 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {{0 0 0 255} {0 0 0 0}}
+test imgListFormat-6.3 {ParseColor: color name too long} -setup {
+ image create photo photo1
+ set longstr {}
+ for {set i 1} {$i <= 100} {incr i} {
+ append longstr "z"
+ }
+} -body {
+ photo1 put [list [list blue] [list $longstr]]
+} -cleanup {
+ imageCleanup
+ unset longstr
+} -returnCodes error -result {invalid color}
+test imgListFormat-6.4 {ParseColor: #XXX color, different forms} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#A123 #334455} {#012 #fffefd#00}}
+ photo1 data -format {default -colorformat rgba}
+} -cleanup {
+ imageCleanup
+} -result {{#aa112233 #334455ff} {#001122ff #fffefd00}}
+test imgListFormat-6.5 {ParseColor: list format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put [list [list [list 255 255 255]]]
+ photo1 get 0 0 -withalpha
+} -cleanup {
+ imageCleanup
+} -result {255 255 255 255}
+test imgListFormat-6.6 {ParseColor: string format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put [list [list [list white]]]
+ photo1 get 0 0 -withalpha
+} -cleanup {
+ imageCleanup
+} -result {255 255 255 255}
+test imgListFormat-6.7 {ParseColor: invalid color} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{blue red} {green bogus}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "bogus"}
+test imgListFormat-6.8 {ParseColor: overall test} -setup {
+ image create photo photo1
+ set result {}
+} -body {
+ photo1 put {
+ {snow@0.5 snow#80 snow#8 #fffffafafafa@0.5 #fffffabbfacc#8}
+ {#fffffafffaff#80 #ffffaafaa@.5 #ffffaafaa#8 #ffffaafaa#80 #fee#8}
+ {#fee#80 #fee@0.5 #fffafa@0.5 #fffafa#8 #fffafa#80}
+ {{0xff 250 0xfa 128} {255 250 250} #fee8 #fffafa80 snow}}
+ for {set y 0} {$y < 4} {incr y} {
+ for {set x 0} {$x < 5} {incr x} {
+ lappend result [photo1 get $x $y -withalpha]
+ }
+ }
+ set result
+} -cleanup {
+ imageCleanup
+ unset result
+} -result \
+{{255 250 250 128} {255 250 250 128} {255 250 250 136} {255 250 250 128}\
+{255 250 250 136} {255 250 250 128} {255 250 250 128} {255 250 250 136}\
+{255 250 250 128} {255 238 238 136} {255 238 238 128} {255 238 238 128}\
+{255 250 250 128} {255 250 250 136} {255 250 250 128} {255 250 250 128}\
+{255 250 250 255} {255 238 238 136} {255 250 250 128} {255 250 250 255}}
+
+# Note: these tests were written for an earlier implementation of
+# ParseColorAsList. For this reason, their order and layout do not follow the
+# current code very well. Test coverage is pretty good, nevertheless.
+test imgListFormat-7.1 {ParseColorAsList: invalid list} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{123 45 67 89} {123 45 " 67}}}
+ #"
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "123 45 " 67"}
+#"
+test imgListFormat-7.2 {ParseColorAsList: too few elements in list} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{0 255 0 255} {0 255}}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "0 255"}
+test imgListFormat-7.3 {ParseColorAsList: too many elements in list} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{0 100 200 255} {0 100 200 255 0}}}
+} -returnCodes error -result {invalid color name "0 100 200 255 0"}
+test imgListFormat-7.4 {ParseColorAsList: not an integer value} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{9 0xf3 87 65} {43 21 10 1.0}}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "43 21 10 1.0"}
+test imgListFormat-7.5 {ParseColorAsList: negative value in list} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{121 121 121} {121 121 -1}}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "121 121 -1"}
+test imgListFormat-7.6 {ParseColorAsList: value in list too large} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{0 1 2 3} {254 255 256}}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "254 255 256"}
+test imgListFormat-7.7 {ParseColorAsList: suffix not allowed} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{100 100 100} {100 100 100#FE}}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "100 100 100#FE"}
+test imgListFormat-7.8 {ParseColorAsList: valid list form} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{{0x0 0x10 0xfe 0xff} {0 100 254}}
+ {{30 30 30 0} {1 1 254 1}}}
+ list [photo1 get 0 0 -withalpha] [photo1 get 1 0 -withalpha] \
+ [photo1 get 0 1 -withalpha] [photo1 get 1 1 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {{0 16 254 255} {0 100 254 255} {30 30 30 0} {1 1 254 1}}
+test imgListFormat-7.9 {ParseColorAsList: additional spaces in list} -setup {
+ image create photo photo1
+} -body {
+ photo1 put { { { 1 2 3} {1 2 3} } { {1 2 3 } { 1 2 3 4 } } }
+ photo1 data -format {default -colorformat rgba}
+} -cleanup {
+ imageCleanup
+} -result {{#010203ff #010203ff} {#010203ff #01020304}}
+test imgListFormat-7.10 {ParseColorAsList: list format, string rep} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{"111 222 33 44"}}
+ photo1 get 0 0 -withalpha
+} -cleanup {
+ imageCleanup
+} -result {111 222 33 44}
+
+test imgListFormat-8.1 {ParseColorAsHex: RGB format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#010 #001100}}
+ photo1 data
+} -cleanup {
+ imageCleanup
+} -result {{#001100 #001100}}
+test imgListFormat-8.2 {ParseColorAsHex: invalid hex digit} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#ABCD #ABCZ}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "#ABCZ"}
+test imgListFormat-8.3 {ParseColorAsHex: RGB with suffix, 8 chars} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#FFfFFf #AbCdef#0}}
+ photo1 data
+} -cleanup {
+ imageCleanup
+} -result {{#ffffff #abcdef}}
+test imgListFormat-8.4 {ParseColor: valid #RGBA color} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#9bd5020d #7acF}}
+ list [photo1 get 0 0 -withalpha] [photo1 get 1 0 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {{155 213 2 13} {119 170 204 255}}
+
+test imgListFormat-9.1 {ParseColorAsStandard:
+ Tk color, valid suffixes} -setup {
+ image create photo photo1
+ set result {}
+} -body {
+ photo1 put {{blue@0.711 #114433#C} {#8D4#1A magenta}}
+ lappend result [photo1 get 0 0 -withalpha]
+ lappend result [photo1 get 1 0 -withalpha]
+ lappend result [photo1 get 0 1 -withalpha]
+ lappend result [photo1 get 1 1 -withalpha]
+ set result
+} -cleanup {
+ unset result
+ imageCleanup
+} -result {{0 0 255 181} {17 68 51 204} {136 221 68 26} {255 0 255 255}}
+test imgListFormat-9.2 {ParseColorAsStandard:
+ Tk color with and w/o suffixes} -setup {
+ image create photo photo1
+ set result {}
+} -body {
+ photo1 put {{#52D8a0 #2B5} {#E47@0.01 maroon#4}}
+ lappend result [photo1 get 0 0 -withalpha]
+ lappend result [photo1 get 1 0 -withalpha]
+ lappend result [photo1 get 0 1 -withalpha]
+ lappend result [photo1 get 1 1 -withalpha]
+ set result
+} -cleanup {
+ unset result
+ imageCleanup
+} -result {{82 216 160 255} {34 187 85 255} {238 68 119 3} {128 0 0 68}}
+test imgListFormat-9.3 {ParseColorAsStandard: wrong digit count} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#000 #00}}
+} -returnCodes error -result {invalid color name "#00"}
+test imgListFormat-9.4 {ParseColorAsStandard: @A suffix, not a float} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{blue@0.5 blue@bogus}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {invalid alpha suffix "@bogus": expected floating-point value}
+test imgListFormat-9.5 {ParseColorAsStandard: @A, value too low} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {green@.1 green@-0.1}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {invalid alpha suffix "@-0.1": value must be in the range from 0 to 1}
+test imgListFormat-9.6 {ParseColorAsStandard: @A, value too high} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#000000@0 #000000@1.0001}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {invalid alpha suffix "@1.0001": value must be in the range from 0 to 1}
+test imgListFormat-9.7 {ParseColorAsStandard: @A suffix, edge values} -setup {
+ imageCleanup
+ image create photo photo1
+} -body {
+ photo1 put {{yellow@1e-22 yellow@0.12352941 yellow@0.12352942 \
+ yellow@0.9999999}}
+ list [photo1 get 0 0 -withalpha] [photo1 get 1 0 -withalpha] \
+ [photo1 get 2 0 -withalpha] [photo1 get 3 0 -withalpha]
+} -cleanup {
+ imageCleanup
+} -result {{255 255 0 0} {255 255 0 31} {255 255 0 32} {255 255 0 255}}
+test imgListFormat-9.8 {ParseColorAsStandard: # suffix, no hex digits} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{black#f} {black#}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid alpha suffix "#"}
+test imgListFormat-9.9 {ParseColorAsStandard:
+ '#' suffix, too many digits} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#ABC#12 #ABC#123}}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid alpha suffix "#123"}
+test imgListFormat-9.10 {ParseColorAsStandard:
+ invalid digit in #X suffix} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#000#a #000#g}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid alpha suffix "#g": expected hex digit}
+test imgListFormat-9.11 {ParseColorAsStandard:
+ invalid digit in #XX suffix} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {green#2 green#2W}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid alpha suffix "#2W": expected hex digit}
+test imgListFormat-9.12 {ParseColorAsStandard:
+ invalid color: not a hex digit} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#ABCDEF@.99 #ABCDEG@.99}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "#ABCDEG@.99"}
+test imgListFormat-9.13 {ParseColorAsStandard: suffix not allowed #1} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#ABC@.5 #ABCD@0.5}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "#ABCD@0.5"}
+test imgListFormat-9.14 {ParseColorAsStandard: suffix not allowed #2} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {#1111 #1111#1}
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "#1111#1"}
+
+
+# ---------------------------------------------------------------------
+
+imageFinish
+
+# cleanup
+cleanupTests
+return
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index c45c5fb..b5a91fe 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -10,14 +10,82 @@
#
# Author: Paul Mackerras (paulus@cs.anu.edu.au)
+#
+# This file is somewhat caothic: the order of the tests does not
+# really follow the order of the corresponding functions in
+# tkImgPhoto.c. Probably, because early versions had only a few tests
+# and over time test cases were added in bits and pieces.
+# To be noted, also, that this file is not complete: large portions of
+# code in tkImgPhoto.c have no test coverage.
+#
+# To help keeping the overview, the table below lists where to find
+# tests for each of the functions in tkImgPhoto.c. The function are
+# listed in the order as they appear in the source file.
+#
+
+#
+# Function name Tests for function
+#--------------------------------------------------------------------------
+# PhotoFormatThreadExitProc no tests
+# Tk_Create*PhotoImageFormat no tests
+# ImgPhotoCreate imgPhoto-2.*
+# ImgPhotoCmd imgPhoto-4.*, imgPhoto-17.*
+# GetExtension: no tests
+# ParseSubcommandOptions: imgPhoto-1.*
+# ImgPhotoConfigureMaster: imgPhoto-3.*, imgPhoto-15.*
+# toggleComplexAlphaIfNeeded: no tests
+# ImgPhotoDelete: imgPhoto-8.*
+# ImgPhotoCmdDeleteProc: imgPhoto-9.*
+# ImgPhotoSetSize: no tests
+# MatchFileFormat: imgPhoto-18.*
+# MatchSringFormat: imgPhoto-19.*
+# Tk_FindPhoto: imgPhoto-11.*
+# Tk_PhotoPutBlock: imgPhoto-10.*, imgPhoto-16.*
+# Tk_PhotoPutZoomedBlock: imgPhoto-12.*
+# Tk_DitherPhoto: no tets
+# Tk_PhotoBlank: no tests
+# Tk_PhotoExpand: no tests
+# Tk_PhotoGetSize: no tests
+# Tk_PhotoSetSize: no tests
+# TkGetPhotoValidRegion: no tests
+# ImgGetPhoto: no tests
+# Tk_PhotoGetImage no tests
+# ImgPostscriptPhoto no tests
+# Tk_PhotoPutBlock_NoComposite no tests, probably none needed
+# Tk_PhotoPutZoomedBlock_NoComposite no tests, probably none needed
+# Tk_PhotoExpand_Panic no tests, probably none needed
+# Tk_PhotoPutBlock_Panic no tests, probably none needed
+# Tk_PhotoPutZoomedBlock_Panic no tests, probably none needed
+# Tk_PhotoSetSize_Panic no tests, probably none needed
+#--------------------------------------------------------------------------
+#
+
+#
+# Some tests are not specific to a function in tkImgPhoto.c. They are:
+#
+
+#
+# Test name(s) Description
+#--------------------------------------------------------------------------
+# imgPhoto-5.* Do not really belong to this file. ImgPhotoGet and
+# ImgPhotoFree are defined in tkImgPhInstance.c.
+# imgPhoto-6.* Do not really belong to this file. ImgPhotoDisplay
+# is defined in tkImgPhInstance.c.
+# imgPhoto-7.* Do not really belong to this file. ImgPhotoFree is
+# defined in tkImgPhInstance.c.
+# imgPhoto-13.* Tests for separation in different interpreters
+# imgPhoto-14.* Test GIF format. Would belong to imgGIF.test
+# - which does not exist.
+#
+
package require tcltest 2.2
namespace import ::tcltest::*
tcltest::configure {*}$argv
tcltest::loadTestedCommands
-
-# Used for 4.65 - 4.73 tests
-# Now for some heftier testing, checking that setting and resetting of pixels'
-# transparency status doesn't "leak" with any one-off errors.
+
+#
+# Used for imgPhoto-4.65 - imgPhoto-4.73
+#
proc foreachPixel {img xVar yVar script} {
upvar 1 $xVar x $yVar y
set width [image width $img]
@@ -58,7 +126,10 @@ set README [makeFile {
# find the teapot.ppm file for use in these tests
set teapotPhotoFile [file join [file dirname [info script]] teapot.ppm]
testConstraint hasTeapotPhoto [file exists $teapotPhotoFile]
-
+# let's see if we have the semi-transparent one as well
+set transpTeapotPhotoFile [file join [file dirname [info script]] teapotTransparent.png]
+testConstraint hasTranspTeapotPhoto [file exists $transpTeapotPhotoFile]
+
proc base64ok {} {
expr {
![catch {package require base64}]
@@ -115,7 +186,23 @@ test imgPhoto-1.10 {options for photo images - error case} -body {
test imgPhoto-1.11 {options for photo images - error case} -body {
image create photo photo1 -format
} -returnCodes error -result {value for "-format" missing}
-
+test imgPhoto-1.12 {option -alpha, normal use} -setup {
+ image create photo photo1
+} -body {
+ photo1 put "white" -to 0 0
+ photo1 transparency get 0 0 -alpha
+} -cleanup {
+ imageCleanup
+} -result {255}
+test imgPhoto-1.13 {option -withalpha, normal use} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{blue green}}
+ photo1 get 1 0 -withalpha
+} -cleanup {
+ imageCleanup
+} -result {0 128 0 255}
+
test imgPhoto-2.1 {ImgPhotoCreate procedure} -setup {
imageCleanup
} -body {
@@ -138,7 +225,7 @@ test imgPhoto-2.2 {ImgPhotoCreate procedure} -setup {
# photo1 copy photo2
# set msg
# } {couldn't open "bogus.img": no such file or directory}
-
+
test imgPhoto-3.1 {ImgPhotoConfigureMaster procedure} -constraints {
hasTeapotPhoto
} -body {
@@ -174,7 +261,40 @@ test imgPhoto-3.3 {ImgPhotoConfigureMaster procedure} -constraints {
destroy .c
image delete photo1
} -result {256 256 {10 10 266 266} {300 10 556 266}}
-
+test imgPhoto-3.4 {ImgPhotoConfigureMaster: -data <ppm>} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ photo2 configure -data [photo1 data -format ppm -from 100 100 120 120]
+ list [image width photo2] [image height photo2]
+} -cleanup {
+ imageCleanup
+} -result {20 20}
+test imgPhoto-3.5 {ImgPhotoConfigureMaster: -data <png>} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ photo2 configure -data [photo1 data -format png -from 120 120 140 140]
+ list [image width photo2] [image height photo2]
+} -cleanup {
+ imageCleanup
+} -result {20 20}
+test imgPhoto-3.6 {ImgPhotoConfigureMaster: -data <default>} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ photo2 configure -data [photo1 data -from 80 90 100 110]
+ list [image width photo2] [image height photo2]
+} -cleanup {
+ imageCleanup
+} -result {20 20}
+
test imgPhoto-4.1 {ImgPhotoCmd procedure} -setup {
image create photo photo1
} -body {
@@ -373,16 +493,19 @@ test imgPhoto-4.21 {ImgPhotoCmd procedure: copy option} -constraints {
} -cleanup {
image delete photo1 photo2
} -result {256 256 49 51 49 51 49 51 10 51 10 10}
+# tests for <imageName> data: imgPhoto-4.
test imgPhoto-4.22 {ImgPhotoCmd procedure: get option} -constraints {
- hasTeapotPhoto
+ hasTranspTeapotPhoto
} -setup {
image create photo photo1
} -body {
- photo1 read $teapotPhotoFile
- list [photo1 get 100 100] [photo1 get 150 100] [photo1 get 100 150]
+ photo1 read $transpTeapotPhotoFile
+ list [photo1 get 100 100 -withalpha] \
+ [photo1 get 150 100 -withalpha] \
+ [photo1 get 100 150] [photo1 get 150 150]
} -cleanup {
image delete photo1
-} -result {{169 117 90} {172 115 84} {35 35 35}}
+} -result {{175 71 0 162} {179 73 0 168} {14 8 0} {0 0 0}}
test imgPhoto-4.23 {ImgPhotoCmd procedure: get option} -setup {
image create photo photo1
} -body {
@@ -400,10 +523,12 @@ test imgPhoto-4.24 {ImgPhotoCmd procedure: get option} -setup {
test imgPhoto-4.25 {ImgPhotoCmd procedure: get option} -setup {
image create photo photo1
} -body {
- photo1 get
+ photo1 get 0
} -cleanup {
image delete photo1
-} -returnCodes error -result {wrong # args: should be "photo1 get x y"}
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 get x y ?-withalpha?"}
+# more test for image get: 4.101-4.102
test imgPhoto-4.26 {ImgPhotoCmd procedure: put option} -setup {
image create photo photo1
} -body {
@@ -417,22 +542,28 @@ test imgPhoto-4.27 {ImgPhotoCmd procedure: put option} -setup {
photo1 put {{white} {white white}}
} -returnCodes error -cleanup {
image delete photo1
-} -result {all elements of color list must have the same number of elements}
+} -result {invalid row # 1: all rows must have the same number of elements}
test imgPhoto-4.28 {ImgPhotoCmd procedure: put option} -setup {
image create photo photo1
} -body {
photo1 put {{blahgle}}
} -cleanup {
image delete photo1
-} -returnCodes error -result {can't parse color "blahgle"}
+} -returnCodes error -result {invalid color name "blahgle"}
test imgPhoto-4.29 {ImgPhotoCmd procedure: put option} -setup {
image create photo photo1
} -body {
- photo1 put -to 10 10 20 20 {{white}}
+ # SB: odd thing - this test passed with tk 8.6.6, even if the data
+ # is in the wrong position:
+ #photo1 put -to 10 10 20 20 {{white}}
+
+ # this is how it's supposed to be:
+ photo1 put {{white}} -to 10 10 20 20
photo1 get 19 19
} -cleanup {
image delete photo1
} -result {255 255 255}
+# more tests for image put: 4.90-4.100
test imgPhoto-4.30 {ImgPhotoCmd procedure: read option} -setup {
image create photo photo1
} -body {
@@ -514,6 +645,7 @@ test imgPhoto-4.39 {ImgPhotoCmd procedure: write option} -setup {
} -cleanup {
image delete photo1
} -returnCodes error -result {image file format "bogus" is unknown}
+# more tests on "imageName write": imgPhoto-17.*
test imgPhoto-4.40 {ImgPhotoCmd procedure: transparency option} -setup {
image create photo photo1
} -body {
@@ -527,21 +659,21 @@ test imgPhoto-4.41 {ImgPhotoCmd procedure: transparency get option} -setup {
photo1 transparency get
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency get x y"}
+} -result {wrong # args: should be "photo1 transparency get x y ?-option?"}
test imgPhoto-4.42 {ImgPhotoCmd procedure: transparency get option} -setup {
image create photo photo1
} -body {
photo1 transparency get 0
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency get x y"}
+} -result {wrong # args: should be "photo1 transparency get x y ?-option?"}
test imgPhoto-4.43 {ImgPhotoCmd procedure: transparency get option} -setup {
image create photo photo1
} -body {
- photo1 transparency get 0 0 0
+ photo1 transparency get 0 0 0 -alpha
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency get x y"}
+} -result {wrong # args: should be "photo1 transparency get x y ?-option?"}
test imgPhoto-4.44 {ImgPhotoCmd procedure: transparency get option} -setup {
image create photo photo1
} -body {
@@ -601,34 +733,39 @@ test imgPhoto-4.51 {ImgPhotoCmd procedure: transparency get option} -setup {
} -cleanup {
image delete photo1
} -result 1
+# more tests for transparency get: 4.65, 4.66, 4.76-4.81
test imgPhoto-4.52 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
} -body {
photo1 transparency set
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency set x y boolean"}
+} -result \
+ {wrong # args: should be "photo1 transparency set x y newVal ?-option?"}
test imgPhoto-4.53 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
} -body {
photo1 transparency set 0
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency set x y boolean"}
+} -result \
+ {wrong # args: should be "photo1 transparency set x y newVal ?-option?"}
test imgPhoto-4.54 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
} -body {
photo1 transparency set 0 0
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency set x y boolean"}
+} -result \
+ {wrong # args: should be "photo1 transparency set x y newVal ?-option?"}
test imgPhoto-4.55 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
} -body {
- photo1 transparency set 0 0 0 0
+ photo1 transparency set 0 0 0 0 -alpha
} -returnCodes error -cleanup {
image delete photo1
-} -result {wrong # args: should be "photo1 transparency set x y boolean"}
+} -result \
+ {wrong # args: should be "photo1 transparency set x y newVal ?-option?"}
test imgPhoto-4.56 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
} -body {
@@ -645,6 +782,7 @@ test imgPhoto-4.57 {ImgPhotoCmd procedure: transparency set option} -setup {
} -returnCodes error -result {expected integer but got "bogus"}
test imgPhoto-4.58 {ImgPhotoCmd procedure: transparency set option} -setup {
image create photo photo1
+ photo1 put blue
} -body {
photo1 transparency set 0 0 bogus
} -cleanup {
@@ -696,6 +834,7 @@ test imgPhoto-4.64 {ImgPhotoCmd procedure: transparency set option} -setup {
} -cleanup {
image delete photo1
} -result 1
+# more tests for transparency set: 4.67, 4.68, 4.82-4.89
# Now for some heftier testing, checking that setting and resetting of pixels'
# transparency status doesn't "leak" with any one-off errors.
test imgPhoto-4.65 {ImgPhotoCmd procedure: transparency get option} -setup {
@@ -821,7 +960,7 @@ test imgPhoto-4.75 {<photo> read command: filename starting with '-'} -constrain
file delete ./-teapotPhotoFile
} -result {}
test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
- hasTeapotPhoto
+ hasTeapotPhoto
} -setup {
imageCleanup
image create photo photo1 -file $teapotPhotoFile
@@ -832,7 +971,411 @@ test imgPhoto-4.76 {ImgPhotoCmd procedure: copy to same image} -constraints {
} -cleanup {
imageCleanup
} -result {}
-
+test imgPhoto-4.76 {ImgPhotoCmd, transparancy get: too many options} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -to 0 0 1 1
+ photo1 transparency get 0 0 -alpha -bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 transparency get x y ?-option?"}
+test imgPhoto-4.77 {ImgPhotoCmd, transparency get: invalid option} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -to 0 0 1 1
+ photo1 transparency get 0 0 -bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {unrecognized option "-bogus": must be -alpha}
+test imgPhoto-4.78 {ImgPhotoCmd, transparency get: normal use} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -to 0 0 1 1
+ set result [photo1 transparency get 0 0]
+ lappend result [photo1 transparency get 0 0 -alpha]
+} -cleanup {
+ imageCleanup
+} -result {0 255}
+test imgPhoto-4.79 {ImgPhotoCmd, transparency get: no option} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+ set result {}
+} -body {
+ set pixelCoords {{156 239} {76 207} {153 213} {139 43} {75 112}}
+ foreach coord $pixelCoords {
+ lappend result [photo1 transparency get {*}$coord]
+ }
+ set result
+} -cleanup {
+ imageCleanup
+} -result {0 1 0 0 0}
+# test imgPhoto-4.80: deleted (was transparency get: -boolean)
+test imgPhoto-4.81 {ImgPhotoCmd, transparency get: -alpha} -constraints {
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo photo1 -file $transpTeapotPhotoFile
+ set result {}
+} -body {
+ set pixelCoords {{156 239} {76 207} {153 213} {139 43} {75 112}}
+ foreach coord $pixelCoords {
+ lappend result [photo1 transparency get {*}$coord -alpha]
+ }
+ set result
+} -cleanup {
+ imageCleanup
+} -result {255 0 1 254 206}
+test imgPhoto-4.82 {ImgPhotoCmd, transparency set: too many opts} -setup {
+ image create photo photo1
+} -body {
+ photo1 transparency set 0 0 -alpha -bogus 1
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 transparency set x y newVal ?-option?"}
+test imgPhoto-4.83 {ImgPhotoCmd, transparency set: invalid opt} -setup {
+ image create photo photo1 -data black
+} -body {
+ photo1 transparency set 0 0 0 -bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {unrecognized option "-bogus": must be -alpha}
+test imgPhoto-4.84 {ImgPhotoCmd, transparency set: invalid newVal} -setup {
+ image create photo photo1 -data white
+} -body {
+ photo1 transparency set 0 0 bogus -alpha
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {expected integer but got "bogus"}
+test imgPhoto-4.85 {ImgPhotoCmd, transparency set: invalid newVal} -setup {
+ image create photo photo1 -data red
+} -body {
+ photo1 transparency set 0 0 -1 -alpha
+} -returnCodes error -result \
+ {invalid alpha value "-1": must be integer between 0 and 255}
+test imgPhoto-4.86 {ImgPhotoCmd, transparency set: invalid newVal} -setup {
+ image create photo photo1 -data green
+} -body {
+ photo1 transparency set 0 0 256 -alpha
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {invalid alpha value "256": must be integer between 0 and 255}
+test imgPhoto-4.87 {ImgPhotoCmd, transparency set: no opt} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -to 0 0 2 1
+ photo1 transparency set 0 0 0
+ photo1 transparency set 1 0 1
+ list [photo1 transparency get 0 0 -alpha] \
+ [photo1 transparency get 1 0 -alpha]
+} -cleanup {
+ imageCleanup
+} -result {255 0}
+# deleted: test imgPhoto-4.88 {ImgPhotoCmd, transparency set: -boolean}
+test imgPhoto-4.89 {ImgPhotoCmd, transparency set: -alpha} -setup {
+ image create photo photo1
+} -body {
+ photo1 put white -to 0 0 2 2
+ photo1 transparency set 0 0 0 -alpha
+ photo1 transparency set 1 0 1 -alpha
+ photo1 transparency set 0 1 254 -alpha
+ photo1 transparency set 1 1 255 -alpha
+ list [photo1 transparency get 0 0] [photo1 transparency get 1 0] \
+ [photo1 transparency get 0 1] [photo1 transparency get 1 1]
+} -cleanup {
+ imageCleanup
+} -result {1 0 0 0}
+test imgPhoto-4.90 {ImgPhotoCmd put: existing but not allowed opt} -setup {
+ image create photo photo1
+} -body {
+ photo1 put yellow -from 0 0 1 1
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {unrecognized option "-from": must be -format, or -to}
+test imgPhoto-4.91 {ImgPhotoCmd put: invalid option} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{0 1 2 3}} -bogus x
+} -returnCodes error -result \
+ {unrecognized option "-bogus": must be -format, or -to}
+test imgPhoto-4.92 {ImgPhotocmd put: missing data} -setup {
+ image create photo photo1
+} -body {
+ photo1 put -to 0 0
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 put data ?-option value ...?"}
+test imgPhoto-4.93 {ImgPhotoCmd put: data in ppm format} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ set imgdata [photo1 data -format ppm]
+ photo2 put $imgdata -format ppm
+ set result {}
+ if {[image width photo1] != [image width photo2] \
+ || [image height photo1] != [image height photo2]} {
+ lappend result [list [image width photo2] [image height photo2]]
+ } else {
+ lappend result 1
+ }
+ foreach point {{206 125} {67 12} {13 46} {19 184}} {
+ if {[photo1 get {*}$point] ne [photo2 get {*}$point]} {
+ lappend result [photo2 get {*}$point]
+ } else {
+ lappend result 1
+ }
+ }
+ set result
+} -cleanup {
+ imageCleanup
+} -result {1 1 1 1 1}
+test imgPhoto-4.94 {ImgPhotoCmd put: unknown format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {no real data} -format bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {image format "bogus" is not supported}
+test imgPhoto-4.95 {ImgPhotoCmd put: default fmt, invalid data} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{red green blue} {red " blue}}
+ #"
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {unmatched open quote in list}
+test imgPhoto-4.96 {ImgPhotoCmd put: "default" handler is selected} -setup {
+ image create photo photo1
+ image create photo photo2
+ set imgData {{{1 2 3 4} {5 6 7 8} {9 10 11 12}}
+ {{13 14 15 15} {17 18 19 20} {21 22 23 24}}}
+} -body {
+ photo1 put $imgData
+ photo2 put $imgData -format default
+ set result {}
+ lappend result [list [image width photo1] [image height photo1]]
+ lappend result [list [image width photo2] [image height photo2]]
+ lappend result [string equal \
+ [photo1 data -format "default -colorformat rgba"] \
+ [photo2 data -format "default -colorformat rgba"]]
+ set result
+} -cleanup {
+ imageCleanup
+ unset result
+ unset imgData
+} -result {{3 2} {3 2} 1}
+test imgPhoto-4.97 {ImgPhotoCmd put: image size} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{red green blue} {blue red green}}
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {3 2}
+test imgPhoto-4.98 {ImgPhotoCmd put: -to with 2 coords} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{"alice blue" "blanched almond"}
+ {"deep sky blue" "ghost white"}
+ {#AABBCC #AABBCCDD}} -to 5 6
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {7 9}
+test imgPhoto-4.99 {ImgPhotoCmd put: -to with 4 coords} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{#123 #456 #678} {#9AB #CDE #F01}} -to 1 2 20 21
+ set result {}
+ lappend result [photo1 get 19 20 -withalpha]
+ lappend result [string equal \
+ [photo1 data -from 1 2 4 4] [photo1 data -from 4 2 7 4]]
+ lappend result [string equal \
+ [photo1 data -from 10 12 13 14] [photo1 data -from 16 16 19 18]]
+ set result
+} -cleanup {
+ imageCleanup
+} -result {{17 34 51 255} 1 1}
+test imgPhoto-4.100 {ImgPhotoCmd put: no changes on empty data} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{brown blue} {cyan coral}}
+ set imgData [photo1 data]
+ photo1 put {}
+ string equal $imgData [photo1 data]
+} -cleanup {
+ imageCleanup
+} -result {1}
+test imgPhoto-4.101 {ImgPhotoCmd get: too many args} -setup {
+ image create photo photo1
+} -body {
+ photo1 get 0 0 -withalpha bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 get x y ?-withalpha?"}
+test imgPhoto-4.102 {ImgPhotoCmd get: invalid option} -setup {
+ image create photo photo1
+} -body {
+ photo1 get 0 0 -bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {unrecognized option "-bogus": must be -withalpha}
+test imgPhoto-4.103 {ImgPhotoCmd data: accepted opts} -setup {
+ image create photo photo1 -data black
+} -body {
+ photo1 data -format default -from 0 0 -grayscale -background blue
+} -cleanup {
+ imageCleanup
+} -result {{#000000}}
+test imgPhoto-4.104 {ImgPhotoCmd data: existing but not accepted opt} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -to
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+{unrecognized option "-to": must be -background, -format, -from, or -grayscale}
+test imgPhoto-4.105 {ImgPhotoCmd data: invalid option} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+{unrecognized option "-bogus": must be -background, -format, -from, or -grayscale}
+test imgPhoto-4.106 {ImgPhotoCmd data: extra arg before options} -setup {
+ image create photo photo1
+} -body {
+ photo1 data bogus -grayscale
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 data ?-option value ...?"}
+test imgPhoto-4.107 {ImgPhotoCmd data: extra arg after options} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format default bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {wrong # args: should be "photo1 data ?-option value ...?"}
+test imgPhoto-4.108 {ImgPhotoCmd data: invalid -from coords #1} -setup {
+ image create photo photo1 -data blue
+} -body {
+ photo1 data -from 2 0
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {coordinates for -from option extend outside image}
+test imgPhoto-4.109 {ImgPhotoCmd data: invalid -from coords #2} -setup {
+ image create photo photo1 -data blue
+} -body {
+ photo1 data -from 0 2
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {coordinates for -from option extend outside image}
+test imgPhoto-4.110 {ImgPhotoCmd data: invalid -from coords #3} -setup {
+ image create photo photo1 -data blue
+} -body {
+ photo1 data -from 0 0 2 1
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {coordinates for -from option extend outside image}
+test imgPhoto-4.111 {ImgPhotoCmd data: invalid -from coords #4} -setup {
+ image create photo photo1 -data blue
+} -body {
+ photo1 data -from 0 0 1 2
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result \
+ {coordinates for -from option extend outside image}
+test imgPhoto-4.112 {ImgPhotoCmd data: -from with 2 coords} -setup {
+ image create photo photo1 -data {
+ {black black black black black}
+ {white white white white white}
+ {green green green green green}}
+} -body {
+ set imgData [photo1 data -from 2 1]
+ list [llength [lindex $imgData 0]] [llength $imgData]
+} -cleanup {
+ imageCleanup
+ unset imgData
+} -result {3 2}
+test imgPhoto-4.113 {ImgPhotoCmd data: default is rgb format} -setup {
+ image create photo photo1 -data red
+} -body {
+ photo1 data
+} -cleanup {
+ imageCleanup
+} -result {{#ff0000}}
+test imgPhoto-4.114 {ImgPhotoCmd data: unknown format} -setup {
+ image create photo photo1
+} -body {
+ photo1 data -format bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {image string format "bogus" is unknown}
+test imgPhoto-4.115 {ImgPhotoCmd data: rgb colorformat} -setup {
+ image create photo photo1 -data {{red#a green#b} {blue#c white}}
+} -body {
+ photo1 data -format {default -colorformat rgb}
+} -result {{#ff0000 #008000} {#0000ff #ffffff}}
+test imgPhoto-4.116 {ImgPhotoCmd data: rgba colorformat} -setup {
+ image create photo photo1 -data {{red green} {blue white}}
+} -body {
+ photo1 data -format {default -colorformat rgba}
+} -result {{#ff0000ff #008000ff} {#0000ffff #ffffffff}}
+test imgPhoto-4.117 {ImgPhotoCmd data: list colorformat} -setup {
+ image create photo photo1 -data {{red#a green} {blue#c white#d}}
+} -body {
+ photo1 data -format {default -colorformat list}
+} -result {{{255 0 0 170} {0 128 0 255}} {{0 0 255 204} {255 255 255 221}}}
+test imgPhoto-4.118 {ImgPhotoCmd data: using data for new image
+ results in same image as orignial } -constraints {
+ hasTeapotPhoto
+ hasTranspTeapotPhoto
+} -setup {
+ image create photo teapot -file $teapotPhotoFile
+ teapot copy teapot -from 50 60 70 80 -shrink
+ image create photo teapotTransp -file $transpTeapotPhotoFile
+ teapotTransp copy teapotTransp -from 100 110 120 130 -shrink
+ image create photo photo1
+} -body {
+ set result {}
+ # We don't test gif here, as there seems to be a problem with
+ # <imgName> data and gif format ("too many colors", probably a bug)
+ foreach fmt {ppm png {default -colorformat rgba} \
+ {default -colorformat list}} {
+ set imgData [teapotTransp data -format $fmt]
+ photo1 blank
+ photo1 put $imgData
+ if { ! [string equal [photo1 data] [teapotTransp data]]} {
+ lappend result $fmt
+ }
+ }
+ set imgData [teapot data -format default]
+ photo1 blank
+ photo1 put $imgData
+ if { ! [string equal [photo1 data] [teapot data]]} {
+ lappend result default
+ }
+ set result
+} -cleanup {
+ unset imgData
+ unset result
+ imageCleanup
+} -result {}
+
test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} -constraints {
hasTeapotPhoto
} -setup {
@@ -855,7 +1398,7 @@ test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} -constraints {
} -cleanup {
destroy .c
} -result {}
-
+
test imgPhoto-6.1 {ImgPhotoDisplay procedure, blank display} -setup {
destroy .c
pack [canvas .c]
@@ -869,7 +1412,7 @@ test imgPhoto-6.1 {ImgPhotoDisplay procedure, blank display} -setup {
destroy .c
image delete photo1
} -result {}
-
+
test imgPhoto-7.1 {ImgPhotoFree procedure, resource freeing} -constraints {
hasTeapotPhoto
} -setup {
@@ -930,7 +1473,7 @@ test imgPhoto-7.3 {ImgPhotoFree procedures, multiple visuals} -constraints {
destroy .f
image delete photo1
} -result {}
-
+
test imgPhoto-8.1 {ImgPhotoDelete procedure} -constraints hasTeapotPhoto -body {
image create photo photo2 -file $teapotPhotoFile
image delete photo2
@@ -954,7 +1497,7 @@ test imgPhoto-8.3 {ImgPhotoDelete procedure, name cleanup} -body {
} -returnCodes error -cleanup {
imageCleanup
} -result {image "photo2" doesn't exist or is not a photo image}
-
+
test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -constraints {
hasTeapotPhoto
} -body {
@@ -962,7 +1505,7 @@ test imgPhoto-9.1 {ImgPhotoCmdDeletedProc procedure} -constraints {
rename photo2 {}
list [lsearch -exact [imageNames] photo2] [catch {photo2 foo} msg] $msg
} -result {-1 1 {invalid command name "photo2"}}
-
+
test imgPhoto-10.1 {Tk_ImgPhotoPutBlock procedure} -setup {
imageCleanup
} -body {
@@ -1009,7 +1552,6 @@ test imgPhoto-10.4 {Tk_ImgPhotoPutBlock, empty image} -setup {
imageCleanup
} -result {0 0}
-
test imgPhoto-11.1 {Tk_FindPhoto} -setup {
imageCleanup
} -body {
@@ -1019,7 +1561,7 @@ test imgPhoto-11.1 {Tk_FindPhoto} -setup {
} -cleanup {
imageCleanup
} -returnCodes error -result {image "i1" doesn't exist or is not a photo image}
-
+
test imgPhoto-12.1 {Tk_PhotoPutZoomedBlock} -constraints hasTeapotPhoto -body {
image create photo p3 -file $teapotPhotoFile
set result [list [p3 get 50 50] [p3 get 100 100]]
@@ -1108,7 +1650,7 @@ test imgPhoto-13.1 {check separation of images in different interpreters} -setup
interp delete x1
interp delete x2
} -result T1_data
-
+
test imgPhoto-14.1 {GIF writes work correctly} -setup {
set data {
R0lGODlhYwA5APcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgAysnGy8hKzM
@@ -1252,7 +1794,7 @@ test imgPhoto-15.1 {photo images can fail to allocate memory gracefully} -constr
# free memory available...
image create photo -width 32000 -height 32000
} -returnCodes error -result {not enough free memory for image buffer}
-
+
test imgPhoto-16.1 {copying to self doesn't access freed memory} -setup {
set i [image create photo]
} -body {
@@ -1263,7 +1805,7 @@ test imgPhoto-16.1 {copying to self doesn't access freed memory} -setup {
} -cleanup {
image delete $i
} -result {}
-
+
# Check that we can guess our supported output formats [Bug 2983824]
test imgPhoto-17.1 {photo write: format guessing from filename} -setup {
set i [image create photo -width 3 -height 3]
@@ -1302,6 +1844,109 @@ test imgPhoto-17.3 {photo write: format guessing from filename} -setup {
image delete $i
catch {removeFile $f}
} -result "P6\n"
+test imgPhoto-17.4 {photo write: default format not supported} -setup {
+ image create photo photo1 -data {{blue blue} {red red} {green green}}
+ set f [makeFile {} test.txt]
+} -body {
+ photo1 write $f -format default
+} -cleanup {
+ imageCleanup
+ catch {removeFile $f}
+ unset f
+} -returnCodes error -result \
+ {image file format "default" has no file writing capability}
+test imgPhoto-17.5 {photo write: file with extension .default} -setup {
+ image create photo photo1 -data {{black}}
+ set f [makeFile {} test.default]
+} -body {
+ photo1 write $f
+} -cleanup {
+ imageCleanup
+ catch {removeFile $f}
+ unset f
+} -returnCodes error -result \
+ {image file format "default" has no file writing capability}
+
+test imgPhoto-18.1 {MatchFileFormat: "default" format not supported} -setup {
+ image create photo photo1
+ set f [makeFile {} test.txt]
+} -body {
+ photo1 read $f -format default
+} -cleanup {
+ imageCleanup
+ catch {removeFile $f}
+ unset f
+} -returnCodes error -result {-file option isn't supported for default images}
+
+test imgPhoto-19.1 {MatchStringFormat: with "-format default"} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{red blue red} {yellow green yellow}} -format default
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {3 2}
+test imgPhoto-19.2 {MatchStringFormat: without -format option,
+ default fmt} -body {
+ image create photo photo1
+ photo1 put {{red} {green}}
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ imageCleanup
+} -result {1 2}
+test imgPhoto-19.3 {MatchStringFormat: "-format ppm"} -setup {
+ image create photo photo1
+ image create photo photo2
+ photo2 put {cyan cyan}
+ set imgData [photo2 data -format ppm]
+} -body {
+ photo1 put $imgData -format ppm
+ list [image width photo1] [image height photo1]
+} -cleanup {
+ unset imgData
+ imageCleanup
+} -result {1 2}
+test imgPhoto-19.4 {MatchStringFormat: ppm fmt, without opt} -constraints {
+ hasTeapotPhoto
+} -setup {
+ image create photo photo1 -file $teapotPhotoFile
+ image create photo photo2
+} -body {
+ set imgData [photo1 data -format ppm]
+ photo2 put $imgData
+ list [image width photo2] [image height photo2]
+} -cleanup {
+ imageCleanup
+ unset imgData
+} -result {256 256}
+test imgPhoto-19.5 {MatchStirngFormat: unknown -format} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {} -format bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {image format "bogus" is not supported}
+test imgPhoto-19.6 {MatchStringFormat: invalid data for default} -setup {
+ image create photo photo1
+} -body {
+ photo1 put bogus
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "bogus"}
+test imgPhoto-19.7 {MatchStringFormat: invalid data for default} -setup {
+ image create photo photo1
+} -body {
+ photo1 put bogus -format dEFault
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {invalid color name "bogus"}
+test imgPhoto-19.8 {MatchStirngFormat: invalid data for gif} -setup {
+ image create photo photo1
+} -body {
+ photo1 put bogus -format giF
+} -cleanup {
+ imageCleanup
+} -returnCodes error -result {couldn't recognize image data}
# Reject corrupted or truncated image [Bug b601ce3ab1].
# WARNING - tests 18.1-18.9 will cause a segfault on 8.5.19 and lower,
diff --git a/tests/imgSVGnano.test b/tests/imgSVGnano.test
new file mode 100644
index 0000000..ff7046a
--- /dev/null
+++ b/tests/imgSVGnano.test
@@ -0,0 +1,220 @@
+# This file is a Tcl script to test out the code in tkImgSVGnano.c, which reads
+# and write SVG-format image files for photo widgets. The files is organized
+# in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2018 Rene Zaumseil
+# All rights reserved.
+
+package require tcltest 2.2
+namespace import ::tcltest::*
+eval tcltest::configure $argv
+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>}
+
+ tcltest::makeFile $data(plus) plus.svg
+ set data(plusFilePath) [file join [tcltest::configure -tmpdir] plus.svg]
+
+ 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 {
+ image create photo foo -data $data(plus)
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {100 100}
+
+test imgSVGnano-1.2 {simple image with options} -setup {
+ catch {rename foo ""}
+} -body {
+ image create photo foo -data $data(plus) -format {svg -dpi 100 -scale 3}
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {300 300}
+
+# test on crash found by Koen Danckaert
+test imgSVGnano-1.3 {reformat image options} -setup {
+ catch {rename foo ""}
+} -body {
+ image create photo foo -data $data(plus)
+ catch {foo configure -format {svg -scale}}
+ list {}
+} -cleanup {
+ rename foo ""
+} -result {{}}
+
+test imgSVGnano-1.4 {image options} -setup {
+ catch {rename foo ""}
+} -body {
+ image create photo foo -data $data(plus)
+ foo configure -format {svg -scale 2}
+ foo configure -format {svg -dpi 600}
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {100 100}
+test imgSVGnano-1.5 {reading simple image from file} -setup {
+ catch {rename foo ""}
+} -body {
+ image create photo foo -file $data(plusFilePath)
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {100 100}
+
+test imgSVGnano-1.6 {simple image with options} -setup {
+ catch {rename foo ""}
+} -body {
+ image create photo foo -file $data(plusFilePath) -format {svg -dpi 100 -scale 3}
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {300 300}
+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 {
+ image create photo foo -format "svg -scale 0.000001"\
+ -file $data(plusFilePath)
+ list [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+} -result {1 1}
+
+test imgSVGnano-2.1 {reading a bad image} -body {
+ image create photo foo -format svg -data $data(bad)
+} -returnCodes error -result {couldn't recognize image data}
+test imgSVGnano-2.2 {using bad option} -body {
+ image create photo foo -data $data(plus) -format {svg -scale 0}
+} -returnCodes error -result {-scale value must be positive}
+test imgSVGnano-2.3 {using bad option} -body {
+ image create photo foo -data $data(plus)
+ foo configure -format {svg 1.0}
+} -cleanup {
+ rename foo ""
+} -returnCodes error -result {bad option "1.0": must be -dpi, -scale, -scaletoheight, or -scaletowidth}
+test imgSVGnano-2.4 {reading a bad image from file} -body {
+ image create photo foo -format svg -file $data(badFilePath)
+} -returnCodes error -match glob\
+ -result {couldn't recognize data in image file "*/bad.svg"}
+
+# -scaletoheight and -scaletowidth options
+test imgSVGnano-3.1 {multiple scale options} -body {
+ image create photo foo -format "svg -scale 1 -scaletowidth 20"\
+ -data $data(bad)
+} -returnCodes error -result {only one of -scale, -scaletoheight, -scaletowidth may be given}
+
+test imgSVGnano-3.2 {no number parameter to -scaletowidth} -body {
+ image create photo foo -format "svg -scaletowidth invalid"\
+ -data $data(plus)
+} -returnCodes error -result {expected integer but got "invalid"}
+
+test imgSVGnano-3.3 {no number parameter to -scaletoheight} -body {
+ image create photo foo -format "svg -scaletoheight invalid"\
+ -data $data(plus)
+} -returnCodes error -result {expected integer but got "invalid"}
+
+test imgSVGnano-3.4 {zero parameter to -scaletowidth} -body {
+ image create photo foo -format "svg -scaletowidth 0"\
+ -data $data(plus)
+} -returnCodes error -result {-scaletowidth value must be positive}
+
+test imgSVGnano-3.5 {zero parameter to -scaletoheight} -body {
+ image create photo foo -format "svg -scaletoheight 0"\
+ -data $data(plus)
+} -returnCodes error -result {-scaletoheight value must be positive}
+
+test imgSVGnano-3.6 {no number parameter to -scaletoheight} -body {
+ image create photo foo -format "svg -scaletoheight invalid"\
+ -data $data(plus)
+} -returnCodes error -result {expected integer but got "invalid"}
+
+test imgSVGnano-3.7 {Option -scaletowidth} -body {
+ image create photo foo -format "svg -scaletowidth 20"\
+ -data $data(plus)
+ image width foo
+} -cleanup {
+ rename foo ""
+} -result {20}
+
+test imgSVGnano-3.8 {Option -scaletoheight} -body {
+ image create photo foo -format "svg -scaletoheight 20"\
+ -data $data(plus)
+ image height foo
+} -cleanup {
+ rename foo ""
+} -result {20}
+
+test imgSVGnano-3.10 {change from -scaletoheight to -scale} -body {
+ set res {}
+ image create photo foo -format "svg -scaletoheight 16"\
+ -data $data(plus)
+ lappend res [image width foo] [image height foo]
+ foo configure -format "svg -scale 2"
+ lappend res [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+ unset res
+} -result {16 16 200 200}
+
+# svg file access
+test imgSVGnano-4.1 {reread file on configure -scale} -setup {
+ catch {rename foo ""}
+ set res {}
+} -body {
+ image create photo foo -file $data(plusFilePath)
+ lappend res [image width foo] [image height foo]
+ foo configure -format "svg -scale 2"
+ lappend res [image width foo] [image height foo]
+} -cleanup {
+ rename foo ""
+ 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
+ image create photo foo -file [file join [tcltest::configure -tmpdir] tmpplus.svg]
+ tcltest::removeFile tmpplus.svg
+} -body {
+ foo configure -format "svg -scale 2"
+} -cleanup {
+ rename foo ""
+ tcltest::removeFile tmpplus.svg
+} -returnCodes error -match glob -result {couldn't open "*/tmpplus.svg": no such file or directory}
+
+};# end of namespace svgnano
+
+namespace delete svgnano
+imageFinish
+cleanupTests
+return
+
+# Local Variables:
+# mode: tcl
+# fill-column: 78
+# End:
diff --git a/tests/listbox.test b/tests/listbox.test
index 14c5c97..77d75b4 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -2666,7 +2666,7 @@ test listbox-21.9 {ListboxListVarProc, test hscrollbar after listvar mod} -setup
listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x
set log {}
pack .l
- set timeout [after 500 {set log timeout}]
+ set timeout [after 500 {set log timeout}]
vwait log
lappend x "0000000000"
update
@@ -2684,7 +2684,7 @@ test listbox-21.10 {ListboxListVarProc, test hscrollbar after listvar mod} -setu
listbox .l -font $fixed -width 10 -xscrollcommand "record x" -listvar x
set log {}
pack .l
- set timeout [after 500 {set log timeout}]
+ set timeout [after 500 {set log timeout}]
vwait log
lappend x "0000000000"
update
@@ -2764,7 +2764,7 @@ test listbox-21.15 {ListboxListVarProc, update vertical scrollbar} -setup {
update
set log {}
pack .l
- set timeout [after 500 {set log timeout}]
+ set timeout [after 500 {set log timeout}]
vwait log
update
lappend x a b c d e f
@@ -2803,7 +2803,7 @@ test listbox-22.1 {UpdateHScrollbar} -setup {
listbox .l -font $fixed -width 10 -xscrollcommand "record x"
set log {}
pack .l
- set timeout [after 500 {set log timeout}]
+ set timeout [after 500 {set log timeout}]
vwait log
.l insert end "0000000000"
update
diff --git a/tests/main.test b/tests/main.test
index 7ab624f..deb0783 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -55,7 +55,7 @@ test main-2.2 {Tk_MainEx: -encoding option} -constraints stdio -setup {
removeFile script
} -result "script {} 0\n0\n"
- # Procedure to simulate interactive typing of commands, line by line,
+ # Procedure to simulate interactive typing of commands, line by line,
# for test 2.3
proc type {chan script} {
foreach line [split $script \n] {
diff --git a/tests/menu.test b/tests/menu.test
index a7f5956..4fde53e 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -29,7 +29,7 @@ test menu-1.4 {Tk_MenuCmd procedure} -body {
destroy .m1
menu .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
test menu-1.5 {Tk_MenuCmd - creating menubar} -setup {
destroy .m1
@@ -38,19 +38,19 @@ test menu-1.5 {Tk_MenuCmd - creating menubar} -setup {
.m1 add cascade -label Test -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-1.6 {Tk_MenuCmd procedure menu ref no cascade} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
menu .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
test menu-1.7 {Tk_MenuCmd procedure one clone cascade} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -58,10 +58,10 @@ test menu-1.7 {Tk_MenuCmd procedure one clone cascade} -setup {
.m1 add cascade -menu .m2
menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-1.8 {Tk_MenuCmd procedure two clone cascades} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
@@ -71,10 +71,10 @@ test menu-1.8 {Tk_MenuCmd procedure two clone cascades} -setup {
wm geometry .t3 +0+0
menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-1.9 {Tk_MenuCmd procedure two clone cascades different order} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -84,10 +84,10 @@ test menu-1.9 {Tk_MenuCmd procedure two clone cascades different order} -setup {
wm geometry .t3 +0+0
list [menu .m2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-1.10 {Tk_MenuCmd procedure two clone cascades menus last} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -97,10 +97,10 @@ test menu-1.10 {Tk_MenuCmd procedure two clone cascades menus last} -setup {
.m1 add cascade -menu .m2
list [menu .m2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-1.11 {Tk_MenuCmd procedure three clones cascades} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -112,19 +112,19 @@ test menu-1.11 {Tk_MenuCmd procedure three clones cascades} -setup {
.m1 add cascade -menu .m2
list [menu .m2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-1.12 {Tk_MenuCmd procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
list [menu .m1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
test menu-1.13 {Tk_MenuCmd procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -132,10 +132,10 @@ test menu-1.13 {Tk_MenuCmd procedure} -setup {
wm geometry .t3 +0+0
list [menu .m1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
test menu-1.14 {Tk_MenuCmd procedure} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
@@ -145,7 +145,7 @@ test menu-1.14 {Tk_MenuCmd procedure} -setup {
wm geometry .t4 +0+0
list [menu .m1]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
# Used for 2.1 - 2.30 tests
@@ -175,6 +175,14 @@ test menu-2.6 {configuration options -activeforeground non-existent} -body {
.m1 configure -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
+test menu-2.6a {configuration options -activerelief sunken} -body {
+ .m1 configure -activerelief sunken
+ .m1 cget -activerelief
+} -result {sunken}
+test menu-2.6b {configuration options -activerelief badValue} -body {
+ .m1 configure -activerelief badValue
+} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
+
test menu-2.7 {configuration options -background #ff0000} -body {
.m1 configure -background #ff0000
.m1 cget -background
@@ -276,7 +284,7 @@ destroy .m1
# We need to test all of the options with all of the different types of
# menu entries. The following code sets up .m1 with 6 items. It then
# runs through the 2.31 - 2.228 tests below
-# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton,
+# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton,
# 5 radiobutton
deleteWindows
menu .m1 -tearoff 1
@@ -771,34 +779,34 @@ test menu-2.132 {entry configuration options 5 -image bogus radiobutton} -body {
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.133 {entry configuration options 0 -image {} tearoff} -body {
- .m1 entryconfigure 0 -image
+ .m1 entryconfigure 0 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.134 {entry configuration options 1 -image {} command} -setup {
.m1 entryconfigure 1 -image {}
} -body {
- .m1 entryconfigure 1 -image
+ .m1 entryconfigure 1 -image
lindex [.m1 entryconfigure 1 -image] 4
} -result {}
test menu-2.135 {entry configuration options 2 -image {} cascade} -setup {
.m1 entryconfigure 2 -image {}
} -body {
- .m1 entryconfigure 2 -image
+ .m1 entryconfigure 2 -image
lindex [.m1 entryconfigure 2 -image] 4
} -result {}
test menu-2.136 {entry configuration options 3 -image {} separator} -body {
- .m1 entryconfigure 3 -image
+ .m1 entryconfigure 3 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.137 {entry configuration options 4 -image {} checkbutton} -body {
- .m1 entryconfigure 4 -image
+ .m1 entryconfigure 4 -image
lindex [.m1 entryconfigure 4 -image] 4
} -result {}
test menu-2.138 {entry configuration options 5 -image {} radiobutton} -body {
- .m1 entryconfigure 5 -image
+ .m1 entryconfigure 5 -image
lindex [.m1 entryconfigure 5 -image] 4
} -result {}
@@ -1052,28 +1060,28 @@ test menu-2.192 {entry configuration options 5 -selectimage bogus radiobutton} -
} -returnCodes error -result {image "bogus" doesn't exist}
test menu-2.193 {entry configuration options 0 -selectimage {} tearoff} -body {
- .m1 entryconfigure 0 -selectimage
+ .m1 entryconfigure 0 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.194 {entry configuration options 1 -selectimage {} command} -body {
- .m1 entryconfigure 1 -selectimage
+ .m1 entryconfigure 1 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.195 {entry configuration options 2 -selectimage {} cascade} -body {
- .m1 entryconfigure 2 -selectimage
+ .m1 entryconfigure 2 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.196 {entry configuration options 3 -selectimage {} separator} -body {
- .m1 entryconfigure 3 -selectimage
+ .m1 entryconfigure 3 -selectimage
} -returnCodes error -result {unknown option "-selectimage"}
test menu-2.197 {entry configuration options 4 -selectimage {} checkbutton} -body {
- .m1 entryconfigure 4 -selectimage
+ .m1 entryconfigure 4 -selectimage
lindex [.m1 entryconfigure 4 -selectimage] 4
} -result {}
test menu-2.198 {entry configuration options 5 -selectimage {} radiobutton} -body {
- .m1 entryconfigure 5 -selectimage
+ .m1 entryconfigure 5 -selectimage
lindex [.m1 entryconfigure 5 -selectimage] 4
} -result {}
@@ -1225,7 +1233,7 @@ test menu-3.1 {MenuWidgetCmd procedure} -setup {
destroy .m1
} -returnCodes error -result {wrong # args: should be ".m1 option ?arg ...?"}
test menu-3.2 {MenuWidgetCmd, Tcl_Preserve and Tcl_Release} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -setup {
destroy .m1
} -body {
@@ -1237,7 +1245,7 @@ test menu-3.2 {MenuWidgetCmd, Tcl_Preserve and Tcl_Release} -constraints {
} -returnCodes ok -result {}
test menu-3.3 {MenuWidgetCmd procedure, "activate" option} -setup {
destroy .m1
-} -body {
+} -body {
menu .m1
.m1 add command -label "test"
.m1 activate
@@ -1359,7 +1367,7 @@ test menu-3.18 {MenuWidgetCmd procedure, "configure" option} -setup {
llength [.m1 configure]
} -cleanup {
destroy .m1
-} -result {20}
+} -result {21}
test menu-3.19 {MenuWidgetCmd procedure, "configure" option} -setup {
destroy .m1
} -body {
@@ -1414,7 +1422,7 @@ test menu-3.26 {MenuWidgetCmd procedure, "delete" option} -setup {
} -body {
menu .m1
.m1 add command -label "foo"
- .m1 delete 1 0
+ .m1 delete 1 0
} -cleanup {
destroy .m1
} -result {}
@@ -1627,9 +1635,9 @@ test menu-3.50 {MenuWidgetCmd procedure, "post" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1
-} -body {
+} -body {
menu .m1
- .m1 add command -label "menu-3.53: hit Escape" -command "puts hello"
+ .m1 add command -label "menu-3.50: hit Escape" -command "puts hello"
.m1 post 40 40
} -cleanup {
destroy .m1
@@ -1654,9 +1662,9 @@ test menu-3.53 {MenuWidgetCmd procedure, "postcascade" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1 .m2
-} -body {
+} -body {
menu .m1
- .m1 add command -label "menu-3.56 - hit Escape"
+ .m1 add command -label "menu-3.53 - hit Escape"
menu .m2
.m1 post 40 40
.m1 add cascade -menu .m2
@@ -1756,10 +1764,10 @@ test menu-3.64 {MenuWidgetCmd procedure, "unpost" option} -constraints {
nonUnixUserInteraction
} -setup {
destroy .m1
-} -body {
+} -body {
menu .m1
- .m1 add command -label "menu-3.68 - hit Escape"
- .m1 post 40 40
+ .m1 add command -label "menu-3.64 - hit Escape"
+ .m1 post 40 40
.m1 unpost
} -cleanup {
destroy .m1
@@ -1813,7 +1821,7 @@ test menu-3.67 {MenuWidgetCmd procedure, bad option} -setup {
destroy .m1
} -returnCodes error -result {bad option "foo": must be activate, add, cget, clone, configure, delete, entrycget, entryconfigure, index, insert, invoke, post, postcascade, type, unpost, xposition, or yposition}
test menu-3.68 {MenuWidgetCmd procedure, fix for bug#508988} -setup {
- deleteWindows
+ deleteWindows
} -body {
set t .t
set m1 .t.m1
@@ -1831,7 +1839,7 @@ test menu-3.68 {MenuWidgetCmd procedure, fix for bug#508988} -setup {
$t configure -menu ""
list [winfo exists $c1] [winfo exists $c2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1 1}
test menu-3.69 {MenuWidgetCmd procedure, "xposition" option} -setup {
destroy .m1
@@ -1869,7 +1877,7 @@ test menu-4.2 {TkInvokeMenu: tearoff} -setup {
menu .m1
catch {.m1 invoke 0}
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-4.3 {TkInvokeMenu: checkbutton -on} -setup {
destroy .m1
@@ -1898,7 +1906,7 @@ test menu-4.5 {TkInvokeMenu: checkbutton array element} -setup {
} -body {
catch {unset foo}
menu .m1
- .m1 add checkbutton -label "test" -variable foo(1) -onvalue on
+ .m1 add checkbutton -label "test" -variable foo(1) -onvalue on
list [catch {.m1 invoke 1} msg] $msg [catch {set foo(1)} msg2] $msg2 [catch {unset foo} msg3] $msg3
} -cleanup {
destroy .m1
@@ -1966,7 +1974,7 @@ test menu-4.11 {TkInvokeMenu} -setup {
} -body {
menu .m1
.m1 add cascade -label "test" -menu .m1.m2
- list [catch {.m1 invoke 1} msg] $msg
+ list [catch {.m1 invoke 1} msg] $msg
} -cleanup {
destroy .m1
} -result {0 {}}
@@ -2026,7 +2034,7 @@ test menu-5.5 {DestroyMenuInstance - cascades of cloned menus} -setup {
list [destroy .m2] [.m1 entrycget 1 -menu] [. configure -menu ""] [destroy .m1]
} -returnCodes ok -result {{} .m2 {} {}}
test menu-5.6 {DestroyMenuInstance - cascades of cloned menus} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
@@ -2122,8 +2130,8 @@ test menu-6.4 {TkDestroyMenu - reentrancy - clones} -setup {
.m1 clone .m1.m3
destroy .m1
} -cleanup {
- deleteWindows
-} -returnCodes ok
+ deleteWindows
+} -returnCodes ok
test menu-6.5 {TkDestroyMenu} -setup {
destroy .m1 .m2
} -body {
@@ -2263,7 +2271,7 @@ test menu-7.4 {UnhookCascadeEntry} -setup {
list [destroy .m1] [destroy .m2]
} -returnCodes ok -result {{} {}}
test menu-7.5 {UnhookCascadeEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
@@ -2274,7 +2282,7 @@ test menu-7.5 {UnhookCascadeEntry} -setup {
list [destroy .m1] [destroy .m2 .m3]
} -returnCodes ok -result {{} {}}
test menu-7.6 {UnhookCascadeEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
@@ -2285,7 +2293,7 @@ test menu-7.6 {UnhookCascadeEntry} -setup {
list [destroy .m2] [destroy .m1 .m3]
} -returnCodes ok -result {{} {}}
test menu-7.7 {UnhookCascadeEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
@@ -2296,7 +2304,7 @@ test menu-7.7 {UnhookCascadeEntry} -setup {
list [destroy .m3] [destroy .m1 .m2]
} -returnCodes ok -result {{} {}}
test menu-7.8 {UnhookCascadeEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
@@ -2350,7 +2358,7 @@ test menu-8.4 {DestroyMenuEntry} -setup {
menu .m1
.m1 add checkbutton -variable foo
list [.m1 delete 1] [destroy .m1]
-} -result {{} {}}
+} -result {{} {}}
test menu-8.5 {DestroyMenuEntry} -setup {
destroy .m1
} -body {
@@ -2367,7 +2375,7 @@ test menu-8.6 {DestroyMenuEntry} -setup {
list [.m1 delete 1] [.m1 entrycget 1 -label] [destroy .m1]
} -result {{} two {}}
test menu-8.7 {DestroyMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "one"
@@ -2382,9 +2390,9 @@ test menu-9.1 {ConfigureMenu} -setup {
destroy .m1
} -body {
menu .m1
- list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand]
+ list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} beep}
test menu-9.2 {ConfigureMenu} -setup {
destroy .m1
@@ -2393,7 +2401,7 @@ test menu-9.2 {ConfigureMenu} -setup {
.m1 add command -label "test"
list [.m1 configure -tearoff 0] [.m1 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test}
test menu-9.3 {ConfigureMenu} -setup {
destroy .m1
@@ -2401,7 +2409,7 @@ test menu-9.3 {ConfigureMenu} -setup {
menu .m1
list [.m1 configure -postcommand "beep"] [.m1 cget -postcommand]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} beep}
test menu-9.4 {ConfigureMenu} -setup {
destroy .m1
@@ -2410,7 +2418,7 @@ test menu-9.4 {ConfigureMenu} -setup {
.m1 add command -label "test"
.m1 configure -fg red
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-9.5 {ConfigureMenu} -setup {
destroy .m1
@@ -2420,7 +2428,7 @@ test menu-9.5 {ConfigureMenu} -setup {
.m1 add command -label "two"
.m1 configure -fg red
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-9.6 {ConfigureMenu} -setup {
destroy .m1
@@ -2431,25 +2439,25 @@ test menu-9.6 {ConfigureMenu} -setup {
.m1 add command -label "three"
.m1 configure -fg red
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-9.7 {ConfigureMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 tearoff
list [.m1 configure -fg red] [.m2 cget -fg]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} red}
test menu-9.8 {ConfigureMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 tearoff
list [.m2 configure -fg red] [.m1 cget -fg]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} red}
test menu-9.9 {ConfigureMenu} -setup {
destroy .m1
@@ -2457,7 +2465,7 @@ test menu-9.9 {ConfigureMenu} -setup {
menu .m1
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
@@ -2470,7 +2478,7 @@ test menu-10.1 {PostProcessEntry: array variable} -setup {
.m1 add checkbutton -variable foo(1) -onvalue on -offvalue off -label "Nonsense"
set foo(1)
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {on}
test menu-10.2 {PostProcessEntry: array variable} -setup {
destroy .m1
@@ -2480,7 +2488,7 @@ test menu-10.2 {PostProcessEntry: array variable} -setup {
.m1 add checkbutton -variable foo(1) -onvalue on -offvalue off -label "Nonsense"
set foo(1)
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {off}
@@ -2492,7 +2500,7 @@ test menu-11.1 {ConfigureMenuEntry} -setup {
.m1 add checkbutton -variable foo -onvalue on -offvalue off -label "Nonsense"
list [.m1 entryconfigure 1 -variable bar] [.m1 entrycget 1 -variable]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} bar}
test menu-11.2 {ConfigureMenuEntry} -setup {
destroy .m1
@@ -2501,7 +2509,7 @@ test menu-11.2 {ConfigureMenuEntry} -setup {
.m1 add command -label "test"
list [.m1 entryconfigure 1 -label ""] [.m1 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-11.3 {ConfigureMenuEntry} -setup {
destroy .m1
@@ -2510,135 +2518,135 @@ test menu-11.3 {ConfigureMenuEntry} -setup {
.m1 add command
list [.m1 entryconfigure 1 -label "test"] [.m1 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test}
test menu-11.4 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
- menu .m1
+ menu .m1
.m1 add command
list [.m1 entryconfigure 1 -accel "S"] [.m1 entrycget 1 -accel]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} S}
test menu-11.5 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command
list [.m1 entryconfigure 1 -label "test"] [.m1 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test}
test menu-11.6 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command
.m1 entryconfigure 1 -label "test"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.7 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m2
menu .m1
.m1 add cascade
.m1 entryconfigure 1 -label "test" -menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.8 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade
.m1 entryconfigure 1 -label "test" -menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.9 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m3
.m1 entryconfigure 1 -label "test" -menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.10 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade
.m1 entryconfigure 1 -label "test" -menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.11 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
.m1 entryconfigure 1 -label "test" -menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.12 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
- menu .m2
+ menu .m2
.m2 add cascade -menu .m1
- menu .m3
+ menu .m3
.m3 add cascade -menu .m1
- menu .m4
+ menu .m4
.m4 add cascade -menu .m1
- menu .m5
+ menu .m5
.m5 add cascade
.m5 entryconfigure 1 -label "test" -menu .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.13 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
- menu .m2
+ menu .m2
.m2 add cascade -menu .m1
- menu .m3
+ menu .m3
.m3 add cascade -menu .m1
- menu .m4
+ menu .m4
.m4 add cascade -menu .m1
.m3 entryconfigure 1 -label "test" -menu .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.14 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add checkbutton
list [.m1 entryconfigure 1 -variable "test"] [.m1 entrycget 1 -variable]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test}
test menu-11.15 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
list [.m1 add checkbutton -label "test"] [.m1 entrycget 1 -variable]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test}
test menu-11.16 {ConfigureMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add radiobutton -label "test"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-11.17 {ConfigureMenuEntry} -setup {
deleteWindows
@@ -2844,35 +2852,35 @@ test menu-13.8 {TkGetMenuIndex} -setup {
.m1 entrycget -1 -label
} -returnCodes error -result {bad menu entry index "-1"}
test menu-13.9 {TkGetMenuIndex} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 add command -label "test2"
.m1 entrycget 999 -label
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {test2}
test menu-13.10 {TkGetMenuIndex} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 insert 999 command -label "test"
.m1 entrycget 1 -label
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {test}
test menu-13.11 {TkGetMenuIndex} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "1test"
.m1 entrycget 1test -label
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {1test}
test menu-13.12 {TkGetMenuIndex} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
@@ -2880,176 +2888,176 @@ test menu-13.12 {TkGetMenuIndex} -setup {
.m1 add command -label "test3"
.m1 entrycget test2 -command
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {beep}
test menu-14.1 {MenuCmdDeletedProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
destroy .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes ok
test menu-14.2 {MenuCmdDeletedProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2
destroy .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes ok
test menu-15.1 {MenuNewEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-15.2 {MenuNewEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 add command -label "test3"
.m1 insert 2 command -label "test2"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-15.3 {MenuNewEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 add command -label "test2"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-15.4 {MenuNewEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.1 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 insert foo command -label "test"
} -returnCodes error -result {bad menu entry index "foo"}
test menu-16.2 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 insert test command -label "foo"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.3 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 insert -1 command -label "test"
} -returnCodes error -result {bad menu entry index "-1"}
test menu-16.4 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1 -tearoff 1
.m1 add command -label "test"
.m1 insert 0 command -label "test2"
.m1 entrycget 1 -label
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {test2}
test menu-16.5 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.6 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add checkbutton
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.7 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.8 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add radiobutton
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.9 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add separator
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.10 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add blork
} -returnCodes error -result {bad menu entry type "blork": must be cascade, checkbutton, command, radiobutton, or separator}
test menu-16.11 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-16.12 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2
.m2 clone .m3
list [.m2 add command -label "test"] [.m1 entrycget 1 -label] [.m3 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test test}
test menu-16.13 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2
.m2 clone .m3
list [.m3 add command -label "test"] [.m1 entrycget 1 -label] [.m2 entrycget 1 -label]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} test test}
test menu-16.14 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -blork
} -returnCodes error -result {unknown option "-blork"}
test menu-16.15 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "File"
@@ -3057,20 +3065,20 @@ test menu-16.15 {MenuAddOrInsert} -setup {
. configure -menu .container
list [.container add cascade -label "File" -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-16.16 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
set tearoff [tk::TearOffMenu .m2]
list [.m2 add cascade -menu .m1] [$tearoff unpost]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-16.17 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .container
@@ -3078,10 +3086,10 @@ test menu-16.17 {MenuAddOrInsert} -setup {
set tearoff [tk::TearOffMenu .container]
list [.container add cascade -label "File" -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-16.18 {MenuAddOrInsert} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .container
@@ -3089,10 +3097,10 @@ test menu-16.18 {MenuAddOrInsert} -setup {
. configure -menu .container
list [.container add cascade -label "File" -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-16.19 {MenuAddOrInsert - Insert a cascade deep into the tree} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .menubar
menu .menubar.test -tearoff 0
@@ -3105,12 +3113,12 @@ test menu-16.19 {MenuAddOrInsert - Insert a cascade deep into the tree} -setup {
[info commands .\#menubar.\#menubar\#test.\#menubar\#test\#cascade] \
[. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 .#menubar.#menubar#test.#menubar#test#cascade {}}
test menu-17.1 {MenuVarProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
catch {unset foo}
menu .m1
@@ -3118,21 +3126,21 @@ test menu-17.1 {MenuVarProc} -setup {
list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \
[unset foo]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
# menu-17.2 - Don't know how to generate the flags in the if
test menu-17.2 {MenuVarProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
catch {unset foo}
menu .m1
list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \
[set foo ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-17.3 {MenuVarProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
catch {unset foo}
menu .m1
@@ -3140,30 +3148,30 @@ test menu-17.3 {MenuVarProc} -setup {
list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \
[set foo "hello"] [unset foo]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} hello {}}
test menu-17.4 {MenuVarProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
set foo "goodbye"
list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \
[set foo "hello"] [unset foo]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} hello {}}
test menu-17.5 {MenuVarProc} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
set foo "hello"
list [.m1 add checkbutton -variable foo -onvalue hello -offvalue goodbye] \
[set foo "goodbye"] [unset foo]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} goodbye {}}
test menu-17.6 {MenuVarProc [5d991b822e]} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Want this not to crash
menu .b
@@ -3174,10 +3182,10 @@ test menu-17.6 {MenuVarProc [5d991b822e]} -setup {
}}}
unset var
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-17.7 {MenuVarProc [5d991b822e]} -setup {
- deleteWindows
+ deleteWindows
} -body {
# Want this not to duplicate traces
menu .b
@@ -3188,30 +3196,30 @@ test menu-17.7 {MenuVarProc [5d991b822e]} -setup {
}}}
unset var
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-18.1 {TkActivateMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 activate 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-18.2 {TkActivateMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 activate 0
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-18.3 {TkActivateMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
@@ -3219,10 +3227,10 @@ test menu-18.3 {TkActivateMenuEntry} -setup {
.m1 activate 1
.m1 activate 2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-18.4 {TkActivateMenuEntry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
@@ -3230,112 +3238,112 @@ test menu-18.4 {TkActivateMenuEntry} -setup {
.m1 activate 1
.m1 activate 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-19.1 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
- deleteWindows
-} -body {
+ deleteWindows
+} -body {
menu .m1 -postcommand "set menu_test menu-19.1"
.m1 add command -label "menu-19.1 - hit Escape"
list [.m1 post 40 40] [.m1 unpost] [set menu_test]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {menu-19.1 {} menu-19.1}
test menu-19.2 {TkPostCommand} -constraints nonUnixUserInteraction -setup {
- deleteWindows
-} -body {
+ deleteWindows
+} -body {
menu .m1
.m1 add command -label "menu-19.2 - hit Escape"
list [.m1 post 40 40] [.m1 unpost]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-20.1 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.2 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 normal
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.3 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 tearoff
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.4 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 menubar
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.5 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2 foo
} -returnCodes error -result {bad menu type "foo": must be normal, tearoff, or menubar}
test menu-20.6 {CloneMenu - hooking up bookeeping ptrs} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.7 {CloneMenu - hooking up bookeeping ptrs - multiple children} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 clone .m2
.m1 clone .m3
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.8 {CloneMenu - cascade entries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
.m1 clone .foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.9 {CloneMenu - cascades entries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
menu .m2
.m1 clone .foo
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-20.10 {CloneMenu - tearoff fields} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1 -tearoff 1
list [.m1 clone .m2 normal] [.m2 cget -tearoff]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} 1}
test menu-20.11 {CloneMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m2
@@ -3343,43 +3351,43 @@ test menu-20.11 {CloneMenu} -setup {
} -returnCodes error -result {window name "m2" already exists in parent}
test menu-21.1 {MenuDoYPosition} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 yposition glorp
} -returnCodes error -result {bad menu entry index "glorp"}
test menu-21.2 {MenuDoYPosition} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "Test"
.m1 yposition 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes ok -match glob -result {*}
test menu-22.1 {GetIndexFromCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 configure -tearoff 0
.m1 index @5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-22.2 {GetIndexFromCoords} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label "test"
.m1 configure -tearoff 0
.m1 index @5,5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-22.3 {GetIndexFromCoords: mapped window, y only} -setup {
- deleteWindows
+ deleteWindows
} -constraints {x11} -body {
menu .m1
.m1 add command -label "test"
@@ -3388,10 +3396,10 @@ test menu-22.3 {GetIndexFromCoords: mapped window, y only} -setup {
tkwait visibility .m1
.m1 index @5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-22.4 {GetIndexFromCoords: mapped window x,y} -setup {
- deleteWindows
+ deleteWindows
} -constraints {x11} -body {
menu .m1
.m1 add command -label "test"
@@ -3402,10 +3410,10 @@ test menu-22.4 {GetIndexFromCoords: mapped window x,y} -setup {
set x [expr {[winfo width .m1] - [.m1 cget -borderwidth] - 1}]
.m1 index @$x,5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-22.5 {GetIndexFromCoords: mapped wide window} -setup {
- deleteWindows
+ deleteWindows
} -constraints {x11} -body {
menu .m1
.m1 add command -label "test"
@@ -3417,20 +3425,20 @@ test menu-22.5 {GetIndexFromCoords: mapped wide window} -setup {
set x [expr {[winfo width .m1] - [.m1 cget -borderwidth] - 1}]
.m1 index @$x,5
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0}
test menu-23.1 {RecursivelyDeleteMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
. configure -menu .m1
. configure -menu ""
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-23.2 {RecursivelyDeleteMenu} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m2
.m2 add command -label "test2"
@@ -3439,28 +3447,28 @@ test menu-23.2 {RecursivelyDeleteMenu} -setup {
. configure -menu .m1
. configure -menu ""
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-24.1 {TkNewMenuName} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-24.2 {TkNewMenuName} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
menu .m1\#0
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-24.3 {TkNewMenuName} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .#m
rename .#m hideme
@@ -3470,33 +3478,33 @@ test menu-24.3 {TkNewMenuName} -setup {
test menu-25.1 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.2 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.3 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
destroy .m1
menu .m1
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.4 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3504,10 +3512,10 @@ test menu-25.4 {TkSetWindowMenuBar} -setup {
menu .m2
list [. configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.5 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3516,10 +3524,10 @@ test menu-25.5 {TkSetWindowMenuBar} -setup {
menu .m3
list [. configure -menu .m3] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.6 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3528,10 +3536,10 @@ test menu-25.6 {TkSetWindowMenuBar} -setup {
menu .m3
list [. configure -menu .m3] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.7 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3541,10 +3549,10 @@ test menu-25.7 {TkSetWindowMenuBar} -setup {
.t2 configure -menu .m1
list [.t2 configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.8 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3555,10 +3563,10 @@ test menu-25.8 {TkSetWindowMenuBar} -setup {
.t2 configure -menu .m1
list [. configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.9 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3570,10 +3578,10 @@ test menu-25.9 {TkSetWindowMenuBar} -setup {
wm geometry .t3 +0+0
list [.t3 configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.10 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3585,10 +3593,10 @@ test menu-25.10 {TkSetWindowMenuBar} -setup {
wm geometry .t3 +0+0
list [.t2 configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.11 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3600,57 +3608,57 @@ test menu-25.11 {TkSetWindowMenuBar} -setup {
wm geometry .t3 +0+0
list [. configure -menu .m2] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.12 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.13 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.14 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.15 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-25.16 {TkSetWindowMenuBar} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
. configure -menu .m1
list [toplevel .t2 -menu m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.t2 {}}
test menu-26.1 {DestroyMenuHashTable} -setup {
catch {interp delete testinterp}
- deleteWindows
+ deleteWindows
} -body {
interp create testinterp
load {} Tk testinterp
@@ -3661,48 +3669,48 @@ test menu-26.1 {DestroyMenuHashTable} -setup {
test menu-27.1 {GetMenuHashTable} -setup {
catch {interp delete testinterp}
- deleteWindows
+ deleteWindows
} -body {
interp create testinterp
load {} Tk testinterp
list [catch {interp eval testinterp {menu .m1}} msg] $msg [interp delete testinterp]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {0 .m1 {}}
test menu-28.1 {TkCreateMenuReferences - not there before} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m1}
test menu-28.2 {TkCreateMenuReferences - there already} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
menu .m2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.m2}
test menu-29.1 {TkFindMenuReferences - not there} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
.m1 add cascade -menu .m2
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-30.1 {TkFindMenuReferences - there already} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
@@ -3710,38 +3718,38 @@ test menu-30.1 {TkFindMenuReferences - there already} -setup {
.m1 add cascade -menu .m2
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {{} {}}
test menu-31.1 {TkFreeMenuReferences - menuPtr} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
destroy .m1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-31.2 {TkFreeMenuReferences - cascadePtr} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu ""
menu .m1
.m1 add cascade -menu .m2
.m1 entryconfigure 1 -menu .m3
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-31.3 {TkFreeMenuReferences - topLevelListPtr} -setup {
- deleteWindows
+ deleteWindows
} -body {
. configure -menu .m1
. configure -menu ""
} -cleanup {
- deleteWindows
+ deleteWindows
} -returnCodes ok -result {}
test menu-31.4 {TkFreeMenuReferences - not empty} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m3
@@ -3749,24 +3757,24 @@ test menu-31.4 {TkFreeMenuReferences - not empty} -setup {
.m2 add cascade -menu .m3
.m2 entryconfigure 1 -menu ".foo"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.1 {DeleteMenuCloneEntries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label foo
.m1 clone .m2
.m1 delete 1
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.2 {DeleteMenuCloneEntries} -setup {
- deleteWindows
+ deleteWindows
} -body {
-
+
menu .m1
.m1 add command -label one
.m1 add command -label two
@@ -3775,10 +3783,10 @@ test menu-32.2 {DeleteMenuCloneEntries} -setup {
.m1 clone .m2
.m1 delete 2 3
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.3 {DeleteMenuCloneEntries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1 -tearoff 0
.m1 add command -label one
@@ -3789,10 +3797,10 @@ test menu-32.3 {DeleteMenuCloneEntries} -setup {
.m2 configure -tearoff 1
.m1 delete 1 2
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.4 {DeleteMenuCloneEntries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label one
@@ -3803,10 +3811,10 @@ test menu-32.4 {DeleteMenuCloneEntries} -setup {
.m2 configure -tearoff 0
.m1 delete 2 3
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.5 {DeleteMenuCloneEntries} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label one
@@ -3815,29 +3823,29 @@ test menu-32.5 {DeleteMenuCloneEntries} -setup {
.m1 activate one
.m1 delete one
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.6 {DeleteMenuCloneEntries - reentrancy - crashes tk8.0} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1
.m1 add command -label test \
-command ".m1 delete test ; .m1 add command -label test -command \".m1 delete test\"; .m1 delete test"
.m1 invoke test
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.7 {DeleteMenuCloneEntries - one entry} -setup {
- deleteWindows
+ deleteWindows
} -body {
menu .m1 -tearoff 0
.m1 add command -label Hello
.m1 delete Hello
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.8 {Ensure all menu clone commands are deleted} -setup {
- deleteWindows
+ deleteWindows
} -body {
# SF bug #465324
menu .menubar
@@ -3851,11 +3859,11 @@ test menu-32.8 {Ensure all menu clone commands are deleted} -setup {
info commands .#menubar*test*
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-32.9 {Ensure deleting of clones doesn't corrupt menu refs} -setup {
set res {}
- deleteWindows
+ deleteWindows
} -body {
menu .menubar
. configure -menu .menubar
@@ -3873,12 +3881,12 @@ test menu-32.9 {Ensure deleting of clones doesn't corrupt menu refs} -setup {
lappend res [.#menubar.#menubar#test entrycget 1 -menu]
return $res
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {.menubar.cascade .#menubar.#menubar#test.#menubar#cascade .menubar.cascade .#menubar.#menubar#test.#menubar#cascade}
test menu-33.1 {menu vs command hiding} -setup {
- deleteWindows
+ deleteWindows
} -body {
set l [interp hidden]
menu .m
@@ -3896,7 +3904,7 @@ test menu-33.1 {menu vs command hiding} -setup {
test menu-34.1 {menus on multiple screens - crashes tk8.3.1, Bug 5454} -constraints {
altDisplay
} -setup {
- deleteWindows
+ deleteWindows
} -body {
toplevel .one
menu .one.m
@@ -3916,7 +3924,7 @@ test menu-35.1 {menu -underline string overruns Bug 1599877} -setup {
update
tk::TraverseToMenu . "e"
} -cleanup {
- deleteWindows
+ deleteWindows
} -result {}
test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup {
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index 0d7a049..9382974 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -76,7 +76,7 @@ test menuDraw-5.3 {TkMenuConfigureDrawOptions - no disabledFg} -setup {
menu .m1 -disabledforeground ""
} -cleanup {
deleteWindows
-} -result {.m1}
+} -result {.m1}
test menuDraw-6.1 {TkMenuConfigureEntryDrawOptions - no tkfont specified} -setup {
@@ -321,7 +321,7 @@ test menuDraw-10.4 {ComputeMenuGeometry - resize not necessary} -setup {
test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
imageCleanup
@@ -338,7 +338,7 @@ test menuDraw-11.1 {TkMenuSelectImageProc - entry selected; redraw not pending}
imageCleanup
} -result {{} {}}
test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
imageCleanup
@@ -354,7 +354,7 @@ test menuDraw-11.2 {TkMenuSelectImageProc - entry selected; redraw pending} -con
imageCleanup
} -result {{} {}}
test menuDraw-11.3 {TkMenuSelectImageProc - entry not selected} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
imageCleanup
@@ -451,7 +451,7 @@ test menuDraw.12.7 {DisplayMenu - three columns} -setup {
deleteWindows
} -result {}
test menuDraw-12.6 {Display menu - testing for extra space and menubars} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -668,7 +668,7 @@ test menuDraw-16.6 {TkPostSubMenu} -constraints {
menu .m2
.m2 add command -label "Hit ESCAPE to get rid of this menu"
set tearoff [tk::TearOffMenu .m1 40 40]
- $tearoff postcascade 0
+ $tearoff postcascade 0
} -cleanup {
deleteWindows
} -result {}
diff --git a/tests/menubut.test b/tests/menubut.test
index 4ac5d92..d245fd0 100644
--- a/tests/menubut.test
+++ b/tests/menubut.test
@@ -394,7 +394,7 @@ test menubutton-4.1 {ConfigureMenuButton procedure} -setup {
.mb1 configure -width 1i
} -cleanup {
deleteWindows
-} -returnCodes error -result {expected integer but got "1i"}
+} -returnCodes error -result {expected integer but got "1i"}
test menubutton-4.2 {ConfigureMenuButton procedure} -setup {
deleteWindows
} -body {
@@ -451,7 +451,7 @@ test menubutton-4.6 {ConfigureMenuButton procedure} -setup {
".mb1 configure -width abc"}
test menubutton-4.7 {ConfigureMenuButton procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
imageCleanup
@@ -464,7 +464,7 @@ test menubutton-4.7 {ConfigureMenuButton procedure} -constraints {
imageCleanup
} -returnCodes error -result {bad screen distance "0.5x"}
test menubutton-4.8 {ConfigureMenuButton procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
imageCleanup
@@ -499,7 +499,7 @@ test menubutton-4.10 {ConfigureMenuButton procedure - bad direction} -setup {
deleteWindows
} -body {
menubutton .mb -text "Test"
- .mb configure -direction badValue
+ .mb configure -direction badValue
} -cleanup {
deleteWindows
} -returnCodes error -result {bad direction "badValue": must be above, below, flush, left, or right}
@@ -548,7 +548,7 @@ if {[tk windowingsystem] == "aqua"} {
set extraWidth 0
}
test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -561,7 +561,7 @@ test menubutton-7.1 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result [list [expr {38 + $extraWidth}] 23]
test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -574,7 +574,7 @@ test menubutton-7.2 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result [list [expr {38 + $extraWidth}] 23]
test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -587,7 +587,7 @@ test menubutton-7.3 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result [list [expr {38 + $extraWidth}] 23]
test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
@@ -601,7 +601,7 @@ test menubutton-7.4 {ComputeMenuButtonGeometry procedure} -constraints {
imageCleanup
} -result [list [expr {48 + $extraWidth}] 23]
test menubutton-7.5 {ComputeMenuButtonGeometry procedure} -constraints {
- testImageType
+ testImageType
} -setup {
deleteWindows
image create test image1
diff --git a/tests/message.test b/tests/message.test
index b90e89c..2ca6921 100644
--- a/tests/message.test
+++ b/tests/message.test
@@ -12,8 +12,8 @@ tcltest::loadTestedCommands
eval tcltest::configure $argv
-test message-1.1 {configuration option: "anchor"} -setup {
- message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
+test message-1.1 {configuration option: "anchor"} -setup {
+ message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
update
} -body {
@@ -32,10 +32,10 @@ test message-1.2 {configuration option: "anchor"} -setup {
destroy .m
} -returnCodes {error} -result {bad anchor "bogus": must be n, ne, e, se, s, sw, w, nw, or center}
-test message-1.3 {configuration option: "aspect"} -setup {
+test message-1.3 {configuration option: "aspect"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -aspect 3
.m cget -aspect
@@ -52,10 +52,10 @@ test message-1.4 {configuration option: "aspect"} -setup {
destroy .m
} -returnCodes {error} -result {expected integer but got "bogus"}
-test message-1.5 {configuration option: "background"} -setup {
+test message-1.5 {configuration option: "background"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -background #ff0000
.m cget -background
@@ -72,10 +72,10 @@ test message-1.6 {configuration option: "background"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.7 {configuration option: "bd"} -setup {
+test message-1.7 {configuration option: "bd"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -bd 4
.m cget -bd
@@ -92,12 +92,12 @@ test message-1.8 {configuration option: "bd"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.9 {configuration option: "bg"} -setup {
+test message-1.9 {configuration option: "bg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
- .m configure -bg #ff0000
+ .m configure -bg #ff0000
.m cget -bg
} -cleanup {
destroy .m
@@ -112,10 +112,10 @@ test message-1.10 {configuration option: "bg"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.11 {configuration option: "borderwidth"} -setup {
+test message-1.11 {configuration option: "borderwidth"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -borderwidth 1.3
.m cget -borderwidth
@@ -132,10 +132,10 @@ test message-1.12 {configuration option: "borderwidth"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.13 {configuration option: "cursor"} -setup {
+test message-1.13 {configuration option: "cursor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -cursor arrow
.m cget -cursor
@@ -152,10 +152,10 @@ test message-1.14 {configuration option: "cursor"} -setup {
destroy .m
} -returnCodes {error} -result {bad cursor spec "badValue"}
-test message-1.15 {configuration option: "fg"} -setup {
+test message-1.15 {configuration option: "fg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -fg #00ff00
.m cget -fg
@@ -172,10 +172,10 @@ test message-1.16 {configuration option: "fg"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
-test message-1.17 {configuration option: "font"} -setup {
+test message-1.17 {configuration option: "font"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -font fixed
.m cget -font
@@ -192,13 +192,13 @@ test message-1.18 {configuration option: "font"} -setup {
destroy .m
} -returnCodes {error} -result {font "" doesn't exist}
-test message-1.19 {configuration option: "-foreground"} -setup {
+test message-1.19 {configuration option: "-foreground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -foreground green
- .m cget -foreground
+ .m cget -foreground
} -cleanup {
destroy .m
} -result {green}
@@ -212,10 +212,10 @@ test message-1.20 {configuration option: "-foreground"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "badValue"}
-test message-1.21 {configuration option: "highlightbackground"} -setup {
+test message-1.21 {configuration option: "highlightbackground"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightbackground #112233
.m cget -highlightbackground
@@ -232,13 +232,13 @@ test message-1.22 {configuration option: "highlightbackground"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "ugly"}
-test message-1.23 {configuration option: "highlightcolor"} -setup {
+test message-1.23 {configuration option: "highlightcolor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightcolor #123456
- .m cget -highlightcolor
+ .m cget -highlightcolor
} -cleanup {
destroy .m
} -result {#123456}
@@ -252,13 +252,13 @@ test message-1.24 {configuration option: "highlightcolor"} -setup {
destroy .m
} -returnCodes {error} -result {unknown color name "non-existent"}
-test message-1.25 {configuration option: "highlightthickness"} -setup {
+test message-1.25 {configuration option: "highlightthickness"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -highlightthickness 2
- .m cget -highlightthickness
+ .m cget -highlightthickness
} -cleanup {
destroy .m
} -result {2}
@@ -272,10 +272,10 @@ test message-1.26 {configuration option: "highlightthickness"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "badValue"}
-test message-1.27 {configuration option: "justify"} -setup {
+test message-1.27 {configuration option: "justify"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -justify right
.m cget -justify
@@ -292,13 +292,13 @@ test message-1.28 {configuration option: "justify"} -setup {
destroy .m
} -returnCodes {error} -result {bad justification "bogus": must be left, right, or center}
-test message-1.29 {configuration option: "padx"} -setup {
+test message-1.29 {configuration option: "padx"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -padx 12m
- .m cget -padx
+ .m cget -padx
} -cleanup {
destroy .m
} -result {12m}
@@ -312,10 +312,10 @@ test message-1.30 {configuration option: "padx"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
-test message-1.31 {configuration option: "pady"} -setup {
+test message-1.31 {configuration option: "pady"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -pady 12m
.m cget -pady
@@ -332,13 +332,13 @@ test message-1.32 {configuration option: "pady"} -setup {
destroy .m
} -returnCodes {error} -result {bad screen distance "420x"}
-test message-1.33 {configuration option: "relief"} -setup {
+test message-1.33 {configuration option: "relief"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -relief ridge
- .m cget -relief
+ .m cget -relief
} -cleanup {
destroy .m
} -result {ridge}
@@ -352,10 +352,10 @@ test message-1.34 {configuration option: "relief"} -setup {
destroy .m
} -returnCodes {error} -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
-test message-1.35 {configuration options: "text"} -setup {
+test message-1.35 {configuration options: "text"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -text "Sample text"
.m cget -text
@@ -363,24 +363,24 @@ test message-1.35 {configuration options: "text"} -setup {
destroy .m
} -result {Sample text}
-test message-1.36 {configuration option: "textvariable"} -setup {
+test message-1.36 {configuration option: "textvariable"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -textvariable i
- .m cget -textvariable
+ .m cget -textvariable
} -cleanup {
destroy .m
} -result {i}
-test message-1.37 {configuration option: "width"} -setup {
+test message-1.37 {configuration option: "width"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .m
- update
+ update
} -body {
.m configure -width 2
- .m cget -width
+ .m cget -width
} -cleanup {
destroy .m
} -result {2}
@@ -403,7 +403,7 @@ test message-2.2 {Tk_MessageObjCmd procedure} -body {
message foo
} -returnCodes {error} -result {bad window path name "foo"}
test message-2.3 {Tk_MessageObjCmd procedure} -body {
- catch {message foo}
+ catch {message foo}
winfo child .
} -result {}
@@ -411,15 +411,15 @@ test message-2.4 {Tk_MessageObjCmd procedure} -body {
message .s -gorp dump
} -returnCodes {error} -result {unknown option "-gorp"}
test message-2.5 {Tk_MessageObjCmd procedure} -body {
- catch {message .s -gorp dump}
+ catch {message .s -gorp dump}
winfo child .
-} -result {}
+} -result {}
test message-3.1 {MessageWidgetObjCmd procedure} -setup {
message .m
} -body {
- .m
+ .m
} -cleanup {
destroy .m
} -returnCodes error -result {wrong # args: should be ".m option ?arg ...?"}
@@ -442,7 +442,7 @@ test message-3.4 {MessageWidgetObjCmd procedure, "configure"} -setup {
message .m
} -body {
.m configure -text foobar
- lindex [.m configure -text] 4
+ lindex [.m configure -text] 4
} -cleanup {
destroy .m
} -result {foobar}
diff --git a/tests/msgbox.test b/tests/msgbox.test
index 1b84463..4a6de57 100644
--- a/tests/msgbox.test
+++ b/tests/msgbox.test
@@ -121,295 +121,295 @@ proc SendEventToMsg {parent btn type} {
# (type) x (icon).
#
test msgbox-2.1 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" -type abortretryignore
} -result {abort}
test msgbox-2.2 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon warning
} -result {abort}
test msgbox-2.3 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon error
} -result {abort}
test msgbox-2.4 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon info
} -result {abort}
test msgbox-2.5 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -icon question
} -result {abort}
test msgbox-2.6 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . abort
tk_messageBox -title Hi -message "Please press abort" \
-type abortretryignore -default abort
} -result {abort}
test msgbox-2.7 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type abortretryignore -default retry
} -result {retry}
test msgbox-2.8 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ignore
tk_messageBox -title Hi -message "Please press ignore" \
-type abortretryignore -default ignore
} -result {ignore}
test msgbox-2.9 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" -type ok
} -result {ok}
test msgbox-2.10 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon warning
} -result {ok}
test msgbox-2.11 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon error
} -result {ok}
test msgbox-2.12 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon info
} -result {ok}
test msgbox-2.13 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -icon question
} -result {ok}
test msgbox-2.14 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type ok -default ok
} -result {ok}
test msgbox-2.15 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" -type okcancel
} -result {ok}
test msgbox-2.16 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon warning
} -result {ok}
test msgbox-2.17 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon error
} -result {ok}
test msgbox-2.18 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon info
} -result {ok}
test msgbox-2.19 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -icon question
} -result {ok}
test msgbox-2.20 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . ok
tk_messageBox -title Hi -message "Please press ok" \
-type okcancel -default ok
} -result {ok}
test msgbox-2.21 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
-type okcancel -default cancel
} -result {cancel}
test msgbox-2.22 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" -type retrycancel
} -result {retry}
test msgbox-2.23 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon warning
} -result {retry}
test msgbox-2.24 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon error
} -result {retry}
test msgbox-2.25 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon info
} -result {retry}
test msgbox-2.26 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -icon question
} -result {retry}
test msgbox-2.27 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . retry
tk_messageBox -title Hi -message "Please press retry" \
-type retrycancel -default retry
} -result {retry}
test msgbox-2.28 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
-type retrycancel -default cancel
} -result {cancel}
test msgbox-2.29 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" -type yesno
} -result {yes}
test msgbox-2.30 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon warning
} -result {yes}
test msgbox-2.31 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon error
} -result {yes}
test msgbox-2.32 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon info
} -result {yes}
test msgbox-2.33 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -icon question
} -result {yes}
test msgbox-2.34 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesno -default yes
} -result {yes}
test msgbox-2.35 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . no
tk_messageBox -title Hi -message "Please press no" \
-type yesno -default no
} -result {no}
test msgbox-2.36 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" -type yesnocancel
} -result {yes}
test msgbox-2.37 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon warning
} -result {yes}
test msgbox-2.38 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon error
} -result {yes}
test msgbox-2.39 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon info
} -result {yes}
test msgbox-2.40 {tk_messageBox command -icon option} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -icon question
} -result {yes}
test msgbox-2.41 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . yes
tk_messageBox -title Hi -message "Please press yes" \
-type yesnocancel -default yes
} -result {yes}
test msgbox-2.42 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . no
tk_messageBox -title Hi -message "Please press no" \
-type yesnocancel -default no
} -result {no}
test msgbox-2.43 {tk_messageBox command} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
ChooseMsg . cancel
tk_messageBox -title Hi -message "Please press cancel" \
@@ -419,7 +419,7 @@ test msgbox-2.43 {tk_messageBox command} -constraints {
# These tests will hang your test suite if they fail.
test msgbox-3.1 {tk_messageBox handles withdrawn parent} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
wm withdraw .
ChooseMsg . "ok"
@@ -430,7 +430,7 @@ test msgbox-3.1 {tk_messageBox handles withdrawn parent} -constraints {
} -result {ok}
test msgbox-3.2 {tk_messageBox handles iconified parent} -constraints {
- nonUnixUserInteraction
+ nonUnixUserInteraction
} -body {
wm iconify .
ChooseMsg . "ok"
diff --git a/tests/option.file1 b/tests/option.file1
index 32b4a18..c5a216e 100644
--- a/tests/option.file1
+++ b/tests/option.file1
@@ -13,6 +13,6 @@ ple
*x 4: brown
# More comments, this time delimited by hash-marks.
# Comment-line with space.
-*x6:
+*x6:
*x9: \ \ \\\101\n
# comment line as last line of file.
diff --git a/tests/option.file3 b/tests/option.file3
index 146cfd9..f0b7e11 100755
--- a/tests/option.file3
+++ b/tests/option.file3
@@ -13,6 +13,6 @@ ple
*x 4: brówn
# More comments, this time delimited by hash-marks.
# Comment-line with space.
-*x6:
+*x6:
*x9: \ \ \\\101\n
# comment line as last line of file.
diff --git a/tests/option.test b/tests/option.test
index c8e29da..5e1568e 100644
--- a/tests/option.test
+++ b/tests/option.test
@@ -285,7 +285,7 @@ test option-12.6 {stack pushing/popping} -body {
# Test the major priority levels (widgetDefault, etc.)
-# Configurations for tests 13.*
+# Configurations for tests 13.*
option clear
option add $appName.op1.a 100 100
option add $appName.op1.A interactive interactive
diff --git a/tests/pack.test b/tests/pack.test
index b1c22c7..4a41516 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -1,5 +1,5 @@
-# This file is a Tcl script to test out the "pack" command
-# of Tk. It is organized in the standard fashion for Tcl tests.
+# This file is a Tcl script to test out the "pack" command of Tk. It is
+# organized in the standard fashion for Tcl tests.
#
# Copyright (c) 1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
@@ -28,7 +28,7 @@ foreach i {a b c d} {
.pack.b config -width 50 -height 30
.pack.c config -width 80 -height 80
.pack.d config -width 40 -height 30
-
+
test pack-1.1 {-side option} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -231,7 +231,6 @@ test pack-2.21 {x padding and filling} -setup {
update
list [winfo geometry .pack.a] [winfo geometry .pack.b]
} -result {280x40+5+0 300x160+0+40}
-
test pack-2.22 {x padding and filling} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -251,7 +250,6 @@ test pack-2.23 {x padding and filling} -setup {
expr {$res1 eq $res2}
} -result 1
-
test pack-3.1 {y padding and filling} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -420,7 +418,6 @@ test pack-3.21 {y padding and filling} -setup {
update
list [winfo geometry .pack.a] [winfo geometry .pack.b]
} -result {20x50+140+1 300x130+0+70}
-
test pack-3.22 {y padding and filling} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -440,7 +437,6 @@ test pack-3.23 {y padding and filling} -setup {
expr {$res1 eq $res2}
} -result 1
-
test pack-4.1 {anchors} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -505,7 +501,6 @@ test pack-4.9 {anchors} -setup {
winfo geometry .pack.a
} -result {30x70+135+65}
-
# Repeat above tests, but with a frame that isn't at (0,0), so that
# we can be sure that the frame offset is being added in correctly.
@@ -591,7 +586,6 @@ test pack-5.9 {more anchors} -setup {
winfo geometry .pack.b
} -result {60x60+160+90}
-
test pack-6.1 {-expand option} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -697,7 +691,6 @@ test pack-6.11 {-expand option} -setup {
list [winfo geometry .pack.a] [winfo geometry .pack.b] \
[winfo geometry .pack.c] [winfo geometry .pack.d]
} -result {100x200+0+0 200x100+100+0 160x100+140+100 40x100+100+100}
-
test pack-6.12 {-expand option} -setup {
toplevel .pack2 -height 400 -width 400
wm geometry .pack2 +0+0
@@ -732,7 +725,6 @@ test pack-6.13 {-expand option} -setup {
destroy .pack2
} -result {38x42+181+45 38x42+181+178 38x42+181+312}
-
wm geometry .pack {}
test pack-7.1 {requesting size for parent} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
@@ -791,7 +783,6 @@ test pack-7.7 {requesting size for parent} -setup {
list [winfo reqwidth .pack] [winfo reqheight .pack]
} -result {100 110}
-
# For the tests below, create a couple of "pad" windows to shrink
# the available space for the remaining windows. The tests have to
# be done this way rather than shrinking the whole window, because
@@ -872,7 +863,6 @@ test pack-8.9 {insufficient space} -body {
} -result {20x40+0+20 1 50x30+100+25 1 80x80+20+0 1}
pack forget .pack.right .pack.bottom
-
test pack-9.1 {window ordering} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -945,7 +935,6 @@ test pack-9.10 {window ordering} -setup {
pack slaves .pack
} -result {.pack.a .pack.c .pack.d .pack.b}
-
test pack-10.1 {retaining/clearing configuration state} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -998,7 +987,6 @@ test pack-10.6 {prevent management loops} -body {
destroy .f3
} -returnCodes error -result {can't put .f3 inside .f1, would cause management loop}
-
test pack-11.1 {info option} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -1133,7 +1121,6 @@ test pack-11.19 {info option} -setup {
lindex $i [expr [lsearch -exact $i -side]+1]
} -result right
-
test pack-12.1 {command options and errors} -body {
pack
} -returnCodes error -result {wrong # args: should be "pack option arg ?arg ...?"}
@@ -1375,7 +1362,6 @@ test pack-12.46 {command options and errors} -setup {
pack lousy .pack
} -returnCodes error -result {bad option "lousy": must be configure, forget, info, propagate, or slaves}
-
test pack-13.1 {window deletion} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d .pack.right .pack.bottom
} -body {
@@ -1389,7 +1375,6 @@ test pack-13.1 {window deletion} -setup {
[winfo geometry .pack.b] [winfo geometry .pack.c]]
} -result {{.pack.right .pack.bottom .pack.a .pack.b .pack.c} 20x40+30+0 50x30+15+40 80x80+0+70}
-
test pack-14.1 {respond to changes in expansion} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d .pack.right .pack.bottom
} -body {
@@ -1515,7 +1500,6 @@ test pack-15.5 {managing geometry with -in option} -setup {
destroy .pack.f1 .pack.f2
} -result {50x16+25+22 1 50x16+25+22 0}
-
test pack-16.1 {geometry manager name} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
set result {}
@@ -1527,7 +1511,6 @@ test pack-16.1 {geometry manager name} -setup {
lappend result [winfo manager .pack.a]
} -result {{} pack {}}
-
test pack-17.1 {PackLostSlaveProc procedure} -setup {
pack forget .pack.a .pack.b .pack.c .pack.d
} -body {
@@ -1549,13 +1532,11 @@ test pack-17.2 {PackLostSlaveProc procedure} -setup {
pack info .pack.a
} -returnCodes error -result {window ".pack.a" isn't packed}
-
test pack-18.1 {unmap slaves when master unmapped} -constraints {
tempNotPc
} -setup {
eval destroy [winfo child .pack]
} -body {
-
# adjust the position of .pack before test to avoid a screen switch
# that occurs with window managers that have desktops four times as big
# as the screen (screen switch causes scale and other tests to fail).
@@ -1585,7 +1566,6 @@ test pack-18.1 {unmap slaves when master unmapped} -constraints {
test pack-18.2 {unmap slaves when master unmapped} -setup {
eval destroy [winfo child .pack]
} -body {
-
# adjust the position of .pack before test to avoid a screen switch
# that occurs with window managers that have desktops four times as big
# as the screen (screen switch causes scale and other tests to fail).
@@ -1609,7 +1589,6 @@ test pack-18.2 {unmap slaves when master unmapped} -setup {
lappend result [winfo ismapped .pack.b]
} -result {1 0 100 30 0 1}
-
test pack-19.1 {test respect for internalborder} -setup {
catch {eval pack forget [pack slaves .pack]}
destroy .pack.l .pack.lf
@@ -1647,10 +1626,98 @@ test pack-19.2 {test support for minreqsize} -setup {
destroy .pack.l .pack.lf
} -result {162x127+0+0 172x112+0+0}
-
+test pack-20.1 {<<NoManagedChild>> fires on last pack forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1
+} -result {1}
+test pack-20.2 {<<NoManagedChild>> fires on last packed child destruction} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ update
+ bind . <<NoManagedChild>> {incr A}
+ destroy .1
+ update
+ set A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1
+} -result {1}
+test pack-20.3 {<Configure> does not fire on last pack forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ update
+ bind . <Configure> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ destroy .1
+} -result {0}
+test pack-20.4 {<<NoManagedChild>> does not fire on forelast pack forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ pack [frame .2]
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1 .2
+} -result {0}
+test pack-20.5 {<Configure> does not fire on last pack forget} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ pack [frame .2]
+ update
+ bind . <Configure> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <Configure> {}
+ destroy .1 .2
+} -result {1}
+test pack-20.6 {<<NoManagedChild>> does not fire on last pack forget if propagation is off} -setup {
+ global A
+ unset -nocomplain A
+} -body {
+ pack [frame .1]
+ pack propagate . 0
+ update
+ bind . <<NoManagedChild>> {set A 1}
+ pack forget .1
+ update
+ info exists A
+} -cleanup {
+ bind . <<NoManagedChild>> {}
+ destroy .1
+} -result {0}
+
# cleanup
cleanupTests
return
-
-
+# Local Variables:
+# mode: tcl
+# End:
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index ee184ce..ea407a0 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -498,7 +498,7 @@ test panedwindow-6.9 {sash coord subcommand, errors} -setup {
.p add [frame .p.f]
list [catch {.p sash coord -1} msg] $msg \
[catch {.p sash coord 0} msg] $msg \
- [catch {.p sash coord 1} msg] $msg
+ [catch {.p sash coord 1} msg] $msg
} -cleanup {
deleteWindows
} -result [list 1 "invalid sash index" 1 "invalid sash index" 1 "invalid sash index"]
@@ -511,7 +511,7 @@ test panedwindow-6.10 {sash coord subcommand, errors} -setup {
list [catch {.p sash coord -1} msg] $msg \
[catch {.p sash coord 0} msg] \
[catch {.p sash coord 1} msg] $msg \
- [catch {.p sash coord 2} msg] $msg
+ [catch {.p sash coord 2} msg] $msg
} -cleanup {
deleteWindows
} -result [list 1 "invalid sash index" 0 1 "invalid sash index" 1 "invalid sash index"]
@@ -622,7 +622,7 @@ test panedwindow-8.5 {sash dragto subcommand, errors} -setup {
} -cleanup {
deleteWindows
} -returnCodes error -result {expected integer but got "bar"}
-
+
test panedwindow-9.1 {sash mark/sash dragto interaction} -setup {
deleteWindows
@@ -925,7 +925,7 @@ test panedwindow-11.15 {moving sash into "virtual" space on last pane increases
} -cleanup {
deleteWindows
} -result {68 100}
-
+
test panedwindow-12.1 {horizontal panedwindow lays out widgets properly} -setup {
deleteWindows
@@ -1149,7 +1149,7 @@ test panedwindow-13.2 {PanedWindowLostSlaveProc, widget yields management} -setu
} -body {
# Check that the paned window correctly yields geometry management of
# a slave when some other geometry manager steals the slave from us.
-
+
# This test should not cause a core dump, and it should not cause a
# memory leak.
panedwindow .p
@@ -1518,9 +1518,9 @@ test panedwindow-17.1 {MoveSash, move right} -setup {
# Get the requested width of the paned window
lappend result [winfo reqwidth .p]
-
+
.p sash place 0 30 0
-
+
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqwidth .p]
@@ -1538,7 +1538,7 @@ test panedwindow-17.2 {MoveSash, move right (unmapped) clipped by reqwidth} -set
}
.p sash place 0 100 0
-
+
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
@@ -1552,13 +1552,13 @@ test panedwindow-17.3 {MoveSash, move right (mapped, width < reqwidth) clipped b
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
-
+
# Put the panedwindow up on the display and give it a width < reqwidth
place .p -x 0 -y 0 -width 32
update
.p sash place 0 100 0
-
+
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
@@ -1572,13 +1572,13 @@ test panedwindow-17.4 {MoveSash, move right (mapped, width > reqwidth) clipped b
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
-
+
# Put the panedwindow up on the display and give it a width > reqwidth
place .p -x 0 -y 0 -width 102
update
.p sash place 0 200 0
-
+
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
@@ -1594,7 +1594,7 @@ test panedwindow-17.5 {MoveSash, move right respects minsize} -setup {
}
.p sash place 0 100 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1610,7 +1610,7 @@ test panedwindow-17.6 {MoveSash, move right respects minsize} -setup {
}
.p sash place 0 100 0
-
+
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 0
} -cleanup {
@@ -1625,7 +1625,7 @@ test panedwindow-17.7 {MoveSash, move right pushes other sashes} -setup {
}
.p sash place 0 100 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
@@ -1641,7 +1641,7 @@ test panedwindow-17.8 {MoveSash, move right pushes other sashes, respects minsiz
}
.p sash place 0 100 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
@@ -1658,8 +1658,8 @@ test panedwindow-17.9 {MoveSash, move right respects minsize, exludes pad} -setu
}
.p sash place 0 100 0
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 0
} -cleanup {
@@ -1675,8 +1675,8 @@ test panedwindow-17.10 {MoveSash, move right, negative minsize becomes 0} -setup
}
.p sash place 0 50 0
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
@@ -1693,9 +1693,9 @@ test panedwindow-17.11 {MoveSash, move left} -setup {
# Get the requested width of the paned window
lappend result [winfo reqwidth .p]
-
+
.p sash place 0 10 0
-
+
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqwidth .p]
@@ -1713,7 +1713,7 @@ test panedwindow-17.12 {MoveSash, move left, can't move outside of window} -setu
}
.p sash place 0 -100 0
-
+
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
@@ -1729,7 +1729,7 @@ test panedwindow-17.13 {MoveSash, move left respects minsize} -setup {
}
.p sash place 0 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1745,7 +1745,7 @@ test panedwindow-17.14 {MoveSash, move left respects minsize} -setup {
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
@@ -1760,7 +1760,7 @@ test panedwindow-17.15 {MoveSash, move left pushes other sashes} -setup {
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1776,7 +1776,7 @@ test panedwindow-17.16 {MoveSash, move left pushes other sashes, respects minsiz
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1793,8 +1793,8 @@ test panedwindow-17.17 {MoveSash, move left respects minsize, exludes pad} -setu
}
.p sash place 1 0 0
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 1
} -cleanup {
@@ -1810,8 +1810,8 @@ test panedwindow-17.18 {MoveSash, move left, negative minsize becomes 0} -setup
}
.p sash place 1 10 0
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
@@ -1831,9 +1831,9 @@ test panedwindow-18.1 {MoveSash, move down} -setup {
# Get the requested width of the paned window
lappend result [winfo reqheight .p]
-
+
.p sash place 0 0 30
-
+
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqheight .p]
@@ -1852,7 +1852,7 @@ test panedwindow-18.2 {MoveSash, move down (unmapped) clipped by reqheight} -set
}
.p sash place 0 0 100
-
+
# Get the new sash coord; it should be clipped by the reqheight of
# the panedwindow.
.p sash coord 0
@@ -1867,13 +1867,13 @@ test panedwindow-18.3 {MoveSash, move down (mapped, height < reqheight) clipped
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
-
+
# Put the panedwindow up on the display and give it a height < reqheight
place .p -x 0 -y 0 -height 32
update
.p sash place 0 0 100
-
+
# Get the new sash coord; it should be clipped by the visible height of
# the panedwindow.
.p sash coord 0
@@ -1888,13 +1888,13 @@ test panedwindow-18.4 {MoveSash, move down (mapped, height > reqheight) clipped
foreach w {.f1 .f2} c {red blue} {
.p add [frame $w -height 20 -width 20 -bg $c] -sticky nsew
}
-
+
# Put the panedwindow up on the display and give it a width > reqwidth
place .p -x 0 -y 0 -height 102
update
.p sash place 0 0 200
-
+
# Get the new sash coord; it should be clipped by the visible width of
# the panedwindow.
.p sash coord 0
@@ -1911,7 +1911,7 @@ test panedwindow-18.5 {MoveSash, move down respects minsize} -setup {
}
.p sash place 0 0 100
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1928,7 +1928,7 @@ test panedwindow-18.6 {MoveSash, move down respects minsize} -setup {
}
.p sash place 0 0 100
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -1945,7 +1945,7 @@ test panedwindow-18.7 {MoveSash, move down pushes other sashes} -setup {
}
.p sash place 0 0 100
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
@@ -1962,7 +1962,7 @@ test panedwindow-18.8 {MoveSash, move down pushes other sashes, respects minsize
}
.p sash place 0 0 100
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 1
@@ -1980,8 +1980,8 @@ test panedwindow-18.9 {MoveSash, move down respects minsize, exludes pad} -setup
}
.p sash place 0 0 100
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 0
} -cleanup {
@@ -1998,8 +1998,8 @@ test panedwindow-18.10 {MoveSash, move right, negative minsize becomes 0} -setup
}
.p sash place 0 0 50
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
@@ -2017,9 +2017,9 @@ test panedwindow-18.11 {MoveSash, move up} -setup {
# Get the requested width of the paned window
lappend result [winfo reqheight .p]
-
+
.p sash place 0 0 10
-
+
# Get the reqwidth again, to make sure it hasn't changed
lappend result [winfo reqheight .p]
@@ -2038,7 +2038,7 @@ test panedwindow-18.12 {MoveSash, move up, can't move outside of window} -setup
}
.p sash place 0 0 -100
-
+
# Get the new sash coord; it should be clipped by the reqwidth of
# the panedwindow.
.p sash coord 0
@@ -2055,7 +2055,7 @@ test panedwindow-18.13 {MoveSash, move up respects minsize} -setup {
}
.p sash place 0 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -2072,7 +2072,7 @@ test panedwindow-18.14 {MoveSash, move up respects minsize} -setup {
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible.
.p sash coord 1
} -cleanup {
@@ -2088,7 +2088,7 @@ test panedwindow-18.15 {MoveSash, move up pushes other sashes} -setup {
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -2105,7 +2105,7 @@ test panedwindow-18.16 {MoveSash, move up pushes other sashes, respects minsize}
}
.p sash place 1 0 0
-
+
# Get the new sash coord; it should have moved as far as possible while
# respecting minsizes.
.p sash coord 0
@@ -2123,8 +2123,8 @@ test panedwindow-18.17 {MoveSash, move up respects minsize, exludes pad} -setup
}
.p sash place 1 0 0
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
.p sash coord 1
} -cleanup {
@@ -2141,8 +2141,8 @@ test panedwindow-18.18 {MoveSash, move up, negative minsize becomes 0} -setup {
}
.p sash place 1 0 10
-
- # Get the new sash coord; it should have moved as far as possible,
+
+ # Get the new sash coord; it should have moved as far as possible,
# respecting minsizes.
list [.p sash coord 0] [.p sash coord 1]
} -cleanup {
@@ -4328,7 +4328,7 @@ test panedwindow-20.2 {destroyed slave causes geometry recomputation} -setup {
} -cleanup {
deleteWindows
} -result 20
-
+
test panedwindow-21.1 {ArrangePanes, extra space is given to the last pane} -setup {
deleteWindows
diff --git a/tests/pkgconfig.test b/tests/pkgconfig.test
new file mode 100644
index 0000000..e080b91
--- /dev/null
+++ b/tests/pkgconfig.test
@@ -0,0 +1,66 @@
+# -*- tcl -*-
+# Commands covered: pkgconfig
+#
+# This file contains a collection of tests for one or more of the Tk
+# built-in commands. Sourcing this file into Tk runs the tests and
+# generates output for errors. No output means no errors were found.
+#
+# Copyright (c) 1991-1993 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 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.
+
+package require tcltest 2.2
+namespace import ::tcltest::*
+eval tcltest::configure $argv
+tcltest::loadTestedCommands
+
+test pkgconfig-1.1 {query keys} nonwin {
+ lsort [::tk::pkgconfig list]
+} [list \
+ 64bit bindir,install bindir,runtime debug demodir,install demodir,runtime \
+ docdir,install docdir,runtime fontsystem includedir,install includedir,runtime \
+ libdir,install libdir,runtime mem_debug optimized profiled \
+ scriptdir,install scriptdir,runtime threaded \
+]
+test pkgconfig-1.2 {query keys multiple times} {
+ string compare [::tk::pkgconfig list] [::tk::pkgconfig list]
+} 0
+test pkgconfig-1.3 {query value multiple times} {
+ string compare \
+ [::tk::pkgconfig get 64bit] \
+ [::tk::pkgconfig get 64bit]
+} 0
+
+
+test pkgconfig-2.0 {error: missing subcommand} {
+ catch {::tk::pkgconfig} msg
+ set msg
+} {wrong # args: should be "::tk::pkgconfig subcommand ?arg?"}
+test pkgconfig-2.1 {error: illegal subcommand} {
+ catch {::tk::pkgconfig foo} msg
+ set msg
+} {bad subcommand "foo": must be get or list}
+test pkgconfig-2.2 {error: list with arguments} {
+ catch {::tk::pkgconfig list foo} msg
+ set msg
+} {wrong # args: should be "::tk::pkgconfig list"}
+test pkgconfig-2.3 {error: get without arguments} {
+ catch {::tk::pkgconfig get} msg
+ set msg
+} {wrong # args: should be "::tk::pkgconfig get key"}
+test pkgconfig-2.4 {error: query unknown key} {
+ catch {::tk::pkgconfig get foo} msg
+ set msg
+} {key not known}
+test pkgconfig-2.5 {error: query with to many arguments} {
+ catch {::tk::pkgconfig get foo bar} msg
+ set msg
+} {wrong # args: should be "::tk::pkgconfig subcommand ?arg?"}
+
+# cleanup
+cleanupTests
+return
diff --git a/tests/place.test b/tests/place.test
index 62e0ed2..e04ee0a 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -415,7 +415,7 @@ test place-10.4 {ConfigureSlave} -setup {
} -cleanup {
destroy .foo
} -returnCodes error -result {value for "-y" missing}
-
+
test place-11.1 {PlaceObjCmd, slaves command} -setup {
destroy .foo
diff --git a/tests/safe.test b/tests/safe.test
index 475d938..4f0ce15 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -28,19 +28,39 @@ namespace import -force tcltest::test
# This probably means that tk wasn't installed properly.
## it indicates that something went wrong sourcing tk.tcl.
-## Ensure that any changes that occured to tk.tcl will work or are properly
+## Ensure that any changes that occurred to tk.tcl will work or are properly
## prevented in a safe interpreter. -- hobbs
# The set of hidden commands is platform dependent:
-set hidden_cmds {bell cd clipboard encoding exec exit fconfigure glob grab load menu open pwd selection socket source tcl:encoding:dirs toplevel unload wm}
+set hidden_cmds {bell cd clipboard encoding exec exit fconfigure}
lappend hidden_cmds {*}[apply {{} {
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ lappend result file
+ }
+ lappend result glob grab load menu open pwd selection socket source tcl:encoding:dirs
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ lappend result tcl:encoding:system
+ }
+ lappend result toplevel unload wm
foreach cmd {
atime attributes copy delete dirname executable exists extension
isdirectory isfile link lstat mkdir mtime nativename normalize owned
- readable readlink rename rootname size stat tail tempfile type
+ readable readlink rename rootname size stat tail tempdir tempfile type
volumes writable
- } {lappend result tcl:file:$cmd}; return $result
+ } {lappend result tcl:file:$cmd}
+ if {[package vsatisfies [package provide Tcl] 8.7-]} {
+ foreach cmd {
+ cmdtype nameofexecutable
+ } {lappend result tcl:info:$cmd}
+ foreach cmd {
+ autopurge list purge status
+ } {lappend result tcl:process:$cmd}
+ foreach cmd {
+ lmkimg lmkzip mkimg mkkey mkzip mount mount_data unmount
+ } {lappend result tcl:zipfs:$cmd}
+ }
+ return $result
}}]
if {[tk windowingsystem] ne "x11"} {
lappend hidden_cmds tk_chooseColor tk_chooseDirectory tk_getOpenFile \
diff --git a/tests/scale.test b/tests/scale.test
index 38c3e9a..34f2cd9 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -324,7 +324,7 @@ test scale-2.1 {Tk_ScaleCmd procedure} -body {
scale
} -returnCodes error -result {wrong # args: should be "scale pathName ?-option value ...?"}
test scale-2.2 {Tk_ScaleCmd procedure} -body {
- scale foo
+ scale foo
} -returnCodes error -result {bad window path name "foo"}
test scale-2.3 {Tk_ScaleCmd procedure} -body {
catch {scale foo}
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 8966f1f..701aa26 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -23,7 +23,7 @@ proc getTroughSize {w} {
return [expr {[winfo height $w] - 2*[testmetrics cyvscroll $w]}]
} else {
return [expr {[winfo width $w] - 2*[testmetrics cxhscroll $w]}]
- }
+ }
} else {
if {[tk windowingsystem] eq "x11"} {
# Calculations here assume that the arrow area is a square.
@@ -60,7 +60,7 @@ proc getTroughSize {w} {
foreach {width height} [wm minsize .] {
set height [expr {($height < 200) ? 200 : $height}]
set width [expr {($width < 1) ? 1 : $width}]
-}
+}
frame .f -height $height -width $width
pack .f -side left
@@ -380,15 +380,15 @@ test scrollbar-3.59 {ScrollbarWidgetCmd procedure, "set" option} {
set result
} {0.0 0.3}
test scrollbar-3.60 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set 1.1 .4
+ .s set 1.1 .4
.s get
} {1.0 1.0}
test scrollbar-3.61 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set .5 -.3
+ .s set .5 -.3
.s get
} {0.5 0.5}
test scrollbar-3.62 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set .5 87
+ .s set .5 87
.s get
} {0.5 1.0}
test scrollbar-3.63 {ScrollbarWidgetCmd procedure, "set" option} {
@@ -412,23 +412,23 @@ test scrollbar-3.67 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3 jkl} msg] $msg
} {1 {expected integer but got "jkl"}}
test scrollbar-3.68 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set -10 50 20 30
+ .s set -10 50 20 30
.s get
} {0 50 0 0}
test scrollbar-3.69 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set 100 -10 20 30
+ .s set 100 -10 20 30
.s get
} {100 0 20 30}
test scrollbar-3.70 {ScrollbarWidgetCmd procedure, "set" option} {
- .s set 100 50 30 20
+ .s set 100 50 30 20
.s get
} {100 50 30 30}
test scrollbar-3.71 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3} msg] $msg
-} {1 {wrong # args: should be ".s set firstFraction lastFraction" or ".s set totalUnits windowUnits firstUnit lastUnit"}}
+} {1 {wrong # args: should be ".s set firstFraction lastFraction"}}
test scrollbar-3.72 {ScrollbarWidgetCmd procedure, "set" option} {
list [catch {.s set 1 2 3 4 5} msg] $msg
-} {1 {wrong # args: should be ".s set firstFraction lastFraction" or ".s set totalUnits windowUnits firstUnit lastUnit"}}
+} {1 {wrong # args: should be ".s set firstFraction lastFraction"}}
test scrollbar-3.73 {ScrollbarWidgetCmd procedure} {
list [catch {.s bogus} msg] $msg
} {1 {bad option "bogus": must be activate, cget, configure, delta, fraction, get, identify, or set}}
@@ -499,7 +499,7 @@ test scrollbar-6.12.2 {ScrollbarPosition procedure} aqua {
.s identify 8 19
} {trough1}
test scrollbar-6.14 {ScrollbarPosition procedure} win {
- .s identify [expr {[winfo width .s] / 2}] 0
+ .s identify [expr {[winfo width .s] / 2}] 0
} {arrow1}
test scrollbar-6.15 {ScrollbarPosition procedure} {testmetrics win} {
.s identify [expr {[winfo width .s] / 2}] [expr {[testmetrics cyvscroll .s] - 1}]
@@ -610,7 +610,7 @@ test scrollbar-6.41.2 {ScrollbarPosition procedure} aqua {
} {trough2}
test scrollbar-6.43 {ScrollbarPosition procedure} {testmetrics win} {
.t.s identify [expr {int(.4 / [.t.s delta 1 0]) + [testmetrics cxhscroll .t.s]
- - 1}] [expr {[winfo height .t.s] / 2}]
+ - 1}] [expr {[winfo height .t.s] / 2}]
} {slider}
test scrollbar-6.44 {ScrollbarPosition procedure} unix {
.t.s identify 100 18
@@ -759,7 +759,7 @@ test scrollbar-11.1 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destructi
update ; # shall not trigger error invalid command name ".top.s"
} -cleanup {
destroy .top.s .top
-} -result {}
+} -result {}
test scrollbar-11.2 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destruction} -body {
proc destroy_scrollbar {{y 0}} {
if {[winfo exists .top.s]} {
@@ -778,7 +778,7 @@ test scrollbar-11.2 {bug fix: [011706ec42] Scrollbar unsafe wrt widget destructi
update ; # shall not trigger error invalid command name ".top.s"
} -cleanup {
destroy .top.s .top
-} -result {}
+} -result {}
catch {destroy .s}
catch {destroy .t}
diff --git a/tests/select.test b/tests/select.test
index f89a736..9146397 100644
--- a/tests/select.test
+++ b/tests/select.test
@@ -952,7 +952,7 @@ test select-9.5 {SelCvtToX and SelCvtFromX procedures} -setup {
# most control paths have been exercised above
test select-10.1 {ConvertSelection procedure, race with selection clear} -constraints {
- x11
+ x11
} -setup {
setup
} -body {
@@ -1021,7 +1021,7 @@ test select-10.4 {ConvertSelection procedure} -constraints {
lappend result $selInfo
} -result {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}}
test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints {
- x11
+ x11
} -setup {
setup
setupbg
@@ -1036,7 +1036,7 @@ test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints {
lappend result $selInfo
} -result {{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 STRING 0 4000}}
test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints {
- x11
+ x11
} -setup {
setup
setupbg
@@ -1131,7 +1131,7 @@ test select-12.6 {DefaultSelection procedure} -body {
} -result {{Targets value} {TARGETS.f1 0 4000} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}}
test select-13.1 {SelectionSize procedure, handler deleted} -constraints {
- x11
+ x11
} -setup {
setup
setupbg
diff --git a/tests/spinbox.test b/tests/spinbox.test
index ea29f60..2d03cf1 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -16,7 +16,7 @@ proc scroll args {
global scrollInfo
set scrollInfo $args
}
-# For trace variable
+# For trace variable
proc override args {
global x
set x 12345
@@ -1017,7 +1017,7 @@ test spinbox-2.5 {Tk_SpinboxCmd procedure} -body {
test spinbox-3.1 {SpinboxWidgetCmd procedure} -setup {
- spinbox .e
+ spinbox .e
pack .e
update
} -body {
@@ -1026,7 +1026,7 @@ test spinbox-3.1 {SpinboxWidgetCmd procedure} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e option ?arg ...?"}
test spinbox-3.2 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1035,7 +1035,7 @@ test spinbox-3.2 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test spinbox-3.3 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1044,7 +1044,7 @@ test spinbox-3.3 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test spinbox-3.4 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
- spinbox .e
+ spinbox .e
pack .e
update
} -body {
@@ -1053,7 +1053,7 @@ test spinbox-3.4 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -returnCodes error -result {bad spinbox index "bogus"}
test spinbox-3.5 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1062,7 +1062,7 @@ test spinbox-3.5 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
destroy .e
} -result [list 5 5 0 $cy]
-# Oryginaly the result was count using measurements
+# Oryginaly the result was count using measurements
# and metrics. It was changed to less verbose solution - the result is the one
# that passes fonts constraint (this concerns tests 3.6, 3.7, 3.8, 3.10)
test spinbox-3.6 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
@@ -1081,7 +1081,7 @@ test spinbox-3.6 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraint
test spinbox-3.7 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1094,7 +1094,7 @@ test spinbox-3.7 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraint
test spinbox-3.8 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1105,7 +1105,7 @@ test spinbox-3.8 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraint
destroy .e
} -result {31 5 7 13}
test spinbox-3.9 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1117,7 +1117,7 @@ test spinbox-3.9 {SpinboxWidgetCmd procedure, "bbox" widget command} -setup {
test spinbox-3.10 {SpinboxWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1127,28 +1127,28 @@ test spinbox-3.10 {SpinboxWidgetCmd procedure, "bbox" widget command} -constrain
destroy .e
} -result {{5 5 7 13} {12 5 7 13} {75 5 12 13} {122 5 7 13}}
test spinbox-3.11 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e cget
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test spinbox-3.12 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e cget a b
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e cget option"}
test spinbox-3.13 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e cget -gorp
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-gorp"}
test spinbox-3.14 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e configure -bd 4
.e cget -bd
@@ -1156,23 +1156,23 @@ test spinbox-3.14 {SpinboxWidgetCmd procedure, "cget" widget command} -setup {
destroy .e
} -result {4}
test spinbox-3.15 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
- spinbox .e
+ spinbox .e
pack .e
update
} -body {
llength [.e configure]
} -cleanup {
destroy .e
-} -result {49}
+} -result {51}
test spinbox-3.16 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e configure -foo
} -cleanup {
destroy .e
} -returnCodes error -result {unknown option "-foo"}
test spinbox-3.17 {SpinboxWidgetCmd procedure, "configure" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e configure -bd 4
.e configure -bg #ffffff
@@ -1181,28 +1181,28 @@ test spinbox-3.17 {SpinboxWidgetCmd procedure, "configure" widget command} -setu
destroy .e
} -result {4}
test spinbox-3.18 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e delete
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test spinbox-3.19 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e delete a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e delete firstIndex ?lastIndex?"}
test spinbox-3.20 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e delete foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.21 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e delete 0 bar
} -cleanup {
@@ -1211,7 +1211,7 @@ test spinbox-3.21 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
test spinbox-3.22 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e delete 2 4
@@ -1220,7 +1220,7 @@ test spinbox-3.22 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
destroy .e
} -result {014567890}
test spinbox-3.23 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert end "01234567890"
.e delete 6
@@ -1231,7 +1231,7 @@ test spinbox-3.23 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
test spinbox-3.24 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
- update
+ update
set x {}
} -body {
# UTF
@@ -1252,7 +1252,7 @@ test spinbox-3.24 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
test spinbox-3.25 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e delete 6 5
@@ -1263,7 +1263,7 @@ test spinbox-3.25 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
test spinbox-3.26 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state disabled
@@ -1276,7 +1276,7 @@ test spinbox-3.26 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
test spinbox-3.26.1 {SpinboxWidgetCmd procedure, "delete" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state readonly
@@ -1287,28 +1287,28 @@ test spinbox-3.26.1 {SpinboxWidgetCmd procedure, "delete" widget command} -setup
destroy .e
} -result {01234567890}
test spinbox-3.27 {SpinboxWidgetCmd procedure, "get" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e get foo
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e get"}
test spinbox-3.28 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e icursor
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e icursor pos"}
test spinbox-3.29 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e icursor foo
} -cleanup {
destroy .e
} -returnCodes error -result {bad spinbox index "foo"}
test spinbox-3.30 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert end "01234567890"
.e icursor 4
@@ -1317,21 +1317,21 @@ test spinbox-3.30 {SpinboxWidgetCmd procedure, "icursor" widget command} -setup
destroy .e
} -result {4}
test spinbox-3.31 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e in
} -cleanup {
destroy .e
} -returnCodes error -result {ambiguous option "in": must be bbox, cget, configure, delete, get, icursor, identify, index, insert, invoke, scan, selection, set, validate, or xview}
test spinbox-3.32 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e index
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e index string"}
test spinbox-3.33 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e index foo
} -cleanup {
@@ -1340,7 +1340,7 @@ test spinbox-3.33 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
test spinbox-3.34 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e index 0
} -cleanup {
@@ -1349,7 +1349,7 @@ test spinbox-3.34 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
test spinbox-3.35 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
# UTF
.e insert 0 abc\u4e4e\u0153def
@@ -1358,21 +1358,21 @@ test spinbox-3.35 {SpinboxWidgetCmd procedure, "index" widget command} -setup {
destroy .e
} -result {3 4 8}
test spinbox-3.36 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert a
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.37 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.38 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert foo Text
} -cleanup {
@@ -1381,7 +1381,7 @@ test spinbox-3.38 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
test spinbox-3.39 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e insert 3 xxx
@@ -1392,7 +1392,7 @@ test spinbox-3.39 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
test spinbox-3.40 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state disabled
@@ -1405,7 +1405,7 @@ test spinbox-3.40 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
test spinbox-3.40.1 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "01234567890"
.e configure -state readonly
@@ -1416,14 +1416,14 @@ test spinbox-3.40.1 {SpinboxWidgetCmd procedure, "insert" widget command} -setup
destroy .e
} -result {01234567890}
test spinbox-3.41 {SpinboxWidgetCmd procedure, "insert" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert a b c
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test spinbox-3.42 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
- spinbox .e
+ spinbox .e
pack .e
update
} -body {
@@ -1434,7 +1434,7 @@ test spinbox-3.42 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
test spinbox-3.43 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e scan a b c
} -cleanup {
@@ -1443,7 +1443,7 @@ test spinbox-3.43 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
test spinbox-3.44 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e scan foobar 20
} -cleanup {
@@ -1452,7 +1452,7 @@ test spinbox-3.44 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
test spinbox-3.45 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e scan mark 20.1
} -cleanup {
@@ -1463,7 +1463,7 @@ test spinbox-3.45 {SpinboxWidgetCmd procedure, "scan" widget command} -setup {
test spinbox-3.46 {SpinboxWidgetCmd procedure, "scan" widget command} -constraints {
fonts
} -setup {
- spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1476,14 +1476,14 @@ test spinbox-3.46 {SpinboxWidgetCmd procedure, "scan" widget command} -constrain
destroy .e
} -result {2}
test spinbox-3.47 {SpinboxWidgetCmd procedure, "select" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e select
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection option ?index?"}
test spinbox-3.48 {SpinboxWidgetCmd procedure, "select" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e select foo
} -cleanup {
@@ -1491,28 +1491,28 @@ test spinbox-3.48 {SpinboxWidgetCmd procedure, "select" widget command} -setup {
} -returnCodes error -result {bad selection option "foo": must be adjust, clear, element, from, present, range, or to}
test spinbox-3.49 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e select clear gorp
} -cleanup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e selection clear"}
test spinbox-3.50 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 4
update
.e select clear
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test spinbox-3.50.1 {SpinboxWidgetCmd procedure, "select clear" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end "0123456789"
.e select from 1
@@ -1526,7 +1526,7 @@ test spinbox-3.50.1 {SpinboxWidgetCmd procedure, "select clear" widget command}
} -result {.e}
test spinbox-3.51 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
- spinbox .e
+ spinbox .e
} -body {
.e selection present foo
} -cleanup {
@@ -1535,7 +1535,7 @@ test spinbox-3.51 {SpinboxWidgetCmd procedure, "selection present" widget comman
test spinbox-3.52 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1547,7 +1547,7 @@ test spinbox-3.52 {SpinboxWidgetCmd procedure, "selection present" widget comman
test spinbox-3.53 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1560,7 +1560,7 @@ test spinbox-3.53 {SpinboxWidgetCmd procedure, "selection present" widget comman
test spinbox-3.54 {SpinboxWidgetCmd procedure, "selection present" widget command} -setup {
spinbox .e
pack .e
- update
+ update
} -body {
.e insert end 0123456789
.e select from 3
@@ -1699,7 +1699,7 @@ test spinbox-3.64.2 {SpinboxWidgetCmd procedure, "selection" widget command} -se
} -result {2 4}
test spinbox-3.65 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1711,7 +1711,7 @@ test spinbox-3.65 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.053763 0.268817}
test spinbox-3.66 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1720,7 +1720,7 @@ test spinbox-3.66 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {bad spinbox index "gorp"}
test spinbox-3.67 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1734,7 +1734,7 @@ test spinbox-3.67 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.107527 0.322581}
test spinbox-3.68 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1743,7 +1743,7 @@ test spinbox-3.68 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"}
test spinbox-3.69 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1752,7 +1752,7 @@ test spinbox-3.69 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {expected floating-point number but got "foo"}
test spinbox-3.70 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1764,7 +1764,7 @@ test spinbox-3.70 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.505376 0.720430}
test spinbox-3.71 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1773,9 +1773,9 @@ test spinbox-3.71 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 24
} -cleanup {
destroy .e
-} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
+} -returnCodes error -result {wrong # args: should be ".e xview scroll number pages|units"}
test spinbox-3.72 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1786,7 +1786,7 @@ test spinbox-3.72 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {expected integer but got "gorp"}
test spinbox-3.73 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1799,7 +1799,7 @@ test spinbox-3.73 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.193548 0.408602}
test spinbox-3.74 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1813,7 +1813,7 @@ test spinbox-3.74 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0.397849 0.612903}
test spinbox-3.75 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1821,13 +1821,13 @@ test spinbox-3.75 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview 30
update
- .e xview scroll 2 units
+ .e xview scroll 2 units
.e index @0
} -cleanup {
destroy .e
} -result {32}
test spinbox-3.76 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1835,13 +1835,13 @@ test spinbox-3.76 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview 30
update
- .e xview scroll -1 units
+ .e xview scroll -1 units
.e index @0
} -cleanup {
destroy .e
} -result {29}
test spinbox-3.77 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1850,9 +1850,9 @@ test spinbox-3.77 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
.e xview scroll 23 foobars
} -cleanup {
destroy .e
-} -returnCodes error -result {bad argument "foobars": must be units or pages}
+} -returnCodes error -result {bad argument "foobars": must be pages or units}
test spinbox-3.78 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1863,7 +1863,7 @@ test spinbox-3.78 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -returnCodes error -result {unknown option "eat": must be moveto or scroll}
test spinbox-3.79 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1877,7 +1877,7 @@ test spinbox-3.79 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {0}
test spinbox-3.80 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1889,7 +1889,7 @@ test spinbox-3.80 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
destroy .e
} -result {73}
test spinbox-3.81 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1911,7 +1911,7 @@ test spinbox-3.81 {SpinboxWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.095745 0.106383 0.117021}
test spinbox-3.82 {SpinboxWidgetCmd procedure} -setup {
- spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
update
} -body {
@@ -1982,14 +1982,14 @@ test spinbox-5.5 {ConfigureSpinbox procedure} -setup {
destroy .e1 .e2
} -result {{This is so} {This is so} 1234}
test spinbox-5.6 {ConfigureSpinbox procedure} -setup {
- spinbox .e
+ spinbox .e
pack .e
} -body {
.e insert end "0123456789"
.e select from 1
.e select to 5
.e configure -exportselection 0
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
@@ -2001,14 +2001,14 @@ test spinbox-5.6.1 {ConfigureSpinbox procedure} -setup {
.e select from 1
.e select to 5
.e configure -exportselection 0
- catch {selection get}
+ catch {selection get}
list [.e index sel.first] [.e index sel.last]
} -cleanup {
destroy .e
} -result {1 5}
test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
- spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
+ spinbox .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
@@ -2025,7 +2025,7 @@ test spinbox-5.7 {ConfigureSpinbox procedure} -setup {
test spinbox-5.8 {ConfigureSpinbox procedure} -constraints {
fonts
} -setup {
- spinbox .e -borderwidth 2 -highlightthickness 2
+ spinbox .e -borderwidth 2 -highlightthickness 2
pack .e
} -body {
.e configure -width 0 -font {Helvetica -12}
@@ -2074,13 +2074,28 @@ test spinbox-5.11 {ConfigureSpinbox procedure} -setup {
} -cleanup {
destroy .e
} -result {}
+test spinbox-5.12 {ConfigureSpinbox procedure, -from and -to swapping} -setup {
+ spinbox .e
+} -body {
+ # this statement used to trigger error "-to value must be greater than -from value"
+ # because default value for -to is zero (bug [841280ffff])
+ set res [catch {.e configure -from 10}]
+ .e configure -from 1971 -to 2016 ; # standard case
+ lappend res [.e cget -from] [.e cget -to]
+ .e configure -from 2016 -to 1971 ; # auto-swapping happens
+ lappend res [.e cget -from] [.e cget -to]
+ .e configure -to 1971 -from 2016 ; # auto-swapping, order of options does not matter
+ lappend res [.e cget -from] [.e cget -to]
+} -cleanup {
+ destroy .e
+} -result {0 1971.0 2016.0 1971.0 2016.0 1971.0 2016.0}
# No tests for DisplaySpinbox.
test spinbox-6.1 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
- spinbox .e
+ spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -highlightthickness 3
@@ -2093,7 +2108,7 @@ test spinbox-6.1 {SpinboxComputeGeometry procedure} -constraints {
test spinbox-6.2 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
- spinbox .e
+ spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify center \
@@ -2107,7 +2122,7 @@ test spinbox-6.2 {SpinboxComputeGeometry procedure} -constraints {
test spinbox-6.3 {SpinboxComputeGeometry procedure} -constraints {
fonts
} -setup {
- spinbox .e
+ spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 -justify right \
@@ -2119,7 +2134,7 @@ test spinbox-6.3 {SpinboxComputeGeometry procedure} -constraints {
destroy .e
} -result {3 4}
test spinbox-6.4 {SpinboxComputeGeometry procedure} -setup {
- spinbox .e
+ spinbox .e
pack .e
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
@@ -2134,7 +2149,7 @@ test spinbox-6.5 {SpinboxComputeGeometry procedure} -setup {
spinbox .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Courier -12} -bd 2 -relief raised -width 5
+ .e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
update
.e xview 7
@@ -2148,7 +2163,7 @@ test spinbox-6.6 {SpinboxComputeGeometry procedure} -constraints {
spinbox .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Courier -12} -bd 2 -relief raised -width 10
+ .e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e insert end "01234\t67890"
update
.e xview 3
@@ -2188,7 +2203,7 @@ test spinbox-6.9 {SpinboxComputeGeometry procedure} -constraints {
spinbox .e -highlightthickness 2
pack .e
} -body {
- .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
+ .e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
update
list [winfo reqwidth .e] [winfo reqheight .e]
} -cleanup {
@@ -2197,7 +2212,7 @@ test spinbox-6.9 {SpinboxComputeGeometry procedure} -constraints {
test spinbox-7.1 {InsertChars procedure} -setup {
- unset -nocomplain contents
+ unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
@@ -2214,8 +2229,8 @@ test spinbox-7.1 {InsertChars procedure} -setup {
} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test spinbox-7.2 {InsertChars procedure} -setup {
- unset -nocomplain contents
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ unset -nocomplain contents
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2286,7 +2301,7 @@ test spinbox-7.6 {InsertChars procedure} -setup {
destroy .e
} -result {2 6 2 5}
test spinbox-7.7 {InsertChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -xscrollcommand scroll
@@ -2298,7 +2313,7 @@ test spinbox-7.7 {InsertChars procedure} -setup {
destroy .e
} -result {7}
test spinbox-7.8 {InsertChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789
@@ -2309,7 +2324,7 @@ test spinbox-7.8 {InsertChars procedure} -setup {
destroy .e
} -result {4}
test spinbox-7.9 {InsertChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
@@ -2321,7 +2336,7 @@ test spinbox-7.9 {InsertChars procedure} -setup {
destroy .e
} -result {7}
test spinbox-7.10 {InsertChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "This is a very long string"
@@ -2336,7 +2351,7 @@ test spinbox-7.10 {InsertChars procedure} -setup {
test spinbox-7.11 {InsertChars procedure} -constraints {
fonts
} -setup {
- spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 "xyzzy"
@@ -2348,8 +2363,8 @@ test spinbox-7.11 {InsertChars procedure} -constraints {
} -result {70}
test spinbox-8.1 {DeleteChars procedure} -setup {
- unset -nocomplain contents
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ unset -nocomplain contents
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2364,8 +2379,8 @@ test spinbox-8.1 {DeleteChars procedure} -setup {
after cancel $timeout
} -result {abe abe {0.000000 1.000000}}
test spinbox-8.2 {DeleteChars procedure} -setup {
- unset -nocomplain contents
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ unset -nocomplain contents
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2380,8 +2395,8 @@ test spinbox-8.2 {DeleteChars procedure} -setup {
after cancel $timeout
} -result {cde cde {0.000000 1.000000}}
test spinbox-8.3 {DeleteChars procedure} -setup {
- unset -nocomplain contents
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ unset -nocomplain contents
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2396,7 +2411,7 @@ test spinbox-8.3 {DeleteChars procedure} -setup {
after cancel $timeout
} -result {abc abc {0.000000 1.000000}}
test spinbox-8.4 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2412,7 +2427,7 @@ test spinbox-8.4 {DeleteChars procedure} -setup {
destroy .e
} -result {1 6 1 5}
test spinbox-8.5 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2428,7 +2443,7 @@ test spinbox-8.5 {DeleteChars procedure} -setup {
destroy .e
} -result {1 5 1 4}
test spinbox-8.6 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2444,7 +2459,7 @@ test spinbox-8.6 {DeleteChars procedure} -setup {
destroy .e
} -result {1 2 1 5}
test spinbox-8.7 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2458,7 +2473,7 @@ test spinbox-8.7 {DeleteChars procedure} -setup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-8.8 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2474,7 +2489,7 @@ test spinbox-8.8 {DeleteChars procedure} -setup {
destroy .e
} -result {3 4 3 8}
test spinbox-8.9 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e insert 0 0123456789abcde
@@ -2487,7 +2502,7 @@ test spinbox-8.9 {DeleteChars procedure} -setup {
destroy .e
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-8.10 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2503,7 +2518,7 @@ test spinbox-8.10 {DeleteChars procedure} -setup {
destroy .e
} -result {3 5 5 8}
test spinbox-8.11 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2519,7 +2534,7 @@ test spinbox-8.11 {DeleteChars procedure} -setup {
destroy .e
} -result {3 8 4 8}
test spinbox-8.12 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2532,7 +2547,7 @@ test spinbox-8.12 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test spinbox-8.13 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2545,7 +2560,7 @@ test spinbox-8.13 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test spinbox-8.14 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2558,7 +2573,7 @@ test spinbox-8.14 {DeleteChars procedure} -setup {
destroy .e
} -result {4}
test spinbox-8.15 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2571,7 +2586,7 @@ test spinbox-8.15 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test spinbox-8.16 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2584,7 +2599,7 @@ test spinbox-8.16 {DeleteChars procedure} -setup {
destroy .e
} -result {1}
test spinbox-8.17 {DeleteChars procedure} -setup {
- spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
@@ -2597,17 +2612,32 @@ test spinbox-8.17 {DeleteChars procedure} -setup {
destroy .e
} -result {4}
test spinbox-8.18 {DeleteChars procedure} -setup {
- spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
+ spinbox .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
focus .e
} -body {
.e insert 0 "xyzzy"
update
.e delete 2 4
- winfo reqwidth .e
-} -cleanup {
- destroy .e
-} -result {42}
+ # To check that deletion actually happened we measure the new width
+ # of the widget, based on the measuring width of the remaining text ("xyy")
+ # in the widget. For that purpose we have to mirror the code in tkEntry.c
+ # for computation of the reqwidth
+ # note: XPAD corresponds to the hardcoded #define XPAD 1
+ set XPAD 1
+ set buttonWidth [expr { [font measure [.e cget -font] "0"] + 2 * (1 + $XPAD) }]
+ if {$buttonWidth < 11} {
+ set buttonWidth 11
+ }
+ set expected [expr { [font measure [.e cget -font] "xyy"] \
+ + 2 * ( [.e cget -borderwidth] + \
+ [.e cget -highlightthickness] + $XPAD ) \
+ + $buttonWidth } ]
+ expr {[winfo reqwidth .e] == $expected}
+} -cleanup {
+ destroy .e
+ unset XPAD buttonWidth expected
+} -result {1}
test spinbox-9.1 {SpinboxValueChanged procedure} -setup {
unset -nocomplain x
@@ -2627,7 +2657,7 @@ test spinbox-10.1 {SpinboxSetValue procedure} -constraints fonts -body {
set y ab
spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0
pack .e
- .e configure -textvariable x
+ .e configure -textvariable x
.e configure -textvariable y
update
list [.e get] [winfo reqwidth .e]
@@ -2636,7 +2666,7 @@ test spinbox-10.1 {SpinboxSetValue procedure} -constraints fonts -body {
} -result {ab 35}
test spinbox-10.2 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
- spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2649,7 +2679,7 @@ test spinbox-10.2 {SpinboxSetValue procedure, updating selection} -setup {
} -returnCodes error -result {selection isn't in widget .e}
test spinbox-10.3 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
- spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2662,7 +2692,7 @@ test spinbox-10.3 {SpinboxSetValue procedure, updating selection} -setup {
} -result {4 7}
test spinbox-10.4 {SpinboxSetValue procedure, updating selection} -setup {
unset -nocomplain x
- spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
+ spinbox .e -font {Helvetica -12} -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -textvariable x
@@ -2675,7 +2705,7 @@ test spinbox-10.4 {SpinboxSetValue procedure, updating selection} -setup {
} -result {4 10}
test spinbox-10.5 {SpinboxSetValue procedure, updating display position} -setup {
unset -nocomplain x
- spinbox .e -highlightthickness 2 -bd 2
+ spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2690,7 +2720,7 @@ test spinbox-10.5 {SpinboxSetValue procedure, updating display position} -setup
} -result {0}
test spinbox-10.6 {SpinboxSetValue procedure, updating display position} -setup {
unset -nocomplain x
- spinbox .e -highlightthickness 2 -bd 2
+ spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2706,7 +2736,7 @@ test spinbox-10.6 {SpinboxSetValue procedure, updating display position} -setup
} -result {10}
test spinbox-10.7 {SpinboxSetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
- spinbox .e -highlightthickness 2 -bd 2
+ spinbox .e -highlightthickness 2 -bd 2
pack .e
update
} -body {
@@ -2721,7 +2751,7 @@ test spinbox-10.7 {SpinboxSetValue procedure, updating insertion cursor} -setup
} -result {3}
test spinbox-10.8 {SpinboxSetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
- spinbox .e -highlightthickness 2 -bd 2
+ spinbox .e -highlightthickness 2 -bd 2
pack .e
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
@@ -2778,7 +2808,7 @@ test spinbox-13.1 {GetSpinboxIndex procedure} -setup {
destroy .e
} -result {21}
test spinbox-13.2 {GetSpinboxIndex procedure} -body {
- spinbox .e
+ spinbox .e
.e index abogus
} -cleanup {
destroy .e
@@ -2864,7 +2894,7 @@ test spinbox-13.9 {GetSpinboxIndex procedure} -setup {
} -result {1 6}
test spinbox-13.10 {GetSpinboxIndex procedure} -constraints x11 -body {
-# On unix, when selection is cleared, spinbox widget's internal
+# On unix, when selection is cleared, spinbox widget's internal
# selection range is reset.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2884,7 +2914,7 @@ test spinbox-13.10 {GetSpinboxIndex procedure} -constraints x11 -body {
test spinbox-13.11 {GetSpinboxIndex procedure} -constraints aquaOrWin32 -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2901,7 +2931,7 @@ test spinbox-13.11 {GetSpinboxIndex procedure} -constraints aquaOrWin32 -body {
.e index sel.first
} -cleanup {
destroy .e
-} -result {1}
+} -result {1}
test spinbox-13.12 {GetSpinboxIndex procedure} -constraints x11 -body {
# Previous settings:
@@ -2956,7 +2986,7 @@ test spinbox-13.13 {GetSpinboxIndex procedure} -constraints win -body {
test spinbox-13.14 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2969,14 +2999,14 @@ test spinbox-13.14 {GetSpinboxIndex procedure} -constraints win -body {
list [.e index sel.first] [.e index sel.last]
# Testing:
selection clear .e
- selection get
+ selection get
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body {
# On mac and pc, when selection is cleared, spinbox widget remembers
-# last selected range. When selection ownership is restored to
+# last selected range. When selection ownership is restored to
# spinbox, the old range will be rehighlighted.
# Previous settings:
spinbox .e -font {Courier -12} -width 5 -bd 2 -relief sunken
@@ -2988,9 +3018,9 @@ test spinbox-13.14.1 {GetSpinboxIndex procedure} -constraints win -body {
.e select to 6
list [.e index sel.first] [.e index sel.last]
# Testing:
- selection clear .e
- catch {selection get}
- .e index sbogus
+ selection clear .e
+ catch {selection get}
+ .e index sbogus
} -cleanup {
destroy .e
} -returnCodes error -match glob -result {*}
@@ -3005,7 +3035,7 @@ test spinbox-13.15 {GetSpinboxIndex procedure} -body {
test spinbox-13.16 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3016,7 +3046,7 @@ test spinbox-13.16 {GetSpinboxIndex procedure} -constraints fonts -body {
} -result {4}
test spinbox-13.17 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3027,7 +3057,7 @@ test spinbox-13.17 {GetSpinboxIndex procedure} -constraints fonts -body {
} -result {4}
test spinbox-13.18 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3038,7 +3068,7 @@ test spinbox-13.18 {GetSpinboxIndex procedure} -constraints fonts -body {
} -result {5}
test spinbox-13.19 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3049,7 +3079,7 @@ test spinbox-13.19 {GetSpinboxIndex procedure} -constraints fonts -body {
} -result {8}
test spinbox-13.20 {GetSpinboxIndex procedure} -constraints fonts -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3060,7 +3090,7 @@ test spinbox-13.20 {GetSpinboxIndex procedure} -constraints fonts -body {
} -result {9}
test spinbox-13.21 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3070,7 +3100,7 @@ test spinbox-13.21 {GetSpinboxIndex procedure} -body {
destroy .e
} -result {9}
test spinbox-13.22 {GetSpinboxIndex procedure} -setup {
- spinbox .e
+ spinbox .e
pack .e
update
} -body {
@@ -3080,7 +3110,7 @@ test spinbox-13.22 {GetSpinboxIndex procedure} -setup {
} -returnCodes error -result {bad spinbox index "1xyz"}
test spinbox-13.23 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3091,7 +3121,7 @@ test spinbox-13.23 {GetSpinboxIndex procedure} -body {
} -result {0}
test spinbox-13.24 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3102,7 +3132,7 @@ test spinbox-13.24 {GetSpinboxIndex procedure} -body {
} -result {12}
test spinbox-13.25 {GetSpinboxIndex procedure} -body {
spinbox .e -width 5 -relief sunken -highlightthickness 2 -bd 2 \
- -font {Courier -12}
+ -font {Courier -12}
pack .e
.e insert 0 012345678901234567890
.e xview 4
@@ -3130,7 +3160,7 @@ test spinbox-14.3 {SpinboxFetchSelection procedure} -setup {
}
} -body {
spinbox .e
- .e insert end $x
+ .e insert end $x
.e select from 0
.e select to end
string compare [selection get] $x
@@ -3157,7 +3187,7 @@ test spinbox-16.1 {SpinboxVisibleRange procedure} -constraints fonts -body {
spinbox .e -width 10 -font {Helvetica -12}
pack .e
update
- .e insert 0 "............................."
+ .e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
@@ -3234,7 +3264,7 @@ test spinbox-18.1 {Spinbox widget vs hiding} -setup {
set res1 [list [winfo children .] [interp hidden]]
set res2 [list {} $l]
expr {$res1 == $res2}
-} -result {1}
+} -result {1}
##
## Spinbox widget VALIDATION tests
@@ -3588,7 +3618,7 @@ test spinbox-19.19 {spinbox widget validation} -setup {
-background red -foreground white
pack .e
set ::e nextdata ;# previous settings
-
+
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V]
.e validate
list [.e cget -validate] [.e get] $::vVals
@@ -3613,7 +3643,7 @@ test spinbox-19.20 {spinbox widget validation} -setup {
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev
.e validate ;# previous settings
-
+
.e configure -validate all
set ::e testdata
list [.e cget -validate] [.e get] $::e $::vVals
diff --git a/tests/teapotTransparent.png b/tests/teapotTransparent.png
new file mode 100644
index 0000000..1e7e46d
--- /dev/null
+++ b/tests/teapotTransparent.png
Binary files differ
diff --git a/tests/text.test b/tests/text.test
index 5b2d7e3..ba5b4ff 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -910,7 +910,7 @@ test text-2.7 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
- .t tag cget sel -relief
+ .t tag cget sel -relief
} -cleanup {
destroy .t
} -result {flat}
@@ -919,7 +919,7 @@ test text-2.8 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
- .t tag cget sel -relief
+ .t tag cget sel -relief
} -cleanup {
destroy .t
} -result {flat}
@@ -928,7 +928,7 @@ test text-2.9 {Tk_TextCmd procedure} -constraints {
} -body {
catch {destroy .t}
text .t
- .t tag cget sel -relief
+ .t tag cget sel -relief
} -cleanup {
destroy .t
} -result {raised}
@@ -1485,7 +1485,19 @@ Line 7"
rename .t {}
rename test.t .t
destroy .t
-} -result {{edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} {insert 2.1 ef} {mark set insert 2.3} {see insert}}
+} -result [list {edit undo} {delete 2.1 2.4} {mark set insert 2.1} {see insert} \
+ {mark set tk::undoMarkL2 2.1} {mark set tk::undoMarkR2 2.4} \
+ {mark gravity tk::undoMarkL2 left} {mark gravity tk::undoMarkR2 right} \
+ {insert 2.1 ef} {mark set insert 2.3} {see insert} \
+ {mark set tk::undoMarkL1 2.1} {mark set tk::undoMarkR1 2.3} \
+ {mark gravity tk::undoMarkL1 left} {mark gravity tk::undoMarkR1 right} \
+ {mark names} \
+ {index tk::undoMarkL1} {index tk::undoMarkR1} \
+ {mark unset tk::undoMarkL1 tk::undoMarkR1} \
+ {index tk::undoMarkL2} {index tk::undoMarkR2} \
+ {mark unset tk::undoMarkL2 tk::undoMarkR2} \
+ {compare 2.1 > 2.3} {compare 2.6 > 2.3} ]
+
test text-8.23 {TextWidgetCmd procedure, "replace" option with undo} -setup {
text .t
} -body {
@@ -2035,7 +2047,7 @@ Line 7"
.t tag configure elide -elide 1
.t tag add elide 5.2 5.4
.t window create 5.4
- .t delete 5.4
+ .t delete 5.4
.t tag add elide 5.5 5.6
.t get -displaychars 5.2 5.8
} -cleanup {
@@ -2917,7 +2929,7 @@ test text-11.9 {counting with tag priority eliding} -setup {
lappend res [.t index "1.0 +1 indices"]
lappend res [.t index "1.0 +1 display indices"]
lappend res [.t index "1.0 +1 display chars"]
- lappend res [.t index end]
+ lappend res [.t index end]
lappend res [.t index "end -1 indices"]
lappend res [.t index "end -1 display indices"]
lappend res [.t index "end -1 display chars"]
@@ -3089,7 +3101,7 @@ test text-11a.41 {"sync" "pendingsync" and <<WidgetViewSync>>} -setup {
for {set i 1} {$i < 300} {incr i} {
append content [string repeat "$i " 50] \n
}
- # Sync the widget and process all <<WidgetViewSync>> events before binding.
+ # Sync the widget and process all <<WidgetViewSync>> events before binding.
.top.yt sync
update
bind .top.yt <<WidgetViewSync>> {lappend res Sync:%d}
@@ -3120,7 +3132,7 @@ test text-11a.51 {<<WidgetViewSync>> calls TkSendVirtualEvent(),
pack [text .top.t]
update
for {set i 1} {$i < 10000} {incr i} {
- .top.t insert end "Hello world!\n"
+ .top.t insert end "Hello world!\n"
}
bind .top.t <<WidgetViewSync>> {destroy .top.t}
.top.t tag add mytag 1.5 8000.8 ; # shall not crash
@@ -3323,11 +3335,11 @@ test text-14.5 {ConfigureText procedure} -setup {
.t configure -tabs {30 foo}
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
+} -returnCodes {error} -result {bad tab alignment "foo": must be left, right, center, or numeric}
test text-14.6 {ConfigureText procedure} -setup {
text .t
} -body {
- catch {.t configure -tabs {30 foo}}
+ catch {.t configure -tabs {30 foo}}
.t configure -tabs {10 20 30}
return $errorInfo
} -cleanup {
@@ -3346,7 +3358,7 @@ test text-14.7 {ConfigureText procedure} -setup {
destroy .t
} -result {}
test text-14.8 {ConfigureText procedure} -setup {
- text .t
+ text .t
} -body {
.t configure -wrap bogus
} -cleanup {
@@ -3372,7 +3384,7 @@ test text-14.10 {ConfigureText procedure} -setup {
destroy .t
} -result {}
test text-14.11 {ConfigureText procedure} -setup {
- text .t
+ text .t
} -body {
.t configure -selectborderwidth foo
} -cleanup {
@@ -3462,7 +3474,7 @@ test text-14.18 {ConfigureText procedure} -constraints fonts -setup {
toplevel .top
text .top.t -font {Courier -12} -borderwidth 2 -highlightthickness 2
} -body {
- .top.t configure -width 20 -height 10
+ .top.t configure -width 20 -height 10
pack .top.t
update
set geom [wm geometry .top]
@@ -3558,7 +3570,7 @@ test text-17.1 {TextCmdDeletedProc procedure} -body {
test text-17.2 {TextCmdDeletedProc procedure, disabling -setgrid} -constraints {
fonts
} -body {
- toplevel .top
+ toplevel .top
text .top.t -borderwidth 2 -highlightthickness 2 -font {Courier -12 bold} \
-setgrid 1 -width 20 -height 10
pack .top.t
@@ -4950,7 +4962,7 @@ test text-22.118 {TextSearchCmd, multiline matching end of window} -body {
test text-22.119 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 { Tcl_Obj *objPtr));
-static Tcl_Obj* FSNormalizeAbsolutePath
+static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -4967,7 +4979,7 @@ test text-22.120 {TextSearchCmd, multiline regexp matching} -body {
pack [text .t]
.t insert 1.0 {static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
-static Tcl_Obj* FSNormalizeAbsolutePath
+static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -4981,7 +4993,7 @@ test text-22.121 {TextSearchCmd, multiline regexp matching} -body {
.t insert 1.0 {
static int SetFsPathFromAny _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
-static Tcl_Obj* FSNormalizeAbsolutePath
+static Tcl_Obj* FSNormalizeAbsolutePath
_ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *pathPtr));}
set markExpr "^(\[A-Za-z0-9~_\]+\[ \t\n\r\]*\\(|(\[^ \t\(#\n\r/@:\*\]\[^=\(\r\n\]*\[ \t\]+\\*?)?"
append markExpr "(\[A-Za-z0-9~_\]+(<\[^>\]*>)?(::)?(\[A-Za-z0-9~_\]+::)*\[-A-Za-z0-9~_+ <>\|\\*/\]+|\[A-Za-z0-9~_\]+)"
@@ -6177,7 +6189,7 @@ test text-23.7 {TkTextGetTabs procedure} -setup {
test text-24.1 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump
} -cleanup {
destroy .t
@@ -6185,7 +6197,7 @@ test text-24.1 {TextDumpCmd procedure, bad args} -body {
test text-24.2 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump -all
} -cleanup {
destroy .t
@@ -6193,7 +6205,7 @@ test text-24.2 {TextDumpCmd procedure, bad args} -body {
test text-24.3 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump -command
} -cleanup {
destroy .t
@@ -6201,7 +6213,7 @@ test text-24.3 {TextDumpCmd procedure, bad args} -body {
test text-24.4 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump -bogus
} -cleanup {
destroy .t
@@ -6209,7 +6221,7 @@ test text-24.4 {TextDumpCmd procedure, bad args} -body {
test text-24.5 {TextDumpCmd procedure, bad args} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump bogus
} -cleanup {
destroy .t
@@ -6246,7 +6258,7 @@ test text-24.9 {TextDumpCmd procedure, same indices} -body {
test text-24.10 {TextDumpCmd procedure, negative range} -body {
pack [text .t]
.t insert 1.0 "One Line"
- .t mark set insert 1.0
+ .t mark set insert 1.0
.t dump 1.5 1.0
} -cleanup {
destroy .t
@@ -6564,6 +6576,7 @@ test text-27.11 {TextEditCmd procedure, set modified flag repeat} -setup {
# Make sure the Text is mapped before we start
update
set ::retval {}
+ update
} -body {
bind .t <<Modified>> "lappend ::retval modified"
# Shouldn't require [update idle] to trigger event [Bug 1809538]
@@ -6966,6 +6979,66 @@ test text-27.25 {<<UndoStack>> virtual event} -setup {
} -cleanup {
destroy .t
} -result {0 0 1 2 3 4 4 5 6 6 7 8 8 9}
+test text-27.26 {edit undo and edit redo return ranges} -setup {
+ destroy .t
+ set res {}
+} -body {
+ text .t -undo true -autoseparators false
+ .t insert end "Hello "
+ .t edit separator
+ .t insert end "World!\n"
+ .t insert 1.6 "GREAT "
+ .t insert end "Another edit here!!"
+ lappend res [.t edit undo]
+ lappend res [.t edit redo]
+ .t edit separator
+ .t delete 1.6
+ .t delete 1.9 1.10
+ .t insert 1.9 L
+ lappend res [.t edit undo]
+ lappend res [.t edit redo]
+ .t replace 1.6 1.10 Tcl/Tk
+ .t replace 2.8 2.12 "one bites the dust"
+ lappend res [.t edit undo]
+ lappend res [.t edit redo]
+} -cleanup {
+ destroy .t
+} -result [list {1.6 2.0} \
+ {1.6 2.19} \
+ {1.6 1.7 1.10 1.12} \
+ {1.6 1.7 1.9 1.11} \
+ {1.6 1.16 2.8 2.19} \
+ {1.6 1.16 2.8 2.30} ]
+test text-27.27 {edit undo and edit redo return ranges} -setup {
+ destroy .t
+ set res {}
+} -body {
+ text .t -undo true -autoseparators false
+ for {set i 3} {$i >= 1} {incr i -1} {
+ .t insert 1.0 "Line $i\n"
+ }
+ lappend res [.t edit undo]
+ lappend res [.t edit redo]
+} -cleanup {
+ destroy .t
+} -result [list {1.0 2.0} \
+ {1.0 4.0} ]
+test text-27.28 {edit undo and edit redo do not leave \
+ spurious temporary marks behind them} -setup {
+ destroy .t
+ set res {}
+} -body {
+ pack [text .t -undo true -autoseparators false]
+ .t insert end "Hello World.\n"
+ .t edit separator
+ .t insert end "Again hello.\n"
+ .t edit undo
+ lappend res [lsearch [.t mark names] tk::undoMark*]
+ .t edit redo
+ lappend res [lsearch [.t mark names] tk::undoMark*]
+} -cleanup {
+ destroy .t
+} -result [list -1 -1]
test text-28.1 {bug fix - 624372, ControlUtfProc long lines} -body {
@@ -7236,7 +7309,7 @@ test text-31.14 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
- .t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
+ .t tag add sel 1.0 3.0 5.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
lappend res [.t tag prevrange sel 1.0]
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
@@ -7257,7 +7330,7 @@ test text-31.15 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
- .t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
+ .t tag add sel 1.0 3.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
@@ -7277,7 +7350,7 @@ test text-31.16 {peer widgets} -setup {
for {set i 1} {$i < 20} {incr i} {
.t insert end "Line $i\n"
}
- .t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
+ .t tag add sel 1.0 7.0 9.0 11.0 13.0 15.0 17.0 19.0
.t configure -start 6 -end 12
lappend res [.t tag ranges sel]
lappend res "next" [.t tag nextrange sel 4.0] \
@@ -7322,7 +7395,7 @@ test text-31.18 {peer widgets} -setup {
return $res
} -cleanup {
destroy .t
-} -result {1.0 11.0}
+} -result {1.0 11.0}
test text-31.19 {peer widgets} -body {
pack [text .t]
for {set i 1} {$i < 20} {incr i} {
@@ -7367,7 +7440,7 @@ test text-32.1 {line heights on creation} -setup {
update
set after [$w count -ypixels 1.0 2.0]
destroy .g
- expr {$before eq $after}
+ expr {$before eq $after}
} -cleanup {
destroy .t
} -result {1}
@@ -7466,6 +7539,100 @@ test text-32.4 {peer widget -start, -end and deletion (bug 1630262)} -setup {
destroy .pt .t
} -result {5 11 8 10 5 8 6 8 22 27 38 44 55 60 57 57}
+test text-32.2 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5
+ # none of the following delete shall crash
+ # (all did before fixing bug 1630262)
+ # 1. delete on the same line: line1 == line2 in DeleteIndexRange,
+ # and resetView is true neither for .t not for .pt
+ .pt delete 2.0 2.2
+ # 2. delete just one line: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 3.0
+ # 3. delete several lines: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 5.0
+ # 4. delete to the end line: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 end
+ # this test succeeds provided there is no crash
+ set res 1
+} -cleanup {
+ destroy .pt
+} -result {1}
+
+test text-32.3 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5
+ .pt configure -startline 3
+ # the following delete shall not crash
+ # (it did before fixing bug 1630262)
+ .pt delete 2.0 3.0
+ # moreover -startline shall be correct
+ # (was wrong before fixing bug 1630262)
+ lappend res [.t cget -start] [.pt cget -start]
+} -cleanup {
+ destroy .pt
+} -result {4 3}
+
+test text-32.4 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5 -endline 15
+ .pt configure -startline 8 -endline 12
+ # .pt now shows a range entirely inside the range of .pt
+ # from .t, delete lines located after [.pt cget -end]
+ .t delete 9.0 10.0
+ # from .t, delete lines straddling [.pt cget -end]
+ .t delete 6.0 9.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 5 -endline 12
+ .pt configure -startline 8 -endline 12
+ # .pt now shows again a range entirely inside the range of .pt
+ # from .t, delete lines located before [.pt cget -start]
+ .t delete 2.0 3.0
+ # from .t, delete lines straddling [.pt cget -start]
+ .t delete 2.0 5.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 22 -endline 31
+ .pt configure -startline 42 -endline 51
+ # .t now shows a range entirely before the range of .pt
+ # from .t, delete some lines, then do it from .pt
+ .t delete 2.0 3.0
+ .t delete 2.0 5.0
+ .pt delete 2.0 5.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 55 -endline 75
+ .pt configure -startline 60 -endline 70
+ # .pt now shows a range entirely inside the range of .t
+ # from .t, delete a range straddling the entire range of .pt
+ .t delete 3.0 18.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+} -cleanup {
+ destroy .pt .t
+} -result {5 11 8 10 5 8 6 8 22 27 38 44 55 60 57 57}
+
test text-33.1 {TextWidgetCmd procedure, "peer" option} -setup {
text .t
diff --git a/tests/textDisp.test b/tests/textDisp.test
index b4891e4..f2d7047 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -53,7 +53,15 @@ catch {destroy .f .t}
frame .f -width 100 -height 20
pack .f -side left
-set fixedFont {Courier -12}
+# On macOS the font "Courier New" has different metrics than "Courier",
+# and this causes tests 20.1 - 20.5 to fail. So we use "Courier" as the
+# fixed font for testing on Aqua.
+
+if {[tk windowingsystem] eq "aqua"} {
+ set fixedFont {Courier -12}
+} else {
+ set fixedFont {"Courier New" -12}
+}
# 15 on XP, 13 on Solaris 8
set fixedHeight [font metrics $fixedFont -linespace]
# 7 on all platforms
@@ -602,7 +610,7 @@ if {$tcl_platform(platform) == "windows"} {
test textDisp-4.6 {UpdateDisplayInfo, tiny window} {
# This test was failing on Windows because the title bar on .
# was a certain minimum size and it was interfering with the size
- # requested. The "overrideredirect" gets rid of the titlebar so
+ # requested. The "overrideredirect" gets rid of the titlebar so
# the toplevel can shrink to the appropriate size. On Unix, setting
# the overrideredirect on "." confuses the window manager and
# causes subsequent tests to fail.
@@ -634,7 +642,7 @@ set hlth [.t cget -highlightthickness]
test textDisp-4.7 {UpdateDisplayInfo, filling in extra vertical space} {
# This test was failing on Windows because the title bar on .
# was a certain minimum size and it was interfering with the size
- # requested. The "overrideredirect" gets rid of the titlebar so
+ # requested. The "overrideredirect" gets rid of the titlebar so
# the toplevel can shrink to the appropriate size. On Unix, setting
# the overrideredirect on "." confuses the window manager and
# causes subsequent tests to fail.
@@ -1876,10 +1884,10 @@ test textDisp-14.9 {TkTextXviewCmd procedure} {
} [list [expr {9.0/14}] 1.0]
test textDisp-14.10 {TkTextXviewCmd procedure} {
list [catch {.t xview scroll a} msg] $msg
-} {1 {wrong # args: should be ".t xview scroll number units|pages|pixels"}}
+} {1 {wrong # args: should be ".t xview scroll number pages|pixels|units"}}
test textDisp-14.11 {TkTextXviewCmd procedure} {
list [catch {.t xview scroll a b c} msg] $msg
-} {1 {wrong # args: should be ".t xview scroll number units|pages|pixels"}}
+} {1 {wrong # args: should be ".t xview scroll number pages|pixels|units"}}
test textDisp-14.12 {TkTextXviewCmd procedure} {
list [catch {.t xview scroll gorp units} msg] $msg
} {1 {expected integer but got "gorp"}}
@@ -1902,7 +1910,7 @@ test textDisp-14.14 {TkTextXviewCmd procedure} {
.t insert end "a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9\n"
.t insert end "xxxx xxxxxxxxx xxxxxxxxxxxxx"
.t xview moveto 0
- .t xview scroll 21 u
+ .t xview scroll 21 u
set x [.t index @0,22]
.t xview scroll -1 u
lappend x [.t index @0,22]
@@ -1913,7 +1921,7 @@ test textDisp-14.14 {TkTextXviewCmd procedure} {
} {2.21 2.20 2.99 2.84}
test textDisp-14.15 {TkTextXviewCmd procedure} {
list [catch {.t xview scroll 14 globs} msg] $msg
-} {1 {bad argument "globs": must be units, pages, or pixels}}
+} {1 {bad argument "globs": must be pages, pixels, or units}}
test textDisp-14.16 {TkTextXviewCmd procedure} {
list [catch {.t xview flounder} msg] $msg
} {1 {bad option "flounder": must be moveto or scroll}}
@@ -2096,13 +2104,13 @@ test textDisp-16.18 {TkTextYviewCmd procedure, "moveto" roundoff} {textfonts} {
} [list [expr {1.0/3}] [expr {5.0/6}]]
test textDisp-16.19 {TkTextYviewCmd procedure, "scroll" option} {
list [catch {.t yview scroll a} msg] $msg
-} {1 {wrong # args: should be ".t yview scroll number units|pages|pixels"}}
+} {1 {wrong # args: should be ".t yview scroll number pages|pixels|units"}}
test textDisp-16.20 {TkTextYviewCmd procedure, "scroll" option} {
list [catch {.t yview scroll a b c} msg] $msg
-} {1 {wrong # args: should be ".t yview scroll number units|pages|pixels"}}
+} {1 {wrong # args: should be ".t yview scroll number pages|pixels|units"}}
test textDisp-16.21 {TkTextYviewCmd procedure, "scroll" option} {
list [catch {.t yview scroll badInt bogus} msg] $msg
-} {1 {bad argument "bogus": must be units, pages, or pixels}}
+} {1 {bad argument "bogus": must be pages, pixels, or units}}
test textDisp-16.21.2 {TkTextYviewCmd procedure, "scroll" option} {
list [catch {.t yview scroll badInt units} msg] $msg
} {1 {expected integer but got "badInt"}}
@@ -2114,7 +2122,7 @@ test textDisp-16.22 {TkTextYviewCmd procedure, "scroll" option, back pages} {
} {42.0}
test textDisp-16.22.1 {TkTextYviewCmd procedure, "scroll" option, back pages} {
list [catch {.t yview scroll -3 p} res] $res
-} {1 {ambiguous argument "p": must be units, pages, or pixels}}
+} {1 {ambiguous argument "p": must be pages, pixels, or units}}
test textDisp-16.23 {TkTextYviewCmd procedure, "scroll" option, back pages} {
.t yview 50.0
updateText
@@ -2185,7 +2193,7 @@ test textDisp-16.31 {TkTextYviewCmd procedure, "scroll units" option} {
} {151.40}
test textDisp-16.32 {TkTextYviewCmd procedure} {
list [catch {.t yview scroll 12 bogoids} msg] $msg
-} {1 {bad argument "bogoids": must be units, pages, or pixels}}
+} {1 {bad argument "bogoids": must be pages, pixels, or units}}
test textDisp-16.33 {TkTextYviewCmd procedure} {
list [catch {.t yview bad_arg 1 2} msg] $msg
} {1 {bad option "bad_arg": must be moveto or scroll}}
@@ -2359,7 +2367,7 @@ test textDisp-17.8 {TkTextScanCmd procedure} {textfonts} {
.t xview moveto 0
.t scan mark 0 60
.t scan dragto 30 100
- .t scan dragto 25 95
+ .t scan dragto 25 95
.t index @0,0
} {4.7}
test textDisp-17.9 {TkTextScanCmd procedure} {textfonts} {
@@ -2921,7 +2929,7 @@ test textDisp-20.1 {FindDLine} {
list [.t dlineinfo 46.0] [.t dlineinfo 47.0] [.t dlineinfo 49.0] \
[.t dlineinfo 58.0]
} [list {} {} [list 3 [expr {$fixedDiff + 16}] 49 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}]
-test textDisp-20.2 {FindDLine} {
+test textDisp-20.2 {FindDLine} {
.t yview 100.0
.t yview -pickplace 53.0
list [.t dlineinfo 50.0] [.t dlineinfo 50.14] [.t dlineinfo 50.21]
@@ -2970,7 +2978,7 @@ test textDisp-21.4 {count -displaylines regression} {
Use the Up (cursor) key to scroll up one line at a time. At the second press, the cursor either gets locked or jumps several lines.
Connect with Tkcon. The command
-.u count -displaylines \
+.u count -displaylines \
3.10 2.173
should give answer -1; it gives me 5.
@@ -3874,7 +3882,7 @@ test textDisp-29.2.5 {miscellaneous: can show last character} {
set iWidth [lindex [.t2.t bbox end-2c] 2]
.t2.t xview scroll 2 units
set iWidth2 [lindex [.t2.t bbox end-2c] 2]
-
+
if {($iWidth == $iWidth2) && $iWidth >= 2} {
set result "correct"
} else {
diff --git a/tests/textImage.test b/tests/textImage.test
index 4bb190c..2666ec5 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -74,7 +74,7 @@ test textImage-1.6 {configure argument checking} -setup {
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
- .t image configure
+ .t image configure
} -cleanup {
destroy .t
} -returnCodes error -result {wrong # args: should be ".t image configure index ?-option value ...?"}
@@ -84,7 +84,7 @@ test textImage-1.7 {configure argument checking} -setup {
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
- .t image configure blurf
+ .t image configure blurf
} -cleanup {
destroy .t
} -returnCodes error -result {bad text index "blurf"}
@@ -94,7 +94,7 @@ test textImage-1.8 {configure argument checking} -setup {
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
- .t image configure 1.1
+ .t image configure 1.1
} -cleanup {
destroy .t
} -returnCodes error -result {no embedded image at index "1.1"}
@@ -114,7 +114,7 @@ test textImage-1.10 {create argument checking} -setup {
} -body {
text .t -font test_font -bd 0 -highlightthickness 0 -padx 0 -pady 0
pack .t
- .t image create blurf
+ .t image create blurf
} -cleanup {
destroy .t
} -returnCodes error -result {bad text index "blurf"}
@@ -221,7 +221,7 @@ test textImage-1.17 {basic cget options} -setup {
.t image create end -image small
foreach i {align padx pady image name} {
lappend result $i:[.t image cget small -$i]
- }
+ }
return $result
} -cleanup {
destroy .t
@@ -243,7 +243,7 @@ test textImage-1.18 {basic configure options} -setup {
.t image create end -image small
foreach {option value} {align top padx 5 pady 7 image large name none} {
.t image configure small -$option $value
- }
+ }
update
.t image configure small
} -cleanup {
@@ -309,7 +309,7 @@ test textImage-3.1 {image change propagation} -setup {
vary configure -width $i -height $i
update
lappend result $i:[.t bbox vary]
- }
+ }
return $result
} -cleanup {
destroy .t
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 612ade1..310db6a 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -17,7 +17,7 @@ pack .t -expand 1 -fill both
update
.t debug on
wm geometry . {}
-
+
# The statements below reset the main window; it's needed if the window
# manager is mwm to make mwm forget about a previous minimum size setting.
@@ -74,7 +74,7 @@ test textIndex-1.9 {TkTextMakeByteIndex: shortcut for 0} {testtext} {
testtext .t byteindex 3 80
} {3.5 5}
test textIndex-1.10 {TkTextMakeByteIndex: verify index is in range} {testtext} {
- # for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
+ # for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# one segment
testtext .t byteindex 3 5
@@ -84,7 +84,7 @@ test textIndex-1.11 {TkTextMakeByteIndex: verify index is in range} {testtext} {
# index += segPtr->size
# Multiple segments, make sure add segment size to index.
- .t mark set foo 3.2
+ .t mark set foo 3.2
set x [testtext .t byteindex 3 7]
.t mark unset foo
set x
@@ -117,7 +117,7 @@ test textIndex-1.16 {TkTextMakeByteIndex: UTF-8 characters} {testtext} {
} {5.18 20}
test textIndex-1.17 {TkTextMakeByteIndex: prevent splitting UTF-8 character} \
{testtext} {
- # ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
+ # ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
# Wrong answer would be \xb9 (the 2nd byte of UTF rep of 0x4e4f).
set x [testtext .t byteindex 5 2]
@@ -125,7 +125,7 @@ test textIndex-1.17 {TkTextMakeByteIndex: prevent splitting UTF-8 character} \
} {{5.2 4} y}
test textIndex-1.18 {TkTextMakeByteIndex: prevent splitting UTF-8 character} \
{testtext} {
- # ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
+ # ((byteIndex > index) && (segPtr->typePtr == &tkTextCharType))
testtext .t byteindex 5 1
.t get insert
} "\u4e4f"
@@ -168,7 +168,7 @@ test textIndex-2.9 {TkTextMakeCharIndex: verify index is in range} {
# for (segPtr = indexPtr->linePtr->segPtr; ; segPtr = segPtr->nextPtr)
# Multiple segments, make sure add segment size to index.
- .t mark set foo 3.2
+ .t mark set foo 3.2
set x [.t index 3.7]
.t mark unset foo
set x
@@ -439,7 +439,7 @@ test textIndex-12.5 {TkTextIndexForwChars: find index} {
test textIndex-12.6 {TkTextIndexForwChars: find index} {
# for ( ; segPtr != NULL; segPtr = segPtr->nextPtr)
# border condition: segPtr == NULL -> beginning of next line
-
+
.t index {2.3 + 11 chars}
} 3.0
test textIndex-12.7 {TkTextIndexForwChars: find index} {
@@ -458,7 +458,7 @@ test textIndex-12.9 {TkTextIndexForwChars: find index} {
.t image create 2.4 -image textimage
set x [.t get {2.3 + 3 chars}]
.t delete 2.4
- set x
+ set x
} "f"
test textIndex-12.10 {TkTextIndexForwChars: find index} {
# dstPtr->byteIndex += segPtr->size - byteOffset
@@ -588,11 +588,11 @@ test textIndex-14.11 {TkTextIndexBackChars: move to previous segment} {
set x
} 2.9
test textIndex-14.12 {TkTextIndexBackChars: move to previous line} {
- # (lineIndex == 0)
+ # (lineIndex == 0)
.t index {1.5 - 10 chars}
} 1.0
test textIndex-14.13 {TkTextIndexBackChars: move to previous line} {
- # not (lineIndex == 0)
+ # not (lineIndex == 0)
.t index {2.5 - 10 chars}
} 1.2
test textIndex-14.14 {TkTextIndexBackChars: move to previous line} {
diff --git a/tests/textMark.test b/tests/textMark.test
index bbf226e..043ff82 100644
--- a/tests/textMark.test
+++ b/tests/textMark.test
@@ -27,7 +27,7 @@ Line 4
bOy GIrl .#@? x_yz
!@#$%
Line 7"
-
+
# The statements below reset the main window; it's needed if the window
# manager is mwm to make mwm forget about a previous minimum size setting.
diff --git a/tests/textTag.test b/tests/textTag.test
index 5761abc..35fb18a 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -11,19 +11,30 @@ namespace import ::tcltest::*
eval tcltest::configure $argv
tcltest::loadTestedCommands
+set textWidgetFont {Courier 12}
+set bigFont {Courier 24}
+
+# what is needed is a font that is both fixed-width and featuring a
+# specific size because in some tests (that will be constrained by
+# haveFontSizes), a tag applying the $bigFont will be set to some
+# characters, which action has the effect of changing what character
+# is under the mouse pointer, which is the purpose of the tests
+testConstraint haveFontSizes [expr {
+ [font metrics $textWidgetFont -fixed] &&
+ [font actual $textWidgetFont -size] == 12 &&
+ [font metrics $bigFont -fixed] &&
+ [font actual $bigFont -size] == 24 }
+]
+
destroy .t
text .t -width 20 -height 10
-testConstraint haveCourier12 [expr {[catch {
- .t configure -font {Courier 12}
-}] == 0}]
pack .t -expand 1 -fill both
update
.t debug on
wm geometry . {}
-set bigFont {Helvetica 24}
-
+
# The statements below reset the main window; it's needed if the window
# manager is mwm, to make mwm forget about a previous minimum size setting.
@@ -40,130 +51,96 @@ bOy GIrl .#@? x_yz
!@#$%
Line 7"
-test textTag-1.1 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.1 {tag configuration options} -body {
.t tag configure x -background #012345
.t tag cget x -background
} -cleanup {
.t tag configure x -background [lindex [.t tag configure x -background] 3]
} -result {#012345}
-test textTag-1.2 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.2 {configuration options} -body {
.t tag configure x -background non-existent
} -cleanup {
.t tag configure x -background [lindex [.t tag configure x -background] 3]
} -returnCodes error -result {unknown color name "non-existent"}
-test textTag-1.3 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.3 {tag configuration options} -body {
.t tag configure x -bgstipple gray50
.t tag cget x -bgstipple
} -cleanup {
.t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3]
} -result {gray50}
-test textTag-1.4 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.4 {configuration options} -body {
.t tag configure x -bgstipple badStipple
} -cleanup {
.t tag configure x -bgstipple [lindex [.t tag configure x -bgstipple] 3]
} -returnCodes error -result {bitmap "badStipple" not defined}
-test textTag-1.5 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.5 {tag configuration options} -body {
.t tag configure x -borderwidth 2
.t tag cget x -borderwidth
} -cleanup {
.t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3]
} -result {2}
-test textTag-1.6 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.6 {configuration options} -body {
.t tag configure x -borderwidth 46q
} -cleanup {
.t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3]
} -returnCodes error -result {bad screen distance "46q"}
-test textTag-1.7 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.7 {tag configuration options} -body {
.t tag configure x -fgstipple gray25
.t tag cget x -fgstipple
} -cleanup {
.t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3]
} -result {gray25}
-test textTag-1.8 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.8 {configuration options} -body {
.t tag configure x -fgstipple bogus
} -cleanup {
.t tag configure x -fgstipple [lindex [.t tag configure x -fgstipple] 3]
} -returnCodes error -result {bitmap "bogus" not defined}
-test textTag-1.9 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.9 {tag configuration options} -body {
.t tag configure x -font fixed
.t tag cget x -font
} -cleanup {
.t tag configure x -font [lindex [.t tag configure x -font] 3]
} -result {fixed}
-test textTag-1.10 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.10 {tag configuration options} -body {
.t tag configure x -foreground #001122
.t tag cget x -foreground
} -cleanup {
.t tag configure x -foreground [lindex [.t tag configure x -foreground] 3]
} -result {#001122}
-test textTag-1.11 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.11 {configuration options} -body {
.t tag configure x -foreground {silly color}
} -cleanup {
.t tag configure x -foreground [lindex [.t tag configure x -foreground] 3]
} -returnCodes error -result {unknown color name "silly color"}
-test textTag-1.12 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.12 {tag configuration options} -body {
.t tag configure x -justify left
.t tag cget x -justify
} -cleanup {
.t tag configure x -justify [lindex [.t tag configure x -justify] 3]
} -result {left}
-test textTag-1.13 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.13 {configuration options} -body {
.t tag configure x -justify middle
} -cleanup {
.t tag configure x -justify [lindex [.t tag configure x -justify] 3]
} -returnCodes error -result {bad justification "middle": must be left, right, or center}
-test textTag-1.14 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.14 {tag configuration options} -body {
.t tag configure x -lmargin1 10
.t tag cget x -lmargin1
} -cleanup {
.t tag configure x -lmargin1 [lindex [.t tag configure x -lmargin1] 3]
} -result {10}
-test textTag-1.15 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.15 {configuration options} -body {
.t tag configure x -lmargin1 bad
} -cleanup {
.t tag configure x -lmargin1 [lindex [.t tag configure x -lmargin1] 3]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.16 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.16 {tag configuration options} -body {
.t tag configure x -lmargin2 10
.t tag cget x -lmargin2
} -cleanup {
.t tag configure x -lmargin2 [lindex [.t tag configure x -lmargin2] 3]
} -result {10}
-test textTag-1.17 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.17 {configuration options} -body {
.t tag configure x -lmargin2 bad
} -cleanup {
.t tag configure x -lmargin2 [lindex [.t tag configure x -lmargin2] 3]
@@ -179,32 +156,24 @@ test textTag-1.17b {configuration options} -body {
} -cleanup {
.t tag configure x -lmargincolor [lindex [.t tag configure x -lmargincolor] 3]
} -returnCodes error -result {unknown color name "non-existent"}
-test textTag-1.18 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.18 {tag configuration options} -body {
.t tag configure x -offset 2
.t tag cget x -offset
} -cleanup {
.t tag configure x -offset [lindex [.t tag configure x -offset] 3]
} -result {2}
-test textTag-1.19 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.19 {configuration options} -body {
.t tag configure x -offset 100xyz
} -cleanup {
.t tag configure x -offset [lindex [.t tag configure x -offset] 3]
} -returnCodes error -result {bad screen distance "100xyz"}
-test textTag-1.20 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.20 {tag configuration options} -body {
.t tag configure x -overstrike on
.t tag cget x -overstrike
} -cleanup {
.t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3]
} -result {on}
-test textTag-1.21 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.21 {configuration options} -body {
.t tag configure x -overstrike stupid
} -cleanup {
.t tag configure x -overstrike [lindex [.t tag configure x -overstrike] 3]
@@ -220,32 +189,24 @@ test textTag-1.21b {configuration options} -body {
} -cleanup {
.t tag configure x -overstrikefg [lindex [.t tag configure x -overstrikefg] 3]
} -returnCodes error -result {unknown color name "stupid"}
-test textTag-1.22 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.22 {tag configuration options} -body {
.t tag configure x -relief raised
.t tag cget x -relief
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
} -result {raised}
-test textTag-1.23 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.23 {configuration options} -body {
.t tag configure x -relief stupid
} -cleanup {
.t tag configure x -relief [lindex [.t tag configure x -relief] 3]
} -returnCodes error -result {bad relief "stupid": must be flat, groove, raised, ridge, solid, or sunken}
-test textTag-1.24 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.24 {tag configuration options} -body {
.t tag configure x -rmargin 10
.t tag cget x -rmargin
} -cleanup {
.t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
} -result {10}
-test textTag-1.25 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.25 {configuration options} -body {
.t tag configure x -rmargin bad
} -cleanup {
.t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
@@ -283,77 +244,57 @@ test textTag-1.25f {configuration options} -body {
} -cleanup {
.t tag configure x -selectforeground [lindex [.t tag configure x -selectforeground] 3]
} -returnCodes error -result {unknown color name "non-existent"}
-test textTag-1.26 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.26 {tag configuration options} -body {
.t tag configure x -spacing1 10
.t tag cget x -spacing1
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
} -result {10}
-test textTag-1.27 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.27 {configuration options} -body {
.t tag configure x -spacing1 bad
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.28 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.28 {tag configuration options} -body {
.t tag configure x -spacing2 10
.t tag cget x -spacing2
} -cleanup {
.t tag configure x -spacing2 [lindex [.t tag configure x -spacing2] 3]
} -result {10}
-test textTag-1.29 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.29 {configuration options} -body {
.t tag configure x -spacing2 bad
} -cleanup {
.t tag configure x -spacing2 [lindex [.t tag configure x -spacing2] 3]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.30 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.30 {tag configuration options} -body {
.t tag configure x -spacing3 10
.t tag cget x -spacing3
} -cleanup {
.t tag configure x -spacing3 [lindex [.t tag configure x -spacing3] 3]
} -result {10}
-test textTag-1.31 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.31 {configuration options} -body {
.t tag configure x -spacing3 bad
} -cleanup {
.t tag configure x -spacing3 [lindex [.t tag configure x -spacing3] 3]
} -returnCodes error -result {bad screen distance "bad"}
-test textTag-1.32 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.32 {tag configuration options} -body {
.t tag configure x -tabs {10 20 30}
.t tag cget x -tabs
} -cleanup {
.t tag configure x -tabs [lindex [.t tag configure x -tabs] 3]
} -result {10 20 30}
-test textTag-1.33 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.33 {configuration options} -body {
.t tag configure x -tabs {10 fork}
} -cleanup {
.t tag configure x -tabs [lindex [.t tag configure x -tabs] 3]
} -returnCodes error -result {bad tab alignment "fork": must be left, right, center, or numeric}
-test textTag-1.34 {tag configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.34 {tag configuration options} -body {
.t tag configure x -underline no
.t tag cget x -underline
} -cleanup {
.t tag configure x -underline [lindex [.t tag configure x -underline] 3]
} -result {no}
-test textTag-1.35 {configuration options} -constraints {
- haveCourier12
-} -body {
+test textTag-1.35 {configuration options} -body {
.t tag configure x -underline stupid
} -cleanup {
.t tag configure x -underline [lindex [.t tag configure x -underline] 3]
@@ -371,43 +312,29 @@ test textTag-1.37 {configuration options} -body {
} -returnCodes error -result {unknown color name "stupid"}
-test textTag-2.1 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.1 {TkTextTagCmd - "add" option} -body {
.t tag
} -returnCodes error -result {wrong # args: should be ".t tag option ?arg ...?"}
-test textTag-2.2 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.2 {TkTextTagCmd - "add" option} -body {
.t tag gorp
} -returnCodes error -result {bad tag option "gorp": must be add, bind, cget, configure, delete, lower, names, nextrange, prevrange, raise, ranges, or remove}
-test textTag-2.3 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.3 {TkTextTagCmd - "add" option} -body {
.t tag add foo
} -returnCodes error -result {wrong # args: should be ".t tag add tagName index1 ?index2 index1 index2 ...?"}
-test textTag-2.4 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.4 {TkTextTagCmd - "add" option} -body {
.t tag add x gorp
} -returnCodes error -result {bad text index "gorp"}
-test textTag-2.5 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.5 {TkTextTagCmd - "add" option} -body {
.t tag add x 1.2 gorp
} -returnCodes error -result {bad text index "gorp"}
-test textTag-2.6 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-2.6 {TkTextTagCmd - "add" option} -setup {
.t tag delete sel
} -body {
.t tag add sel 3.2 3.4
.t tag add sel 3.2 3.0
.t tag ranges sel
} -result {3.2 3.4}
-test textTag-2.7 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-2.7 {TkTextTagCmd - "add" option} -setup {
.t tag delete x
} -body {
.t tag add x 1.0 1.end
@@ -415,9 +342,7 @@ test textTag-2.7 {TkTextTagCmd - "add" option} -constraints {
} -cleanup {
.t tag delete x
} -result {1.0 1.6}
-test textTag-2.8 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-2.8 {TkTextTagCmd - "add" option} -setup {
.t tag remove x 1.0 end
} -body {
.t tag add x 1.2
@@ -425,9 +350,7 @@ test textTag-2.8 {TkTextTagCmd - "add" option} -constraints {
} -cleanup {
.t tag delete x
} -result {1.2 1.3}
-test textTag-2.9 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-2.9 {TkTextTagCmd - "add" option} -setup {
destroy .t.e
} -body {
entry .t.e
@@ -439,9 +362,7 @@ test textTag-2.9 {TkTextTagCmd - "add" option} -constraints {
} -cleanup {
destroy .t.e
} -result 34
-test textTag-2.10 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-2.10 {TkTextTagCmd - "add" option} -setup {
destroy .t.e
} -body {
entry .t.e
@@ -454,23 +375,19 @@ test textTag-2.10 {TkTextTagCmd - "add" option} -constraints {
} -cleanup {
destroy .t.e
} -result {Text}
-test textTag-2.11 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.11 {TkTextTagCmd - "add" option} -body {
.t tag remove sel 1.0 end
.t tag add sel 1.1 1.5 2.4 3.1 4.2 4.4
.t tag ranges sel
} -result {1.1 1.5 2.4 3.1 4.2 4.4}
-test textTag-2.12 {TkTextTagCmd - "add" option} -constraints {
- haveCourier12
-} -body {
+test textTag-2.12 {TkTextTagCmd - "add" option} -body {
.t tag remove sel 1.0 end
.t tag add sel 1.1 1.5 2.4
.t tag ranges sel
} -cleanup {
.t tag remove sel 1.0 end
} -result {1.1 1.5 2.4 2.5}
-test textTag-2.14 {tag add before -startline - Bug 1615425} haveCourier12 {
+test textTag-2.14 {tag add before -startline - Bug 1615425} -body {
text .tt
for {set i 1} {$i <10} {incr i} {
.tt insert end "Line $i\n"
@@ -482,54 +399,40 @@ test textTag-2.14 {tag add before -startline - Bug 1615425} haveCourier12 {
.tt tag add mytag 1.0 1.end
destroy .ptt .tt
set res 1
-} {1}
+} -result {1}
-test textTag-3.1 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.1 {TkTextTagCmd - "bind" option} -body {
.t tag bind
} -returnCodes error -result {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}
-test textTag-3.2 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.2 {TkTextTagCmd - "bind" option} -body {
.t tag bind 1 2 3 4
} -returnCodes error -result {wrong # args: should be ".t tag bind tagName ?sequence? ?command?"}
-test textTag-3.3 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.3 {TkTextTagCmd - "bind" option} -body {
.t tag bind x <Enter> script1
.t tag bind x <Enter>
} -cleanup {
.t tag delete x
} -result {script1}
-test textTag-3.4 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.4 {TkTextTagCmd - "bind" option} -body {
.t tag bind x <Gorp> script2
} -returnCodes error -result {bad event type or keysym "Gorp"}
-test textTag-3.5 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.5 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <FocusIn> script2
} -cleanup {
.t tag delete x
} -returnCodes error -result {requested illegal events; only key, button, motion, enter, leave, and virtual events may be used}
-test textTag-3.6 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.6 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <Enter> script1
- catch {.t tag bind x <FocusIn> script2}
+ catch {.t tag bind x <FocusIn> script2}
.t tag bind x
} -cleanup {
.t tag delete x
} -result {<Enter>}
-test textTag-3.7 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.7 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <Leave> script2
@@ -538,9 +441,7 @@ test textTag-3.7 {TkTextTagCmd - "bind" option} -constraints {
} -cleanup {
.t tag delete x
} -result {{<Enter> <Leave> a} script1 xyzzy}
-test textTag-3.8 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.8 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <Enter> script1
.t tag bind x <Enter> +script2
@@ -549,17 +450,13 @@ test textTag-3.8 {TkTextTagCmd - "bind" option} -constraints {
.t tag delete x
} -result {script1
script2}
-test textTag-3.9 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.9 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <Enter>
} -cleanup {
.t tag delete x
} -returnCodes ok -result {}
-test textTag-3.10 {TkTextTagCmd - "bind" option} -constraints {
- haveCourier12
-} -body {
+test textTag-3.10 {TkTextTagCmd - "bind" option} -body {
.t tag delete x
.t tag bind x <
} -cleanup {
@@ -567,30 +464,20 @@ test textTag-3.10 {TkTextTagCmd - "bind" option} -constraints {
} -returnCodes error -result {no event type or button # or keysym}
-test textTag-4.1 {TkTextTagCmd - "cget" option} -constraints {
- haveCourier12
-} -body {
+test textTag-4.1 {TkTextTagCmd - "cget" option} -body {
.t tag cget a
} -returnCodes error -result {wrong # args: should be ".t tag cget tagName option"}
-test textTag-4.2 {TkTextTagCmd - "cget" option} -constraints {
- haveCourier12
-} -body {
+test textTag-4.2 {TkTextTagCmd - "cget" option} -body {
.t tag cget a b c
} -returnCodes error -result {wrong # args: should be ".t tag cget tagName option"}
-test textTag-4.3 {TkTextTagCmd - "cget" option} -constraints {
- haveCourier12
-} -body {
+test textTag-4.3 {TkTextTagCmd - "cget" option} -body {
.t tag delete foo
.t tag cget foo bar
} -returnCodes error -result {tag "foo" isn't defined in text widget}
-test textTag-4.4 {TkTextTagCmd - "cget" option} -constraints {
- haveCourier12
-} -body {
+test textTag-4.4 {TkTextTagCmd - "cget" option} -body {
.t tag cget sel bogus
} -returnCodes error -result {unknown option "bogus"}
-test textTag-4.5 {TkTextTagCmd - "cget" option} -constraints {
- haveCourier12
-} -body {
+test textTag-4.5 {TkTextTagCmd - "cget" option} -body {
.t tag delete x
.t tag configure x -background red
.t tag cget x -background
@@ -599,26 +486,18 @@ test textTag-4.5 {TkTextTagCmd - "cget" option} -constraints {
} -result {red}
-test textTag-5.1 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.1 {TkTextTagCmd - "configure" option} -body {
.t tag configure
} -returnCodes error -result {wrong # args: should be ".t tag configure tagName ?-option? ?value? ?-option value ...?"}
-test textTag-5.2 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.2 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -foo
} -returnCodes error -result {unknown option "-foo"}
-test textTag-5.3 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.3 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -background red -underline
} -cleanup {
.t tag delete x
} -returnCodes error -result {value for "-underline" missing}
-test textTag-5.4 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.4 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -underline yes
.t tag configure x -underline
@@ -632,9 +511,7 @@ test textTag-5.4a {TkTextTagCmd - "configure" option} -body {
} -cleanup {
.t tag delete x
} -result {-underlinefg {} {} {} lightgreen}
-test textTag-5.5 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.5 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -overstrike on
.t tag cget x -overstrike
@@ -648,58 +525,44 @@ test textTag-5.5a {TkTextTagCmd - "configure" option} -body {
} -cleanup {
.t tag delete x
} -result {-overstrikefg {} {} {} lightgreen}
-test textTag-5.6 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.6 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -overstrike foo
} -cleanup {
.t tag delete x
} -returnCodes error -result {expected boolean value but got "foo"}
-test textTag-5.7 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.7 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -underline stupid
} -cleanup {
.t tag delete x
} -returnCodes error -result {expected boolean value but got "stupid"}
-test textTag-5.8 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.8 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -justify left
.t tag configure x -justify
} -cleanup {
.t tag delete x
} -result {-justify {} {} {} left}
-test textTag-5.9 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.9 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -justify bogus
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad justification "bogus": must be left, right, or center}
-test textTag-5.10 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.10 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -justify fill
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad justification "fill": must be left, right, or center}
-test textTag-5.11 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.11 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -offset 2
.t tag configure x -offset
} -cleanup {
.t tag delete x
} -result {-offset {} {} {} 2}
-test textTag-5.12 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.12 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -offset 1.0q
} -cleanup {
@@ -718,17 +581,13 @@ test textTag-5.13 {TkTextTagCmd - "configure" option} -body {
{-rmargin {} {} {} 5} \
{-lmargincolor {} {} {} darkblue} {-rmargincolor {} {} {} lightgreen} \
]
-test textTag-5.14 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.14 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargin1 2.0x
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "2.0x"}
-test textTag-5.15 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.15 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargin2 gorp
} -cleanup {
@@ -740,9 +599,7 @@ test textTag-5.15a {TkTextTagCmd - "configure" option} -body {
} -cleanup {
.t tag delete x
} -returnCodes error -result {unknown color name "rainbow"}
-test textTag-5.16 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.16 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -rmargin 140.1.1
} -cleanup {
@@ -755,9 +612,7 @@ test textTag-5.16a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
} -returnCodes error -result {unknown color name "rainbow"}
.t tag delete x
-test textTag-5.17 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.17 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 2 -spacing2 4 -spacing3 6
list [.t tag configure x -spacing1] [.t tag configure x -spacing2] \
@@ -765,33 +620,25 @@ test textTag-5.17 {TkTextTagCmd - "configure" option} -constraints {
} -cleanup {
.t tag delete x
} -result {{-spacing1 {} {} {} 2} {-spacing2 {} {} {} 4} {-spacing3 {} {} {} 6}}
-test textTag-5.18 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.18 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 2.0x
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "2.0x"}
-test textTag-5.19 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.19 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 lousy
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "lousy"}
-test textTag-5.20 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.20 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 4.2.3
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad screen distance "4.2.3"}
-test textTag-5.21 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.21 {TkTextTagCmd - "configure" option} -body {
.t configure -selectborderwidth 2 -selectforeground blue \
-selectbackground black
.t tag configure sel -borderwidth 4 -foreground green -background yellow
@@ -801,9 +648,7 @@ test textTag-5.21 {TkTextTagCmd - "configure" option} -constraints {
}
return $x
} -result {4 green yellow}
-test textTag-5.22 {TkTextTagCmd - "configure" option} -constraints {
- haveCourier12
-} -body {
+test textTag-5.22 {TkTextTagCmd - "configure" option} -body {
.t configure -selectborderwidth 20
.t tag configure sel -borderwidth {}
.t cget -selectborderwidth
@@ -855,19 +700,13 @@ test textTag-5.24 {TkTextTagCmd - "configure" option} -body {
return $x
} -result {yellow blue red white}
-test textTag-6.1 {TkTextTagCmd - "delete" option} -constraints {
- haveCourier12
-} -body {
+test textTag-6.1 {TkTextTagCmd - "delete" option} -body {
.t tag delete
} -returnCodes error -result {wrong # args: should be ".t tag delete tagName ?tagName ...?"}
-test textTag-6.2 {TkTextTagCmd - "delete" option} -constraints {
- haveCourier12
-} -body {
+test textTag-6.2 {TkTextTagCmd - "delete" option} -body {
.t tag delete zork
} -returnCodes ok -result {}
-test textTag-6.3 {TkTextTagCmd - "delete" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-6.3 {TkTextTagCmd - "delete" option} -setup {
.t tag delete {*}[.t tag names]
} -body {
.t tag config x -background black
@@ -878,9 +717,7 @@ test textTag-6.3 {TkTextTagCmd - "delete" option} -constraints {
} -cleanup {
.t tag delete x
} -result {sel x}
-test textTag-6.4 {TkTextTagCmd - "delete" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-6.4 {TkTextTagCmd - "delete" option} -setup {
.t tag delete {*}[.t tag names]
} -body {
.t tag config x -background black
@@ -889,9 +726,7 @@ test textTag-6.4 {TkTextTagCmd - "delete" option} -constraints {
eval .t tag delete [.t tag names]
.t tag names
} -result {sel}
-test textTag-6.5 {TkTextTagCmd - "delete" option} -constraints {
- haveCourier12
-} -body {
+test textTag-6.5 {TkTextTagCmd - "delete" option} -body {
.t tag bind x <Enter> foo
.t tag delete x
.t tag configure x -background black
@@ -901,24 +736,16 @@ test textTag-6.5 {TkTextTagCmd - "delete" option} -constraints {
} -result {}
-test textTag-7.1 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -body {
+test textTag-7.1 {TkTextTagCmd - "lower" option} -body {
.t tag lower
} -returnCodes error -result {wrong # args: should be ".t tag lower tagName ?belowThis?"}
-test textTag-7.2 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -body {
+test textTag-7.2 {TkTextTagCmd - "lower" option} -body {
.t tag lower foo
} -returnCodes error -result {tag "foo" isn't defined in text widget}
-test textTag-7.3 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -body {
+test textTag-7.3 {TkTextTagCmd - "lower" option} -body {
.t tag lower sel bar
} -returnCodes error -result {tag "bar" isn't defined in text widget}
-test textTag-7.4 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-7.4 {TkTextTagCmd - "lower" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -930,9 +757,7 @@ test textTag-7.4 {TkTextTagCmd - "lower" option} -constraints {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {c sel a b d}
-test textTag-7.5 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-7.5 {TkTextTagCmd - "lower" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -944,9 +769,7 @@ test textTag-7.5 {TkTextTagCmd - "lower" option} -constraints {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a d b c}
-test textTag-7.6 {TkTextTagCmd - "lower" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-7.6 {TkTextTagCmd - "lower" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -960,16 +783,12 @@ test textTag-7.6 {TkTextTagCmd - "lower" option} -constraints {
} -result {sel b a c d}
-test textTag-8.1 {TkTextTagCmd - "names" option} -constraints {
- haveCourier12
-} -body {
+test textTag-8.1 {TkTextTagCmd - "names" option} -body {
.t tag names a b
} -cleanup {
.t tag delete {*}[.t tag names]
} -returnCodes error -result {wrong # args: should be ".t tag names ?index?"}
-test textTag-8.2 {TkTextTagCmd - "names" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-8.2 {TkTextTagCmd - "names" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -980,9 +799,7 @@ test textTag-8.2 {TkTextTagCmd - "names" option} -constraints {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b c d}
-test textTag-8.3 {TkTextTagCmd - "names" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-8.3 {TkTextTagCmd - "names" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -997,24 +814,16 @@ test textTag-8.3 {TkTextTagCmd - "names" option} -constraints {
} -result {c {a b}}
-test textTag-9.1 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -body {
+test textTag-9.1 {TkTextTagCmd - "nextrange" option} -body {
.t tag nextrange x
} -returnCodes error -result {wrong # args: should be ".t tag nextrange tagName index1 ?index2?"}
-test textTag-9.2 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -body {
+test textTag-9.2 {TkTextTagCmd - "nextrange" option} -body {
.t tag nextrange x 1 2 3
} -returnCodes error -result {wrong # args: should be ".t tag nextrange tagName index1 ?index2?"}
-test textTag-9.3 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -body {
+test textTag-9.3 {TkTextTagCmd - "nextrange" option} -body {
.t tag nextrange foo 1.0
} -returnCodes ok -result {}
-test textTag-9.4 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.4 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1022,9 +831,7 @@ test textTag-9.4 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "foo"}
-test textTag-9.5 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.5 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1034,9 +841,7 @@ test textTag-9.5 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "bar"}
-test textTag-9.6 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.6 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1046,9 +851,7 @@ test textTag-9.6 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-9.7 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.7 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1058,9 +861,7 @@ test textTag-9.7 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-9.8 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.8 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1070,9 +871,7 @@ test textTag-9.8 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-9.9 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.9 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1082,9 +881,7 @@ test textTag-9.9 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
-test textTag-9.10 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.10 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1094,9 +891,7 @@ test textTag-9.10 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {}
-test textTag-9.11 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.11 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1106,9 +901,7 @@ test textTag-9.11 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
-test textTag-9.12 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.12 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1118,9 +911,7 @@ test textTag-9.12 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
-test textTag-9.13 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.13 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1130,9 +921,7 @@ test textTag-9.13 {TkTextTagCmd - "nextrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {7.2 7.3}
-test textTag-9.14 {TkTextTagCmd - "nextrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-9.14 {TkTextTagCmd - "nextrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1144,28 +933,20 @@ test textTag-9.14 {TkTextTagCmd - "nextrange" option} -constraints {
} -result {}
-test textTag-10.1 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -body {
+test textTag-10.1 {TkTextTagCmd - "prevrange" option} -body {
.t tag prevrange x
} -returnCodes error -result {wrong # args: should be ".t tag prevrange tagName index1 ?index2?"}
-test textTag-10.2 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -body {
+test textTag-10.2 {TkTextTagCmd - "prevrange" option} -body {
.t tag prevrange x 1 2 3
} -returnCodes error -result {wrong # args: should be ".t tag prevrange tagName index1 ?index2?"}
-test textTag-10.3 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.3 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag prevrange foo end
} -cleanup {
.t tag delete x
} -returnCodes ok -result {}
-test textTag-10.4 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.4 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1175,9 +956,7 @@ test textTag-10.4 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "foo"}
-test textTag-10.5 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.5 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1187,9 +966,7 @@ test textTag-10.5 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -returnCodes error -result {bad text index "bar"}
-test textTag-10.6 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.6 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1199,9 +976,7 @@ test textTag-10.6 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {7.2 7.3}
-test textTag-10.7 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.7 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1211,9 +986,7 @@ test textTag-10.7 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-10.8 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.8 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1223,9 +996,7 @@ test textTag-10.8 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-10.9 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.9 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1235,9 +1006,7 @@ test textTag-10.9 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-10.10 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.10 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1247,9 +1016,7 @@ test textTag-10.10 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {}
-test textTag-10.11 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.11 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1259,9 +1026,7 @@ test textTag-10.11 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {}
-test textTag-10.12 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.12 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1271,9 +1036,7 @@ test textTag-10.12 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.3 2.5}
-test textTag-10.13 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.13 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1283,9 +1046,7 @@ test textTag-10.13 {TkTextTagCmd - "prevrange" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.9 3.1}
-test textTag-10.14 {TkTextTagCmd - "prevrange" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-10.14 {TkTextTagCmd - "prevrange" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.3 2.5
@@ -1297,24 +1058,16 @@ test textTag-10.14 {TkTextTagCmd - "prevrange" option} -constraints {
} -result {}
-test textTag-11.1 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -body {
+test textTag-11.1 {TkTextTagCmd - "raise" option} -body {
.t tag raise
} -returnCodes error -result {wrong # args: should be ".t tag raise tagName ?aboveThis?"}
-test textTag-11.2 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -body {
+test textTag-11.2 {TkTextTagCmd - "raise" option} -body {
.t tag raise foo
} -returnCodes error -result {tag "foo" isn't defined in text widget}
-test textTag-11.3 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -body {
+test textTag-11.3 {TkTextTagCmd - "raise" option} -body {
.t tag raise sel bar
} -returnCodes error -result {tag "bar" isn't defined in text widget}
-test textTag-11.4 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-11.4 {TkTextTagCmd - "raise" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -1326,9 +1079,7 @@ test textTag-11.4 {TkTextTagCmd - "raise" option} -constraints {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b d c}
-test textTag-11.5 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-11.5 {TkTextTagCmd - "raise" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -1340,9 +1091,7 @@ test textTag-11.5 {TkTextTagCmd - "raise" option} -constraints {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {sel a b d c}
-test textTag-11.6 {TkTextTagCmd - "raise" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-11.6 {TkTextTagCmd - "raise" option} -setup {
.t tag delete {*}[.t tag names]
.t tag remove sel 1.0 end
foreach i {a b c d} {
@@ -1356,20 +1105,14 @@ test textTag-11.6 {TkTextTagCmd - "raise" option} -constraints {
} -result {sel b c a d}
-test textTag-12.1 {TkTextTagCmd - "ranges" option} -constraints {
- haveCourier12
-} -body {
+test textTag-12.1 {TkTextTagCmd - "ranges" option} -body {
.t tag ranges
} -returnCodes error -result {wrong # args: should be ".t tag ranges tagName"}
-test textTag-12.2 {TkTextTagCmd - "ranges" option} -constraints {
- haveCourier12
-} -body {
+test textTag-12.2 {TkTextTagCmd - "ranges" option} -body {
.t tag delete x
.t tag ranges x
} -result {}
-test textTag-12.3 {TkTextTagCmd - "ranges" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-12.3 {TkTextTagCmd - "ranges" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.2
@@ -1379,9 +1122,7 @@ test textTag-12.3 {TkTextTagCmd - "ranges" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.2 2.3 2.7 4.6 5.2 5.5}
-test textTag-12.4 {TkTextTagCmd - "ranges" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-12.4 {TkTextTagCmd - "ranges" option} -setup {
.t tag delete x
} -body {
.t tag add x 1.0 3.0
@@ -1392,14 +1133,10 @@ test textTag-12.4 {TkTextTagCmd - "ranges" option} -constraints {
} -result {1.0 3.0 4.0 8.0}
-test textTag-13.1 {TkTextTagCmd - "remove" option} -constraints {
- haveCourier12
-} -body {
+test textTag-13.1 {TkTextTagCmd - "remove" option} -body {
.t tag remove
} -returnCodes error -result {wrong # args: should be ".t tag remove tagName index1 ?index2 index1 index2 ...?"}
-test textTag-13.2 {TkTextTagCmd - "remove" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-13.2 {TkTextTagCmd - "remove" option} -setup {
.t tag delete x
} -body {
.t tag add x 2.2 2.11
@@ -1408,9 +1145,7 @@ test textTag-13.2 {TkTextTagCmd - "remove" option} -constraints {
} -cleanup {
.t tag delete x
} -result {2.2 2.3 2.7 2.11}
-test textTag-13.3 {TkTextTagCmd - "remove" option} -constraints {
- haveCourier12
-} -setup {
+test textTag-13.3 {TkTextTagCmd - "remove" option} -setup {
destroy .t.e
} -body {
entry .t.e
@@ -1426,7 +1161,7 @@ test textTag-13.3 {TkTextTagCmd - "remove" option} -constraints {
} -result {Text}
-test textTag-14.1 {SortTags} -constraints haveCourier12 -setup {
+test textTag-14.1 {SortTags} -setup {
.t tag delete a b c d
} -body {
foreach i {a b c d} {
@@ -1437,7 +1172,7 @@ test textTag-14.1 {SortTags} -constraints haveCourier12 -setup {
.t tag delete a b c d
} -result {a b c d}
.t tag delete a b c d
-test textTag-14.2 {SortTags} -constraints haveCourier12 -setup {
+test textTag-14.2 {SortTags} -setup {
.t tag delete a b c d
} -body {
foreach i {a b c d} {
@@ -1450,7 +1185,7 @@ test textTag-14.2 {SortTags} -constraints haveCourier12 -setup {
} -cleanup {
.t tag delete a b c d
} -result {a b c d}
-test textTag-14.3 {SortTags} -constraints haveCourier12 -setup {
+test textTag-14.3 {SortTags} -setup {
.t tag delete {*}[.t tag names]
} -body {
for {set i 0} {$i < 30} {incr i} {
@@ -1460,7 +1195,7 @@ test textTag-14.3 {SortTags} -constraints haveCourier12 -setup {
} -cleanup {
.t tag delete {*}[.t tag names]
} -result {x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29}
-test textTag-14.4 {SortTags} -constraints haveCourier12 -setup {
+test textTag-14.4 {SortTags} -setup {
.t tag delete {*}[.t tag names]
} -body {
for {set i 0} {$i < 30} {incr i} {
@@ -1475,7 +1210,8 @@ test textTag-14.4 {SortTags} -constraints haveCourier12 -setup {
} -result {x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29}
-
+set curFont [.t cget -font]
+set curWrap [.t cget -wrap]
set c [.t bbox 2.1]
set x1 [expr {[lindex $c 0] + [lindex $c 2]/2}]
set y1 [expr {[lindex $c 1] + [lindex $c 3]/2}]
@@ -1485,8 +1221,17 @@ set y2 [expr {[lindex $c 1] + [lindex $c 3]/2}]
set c [.t bbox 4.3]
set x3 [expr {[lindex $c 0] + [lindex $c 2]/2}]
set y3 [expr {[lindex $c 1] + [lindex $c 3]/2}]
+.t configure -font $textWidgetFont -wrap none
+update
+set c [.t bbox 2.1]
+set x4 [expr [lindex $c 0] + [lindex $c 2]/2]
+set y4 [expr [lindex $c 1] + [lindex $c 3]/2]
+set c [.t bbox 3.2]
+set x5 [expr [lindex $c 0] + [lindex $c 2]/2]
+set y5 [expr [lindex $c 1] + [lindex $c 3]/2]
+.t configure -font $curFont -wrap $curWrap
-test textTag-15.1 {TkTextBindProc} -constraints haveCourier12 -setup {
+test textTag-15.1 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
@@ -1511,7 +1256,7 @@ test textTag-15.1 {TkTextBindProc} -constraints haveCourier12 -setup {
bind .t <ButtonRelease> {}
} -result {x-up up up y-up up}
-test textTag-15.2 {TkTextBindProc} -constraints haveCourier12 -setup {
+test textTag-15.2 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
@@ -1539,7 +1284,7 @@ test textTag-15.2 {TkTextBindProc} -constraints haveCourier12 -setup {
.t tag delete x y
} -result {x-enter | x-down | | x-up x-leave y-enter}
-test textTag-15.3 {TkTextBindProc} -constraints haveCourier12 -setup {
+test textTag-15.3 {TkTextBindProc} -setup {
.t tag delete x y
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
@@ -1572,9 +1317,7 @@ test textTag-15.3 {TkTextBindProc} -constraints haveCourier12 -setup {
} -result {x-enter | x-down | | | x-up | x-leave y-enter}
-test textTag-16.1 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.1 {TkTextPickCurrent procedure} -setup {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
} -body {
@@ -1595,25 +1338,25 @@ test textTag-16.1 {TkTextPickCurrent procedure} -constraints {
} -result {2.1 3.2 3.2 3.2 3.2 3.2 4.3}
test textTag-16.2 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
+ haveFontSizes
} -setup {
.t tag delete {*}[.t tag names]
event generate {} <Motion> -warp 1 -x -1 -y -1; update
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <ButtonRelease-1> -state 0x100 -x $x1 -y $y1
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <ButtonRelease-1> -state 0x100 -x $x4 -y $y4
+ event gen .t <Motion> -x $x5 -y $y5
set x [.t index current]
.t tag add big 3.0
update
lappend x [.t index current]
} -cleanup {
.t tag delete big
+ .t configure -font $curFont -wrap $curWrap
} -result {3.2 3.1}
-test textTag-16.3 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.3 {TkTextPickCurrent procedure} -setup {
foreach i {a b c d} {
.t tag remove $i 1.0 end
}
@@ -1640,9 +1383,7 @@ test textTag-16.3 {TkTextPickCurrent procedure} -constraints {
.t tag delete {*}[.t tag names]
} -result {enter-a enter-b | leave-b enter-c | leave-a leave-c}
-test textTag-16.4 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
-} -setup {
+test textTag-16.4 {TkTextPickCurrent procedure} -setup {
foreach i {a b c d} {
.t tag remove $i 1.0 end
}
@@ -1669,62 +1410,68 @@ test textTag-16.4 {TkTextPickCurrent procedure} -constraints {
} -result {enter-a enter-b enter-c | leave-c leave-b}
test textTag-16.5 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
+ haveFontSizes
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
.t index current
} -cleanup {
.t tag delete a big
+ .t configure -font $curFont -wrap $curWrap
} -result {3.2}
test textTag-16.6 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
+ haveFontSizes
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
update
.t index current
} -cleanup {
.t tag delete a big
+ .t configure -font $curFont -wrap $curWrap
} -result {3.1}
test textTag-16.7 {TkTextPickCurrent procedure} -constraints {
- haveCourier12
+ haveFontSizes
} -setup {
foreach i {big a b c d} {
.t tag remove $i 1.0 end
}
event generate {} <Motion> -warp 1 -x -1 -y -1; update
+ .t configure -font $textWidgetFont -wrap none
} -body {
.t tag configure big -font $bigFont
.t tag bind a <Enter> {.t tag add big 3.0 3.2}
.t tag add a 3.2
- event gen .t <Motion> -x $x1 -y $y1
+ event gen .t <Motion> -x $x4 -y $y4
.t tag bind a <Leave> {.t tag add big 3.0 3.2}
.t tag add a 2.1
- event gen .t <Motion> -x $x2 -y $y2
+ event gen .t <Motion> -x $x5 -y $y5
update
.t index current
} -cleanup {
.t tag delete a big
+ .t configure -font $curFont -wrap $curWrap
} -result {3.1}
@@ -1747,7 +1494,7 @@ test textTag-18.1 {TkTextPickCurrent tag bindings} -setup {
-highlightthickness 10 -pady 2
pack .t
update ; # map the window, otherwise -warp can't be done
-
+
.t insert end " Tag here " TAG " no tag here"
.t tag configure TAG -borderwidth 4 -relief raised
.t tag bind TAG <Enter> {lappend res "%x %y tag-Enter"}
diff --git a/tests/textWind.test b/tests/textWind.test
index 938357b..7e2d315 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -42,7 +42,7 @@ wm deiconify .
# This update is needed on MacOS to make sure that the window is mapped
# when the tests begin.
-update
+update
set bw [.t cget -borderwidth]
set px [.t cget -padx]
diff --git a/tests/tk.test b/tests/tk.test
index 748a6cf..c5c475e 100644
--- a/tests/tk.test
+++ b/tests/tk.test
@@ -10,6 +10,8 @@ eval tcltest::configure $argv
tcltest::loadTestedCommands
namespace import -force tcltest::test
+testConstraint testprintf [llength [info command testprintf]]
+
test tk-1.1 {tk command: general} -body {
tk
} -returnCodes error -result {wrong # args: should be "tk subcommand ?arg ...?"}
@@ -177,6 +179,10 @@ test tk-7.2 {tk inactive reset in a safe interpreter} -body {
::safe::interpDelete foo
} -returnCodes 1 -result {resetting the user inactivity timer is not allowed in a safe interpreter}
+test tk-8.1 {Test for ticket [1cc44617e2], see if TCL_LL_MODIFIER works as expected on all platforms} -constraints testprintf -body {
+ testprintf -21474836480
+} -result {-21474836480 18446744052234715136}
+
# tests of [tk busy] in busy.test
# cleanup
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test
index 45fe0fc..c14db9b 100644
--- a/tests/ttk/combobox.test
+++ b/tests/ttk/combobox.test
@@ -38,18 +38,18 @@ test combobox-2.3 "current -- change value" -body {
.cb current
} -result 1
-test combobox-2.4 "current -- value not in list" -body {
+test combobox-2.4 "current -- value not in list" -body {
.cb set "z"
.cb current
} -result -1
-test combobox-2.5 "current -- set to end index" -body {
+test combobox-2.5 "current -- set to end index" -body {
.cb configure -values [list a b c d e thelastone]
.cb current end
.cb get
} -result thelastone
-test combobox-2.6 "current -- set to unknown index" -body {
+test combobox-2.6 "current -- set to unknown index" -body {
.cb configure -values [list a b c d e]
.cb current notanindex
} -returnCodes error -result {Incorrect index notanindex}
@@ -58,7 +58,7 @@ test combobox-2.end "Cleanup" -body { destroy .cb }
test combobox-3 "Read postoffset value dynamically from current style" -body {
ttk::combobox .cb -values [list a b c] -style "DerivedStyle.TCombobox"
- pack .cb -expand true -fill both
+ pack .cb -expand true -fill both
ttk::style configure DerivedStyle.TCombobox -postoffset [list 25 0 0 0]
ttk::combobox::Post .cb
expr {[winfo rootx .cb.popdown] - [winfo rootx .cb]}
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test
index 34795fe..947b4f9 100644
--- a/tests/ttk/entry.test
+++ b/tests/ttk/entry.test
@@ -312,4 +312,22 @@ test entry-9.1 "Index range invariants" -setup {
destroy .e
}
+test entry-10.1 {configuration option: "-placeholder"} -setup {
+ pack [ttk::entry .e]
+} -body {
+ .e configure -placeholder {Some text}
+ .e cget -placeholder
+} -cleanup {
+ destroy .e
+} -result {Some text}
+
+test entry-10.2 {configuration option: "-placeholderforeground"} -setup {
+ pack [ttk::entry .e]
+} -body {
+ .e configure -placeholder {Some text} -placeholderforeground red
+ .e cget -placeholderforeground
+} -cleanup {
+ destroy .e
+} -result {red}
+
tcltest::cleanupTests
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index a55f7f8..5e48d5c 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -23,7 +23,7 @@ test image-2.0 "Deletion of displayed image (label)" -setup {
} -cleanup {
destroy .ttk_image20
} -result {}
-
+
test image-2.1 "Deletion of displayed image (checkbutton)" -setup {
image create photo test.image -width 10 -height 10
} -body {
diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test
index 28b4d2e..649c35f 100644
--- a/tests/ttk/labelframe.test
+++ b/tests/ttk/labelframe.test
@@ -70,7 +70,7 @@ test labelframe-3.6 "Destroy child slave" -body {
# @@@ but seems to succeed if it's some other widget class.
# @@@ I suspect a race condition; unable to track it down ATM.
#
-# @@@ FOLLOWUP: This *may* have been caused by a bug in ManagerIdleProc
+# @@@ FOLLOWUP: This *may* have been caused by a bug in ManagerIdleProc
# @@@ (see manager.c r1.11). There's still probably a race condition in here.
#
test labelframe-4.1 "Add nonchild slave" -body {
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index 7fe5c87..c1fc6ac 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -110,8 +110,8 @@ test panedwindow-2.end "Cleanup" -body { destroy .pw }
#
test panedwindow-3.0 "configure pane" -body {
ttk::panedwindow .pw
- .pw add [listbox .pw.lb1]
- .pw add [listbox .pw.lb2]
+ .pw add [listbox .pw.lb1]
+ .pw add [listbox .pw.lb2]
.pw pane 1 -weight 2
.pw pane 1 -weight
} -result 2
@@ -253,7 +253,7 @@ test paned-propagation-setup "Setup." -body {
frame .pw.f2 -width 100 -height 50
list [winfo reqwidth .pw.f1] [winfo reqheight .pw.f1]
-} -result [list 100 50]
+} -result [list 100 50]
test paned-propagation-1 "Initial request size" -body {
.pw add .pw.f1
diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test
index b9add86..7c888c6 100644
--- a/tests/ttk/progressbar.test
+++ b/tests/ttk/progressbar.test
@@ -82,4 +82,43 @@ test progressbar-end "Cleanup" -body {
destroy .pb
}
+# check existence and default value of each non-core option of the widget
+test progressbar-3.1 "progressbar non-core options" -setup {
+ set res {}
+ ttk::progressbar .defaultpb
+} -body {
+ foreach option {-anchor -foreground -justify -style -text -wraplength \
+ -length -maximum -mode -orient -phase -value -variable} {
+ lappend res [.defaultpb cget $option]
+ }
+ set res
+} -cleanup {
+ unset res
+ destroy .defaultpb
+} -result {w black left {} {} 0 100 100 determinate horizontal 0 0.0 {}}
+
+test progressbar-3.2 "TIP #442 options are taken into account" -setup {
+ set res {}
+ pack [ttk::progressbar .p -value 0 -maximum 50 -orient horizontal -mode determinate -length 500]
+ set thefont [font actual {Arial 10}]
+} -body {
+ .p configure -anchor c -foreground blue -justify right \
+ -text "TIP #442\noptions are now tested" -wraplength 100
+ update
+ .p step 10
+ .p configure -anchor e -font $thefont -foreground green -justify center \
+ -text "Changing the value of each option\nfrom TIP #442" -wraplength 250
+ update
+ .p step 20
+ .p configure -orient vertical -text "Cannot be seen"
+ update
+ foreach option {-anchor -foreground -justify -text -wraplength} {
+ lappend res [list $option [.p cget $option]]
+ }
+ set res
+} -cleanup {
+ unset res thefont
+ destroy .p
+} -result {{-anchor e} {-foreground green} {-justify center} {-text {Cannot be seen}} {-wraplength 250}}
+
tcltest::cleanupTests
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index 903328e..0743def 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -18,8 +18,8 @@ test scrollbar-swapout-1 "Don't use core scrollbars on OSX..." \
} -body {
ttk::scrollbar .sb -command "yadda"
list [winfo class .sb] [.sb cget -command]
-} -result [list TScrollbar yadda] -cleanup {
- destroy .sb
+} -result [list TScrollbar yadda] -cleanup {
+ destroy .sb
}
test scrollbar-swapout-2 "... regardless of whether -style ..." \
@@ -28,7 +28,7 @@ test scrollbar-swapout-2 "... regardless of whether -style ..." \
} -body {
ttk::style layout Vertical.Custom.TScrollbar \
[ttk::style layout Vertical.TScrollbar] ; # See #1833339
- ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
+ ttk::scrollbar .sb -command "yadda" -style Custom.TScrollbar
list [winfo class .sb] [.sb cget -command] [.sb cget -style]
} -result [list TScrollbar yadda Custom.TScrollbar] -cleanup {
destroy .sb
@@ -37,7 +37,7 @@ test scrollbar-swapout-2 "... regardless of whether -style ..." \
test scrollbar-swapout-3 "... or -class is specified." -constraints {
coreScrollbar
} -body {
- ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
+ ttk::scrollbar .sb -command "yadda" -class Custom.TScrollbar
list [winfo class .sb] [.sb cget -command]
} -result [list Custom.TScrollbar yadda] -cleanup {
destroy .sb
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index 08f2bda..38bae14 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -253,7 +253,7 @@ test spinbox-nostomp-3 "don't stomp on -variable (configure; -from/to)" -body {
test spinbox-nostomp-4 "don't stomp on -variable (configure; -values)" -body {
set SBV Apr
- ttk::spinbox .sb
+ ttk::spinbox .sb
.sb configure -textvariable SBV -values {Jan Feb Mar Apr May Jun Jul Aug}
list $SBV [.sb get]
} -cleanup {
@@ -278,7 +278,7 @@ test spinbox-dieoctaldie-1 "Cope with leading zeros" -body {
event generate .sb <<Decrement>>; lappend result $secs
set result
-} -result [list 07 08 09 10 11 10 09 08 07] -cleanup {
+} -result [list 07 08 09 10 11 10 09 08 07] -cleanup {
destroy .sb
unset secs
}
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test
index 7f26e2f..f91673f 100644
--- a/tests/ttk/treetags.test
+++ b/tests/ttk/treetags.test
@@ -105,7 +105,7 @@ test treetags-1.8 "tag names" -body {
} -result [list tag1 tag2 tag3]
test treetags-1.9 "tag names - tag added to item" -body {
- $tv item item1 -tags tag4
+ $tv item item1 -tags tag4
lsort [$tv tag names]
} -result [list tag1 tag2 tag3 tag4]
@@ -201,12 +201,12 @@ test treetags-3.4 "stomp tags in tag binding procedure" -body {
set result [list]
$tv tag bind rm1 <<Remove>> { lappend ::result rm1 [%W focus] <<Remove>> }
$tv tag bind rm2 <<Remove>> {
- lappend ::result rm2 [%W focus] <<Remove>>
+ lappend ::result rm2 [%W focus] <<Remove>>
%W item [%W focus] -tags {tag1}
}
$tv tag bind rm3 <<Remove>> { lappend ::result rm3 [%W focus] <<Remove>> }
- $tv item item1 -tags {rm1 rm2 rm3}
+ $tv item item1 -tags {rm1 rm2 rm3}
$tv focus item1
event generate $tv <<Remove>>
set result
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index c9dcf52..65ae55e 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -675,7 +675,7 @@ test treeview-3085489-2 "tag remove, no -tags" -setup {
test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup {
pack [ttk::treeview .tv]
- .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left"
+ .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left"
update
} -body {
foreach {x y w h} [.tv bbox foo #0] {}
@@ -694,7 +694,7 @@ test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup {
test treeview-ce470f20fd-1 "dragging further than the right edge of the treeview is allowed" -setup {
pack [ttk::treeview .tv]
- .tv heading #0 -text "Drag my right edge -->"
+ .tv heading #0 -text "Drag my right edge -->"
update
} -body {
set res [.tv column #0 -width]
@@ -764,7 +764,7 @@ test treeview-ce470f20fd-4 "changing -stretch resizes columns" -setup {
update idletasks ; # redisplay treeview
} -body {
# only some columns are displayed (and in a different order than declared
- # in -columns), a non-displayed column becomes stretchable --> nothing
+ # in -columns), a non-displayed column becomes stretchable --> nothing
# happens
set origTreeWidth [winfo width .tv]
set res [list [.tv column bar -width] [.tv column colA -width]]
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index ed1c31c..9f78966 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -134,8 +134,8 @@ test ttk-selfdestruct-ok-1 "Intentional self-destruction" -body {
#
# Basic tests.
#
-test ttk-1.1 "Create button" -body {
- pack [ttk::button .t] -expand true -fill both
+test ttk-1.1 "Create multiline button showing justified text" -body {
+ pack [ttk::button .t -text "Hello\nWorld!!" -justify center] -expand true -fill both
update
}
@@ -207,7 +207,7 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
set ttk28 {}
pack [ttk::button .b -command {set ::ttk28 failed}]
update
-} -body {
+} -body {
bind .b <ButtonPress-1> {after 0 {.b configure -state disabled}}
after 1 {event generate .b <ButtonPress-1>}
after 20 {event generate .b <ButtonRelease-1>}
diff --git a/tests/ttk/validate.test b/tests/ttk/validate.test
index 417deac..5755943 100644
--- a/tests/ttk/validate.test
+++ b/tests/ttk/validate.test
@@ -161,7 +161,7 @@ test validate-1.18 {entry widget validation} -constraints coreEntry -body {
list [.e cget -validate] $::vVals
} -result {none {.e -1 -1 nextdata newdata {} all forced}}
# DIFFERENCE: ttk::entry doesn't validate when setting linked -variable
-# DIFFERENCE: ttk::entry doesn't disable validation
+# DIFFERENCE: ttk::entry doesn't disable validation
proc doval {W d i P s S v V} {
set ::vVals [list $W $d $i $P $s $S $v $V]
diff --git a/tests/unixButton.test b/tests/unixButton.test
index 325f497..f0dcde5 100644
--- a/tests/unixButton.test
+++ b/tests/unixButton.test
@@ -16,7 +16,7 @@ imageInit
# Create entries in the option database to be sure that geometry options
# like border width have predictable values.
-
+
option add *Label.borderWidth 2
option add *Label.highlightThickness 0
option add *Label.font {Helvetica -12 bold}
@@ -70,7 +70,7 @@ test unixbutton-1.1 {TkpComputeButtonGeometry procedure} -constraints {
[expr {72 + $bigIndicator}] 52 \
[expr {72 + $bigIndicator}] 52]
test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -91,7 +91,7 @@ test unixbutton-1.2 {TkpComputeButtonGeometry procedure} -constraints {
[expr {27 + $smallIndicator}] 37 \
[expr {27 + $smallIndicator}] 37]
test unixbutton-1.3 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -192,7 +192,7 @@ test unixbutton-1.8 {TkpComputeButtonGeometry procedure} -constraints {
deleteWindows
} -result {62 30 56 24 58 22 62 22}
test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -200,9 +200,9 @@ test unixbutton-1.9 {TkpComputeButtonGeometry procedure} -constraints {
list [winfo reqwidth .b2] [winfo reqheight .b2]
} -cleanup {
deleteWindows
-} -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]]
+} -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]]
test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -212,7 +212,7 @@ test unixbutton-1.10 {TkpComputeButtonGeometry procedure} -constraints {
deleteWindows
} -result [list [expr {17 + $defaultBorder}] [expr {27 + $defaultBorder}]]
test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints {
- unix
+ unix
} -setup {
deleteWindows
} -body {
@@ -224,7 +224,7 @@ test unixbutton-1.11 {TkpComputeButtonGeometry procedure} -constraints {
test unixbutton-2.1 {disabled coloring check, bug 669595} -constraints {
- unix
+ unix
} -setup {
deleteWindows
catch {unset value}
diff --git a/tests/unixMenu.test b/tests/unixMenu.test
index 3d655e4..63e4849 100644
--- a/tests/unixMenu.test
+++ b/tests/unixMenu.test
@@ -35,7 +35,7 @@ test unixMenu-3.1 {TkpDestroymenuEntry - nothing to do} -constraints unix -body
test unixMenu-4.1 {TkpConfigureMenuEntry - non-cascade entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -44,7 +44,7 @@ test unixMenu-4.1 {TkpConfigureMenuEntry - non-cascade entry} -constraints {
list [.m1 entryconfigure test -label foo] [destroy .m1]
} -returnCodes ok -result {{} {}}
test unixMenu-4.2 {TkpConfigureMenuEntry - cascade entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -79,7 +79,7 @@ test unixMenu-7.1 {TkpSetMainMenubar - nothing to do} -constraints unix -body {}
test unixMenu-8.1 {GetMenuIndicatorGeometry - indicator off} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -89,7 +89,7 @@ test unixMenu-8.1 {GetMenuIndicatorGeometry - indicator off} -constraints {
destroy .m1
} -returnCodes ok
test unixMenu-8.2 {GetMenuIndicatorGeometry - not checkbutton or radio} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -112,9 +112,9 @@ test unixMenu-8.3 {GetMenuIndicatorGeometry - checkbutton image} -constraints {
destroy .m1
} -cleanup {
image delete image1
-} -returnCodes ok
+} -returnCodes ok
test unixMenu-8.4 {GetMenuIndicatorGeometry - checkbutton bitmap} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -125,7 +125,7 @@ test unixMenu-8.4 {GetMenuIndicatorGeometry - checkbutton bitmap} -constraints {
destroy .m1
} -returnCodes ok
test unixMenu-8.5 {GetMenuIndicatorGeometry - checkbutton} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -150,7 +150,7 @@ test unixMenu-8.6 {GetMenuIndicatorGeometry - radiobutton image} -constraints {
image delete image1
} -returnCodes ok
test unixMenu-8.7 {GetMenuIndicatorGeometry - radiobutton bitmap} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -159,9 +159,9 @@ test unixMenu-8.7 {GetMenuIndicatorGeometry - radiobutton bitmap} -constraints {
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
-} -returnCodes ok
+} -returnCodes ok
test unixMenu-8.8 {GetMenuIndicatorGeometry - radiobutton} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -172,7 +172,7 @@ test unixMenu-8.8 {GetMenuIndicatorGeometry - radiobutton} -constraints {
destroy .m1
} -returnCodes ok
test unixMenu-8.9 {GetMenuIndicatorGeometry - hideMargin} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -181,11 +181,11 @@ test unixMenu-8.9 {GetMenuIndicatorGeometry - hideMargin} -constraints {
.m1 invoke foo
tk::TearOffMenu .m1 40 40
destroy .m1
-} -returnCodes ok
+} -returnCodes ok
test unixMenu-9.1 {GetMenuAccelGeometry - cascade entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -195,7 +195,7 @@ test unixMenu-9.1 {GetMenuAccelGeometry - cascade entry} -constraints {
destroy .m1
} -returnCodes ok
test unixMenu-9.2 {GetMenuAccelGeometry - non-null label} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -215,7 +215,7 @@ test unixMenu-9.3 {GetMenuAccelGeometry - null label} -constraints unix -setup {
test unixMenu-10.1 {DrawMenuEntryBackground - active menubar} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -235,7 +235,7 @@ test unixMenu-10.2 {DrawMenuEntryBackground - active} -constraints unix -setup {
list [update] [destroy .m1]
} -returnCodes ok -result {{} {}}
test unixMenu-10.3 {DrawMenuEntryBackground - non-active} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -247,7 +247,7 @@ test unixMenu-10.3 {DrawMenuEntryBackground - non-active} -constraints {
test unixMenu-11.1 {DrawMenuEntryAccelerator - menubar} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -258,7 +258,7 @@ test unixMenu-11.1 {DrawMenuEntryAccelerator - menubar} -constraints {
} -result {{} {} {}}
# drawArrow parameter is never false under Unix
test unixMenu-11.2 {DrawMenuEntryAccelerator - cascade entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -268,7 +268,7 @@ test unixMenu-11.2 {DrawMenuEntryAccelerator - cascade entry} -constraints {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-11.3 {DrawMenuEntryAccelerator - normal entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -278,7 +278,7 @@ test unixMenu-11.3 {DrawMenuEntryAccelerator - normal entry} -constraints {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-11.4 {DrawMenuEntryAccelerator - null entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -290,7 +290,7 @@ test unixMenu-11.4 {DrawMenuEntryAccelerator - null entry} -constraints {
test unixMenu-12.1 {DrawMenuEntryIndicator - non-check or radio} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -300,7 +300,7 @@ test unixMenu-12.1 {DrawMenuEntryIndicator - non-check or radio} -constraints {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.2 {DrawMenuEntryIndicator - checkbutton - indicator off} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -310,7 +310,7 @@ test unixMenu-12.2 {DrawMenuEntryIndicator - checkbutton - indicator off} -const
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.3 {DrawMenuEntryIndicator - checkbutton - not selected} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -320,7 +320,7 @@ test unixMenu-12.3 {DrawMenuEntryIndicator - checkbutton - not selected} -constr
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.4 {DrawMenuEntryIndicator - checkbutton - selected} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -331,7 +331,7 @@ test unixMenu-12.4 {DrawMenuEntryIndicator - checkbutton - selected} -constraint
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.5 {DrawMenuEntryIndicator - radiobutton - indicator off} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -341,7 +341,7 @@ test unixMenu-12.5 {DrawMenuEntryIndicator - radiobutton - indicator off} -const
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.6 {DrawMenuEntryIndicator - radiobutton - not selected} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -351,7 +351,7 @@ test unixMenu-12.6 {DrawMenuEntryIndicator - radiobutton - not selected} -constr
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-12.7 {DrawMenuEntryIndicator - radiobutton - selected} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -446,7 +446,7 @@ test unixMenu-18.1 {GetTearoffEntryGeometry} -constraints {
# Don't know how to reproduce the case where the tkwin has been deleted.
test unixMenu-19.1 {TkpComputeMenubarGeometry - zero entries} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -456,7 +456,7 @@ test unixMenu-19.1 {TkpComputeMenubarGeometry - zero entries} -constraints {
} -result {{} {} {}}
# Don't know how to generate one width windows
test unixMenu-19.2 {TkpComputeMenubarGeometry - one entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -466,7 +466,7 @@ test unixMenu-19.2 {TkpComputeMenubarGeometry - one entry} -constraints {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.3 {TkpComputeMenubarGeometry - entry with different font} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -476,7 +476,7 @@ test unixMenu-19.3 {TkpComputeMenubarGeometry - entry with different font} -cons
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.4 {TkpComputeMenubarGeometry - separator} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -486,7 +486,7 @@ test unixMenu-19.4 {TkpComputeMenubarGeometry - separator} -constraints {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.5 {TkpComputeMenubarGeometry - First entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -496,7 +496,7 @@ test unixMenu-19.5 {TkpComputeMenubarGeometry - First entry} -constraints {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.6 {TkpComputeMenubarGeometry - First entry too wide} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -507,7 +507,7 @@ test unixMenu-19.6 {TkpComputeMenubarGeometry - First entry too wide} -constrain
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.7 {TkpComputeMenubarGeometry - two entries fit} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -519,7 +519,7 @@ test unixMenu-19.7 {TkpComputeMenubarGeometry - two entries fit} -constraints {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.8 {TkpComputeMenubarGeometry - two entries; 2nd don't fit} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -531,7 +531,7 @@ test unixMenu-19.8 {TkpComputeMenubarGeometry - two entries; 2nd don't fit} -con
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.9 {TkpComputeMenubarGeometry - two entries; 1st dont fit} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -543,7 +543,7 @@ test unixMenu-19.9 {TkpComputeMenubarGeometry - two entries; 1st dont fit} -cons
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.10 {TkpComputeMenubarGeometry - two entries; neither fit} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -645,7 +645,7 @@ test unixMenu-19.18 {TkpComputeMenubarGeometry - ABC} -constraints unix -setup {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.19 {TkpComputeMenubarGeometry - help menu in first position} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -661,7 +661,7 @@ test unixMenu-19.19 {TkpComputeMenubarGeometry - help menu in first position} -c
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.20 {TkpComputeMenubarGeometry - help menu in middle} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -677,7 +677,7 @@ test unixMenu-19.20 {TkpComputeMenubarGeometry - help menu in middle} -constrain
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.21 {TkpComputeMenubarGeometry - help menu in first position} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -693,7 +693,7 @@ test unixMenu-19.21 {TkpComputeMenubarGeometry - help menu in first position} -c
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.22 {TkpComputeMenubarGeometry - help item fits} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -707,7 +707,7 @@ test unixMenu-19.22 {TkpComputeMenubarGeometry - help item fits} -constraints {
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.23 {TkpComputeMenubarGeometry - help item does not fit} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -721,7 +721,7 @@ test unixMenu-19.23 {TkpComputeMenubarGeometry - help item does not fit} -constr
list [update] [. configure -menu ""] [destroy .m1]
} -result {{} {} {}}
test unixMenu-19.24 {TkpComputeMenubarGeometry - help item only one} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -766,7 +766,7 @@ test unixMenu-22.1 {SetHelpMenu - no menubars} -constraints unix -setup {
} -result {.m1.test {}}
# Don't know how to automate missing tkwins
test unixMenu-22.2 {SetHelpMenu - menubar but no help menu} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -776,7 +776,7 @@ test unixMenu-22.2 {SetHelpMenu - menubar but no help menu} -constraints {
list [menu .m1.file] [. configure -menu ""] [destroy .m1]
} -result {.m1.file {} {}}
test unixMenu-22.3 {SetHelpMenu - menubar with help menu} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -786,7 +786,7 @@ test unixMenu-22.3 {SetHelpMenu - menubar with help menu} -constraints {
list [menu .m1.help] [. configure -menu ""] [destroy .m1]
} -result {.m1.help {} {}}
test unixMenu-22.4 {SetHelpMenu - multiple menubars with same help menu} -constraints {
- unix
+ unix
} -setup {
destroy .m1 .t2
} -body {
@@ -801,7 +801,7 @@ test unixMenu-22.4 {SetHelpMenu - multiple menubars with same help menu} -constr
test unixMenu-23.1 {TkpDrawMenuEntry - gc for active and not strict motif} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -812,7 +812,7 @@ test unixMenu-23.1 {TkpDrawMenuEntry - gc for active and not strict motif} -cons
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.2 {TkpDrawMenuEntry - gc for active menu item with its own gc} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -823,7 +823,7 @@ test unixMenu-23.2 {TkpDrawMenuEntry - gc for active menu item with its own gc}
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -835,7 +835,7 @@ test unixMenu-23.3 {TkpDrawMenuEntry - gc for active and strict motif} -constrai
list [update] [destroy .m1] [set tk_strictMotif 0]
} -result {{} {} 0}
test unixMenu-23.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -845,7 +845,7 @@ test unixMenu-23.4 {TkpDrawMenuEntry - gc for disabled with disabledfg and custo
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -855,7 +855,7 @@ test unixMenu-23.5 {TkpDrawMenuEntry - gc for disabled with disabledFg} -constra
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -865,7 +865,7 @@ test unixMenu-23.6 {TkpDrawMenuEntry - gc for disabled - no disabledFg} -constra
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.7 {TkpDrawMenuEntry - gc for normal - custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -883,7 +883,7 @@ test unixMenu-23.8 {TkpDrawMenuEntry - gc for normal} -constraints unix -setup {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -894,7 +894,7 @@ test unixMenu-23.9 {TkpDrawMenuEntry - gc for indicator - custom entry} -constra
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -905,7 +905,7 @@ test unixMenu-23.10 {TkpDrawMenuEntry - gc for indicator} -constraints {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.11 {TkpDrawMenuEntry - border - custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -925,7 +925,7 @@ test unixMenu-23.12 {TkpDrawMenuEntry - border} -constraints unix -setup {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.13 {TkpDrawMenuEntry - active border - strict motif} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -937,7 +937,7 @@ test unixMenu-23.13 {TkpDrawMenuEntry - active border - strict motif} -constrain
list [update] [destroy .m1] [set tk_strictMotif 0]
} -result {{} {} 0}
test unixMenu-23.14 {TkpDrawMenuEntry - active border - custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -957,7 +957,7 @@ test unixMenu-23.15 {TkpDrawMenuEntry - active border} -constraints unix -setup
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.16 {TkpDrawMenuEntry - font - custom entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -991,7 +991,7 @@ test unixMenu-23.19 {TkpDrawMenuEntry - standard} -constraints unix -setup {
list [update] [destroy .m1]
} -result {{} {}}
test unixMenu-23.20 {TkpDrawMenuEntry - disabled cascade item} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1058,7 +1058,7 @@ test unixMenu-24.4 {GetMenuLabelGeometry - text} -constraints unix -setup {
test unixMenu-25.1 {TkpComputeStandardMenuGeometry - no entries} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1066,7 +1066,7 @@ test unixMenu-25.1 {TkpComputeStandardMenuGeometry - no entries} -constraints {
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.2 {TkpComputeStandardMenuGeometry - one entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1075,7 +1075,7 @@ test unixMenu-25.2 {TkpComputeStandardMenuGeometry - one entry} -constraints {
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.3 {TkpComputeStandardMenuGeometry - more than one entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1085,7 +1085,7 @@ test unixMenu-25.3 {TkpComputeStandardMenuGeometry - more than one entry} -const
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.4 {TkpComputeStandardMenuGeometry - separator} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1106,7 +1106,7 @@ test unixMenu-25.5 {TkpComputeStandardMenuGeometry - tearoff entry} -constraints
list [update] [tk::MenuUnpost .mb.m] [destroy .mb]
} -result {{} {} {}}
test unixMenu-25.6 {TkpComputeStandardMenuGeometry - standard label geometry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1115,7 +1115,7 @@ test unixMenu-25.6 {TkpComputeStandardMenuGeometry - standard label geometry} -c
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.7 {TkpComputeStandardMenuGeometry - different font for entry} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1124,7 +1124,7 @@ test unixMenu-25.7 {TkpComputeStandardMenuGeometry - different font for entry} -
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.8 {TkpComputeStandardMenuGeometry - second entry larger} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1134,7 +1134,7 @@ test unixMenu-25.8 {TkpComputeStandardMenuGeometry - second entry larger} -const
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.9 {TkpComputeStandardMenuGeometry - first entry larger} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1144,7 +1144,7 @@ test unixMenu-25.9 {TkpComputeStandardMenuGeometry - first entry larger} -constr
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.10 {TkpComputeStandardMenuGeometry - accelerator} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1153,7 +1153,7 @@ test unixMenu-25.10 {TkpComputeStandardMenuGeometry - accelerator} -constraints
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.11 {TkpComputeStandardMenuGeometry - second accel larger} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1163,7 +1163,7 @@ test unixMenu-25.11 {TkpComputeStandardMenuGeometry - second accel larger} -cons
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.12 {TkpComputeStandardMenuGeometry - second accel smaller} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1173,7 +1173,7 @@ test unixMenu-25.12 {TkpComputeStandardMenuGeometry - second accel smaller} -con
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.13 {TkpComputeStandardMenuGeometry - indicator} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1211,7 +1211,7 @@ test unixMenu-25.15 {TkpComputeStandardMenuGeometry - second indicator larger }
list [update idletasks] [destroy .m1] [image delete image1]
} -result {{} {} {}}
test unixMenu-25.16 {TkpComputeStandardMenuGeometry - zero sized menus} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1219,7 +1219,7 @@ test unixMenu-25.16 {TkpComputeStandardMenuGeometry - zero sized menus} -constra
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.17 {TkpComputeStandardMenuGeometry - first column bigger} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1230,7 +1230,7 @@ test unixMenu-25.17 {TkpComputeStandardMenuGeometry - first column bigger} -cons
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.18 {TkpComputeStandardMenuGeometry - second column bigger} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1241,7 +1241,7 @@ test unixMenu-25.18 {TkpComputeStandardMenuGeometry - second column bigger} -con
list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.19 {TkpComputeStandardMenuGeometry - three columns} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
@@ -1252,10 +1252,10 @@ test unixMenu-25.19 {TkpComputeStandardMenuGeometry - three columns} -constraint
.m1 add command -label four
.m1 add command -label five -columnbreak 1
.m1 add command -label six
- list [update idletasks] [destroy .m1]
+ list [update idletasks] [destroy .m1]
} -result {{} {}}
test unixMenu-25.20 {TkpComputeStandardMenuGeometry - hide margin} -constraints {
- unix
+ unix
} -setup {
destroy .m1
} -body {
diff --git a/tests/util.test b/tests/util.test
index c1ec6a5..d457b50 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -28,10 +28,10 @@ test util-1.3 {Tk_GetScrollInfo procedure} -body {
} -result {0.5 0.75}
test util-1.4 {Tk_GetScrollInfo procedure} -body {
.l yview scroll a
-} -returnCodes error -result {wrong # args: should be ".l yview scroll number units|pages"}
+} -returnCodes error -result {wrong # args: should be ".l yview scroll number pages|units"}
test util-1.5 {Tk_GetScrollInfo procedure} -body {
.l yview scroll a b c
-} -returnCodes error -result {wrong # args: should be ".l yview scroll number units|pages"}
+} -returnCodes error -result {wrong # args: should be ".l yview scroll number pages|units"}
test util-1.6 {Tk_GetScrollInfo procedure} -body {
.l yview scroll xyz units
} -returnCodes error -result {expected integer but got "xyz"}
@@ -57,7 +57,7 @@ test util-1.10 {Tk_GetScrollInfo procedure} -body {
} -result {13}
test util-1.11 {Tk_GetScrollInfo procedure} -body {
.l yview scroll 3 zips
-} -returnCodes error -result {bad argument "zips": must be units or pages}
+} -returnCodes error -result {bad argument "zips": must be pages or units}
test util-1.12 {Tk_GetScrollInfo procedure} -body {
.l yview dropdead 3 times
} -returnCodes error -result {unknown option "dropdead": must be moveto or scroll}
diff --git a/tests/visual_bb.test b/tests/visual_bb.test
index 2b06d05..030a369 100644
--- a/tests/visual_bb.test
+++ b/tests/visual_bb.test
@@ -52,7 +52,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body {
frame .menu -relief raised -borderwidth 1
message .msg -font {Times 18} -relief raised -width 4i \
-borderwidth 1 -text "This application provides a collection of visual tests for the Tk toolkit. Each menu entry invokes a test, which displays information on the screen. You can then verify visually that the information is being displayed in the correct way. The tests under the \"Postscript\" menu exercise the Postscript-generation capabilities of canvas widgets."
-
+
pack .menu -side top -fill x
pack .msg -side bottom -expand yes -fill both
@@ -64,7 +64,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body {
menubutton .menu.file -text "File" -menu .menu.file.m
menu .menu.file.m
.menu.file.m add command -label "Quit" -command end
-
+
menubutton .menu.group1 -text "Group 1" -menu .menu.group1.m
menu .menu.group1.m
.menu.group1.m add command -label "Canvas arcs" -command {runTest arc.tcl}
@@ -76,7 +76,7 @@ test 1.1 {running visual tests} -constraints userInteraction -body {
-command {runTest butGeom.tcl}
.menu.group1.m add command -label "Label/button colors" \
-command {runTest butGeom2.tcl}
-
+
menubutton .menu.ps -text "Canvas Postscript" -menu .menu.ps.m
menu .menu.ps.m
.menu.ps.m add command -label "Rectangles and other graphics" \
@@ -89,11 +89,11 @@ test 1.1 {running visual tests} -constraints userInteraction -body {
-command {runTest canvPsImg.tcl}
.menu.ps.m add command -label "Arcs" \
-command {runTest canvPsArc.tcl}
-
+
pack .menu.file .menu.group1 .menu.ps -side left -padx 1m
-
+
# Set up for keyboard-based menu traversal
-
+
bind . <Any-FocusIn> {
if {("%d" == "NotifyVirtual") && ("%m" == "NotifyNormal")} {
focus .menu
diff --git a/tests/winDialog.test b/tests/winDialog.test
index 852a38a..e70ae3f 100755
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -255,7 +255,7 @@ test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints {
set y [then {
Click cancel
}]
- # Note this also tests fix for
+ # Note this also tests fix for
# https://core.tcl-lang.org/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6
# $x is expected to be empty
append x $y
@@ -441,7 +441,7 @@ test winDialog-5.9 {GetFileName: file types} -constraints {
nt testwinevent
} -body {
# case FILE_TYPES:
-
+
start {tk_getSaveFile -filetypes {{"foo files" .foo FOOF}} -title Foo}
# XXX - currently disabled for vista style dialogs because the file
# types control has no control ID and we don't have a mechanism to
@@ -504,7 +504,7 @@ test winDialog-5.12.1 {tk_getSaveFile: initial directory: ~} -constraints {
test winDialog-5.12.2 {tk_getSaveFile: initial directory: ~user} -constraints {
nt testwinevent
} -body {
-
+
# Note: this test will fail on Tcl versions 8.6.4 and earlier due
# to a bug in file normalize for names of the form ~xxx that
# returns the wrong dir on Windows. In particular (in Win8 at
@@ -731,7 +731,7 @@ test winDialog-5.17 {GetFileName: title} -constraints {
nt testwinevent
} -body {
# case FILE_TITLE:
-
+
start {tk_getOpenFile -title Narf}
then {
Click cancel
@@ -794,7 +794,7 @@ test winDialog-5.21 {GetFileName: call GetOpenFileName} -constraints {
nt testwinevent english
} -body {
# winCode = GetOpenFileName(&ofn);
-
+
start {tk_getOpenFile -title Open}
then {
set x [GetText ok]
@@ -927,7 +927,7 @@ test winDialog-9.8 {Tk_ChooseDirectoryObjCmd: initial directory: Tcl_TranslateFi
} -body {
# if (Tcl_TranslateFileName(interp, string,
# &utfDirString) == NULL)
-
+
tk_chooseDirectory -initialdir ~12x/455
} -returnCodes error -result {user "12x" doesn't exist}
diff --git a/tests/winFont.test b/tests/winFont.test
index 377ef41..23c09c9 100644
--- a/tests/winFont.test
+++ b/tests/winFont.test
@@ -4,7 +4,7 @@
# Many of these tests are visually oriented and cannot be checked
# programmatically (such as "does an underlined font appear to be
# underlined?"); these tests attempt to exercise the code in question,
-# but there are no results that can be checked.
+# but there are no results that can be checked.
#
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
@@ -71,7 +71,7 @@ test winfont-2.7 {TkpGetFontFromAttributes procedure: Times fonts} -constraints
lappend x [font actual {-family "Times"} -family]
lappend x [font actual {-family "New York"} -family]
lappend x [font actual {-family "Times New Roman"} -family]
-} -result {{Times New Roman} {Times New Roman} {Times New Roman}}
+} -result {Times Times {Times New Roman}}
test winfont-2.8 {TkpGetFontFromAttributes procedure: Courier fonts} -constraints {
win
} -setup {
@@ -80,7 +80,7 @@ test winfont-2.8 {TkpGetFontFromAttributes procedure: Courier fonts} -constraint
lappend x [font actual {-family "Courier"} -family]
lappend x [font actual {-family "Monaco"} -family]
lappend x [font actual {-family "Courier New"} -family]
-} -result {{Courier New} {Courier New} {Courier New}}
+} -match regexp -result {Courier (Courier|Monaco) {Courier New}}
test winfont-2.9 {TkpGetFontFromAttributes procedure: Helvetica fonts} -constraints {
win
} -setup {
@@ -89,7 +89,7 @@ test winfont-2.9 {TkpGetFontFromAttributes procedure: Helvetica fonts} -constrai
lappend x [font actual {-family "Helvetica"} -family]
lappend x [font actual {-family "Geneva"} -family]
lappend x [font actual {-family "Arial"} -family]
-} -result {Arial Arial Arial}
+} -match regexp -result {Helvetica (Helvetica|Geneva) Arial}
test winfont-2.10 {TkpGetFontFromAttributes procedure: fallback} -constraints {
win
} -body {
@@ -141,7 +141,7 @@ test winfont-5.1 {Tk_MeasureChars procedure: unbounded right margin} -constraint
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap 0 -text "000000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
@@ -160,7 +160,7 @@ test winfont-5.2 {Tk_MeasureChars procedure: static width buffer exceeded} -cons
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap 100000 -text "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
list [expr {[winfo reqwidth .t.l] eq 256*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
@@ -179,7 +179,7 @@ test winfont-5.3 {Tk_MeasureChars procedure: all chars did fit} -constraints {
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*10}] -text "00000000"
list [expr {[winfo reqwidth .t.l] eq 8*$ax}] \
[expr {[winfo reqheight .t.l] eq $ay}]
@@ -198,7 +198,7 @@ test winfont-5.4 {Tk_MeasureChars procedure: not all chars fit} -constraints {
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*6}] -text "00000000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
@@ -234,7 +234,7 @@ test winfont-5.6 {Tk_MeasureChars procedure: at least one char on line} -constra
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -text "000000" -wrap 1
list [expr {[winfo reqwidth .t.l] eq $ax}] \
[expr {[winfo reqheight .t.l] eq 6*$ay}]
@@ -253,7 +253,7 @@ test winfont-5.7 {Tk_MeasureChars procedure: whole words} -constraints {
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*8}] -text "000000 0000"
list [expr {[winfo reqwidth .t.l] eq 6*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
@@ -272,7 +272,7 @@ test winfont-5.8 {Tk_MeasureChars procedure: already saw space in line} -constra
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*12}] -text "000000 0000000"
list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
@@ -291,7 +291,7 @@ test winfont-5.9 {Tk_MeasureChars procedure: internal spaces significant} -const
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*12}] -text "000 00 00000"
list [expr {[winfo reqwidth .t.l] eq 7*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
@@ -310,7 +310,7 @@ test winfont-5.10 {Tk_MeasureChars procedure: make first part of word fit} -cons
update
set ax [winfo reqwidth .t.l]
set ay [winfo reqheight .t.l]
-
+
.t.l config -wrap [expr {$ax*12}] -text "0000000000000000"
list [expr {[winfo reqwidth .t.l] eq 12*$ax}] \
[expr {[winfo reqheight .t.l] eq 2*$ay}]
@@ -327,7 +327,7 @@ test winfont-5.11 {Tk_MeasureChars procedure: check for kerning} -constraints {
-text "0" -font systemfixed
pack .t.l
update
-
+
set font [.t.l cget -font]
.t.l config -font {{MS Sans Serif} 8} -text "W"
set width [winfo reqwidth .t.l]
diff --git a/tests/winMenu.test b/tests/winMenu.test
index ce2069f..b77e9a9 100644
--- a/tests/winMenu.test
+++ b/tests/winMenu.test
@@ -481,7 +481,7 @@ test winMenu-11.3 {TkWinHandleMenuEvent - WM_COMMAND} -constraints {
"error 1"
(menu invoke)}} {} {}}
-
+
# Can't test WM_MENUCHAR
test winMenu-11.4 {TkWinHandleMenuEvent - WM_MEASUREITEM} -constraints {
@@ -788,7 +788,7 @@ test winMenu-22.1 {DrawMenuUnderline} -constraints win -setup {
.m1 add command -label foo -underline 0
set tearoff [tk::TearOffMenu .m1 40 40]
list [update] [destroy .m1]
-} -result {{} {}}
+} -result {{} {}}
test winMenu-23.1 {Don't know how to test MenuKeyBindProc} -constraints {
@@ -1343,7 +1343,7 @@ test winMenu-32.19 {TkpComputeStandardMenuGeometry - three columns} -constraints
.m1 add command -label four
.m1 add command -label five -columnbreak 1
.m1 add command -label six
- list [update idletasks] [destroy .m1]
+ list [update idletasks] [destroy .m1]
} -result {{} {}}
diff --git a/tests/winWm.test b/tests/winWm.test
index ad4988d..d251eb8 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -245,7 +245,7 @@ test winWm-5.2 {UpdateGeometryInfo: menu resizing} -constraints win -setup {
update
set y [winfo rooty .t]
lappend result [winfo height .t]
- menu .t.m
+ menu .t.m -tearoff 1
.t configure -menu .t.m
.t.m add command -label foo
.t.m add command -label "thisisreallylong"
@@ -474,7 +474,7 @@ test winWm-9.0 "Bug #2799589 - delayed activation of destroyed window" -constrai
global winwm90done
set winwm90done wait
toplevel .t
-} -body {
+} -body {
pack [button .t.b -text "Show" -command {winwm90proc1 .tx}]
bind .t.b <Map> {bind %W <Map> {}; after idle {winwm90click %W}}
after 5000 {set winwm90done timeout}
@@ -485,7 +485,7 @@ test winWm-9.0 "Bug #2799589 - delayed activation of destroyed window" -constrai
rename winwm90$cmd {}
}
destroy .tx .t .sd
-} -result {ok}
+} -result {ok}
test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win -setup {
proc winwm91click {w} {
@@ -519,7 +519,7 @@ test winWm-9.1 "delayed activation of grabbed destroyed window" -constraints win
global winwm91done
set winwm91done wait
toplevel .t
-} -body {
+} -body {
pack [button .t.b -text "Show" -command {winwm91proc1 .tx}]
bind .t.b <Map> {bind %W <Map> {}; after idle {winwm91click %W}}
after 5000 {set winwm91done timeout}
diff --git a/tests/wm.test b/tests/wm.test
index 4d0d73b..2978c1b 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -1525,7 +1525,7 @@ test wm-stackorder-5.1 {a menu is not a toplevel} -body {
test wm-stackorder-5.2 {A normal toplevel can't be raised above an \
overrideredirect toplevel on unix} -constraints x11 -body {
toplevel .t
- tkwait visibility .t
+ tkwait visibility .t
wm overrideredirect .t 1
raise .
update
@@ -1537,7 +1537,7 @@ test wm-stackorder-5.2 {A normal toplevel can't be raised above an \
test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \
overrideredirect toplevel on macOS or win} -constraints aquaOrWin32 -body {
toplevel .t
- tkwait visibility .t
+ tkwait visibility .t
wm overrideredirect .t 1
raise .
update
@@ -1549,7 +1549,7 @@ test wm-stackorder-5.2.1 {A normal toplevel can be raised above an \
test wm-stackorder-5.3 {An overrideredirect window\
can be explicitly lowered} -body {
toplevel .t
- tkwait visibility .t
+ tkwait visibility .t
wm overrideredirect .t 1
lower .t
update
diff --git a/unix/Makefile.in b/unix/Makefile.in
index c6f8c25..6062edc 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -96,7 +96,7 @@ HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR)
CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
# Directory in which to install the demo files:
-DEMO_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY)/demos
+DEMO_INSTALL_DIR = $(INSTALL_ROOT)@DEMO_DIR@
# The directory containing the Tcl sources and headers appropriate
# for this version of Tk ("srcdir" will be replaced or has already
@@ -188,8 +188,8 @@ KEYSYM_FLAGS =
# Tk does not used deprecated Tcl constructs so it should
# compile fine with -DTCL_NO_DEPRECATED. To remove its own
# set of deprecated code uncomment the second line.
-NO_DEPRECATED_FLAGS =
-#NO_DEPRECATED_FLAGS = -DTK_NO_DEPRECATED
+NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED
+#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED
# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
@@ -228,7 +228,7 @@ INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DATA_DIR = ${INSTALL} -d -m 755
# The symbol below provides support for dynamic loading and shared
-# libraries. See configure.in for a description of what it means.
+# libraries. See configure.ac for a description of what it means.
# The value of the symbol is normally set by the configure script.
SHLIB_CFLAGS = @SHLIB_CFLAGS@ -DBUILD_tk
@@ -267,7 +267,7 @@ LIBS = @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@
WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @TCL_LIBS@ @EXTRA_WISH_LIBS@
# The symbols below provide support for dynamic loading and shared
-# libraries. See configure.in for a description of what the
+# libraries. See configure.ac for a description of what the
# symbols mean. The values of the symbols are normally set by the
# configure script. You shouldn't normally need to modify any of
# these definitions by hand.
@@ -357,7 +357,7 @@ CANV_OBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \
tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o
IMAGE_OBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPNG.o tkImgPPM.o \
- tkImgPhoto.o tkImgPhInstance.o
+ tkImgPhoto.o tkImgPhInstance.o tkImgListFormat.o tkImgSVGnano.o
TEXT_OBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
tkTextMark.o tkTextTag.o tkTextWind.o
@@ -370,8 +370,9 @@ GENERIC_OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkBusy.o \
tkClipboard.o \
tkCmds.o tkColor.o tkConfig.o tkConsole.o tkCursor.o tkError.o \
tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \
- tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \
- tkSelect.o tkStyle.o tkUndo.o tkUtil.o tkVisual.o tkWindow.o
+ tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o \
+ tkPkgConfig.o tkPlace.o tkSelect.o tkStyle.o tkUndo.o tkUtil.o \
+ tkVisual.o tkWindow.o
TTK_OBJS = \
ttkBlink.o ttkButton.o ttkCache.o ttkClamTheme.o ttkClassicTheme.o \
@@ -433,6 +434,7 @@ GENERIC_SRCS = \
$(GENERIC_DIR)/tkGrid.c $(GENERIC_DIR)/tkConsole.c \
$(GENERIC_DIR)/tkMain.c $(GENERIC_DIR)/tkOption.c \
$(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \
+ $(GENERIC_DIR)/tkPkgConfig.c \
$(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkStyle.c \
$(GENERIC_DIR)/tkUndo.c $(GENERIC_DIR)/tkUtil.c \
$(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \
@@ -451,8 +453,9 @@ GENERIC_SRCS = \
$(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \
$(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \
$(GENERIC_DIR)/tkImgPNG.c $(GENERIC_DIR)/tkImgPPM.c \
+ $(GENERIC_DIR)/tkImgSVGnano.c $(GENERIC_DIR)/tkImgSVGnano.c \
$(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhInstance.c \
- $(GENERIC_DIR)/tkText.c \
+ $(GENERIC_DIR)/tkImgListFormat.c $(GENERIC_DIR)/tkText.c \
$(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \
$(GENERIC_DIR)/tkTextImage.c \
$(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
@@ -728,7 +731,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE}
echo "Creating package index $(PKG_INDEX)"; \
rm -f "$(PKG_INDEX)"; \
(\
- echo "if {[catch {package present Tcl 8.6.0}]} return";\
+ 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]";\
@@ -1014,6 +1017,32 @@ tkOption.o: $(GENERIC_DIR)/tkOption.c
tkPack.o: $(GENERIC_DIR)/tkPack.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPack.c
+# TIP #59, embedding of configuration information into the binary library.
+#
+# Part of Tk's configuration information are the paths where it was installed
+# and where it will look for its libraries (which can be different). We derive
+# this information from the variables which can be overridden by the user. As
+# every path can be configured separately we do not remember one general
+# prefix/exec_prefix but all the different paths individually.
+
+tkPkgConfig.o: $(GENERIC_DIR)/tkPkgConfig.c
+ $(CC) -c $(CC_SWITCHES) \
+ -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_DOCDIR="\"$(MAN_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_DEMODIR="\"$(DEMO_INSTALL_DIR)\"" \
+ \
+ -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
+ -DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \
+ -DCFG_RUNTIME_SCRDIR="\"$(TK_LIBRARY)\"" \
+ -DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \
+ -DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \
+ -DCFG_RUNTIME_DEMODIR="\"$(DEMO_INSTALL_DIR)\"" \
+ \
+ $(GENERIC_DIR)/tkPkgConfig.c
+
tkPlace.o: $(GENERIC_DIR)/tkPlace.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlace.c
@@ -1110,6 +1139,9 @@ tkImage.o: $(GENERIC_DIR)/tkImage.c
tkImgBmap.o: $(GENERIC_DIR)/tkImgBmap.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgBmap.c
+tkImgListFormat.o: $(GENERIC_DIR)/tkImgListFormat.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgListFormat.c
+
tkImgGIF.o: $(GENERIC_DIR)/tkImgGIF.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgGIF.c
@@ -1119,6 +1151,9 @@ tkImgPNG.o: $(GENERIC_DIR)/tkImgPNG.c
tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c
+tkImgSVGnano.o: $(GENERIC_DIR)/tkImgSVGnano.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgSVGnano.c
+
tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkImgPhoto.h
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c
@@ -1476,7 +1511,7 @@ $(TTK_DIR)/ttkStubInit.c: $(TTK_DIR)/ttk.decls
genstubs:
$(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
$(GENERIC_DIR)/tk.decls $(GENERIC_DIR)/tkInt.decls
- $(TCL_EXE) $(TTK_DIR)/ttkGenStubs.tcl $(TTK_DIR) $(TTK_DIR)/ttk.decls
+ $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(TTK_DIR) $(TTK_DIR)/ttk.decls
#
# Target to check that all exported functions have an entry in the stubs
@@ -1539,7 +1574,10 @@ DISTNAME = tk${VERSION}${PATCH_LEVEL}
ZIPNAME = tk${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip
DISTDIR = $(DISTROOT)/$(DISTNAME)
TCLDIR = @TCL_SRC_DIR@
-$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in $(UNIX_DIR)/tcl.m4 \
+DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644
+DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755
+
+$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tcl.m4 \
$(UNIX_DIR)/aclocal.m4
cd $(UNIX_DIR); autoconf
$(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure
@@ -1547,95 +1585,93 @@ $(MAC_OSX_DIR)/configure: $(MAC_OSX_DIR)/configure.ac $(UNIX_DIR)/configure
$(UNIX_DIR)/tkConfig.h.in: $(MAC_OSX_DIR)/configure
cd $(MAC_OSX_DIR); autoheader; touch $@
-dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(MAC_OSX_DIR)/configure genstubs
+dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(MAC_OSX_DIR)/configure genstubs
rm -rf $(DISTDIR)
- mkdir -p $(DISTDIR)/unix
- cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
- cp $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
- chmod 664 $(DISTDIR)/unix/Makefile.in
- cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in $(UNIX_DIR)/tk.spec \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tk.spec \
$(UNIX_DIR)/aclocal.m4 $(UNIX_DIR)/tcl.m4 \
$(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
$(UNIX_DIR)/README $(UNIX_DIR)/installManPage \
$(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(DISTDIR)/unix
- chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
- mkdir $(DISTDIR)/bitmaps
+ $(DIST_INSTALL_SCRIPT) $(UNIX_DIR)/configure $(DISTDIR)/unix
+ $(INSTALL_DATA_DIR) $(DISTDIR)/bitmaps
@(cd $(TOP_DIR); for i in bitmaps/* ; do \
if [ -f $$i ] ; then \
sed -e 's/static char/static unsigned char/' \
$$i > $(DISTDIR)/$$i; \
fi; \
done;)
- mkdir $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/*.[ch] $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
- cp -p $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/*.[ch] $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/README $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog \
$(TOP_DIR)/ChangeLog.2??? $(TOP_DIR)/README.md \
$(TOP_DIR)/license.terms $(DISTDIR)
rm -f $(DISTDIR)/generic/blt*.[ch]
- mkdir $(DISTDIR)/generic/ttk
- cp -p $(TTK_DIR)/*.[ch] $(TTK_DIR)/ttk.decls \
- $(TTK_DIR)/ttkGenStubs.tcl $(DISTDIR)/generic/ttk
- mkdir $(DISTDIR)/win
- cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
- cp $(TOP_DIR)/win/configure.in \
- $(TOP_DIR)/win/configure \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/generic/ttk
+ $(DIST_INSTALL_DATA) $(TTK_DIR)/*.[ch] $(TTK_DIR)/ttk.decls \
+ $(DISTDIR)/generic/ttk
+ $(INSTALL_DATA_DIR) $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/configure.ac \
$(TOP_DIR)/win/tkConfig.sh.in \
$(TOP_DIR)/win/aclocal.m4 $(TOP_DIR)/win/tcl.m4 \
$(DISTDIR)/win
- cp -p $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.bat $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/*.vc $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
- mkdir $(DISTDIR)/win/rc
- cp -p $(TOP_DIR)/win/wish.exe.manifest.in $(DISTDIR)/win/
- cp -p $(TOP_DIR)/win/rc/*.{rc,cur,ico,bmp} $(DISTDIR)/win/rc
- mkdir $(DISTDIR)/macosx
- cp -p $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
+ $(DIST_INSTALL_SCRIPT) $(TOP_DIR)/win/configure $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.bat $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/*.vc $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/README $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/win
+ $(INSTALL_DATA_DIR) $(DISTDIR)/win/rc
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/wish.exe.manifest.in $(DISTDIR)/win/
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/rc/*.{rc,cur,ico,bmp} $(DISTDIR)/win/rc
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
$(MAC_OSX_DIR)/*.icns $(MAC_OSX_DIR)/*.tiff \
$(MAC_OSX_DIR)/*.[ch] $(MAC_OSX_DIR)/*.in \
$(MAC_OSX_DIR)/*.ac $(MAC_OSX_DIR)/*.xcconfig \
- $(MAC_OSX_DIR)/*.sdef $(MAC_OSX_DIR)/configure \
+ $(MAC_OSX_DIR)/*.sdef \
$(DISTDIR)/macosx
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/macosx
- mkdir $(DISTDIR)/macosx/Tk.xcode
- cp -p $(MAC_OSX_DIR)/Tk.xcode/project.pbxproj \
+ $(DIST_INSTALL_SCRIPT) $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/macosx
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tk.xcode
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tk.xcode/project.pbxproj \
$(MAC_OSX_DIR)/Tk.xcode/default.pbxuser \
$(DISTDIR)/macosx/Tk.xcode
- mkdir $(DISTDIR)/macosx/Tk.xcodeproj
- cp -p $(MAC_OSX_DIR)/Tk.xcodeproj/project.pbxproj \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tk.xcodeproj
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tk.xcodeproj/project.pbxproj \
$(MAC_OSX_DIR)/Tk.xcodeproj/default.pbxuser \
$(DISTDIR)/macosx/Tk.xcodeproj
- mkdir $(DISTDIR)/compat
- cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
- $(TCLDIR)/compat/stdlib.h \
- $(DISTDIR)/compat
- mkdir $(DISTDIR)/xlib
- cp -p $(XLIB_DIR)/*.[ch] $(DISTDIR)/xlib
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib
- mkdir $(DISTDIR)/xlib/X11
- cp -p $(XLIB_DIR)/X11/*.h $(DISTDIR)/xlib/X11
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
- mkdir $(DISTDIR)/library
- cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/compat
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/compat
+ $(INSTALL_DATA_DIR) $(DISTDIR)/xlib
+ $(DIST_INSTALL_DATA) $(XLIB_DIR)/*.[ch] $(DISTDIR)/xlib
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/xlib
+ $(INSTALL_DATA_DIR) $(DISTDIR)/xlib/X11
+ $(DIST_INSTALL_DATA) $(XLIB_DIR)/X11/*.h $(DISTDIR)/xlib/X11
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
$(TOP_DIR)/library/tclIndex \
$(DISTDIR)/library
- mkdir $(DISTDIR)/library/ttk
- cp -p $(TOP_DIR)/library/ttk/*.tcl $(DISTDIR)/library/ttk
- mkdir $(DISTDIR)/library/images
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/ttk
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/library/ttk/*.tcl $(DISTDIR)/library/ttk
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/images
@(cd $(TOP_DIR); for i in library/images/* ; do \
if [ -f $$i ] ; then \
- cp $$i $(DISTDIR)/$$i; \
+ $(DIST_INSTALL_DATA) $$i $(DISTDIR)/$$i; \
fi; \
done;)
- mkdir $(DISTDIR)/library/msgs
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/msgs
@(cd $(TOP_DIR); for i in library/msgs/*.msg ; do \
if [ -f $$i ] ; then \
- cp $$i $(DISTDIR)/$$i; \
+ $(DIST_INSTALL_DATA) $$i $(DISTDIR)/$$i; \
fi; \
done;)
- mkdir $(DISTDIR)/library/demos
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/demos
cp -pr $(TOP_DIR)/library/demos/*.tcl \
$(TOP_DIR)/library/demos/*.msg \
$(TOP_DIR)/library/demos/tclIndex \
@@ -1648,21 +1684,21 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(M
$(TOP_DIR)/library/demos/widget \
$(TOP_DIR)/library/demos/README \
$(TOP_DIR)/license.terms $(DISTDIR)/library/demos
- mkdir $(DISTDIR)/library/demos/images
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/demos/images
@(cd $(TOP_DIR); for i in library/demos/images/* ; do \
if [ -f $$i ] ; then \
- cp $$i $(DISTDIR)/$$i; \
+ $(DIST_INSTALL_DATA) $$i $(DISTDIR)/$$i; \
fi; \
done;)
- mkdir $(DISTDIR)/doc
- cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/doc
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
$(TCLDIR)/doc/man.macros $(DISTDIR)/doc
- mkdir $(DISTDIR)/tests
- cp -p $(TOP_DIR)/license.terms $(TEST_DIR)/*.{test,tcl} \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tests
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(TEST_DIR)/*.{test,tcl} \
$(TEST_DIR)/README $(TEST_DIR)/*.{gif,png,ppm,xbm} \
$(TEST_DIR)/option.file* $(DISTDIR)/tests
- mkdir $(DISTDIR)/tests/ttk
- cp -p $(TEST_DIR)/ttk/*.{test,tcl} $(DISTDIR)/tests/ttk
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tests/ttk
+ $(DIST_INSTALL_DATA) $(TEST_DIR)/ttk/*.{test,tcl} $(DISTDIR)/tests/ttk
alldist: dist
rm -f $(DISTROOT)/$(DISTNAME)-src.tar.gz $(DISTROOT)/$(ZIPNAME)
diff --git a/unix/configure b/unix/configure
index fb0f5a3..2035672 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1,81 +1,459 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for tk 8.6.
+# Generated by GNU Autoconf 2.69 for tk 8.7.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_unset $as_var
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
fi
-done
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -83,146 +461,91 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -231,89 +554,250 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='tk'
PACKAGE_TARNAME='tk'
-PACKAGE_VERSION='8.6'
-PACKAGE_STRING='tk 8.6'
+PACKAGE_VERSION='8.7'
+PACKAGE_STRING='tk 8.7'
PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR ac_ct_AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY LIB_RUNTIME_DIR PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS CFBUNDLELOCALIZATIONS TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS'
+ac_subst_vars='LTLIBOBJS
+REZ_FLAGS
+REZ
+APP_RSRC_FILE
+LIB_RSRC_FILE
+WISH_RSRC_FILE
+TK_RSRC_FILE
+CFBUNDLELOCALIZATIONS
+EXTRA_WISH_LIBS
+EXTRA_BUILD_HTML
+EXTRA_INSTALL_BINARIES
+EXTRA_INSTALL
+EXTRA_APP_CC_SWITCHES
+EXTRA_CC_SWITCHES
+HTML_DIR
+PRIVATE_INCLUDE_DIR
+LIB_RUNTIME_DIR
+TK_LIBRARY
+TK_PKG_DIR
+TK_WINDOWINGSYSTEM
+LOCALES
+XLIBSW
+XINCLUDES
+TCL_STUB_FLAGS
+TK_BUILD_LIB_SPEC
+LD_LIBRARY_PATH_VAR
+TK_SHARED_BUILD
+TK_SRC_DIR
+TK_BUILD_STUB_LIB_PATH
+TK_BUILD_STUB_LIB_SPEC
+TK_INCLUDE_SPEC
+TK_STUB_LIB_PATH
+TK_STUB_LIB_SPEC
+TK_STUB_LIB_FLAG
+TK_STUB_LIB_FILE
+TK_LIB_SPEC
+TK_LIB_FLAG
+TK_LIB_FILE
+TK_YEAR
+TK_PATCH_LEVEL
+TK_MINOR_VERSION
+TK_MAJOR_VERSION
+TK_VERSION
+TK_DEMO_DIR
+DEMO_DIR
+UNIX_FONT_OBJS
+XFT_LIBS
+XFT_CFLAGS
+XMKMF
+LDFLAGS_DEFAULT
+CFLAGS_DEFAULT
+INSTALL_STUB_LIB
+DLL_INSTALL_DIR
+INSTALL_LIB
+MAKE_STUB_LIB
+MAKE_LIB
+SHLIB_SUFFIX
+SHLIB_CFLAGS
+SHLIB_LD_LIBS
+TK_SHLIB_LD_EXTRAS
+TCL_SHLIB_LD_EXTRAS
+SHLIB_LD
+STLIB_LD
+LD_SEARCH_FLAGS
+CC_SEARCH_FLAGS
+LDFLAGS_OPTIMIZE
+LDFLAGS_DEBUG
+CFLAGS_WARNING
+CFLAGS_OPTIMIZE
+CFLAGS_DEBUG
+LDAIX_SRC
+PLAT_SRCS
+PLAT_OBJS
+DL_OBJS
+DL_LIBS
+TCL_LIBS
+EGREP
+GREP
+CPP
+LIBOBJS
+AR
+RANLIB
+SHARED_BUILD
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAN_FLAGS
+BUILD_TCLSH
+TCLSH_PROG
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_PATCH_LEVEL
+TCL_VERSION
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+OBJEXT_FOR_BUILD'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_tcl
+enable_man_symlinks
+enable_man_compression
+enable_man_suffix
+with_encoding
+enable_shared
+enable_64bit
+enable_64bit_vis
+enable_rpath
+enable_corefoundation
+enable_load
+enable_symbols
+enable_aqua
+with_x
+enable_xft
+enable_xss
+enable_framework
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+XMKMF'
+
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -336,34 +820,49 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -385,33 +884,59 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -438,6 +963,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -462,13 +993,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -533,6 +1067,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -583,26 +1127,36 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -622,27 +1176,26 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -650,31 +1203,36 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
-done
+fi
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -688,8 +1246,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -701,74 +1257,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -777,7 +1331,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tk 8.6 to adapt to many kinds of systems.
+\`configure' configures tk 8.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -791,20 +1345,17 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -814,18 +1365,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/tk]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -838,11 +1396,12 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tk 8.6:";;
+ short | recursive ) echo "Configuration of tk 8.7:";;
esac
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-man-symlinks use symlinks for the manpages (default: off)
@@ -852,7 +1411,6 @@ Optional Features:
use STRING as a suffix to manpage file names
(default: no, tk if enabled without
specifying STRING)
- --enable-threads build with threads (default: on)
--enable-shared build and link with shared libraries (default: on)
--enable-64bit enable 64bit support (default: off)
--enable-64bit-vis enable 64bit Sparc VIS support (default: off)
@@ -872,6 +1430,8 @@ 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-x use the X Window System
Some influential environment variables:
@@ -879,128 +1439,504 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ XMKMF Path to xmkmf, Makefile generator for X Window System
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to the package provider.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tk configure 8.6
-generated by GNU Autoconf 2.59
+tk configure 8.7
+generated by GNU Autoconf 2.69
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tk $as_me 8.6, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+It was created by tk $as_me 8.7, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -1019,7 +1955,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1031,8 +1967,9 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
} >&5
@@ -1054,7 +1991,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1065,13 +2001,13 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1087,104 +2023,115 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
@@ -1192,112 +2139,137 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1310,35 +2282,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-TK_VERSION=8.6
+TK_VERSION=8.7
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".10"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a3"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -1357,15 +2304,15 @@ LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
# we reset no_tcl in case something fails here
no_tcl=true
-# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
- withval="$with_tcl"
- with_tclconfig="${withval}"
-fi;
- echo "$as_me:$LINENO: checking for Tcl configuration" >&5
-echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
- if test "${ac_cv_c_tclconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+# Check whether --with-tcl was given.
+if test "${with_tcl+set}" = set; then :
+ withval=$with_tcl; with_tclconfig="${withval}"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+ if ${ac_cv_c_tclconfig+:} false; then :
+ $as_echo_n "(cached) " >&6
else
@@ -1374,17 +2321,15 @@ else
case "${with_tclconfig}" in
*/tclConfig.sh )
if test -f "${with_tclconfig}"; then
- { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
-echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
fi ;;
esac
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
else
- { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
-echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
fi
fi
@@ -1431,11 +2376,11 @@ echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+ `ls -d /usr/lib/tcl8.7 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
@@ -1463,28 +2408,26 @@ fi
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
- { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&5
-echo "$as_me: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
else
no_tcl=
TCL_BIN_DIR="${ac_cv_c_tclconfig}"
- echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
fi
- echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- echo "$as_me:$LINENO: result: loading" >&5
-echo "${ECHO_T}loading" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
. "${TCL_BIN_DIR}/tclConfig.sh"
else
- echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
# eval is required to do the TCL_DBGX substitution
@@ -1544,26 +2487,22 @@ echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
- { { echo "$as_me:$LINENO: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}" >&5
-echo "$as_me: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
+Found config for Tcl ${TCL_VERSION}" "$LINENO" 5
fi
if test "${TCL_MINOR_VERSION}" -lt 6 ; then
- { { echo "$as_me:$LINENO: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}" >&5
-echo "$as_me: error: ${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
-Found config for Tcl ${TCL_VERSION}" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
+Found config for Tcl ${TCL_VERSION}" "$LINENO" 5
+fi
fi
- echo "$as_me:$LINENO: checking for tclsh" >&5
-echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
- if test "${ac_cv_path_tclsh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
+$as_echo_n "checking for tclsh... " >&6; }
+ if ${ac_cv_path_tclsh+:} false; then :
+ $as_echo_n "(cached) " >&6
else
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
@@ -1584,22 +2523,22 @@ fi
if test -f "$ac_cv_path_tclsh" ; then
TCLSH_PROG="$ac_cv_path_tclsh"
- echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
-echo "${ECHO_T}$TCLSH_PROG" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5
+$as_echo "$TCLSH_PROG" >&6; }
else
# It is not an error if an installed version of Tcl can't be located.
TCLSH_PROG=""
- echo "$as_me:$LINENO: result: No tclsh found on PATH" >&5
-echo "${ECHO_T}No tclsh found on PATH" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: No tclsh found on PATH" >&5
+$as_echo "No tclsh found on PATH" >&6; }
fi
- echo "$as_me:$LINENO: checking for tclsh in Tcl build directory" >&5
-echo $ECHO_N "checking for tclsh in Tcl build directory... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh in Tcl build directory" >&5
+$as_echo_n "checking for tclsh in Tcl build directory... " >&6; }
BUILD_TCLSH="${TCL_BIN_DIR}"/tclsh
- echo "$as_me:$LINENO: result: $BUILD_TCLSH" >&5
-echo "${ECHO_T}$BUILD_TCLSH" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_TCLSH" >&5
+$as_echo "$BUILD_TCLSH" >&6; }
@@ -1622,62 +2561,60 @@ TK_SRC_DIR="`cd "$srcdir"/..; pwd`"
#------------------------------------------------------------------------
- echo "$as_me:$LINENO: checking whether to use symlinks for manpages" >&5
-echo $ECHO_N "checking whether to use symlinks for manpages... $ECHO_C" >&6
- # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
-if test "${enable_man_symlinks+set}" = set; then
- enableval="$enable_man_symlinks"
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use symlinks for manpages" >&5
+$as_echo_n "checking whether to use symlinks for manpages... " >&6; }
+ # Check whether --enable-man-symlinks was given.
+if test "${enable_man_symlinks+set}" = set; then :
+ enableval=$enable_man_symlinks; test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
else
enableval="no"
-fi;
- echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
-
- echo "$as_me:$LINENO: checking whether to compress the manpages" >&5
-echo $ECHO_N "checking whether to compress the manpages... $ECHO_C" >&6
- # Check whether --enable-man-compression or --disable-man-compression was given.
-if test "${enable_man_compression+set}" = set; then
- enableval="$enable_man_compression"
- case $enableval in
- yes) { { echo "$as_me:$LINENO: error: missing argument to --enable-man-compression" >&5
-echo "$as_me: error: missing argument to --enable-man-compression" >&2;}
- { (exit 1); exit 1; }; };;
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compress the manpages" >&5
+$as_echo_n "checking whether to compress the manpages... " >&6; }
+ # Check whether --enable-man-compression was given.
+if test "${enable_man_compression+set}" = set; then :
+ enableval=$enable_man_compression; case $enableval in
+ yes) as_fn_error $? "missing argument to --enable-man-compression" "$LINENO" 5;;
no) ;;
*) MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
esac
else
enableval="no"
-fi;
- echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
if test "$enableval" != "no"; then
- echo "$as_me:$LINENO: checking for compressed file suffix" >&5
-echo $ECHO_N "checking for compressed file suffix... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compressed file suffix" >&5
+$as_echo_n "checking for compressed file suffix... " >&6; }
touch TeST
$enableval TeST
Z=`ls TeST* | sed 's/^....//'`
rm -f TeST*
MAN_FLAGS="$MAN_FLAGS --extension $Z"
- echo "$as_me:$LINENO: result: $Z" >&5
-echo "${ECHO_T}$Z" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $Z" >&5
+$as_echo "$Z" >&6; }
fi
- echo "$as_me:$LINENO: checking whether to add a package name suffix for the manpages" >&5
-echo $ECHO_N "checking whether to add a package name suffix for the manpages... $ECHO_C" >&6
- # Check whether --enable-man-suffix or --disable-man-suffix was given.
-if test "${enable_man_suffix+set}" = set; then
- enableval="$enable_man_suffix"
- case $enableval in
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add a package name suffix for the manpages" >&5
+$as_echo_n "checking whether to add a package name suffix for the manpages... " >&6; }
+ # Check whether --enable-man-suffix was given.
+if test "${enable_man_suffix+set}" = set; then :
+ enableval=$enable_man_suffix; case $enableval in
yes) enableval="tk" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
no) ;;
*) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
esac
else
enableval="no"
-fi;
- echo "$as_me:$LINENO: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enableval" >&5
+$as_echo "$enableval" >&6; }
@@ -1700,10 +2637,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1713,35 +2650,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1751,39 +2690,50 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1793,77 +2743,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1874,18 +2784,19 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1903,24 +2814,25 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1930,39 +2842,41 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1972,66 +2886,78 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2043,112 +2969,108 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
- echo "$as_me: failed program was:" >&5
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2156,38 +3078,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2199,45 +3173,46 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2251,55 +3226,34 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2310,39 +3264,49 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-ac_cv_prog_cc_g=no
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2358,23 +3322,18 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2397,12 +3356,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2417,205 +3381,37 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2623,18 +3419,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
@@ -2643,41 +3435,16 @@ $ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
done
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -2695,25 +3462,215 @@ _ACEOF
esac
+#------------------------------------------------------------------------
+# If we're using GCC, see if the compiler understands -pipe. If so, use it.
+# It makes compiling go faster. (This is only a performance feature.)
+#------------------------------------------------------------------------
+
+if test -z "$no_pipe" && test -n "$GCC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
+$as_echo_n "checking if the compiler understands -pipe... " >&6; }
+if ${tcl_cv_cc_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_cc_pipe=yes
+else
+ tcl_cv_cc_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
+$as_echo "$tcl_cv_cc_pipe" >&6; }
+ if test $tcl_cv_cc_pipe = yes; then
+ CFLAGS="$CFLAGS -pipe"
+ fi
+fi
+
+#------------------------------------------------------------------------
+# Embedded configuration information, encoding to use for the values, TIP #59
+#------------------------------------------------------------------------
+
+
+
+# Check whether --with-encoding was given.
+if test "${with_encoding+set}" = set; then :
+ withval=$with_encoding; with_tcencoding=${withval}
+fi
+
+
+ if test x"${with_tcencoding}" != x ; then
+
+cat >>confdefs.h <<_ACEOF
+#define TCL_CFGVAL_ENCODING "${with_tcencoding}"
+_ACEOF
+
+ else
+
+$as_echo "#define TCL_CFGVAL_ENCODING \"iso8859-1\"" >>confdefs.h
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
+$as_echo_n "checking how to build libraries... " >&6; }
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; tcl_ok=$enableval
+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; }
+ SHARED_BUILD=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
+ SHARED_BUILD=0
+
+$as_echo "#define STATIC_BUILD 1" >>confdefs.h
+
+ fi
+
+
+
#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
+# The statements below define a collection of compile flags. This
+# macro depends on the value of SHARED_BUILD, and should be called
+# after SC_ENABLE_SHARED checks the configure switches.
#--------------------------------------------------------------------
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2727,11 +3684,7 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2740,78 +3693,34 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
break
fi
@@ -2823,8 +3732,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -2834,11 +3743,7 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2847,85 +3752,40 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -2935,31 +3795,142 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
@@ -2974,51 +3945,23 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
else
ac_cv_header_stdc=no
fi
@@ -3028,18 +3971,14 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
+ $EGREP "free" >/dev/null 2>&1; then :
+
else
ac_cv_header_stdc=no
fi
@@ -3049,16 +3988,13 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
:
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ctype.h>
+#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -3078,109 +4014,39 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+ ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
@@ -3188,1007 +4054,51 @@ fi
done
-if test "${ac_cv_header_stdlib_h+set}" = set; then
- echo "$as_me:$LINENO: checking for stdlib.h" >&5
-echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_stdlib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking stdlib.h usability" >&5
-echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <stdlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking stdlib.h presence" >&5
-echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for stdlib.h" >&5
-echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_stdlib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_stdlib_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
-
-fi
-if test $ac_cv_header_stdlib_h = yes; then
- tk_ok=1
-else
- tk_ok=0
-fi
-
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtol" >/dev/null 2>&1; then
- :
-else
- tk_ok=0
-fi
-rm -f conftest*
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtoul" >/dev/null 2>&1; then
- :
-else
- tk_ok=0
-fi
-rm -f conftest*
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtod" >/dev/null 2>&1; then
- :
-else
- tk_ok=0
-fi
-rm -f conftest*
-
-if test $tk_ok = 0; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_STDLIB_H 1
-_ACEOF
-
-fi
-
-#------------------------------------------------------------------------
-# If we're using GCC, see if the compiler understands -pipe. If so, use it.
-# It makes compiling go faster. (This is only a performance feature.)
-#------------------------------------------------------------------------
-
-if test -z "$no_pipe" && test -n "$GCC"; then
- echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
-echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
-if test "${tcl_cv_cc_pipe+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- tcl_cv_cc_pipe=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_pipe=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$hold_cflags
-fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
-echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
- if test $tcl_cv_cc_pipe = yes; then
- CFLAGS="$CFLAGS -pipe"
- fi
-fi
-
-#------------------------------------------------------------------------
-# Threads support - this auto-enables if Tcl was compiled threaded
-#------------------------------------------------------------------------
-
-
- # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
- enableval="$enable_threads"
- tcl_ok=$enableval
-else
- tcl_ok=yes
-fi;
-
- if test "${TCL_THREADS}" = 1; then
- tcl_threaded_core=1;
- fi
-
- if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
- TCL_THREADS=1
- # USE_THREAD_ALLOC tells us to try the special thread-based
- # allocator that significantly reduces lock contention
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_ALLOC 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
-
- if test "`uname -s`" = "SunOS" ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
-
- fi
-
-cat >>confdefs.h <<\_ACEOF
-#define _THREAD_SAFE 1
-_ACEOF
-
- echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_pthread_pthread_mutex_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread_pthread_mutex_init=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
- tcl_ok=yes
-else
- tcl_ok=no
-fi
-
- if test "$tcl_ok" = "no"; then
- # Check a little harder for __pthread_mutex_init in the same
- # library, as some systems hide it there until pthread.h is
- # defined. We could alternatively do an AC_TRY_COMPILE with
- # pthread.h, but that will work with libpthread really doesn't
- # exist, like AIX 4.2. [Bug: 4359]
- echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
-echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
-if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char __pthread_mutex_init ();
-int
-main ()
-{
-__pthread_mutex_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_pthread___pthread_mutex_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthread___pthread_mutex_init=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
-if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
- tcl_ok=yes
-else
- tcl_ok=no
-fi
-
- fi
-
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthread"
- else
- echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
-if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthreads $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_pthreads_pthread_mutex_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pthreads_pthread_mutex_init=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
-if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
- tcl_ok=yes
-else
- tcl_ok=no
-fi
-
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthreads"
- else
- echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
-if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_c_pthread_mutex_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_pthread_mutex_init=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_pthread_mutex_init = yes; then
- tcl_ok=yes
-else
- tcl_ok=no
-fi
-
- if test "$tcl_ok" = "no"; then
- echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
-echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
-if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_init ();
-int
-main ()
-{
-pthread_mutex_init ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_c_r_pthread_mutex_init=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_c_r_pthread_mutex_init=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
-if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
- tcl_ok=yes
-else
- tcl_ok=no
-fi
-
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -pthread"
- else
- TCL_THREADS=0
- { echo "$as_me:$LINENO: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&5
-echo "$as_me: WARNING: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." >&2;}
- fi
- fi
- fi
- fi
-
- # Does the pthread-implementation provide
- # 'pthread_attr_setstacksize' ?
-
- ac_saved_libs=$LIBS
- LIBS="$LIBS $THREADS_LIBS"
-
-
-for ac_func in pthread_attr_setstacksize pthread_atfork
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- LIBS=$ac_saved_libs
- else
- TCL_THREADS=0
- fi
- # Do checking message here to not mess up interleaved configure output
- echo "$as_me:$LINENO: checking for building with threads" >&5
-echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
- if test "${TCL_THREADS}" = 1; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
-
- if test "${tcl_threaded_core}" = 1; then
- echo "$as_me:$LINENO: result: yes (threaded core)" >&5
-echo "${ECHO_T}yes (threaded core)" >&6
- else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- fi
- else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
-
-
-
-
-# Add the threads support libraries
-LIBS="$LIBS$THREADS_LIBS"
-
-
- echo "$as_me:$LINENO: checking how to build libraries" >&5
-echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
- # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
-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
- echo "$as_me:$LINENO: result: shared" >&5
-echo "${ECHO_T}shared" >&6
- SHARED_BUILD=1
- else
- echo "$as_me:$LINENO: result: static" >&5
-echo "${ECHO_T}static" >&6
- SHARED_BUILD=0
-
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_BUILD 1
-_ACEOF
-
- fi
-
-
-#--------------------------------------------------------------------
-# The statements below define a collection of compile flags. This
-# macro depends on the value of SHARED_BUILD, and should be called
-# after SC_ENABLE_SHARED checks the configure switches.
-#--------------------------------------------------------------------
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
# Step 0.a: Enable 64 bit support?
- echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
-echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
- # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
- enableval="$enable_64bit"
- do64bit=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
+$as_echo_n "checking if 64bit support is requested... " >&6; }
+ # Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+ enableval=$enable_64bit; do64bit=$enableval
else
do64bit=no
-fi;
- echo "$as_me:$LINENO: result: $do64bit" >&5
-echo "${ECHO_T}$do64bit" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
+$as_echo "$do64bit" >&6; }
# Step 0.b: Enable Solaris 64 bit VIS support?
- echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
-echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
- # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
-if test "${enable_64bit_vis+set}" = set; then
- enableval="$enable_64bit_vis"
- do64bitVIS=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
+$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
+ # Check whether --enable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then :
+ enableval=$enable_64bit_vis; do64bitVIS=$enableval
else
do64bitVIS=no
-fi;
- echo "$as_me:$LINENO: result: $do64bitVIS" >&5
-echo "${ECHO_T}$do64bitVIS" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
+$as_echo "$do64bitVIS" >&6; }
# Force 64bit on with VIS
- if test "$do64bitVIS" = "yes"; then
+ if test "$do64bitVIS" = "yes"; then :
do64bit=yes
fi
-
# Step 0.c: Check if visibility support is available. Do this here so
# that platform specific alternatives can be used below if this fails.
- echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
-echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
-if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
+$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
+if ${tcl_cv_cc_visibility_hidden+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
extern __attribute__((__visibility__("hidden"))) void f(void);
@@ -4201,96 +4111,61 @@ f();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_cc_visibility_hidden=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_visibility_hidden=no
+ tcl_cv_cc_visibility_hidden=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
-echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
- if test $tcl_cv_cc_visibility_hidden = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
+$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
+ if test $tcl_cv_cc_visibility_hidden = yes; then :
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
-_ACEOF
+$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HIDDEN 1
-_ACEOF
+$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
fi
-
# Step 0.d: Disable -rpath support?
- echo "$as_me:$LINENO: checking if rpath support is requested" >&5
-echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
- # Check whether --enable-rpath or --disable-rpath was given.
-if test "${enable_rpath+set}" = set; then
- enableval="$enable_rpath"
- doRpath=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
+$as_echo_n "checking if rpath support is requested... " >&6; }
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+ enableval=$enable_rpath; doRpath=$enableval
else
doRpath=yes
-fi;
- echo "$as_me:$LINENO: result: $doRpath" >&5
-echo "${ECHO_T}$doRpath" >&6
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
+$as_echo "$doRpath" >&6; }
# Step 1: set the variable "system" to hold the name and version number
# for the system.
- echo "$as_me:$LINENO: checking system version" >&5
-echo $ECHO_N "checking system version... $ECHO_C" >&6
-if test "${tcl_cv_sys_version+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
+$as_echo_n "checking system version... " >&6; }
+if ${tcl_cv_sys_version+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test -f /usr/lib/NextStep/software_version; then
- tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ tcl_cv_sys_version=windows
else
tcl_cv_sys_version=`uname -s`-`uname -r`
if test "$?" -ne 0 ; then
- { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
-echo "$as_me: WARNING: can't find uname command" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
+$as_echo "$as_me: WARNING: can't find uname command" >&2;}
tcl_cv_sys_version=unknown
else
- # Special check for weird MP-RAS system (uname returns weird
- # results, and the version is kept in special file).
-
- if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
- fi
if test "`uname -s`" = "AIX" ; then
tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
fi
@@ -4301,79 +4176,51 @@ echo "$as_me: WARNING: can't find uname command" >&2;}
fi
fi
-echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
-echo "${ECHO_T}$tcl_cv_sys_version" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
+$as_echo "$tcl_cv_sys_version" >&6; }
system=$tcl_cv_sys_version
# Step 2: check for existence of -ldl library. This is needed because
# Linux can use either -ldl or -ldld for dynamic loading.
- echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
-dlopen ();
+return dlopen ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
+ ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
have_dl=yes
else
have_dl=no
@@ -4399,10 +4246,10 @@ fi
ECHO_VERSION='`echo ${VERSION}`'
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith"
else
@@ -4410,14 +4257,13 @@ else
CFLAGS_WARNING=""
fi
-
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -4427,35 +4273,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -4465,27 +4313,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- AR=$ac_ct_AR
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
else
AR="$ac_cv_prog_AR"
fi
@@ -4495,15 +4354,12 @@ fi
PLAT_OBJS=""
PLAT_SRCS=""
LDAIX_SRC=""
- if test "x${SHLIB_VERSION}" = x; then
- SHLIB_VERSION=".1.0"
-else
- SHLIB_VERSION=".${SHLIB_VERSION}"
+ if test "x${SHLIB_VERSION}" = x; then :
+ SHLIB_VERSION="1.0"
fi
-
case $system in
AIX-*)
- if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
+ if test "$GCC" != "yes"; then :
# AIX requires the _r compiler when gcc isn't being used
case "${CC}" in
@@ -4515,11 +4371,10 @@ fi
CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
;;
esac
- echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
-echo "${ECHO_T}Using $CC for compiling with threads" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
+$as_echo "Using $CC for compiling with threads" >&6; }
fi
-
LIBS="$LIBS -lc"
SHLIB_CFLAGS=""
SHLIB_SUFFIX=".so"
@@ -4532,12 +4387,12 @@ fi
LDAIX_SRC='$(UNIX_DIR)/ldAix'
# Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = yes; then
+ if test "$do64bit" = yes; then :
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
-echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
else
@@ -4550,17 +4405,15 @@ else
fi
-
fi
-
- if test "`uname -m`" = ia64; then
+ if test "`uname -m`" = ia64; then :
# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
# AIX-5 has dl* in libc.so
DL_LIBS=""
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
@@ -4569,12 +4422,11 @@ else
CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
fi
-
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
else
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
SHLIB_LD='${CC} -shared -Wl,-bexpall'
@@ -4584,14 +4436,12 @@ else
LDFLAGS="$LDFLAGS -brtl"
fi
-
SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
DL_LIBS="-ldl"
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
fi
-
;;
BeOS*)
SHLIB_CFLAGS="-fPIC"
@@ -4605,71 +4455,43 @@ fi
# -lsocket, even if the network functions are in -lnet which
# is always linked to, for compatibility.
#-----------------------------------------------------------
- echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
-echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
+$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
+if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbind $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char inet_ntoa ();
int
main ()
{
-inet_ntoa ();
+return inet_ntoa ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_bind_inet_ntoa=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind_inet_ntoa=no
+ ac_cv_lib_bind_inet_ntoa=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
-if test $ac_cv_lib_bind_inet_ntoa = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
LIBS="$LIBS -lbind -lsocket"
fi
@@ -4693,7 +4515,7 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*|MINGW32*)
+ CYGWIN_*)
SHLIB_CFLAGS=""
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -4706,16 +4528,12 @@ fi
TCL_NEEDS_EXP_FILE=1
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
- echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5
-echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6
-if test "${ac_cv_cygwin+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version of gcc" >&5
+$as_echo_n "checking for Cygwin version of gcc... " >&6; }
+if ${ac_cv_cygwin+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __CYGWIN__
@@ -4730,49 +4548,18 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_cygwin=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_cygwin=yes
+ ac_cv_cygwin=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5
-echo "${ECHO_T}$ac_cv_cygwin" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cygwin" >&5
+$as_echo "$ac_cv_cygwin" >&6; }
if test "$ac_cv_cygwin" = "no"; then
- { { echo "$as_me:$LINENO: error: ${CC} is not a cygwin compiler." >&5
-echo "$as_me: error: ${CC} is not a cygwin compiler." >&2;}
- { (exit 1); exit 1; }; }
- fi
- if test "x${TCL_THREADS}" = "x0"; then
- { { echo "$as_me:$LINENO: error: CYGWIN compile is only supported with --enable-threads" >&5
-echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${CC} is not a cygwin compiler." "$LINENO" 5
fi
do64bit_ok=yes
if test "x${SHARED_BUILD}" = "x1"; then
@@ -4802,71 +4589,43 @@ echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2
SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
DL_OBJS="tclLoadDl.o"
DL_LIBS="-lroot"
- echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
-echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
-if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
+$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
+if ${ac_cv_lib_network_inet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnetwork $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char inet_ntoa ();
int
main ()
{
-inet_ntoa ();
+return inet_ntoa ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_network_inet_ntoa=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_network_inet_ntoa=no
+ ac_cv_lib_network_inet_ntoa=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
-if test $ac_cv_lib_network_inet_ntoa = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
+$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
+if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
LIBS="$LIBS -lnetwork"
fi
@@ -4874,18 +4633,14 @@ fi
HP-UX-*.11.*)
# Use updated header definitions where possible
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE_EXTENDED 1
-_ACEOF
+$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE 1
-_ACEOF
+$as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h
LIBS="$LIBS -lxnet" # Use the XOPEN network library
- if test "`uname -m`" = ia64; then
+ if test "`uname -m`" = ia64; then :
SHLIB_SUFFIX=".so"
@@ -4894,78 +4649,49 @@ else
SHLIB_SUFFIX=".sl"
fi
-
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char shl_load ();
int
main ()
{
-shl_load ();
+return shl_load ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dld_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
+ ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
fi
- if test "$tcl_ok" = yes; then
+ if test "$tcl_ok" = yes; then :
SHLIB_CFLAGS="+z"
SHLIB_LD="ld -b"
@@ -4977,8 +4703,7 @@ fi
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
fi
-
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
SHLIB_LD='${CC} -shared'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
@@ -4989,30 +4714,28 @@ else
fi
-
# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
#CFLAGS="$CFLAGS +DAportable"
# Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = "yes"; then
+ if test "$do64bit" = "yes"; then :
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
case `${CC} -dumpmachine` in
hppa64*)
# 64-bit gcc in use. Fix flags for GNU ld.
do64bit_ok=yes
SHLIB_LD='${CC} -shared'
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
;;
*)
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
-echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
;;
esac
@@ -5024,82 +4747,52 @@ else
fi
-
-fi
- ;;
+fi ;;
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
SHLIB_SUFFIX=".sl"
- echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char shl_load ();
int
main ()
{
-shl_load ();
+return shl_load ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dld_shl_load=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=no
+ ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
tcl_ok=yes
else
tcl_ok=no
fi
- if test "$tcl_ok" = yes; then
+ if test "$tcl_ok" = yes; then :
SHLIB_CFLAGS="+z"
SHLIB_LD="ld -b"
@@ -5111,28 +4804,24 @@ fi
LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
-fi
- ;;
+fi ;;
IRIX-5.*)
SHLIB_CFLAGS=""
SHLIB_LD="ld -shared -rdata_shared"
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- case $LIBOBJS in
- "mkstemp.$ac_objext" | \
- *" mkstemp.$ac_objext" | \
- "mkstemp.$ac_objext "* | \
+ case " $LIBOBJS " in
*" mkstemp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+ *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
esac
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
fi
-
;;
IRIX-6.*)
SHLIB_CFLAGS=""
@@ -5140,21 +4829,18 @@ fi
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- case $LIBOBJS in
- "mkstemp.$ac_objext" | \
- *" mkstemp.$ac_objext" | \
- "mkstemp.$ac_objext "* | \
+ case " $LIBOBJS " in
*" mkstemp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+ *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
esac
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
fi
-
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
CFLAGS="$CFLAGS -mabi=n32"
LDFLAGS="$LDFLAGS -mabi=n32"
@@ -5173,7 +4859,6 @@ else
LDFLAGS="$LDFLAGS -n32"
fi
-
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
@@ -5181,29 +4866,26 @@ fi
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- case $LIBOBJS in
- "mkstemp.$ac_objext" | \
- *" mkstemp.$ac_objext" | \
- "mkstemp.$ac_objext "* | \
+ case " $LIBOBJS " in
*" mkstemp.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+ *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
+ ;;
esac
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
fi
-
# Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = yes; then
+ if test "$do64bit" = yes; then :
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
-echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
else
@@ -5214,9 +4896,7 @@ else
fi
-
fi
-
;;
Linux*|GNU*|NetBSD-Debian)
SHLIB_CFLAGS="-fPIC"
@@ -5232,31 +4912,25 @@ fi
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "`uname -m`" = "alpha"; then
+ if test "`uname -m`" = "alpha"; then :
CFLAGS="$CFLAGS -mieee"
fi
+ if test $do64bit = yes; then :
- if test $do64bit = yes; then
-
- echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_m64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
+$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
+if ${tcl_cv_cc_m64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -m64"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5267,62 +4941,35 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_cc_m64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_m64=no
+ tcl_cv_cc_m64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
-echo "${ECHO_T}$tcl_cv_cc_m64" >&6
- if test $tcl_cv_cc_m64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
+$as_echo "$tcl_cv_cc_m64" >&6; }
+ if test $tcl_cv_cc_m64 = yes; then :
CFLAGS="$CFLAGS -m64"
do64bit_ok=yes
fi
-
fi
-
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
- if test x"${USE_COMPAT}" != x; then
+ if test x"${USE_COMPAT}" != x; then :
CFLAGS="$CFLAGS -fno-inline"
fi
-
;;
Lynx*)
SHLIB_CFLAGS="-fPIC"
@@ -5332,33 +4979,11 @@ fi
DL_OBJS="tclLoadDl.o"
DL_LIBS="-mshared -ldl"
LD_FLAGS="-Wl,--export-dynamic"
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
- ;;
- MP-RAS-02*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- MP-RAS-*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
;;
OpenBSD-*)
arch=`arch -s`
@@ -5374,24 +4999,18 @@ fi
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
LDFLAGS="-Wl,-export-dynamic"
CFLAGS_OPTIMIZE="-O2"
- if test "${TCL_THREADS}" = "1"; then
-
- # On OpenBSD: Compile with -pthread
- # Don't link with -lpthread
- LIBS=`echo $LIBS | sed s/-lpthread//`
- CFLAGS="$CFLAGS -pthread"
-
-fi
-
+ # On OpenBSD: Compile with -pthread
+ # Don't link with -lpthread
+ LIBS=`echo $LIBS | sed s/-lpthread//`
+ CFLAGS="$CFLAGS -pthread"
# OpenBSD doesn't do version numbers with dots.
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
@@ -5404,21 +5023,15 @@ fi
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
LDFLAGS="$LDFLAGS -export-dynamic"
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "${TCL_THREADS}" = "1"; then
-
- # The -pthread needs to go in the CFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
-
-fi
-
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
;;
DragonFly-*|FreeBSD-*)
# This configuration from FreeBSD Ports.
@@ -5429,20 +5042,15 @@ fi
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
LDFLAGS=""
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
fi
-
- if test "${TCL_THREADS}" = "1"; then
-
- # The -pthread needs to go in the LDFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
-fi
-
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
case $system in
FreeBSD-3.*)
# Version numbers are dot-stripped by system policy.
@@ -5465,23 +5073,19 @@ fi
CFLAGS="`echo " ${CFLAGS}" | \
awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
- if test $do64bit = yes; then
+ if test $do64bit = yes; then :
case `arch` in
ppc)
- echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
+if ${tcl_cv_cc_arch_ppc64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5492,62 +5096,33 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_cc_arch_ppc64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_ppc64=no
+ tcl_cv_cc_arch_ppc64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
- if test $tcl_cv_cc_arch_ppc64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
+$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
+ if test $tcl_cv_cc_arch_ppc64 = yes; then :
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
do64bit_ok=yes
-fi
-;;
+fi;;
i386)
- echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
-echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
-if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
+$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
+if ${tcl_cv_cc_arch_x86_64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -arch x86_64"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5558,79 +5133,48 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_cc_arch_x86_64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_arch_x86_64=no
+ tcl_cv_cc_arch_x86_64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
-echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
- if test $tcl_cv_cc_arch_x86_64 = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
+$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
+ if test $tcl_cv_cc_arch_x86_64 = yes; then :
CFLAGS="$CFLAGS -arch x86_64"
do64bit_ok=yes
-fi
-;;
+fi;;
*)
- { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
-echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
+$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
esac
else
# Check for combined 32-bit and 64-bit fat build
if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
- && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
+ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
fat_32_64=yes
fi
-
fi
-
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
- echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
-echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_single_module+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
+$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
+if ${tcl_cv_ld_single_module+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5641,64 +5185,35 @@ int i;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_ld_single_module=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_single_module=no
+ tcl_cv_ld_single_module=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$hold_ldflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
-echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
- if test $tcl_cv_ld_single_module = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
+$as_echo "$tcl_cv_ld_single_module" >&6; }
+ if test $tcl_cv_ld_single_module = yes; then :
SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
fi
-
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
- echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
-echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_search_paths_first+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
+$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
+if ${tcl_cv_ld_search_paths_first+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5709,88 +5224,58 @@ int i;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_ld_search_paths_first=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_search_paths_first=no
+ tcl_cv_ld_search_paths_first=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$hold_ldflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
-echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
- if test $tcl_cv_ld_search_paths_first = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
+$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
+ if test $tcl_cv_ld_search_paths_first = yes; then :
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
fi
+ if test "$tcl_cv_cc_visibility_hidden" != yes; then :
- if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE __private_extern__
-_ACEOF
+$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
fi
-
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
-cat >>confdefs.h <<\_ACEOF
-#define MAC_OSX_TCL 1
-_ACEOF
+$as_echo "#define MAC_OSX_TCL 1" >>confdefs.h
PLAT_OBJS='${MAC_OSX_OBJS}'
PLAT_SRCS='${MAC_OSX_SRCS}'
- echo "$as_me:$LINENO: checking whether to use CoreFoundation" >&5
-echo $ECHO_N "checking whether to use CoreFoundation... $ECHO_C" >&6
- # Check whether --enable-corefoundation or --disable-corefoundation was given.
-if test "${enable_corefoundation+set}" = set; then
- enableval="$enable_corefoundation"
- tcl_corefoundation=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use CoreFoundation" >&5
+$as_echo_n "checking whether to use CoreFoundation... " >&6; }
+ # Check whether --enable-corefoundation was given.
+if test "${enable_corefoundation+set}" = set; then :
+ enableval=$enable_corefoundation; tcl_corefoundation=$enableval
else
tcl_corefoundation=yes
-fi;
- echo "$as_me:$LINENO: result: $tcl_corefoundation" >&5
-echo "${ECHO_T}$tcl_corefoundation" >&6
- if test $tcl_corefoundation = yes; then
+fi
- echo "$as_me:$LINENO: checking for CoreFoundation.framework" >&5
-echo $ECHO_N "checking for CoreFoundation.framework... $ECHO_C" >&6
-if test "${tcl_cv_lib_corefoundation+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_corefoundation" >&5
+$as_echo "$tcl_corefoundation" >&6; }
+ if test $tcl_corefoundation = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CoreFoundation.framework" >&5
+$as_echo_n "checking for CoreFoundation.framework... " >&6; }
+if ${tcl_cv_lib_corefoundation+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_libs=$LIBS
- if test "$fat_32_64" = yes; then
+ if test "$fat_32_64" = yes; then :
for v in CFLAGS CPPFLAGS LDFLAGS; do
# On Tiger there is no 64-bit CF, so remove 64-bit
@@ -5800,13 +5285,8 @@ else
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
done
fi
-
LIBS="$LIBS -framework CoreFoundation"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <CoreFoundation/CoreFoundation.h>
int
@@ -5817,77 +5297,45 @@ CFBundleRef b = CFBundleGetMainBundle();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_lib_corefoundation=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_corefoundation=no
+ tcl_cv_lib_corefoundation=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$fat_32_64" = yes; then
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$fat_32_64" = yes; then :
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="$hold_'$v'"'
done
fi
-
LIBS=$hold_libs
fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation" >&5
-echo "${ECHO_T}$tcl_cv_lib_corefoundation" >&6
- if test $tcl_cv_lib_corefoundation = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5
+$as_echo "$tcl_cv_lib_corefoundation" >&6; }
+ if test $tcl_cv_lib_corefoundation = yes; then :
LIBS="$LIBS -framework CoreFoundation"
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_COREFOUNDATION 1
-_ACEOF
+$as_echo "#define HAVE_COREFOUNDATION 1" >>confdefs.h
else
tcl_corefoundation=no
fi
+ if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then :
- if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
-
- echo "$as_me:$LINENO: checking for 64-bit CoreFoundation" >&5
-echo $ECHO_N "checking for 64-bit CoreFoundation... $ECHO_C" >&6
-if test "${tcl_cv_lib_corefoundation_64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5
+$as_echo_n "checking for 64-bit CoreFoundation... " >&6; }
+if ${tcl_cv_lib_corefoundation_64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
done
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <CoreFoundation/CoreFoundation.h>
int
@@ -5898,114 +5346,43 @@ CFBundleRef b = CFBundleGetMainBundle();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_lib_corefoundation_64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_corefoundation_64=no
+ tcl_cv_lib_corefoundation_64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="$hold_'$v'"'
done
fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_corefoundation_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_corefoundation_64" >&6
- if test $tcl_cv_lib_corefoundation_64 = no; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation_64" >&5
+$as_echo "$tcl_cv_lib_corefoundation_64" >&6; }
+ if test $tcl_cv_lib_corefoundation_64 = no; then :
-cat >>confdefs.h <<\_ACEOF
-#define NO_COREFOUNDATION_64 1
-_ACEOF
+$as_echo "#define NO_COREFOUNDATION_64 1" >>confdefs.h
LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
fi
-
fi
-
fi
-
- ;;
- NEXTSTEP-*)
- SHLIB_CFLAGS=""
- SHLIB_LD='${CC} -nostdlib -r'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadNext.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
;;
OS/390-*)
SHLIB_LD_LIBS=""
CFLAGS_OPTIMIZE="" # Optimizer is buggy
-cat >>confdefs.h <<\_ACEOF
-#define _OE_SOCKETS 1
-_ACEOF
+$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
;;
- OSF1-1.0|OSF1-1.1|OSF1-1.2)
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- SHLIB_LD='ld -R -export :'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadOSF.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- SHLIB_CFLAGS="-fPIC"
- if test "$SHARED_BUILD" = 1; then
- SHLIB_LD="ld -shared"
-else
-
- SHLIB_LD="ld -non_shared"
-
-fi
-
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
OSF1-V*)
# Digital OSF/1
SHLIB_CFLAGS=""
- if test "$SHARED_BUILD" = 1; then
+ if test "$SHARED_BUILD" = 1; then :
SHLIB_LD='ld -shared -expect_unresolved "*"'
@@ -6014,43 +5391,34 @@ else
SHLIB_LD='ld -non_shared -expect_unresolved "*"'
fi
-
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- if test $doRpath = yes; then
+ if test $doRpath = yes; then :
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
fi
-
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
CFLAGS="$CFLAGS -mieee"
else
CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
fi
-
# see pthread_intro(3) for pthread support on osf1, k.furukawa
- if test "${TCL_THREADS}" = 1; then
-
- CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
- CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
- LIBS=`echo $LIBS | sed s/-lpthreads//`
- if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = yes; then :
- LIBS="$LIBS -lpthread -lmach -lexc"
+ LIBS="$LIBS -lpthread -lmach -lexc"
else
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
-
-fi
-
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
fi
-
;;
QNX-6*)
# QNX RTP
@@ -6069,18 +5437,17 @@ fi
# Note, dlopen is available only on SCO 3.2.5 and greater. However,
# this test works, since "uname -s" was non-standard in 3.2.4 and
# below.
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
- SHLIB_CFLAGS="-fPIC -melf"
- LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
else
- SHLIB_CFLAGS="-Kpic -belf"
- LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
fi
-
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
@@ -6089,35 +5456,6 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- SINIX*5.4*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SunOS-4*)
- SHLIB_CFLAGS="-PIC"
- SHLIB_LD="ld"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
- # SunOS can't handle version numbers with dots in them in library
- # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
- # requires an extra version number at the end of .so file names.
- # So, the library has to have a name like libtcl75.so.1.0
-
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
SunOS-5.[0-6])
# Careful to not let 5.10+ fall into this case
@@ -6125,21 +5463,17 @@ fi
# won't define thread-safe library routines.
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+$as_echo "#define _REENTRANT 1" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_CFLAGS="-KPIC"
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
SHLIB_LD='${CC} -shared'
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
@@ -6152,37 +5486,32 @@ else
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
fi
-
;;
SunOS-5*)
# Note: If _REENTRANT isn't defined, then Solaris
# won't define thread-safe library routines.
-cat >>confdefs.h <<\_ACEOF
-#define _REENTRANT 1
-_ACEOF
+$as_echo "#define _REENTRANT 1" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
+$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
SHLIB_CFLAGS="-KPIC"
# Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = yes; then
+ if test "$do64bit" = yes; then :
arch=`isainfo`
- if test "$arch" = "sparcv9 sparc"; then
+ if test "$arch" = "sparcv9 sparc"; then :
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
- if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
+ if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
-echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
else
@@ -6193,11 +5522,10 @@ else
fi
-
else
do64bit_ok=yes
- if test "$do64bitVIS" = yes; then
+ if test "$do64bitVIS" = yes; then :
CFLAGS="$CFLAGS -xarch=v9a"
LDFLAGS_ARCH="-xarch=v9a"
@@ -6208,17 +5536,15 @@ else
LDFLAGS_ARCH="-xarch=v9"
fi
-
# Solaris 64 uses this as well
#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
fi
-
else
- if test "$arch" = "amd64 i386"; then
+ if test "$arch" = "amd64 i386"; then :
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
case $system in
SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
@@ -6226,8 +5552,8 @@ else
CFLAGS="$CFLAGS -m64"
LDFLAGS="$LDFLAGS -m64";;
*)
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
-echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
esac
else
@@ -6244,169 +5570,32 @@ else
fi
-
else
- { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
-echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
+$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
fi
-
fi
-
fi
-
#--------------------------------------------------------------------
# On Solaris 5.x i386 with the sunpro compiler we need to link
# with sunmath to get floating point rounding control
#--------------------------------------------------------------------
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
use_sunmath=no
else
arch=`isainfo`
- echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5
-echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6
- if test "$arch" = "amd64 i386" -o "$arch" = "i386"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use -lsunmath for fp rounding control" >&5
+$as_echo_n "checking whether to use -lsunmath for fp rounding control... " >&6; }
+ if test "$arch" = "amd64 i386" -o "$arch" = "i386"; then :
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
MATH_LIBS="-lsunmath $MATH_LIBS"
- if test "${ac_cv_header_sunmath_h+set}" = set; then
- echo "$as_me:$LINENO: checking for sunmath.h" >&5
-echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
-if test "${ac_cv_header_sunmath_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
-echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking sunmath.h usability" >&5
-echo $ECHO_N "checking sunmath.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <sunmath.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking sunmath.h presence" >&5
-echo $ECHO_N "checking sunmath.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sunmath.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: sunmath.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: sunmath.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: sunmath.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: sunmath.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: sunmath.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: sunmath.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: sunmath.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: sunmath.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: sunmath.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: sunmath.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for sunmath.h" >&5
-echo $ECHO_N "checking for sunmath.h... $ECHO_C" >&6
-if test "${ac_cv_header_sunmath_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_sunmath_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sunmath_h" >&5
-echo "${ECHO_T}$ac_cv_header_sunmath_h" >&6
+ ac_fn_c_check_header_mongrel "$LINENO" "sunmath.h" "ac_cv_header_sunmath_h" "$ac_includes_default"
+if test "x$ac_cv_header_sunmath_h" = xyes; then :
fi
@@ -6415,26 +5604,24 @@ fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
use_sunmath=no
fi
-
fi
-
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
- if test "$GCC" = yes; then
+ if test "$GCC" = yes; then :
SHLIB_LD='${CC} -shared'
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "$do64bit_ok" = yes; then
+ if test "$do64bit_ok" = yes; then :
- if test "$arch" = "sparcv9 sparc"; then
+ if test "$arch" = "sparcv9 sparc"; then :
# We need to specify -static-libgcc or we need to
# add the path to the sparv9 libgcc.
@@ -6445,26 +5632,22 @@ fi
#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
else
- if test "$arch" = "amd64 i386"; then
+ if test "$arch" = "amd64 i386"; then :
SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
fi
-
fi
-
fi
-
else
- if test "$use_sunmath" = yes; then
+ if test "$use_sunmath" = yes; then :
textmode=textoff
else
textmode=text
fi
-
case $system in
SunOS-5.[1-9][0-9]*|SunOS-5.[7-9])
SHLIB_LD="\${CC} -G -z $textmode \${LDFLAGS}";;
@@ -6475,7 +5658,6 @@ fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
fi
-
;;
UNIX_SV* | UnixWare-5*)
SHLIB_CFLAGS="-KPIC"
@@ -6486,19 +5668,15 @@ fi
DL_LIBS="-ldl"
# Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
# that don't grok the -Bexport option. Test that it does.
- echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
-echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_Bexport+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
+$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
+if ${tcl_cv_ld_Bexport+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-Bexport"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -6509,93 +5687,63 @@ int i;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_ld_Bexport=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_Bexport=no
+ tcl_cv_ld_Bexport=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$hold_ldflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
-echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
- if test $tcl_cv_ld_Bexport = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
+$as_echo "$tcl_cv_ld_Bexport" >&6; }
+ if test $tcl_cv_ld_Bexport = yes; then :
LDFLAGS="$LDFLAGS -Wl,-Bexport"
fi
-
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
esac
- if test "$do64bit" = yes -a "$do64bit_ok" = no; then
+ if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
- { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
-echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
fi
-
- if test "$do64bit" = yes -a "$do64bit_ok" = yes; then
+ if test "$do64bit" = yes -a "$do64bit_ok" = yes; then :
-cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_DO64BIT 1
-_ACEOF
+$as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h
fi
-
# Step 4: disable dynamic loading if requested via a command-line switch.
- # Check whether --enable-load or --disable-load was given.
-if test "${enable_load+set}" = set; then
- enableval="$enable_load"
- tcl_ok=$enableval
+ # Check whether --enable-load was given.
+if test "${enable_load+set}" = set; then :
+ enableval=$enable_load; tcl_ok=$enableval
else
tcl_ok=yes
-fi;
- if test "$tcl_ok" = no; then
- DL_OBJS=""
fi
+ if test "$tcl_ok" = no; then :
+ DL_OBJS=""
+fi
- if test "x$DL_OBJS" != x; then
+ if test "x$DL_OBJS" != x; then :
BUILD_DLTEST="\$(DLTEST_TARGETS)"
else
- { echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
-echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
+$as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
SHLIB_CFLAGS=""
SHLIB_LD=""
SHLIB_SUFFIX=""
@@ -6607,19 +5755,18 @@ echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libr
BUILD_DLTEST=""
fi
-
LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
# If we're running gcc, then change the C flags for compiling shared
# libraries to the right flags for gcc, instead of those for the
# standard manufacturer compiler.
- if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
+ if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then :
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*|MINGW32_*) ;;
+ CYGWIN_*) ;;
IRIX*) ;;
NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
Darwin-*) ;;
@@ -6628,35 +5775,29 @@ fi
esac
fi
+ if test "$tcl_cv_cc_visibility_hidden" != yes; then :
- if test "$tcl_cv_cc_visibility_hidden" != yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern
-_ACEOF
+$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
fi
-
- if test "$SHARED_LIB_SUFFIX" = ""; then
+ if test "$SHARED_LIB_SUFFIX" = ""; then :
SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
fi
-
- if test "$UNSHARED_LIB_SUFFIX" = ""; then
+ if test "$UNSHARED_LIB_SUFFIX" = ""; then :
UNSHARED_LIB_SUFFIX='${VERSION}.a'
fi
-
DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
- if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then
+ if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then :
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- if test "${SHLIB_SUFFIX}" = ".dll"; then
+ if test "${SHLIB_SUFFIX}" = ".dll"; then :
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)/$(LIB_FILE)";if test -f $(LIB_FILE).a; then $(INSTALL_DATA) $(LIB_FILE).a "$(LIB_INSTALL_DIR)"; fi;'
DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)"
@@ -6667,12 +5808,11 @@ else
fi
-
else
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
- if test "$RANLIB" = ""; then
+ if test "$RANLIB" = ""; then :
MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
@@ -6681,14 +5821,12 @@ else
MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
fi
-
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
fi
-
# Stub lib does not depend on shared/static configuration
- if test "$RANLIB" = ""; then
+ if test "$RANLIB" = ""; then :
MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
@@ -6697,33 +5835,27 @@ else
MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
fi
-
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
# Define TCL_LIBS now that we know what DL_LIBS is.
# The trick here is that we don't want to change the value of TCL_LIBS if
# it is already set when tclConfig.sh had been loaded by Tk.
- if test "x${TCL_LIBS}" = x; then
+ if test "x${TCL_LIBS}" = x; then :
TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"
fi
-
# See if the compiler supports casting to a union type.
# This is used to stop gcc from printing a compiler
# warning when initializing a union member.
- echo "$as_me:$LINENO: checking for cast to union support" >&5
-echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6
-if test "${tcl_cv_cast_to_union+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -6737,45 +5869,19 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_cast_to_union=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cast_to_union=no
+ tcl_cv_cast_to_union=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5
-echo "${ECHO_T}$tcl_cv_cast_to_union" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
if test "$tcl_cv_cast_to_union" = "yes"; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CAST_TO_UNION 1
-_ACEOF
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
fi
@@ -6821,38 +5927,34 @@ _ACEOF
- echo "$as_me:$LINENO: checking for build with symbols" >&5
-echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
- # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
- enableval="$enable_symbols"
- tcl_ok=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
+$as_echo_n "checking for build with symbols... " >&6; }
+ # Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+ enableval=$enable_symbols; tcl_ok=$enableval
else
tcl_ok=no
-fi;
+fi
+
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
DBGX=""
if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
-cat >>confdefs.h <<\_ACEOF
-#define NDEBUG 1
-_ACEOF
+$as_echo "#define NDEBUG 1" >>confdefs.h
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_OPTIMIZED 1
-_ACEOF
+$as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
if test "$tcl_ok" = "yes"; then
- echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
-echo "${ECHO_T}yes (standard debugging)" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
+$as_echo "yes (standard debugging)" >&6; }
fi
fi
@@ -6860,9 +5962,7 @@ echo "${ECHO_T}yes (standard debugging)" >&6
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-cat >>confdefs.h <<\_ACEOF
-#define TCL_MEM_DEBUG 1
-_ACEOF
+$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
fi
@@ -6870,11 +5970,11 @@ _ACEOF
if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
if test "$tcl_ok" = "all"; then
- echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
-echo "${ECHO_T}enabled symbols mem debugging" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
+$as_echo "enabled symbols mem debugging" >&6; }
else
- echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
-echo "${ECHO_T}enabled $tcl_ok debugging" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
+$as_echo "enabled $tcl_ok debugging" >&6; }
fi
fi
@@ -6884,18 +5984,14 @@ echo "${ECHO_T}enabled $tcl_ok debugging" >&6
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking for required early compiler flags" >&5
-echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
+$as_echo_n "checking for required early compiler flags... " >&6; }
tcl_flags=""
- if test "${tcl_cv_flag__isoc99_source+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${tcl_cv_flag__isoc99_source+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
int
@@ -6906,38 +6002,10 @@ char *p = (char *)strtoll; char *q = (char *)strtoull;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__isoc99_source=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _ISOC99_SOURCE 1
#include <stdlib.h>
@@ -6949,58 +6017,28 @@ char *p = (char *)strtoll; char *q = (char *)strtoull;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__isoc99_source=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__isoc99_source=no
+ tcl_cv_flag__isoc99_source=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define _ISOC99_SOURCE 1
-_ACEOF
+$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
tcl_flags="$tcl_flags _ISOC99_SOURCE"
fi
- if test "${tcl_cv_flag__largefile64_source+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${tcl_cv_flag__largefile64_source+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
int
@@ -7011,38 +6049,10 @@ struct stat64 buf; int i = stat64("/", &buf);
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__largefile64_source=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGEFILE64_SOURCE 1
#include <sys/stat.h>
@@ -7054,58 +6064,28 @@ struct stat64 buf; int i = stat64("/", &buf);
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__largefile64_source=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__largefile64_source=no
+ tcl_cv_flag__largefile64_source=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE64_SOURCE 1
-_ACEOF
+$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
fi
- if test "${tcl_cv_flag__largefile_source64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${tcl_cv_flag__largefile_source64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
int
@@ -7116,38 +6096,10 @@ char *p = (char *)open64;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__largefile_source64=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGEFILE_SOURCE64 1
#include <sys/stat.h>
@@ -7159,72 +6111,42 @@ char *p = (char *)open64;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_flag__largefile_source64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_flag__largefile_source64=no
+ tcl_cv_flag__largefile_source64=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE_SOURCE64 1
-_ACEOF
+$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
fi
if test "x${tcl_flags}" = "x" ; then
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
else
- echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
-echo "${ECHO_T}${tcl_flags}" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
+$as_echo "${tcl_flags}" >&6; }
fi
- echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
-echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
- if test "${tcl_cv_type_64bit+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
+$as_echo_n "checking for 64-bit integer type... " >&6; }
+ if ${tcl_cv_type_64bit+:} false; then :
+ $as_echo_n "(cached) " >&6
else
tcl_cv_type_64bit=none
# See if the compiler knows natively about __int64
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -7235,44 +6157,16 @@ __int64 value = (__int64) 0;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_type_64bit=__int64
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_type_64bit="long long"
+ tcl_type_64bit="long long"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- # See if we should use long anyway Note that we substitute in the
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ # See if we could use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -7285,66 +6179,35 @@ switch (0) {
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_type_64bit=${tcl_type_64bit}
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "${tcl_cv_type_64bit}" = none ; then
-cat >>confdefs.h <<\_ACEOF
-#define TCL_WIDE_INT_IS_LONG 1
-_ACEOF
+$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
- echo "$as_me:$LINENO: result: using long" >&5
-echo "${ECHO_T}using long" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
cat >>confdefs.h <<_ACEOF
#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
_ACEOF
- echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
-echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
+$as_echo "${tcl_cv_type_64bit}" >&6; }
# Now check for auxiliary declarations
- echo "$as_me:$LINENO: checking for struct dirent64" >&5
-echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
-if test "${tcl_cv_struct_dirent64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
+$as_echo_n "checking for struct dirent64... " >&6; }
+if ${tcl_cv_struct_dirent64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <dirent.h>
@@ -7356,58 +6219,28 @@ struct dirent64 p;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_struct_dirent64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_struct_dirent64=no
+ tcl_cv_struct_dirent64=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
-echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
+$as_echo "$tcl_cv_struct_dirent64" >&6; }
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_DIRENT64 1
-_ACEOF
+$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
fi
- echo "$as_me:$LINENO: checking for DIR64" >&5
-echo $ECHO_N "checking for DIR64... $ECHO_C" >&6
-if test "${tcl_cv_DIR64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
+$as_echo_n "checking for DIR64... " >&6; }
+if ${tcl_cv_DIR64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <dirent.h>
@@ -7420,58 +6253,28 @@ struct dirent64 *p; DIR64 d = opendir64(".");
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_DIR64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_DIR64=no
+ tcl_cv_DIR64=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_DIR64" >&5
-echo "${ECHO_T}$tcl_cv_DIR64" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
+$as_echo "$tcl_cv_DIR64" >&6; }
if test "x${tcl_cv_DIR64}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIR64 1
-_ACEOF
+$as_echo "#define HAVE_DIR64 1" >>confdefs.h
fi
- echo "$as_me:$LINENO: checking for struct stat64" >&5
-echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
-if test "${tcl_cv_struct_stat64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
+$as_echo_n "checking for struct stat64... " >&6; }
+if ${tcl_cv_struct_stat64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
int
@@ -7483,161 +6286,40 @@ struct stat64 p;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_struct_stat64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_struct_stat64=no
+ tcl_cv_struct_stat64=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
-echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
+$as_echo "$tcl_cv_struct_stat64" >&6; }
if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_STAT64 1
-_ACEOF
+$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
fi
-
-
-for ac_func in open64 lseek64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ for ac_func in open64 lseek64
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
- echo "$as_me:$LINENO: checking for off64_t" >&5
-echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
- if test "${tcl_cv_type_off64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
+$as_echo_n "checking for off64_t... " >&6; }
+ if ${tcl_cv_type_off64_t+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
int
@@ -7649,51 +6331,25 @@ off64_t offset;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_type_off64_t=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_type_off64_t=no
+ tcl_cv_type_off64_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test "x${tcl_cv_type_off64_t}" = "xyes" && \
test "x${ac_cv_func_lseek64}" = "xyes" && \
test "x${ac_cv_func_open64}" = "xyes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TYPE_OFF64_T 1
-_ACEOF
+$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
fi
@@ -7702,235 +6358,229 @@ echo "${ECHO_T}no" >&6
# Check endianness because we can optimize some operations
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/param.h>
+ #include <sys/param.h>
int
main ()
{
#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
+ not big endian
+ #endif
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
+ ac_cv_c_bigendian=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+#include <limits.h>
+
int
main ()
{
- _ascii (); _ebcdic ();
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+$ac_includes_default
int
main ()
{
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
ac_cv_c_bigendian=no
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_bigendian=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_bigendian=yes
fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
- yes)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
#------------------------------------------------------------------------
@@ -7945,10 +6595,10 @@ if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
fi
if test "$TCL_PREFIX" != "$prefix"; then
- { echo "$as_me:$LINENO: WARNING:
+ { $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
-echo "$as_me: WARNING:
+$as_echo "$as_me: WARNING:
Different --prefix selected for Tk and Tcl!
[package require Tk] may not work correctly in tclsh." >&2;}
fi
@@ -7963,17 +6613,13 @@ fi
# special flag.
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking for fd_set in sys/types" >&5
-echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
-if test "${tcl_cv_type_fd_set+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_set in sys/types" >&5
+$as_echo_n "checking for fd_set in sys/types... " >&6; }
+if ${tcl_cv_type_fd_set+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
int
@@ -7984,58 +6630,30 @@ fd_set readMask, writeMask;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_type_fd_set=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_type_fd_set=no
+ tcl_cv_type_fd_set=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_type_fd_set" >&5
-echo "${ECHO_T}$tcl_cv_type_fd_set" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_type_fd_set" >&5
+$as_echo "$tcl_cv_type_fd_set" >&6; }
tk_ok=$tcl_cv_type_fd_set
if test $tk_ok = no; then
- echo "$as_me:$LINENO: checking for fd_mask in sys/select" >&5
-echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
-if test "${tcl_cv_grep_fd_mask+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fd_mask in sys/select" >&5
+$as_echo_n "checking for fd_mask in sys/select... " >&6; }
+if ${tcl_cv_grep_fd_mask+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/select.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "fd_mask" >/dev/null 2>&1; then
+ $EGREP "fd_mask" >/dev/null 2>&1; then :
tcl_cv_grep_fd_mask=present
else
tcl_cv_grep_fd_mask=missing
@@ -8043,22 +6661,18 @@ fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $tcl_cv_grep_fd_mask" >&5
-echo "${ECHO_T}$tcl_cv_grep_fd_mask" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_grep_fd_mask" >&5
+$as_echo "$tcl_cv_grep_fd_mask" >&6; }
if test $tcl_cv_grep_fd_mask = present; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_SELECT_H 1
-_ACEOF
+$as_echo "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
tk_ok=yes
fi
fi
if test $tk_ok = no; then
-cat >>confdefs.h <<\_ACEOF
-#define NO_FD_SET 1
-_ACEOF
+$as_echo "#define NO_FD_SET 1" >>confdefs.h
fi
@@ -8066,166 +6680,24 @@ fi
# Find out all about time handling differences.
#------------------------------------------------------------------------------
-
for ac_header in sys/time.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_SYS_TIME_H 1
_ACEOF
fi
done
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
@@ -8240,44 +6712,18 @@ return 0;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_time=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
+ ac_cv_header_time=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
if test $ac_cv_header_time = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
fi
@@ -8287,64 +6733,9 @@ fi
# they don't exist.
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking for mode_t" >&5
-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
-if test "${ac_cv_type_mode_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((mode_t *) 0)
- return 0;
-if (sizeof (mode_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_mode_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes; then :
-ac_cv_type_mode_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-echo "${ECHO_T}$ac_cv_type_mode_t" >&6
-if test $ac_cv_type_mode_t = yes; then
- :
else
cat >>confdefs.h <<_ACEOF
@@ -8353,64 +6744,9 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
-if test "${ac_cv_type_pid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((pid_t *) 0)
- return 0;
-if (sizeof (pid_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_pid_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
-ac_cv_type_pid_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-echo "${ECHO_T}$ac_cv_type_pid_t" >&6
-if test $ac_cv_type_pid_t = yes; then
- :
else
cat >>confdefs.h <<_ACEOF
@@ -8419,88 +6755,29 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
else
cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
+#define size_t unsigned int
_ACEOF
fi
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "uid_t" >/dev/null 2>&1; then
+ $EGREP "uid_t" >/dev/null 2>&1; then :
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
@@ -8508,147 +6785,59 @@ fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
+$as_echo "#define uid_t int" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
+$as_echo "#define gid_t int" >>confdefs.h
fi
-echo "$as_me:$LINENO: checking for intptr_t" >&5
-echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
-if test "${ac_cv_type_intptr_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((intptr_t *) 0)
- return 0;
-if (sizeof (intptr_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_intptr_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_intptr_t" = xyes; then :
-ac_cv_type_intptr_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
-echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
-if test $ac_cv_type_intptr_t = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INTPTR_T 1
-_ACEOF
+$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
else
- echo "$as_me:$LINENO: checking for pointer-size signed integer type" >&5
-echo $ECHO_N "checking for pointer-size signed integer type... $ECHO_C" >&6
-if test "${tcl_cv_intptr_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5
+$as_echo_n "checking for pointer-size signed integer type... " >&6; }
+if ${tcl_cv_intptr_t+:} false; then :
+ $as_echo_n "(cached) " >&6
else
for tcl_cv_intptr_t in "int" "long" "long long" none; do
if test "$tcl_cv_intptr_t" != none; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_ok=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_ok=no
+ tcl_ok=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
test "$tcl_ok" = yes && break; fi
done
fi
-echo "$as_me:$LINENO: result: $tcl_cv_intptr_t" >&5
-echo "${ECHO_T}$tcl_cv_intptr_t" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5
+$as_echo "$tcl_cv_intptr_t" >&6; }
if test "$tcl_cv_intptr_t" != none; then
cat >>confdefs.h <<_ACEOF
@@ -8659,132 +6848,48 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for uintptr_t" >&5
-echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
-if test "${ac_cv_type_uintptr_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((uintptr_t *) 0)
- return 0;
-if (sizeof (uintptr_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_uintptr_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uintptr_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
-echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
-if test $ac_cv_type_uintptr_t = yes; then
+ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes; then :
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
else
- echo "$as_me:$LINENO: checking for pointer-size unsigned integer type" >&5
-echo $ECHO_N "checking for pointer-size unsigned integer type... $ECHO_C" >&6
-if test "${tcl_cv_uintptr_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5
+$as_echo_n "checking for pointer-size unsigned integer type... " >&6; }
+if ${tcl_cv_uintptr_t+:} false; then :
+ $as_echo_n "(cached) " >&6
else
for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \
none; do
if test "$tcl_cv_uintptr_t" != none; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_ok=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_ok=no
+ tcl_ok=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
test "$tcl_ok" = yes && break; fi
done
fi
-echo "$as_me:$LINENO: result: $tcl_cv_uintptr_t" >&5
-echo "${ECHO_T}$tcl_cv_uintptr_t" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5
+$as_echo "$tcl_cv_uintptr_t" >&6; }
if test "$tcl_cv_uintptr_t" != none; then
cat >>confdefs.h <<_ACEOF
@@ -8800,17 +6905,13 @@ fi
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
-echo "$as_me:$LINENO: checking pw_gecos in struct pwd" >&5
-echo $ECHO_N "checking pw_gecos in struct pwd... $ECHO_C" >&6
-if test "${tcl_cv_pwd_pw_gecos+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pw_gecos in struct pwd" >&5
+$as_echo_n "checking pw_gecos in struct pwd... " >&6; }
+if ${tcl_cv_pwd_pw_gecos+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pwd.h>
int
@@ -8821,44 +6922,18 @@ struct passwd pwd; pwd.pw_gecos;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_pwd_pw_gecos=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_pwd_pw_gecos=no
+ tcl_cv_pwd_pw_gecos=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_pwd_pw_gecos" >&5
-echo "${ECHO_T}$tcl_cv_pwd_pw_gecos" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_pwd_pw_gecos" >&5
+$as_echo "$tcl_cv_pwd_pw_gecos" >&6; }
if test $tcl_cv_pwd_pw_gecos = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PW_GECOS 1
-_ACEOF
+$as_echo "#define HAVE_PW_GECOS 1" >>confdefs.h
fi
@@ -8867,41 +6942,41 @@ fi
#--------------------------------------------------------------------
if test "`uname -s`" = "Darwin" ; then
- echo "$as_me:$LINENO: checking whether to use Aqua" >&5
-echo $ECHO_N "checking whether to use Aqua... $ECHO_C" >&6
- # Check whether --enable-aqua or --disable-aqua was given.
-if test "${enable_aqua+set}" = set; then
- enableval="$enable_aqua"
- tk_aqua=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Aqua" >&5
+$as_echo_n "checking whether to use Aqua... " >&6; }
+ # Check whether --enable-aqua was given.
+if test "${enable_aqua+set}" = set; then :
+ enableval=$enable_aqua; tk_aqua=$enableval
else
tk_aqua=no
-fi;
+fi
+
if test $tk_aqua = yes -o $tk_aqua = cocoa; then
tk_aqua=yes
if test $tcl_corefoundation = no; then
- { echo "$as_me:$LINENO: WARNING: Aqua can only be used when CoreFoundation is available" >&5
-echo "$as_me: WARNING: Aqua can only be used when CoreFoundation is available" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Aqua can only be used when CoreFoundation is available" >&5
+$as_echo "$as_me: WARNING: Aqua can only be used when CoreFoundation is available" >&2;}
tk_aqua=no
fi
if test ! -d /System/Library/Frameworks/Cocoa.framework; then
- { echo "$as_me:$LINENO: WARNING: Aqua can only be used when Cocoa is available" >&5
-echo "$as_me: WARNING: Aqua can only be used when Cocoa is available" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Aqua can only be used when Cocoa is available" >&5
+$as_echo "$as_me: WARNING: Aqua can only be used when Cocoa is available" >&2;}
tk_aqua=no
fi
if test "`uname -r | awk -F. '{print $1}'`" -lt 9; then
- { echo "$as_me:$LINENO: WARNING: Aqua requires Mac OS X 10.5 or later" >&5
-echo "$as_me: WARNING: Aqua requires Mac OS X 10.5 or later" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Aqua requires Mac OS X 10.5 or later" >&5
+$as_echo "$as_me: WARNING: Aqua requires Mac OS X 10.5 or later" >&2;}
tk_aqua=no
fi
fi
- echo "$as_me:$LINENO: result: $tk_aqua" >&5
-echo "${ECHO_T}$tk_aqua" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tk_aqua" >&5
+$as_echo "$tk_aqua" >&6; }
if test "$fat_32_64" = yes; then
if test $tk_aqua = no; then
- echo "$as_me:$LINENO: checking for 64-bit X11" >&5
-echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6
-if test "${tcl_cv_lib_x11_64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
+$as_echo_n "checking for 64-bit X11... " >&6; }
+if ${tcl_cv_lib_x11_64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
for v in CFLAGS CPPFLAGS LDFLAGS; do
@@ -8909,11 +6984,7 @@ else
done
CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
int
@@ -8924,49 +6995,25 @@ XrmInitialize();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_lib_x11_64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_lib_x11_64=no
+ tcl_cv_lib_x11_64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="$hold_'$v'"'
done
fi
-echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
-echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
+$as_echo "$tcl_cv_lib_x11_64" >&6; }
fi
# remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit
# fat builds if configuration does not support 64-bit.
if test "$tcl_cv_lib_x11_64" = no; then
- { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
-echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
+$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
done
@@ -8974,19 +7021,15 @@ echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
fi
if test $tk_aqua = no; then
# check if weak linking whole libraries is possible.
- echo "$as_me:$LINENO: checking if ld accepts -weak-l flag" >&5
-echo $ECHO_N "checking if ld accepts -weak-l flag... $ECHO_C" >&6
-if test "${tcl_cv_ld_weak_l+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -weak-l flag" >&5
+$as_echo_n "checking if ld accepts -weak-l flag... " >&6; }
+if ${tcl_cv_ld_weak_l+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-weak-lm"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
int
@@ -8997,186 +7040,24 @@ double f = sin(1.0);
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_ld_weak_l=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_ld_weak_l=no
+ tcl_cv_ld_weak_l=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$hold_ldflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_ld_weak_l" >&5
-echo "${ECHO_T}$tcl_cv_ld_weak_l" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_weak_l" >&5
+$as_echo "$tcl_cv_ld_weak_l" >&6; }
fi
-
-for ac_header in AvailabilityMacros.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ for ac_header in AvailabilityMacros.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
+if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_AVAILABILITYMACROS_H 1
_ACEOF
fi
@@ -9184,18 +7065,14 @@ fi
done
if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
- echo "$as_me:$LINENO: checking if weak import is available" >&5
-echo $ECHO_N "checking if weak import is available... $ECHO_C" >&6
-if test "${tcl_cv_cc_weak_import+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if weak import is available" >&5
+$as_echo_n "checking if weak import is available... " >&6; }
+if ${tcl_cv_cc_weak_import+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
@@ -9215,60 +7092,30 @@ rand();
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_cc_weak_import=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_weak_import=no
+ tcl_cv_cc_weak_import=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_weak_import" >&5
-echo "${ECHO_T}$tcl_cv_cc_weak_import" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_weak_import" >&5
+$as_echo "$tcl_cv_cc_weak_import" >&6; }
if test $tcl_cv_cc_weak_import = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WEAK_IMPORT 1
-_ACEOF
+$as_echo "#define HAVE_WEAK_IMPORT 1" >>confdefs.h
fi
- echo "$as_me:$LINENO: checking if Darwin SUSv3 extensions are available" >&5
-echo $ECHO_N "checking if Darwin SUSv3 extensions are available... $ECHO_C" >&6
-if test "${tcl_cv_cc_darwin_c_source+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin SUSv3 extensions are available" >&5
+$as_echo_n "checking if Darwin SUSv3 extensions are available... " >&6; }
+if ${tcl_cv_cc_darwin_c_source+:} false; then :
+ $as_echo_n "(cached) " >&6
else
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
@@ -9289,45 +7136,19 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_cc_darwin_c_source=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cc_darwin_c_source=no
+ tcl_cv_cc_darwin_c_source=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$hold_cflags
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cc_darwin_c_source" >&5
-echo "${ECHO_T}$tcl_cv_cc_darwin_c_source" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_darwin_c_source" >&5
+$as_echo "$tcl_cv_cc_darwin_c_source" >&6; }
if test $tcl_cv_cc_darwin_c_source = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define _DARWIN_C_SOURCE 1
-_ACEOF
+$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
fi
fi
@@ -9337,18 +7158,14 @@ fi
if test $tk_aqua = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define MAC_OSX_TK 1
-_ACEOF
+$as_echo "#define MAC_OSX_TK 1" >>confdefs.h
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
-cat >>confdefs.h <<\_ACEOF
-#define TK_MAC_DEBUG 1
-_ACEOF
+$as_echo "#define TK_MAC_DEBUG 1" >>confdefs.h
fi
else
@@ -9362,44 +7179,47 @@ else
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking for X" >&5
-echo $ECHO_N "checking for X... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
- withval="$with_x"
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+ withval=$with_x;
+fi
-fi;
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
- # Both variables are already set.
- have_x=yes
- else
- if test "${ac_cv_have_x+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ case $x_includes,$x_libraries in #(
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
+ $as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
-rm -fr conftest.dir
+rm -f -r conftest.dir
if mkdir conftest.dir; then
cd conftest.dir
- # Make sure to not put "make" in the Imakefile rules, since we grep it out.
cat >Imakefile <<'_ACEOF'
-acfindx:
- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-_ACEOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
- test -f $ac_im_libdir/libX11.$ac_extension; then
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
ac_im_usrlibdir=$ac_im_libdir; break
fi
done
@@ -9407,37 +7227,41 @@ _ACEOF
# bogus both because they are the default anyway, and because
# using them would break gcc on systems where it needs fixed includes.
case $ac_im_incroot in
- /usr/include) ;;
+ /usr/include) ac_x_includes= ;;
*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
esac
case $ac_im_usrlibdir in
- /usr/lib | /lib) ;;
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
esac
fi
cd ..
- rm -fr conftest.dir
+ rm -f -r conftest.dir
fi
# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
+/usr/X11R7/include
/usr/X11R6/include
/usr/X11R5/include
/usr/X11R4/include
/usr/include/X11
+/usr/include/X11R7
/usr/include/X11R6
/usr/include/X11R5
/usr/include/X11R4
/usr/local/X11/include
+/usr/local/X11R7/include
/usr/local/X11R6/include
/usr/local/X11R5/include
/usr/local/X11R4/include
/usr/local/include/X11
+/usr/local/include/X11R7
/usr/local/include/X11R6
/usr/local/include/X11R5
/usr/local/include/X11R4
@@ -9459,38 +7283,14 @@ ac_x_header_dirs='
if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Xlib.h.
# First, try using that file with no special directory specified.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
# We can compile using X headers with no special include directory.
ac_x_includes=
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
for ac_dir in $ac_x_header_dirs; do
if test -r "$ac_dir/X11/Xlib.h"; then
ac_x_includes=$ac_dir
@@ -9498,7 +7298,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
done
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
fi # $ac_x_includes = no
if test "$ac_x_libraries" = no; then
@@ -9507,11 +7307,7 @@ if test "$ac_x_libraries" = no; then
# Don't add to $LIBS permanently.
ac_save_LIBS=$LIBS
LIBS="-lX11 $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
int
@@ -9522,117 +7318,73 @@ XrmInitialize ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
ac_x_libraries=
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-LIBS=$ac_save_LIBS
-for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
- for ac_extension in a so sl; do
- if test -r $ac_dir/libXt.$ac_extension; then
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
ac_x_libraries=$ac_dir
break 2
fi
done
done
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
-if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
-else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
fi
-
- fi
+;; #(
+ *) have_x=yes;;
+ esac
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
- echo "$as_me:$LINENO: result: $have_x" >&5
-echo "${ECHO_T}$have_x" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
-echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
fi
not_really_there=""
if test "$no_x" = ""; then
if test "$x_includes" = ""; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
not_really_there="yes"
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
else
if test ! -r $x_includes/X11/Xlib.h; then
not_really_there="yes"
@@ -9640,49 +7392,25 @@ rm -f conftest.err conftest.$ac_ext
fi
fi
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
- echo "$as_me:$LINENO: checking for X11 header files" >&5
-echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
+$as_echo_n "checking for X11 header files... " >&6; }
found_xincludes="no"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
found_xincludes="yes"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
found_xincludes="no"
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
if test "$found_xincludes" = "no"; then
dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
for i in $dirs ; do
if test -r $i/X11/Xlib.h; then
- echo "$as_me:$LINENO: result: $i" >&5
-echo "${ECHO_T}$i" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
+$as_echo "$i" >&6; }
XINCLUDES=" -I$i"
found_xincludes="yes"
break
@@ -9696,19 +7424,19 @@ echo "${ECHO_T}$i" >&6
fi
fi
if test "$found_xincludes" = "no"; then
- echo "$as_me:$LINENO: result: couldn't find any!" >&5
-echo "${ECHO_T}couldn't find any!" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5
+$as_echo "couldn't find any!" >&6; }
fi
if test "$no_x" = yes; then
- echo "$as_me:$LINENO: checking for X11 libraries" >&5
-echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5
+$as_echo_n "checking for X11 libraries... " >&6; }
XLIBSW=nope
dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
for i in $dirs ; do
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
- echo "$as_me:$LINENO: result: $i" >&5
-echo "${ECHO_T}$i" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
+$as_echo "$i" >&6; }
XLIBSW="-L$i -lX11"
x_libraries="$i"
break
@@ -9722,78 +7450,50 @@ echo "${ECHO_T}$i" >&6
fi
fi
if test "$XLIBSW" = nope ; then
- echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
-echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6
-if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
+$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
+if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXwindow $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char XCreateWindow ();
int
main ()
{
-XCreateWindow ();
+return XCreateWindow ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xwindow_XCreateWindow=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xwindow_XCreateWindow=no
+ ac_cv_lib_Xwindow_XCreateWindow=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
-echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6
-if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
+$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
+if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
XLIBSW=-lXwindow
fi
fi
if test "$XLIBSW" = nope ; then
- echo "$as_me:$LINENO: result: could not find any! Using -lX11." >&5
-echo "${ECHO_T}could not find any! Using -lX11." >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any! Using -lX11." >&5
+$as_echo "could not find any! Using -lX11." >&6; }
XLIBSW=-lX11
fi
@@ -9842,65 +7542,37 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
- echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
-echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6
-if test "${ac_cv_lib_Xbsd_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
+$as_echo_n "checking for main in -lXbsd... " >&6; }
+if ${ac_cv_lib_Xbsd_main+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXbsd $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
-main ();
+return main ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xbsd_main=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xbsd_main=no
+ ac_cv_lib_Xbsd_main=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
-echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6
-if test $ac_cv_lib_Xbsd_main = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
+$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
+if test "x$ac_cv_lib_Xbsd_main" = xyes; then :
LIBS="$LIBS -lXbsd"
fi
@@ -9918,17 +7590,13 @@ fi
#--------------------------------------------------------------------
if test -d /usr/include/mit -a $tk_aqua = no; then
- echo "$as_me:$LINENO: checking MIT X libraries" >&5
-echo $ECHO_N "checking MIT X libraries... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking MIT X libraries" >&5
+$as_echo_n "checking MIT X libraries... " >&6; }
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS -I/usr/include/mit"
tk_oldLibs=$LIBS
LIBS="$LIBS -lX11-mit"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
@@ -9943,43 +7611,19 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
XLIBSW="-lX11-mit"
XINCLUDES="-I/usr/include/mit"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$tk_oldCFlags
LIBS=$tk_oldLibs
fi
@@ -9989,20 +7633,20 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
- echo "$as_me:$LINENO: checking whether to use xft" >&5
-echo $ECHO_N "checking whether to use xft... $ECHO_C" >&6
- # Check whether --enable-xft or --disable-xft was given.
-if test "${enable_xft+set}" = set; then
- enableval="$enable_xft"
- enable_xft=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xft" >&5
+$as_echo_n "checking whether to use xft... " >&6; }
+ # Check whether --enable-xft was given.
+if test "${enable_xft+set}" = set; then :
+ enableval=$enable_xft; enable_xft=$enableval
else
enable_xft="default"
-fi;
+fi
+
XFT_CFLAGS=""
XFT_LIBS=""
if test "$enable_xft" = "no" ; then
- echo "$as_me:$LINENO: result: $enable_xft" >&5
-echo "${ECHO_T}$enable_xft" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xft" >&5
+$as_echo "$enable_xft" >&6; }
else
found_xft="yes"
XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no"
@@ -10012,63 +7656,17 @@ echo "${ECHO_T}$enable_xft" >&6
XFT_CFLAGS=`pkg-config --cflags xft fontconfig 2>/dev/null` || found_xft="no"
XFT_LIBS=`pkg-config --libs xft fontconfig 2>/dev/null` || found_xft="no"
fi
- echo "$as_me:$LINENO: result: $found_xft" >&5
-echo "${ECHO_T}$found_xft" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_xft" >&5
+$as_echo "$found_xft" >&6; }
if test "$found_xft" = "yes" ; then
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
- echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
-echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6
-if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-
-#include <X11/Xft/Xft.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_X11_Xft_Xft_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then :
-ac_cv_header_X11_Xft_Xft_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
-echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6
-if test $ac_cv_header_X11_Xft_Xft_h = yes; then
- :
else
found_xft=no
@@ -10084,72 +7682,43 @@ fi
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
-
-echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
-echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6
-if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
+$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
+if ${ac_cv_lib_Xft_XftFontOpen+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXft $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char XftFontOpen ();
int
main ()
{
-XftFontOpen ();
+return XftFontOpen ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xft_XftFontOpen=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xft_XftFontOpen=no
+ ac_cv_lib_Xft_XftFontOpen=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
-echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6
-if test $ac_cv_lib_Xft_XftFontOpen = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
+$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
+if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXFT 1
_ACEOF
@@ -10170,71 +7739,43 @@ fi
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW -lfontconfig"
- echo "$as_me:$LINENO: checking for FcFontSort in -lfontconfig" >&5
-echo $ECHO_N "checking for FcFontSort in -lfontconfig... $ECHO_C" >&6
-if test "${ac_cv_lib_fontconfig_FcFontSort+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FcFontSort in -lfontconfig" >&5
+$as_echo_n "checking for FcFontSort in -lfontconfig... " >&6; }
+if ${ac_cv_lib_fontconfig_FcFontSort+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfontconfig $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char FcFontSort ();
int
main ()
{
-FcFontSort ();
+return FcFontSort ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_fontconfig_FcFontSort=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_fontconfig_FcFontSort=no
+ ac_cv_lib_fontconfig_FcFontSort=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_fontconfig_FcFontSort" >&5
-echo "${ECHO_T}$ac_cv_lib_fontconfig_FcFontSort" >&6
-if test $ac_cv_lib_fontconfig_FcFontSort = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fontconfig_FcFontSort" >&5
+$as_echo "$ac_cv_lib_fontconfig_FcFontSort" >&6; }
+if test "x$ac_cv_lib_fontconfig_FcFontSort" = xyes; then :
XFT_LIBS="$XFT_LIBS -lfontconfig"
@@ -10245,8 +7786,8 @@ fi
fi
if test "$found_xft" = "no" ; then
if test "$enable_xft" = "yes" ; then
- { echo "$as_me:$LINENO: WARNING: Can't find xft configuration, or xft is unusable" >&5
-echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find xft configuration, or xft is unusable" >&5
+$as_echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;}
fi
enable_xft=no
XFT_CFLAGS=""
@@ -10258,9 +7799,7 @@ echo "$as_me: WARNING: Can't find xft configuration, or xft is unusable" >&2;}
if test $enable_xft = "yes" ; then
UNIX_FONT_OBJS=tkUnixRFont.o
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XFT 1
-_ACEOF
+$as_echo "#define HAVE_XFT 1" >>confdefs.h
else
UNIX_FONT_OBJS=tkUnixFont.o
@@ -10279,55 +7818,9 @@ if test $tk_aqua = no; then
tk_oldLibs=$LIBS
CFLAGS="$CFLAGS $XINCLUDES"
LIBS="$LIBS $XLIBSW"
- echo "$as_me:$LINENO: checking for X11/XKBlib.h" >&5
-echo $ECHO_N "checking for X11/XKBlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_X11_XKBlib_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-
-#include <X11/XKBlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_X11_XKBlib_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_X11_XKBlib_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_X11_XKBlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_X11_XKBlib_h" >&6
-if test $ac_cv_header_X11_XKBlib_h = yes; then
+ ac_fn_c_check_header_compile "$LINENO" "X11/XKBlib.h" "ac_cv_header_X11_XKBlib_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_XKBlib_h" = xyes; then :
xkblib_header_found=yes
@@ -10339,71 +7832,43 @@ fi
if test $xkblib_header_found = "yes" ; then
- echo "$as_me:$LINENO: checking for XkbKeycodeToKeysym in -lX11" >&5
-echo $ECHO_N "checking for XkbKeycodeToKeysym in -lX11... $ECHO_C" >&6
-if test "${ac_cv_lib_X11_XkbKeycodeToKeysym+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XkbKeycodeToKeysym in -lX11" >&5
+$as_echo_n "checking for XkbKeycodeToKeysym in -lX11... " >&6; }
+if ${ac_cv_lib_X11_XkbKeycodeToKeysym+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char XkbKeycodeToKeysym ();
int
main ()
{
-XkbKeycodeToKeysym ();
+return XkbKeycodeToKeysym ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_X11_XkbKeycodeToKeysym=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_X11_XkbKeycodeToKeysym=no
+ ac_cv_lib_X11_XkbKeycodeToKeysym=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XkbKeycodeToKeysym" >&5
-echo "${ECHO_T}$ac_cv_lib_X11_XkbKeycodeToKeysym" >&6
-if test $ac_cv_lib_X11_XkbKeycodeToKeysym = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XkbKeycodeToKeysym" >&5
+$as_echo "$ac_cv_lib_X11_XkbKeycodeToKeysym" >&6; }
+if test "x$ac_cv_lib_X11_XkbKeycodeToKeysym" = xyes; then :
xkbkeycodetokeysym_found=yes
@@ -10418,9 +7883,7 @@ fi
fi
if test $xkbkeycodetokeysym_found = "yes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XKBKEYCODETOKEYSYM 1
-_ACEOF
+$as_echo "#define HAVE_XKBKEYCODETOKEYSYM 1" >>confdefs.h
fi
CFLAGS=$tk_oldCFlags
@@ -10432,15 +7895,11 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no && test "$GCC" = yes; then
- echo "$as_me:$LINENO: checking whether XKeycodeToKeysym is deprecated" >&5
-echo $ECHO_N "checking whether XKeycodeToKeysym is deprecated... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XKeycodeToKeysym is deprecated" >&5
+$as_echo_n "checking whether XKeycodeToKeysym is deprecated... " >&6; }
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <X11/Xlib.h>
@@ -10455,48 +7914,22 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define XKEYCODETOKEYSYM_IS_DEPRECATED 1
-_ACEOF
+$as_echo "#define XKEYCODETOKEYSYM_IS_DEPRECATED 1" >>confdefs.h
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS=$tk_oldCFlags
fi
@@ -10516,306 +7949,115 @@ if test $tk_aqua = no; then
LIBS="$tk_oldLibs $XLIBSW"
xss_header_found=no
xss_lib_found=no
- echo "$as_me:$LINENO: checking whether to try to use XScreenSaver" >&5
-echo $ECHO_N "checking whether to try to use XScreenSaver... $ECHO_C" >&6
- # Check whether --enable-xss or --disable-xss was given.
-if test "${enable_xss+set}" = set; then
- enableval="$enable_xss"
- enable_xss=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to try to use XScreenSaver" >&5
+$as_echo_n "checking whether to try to use XScreenSaver... " >&6; }
+ # Check whether --enable-xss was given.
+if test "${enable_xss+set}" = set; then :
+ enableval=$enable_xss; enable_xss=$enableval
else
enable_xss=yes
-fi;
+fi
+
if test "$enable_xss" = "no" ; then
- echo "$as_me:$LINENO: result: $enable_xss" >&5
-echo "${ECHO_T}$enable_xss" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xss" >&5
+$as_echo "$enable_xss" >&6; }
else
- echo "$as_me:$LINENO: result: $enable_xss" >&5
-echo "${ECHO_T}$enable_xss" >&6
- echo "$as_me:$LINENO: checking for X11/extensions/scrnsaver.h" >&5
-echo $ECHO_N "checking for X11/extensions/scrnsaver.h... $ECHO_C" >&6
-if test "${ac_cv_header_X11_extensions_scrnsaver_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-
-#include <X11/extensions/scrnsaver.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_X11_extensions_scrnsaver_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_X11_extensions_scrnsaver_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_scrnsaver_h" >&5
-echo "${ECHO_T}$ac_cv_header_X11_extensions_scrnsaver_h" >&6
-if test $ac_cv_header_X11_extensions_scrnsaver_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xss" >&5
+$as_echo "$enable_xss" >&6; }
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/scrnsaver.h" "ac_cv_header_X11_extensions_scrnsaver_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_scrnsaver_h" = xyes; then :
xss_header_found=yes
fi
- echo "$as_me:$LINENO: checking for XScreenSaverQueryInfo" >&5
-echo $ECHO_N "checking for XScreenSaverQueryInfo... $ECHO_C" >&6
-if test "${ac_cv_func_XScreenSaverQueryInfo+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define XScreenSaverQueryInfo to an innocuous variant, in case <limits.h> declares XScreenSaverQueryInfo.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define XScreenSaverQueryInfo innocuous_XScreenSaverQueryInfo
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char XScreenSaverQueryInfo (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef XScreenSaverQueryInfo
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char XScreenSaverQueryInfo ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_XScreenSaverQueryInfo) || defined (__stub___XScreenSaverQueryInfo)
-choke me
-#else
-char (*f) () = XScreenSaverQueryInfo;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != XScreenSaverQueryInfo;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_XScreenSaverQueryInfo=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_fn_c_check_func "$LINENO" "XScreenSaverQueryInfo" "ac_cv_func_XScreenSaverQueryInfo"
+if test "x$ac_cv_func_XScreenSaverQueryInfo" = xyes; then :
-ac_cv_func_XScreenSaverQueryInfo=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_XScreenSaverQueryInfo" >&5
-echo "${ECHO_T}$ac_cv_func_XScreenSaverQueryInfo" >&6
-if test $ac_cv_func_XScreenSaverQueryInfo = yes; then
- :
else
- echo "$as_me:$LINENO: checking for XScreenSaverQueryInfo in -lXext" >&5
-echo $ECHO_N "checking for XScreenSaverQueryInfo in -lXext... $ECHO_C" >&6
-if test "${ac_cv_lib_Xext_XScreenSaverQueryInfo+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverQueryInfo in -lXext" >&5
+$as_echo_n "checking for XScreenSaverQueryInfo in -lXext... " >&6; }
+if ${ac_cv_lib_Xext_XScreenSaverQueryInfo+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char XScreenSaverQueryInfo ();
int
main ()
{
-XScreenSaverQueryInfo ();
+return XScreenSaverQueryInfo ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xext_XScreenSaverQueryInfo=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xext_XScreenSaverQueryInfo=no
+ ac_cv_lib_Xext_XScreenSaverQueryInfo=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XScreenSaverQueryInfo" >&5
-echo "${ECHO_T}$ac_cv_lib_Xext_XScreenSaverQueryInfo" >&6
-if test $ac_cv_lib_Xext_XScreenSaverQueryInfo = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XScreenSaverQueryInfo" >&5
+$as_echo "$ac_cv_lib_Xext_XScreenSaverQueryInfo" >&6; }
+if test "x$ac_cv_lib_Xext_XScreenSaverQueryInfo" = xyes; then :
XLIBSW="$XLIBSW -lXext"
xss_lib_found=yes
else
- echo "$as_me:$LINENO: checking for XScreenSaverQueryInfo in -lXss" >&5
-echo $ECHO_N "checking for XScreenSaverQueryInfo in -lXss... $ECHO_C" >&6
-if test "${ac_cv_lib_Xss_XScreenSaverQueryInfo+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverQueryInfo in -lXss" >&5
+$as_echo_n "checking for XScreenSaverQueryInfo in -lXss... " >&6; }
+if ${ac_cv_lib_Xss_XScreenSaverQueryInfo+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXss -lXext $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char XScreenSaverQueryInfo ();
int
main ()
{
-XScreenSaverQueryInfo ();
+return XScreenSaverQueryInfo ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Xss_XScreenSaverQueryInfo=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_Xss_XScreenSaverQueryInfo=no
+ ac_cv_lib_Xss_XScreenSaverQueryInfo=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverQueryInfo" >&5
-echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverQueryInfo" >&6
-if test $ac_cv_lib_Xss_XScreenSaverQueryInfo = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverQueryInfo" >&5
+$as_echo "$ac_cv_lib_Xss_XScreenSaverQueryInfo" >&6; }
+if test "x$ac_cv_lib_Xss_XScreenSaverQueryInfo" = xyes; then :
if test "$tcl_cv_ld_weak_l" = yes; then
# On Darwin, weak link libXss if possible,
@@ -10837,9 +8079,7 @@ fi
fi
if test $enable_xss = yes -a $xss_lib_found = yes -a $xss_header_found = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XSS 1
-_ACEOF
+$as_echo "#define HAVE_XSS 1" >>confdefs.h
fi
CFLAGS=$tk_oldCFlags
@@ -10851,66 +8091,36 @@ fi
# #define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------
-
-echo "$as_me:$LINENO: checking whether char is unsigned" >&5
-echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
-if test "${ac_cv_c_char_unsigned+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
+$as_echo_n "checking whether char is unsigned... " >&6; }
+if ${ac_cv_c_char_unsigned+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
static int test_array [1 - 2 * !(((char) -1) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_char_unsigned=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_char_unsigned=yes
+ ac_cv_c_char_unsigned=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
-echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
+$as_echo "$ac_cv_c_char_unsigned" >&6; }
if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- cat >>confdefs.h <<\_ACEOF
-#define __CHAR_UNSIGNED__ 1
-_ACEOF
+ $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
fi
@@ -10949,38 +8159,38 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
if test "`uname -s`" = "Darwin" ; then
- echo "$as_me:$LINENO: checking how to package libraries" >&5
-echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
- # Check whether --enable-framework or --disable-framework was given.
-if test "${enable_framework+set}" = set; then
- enableval="$enable_framework"
- enable_framework=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5
+$as_echo_n "checking how to package libraries... " >&6; }
+ # Check whether --enable-framework was given.
+if test "${enable_framework+set}" = set; then :
+ enableval=$enable_framework; enable_framework=$enableval
else
enable_framework=no
-fi;
+fi
+
if test $enable_framework = yes; then
if test $SHARED_BUILD = 0; then
- { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
-echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
+$as_echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
enable_framework=no
fi
if test $tcl_corefoundation = no; then
- { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
-echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
+$as_echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
enable_framework=no
fi
fi
if test $enable_framework = yes; then
- echo "$as_me:$LINENO: result: framework" >&5
-echo "${ECHO_T}framework" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: framework" >&5
+$as_echo "framework" >&6; }
FRAMEWORK_BUILD=1
else
if test $SHARED_BUILD = 1; then
- echo "$as_me:$LINENO: result: shared library" >&5
-echo "${ECHO_T}shared library" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared library" >&5
+$as_echo "shared library" >&6; }
else
- echo "$as_me:$LINENO: result: static library" >&5
-echo "${ECHO_T}static library" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: static library" >&5
+$as_echo "static library" >&6; }
fi
FRAMEWORK_BUILD=0
fi
@@ -10992,7 +8202,7 @@ echo "${ECHO_T}static library" >&6
TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist'
EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist'
EXTRA_APP_CC_SWITCHES="${EXTRA_APP_CC_SWITCHES}"' -mdynamic-no-pic'
- ac_config_files="$ac_config_files Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in"
+ ac_config_files="$ac_config_files Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in"
for l in ${LOCALES}; do CFBUNDLELOCALIZATIONS="${CFBUNDLELOCALIZATIONS}<string>$l</string>"; done
TK_YEAR="`date +%Y`"
@@ -11000,13 +8210,11 @@ fi
if test "$FRAMEWORK_BUILD" = "1" ; then
-cat >>confdefs.h <<\_ACEOF
-#define TK_FRAMEWORK 1
-_ACEOF
+$as_echo "#define TK_FRAMEWORK 1" >>confdefs.h
# Construct a fake local framework structure to make linking with
# '-framework Tk' and running of tktest work
- ac_config_commands="$ac_config_commands Tk.framework"
+ ac_config_commands="$ac_config_commands Tk.framework"
LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
if test "${libdir}" = '${exec_prefix}/lib'; then
@@ -11088,6 +8296,18 @@ TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}"
eval "TK_INCLUDE_SPEC=\"-I${includedir}\""
#------------------------------------------------------------------------
+# Demo dir
+#------------------------------------------------------------------------
+
+if test x"${DEMO_DIR}" = x; then :
+ DEMO_DIR='$(TK_LIBRARY)/demos'
+fi
+eval "TK_DEMO_DIR=\"`echo ${DEMO_DIR} | tr '()' '{}'`\""
+eval "TK_DEMO_DIR=\"`echo ${TK_DEMO_DIR} | tr '()' '{}'`\""
+
+
+
+#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------
@@ -11144,7 +8364,7 @@ TK_SHARED_BUILD=${SHARED_BUILD}
- ac_config_files="$ac_config_files Makefile:../unix/Makefile.in tkConfig.sh:../unix/tkConfig.sh.in tk.pc:../unix/tk.pc.in"
+ac_config_files="$ac_config_files Makefile:../unix/Makefile.in tkConfig.sh:../unix/tkConfig.sh.in tk.pc:../unix/tk.pc.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -11164,39 +8384,70 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
- echo "not updating unwritable cache $cache_file"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -11205,63 +8456,55 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
+# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -11270,12 +8513,15 @@ LTLIBOBJS=$ac_ltlibobjs
CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
-: ${CONFIG_STATUS=./config.status}
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -11285,81 +8531,253 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
-done
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -11367,148 +8785,111 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -11517,31 +8898,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by tk $as_me 8.6, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+# values after options handling.
+ac_log="
+This file was extended by tk $as_me 8.7, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -11549,43 +8919,41 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
-cat >>$CONFIG_STATUS <<\_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
@@ -11593,83 +8961,78 @@ $config_files
Configuration commands:
$config_commands
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+Report bugs to the package provider."
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-tk config.status 8.6
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+tk config.status 8.7
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -11683,42 +9046,54 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
-# INIT-COMMANDS section.
+# INIT-COMMANDS
#
-
VERSION=${TK_VERSION} && tk_aqua=${tk_aqua}
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "Tk-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tk-Info.plist:../macosx/Tk-Info.plist.in" ;;
- "Wish-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Wish-Info.plist:../macosx/Wish-Info.plist.in" ;;
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
- "tkConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tkConfig.sh:../unix/tkConfig.sh.in" ;;
- "tk.pc" ) CONFIG_FILES="$CONFIG_FILES tk.pc:../unix/tk.pc.in" ;;
- "Tk.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tk.framework" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ case $ac_config_target in
+ "Tk-Info.plist") CONFIG_FILES="$CONFIG_FILES Tk-Info.plist:../macosx/Tk-Info.plist.in" ;;
+ "Wish-Info.plist") CONFIG_FILES="$CONFIG_FILES Wish-Info.plist:../macosx/Wish-Info.plist.in" ;;
+ "Tk.framework") CONFIG_COMMANDS="$CONFIG_COMMANDS Tk.framework" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
+ "tkConfig.sh") CONFIG_FILES="$CONFIG_FILES tkConfig.sh:../unix/tkConfig.sh.in" ;;
+ "tk.pc") CONFIG_FILES="$CONFIG_FILES tk.pc:../unix/tk.pc.in" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -11729,523 +9104,409 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
}
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
-#
-# CONFIG_FILES section.
-#
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@TCL_VERSION@,$TCL_VERSION,;t t
-s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
-s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
-s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
-s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
-s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
-s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
-s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
-s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
-s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;t t
-s,@BUILD_TCLSH@,$BUILD_TCLSH,;t t
-s,@MAN_FLAGS@,$MAN_FLAGS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@TCL_THREADS@,$TCL_THREADS,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@TCL_LIBS@,$TCL_LIBS,;t t
-s,@DL_LIBS@,$DL_LIBS,;t t
-s,@DL_OBJS@,$DL_OBJS,;t t
-s,@PLAT_OBJS@,$PLAT_OBJS,;t t
-s,@PLAT_SRCS@,$PLAT_SRCS,;t t
-s,@LDAIX_SRC@,$LDAIX_SRC,;t t
-s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
-s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
-s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
-s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
-s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
-s,@CC_SEARCH_FLAGS@,$CC_SEARCH_FLAGS,;t t
-s,@LD_SEARCH_FLAGS@,$LD_SEARCH_FLAGS,;t t
-s,@STLIB_LD@,$STLIB_LD,;t t
-s,@SHLIB_LD@,$SHLIB_LD,;t t
-s,@TCL_SHLIB_LD_EXTRAS@,$TCL_SHLIB_LD_EXTRAS,;t t
-s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t
-s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
-s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
-s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
-s,@MAKE_LIB@,$MAKE_LIB,;t t
-s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
-s,@INSTALL_LIB@,$INSTALL_LIB,;t t
-s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t
-s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t
-s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
-s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
-s,@XFT_CFLAGS@,$XFT_CFLAGS,;t t
-s,@XFT_LIBS@,$XFT_LIBS,;t t
-s,@UNIX_FONT_OBJS@,$UNIX_FONT_OBJS,;t t
-s,@TK_VERSION@,$TK_VERSION,;t t
-s,@TK_MAJOR_VERSION@,$TK_MAJOR_VERSION,;t t
-s,@TK_MINOR_VERSION@,$TK_MINOR_VERSION,;t t
-s,@TK_PATCH_LEVEL@,$TK_PATCH_LEVEL,;t t
-s,@TK_YEAR@,$TK_YEAR,;t t
-s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
-s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
-s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
-s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
-s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
-s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
-s,@TK_STUB_LIB_PATH@,$TK_STUB_LIB_PATH,;t t
-s,@TK_INCLUDE_SPEC@,$TK_INCLUDE_SPEC,;t t
-s,@TK_BUILD_STUB_LIB_SPEC@,$TK_BUILD_STUB_LIB_SPEC,;t t
-s,@TK_BUILD_STUB_LIB_PATH@,$TK_BUILD_STUB_LIB_PATH,;t t
-s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
-s,@TK_SHARED_BUILD@,$TK_SHARED_BUILD,;t t
-s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
-s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
-s,@TCL_STUB_FLAGS@,$TCL_STUB_FLAGS,;t t
-s,@XINCLUDES@,$XINCLUDES,;t t
-s,@XLIBSW@,$XLIBSW,;t t
-s,@LOCALES@,$LOCALES,;t t
-s,@TK_WINDOWINGSYSTEM@,$TK_WINDOWINGSYSTEM,;t t
-s,@TK_PKG_DIR@,$TK_PKG_DIR,;t t
-s,@TK_LIBRARY@,$TK_LIBRARY,;t t
-s,@LIB_RUNTIME_DIR@,$LIB_RUNTIME_DIR,;t t
-s,@PRIVATE_INCLUDE_DIR@,$PRIVATE_INCLUDE_DIR,;t t
-s,@HTML_DIR@,$HTML_DIR,;t t
-s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
-s,@EXTRA_APP_CC_SWITCHES@,$EXTRA_APP_CC_SWITCHES,;t t
-s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
-s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
-s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
-s,@EXTRA_WISH_LIBS@,$EXTRA_WISH_LIBS,;t t
-s,@CFBUNDLELOCALIZATIONS@,$CFBUNDLELOCALIZATIONS,;t t
-s,@TK_RSRC_FILE@,$TK_RSRC_FILE,;t t
-s,@WISH_RSRC_FILE@,$WISH_RSRC_FILE,;t t
-s,@LIB_RSRC_FILE@,$LIB_RSRC_FILE,;t t
-s,@APP_RSRC_FILE@,$APP_RSRC_FILE,;t t
-s,@REZ@,$REZ,;t t
-s,@REZ_FLAGS@,$REZ_FLAGS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
esac
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+_ACEOF
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- Tk.framework ) n=Tk &&
+ case $ac_file$ac_mode in
+ "Tk.framework":C) n=Tk &&
f=$n.framework && v=Versions/$VERSION &&
rm -rf $f && mkdir -p $f/$v/Resources &&
ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
@@ -12253,17 +9514,18 @@ echo "$as_me: executing $ac_dest commands" >&6;}
if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
unset n f v
;;
+
esac
-done
-_ACEOF
+done # for ac_tag
-cat >>$CONFIG_STATUS <<\_ACEOF
-{ (exit 0); exit 0; }
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -12283,7 +9545,11 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/unix/configure.in b/unix/configure.ac
index fdffbcc..3f22bd9 100644
--- a/unix/configure.in
+++ b/unix/configure.ac
@@ -3,8 +3,8 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
-AC_INIT([tk],[8.6])
-AC_PREREQ(2.59)
+AC_INIT([tk],[8.7])
+AC_PREREQ(2.69)
dnl This is only used when included from macosx/configure.ac
m4_ifdef([SC_USE_CONFIG_HEADERS], [
@@ -22,10 +22,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
#endif /* _TKCONFIG */])
])
-TK_VERSION=8.6
+TK_VERSION=8.7
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".10"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a3"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -36,6 +36,7 @@ LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
SC_PATH_TCLCONFIG
SC_LOAD_TCLCONFIG
+if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
Found config for Tcl ${TCL_VERSION}])
@@ -44,6 +45,7 @@ if test "${TCL_MINOR_VERSION}" -lt 6 ; then
AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+
Found config for Tcl ${TCL_VERSION}])
fi
+fi
SC_PROG_TCLSH
SC_BUILD_TCLSH
@@ -81,19 +83,6 @@ fi
AC_PROG_CC
AC_C_INLINE
-#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
-#--------------------------------------------------------------------
-
-AC_CHECK_HEADER(stdlib.h, tk_ok=1, tk_ok=0)
-AC_EGREP_HEADER(strtol, stdlib.h, , tk_ok=0)
-AC_EGREP_HEADER(strtoul, stdlib.h, , tk_ok=0)
-AC_EGREP_HEADER(strtod, stdlib.h, , tk_ok=0)
-if test $tk_ok = 0; then
- AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
-fi
-
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
@@ -111,13 +100,10 @@ if test -z "$no_pipe" && test -n "$GCC"; then
fi
#------------------------------------------------------------------------
-# Threads support - this auto-enables if Tcl was compiled threaded
+# Embedded configuration information, encoding to use for the values, TIP #59
#------------------------------------------------------------------------
-SC_ENABLE_THREADS
-
-# Add the threads support libraries
-LIBS="$LIBS$THREADS_LIBS"
+SC_TCL_CFG_ENCODING
SC_ENABLE_SHARED
@@ -780,6 +766,16 @@ TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}"
eval "TK_INCLUDE_SPEC=\"-I${includedir}\""
#------------------------------------------------------------------------
+# Demo dir
+#------------------------------------------------------------------------
+
+AS_IF([test x"${DEMO_DIR}" = x], [DEMO_DIR='$(TK_LIBRARY)/demos'])
+eval "TK_DEMO_DIR=\"`echo ${DEMO_DIR} | tr '()' '{}'`\""
+eval "TK_DEMO_DIR=\"`echo ${TK_DEMO_DIR} | tr '()' '{}'`\""
+AC_SUBST(DEMO_DIR)
+AC_SUBST(TK_DEMO_DIR)
+
+#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0e146e4..660faf4 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl8.6 2>/dev/null` \
+ `ls -d /usr/lib/tcl8.7 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
@@ -226,11 +226,11 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tk8.6 2>/dev/null` \
+ `ls -d /usr/lib/tk8.7 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tk8.6 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
+ `ls -d /usr/local/lib/tk8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig="`(cd $i; pwd)`"
@@ -547,6 +547,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
SHARED_BUILD=0
AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
fi
+ AC_SUBST(SHARED_BUILD)
])
#------------------------------------------------------------------------
@@ -598,113 +599,6 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [
])
#------------------------------------------------------------------------
-# SC_ENABLE_THREADS --
-#
-# Specify if thread support should be enabled
-#
-# Arguments:
-# none
-#
-# Results:
-#
-# Adds the following arguments to configure:
-# --enable-threads
-#
-# Sets the following vars:
-# THREADS_LIBS Thread library(s)
-#
-# Defines the following vars:
-# TCL_THREADS
-# _REENTRANT
-# _THREAD_SAFE
-#------------------------------------------------------------------------
-
-AC_DEFUN([SC_ENABLE_THREADS], [
- AC_ARG_ENABLE(threads,
- AC_HELP_STRING([--enable-threads],
- [build with threads (default: on)]),
- [tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "${TCL_THREADS}" = 1; then
- tcl_threaded_core=1;
- fi
-
- if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
- TCL_THREADS=1
- # USE_THREAD_ALLOC tells us to try the special thread-based
- # allocator that significantly reduces lock contention
- AC_DEFINE(USE_THREAD_ALLOC, 1,
- [Do we want to use the threaded memory allocator?])
- AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
- if test "`uname -s`" = "SunOS" ; then
- AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
- [Do we really want to follow the standard? Yes we do!])
- fi
- AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
- AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
- if test "$tcl_ok" = "no"; then
- # Check a little harder for __pthread_mutex_init in the same
- # library, as some systems hide it there until pthread.h is
- # defined. We could alternatively do an AC_TRY_COMPILE with
- # pthread.h, but that will work with libpthread really doesn't
- # exist, like AIX 4.2. [Bug: 4359]
- AC_CHECK_LIB(pthread, __pthread_mutex_init,
- tcl_ok=yes, tcl_ok=no)
- fi
-
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthread"
- else
- AC_CHECK_LIB(pthreads, pthread_mutex_init,
- tcl_ok=yes, tcl_ok=no)
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -lpthreads"
- else
- AC_CHECK_LIB(c, pthread_mutex_init,
- tcl_ok=yes, tcl_ok=no)
- if test "$tcl_ok" = "no"; then
- AC_CHECK_LIB(c_r, pthread_mutex_init,
- tcl_ok=yes, tcl_ok=no)
- if test "$tcl_ok" = "yes"; then
- # The space is needed
- THREADS_LIBS=" -pthread"
- else
- TCL_THREADS=0
- AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...])
- fi
- fi
- fi
- fi
-
- # Does the pthread-implementation provide
- # 'pthread_attr_setstacksize' ?
-
- ac_saved_libs=$LIBS
- LIBS="$LIBS $THREADS_LIBS"
- AC_CHECK_FUNCS(pthread_attr_setstacksize pthread_atfork)
- LIBS=$ac_saved_libs
- else
- TCL_THREADS=0
- fi
- # Do checking message here to not mess up interleaved configure output
- AC_MSG_CHECKING([for building with threads])
- if test "${TCL_THREADS}" = 1; then
- AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
- if test "${tcl_threaded_core}" = 1; then
- AC_MSG_RESULT([yes (threaded core)])
- else
- AC_MSG_RESULT([yes])
- fi
- else
- AC_MSG_RESULT([no])
- fi
-
- AC_SUBST(TCL_THREADS)
-])
-
-#------------------------------------------------------------------------
# SC_ENABLE_SYMBOLS --
#
# Specify if debugging symbols should be used.
@@ -896,8 +790,7 @@ AC_DEFUN([SC_CONFIG_MANPAGES], [
#
# Determine what the system is (some things cannot be easily checked
# on a feature-driven basis, alas). This can usually be done via the
-# "uname" command, but there are a few systems, like Next, where
-# this doesn't work.
+# "uname" command.
#
# Arguments:
# none
@@ -906,25 +799,18 @@ AC_DEFUN([SC_CONFIG_MANPAGES], [
# Defines the following var:
#
# system - System/platform/version identification code.
-#
#--------------------------------------------------------------------
AC_DEFUN([SC_CONFIG_SYSTEM], [
AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
- if test -f /usr/lib/NextStep/software_version; then
- tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ tcl_cv_sys_version=windows
else
tcl_cv_sys_version=`uname -s`-`uname -r`
if test "$?" -ne 0 ; then
AC_MSG_WARN([can't find uname command])
tcl_cv_sys_version=unknown
else
- # Special check for weird MP-RAS system (uname returns weird
- # results, and the version is kept in special file).
-
- if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid`
- fi
if test "`uname -s`" = "AIX" ; then
tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
fi
@@ -987,8 +873,8 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [
# shared libraries. The value of the symbol defaults to
# "${LIBS}" if all of the dependent libraries should
# be specified when creating a shared library. If
-# dependent libraries should not be specified (as on
-# SunOS 4.x, where they cause the link to fail, or in
+# dependent libraries should not be specified (as on some
+# SunOS systems, where they cause the link to fail, or in
# general if Tcl and Tk aren't themselves shared
# libraries), then this symbol has an empty string
# as its value.
@@ -1103,7 +989,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith"
], [
CFLAGS_OPTIMIZE=-O
CFLAGS_WARNING=""
@@ -1114,10 +1000,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
PLAT_OBJS=""
PLAT_SRCS=""
LDAIX_SRC=""
- AS_IF([test "x${SHLIB_VERSION}" = x],[SHLIB_VERSION=".1.0"],[SHLIB_VERSION=".${SHLIB_VERSION}"])
+ AS_IF([test "x${SHLIB_VERSION}" = x], [SHLIB_VERSION="1.0"])
case $system in
AIX-*)
- AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [
+ AS_IF([test "$GCC" != "yes"], [
# AIX requires the _r compiler when gcc isn't being used
case "${CC}" in
*_r|*_r\ *)
@@ -1212,7 +1098,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- CYGWIN_*|MINGW32*)
+ CYGWIN_*)
SHLIB_CFLAGS=""
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".dll"
@@ -1238,9 +1124,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "$ac_cv_cygwin" = "no"; then
AC_MSG_ERROR([${CC} is not a cygwin compiler.])
fi
- if test "x${TCL_THREADS}" = "x0"; then
- AC_MSG_ERROR([CYGWIN compile is only supported with --enable-threads])
- fi
do64bit_ok=yes
if test "x${SHARED_BUILD}" = "x1"; then
echo "running cd ../win; ${CONFIG_SHELL-/bin/sh} ./configure $ac_configure_args"
@@ -1431,7 +1314,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
])
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
@@ -1450,27 +1333,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
;;
- MP-RAS-02*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- MP-RAS-*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
OpenBSD-*)
arch=`arch -s`
case "$arch" in
@@ -1488,15 +1350,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AS_IF([test $doRpath = yes], [
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
LDFLAGS="-Wl,-export-dynamic"
CFLAGS_OPTIMIZE="-O2"
- AS_IF([test "${TCL_THREADS}" = "1"], [
- # On OpenBSD: Compile with -pthread
- # Don't link with -lpthread
- LIBS=`echo $LIBS | sed s/-lpthread//`
- CFLAGS="$CFLAGS -pthread"
- ])
+ # On OpenBSD: Compile with -pthread
+ # Don't link with -lpthread
+ LIBS=`echo $LIBS | sed s/-lpthread//`
+ CFLAGS="$CFLAGS -pthread"
# OpenBSD doesn't do version numbers with dots.
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
@@ -1512,12 +1372,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AS_IF([test $doRpath = yes], [
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- AS_IF([test "${TCL_THREADS}" = "1"], [
- # The -pthread needs to go in the CFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- ])
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
;;
DragonFly-*|FreeBSD-*)
# This configuration from FreeBSD Ports.
@@ -1531,11 +1389,10 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AS_IF([test $doRpath = yes], [
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
- AS_IF([test "${TCL_THREADS}" = "1"], [
- # The -pthread needs to go in the LDFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
case $system in
FreeBSD-3.*)
# Version numbers are dot-stripped by system policy.
@@ -1680,47 +1537,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
])
])
;;
- NEXTSTEP-*)
- SHLIB_CFLAGS=""
- SHLIB_LD='${CC} -nostdlib -r'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadNext.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
OS/390-*)
SHLIB_LD_LIBS=""
CFLAGS_OPTIMIZE="" # Optimizer is buggy
AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h
[Should OS/390 do the right thing with sockets?])
;;
- OSF1-1.0|OSF1-1.1|OSF1-1.2)
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- SHLIB_LD='ld -R -export $@:'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadOSF.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- SHLIB_CFLAGS="-fPIC"
- AS_IF([test "$SHARED_BUILD" = 1], [SHLIB_LD="ld -shared"], [
- SHLIB_LD="ld -non_shared"
- ])
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
OSF1-V*)
# Digital OSF/1
SHLIB_CFLAGS=""
@@ -1738,16 +1560,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
# see pthread_intro(3) for pthread support on osf1, k.furukawa
- AS_IF([test "${TCL_THREADS}" = 1], [
- CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
- CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
- LIBS=`echo $LIBS | sed s/-lpthreads//`
- AS_IF([test "$GCC" = yes], [
- LIBS="$LIBS -lpthread -lmach -lexc"
- ], [
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- ])
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ AS_IF([test "$GCC" = yes], [
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ ], [
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
])
;;
QNX-6*)
@@ -1768,11 +1588,11 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# this test works, since "uname -s" was non-standard in 3.2.4 and
# below.
AS_IF([test "$GCC" = yes], [
- SHLIB_CFLAGS="-fPIC -melf"
- LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
], [
- SHLIB_CFLAGS="-Kpic -belf"
- LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
])
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
@@ -1782,35 +1602,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- SINIX*5.4*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD='${CC} -G'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SunOS-4*)
- SHLIB_CFLAGS="-PIC"
- SHLIB_LD="ld"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
-
- # SunOS can't handle version numbers with dots in them in library
- # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
- # requires an extra version number at the end of .so file names.
- # So, the library has to have a name like libtcl75.so.1.0
-
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
SunOS-5.[[0-6]])
# Careful to not let 5.10+ fall into this case
@@ -2009,7 +1800,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
- CYGWIN_*|MINGW32_*) ;;
+ CYGWIN_*) ;;
IRIX*) ;;
NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
Darwin-*) ;;
@@ -2125,8 +1916,8 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Supply substitutes for missing POSIX header files. Special
# notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some
+# versions of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
#
@@ -2137,13 +1928,12 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Defines some of the following vars:
# NO_DIRENT_H
-# NO_VALUES_H
# NO_STDLIB_H
# NO_STRING_H
# NO_SYS_WAIT_H
# NO_DLFCN_H
# HAVE_SYS_PARAM_H
-#
+# HAVE_STDBOOL_H
# HAVE_STRING_H ?
#
#--------------------------------------------------------------------
@@ -2175,12 +1965,9 @@ closedir(d);
AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
fi
- AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
- AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
- AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
if test $tcl_ok = 0; then
AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
fi
@@ -2197,6 +1984,7 @@ closedir(d);
AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
+ AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
# OS/390 lacks sys/param.h (and doesn't need it, by chance).
AC_HAVE_HEADERS(sys/param.h)
@@ -2319,10 +2107,6 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
AC_MSG_RESULT([FIONBIO])
;;
- SunOS-4*)
- AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
- AC_MSG_RESULT([FIONBIO])
- ;;
*)
AC_MSG_RESULT([O_NONBLOCK])
;;
@@ -2401,13 +2185,20 @@ AC_DEFUN([SC_TIME_HANDLER], [
#
# Search for the libraries needed to link the Tcl shell.
# Things like the math library (-lm) and socket stuff (-lsocket vs.
-# -lnsl) are dealt with here.
+# -lnsl) or thread library (-lpthread) are dealt with here.
#
# Arguments:
# None.
#
# Results:
#
+# Sets the following vars:
+# THREADS_LIBS Thread library(s)
+#
+# Defines the following vars:
+# _REENTRANT
+# _THREAD_SAFE
+#
# Might append to the following vars:
# LIBS
# MATH_LIBS
@@ -2465,6 +2256,55 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
fi
AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
[LIBS="$LIBS -lnsl"])])
+
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+ AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ # Check a little harder for __pthread_mutex_init in the same
+ # library, as some systems hide it there until pthread.h is
+ # defined. We could alternatively do an AC_TRY_COMPILE with
+ # pthread.h, but that will work with libpthread really doesn't
+ # exist, like AIX 4.2. [Bug: 4359]
+ AC_CHECK_LIB(pthread, __pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ AC_CHECK_LIB(pthreads, pthread_mutex_init,
+ _ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthreads"
+ else
+ AC_CHECK_LIB(c, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ AC_CHECK_LIB(c_r, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ AC_MSG_WARN([Don't know how to find pthread lib on your system - you must edit the LIBS in the Makefile...])
+ fi
+ fi
+ fi
+ fi
+
+ # Does the pthread-implementation provide
+ # 'pthread_attr_setstacksize' ?
+
+ ac_saved_libs=$LIBS
+ LIBS="$LIBS $THREADS_LIBS"
+ AC_CHECK_FUNCS(pthread_attr_setstacksize pthread_atfork)
+ LIBS=$ac_saved_libs
+
+ # TIP #509
+ AC_CHECK_DECLS([PTHREAD_MUTEX_RECURSIVE],tcl_ok=yes,tcl_ok=no, [[#include <pthread.h>]])
])
#--------------------------------------------------------------------
@@ -2540,15 +2380,15 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
# See if the compiler knows natively about __int64
AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
tcl_type_64bit=__int64, tcl_type_64bit="long long")
- # See if we should use long anyway Note that we substitute in the
+ # See if we could use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
AC_TRY_COMPILE(,[switch (0) {
case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
}],tcl_cv_type_64bit=${tcl_type_64bit})])
if test "${tcl_cv_type_64bit}" = none ; then
- AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
- AC_MSG_RESULT([using long])
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?])
+ AC_MSG_RESULT([yes])
else
AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
[What type should be used to define wide integers?])
@@ -3094,6 +2934,129 @@ if test "x$NEED_FAKE_RFC2553" = "x1"; then
AC_CHECK_FUNC(strlcpy)
fi
])
+
+#------------------------------------------------------------------------
+# SC_CC_FOR_BUILD
+# For cross compiles, locate a C compiler that can generate native binaries.
+#
+# Arguments:
+# none
+#
+# Results:
+# Substitutes the following vars:
+# CC_FOR_BUILD
+# EXEEXT_FOR_BUILD
+#------------------------------------------------------------------------
+
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
+AC_DEFUN([AX_CC_FOR_BUILD],[# Put a plausible default for CC_FOR_BUILD in Makefile.
+ if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ AC_MSG_CHECKING([for gcc])
+ AC_CACHE_VAL(ac_cv_path_cc, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ fi
+ fi
+ AC_SUBST(CC_FOR_BUILD)
+ # Also set EXEEXT_FOR_BUILD.
+ if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+ else
+ OBJEXT_FOR_BUILD='.no'
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+ fi
+ AC_SUBST(EXEEXT_FOR_BUILD)])dnl
+ AC_SUBST(OBJEXT_FOR_BUILD)])dnl
+])
+
+
+#------------------------------------------------------------------------
+# SC_ZIPFS_SUPPORT
+# Locate a zip encoder installed on the system path, or none.
+#
+# Arguments:
+# none
+#
+# Results:
+# Substitutes the following vars:
+# ZIP_PROG
+# ZIP_PROG_OPTIONS
+# ZIP_PROG_VFSSEARCH
+# ZIP_INSTALL_OBJS
+#------------------------------------------------------------------------
+
+AC_DEFUN([SC_ZIPFS_SUPPORT], [
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ AC_MSG_CHECKING([for zip])
+ AC_CACHE_VAL(ac_cv_path_zip, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ AC_MSG_RESULT([$ZIP_PROG])
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ AC_MSG_RESULT([Found INFO Zip in environment])
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ AC_MSG_RESULT([No zip found on PATH. Building minizip])
+ fi
+ AC_SUBST(ZIP_PROG)
+ AC_SUBST(ZIP_PROG_OPTIONS)
+ AC_SUBST(ZIP_PROG_VFSSEARCH)
+ AC_SUBST(ZIP_INSTALL_OBJS)
+])
+
# Local Variables:
# mode: autoconf
# End:
diff --git a/unix/tk.pc.in b/unix/tk.pc.in
index 378b6eb..940184e 100644
--- a/unix/tk.pc.in
+++ b/unix/tk.pc.in
@@ -4,6 +4,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+demodir=@TK_DEMO_DIR@
Name: The Tk Toolkit
Description: Tk is a cross-platform graphical user interface toolkit, the standard GUI not only for Tcl, but for many other dynamic languages as well.
diff --git a/unix/tk.spec b/unix/tk.spec
index 1135ddd..3ed49b1 100644
--- a/unix/tk.spec
+++ b/unix/tk.spec
@@ -4,15 +4,15 @@
Name: tk
Summary: Tk graphical toolkit for the Tcl scripting language.
-Version: 8.6.10
+Version: 8.7a3
Release: 2
License: BSD
Group: Development/Languages
Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz
URL: https://www.tcl-lang.org/
Buildroot: /var/tmp/%{name}%{version}
-Buildrequires: XFree86-devel tcl >= %version
-Requires: tcl >= %version
+Buildrequires: XFree86-devel tcl >= 8.6.0
+Requires: tcl >= 8.6.0
%description
The Tcl (Tool Command Language) provides a powerful platform for
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index 13bcdde..91dcba7 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -73,6 +73,9 @@ main(
{
#ifdef TK_LOCAL_MAIN_HOOK
TK_LOCAL_MAIN_HOOK(&argc, &argv);
+#elif (TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 6)
+ /* This doesn't work with Tcl 8.6 */
+ TclZipfs_AppHook(&argc, &argv);
#endif
Tk_Main(argc, argv, TK_LOCAL_APPINIT);
diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in
index 72d97c8..c435f7c 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -139,6 +139,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* What encoding should be used for embedded configuration info? */
+#undef TCL_CFGVAL_ENCODING
+
/* Is this a 64-bit build? */
#undef TCL_CFG_DO64BIT
@@ -157,9 +160,6 @@
/* What is the default extension for shared libraries? */
#undef TCL_SHLIB_EXT
-/* Are we building with threads enabled? */
-#undef TCL_THREADS
-
/* Are wide integers to be implemented with C 'long's? */
#undef TCL_WIDE_INT_IS_LONG
diff --git a/unix/tkConfig.sh.in b/unix/tkConfig.sh.in
index bb85ad0..e08861b 100644
--- a/unix/tkConfig.sh.in
+++ b/unix/tkConfig.sh.in
@@ -95,3 +95,6 @@ TK_BUILD_STUB_LIB_PATH='@TK_BUILD_STUB_LIB_PATH@'
# Path to the Tk stub library in the install directory.
TK_STUB_LIB_PATH='@TK_STUB_LIB_PATH@'
+
+# Top-level directory in which Tk's demo files are installed.
+TK_DEMO_DIR='@TK_DEMO_DIR@'
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 6a99124..24ac8cc 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.c
@@ -396,7 +396,7 @@ void
TkpDisplayButton(
ClientData clientData) /* Information about widget. */
{
- register TkButton *butPtr = (TkButton *) clientData;
+ TkButton *butPtr = clientData;
GC gc;
Tk_3DBorder border;
Pixmap pixmap;
@@ -860,7 +860,7 @@ TkpDisplayButton(
void
TkpComputeButtonGeometry(
- register TkButton *butPtr) /* Button whose geometry may have changed. */
+ TkButton *butPtr) /* Button whose geometry may have changed. */
{
int width, height, avgWidth, txtWidth, txtHeight;
int haveImage = 0, haveText = 0;
diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c
index 8afb92d..4c58adf 100644
--- a/unix/tkUnixCursor.c
+++ b/unix/tkUnixCursor.c
@@ -245,7 +245,7 @@ TkGetCursorByName(
if ((argv[0][0] != '@') && !inTkTable) {
XColor fg, bg;
unsigned int maskIndex;
- register const struct CursorName *namePtr;
+ const struct CursorName *namePtr;
TkDisplay *dispPtr;
/*
diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h
index 3e9ef97..fa1f120 100644
--- a/unix/tkUnixDefault.h
+++ b/unix/tkUnixDefault.h
@@ -63,7 +63,7 @@
#define DEF_BUTTON_HIGHLIGHT BLACK
#define DEF_LABEL_HIGHLIGHT_WIDTH "0"
#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
-#define DEF_BUTTON_IMAGE ((char *) NULL)
+#define DEF_BUTTON_IMAGE NULL
#define DEF_BUTTON_INDICATOR "1"
#define DEF_BUTTON_JUSTIFY "center"
#define DEF_BUTTON_OFF_VALUE "0"
@@ -80,10 +80,10 @@
#define DEF_BUTTON_REPEAT_INTERVAL "0"
#define DEF_BUTTON_SELECT_COLOR INDICATOR
#define DEF_BUTTON_SELECT_MONO BLACK
-#define DEF_BUTTON_SELECT_IMAGE ((char *) NULL)
+#define DEF_BUTTON_SELECT_IMAGE NULL
#define DEF_BUTTON_STATE "normal"
#define DEF_LABEL_TAKE_FOCUS "0"
-#define DEF_BUTTON_TAKE_FOCUS ((char *) NULL)
+#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_UNDERLINE "-1"
@@ -121,7 +121,7 @@
#define DEF_CANVAS_SELECT_BD_MONO "0"
#define DEF_CANVAS_SELECT_FG_COLOR BLACK
#define DEF_CANVAS_SELECT_FG_MONO WHITE
-#define DEF_CANVAS_TAKE_FOCUS ((char *) NULL)
+#define DEF_CANVAS_TAKE_FOCUS NULL
#define DEF_CANVAS_WIDTH "10c"
#define DEF_CANVAS_X_SCROLL_CMD ""
#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
@@ -152,6 +152,8 @@
#define DEF_ENTRY_INSERT_ON_TIME "600"
#define DEF_ENTRY_INSERT_WIDTH "2"
#define DEF_ENTRY_JUSTIFY "left"
+#define DEF_ENTRY_PLACEHOLDER ""
+#define DEF_ENTRY_PLACEHOLDERFG "#b3b3b3"
#define DEF_ENTRY_READONLY_BG_COLOR NORMAL_BG
#define DEF_ENTRY_READONLY_BG_MONO WHITE
#define DEF_ENTRY_RELIEF "sunken"
@@ -162,9 +164,9 @@
#define DEF_ENTRY_SELECT_BD_MONO "0"
#define DEF_ENTRY_SELECT_FG_COLOR BLACK
#define DEF_ENTRY_SELECT_FG_MONO WHITE
-#define DEF_ENTRY_SHOW ((char *) NULL)
+#define DEF_ENTRY_SHOW NULL
#define DEF_ENTRY_STATE "normal"
-#define DEF_ENTRY_TAKE_FOCUS ((char *) NULL)
+#define DEF_ENTRY_TAKE_FOCUS NULL
#define DEF_ENTRY_TEXT_VARIABLE ""
#define DEF_ENTRY_WIDTH "20"
@@ -173,7 +175,9 @@
*/
#define DEF_FRAME_BG_COLOR NORMAL_BG
+#define DEF_FRAME_BG_IMAGE NULL
#define DEF_FRAME_BG_MONO WHITE
+#define DEF_FRAME_BG_TILE "0"
#define DEF_FRAME_BORDER_WIDTH "0"
#define DEF_FRAME_CLASS "Frame"
#define DEF_FRAME_COLORMAP ""
@@ -232,36 +236,36 @@
#define DEF_LISTBOX_SELECT_MODE "browse"
#define DEF_LISTBOX_SET_GRID "0"
#define DEF_LISTBOX_STATE "normal"
-#define DEF_LISTBOX_TAKE_FOCUS ((char *) NULL)
+#define DEF_LISTBOX_TAKE_FOCUS NULL
#define DEF_LISTBOX_WIDTH "20"
/*
* Defaults for individual entries of menus:
*/
-#define DEF_MENU_ENTRY_ACTIVE_BG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACTIVE_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACCELERATOR ((char *) NULL)
-#define DEF_MENU_ENTRY_BG ((char *) NULL)
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#define DEF_MENU_ENTRY_ACTIVE_FG NULL
+#define DEF_MENU_ENTRY_ACCELERATOR NULL
+#define DEF_MENU_ENTRY_BG NULL
#define DEF_MENU_ENTRY_BITMAP NULL
#define DEF_MENU_ENTRY_COLUMN_BREAK "0"
-#define DEF_MENU_ENTRY_COMMAND ((char *) NULL)
+#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
-#define DEF_MENU_ENTRY_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_FONT ((char *) NULL)
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
-#define DEF_MENU_ENTRY_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_IMAGE NULL
#define DEF_MENU_ENTRY_INDICATOR "1"
-#define DEF_MENU_ENTRY_LABEL ((char *) NULL)
-#define DEF_MENU_ENTRY_MENU ((char *) NULL)
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
#define DEF_MENU_ENTRY_OFF_VALUE "0"
#define DEF_MENU_ENTRY_ON_VALUE "1"
-#define DEF_MENU_ENTRY_SELECT_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
#define DEF_MENU_ENTRY_STATE "normal"
-#define DEF_MENU_ENTRY_VALUE ((char *) NULL)
-#define DEF_MENU_ENTRY_CHECK_VARIABLE ((char *) NULL)
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
-#define DEF_MENU_ENTRY_SELECT ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT NULL
#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
@@ -273,6 +277,7 @@
#define DEF_MENU_ACTIVE_BORDER_WIDTH "1"
#define DEF_MENU_ACTIVE_FG_COLOR BLACK
#define DEF_MENU_ACTIVE_FG_MONO WHITE
+#define DEF_MENU_ACTIVE_RELIEF "raised"
#define DEF_MENU_BG_COLOR NORMAL_BG
#define DEF_MENU_BG_MONO WHITE
#define DEF_MENU_BORDER_WIDTH "1"
@@ -286,8 +291,8 @@
#define DEF_MENU_SELECT_COLOR BLACK
#define DEF_MENU_SELECT_MONO BLACK
#define DEF_MENU_TAKE_FOCUS "0"
-#define DEF_MENU_TEAROFF "1"
-#define DEF_MENU_TEAROFF_CMD ((char *) NULL)
+#define DEF_MENU_TEAROFF "0"
+#define DEF_MENU_TEAROFF_CMD NULL
#define DEF_MENU_TITLE ""
#define DEF_MENU_TYPE "normal"
@@ -315,7 +320,7 @@
#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
#define DEF_MENUBUTTON_HIGHLIGHT BLACK
#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
-#define DEF_MENUBUTTON_IMAGE ((char *) NULL)
+#define DEF_MENUBUTTON_IMAGE NULL
#define DEF_MENUBUTTON_INDICATOR "0"
#define DEF_MENUBUTTON_JUSTIFY "center"
#define DEF_MENUBUTTON_MENU ""
@@ -425,7 +430,7 @@
#define DEF_SCALE_SLIDER_LENGTH "30"
#define DEF_SCALE_SLIDER_RELIEF "raised"
#define DEF_SCALE_STATE "normal"
-#define DEF_SCALE_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCALE_TAKE_FOCUS NULL
#define DEF_SCALE_TICK_INTERVAL "0"
#define DEF_SCALE_TO "100"
#define DEF_SCALE_VARIABLE ""
@@ -452,7 +457,7 @@
#define DEF_SCROLLBAR_RELIEF "sunken"
#define DEF_SCROLLBAR_REPEAT_DELAY "300"
#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
-#define DEF_SCROLLBAR_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
#define DEF_SCROLLBAR_TROUGH_MONO WHITE
#define DEF_SCROLLBAR_WIDTH "11"
@@ -500,7 +505,7 @@
#define DEF_TEXT_STATE "normal"
#define DEF_TEXT_TABS ""
#define DEF_TEXT_TABSTYLE "tabular"
-#define DEF_TEXT_TAKE_FOCUS ((char *) NULL)
+#define DEF_TEXT_TAKE_FOCUS NULL
#define DEF_TEXT_UNDO "0"
#define DEF_TEXT_WIDTH "80"
#define DEF_TEXT_WRAP "char"
diff --git a/unix/tkUnixDraw.c b/unix/tkUnixDraw.c
index acc0565..e6886e8 100644
--- a/unix/tkUnixDraw.c
+++ b/unix/tkUnixDraw.c
@@ -24,7 +24,7 @@ typedef struct ScrollInfo {
int done; /* Flag is 0 until filtering is done. */
Display *display; /* Display to filter. */
Window window; /* Window to filter. */
- TkRegion region; /* Region into which damage is accumulated. */
+ Region region; /* Region into which damage is accumulated. */
int dx, dy; /* Amount by which window was shifted. */
} ScrollInfo;
@@ -61,7 +61,7 @@ TkScrollWindow(
int x, int y, int width, int height,
/* Position rectangle to be scrolled. */
int dx, int dy, /* Distance rectangle should be moved. */
- TkRegion damageRgn) /* Region to accumulate damage in. */
+ Region damageRgn) /* Region to accumulate damage in. */
{
Tk_RestrictProc *prevProc;
ClientData prevArg;
@@ -90,7 +90,7 @@ TkScrollWindow(
}
Tk_RestrictEvents(prevProc, prevArg, &prevArg);
- if (XEmptyRegion((Region) damageRgn)) {
+ if (XEmptyRegion(damageRgn)) {
return 0;
} else {
return 1;
@@ -141,8 +141,8 @@ ScrollRestrictProc(
rect.y = eventPtr->xgraphicsexpose.y;
rect.width = eventPtr->xgraphicsexpose.width;
rect.height = eventPtr->xgraphicsexpose.height;
- XUnionRectWithRegion(&rect, (Region) info->region,
- (Region) info->region);
+ XUnionRectWithRegion(&rect, info->region,
+ info->region);
if (eventPtr->xgraphicsexpose.count == 0) {
info->done = 1;
@@ -160,12 +160,12 @@ ScrollRestrictProc(
rect.y = eventPtr->xexpose.y;
rect.width = eventPtr->xexpose.width;
rect.height = eventPtr->xexpose.height;
- XUnionRectWithRegion(&rect, (Region) info->region,
- (Region) info->region);
+ XUnionRectWithRegion(&rect, info->region,
+ info->region);
rect.x += info->dx;
rect.y += info->dy;
- XUnionRectWithRegion(&rect, (Region) info->region,
- (Region) info->region);
+ XUnionRectWithRegion(&rect, info->region,
+ info->region);
} else {
return TK_DEFER_EVENT;
}
@@ -208,7 +208,7 @@ TkpDrawHighlightBorder(
/*
*----------------------------------------------------------------------
*
- * TkpDrawFrame --
+ * TkpDrawFrameEx --
*
* This function draws the rectangular frame area.
*
@@ -222,14 +222,15 @@ TkpDrawHighlightBorder(
*/
void
-TkpDrawFrame(
+TkpDrawFrameEx(
Tk_Window tkwin,
+ Drawable drawable,
Tk_3DBorder border,
int highlightWidth,
int borderWidth,
int relief)
{
- Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, highlightWidth,
+ Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth,
highlightWidth, Tk_Width(tkwin) - 2*highlightWidth,
Tk_Height(tkwin) - 2*highlightWidth, borderWidth, relief);
}
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index a33a623..5653b75 100644
--- a/unix/tkUnixEmbed.c
+++ b/unix/tkUnixEmbed.c
@@ -907,7 +907,7 @@ TkpTestembedCmd(
if (containerPtr->parent == None) {
Tcl_DStringAppendElement(&dString, "");
} else if (all) {
- sprintf(buffer, "0x%lx", containerPtr->parent);
+ sprintf(buffer, "0x%" TCL_Z_MODIFIER "x", (size_t) containerPtr->parent);
Tcl_DStringAppendElement(&dString, buffer);
} else {
Tcl_DStringAppendElement(&dString, "XXX");
@@ -924,7 +924,7 @@ TkpTestembedCmd(
if (containerPtr->wrapper == None) {
Tcl_DStringAppendElement(&dString, "");
} else if (all) {
- sprintf(buffer, "0x%lx", containerPtr->wrapper);
+ sprintf(buffer, "0x%" TCL_Z_MODIFIER "x", (size_t) containerPtr->wrapper);
Tcl_DStringAppendElement(&dString, buffer);
} else {
Tcl_DStringAppendElement(&dString, "XXX");
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 43f695c..90dcd61 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -131,7 +131,7 @@ TkpOpenDisplay(
int reason = 0;
unsigned int use_xkb = 0;
/* Disabled, until we have a better test. See [Bug 3613668] */
-#if 0 && defined(XKEYCODETOKEYSYM_IS_DEPRECATED) && defined(TCL_THREADS)
+#if 0 && defined(XKEYCODETOKEYSYM_IS_DEPRECATED)
static int xinited = 0;
static Tcl_Mutex xinitMutex = NULL;
@@ -487,7 +487,7 @@ DisplayFileProc(
ClientData clientData, /* The display pointer. */
int flags) /* Should be TCL_READABLE. */
{
- TkDisplay *dispPtr = (TkDisplay *) clientData;
+ TkDisplay *dispPtr = clientData;
Display *display = dispPtr->display;
int numFound;
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 3893a0a..a3dfa5f 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -17,8 +17,8 @@
* The preferred font encodings.
*/
-static const char *const encodingList[] = {
- "iso8859-1", "jis0208", "jis0212", NULL
+static const char encodingList[][10] = {
+ "iso8859-1", "jis0208", "jis0212"
};
/*
@@ -40,7 +40,7 @@ static const char *const encodingList[] = {
typedef struct FontFamily {
struct FontFamily *nextPtr; /* Next in list of all known font families. */
- int refCount; /* How many SubFonts are referring to this
+ size_t refCount; /* How many SubFonts are referring to this
* FontFamily. When the refCount drops to
* zero, this FontFamily may be freed. */
/*
@@ -389,8 +389,8 @@ ControlUtfProc(
const char *srcStart, *srcEnd;
char *dstStart, *dstEnd;
int ch, result;
- static char hexChars[] = "0123456789abcdef";
- static char mapChars[] = {
+ static const char hexChars[] = "0123456789ABCDEF";
+ static const char mapChars[] = {
0, 0, 0, 0, 0, 0, 0,
'a', 'b', 't', 'n', 'v', 'f', 'r'
};
@@ -428,10 +428,10 @@ ControlUtfProc(
} else {
/* TODO we can do better here */
dst[1] = 'u';
- dst[2] = 'f';
- dst[3] = 'f';
- dst[4] = 'f';
- dst[5] = 'd';
+ dst[2] = 'F';
+ dst[3] = 'F';
+ dst[4] = 'F';
+ dst[5] = 'D';
dst += 6;
}
}
@@ -1907,8 +1907,7 @@ FreeFontFamily(
if (familyPtr == NULL) {
return;
}
- familyPtr->refCount--;
- if (familyPtr->refCount > 0) {
+ if (familyPtr->refCount-- > 1) {
return;
}
if (familyPtr->encoding) {
@@ -2598,7 +2597,7 @@ CanUseFallback(
memcpy(newPtr, fontPtr->subFontArray,
fontPtr->numSubFonts * sizeof(SubFont));
if (fixSubFontPtrPtr != NULL) {
- register SubFont *fixSubFontPtr = *fixSubFontPtrPtr;
+ SubFont *fixSubFontPtr = *fixSubFontPtrPtr;
if (fixSubFontPtr != &fontPtr->controlSubFont) {
*fixSubFontPtrPtr =
@@ -2684,7 +2683,7 @@ RankAttributes(
penalty += diff;
}
if (gotPtr->xa.charset != wantPtr->xa.charset) {
- int i;
+ size_t i;
const char *gotAlias, *wantAlias;
penalty += 65000;
@@ -2692,7 +2691,7 @@ RankAttributes(
wantAlias = GetEncodingAlias(wantPtr->xa.charset);
if (strcmp(gotAlias, wantAlias) != 0) {
penalty += 30000;
- for (i = 0; encodingList[i] != NULL; i++) {
+ for (i = 0; i < sizeof(encodingList)/sizeof(encodingList[0]); i++) {
if (strcmp(gotAlias, encodingList[i]) == 0) {
penalty -= 30000;
break;
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 75d5f6c..fa93edc 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -110,7 +110,7 @@ TkpGetString(
XEvent *eventPtr, /* X keyboard event. */
Tcl_DString *dsPtr) /* Initialized, empty string to hold result. */
{
- int len;
+ TkSizeT len;
Tcl_DString buf;
TkKeyEvent *kePtr = (TkKeyEvent *) eventPtr;
@@ -121,7 +121,7 @@ TkpGetString(
if (kePtr->charValuePtr != NULL) {
Tcl_DStringSetLength(dsPtr, kePtr->charValueLen);
memcpy(Tcl_DStringValue(dsPtr), kePtr->charValuePtr,
- (unsigned) kePtr->charValueLen+1);
+ kePtr->charValueLen+1);
return Tcl_DStringValue(dsPtr);
}
@@ -231,7 +231,7 @@ TkpGetString(
done:
kePtr->charValuePtr = ckalloc(len + 1);
kePtr->charValueLen = len;
- memcpy(kePtr->charValuePtr, Tcl_DStringValue(dsPtr), (unsigned) len + 1);
+ memcpy(kePtr->charValuePtr, Tcl_DStringValue(dsPtr), len + 1);
return Tcl_DStringValue(dsPtr);
}
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index 909276a..0d3d255 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -9,9 +9,9 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "default.h"
#include "tkUnixInt.h"
#include "tkMenu.h"
+#include "default.h"
/*
* Constants used for menu drawing.
@@ -199,7 +199,7 @@ TkpDestroyMenuEntry(
int
TkpConfigureMenuEntry(
- register TkMenuEntry *mePtr)/* Information about menu entry; may or may
+ TkMenuEntry *mePtr)/* Information about menu entry; may or may
* not already have values for some fields. */
{
/*
@@ -443,9 +443,8 @@ DrawMenuEntryBackground(
|| (menuPtr->postedCascade != mePtr))) {
relief = TK_RELIEF_FLAT;
} else {
- relief = TK_RELIEF_RAISED;
+ Tk_GetReliefFromObj(NULL, menuPtr->activeReliefPtr, &relief);
}
-
Tk_GetPixelsFromObj(NULL, menuPtr->tkwin,
menuPtr->activeBorderWidthPtr, &activeBorderWidth);
Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height,
@@ -939,7 +938,7 @@ TkpPostTearoffMenu(
int vRootX, vRootY, vRootWidth, vRootHeight;
int result;
- if (index >= menuPtr->numEntries) {
+ if (index >= (int)menuPtr->numEntries) {
index = menuPtr->numEntries - 1;
}
if (index >= 0) {
@@ -1131,7 +1130,7 @@ TkpComputeMenubarGeometry(
menuFont = Tk_GetFontFromObj(menuPtr->tkwin, menuPtr->fontPtr);
Tk_GetFontMetrics(menuFont, &menuMetrics);
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
mePtr = menuPtr->entries[i];
mePtr->entryFlags &= ~ENTRY_LAST_COLUMN;
if (mePtr->fontPtr != NULL) {
@@ -1208,7 +1207,7 @@ TkpComputeMenubarGeometry(
maxWidth = x + menuPtr->entries[lastEntry]->width + borderWidth;
}
x = borderWidth;
- for (j = lastRowBreak; j < menuPtr->numEntries; j++) {
+ for (j = lastRowBreak; j < (int)menuPtr->numEntries; j++) {
if (j == helpMenuIndex) {
continue;
}
@@ -1710,7 +1709,7 @@ TkpComputeStandardMenuGeometry(
Tk_GetFontMetrics(menuFont, &menuMetrics);
accelSpace = Tk_TextWidth(menuFont, "M", 1);
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
mePtr = menuPtr->entries[i];
if (mePtr->fontPtr == NULL) {
tkfont = menuFont;
@@ -1805,7 +1804,7 @@ TkpComputeStandardMenuGeometry(
if (accelWidth != 0) {
labelWidth += accelSpace;
}
- for (j = lastColumnBreak; j < menuPtr->numEntries; j++) {
+ for (j = lastColumnBreak; j < (int)menuPtr->numEntries; j++) {
menuPtr->entries[j]->indicatorSpace = indicatorSpace;
menuPtr->entries[j]->labelWidth = labelWidth;
menuPtr->entries[j]->width = indicatorSpace + labelWidth
diff --git a/unix/tkUnixMenubu.c b/unix/tkUnixMenubu.c
index 2c6b99b..eb0af47 100644
--- a/unix/tkUnixMenubu.c
+++ b/unix/tkUnixMenubu.c
@@ -58,14 +58,14 @@ void
TkpDisplayMenuButton(
ClientData clientData) /* Information about widget. */
{
- register TkMenuButton *mbPtr = (TkMenuButton *) clientData;
+ TkMenuButton *mbPtr = clientData;
GC gc;
Tk_3DBorder border;
Pixmap pixmap;
int x = 0; /* Initialization needed only to stop compiler
* warning. */
int y = 0;
- register Tk_Window tkwin = mbPtr->tkwin;
+ Tk_Window tkwin = mbPtr->tkwin;
int fullWidth, fullHeight;
int textXOffset, textYOffset;
int imageWidth, imageHeight;
diff --git a/unix/tkUnixPort.h b/unix/tkUnixPort.h
index b6a35d8..f51f1e7 100644
--- a/unix/tkUnixPort.h
+++ b/unix/tkUnixPort.h
@@ -23,11 +23,7 @@
#include <limits.h>
#include <math.h>
#include <pwd.h>
-#ifdef NO_STDLIB_H
-# include "../compat/stdlib.h"
-#else
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <sys/types.h>
@@ -52,11 +48,7 @@
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
-#ifndef NO_UNISTD_H
-# include <unistd.h>
-#else
-# include "../compat/unistd.h"
-#endif
+#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
@@ -125,16 +117,6 @@
# define LPARAM void *
# define LRESULT void *
-#else /* !__CYGWIN__ */
- /*
- * The TkPutImage macro strips off the color table information, which isn't
- * needed for X.
- */
-
-# define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \
- XPutImage(display, pixels, gc, image, srcx, srcy, destx, \
- desty, width, height);
-
#endif /* !__CYGWIN__ */
/*
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 31b28c5..e69dab0 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -56,14 +56,24 @@ typedef struct {
static Tcl_ThreadDataKey dataKey;
/*
- * Package initialization:
- * Nothing to do here except register the fact that we're using Xft in
- * the TIP 59 configuration database.
+ *-------------------------------------------------------------------------
+ *
+ * TkpFontPkgInit --
+ *
+ * This procedure is called when an application is created. It
+ * initializes all the structures that are used by the
+ * platform-dependant code on a per application basis.
+ * Note that this is called before TkpInit() !
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *-------------------------------------------------------------------------
*/
-#ifndef TCL_CFGVAL_ENCODING
-#define TCL_CFGVAL_ENCODING "ascii"
-#endif
static int utf8ToUcs4(const char *source, FcChar32 *c, int numBytes)
{
@@ -77,12 +87,6 @@ void
TkpFontPkgInit(
TkMainInfo *mainPtr) /* The application being created. */
{
- static const Tcl_Config cfg[] = {
- { "fontsystem", "xft" },
- { 0,0 }
- };
-
- Tcl_RegisterConfig(mainPtr->interp, "tk", cfg, TCL_CFGVAL_ENCODING);
}
static XftFont *
@@ -626,7 +630,7 @@ void
TkpGetFontAttrsForChar(
Tk_Window tkwin, /* Window on the font's display */
Tk_Font tkfont, /* Font to query */
- int c, /* Character of interest */
+ int c, /* Character of interest */
TkFontAttributes *faPtr) /* Output: Font attributes */
{
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
@@ -1251,12 +1255,12 @@ TkDrawAngledChars(
void
TkUnixSetXftClipRegion(
- TkRegion clipRegion) /* The clipping region to install. */
+ Region clipRegion) /* The clipping region to install. */
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- tsdPtr->clipRegion = (Region) clipRegion;
+ tsdPtr->clipRegion = clipRegion;
}
/*
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index 778c010..ca5183d 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -256,7 +256,7 @@ DisplayVerticalScale(
static void
DisplayVerticalValue(
- register TkScale *scalePtr, /* Information about widget in which to
+ TkScale *scalePtr, /* Information about widget in which to
* display value. */
Drawable drawable, /* Pixmap or window in which to draw the
* value. */
@@ -267,7 +267,7 @@ DisplayVerticalValue(
* specified in pixels. */
const char *format) /* Format string to use for the value */
{
- register Tk_Window tkwin = scalePtr->tkwin;
+ Tk_Window tkwin = scalePtr->tkwin;
int y, width, length;
char valueString[TCL_DOUBLE_SPACE];
Tk_FontMetrics fm;
@@ -325,7 +325,7 @@ DisplayHorizontalScale(
* to reflect the part of the window that was
* redrawn. */
{
- register Tk_Window tkwin = scalePtr->tkwin;
+ Tk_Window tkwin = scalePtr->tkwin;
int x, y, width, height, shadowWidth;
double tickInterval = scalePtr->tickInterval;
Tk_3DBorder sliderBorder;
@@ -479,7 +479,7 @@ DisplayHorizontalScale(
static void
DisplayHorizontalValue(
- register TkScale *scalePtr, /* Information about widget in which to
+ TkScale *scalePtr, /* Information about widget in which to
* display value. */
Drawable drawable, /* Pixmap or window in which to draw the
* value. */
@@ -490,7 +490,7 @@ DisplayHorizontalValue(
* in pixels. */
const char *format) /* Format string to use for the value */
{
- register Tk_Window tkwin = scalePtr->tkwin;
+ Tk_Window tkwin = scalePtr->tkwin;
int x, y, length, width;
char valueString[TCL_DOUBLE_SPACE];
Tk_FontMetrics fm;
@@ -546,7 +546,7 @@ void
TkpDisplayScale(
ClientData clientData) /* Widget record for scale. */
{
- TkScale *scalePtr = (TkScale *) clientData;
+ TkScale *scalePtr = clientData;
Tk_Window tkwin = scalePtr->tkwin;
Tcl_Interp *interp = scalePtr->interp;
Pixmap pixmap;
diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c
index 9b75431..c51aa18 100644
--- a/unix/tkUnixScrlbr.c
+++ b/unix/tkUnixScrlbr.c
@@ -97,8 +97,8 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
- register TkScrollbar *scrollPtr = (TkScrollbar *) clientData;
- register Tk_Window tkwin = scrollPtr->tkwin;
+ TkScrollbar *scrollPtr = clientData;
+ Tk_Window tkwin = scrollPtr->tkwin;
XPoint points[7];
Tk_3DBorder border;
int relief, width, elementBorderWidth;
@@ -277,7 +277,7 @@ TkpDisplayScrollbar(
extern void
TkpComputeScrollbarGeometry(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Scrollbar whose geometry may have
* changed. */
{
@@ -394,7 +394,7 @@ TkpDestroyScrollbar(
void
TkpConfigureScrollbar(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Information about widget; may or may not
* already have values for some fields. */
{
@@ -437,12 +437,12 @@ TkpConfigureScrollbar(
int
TkpScrollbarPosition(
- register TkScrollbar *scrollPtr,
+ TkScrollbar *scrollPtr,
/* Scrollbar widget record. */
int x, int y) /* Coordinates within scrollPtr's window. */
{
int length, width, tmp;
- register const int inset = scrollPtr->inset;
+ const int inset = scrollPtr->inset;
if (scrollPtr->vertical) {
length = Tk_Height(scrollPtr->tkwin);
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 4819183..11161b7 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -240,10 +240,10 @@ TkSelGetSelection(
void
TkSelPropProc(
- register XEvent *eventPtr) /* X PropertyChange event. */
+ XEvent *eventPtr) /* X PropertyChange event. */
{
- register IncrInfo *incrPtr;
- register TkSelHandler *selPtr;
+ IncrInfo *incrPtr;
+ TkSelHandler *selPtr;
int length, numItems;
unsigned long i;
Atom target, formatType;
@@ -449,7 +449,7 @@ TkSelPropProc(
if (srcLen > 3) {
Tcl_Panic("selection conversion left too many bytes unconverted");
}
- memcpy(incrPtr->converts[i].buffer, src, (size_t) srcLen+1);
+ memcpy(incrPtr->converts[i].buffer, src, srcLen + 1);
Tcl_DStringFree(&ds);
} else {
/*
@@ -519,10 +519,10 @@ TkSelPropProc(
void
TkSelEventProc(
Tk_Window tkwin, /* Window for which event was targeted. */
- register XEvent *eventPtr) /* X event: either SelectionClear,
+ XEvent *eventPtr) /* X event: either SelectionClear,
* SelectionRequest, or SelectionNotify. */
{
- register TkWindow *winPtr = (TkWindow *) tkwin;
+ TkWindow *winPtr = (TkWindow *) tkwin;
TkDisplay *dispPtr = winPtr->dispPtr;
Tcl_Interp *interp;
@@ -540,7 +540,7 @@ TkSelEventProc(
*/
if (eventPtr->type == SelectionNotify) {
- register TkSelRetrievalInfo *retrPtr;
+ TkSelRetrievalInfo *retrPtr;
char *propInfo, **propInfoPtr = &propInfo;
Atom type;
int format, result;
@@ -742,7 +742,7 @@ static void
SelTimeoutProc(
ClientData clientData) /* Information about retrieval in progress. */
{
- register TkSelRetrievalInfo *retrPtr = clientData;
+ TkSelRetrievalInfo *retrPtr = clientData;
/*
* Make sure that the retrieval is still in progress. Then see how long
@@ -766,7 +766,7 @@ SelTimeoutProc(
retrPtr->result = TCL_ERROR;
} else {
retrPtr->timeout = Tcl_CreateTimerHandler(1000, SelTimeoutProc,
- (ClientData) retrPtr);
+ retrPtr);
}
}
@@ -796,7 +796,7 @@ ConvertSelection(
* request; may not be selection's current
* owner, be we set it to the current
* owner. */
- register XSelectionRequestEvent *eventPtr)
+ XSelectionRequestEvent *eventPtr)
/* Event describing request. */
{
union {
@@ -898,7 +898,7 @@ ConvertSelection(
for (i = 0; i < incr.numConversions; i++) {
Atom target, property, type;
long buffer[TK_SEL_WORDS_AT_ONCE];
- register TkSelHandler *selPtr;
+ TkSelHandler *selPtr;
int numItems, format;
char *propPtr;
@@ -919,7 +919,7 @@ ConvertSelection(
/*
* Nobody seems to know about this kind of request. If it's of a
* sort that we can handle without any help, do it. Otherwise mark
- * the request as an errror.
+ * the request as an error.
*/
numItems = TkSelDefaultSelection(infoPtr, target, (char *) buffer,
@@ -1124,9 +1124,9 @@ ConvertSelection(
static void
SelRcvIncrProc(
ClientData clientData, /* Information about retrieval. */
- register XEvent *eventPtr) /* X PropertyChange event. */
+ XEvent *eventPtr) /* X PropertyChange event. */
{
- register TkSelRetrievalInfo *retrPtr = clientData;
+ TkSelRetrievalInfo *retrPtr = clientData;
char *propInfo, **propInfoPtr = &propInfo;
Atom type;
int format, result;
@@ -1374,7 +1374,7 @@ IncrTimeoutProc(
* retrieval for which we are selection
* owner. */
{
- register IncrInfo *incrPtr = clientData;
+ IncrInfo *incrPtr = clientData;
incrPtr->idleTime++;
if (incrPtr->idleTime >= 5) {
@@ -1487,7 +1487,7 @@ SelCvtToX(
static void
SelCvtFromX32(
- register long *propPtr, /* Property value from X. */
+ long *propPtr, /* Property value from X. */
int numValues, /* Number of 32-bit values in property. */
Atom type, /* Type of property Should not be XA_STRING
* (if so, don't bother calling this function
@@ -1520,7 +1520,7 @@ SelCvtFromX32(
static void
SelCvtFromX8(
- register char *propPtr, /* Property value from X. */
+ char *propPtr, /* Property value from X. */
int numValues, /* Number of 8-bit values in property. */
Atom type, /* Type of property Should not be XA_STRING
* (if so, don't bother calling this function
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 1ee4bba..4a24a89 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -958,7 +958,7 @@ Tk_SendObjCmd(
TkWindow *winPtr;
Window commWindow;
PendingCommand pending;
- register RegisteredInterp *riPtr;
+ RegisteredInterp *riPtr;
const char *destName;
int result, index, async, i, firstArg;
Tk_RestrictProc *prevProc;
@@ -1781,7 +1781,7 @@ AppendErrorProc(
XErrorEvent *errorPtr) /* Information about error. */
{
PendingCommand *pendingPtr = clientData;
- register PendingCommand *pcPtr;
+ PendingCommand *pcPtr;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -1830,7 +1830,7 @@ DeleteProc(
* ClientData. */
{
RegisteredInterp *riPtr = clientData;
- register RegisteredInterp *riPtr2;
+ RegisteredInterp *riPtr2;
NameRegistry *regPtr;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -1878,7 +1878,7 @@ DeleteProc(
static Tk_RestrictAction
SendRestrictProc(
ClientData clientData, /* Not used. */
- register XEvent *eventPtr) /* Event that just arrived. */
+ XEvent *eventPtr) /* Event that just arrived. */
{
TkDisplay *dispPtr;
@@ -2052,7 +2052,7 @@ TkpTestsendCmd(
Tcl_DStringFree(&tmp);
}
} else if (index == TESTSEND_SERIAL) {
- Tcl_SetObjResult(interp, Tcl_NewIntObj(localData.sendSerial+1));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(localData.sendSerial+1));
}
return TCL_OK;
}
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 2c9e9dd..490a1ea 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -36,7 +36,7 @@ typedef struct ProtocolHandler {
} ProtocolHandler;
#define HANDLER_SIZE(cmdLength) \
- ((unsigned) ((Tk_Offset(ProtocolHandler, command) + 1) + cmdLength))
+ (offsetof(ProtocolHandler, command) + 1 + cmdLength)
/*
* Data for [wm attributes] command:
@@ -564,7 +564,7 @@ void
TkWmNewWindow(
TkWindow *winPtr) /* Newly-created top-level window. */
{
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
TkDisplay *dispPtr = winPtr->dispPtr;
wmPtr = ckalloc(sizeof(WmInfo));
@@ -659,7 +659,7 @@ TkWmMapWindow(
TkWindow *winPtr) /* Top-level window that's about to be
* mapped. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
XTextProperty textProp;
if (wmPtr->flags & WM_NEVER_MAPPED) {
@@ -827,7 +827,7 @@ void
TkWmDeadWindow(
TkWindow *winPtr) /* Top-level window that's being deleted. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
WmInfo *wmPtr2;
if (wmPtr == NULL) {
@@ -836,7 +836,7 @@ TkWmDeadWindow(
if ((WmInfo *) winPtr->dispPtr->firstWmPtr == wmPtr) {
winPtr->dispPtr->firstWmPtr = wmPtr->nextPtr;
} else {
- register WmInfo *prevPtr;
+ WmInfo *prevPtr;
for (prevPtr = (WmInfo *) winPtr->dispPtr->firstWmPtr; ;
prevPtr = prevPtr->nextPtr) {
@@ -1033,7 +1033,7 @@ Tk_WmObjCmd(
WMOPT_MINSIZE, WMOPT_OVERRIDEREDIRECT, WMOPT_POSITIONFROM,
WMOPT_PROTOCOL, WMOPT_RESIZABLE, WMOPT_SIZEFROM, WMOPT_STACKORDER,
WMOPT_STATE, WMOPT_TITLE, WMOPT_TRANSIENT, WMOPT_WITHDRAW };
- int index, length;
+ int index;
const char *argv1;
TkWindow *winPtr;
Tk_Window targetWin;
@@ -1045,9 +1045,9 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
- argv1 = Tcl_GetStringFromObj(objv[1], &length);
- if ((argv1[0] == 't') && (strncmp(argv1, "tracing", (size_t) length) == 0)
- && (length >= 3)) {
+ argv1 = Tcl_GetString(objv[1]);
+ if ((argv1[0] == 't') && (strncmp(argv1, "tracing", objv[1]->length) == 0)
+ && (objv[1]->length >= 3)) {
int wmTracing;
if ((objc != 2) && (objc != 3)) {
@@ -1055,8 +1055,8 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- dispPtr->flags & TK_DISPLAY_WM_TRACING));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+ (dispPtr->flags & TK_DISPLAY_WM_TRACING) != 0));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing) != TCL_OK) {
@@ -1188,7 +1188,7 @@ WmAspectCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int numer1, denom1, numer2, denom2;
if ((objc != 3) && (objc != 7)) {
@@ -1200,10 +1200,10 @@ WmAspectCmd(
if (wmPtr->sizeHintsFlags & PAspect) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->minAspect.x);
- results[1] = Tcl_NewIntObj(wmPtr->minAspect.y);
- results[2] = Tcl_NewIntObj(wmPtr->maxAspect.x);
- results[3] = Tcl_NewIntObj(wmPtr->maxAspect.y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->minAspect.x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->minAspect.y);
+ results[2] = Tcl_NewWideIntObj(wmPtr->maxAspect.x);
+ results[3] = Tcl_NewWideIntObj(wmPtr->maxAspect.y);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -1345,11 +1345,11 @@ WmGetAttribute(
case WMATT_ALPHA:
return Tcl_NewDoubleObj(wmPtr->attributes.alpha);
case WMATT_TOPMOST:
- return Tcl_NewBooleanObj(wmPtr->attributes.topmost);
+ return Tcl_NewWideIntObj(wmPtr->attributes.topmost != 0);
case WMATT_ZOOMED:
- return Tcl_NewBooleanObj(wmPtr->attributes.zoomed);
+ return Tcl_NewWideIntObj(wmPtr->attributes.zoomed != 0);
case WMATT_FULLSCREEN:
- return Tcl_NewBooleanObj(wmPtr->attributes.fullscreen);
+ return Tcl_NewWideIntObj(wmPtr->attributes.fullscreen != 0);
case WMATT_TYPE:
return GetNetWmType(winPtr);
case _WMATT_LAST_ATTRIBUTE: /*NOTREACHED*/
@@ -1455,9 +1455,8 @@ WmClientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- int length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name?");
@@ -1470,7 +1469,7 @@ WmClientCmd(
}
return TCL_OK;
}
- argv3 = Tcl_GetStringFromObj(objv[3], &length);
+ argv3 = Tcl_GetString(objv[3]);
if (argv3[0] == 0) {
if (wmPtr->clientMachine != NULL) {
ckfree(wmPtr->clientMachine);
@@ -1486,7 +1485,7 @@ WmClientCmd(
if (wmPtr->clientMachine != NULL) {
ckfree(wmPtr->clientMachine);
}
- wmPtr->clientMachine = ckalloc(length + 1);
+ wmPtr->clientMachine = ckalloc(objv[3]->length + 1);
strcpy(wmPtr->clientMachine, argv3);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
XTextProperty textProp;
@@ -1541,7 +1540,7 @@ WmColormapwindowsCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Window *cmapList;
TkWindow *winPtr2;
int count, i, windowObjc, gotToplevel;
@@ -1642,7 +1641,7 @@ WmCommandCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
int cmdArgc;
const char **cmdArgv;
@@ -1711,7 +1710,7 @@ WmDeiconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -1761,7 +1760,7 @@ WmFocusmodelCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"active", "passive", NULL };
enum options {
@@ -1816,7 +1815,7 @@ WmForgetCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
if (Tk_IsTopLevel(frameWin)) {
TkFocusJoin(winPtr);
@@ -1869,7 +1868,7 @@ WmFrameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Window window;
char buf[TCL_INTEGER_SPACE];
@@ -1911,7 +1910,7 @@ WmGeometryCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char xSign, ySign;
int width, height;
const char *argv3;
@@ -1971,7 +1970,7 @@ WmGridCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int reqWidth, reqHeight, widthInc, heightInc;
if ((objc != 3) && (objc != 7)) {
@@ -1983,10 +1982,10 @@ WmGridCmd(
if (wmPtr->sizeHintsFlags & PBaseSize) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->reqGridWidth);
- results[1] = Tcl_NewIntObj(wmPtr->reqGridHeight);
- results[2] = Tcl_NewIntObj(wmPtr->widthInc);
- results[3] = Tcl_NewIntObj(wmPtr->heightInc);
+ results[0] = Tcl_NewWideIntObj(wmPtr->reqGridWidth);
+ results[1] = Tcl_NewWideIntObj(wmPtr->reqGridHeight);
+ results[2] = Tcl_NewWideIntObj(wmPtr->widthInc);
+ results[3] = Tcl_NewWideIntObj(wmPtr->heightInc);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -2070,11 +2069,10 @@ WmGroupCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
WmInfo *wmPtr2;
const char *argv3;
- int length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?pathName?");
@@ -2086,7 +2084,7 @@ WmGroupCmd(
}
return TCL_OK;
}
- argv3 = Tcl_GetStringFromObj(objv[3], &length);
+ argv3 = Tcl_GetString(objv[3]);
if (*argv3 == '\0') {
wmPtr->hints.flags &= ~WindowGroupHint;
if (wmPtr->leaderName != NULL) {
@@ -2114,7 +2112,7 @@ WmGroupCmd(
}
wmPtr->hints.window_group = Tk_WindowId(wmPtr2->wrapperPtr);
wmPtr->hints.flags |= WindowGroupHint;
- wmPtr->leaderName = ckalloc(length + 1);
+ wmPtr->leaderName = ckalloc(objv[3]->length + 1);
strcpy(wmPtr->leaderName, argv3);
}
UpdateHints(winPtr);
@@ -2146,7 +2144,7 @@ WmIconbitmapCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
const char *argv3;
@@ -2206,7 +2204,7 @@ WmIconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -2275,7 +2273,7 @@ WmIconmaskCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
const char *argv3;
@@ -2334,9 +2332,8 @@ WmIconnameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- int length;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?");
@@ -2351,8 +2348,8 @@ WmIconnameCmd(
if (wmPtr->iconName != NULL) {
ckfree(wmPtr->iconName);
}
- argv3 = Tcl_GetStringFromObj(objv[3], &length);
- wmPtr->iconName = ckalloc(length + 1);
+ argv3 = Tcl_GetString(objv[3]);
+ wmPtr->iconName = ckalloc(objv[3]->length + 1);
strcpy(wmPtr->iconName, argv3);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
UpdateTitle(winPtr);
@@ -2386,7 +2383,7 @@ WmIconphotoCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_PhotoHandle photo;
Tk_PhotoImageBlock block;
int i, size = 0, width, height, index = 0, x, y, isDefault = 0;
@@ -2479,9 +2476,9 @@ WmIconphotoCmd(
iconPropertyData[index++] = (unsigned long) height;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
- register unsigned char *pixelPtr =
+ unsigned char *pixelPtr =
block.pixelPtr + x*block.pixelSize + y*block.pitch;
- register unsigned long R, G, B, A;
+ unsigned long R, G, B, A;
R = pixelPtr[block.offset[0]];
G = pixelPtr[block.offset[1]];
@@ -2536,7 +2533,7 @@ WmIconpositionCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y;
if ((objc != 3) && (objc != 5)) {
@@ -2547,8 +2544,8 @@ WmIconpositionCmd(
if (wmPtr->hints.flags & IconPositionHint) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewIntObj(wmPtr->hints.icon_x);
- results[1] = Tcl_NewIntObj(wmPtr->hints.icon_y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->hints.icon_x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->hints.icon_y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
}
return TCL_OK;
@@ -2593,7 +2590,7 @@ WmIconwindowCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
WmInfo *wmPtr2;
XSetWindowAttributes atts;
@@ -2713,8 +2710,8 @@ WmManageCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!Tk_IsTopLevel(frameWin)) {
if (!Tk_IsManageable(frameWin)) {
@@ -2775,7 +2772,7 @@ WmMaxsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2786,8 +2783,8 @@ WmMaxsizeCmd(
Tcl_Obj *results[2];
GetMaxSize(wmPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2834,7 +2831,7 @@ WmMinsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2844,8 +2841,8 @@ WmMinsizeCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewIntObj(wmPtr->minWidth);
- results[1] = Tcl_NewIntObj(wmPtr->minHeight);
+ results[0] = Tcl_NewWideIntObj(wmPtr->minWidth);
+ results[1] = Tcl_NewWideIntObj(wmPtr->minHeight);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2894,7 +2891,7 @@ WmOverrideredirectCmd(
}
curValue = Tk_Attributes((Tk_Window) winPtr)->override_redirect;
if (objc == 3) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(curValue));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(curValue != 0));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[3], &boolean) != TCL_OK) {
@@ -2943,7 +2940,7 @@ WmPositionfromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3010,11 +3007,11 @@ WmProtocolCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
- register ProtocolHandler *protPtr, *prevPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
+ ProtocolHandler *protPtr, *prevPtr;
Atom protocol;
const char *cmd;
- int cmdLength;
+ TkSizeT cmdLength;
if ((objc < 3) || (objc > 5)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name? ?command?");
@@ -3080,7 +3077,7 @@ WmProtocolCmd(
break;
}
}
- cmd = Tcl_GetStringFromObj(objv[4], &cmdLength);
+ cmd = TkGetStringFromObj(objv[4], &cmdLength);
if (cmdLength > 0) {
protPtr = ckalloc(HANDLER_SIZE(cmdLength));
protPtr->protocol = protocol;
@@ -3120,7 +3117,7 @@ WmResizableCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -3130,8 +3127,8 @@ WmResizableCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
- results[1] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
+ results[0] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
+ results[1] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -3179,7 +3176,7 @@ WmSizefromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3340,7 +3337,7 @@ WmStackorderCmd(
} else { /* OPT_ISBELOW */
result = index1 < index2;
}
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result));
return TCL_OK;
}
return TCL_OK;
@@ -3371,7 +3368,7 @@ WmStateCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", NULL };
enum options {
@@ -3477,9 +3474,8 @@ WmTitleCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- int length;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newTitle?");
@@ -3495,8 +3491,8 @@ WmTitleCmd(
if (wmPtr->title != NULL) {
ckfree(wmPtr->title);
}
- argv3 = Tcl_GetStringFromObj(objv[3], &length);
- wmPtr->title = ckalloc(length + 1);
+ argv3 = Tcl_GetString(objv[3]);
+ wmPtr->title = ckalloc(objv[3]->length + 1);
strcpy(wmPtr->title, argv3);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
@@ -3531,7 +3527,7 @@ WmTransientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow *masterPtr = wmPtr->masterPtr, *w;
WmInfo *wmPtr2;
@@ -3680,7 +3676,7 @@ WmWithdrawCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -3780,7 +3776,7 @@ Tk_SetGrid(
* of one grid unit. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
/*
* Ensure widthInc and heightInc are greater than 0
@@ -3885,7 +3881,7 @@ Tk_UnsetGrid(
* controlling gridding. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
/*
* Find the top-level window for tkwin, plus the window manager
@@ -4568,8 +4564,8 @@ static void
UpdateGeometryInfo(
ClientData clientData) /* Pointer to the window's record. */
{
- register TkWindow *winPtr = clientData;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ TkWindow *winPtr = clientData;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y, width, height, min, max;
unsigned long serial;
@@ -4830,7 +4826,7 @@ UpdateSizeHints(
int newWidth,
int newHeight)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
XSizeHints *hintsPtr;
int maxWidth, maxHeight;
@@ -5468,8 +5464,8 @@ SetNetWmType(
for (n = 0; n < objc; ++n) {
Tcl_DString ds, dsName;
- int len;
- char *name = Tcl_GetStringFromObj(objv[n], &len);
+ TkSizeT len;
+ char *name = TkGetStringFromObj(objv[n], &len);
Tcl_UtfToUpper(name);
Tcl_UtfToExternalDString(NULL, name, len, &dsName);
@@ -5576,10 +5572,10 @@ ParseGeometry(
TkWindow *winPtr) /* Pointer to top-level window whose geometry
* is to be changed. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y, width, height, flags;
char *end;
- register const char *p = string;
+ const char *p = string;
/*
* The leading "=" is optional.
@@ -5712,7 +5708,7 @@ Tk_GetRootCoords(
int *yPtr) /* Where to store y-displacement of (0,0). */
{
int x, y;
- register TkWindow *winPtr = (TkWindow *) tkwin;
+ TkWindow *winPtr = (TkWindow *) tkwin;
/*
* Search back through this window's parents all the way to a top-level
@@ -6179,7 +6175,7 @@ Tk_MoveToplevelWindow(
int x, int y) /* New location for window (within parent). */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!(winPtr->flags & TK_TOP_LEVEL)) {
Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window");
@@ -6227,9 +6223,9 @@ Tk_MoveToplevelWindow(
static void
UpdateWmProtocols(
- register WmInfo *wmPtr) /* Information about top-level window. */
+ WmInfo *wmPtr) /* Information about top-level window. */
{
- register ProtocolHandler *protPtr;
+ ProtocolHandler *protPtr;
Atom deleteWindowAtom, pingAtom;
int count;
Atom *arrayPtr, *atomPtr;
@@ -6288,7 +6284,7 @@ TkWmProtocolEventProc(
XEvent *eventPtr) /* X event. */
{
WmInfo *wmPtr;
- register ProtocolHandler *protPtr;
+ ProtocolHandler *protPtr;
Atom protocol;
int result;
const char *protocolName;
@@ -6469,7 +6465,7 @@ TkWmStackorderToplevel(
windows = NULL;
} else {
for (i = 0; i < numChildren; i++) {
- hPtr = Tcl_FindHashEntry(&table, (char *) children[i]);
+ hPtr = Tcl_FindHashEntry(&table, children[i]);
if (hPtr != NULL) {
childWinPtr = Tcl_GetHashValue(hPtr);
*window_ptr++ = childWinPtr;
@@ -7295,7 +7291,7 @@ TkWindow *
TkpGetWrapperWindow(
TkWindow *winPtr) /* A toplevel window pointer. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if ((winPtr == NULL) || (wmPtr == NULL)) {
return NULL;
@@ -7325,7 +7321,7 @@ static void
UpdateCommand(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tcl_DString cmds, ds;
int i, *offsets;
char **cmdArgv;
diff --git a/unix/tkUnixXId.c b/unix/tkUnixXId.c
index ec2451c..c6873a1 100644
--- a/unix/tkUnixXId.c
+++ b/unix/tkUnixXId.c
@@ -14,39 +14,6 @@
/*
*----------------------------------------------------------------------
*
- * Tk_FreeXId --
- *
- * This function is called to indicate that an X resource identifier is
- * now free.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The identifier is added to the stack of free identifiers for its
- * display, so that it can be re-used.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_FreeXId(
- Display *display, /* Display for which xid was allocated. */
- XID xid) /* Identifier that is no longer in use. */
-{
- /*
- * This does nothing, because the XC-MISC extension takes care of
- * freeing XIDs for us. It has been a standard X11 extension for
- * about 15 years as of 2008. Keith Packard and another X.org
- * developer suggested that we remove the previous code that used:
- * #define XLIB_ILLEGAL_ACCESS.
- */
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
* Tk_GetPixmap --
*
* Same as the XCreatePixmap function except that it manages resource
diff --git a/win/Makefile.in b/win/Makefile.in
index 59074aa..db61eae 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -205,8 +205,8 @@ BUILD_TCLSH = @BUILD_TCLSH@
# Tk does not used deprecated Tcl constructs so it should
# compile fine with -DTCL_NO_DEPRECATED. To remove its own
# set of deprecated code uncomment the second line.
-NO_DEPRECATED_FLAGS =
-#NO_DEPRECATED_FLAGS = -DTK_NO_DEPRECATED
+NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED
+#NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED
# TCL_EXE is the name of a tclsh executable that is available *BEFORE*
# running make for the first time. Certain build targets (make genstubs)
@@ -214,6 +214,7 @@ NO_DEPRECATED_FLAGS =
# required just to do a normal build although it can be required to run
# make dist.
TCL_EXE = @TCLSH_PROG@
+WINE = @WINE@
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
@@ -315,9 +316,11 @@ TK_OBJS = \
tkGrid.$(OBJEXT) \
tkImage.$(OBJEXT) \
tkImgBmap.$(OBJEXT) \
+ tkImgListFormat.$(OBJEXT) \
tkImgGIF.$(OBJEXT) \
tkImgPNG.$(OBJEXT) \
tkImgPPM.$(OBJEXT) \
+ tkImgSVGnano.$(OBJEXT) \
tkImgPhoto.$(OBJEXT) \
tkImgPhInstance.$(OBJEXT) \
tkImgUtil.$(OBJEXT) \
@@ -334,6 +337,7 @@ TK_OBJS = \
tkOldConfig.$(OBJEXT) \
tkOption.$(OBJEXT) \
tkPack.$(OBJEXT) \
+ tkPkgConfig.$(OBJEXT) \
tkPlace.$(OBJEXT) \
tkPointer.$(OBJEXT) \
tkRectOval.$(OBJEXT) \
@@ -437,23 +441,23 @@ $(MAN2TCL): $(TCL_SRC_DIR)/tools/man2tcl.c
test: test-classic test-ttk
test-classic: binaries $(TKTEST) $(TEST_DLL_FILE) $(CAT32)
- $(SHELL_ENV) ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" \
- $(TESTFLAGS) | ./$(CAT32)
+ $(SHELL_ENV) $(WINE) ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" \
+ $(TESTFLAGS) | $(WINE) ./$(CAT32)
test-ttk: binaries $(TKTEST) $(TEST_DLL_FILE) $(CAT32)
- $(SHELL_ENV) ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/ttk/all.tcl" \
- $(TESTFLAGS) | ./$(CAT32)
+ $(SHELL_ENV) $(WINE) ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/ttk/all.tcl" \
+ $(TESTFLAGS) | $(WINE) ./$(CAT32)
runtest: binaries $(TKTEST) $(TEST_DLL_FILE)
- $(SHELL_ENV) ./$(TKTEST) $(TESTFLAGS) $(SCRIPT)
+ $(SHELL_ENV) $(WINE) ./$(TKTEST) $(TESTFLAGS) $(SCRIPT)
# This target can be used to run wish from the build directory
# via `make shell` or `make shell SCRIPT=foo.tcl`
shell: binaries
- $(SHELL_ENV) ./$(WISH) $(SCRIPT)
+ $(SHELL_ENV) $(WINE) ./$(WISH) $(SCRIPT)
demo: $(WISH)
- $(SHELL_ENV) ./$(WISH) $(ROOT_DIR)/library/demos/widget
+ $(SHELL_ENV) $(WINE) ./$(WISH) $(ROOT_DIR)/library/demos/widget
# This target can be used to run wish inside either gdb or insight
gdb: binaries
@@ -485,7 +489,7 @@ install-binaries: binaries
@echo "Creating package index $(PKG_INDEX)";
@$(RM) $(PKG_INDEX);
@(\
- echo "if {[catch {package present Tcl 8.6.0}]} return";\
+ 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]";\
@@ -728,7 +732,7 @@ genstubs:
"$(GENERIC_DIR_NATIVE)" \
"$(GENERIC_DIR_NATIVE)/tk.decls" \
"$(GENERIC_DIR_NATIVE)/tkInt.decls"
- $(TCL_EXE) "$(TTK_DIR)/ttkGenStubs.tcl" \
+ $(TCL_EXE) "$(TCL_TOOL_DIR)/genStubs.tcl" \
"$(TTK_DIR)" \
"$(TTK_DIR)/ttk.decls"
diff --git a/win/README b/win/README
index 950854e..e371a2c 100644
--- a/win/README
+++ b/win/README
@@ -1,4 +1,4 @@
-Tk 8.6 for Windows
+Tk 8.7 for Windows
Originally by Scott Stanton while at Sun Microsystems Labs
diff --git a/win/configure b/win/configure
index 887c837..33e23ac 100755
--- a/win/configure
+++ b/win/configure
@@ -1,81 +1,459 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_unset $as_var
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
fi
-done
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -83,146 +461,91 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -231,38 +554,25 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME=
@@ -270,51 +580,211 @@ PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
+PACKAGE_URL=
ac_unique_file="../generic/tk.h"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR ac_ct_AR RANLIB ac_ct_RANLIB RC ac_ct_RC SET_MAKE TCL_THREADS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE BUILD_TCLSH TCLSH_PROG TK_WIN_VERSION MACHINE TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX EXTRA_CFLAGS DEPARG CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW TK_RES STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX TK_SHARED_BUILD LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB MAKE_STUB_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES RES LIBOBJS LTLIBOBJS'
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+RES
+RC_DEFINES
+RC_DEFINE
+RC_INCLUDE
+RC_TYPE
+RC_OUT
+TK_LD_SEARCH_FLAGS
+TK_CC_SEARCH_FLAGS
+TK_BUILD_STUB_LIB_PATH
+TK_STUB_LIB_PATH
+TK_STUB_LIB_SPEC
+TK_BUILD_LIB_SPEC
+TK_LIB_SPEC
+TK_LIB_FLAG
+MAKE_EXE
+MAKE_DLL
+POST_MAKE_LIB
+MAKE_STUB_LIB
+MAKE_LIB
+LIBRARIES
+EXESUFFIX
+LIBSUFFIX
+LIBPREFIX
+DLLSUFFIX
+LIBS_GUI
+TK_SHARED_BUILD
+SHLIB_SUFFIX
+SHLIB_CFLAGS
+SHLIB_LD_LIBS
+SHLIB_LD
+STLIB_LD
+TK_RES
+LDFLAGS_WINDOW
+LDFLAGS_CONSOLE
+LDFLAGS_OPTIMIZE
+LDFLAGS_DEBUG
+CC_EXENAME
+CC_OBJNAME
+DEPARG
+EXTRA_CFLAGS
+CFG_TK_EXPORT_FILE_SUFFIX
+CFG_TK_UNSHARED_LIB_SUFFIX
+CFG_TK_SHARED_LIB_SUFFIX
+TCL_DBGX
+TCL_PATCH_LEVEL
+TCL_MINOR_VERSION
+TCL_MAJOR_VERSION
+TK_BIN_DIR
+TK_SRC_DIR
+TK_BUILD_STUB_LIB_SPEC
+TK_STUB_LIB_FLAG
+TK_STUB_LIB_FILE
+TK_DLL_FILE
+TK_LIB_FILE
+TK_DBGX
+TK_PATCH_LEVEL
+TK_MINOR_VERSION
+TK_MAJOR_VERSION
+TK_VERSION
+MACHINE
+TK_WIN_VERSION
+TCLSH_PROG
+BUILD_TCLSH
+VC_MANIFEST_EMBED_EXE
+VC_MANIFEST_EMBED_DLL
+LDFLAGS_DEFAULT
+CFLAGS_DEFAULT
+MAN2TCLFLAGS
+CFLAGS_WARNING
+CFLAGS_OPTIMIZE
+CFLAGS_DEBUG
+DL_LIBS
+WINE
+CYGPATH
+TCL_DEFS
+TCL_STUB_LIB_SPEC
+TCL_STUB_LIB_FLAG
+TCL_STUB_LIB_FILE
+TCL_LIB_SPEC
+TCL_LIB_FLAG
+TCL_LIB_FILE
+TCL_ZIP_FILE
+TCL_SRC_DIR
+TCL_BIN_DIR
+TCL_VERSION
+SHARED_BUILD
+SET_MAKE
+RC
+RANLIB
+AR
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+OBJEXT_FOR_BUILD'
ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_shared
+with_tcl
+enable_64bit
+enable_symbols
+enable_embedded_manifest
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -337,34 +807,49 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -386,33 +871,59 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -439,6 +950,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -463,13 +980,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -534,6 +1054,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -584,26 +1114,36 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -623,27 +1163,26 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -651,31 +1190,36 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
-done
+fi
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -689,8 +1233,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -702,74 +1244,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -792,20 +1332,17 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -815,18 +1352,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -838,12 +1382,11 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-threads build with threads (default: on)
--enable-shared build and link with shared libraries (default: on)
--enable-64bit enable 64bit support (where applicable)
- --enable-wince enable Win/CE support (where applicable)
--enable-symbols build with debugging symbols (default: off)
--enable-embedded-manifest
embed manifest if possible (default: yes)
@@ -853,133 +1396,342 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-tcl directory containing tcl configuration
(tclConfig.sh)
- --with-celib=DIR use Windows/CE support library from DIR
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to the package provider.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.69
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -998,7 +1750,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1010,8 +1762,9 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
} >&5
@@ -1033,7 +1786,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1044,13 +1796,13 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1066,104 +1818,115 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
# Predefined preprocessor variables.
@@ -1171,112 +1934,137 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1287,32 +2075,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TK_VERSION=8.6
+TK_VERSION=8.7
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".10"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a3"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -1346,10 +2117,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1359,35 +2130,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1397,39 +2170,50 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1439,77 +2223,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1520,18 +2264,19 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1549,24 +2294,25 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1576,39 +2322,41 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1618,66 +2366,78 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -1689,112 +2449,108 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
- echo "$as_me: failed program was:" >&5
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -1802,38 +2558,90 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -1845,45 +2653,46 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
- echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
fi
-
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -1897,55 +2706,34 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_compiler_gnu=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -1956,39 +2744,49 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-ac_cv_prog_cc_g=no
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2004,23 +2802,18 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2043,12 +2836,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2063,205 +2861,37 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
fi
-rm -f conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if test "x$ac_cv_prog_cc_c89" != xno; then :
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2269,18 +2899,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
@@ -2289,41 +2915,16 @@ $ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
done
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
@@ -2345,15 +2946,15 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2367,11 +2968,7 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2380,78 +2977,34 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
break
fi
@@ -2463,8 +3016,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -2474,11 +3027,7 @@ do
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
@@ -2487,85 +3036,40 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
# Passes both tests.
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -2575,31 +3079,142 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
@@ -2614,51 +3229,23 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
else
ac_cv_header_stdc=no
fi
@@ -2668,18 +3255,14 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
+ $EGREP "free" >/dev/null 2>&1; then :
+
else
ac_cv_header_stdc=no
fi
@@ -2689,16 +3272,13 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
:
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ctype.h>
+#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -2718,41 +3298,26 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_run "$LINENO"; then :
-( exit $ac_status )
-ac_cv_header_stdc=no
+else
+ ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
@@ -2760,10 +3325,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -2773,35 +3338,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -2811,27 +3378,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- AR=$ac_ct_AR
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
else
AR="$ac_cv_prog_AR"
fi
@@ -2839,10 +3417,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2852,35 +3430,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -2890,27 +3470,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- RANLIB=$ac_ct_RANLIB
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -2918,10 +3509,10 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$RC"; then
ac_cv_prog_RC="$RC" # Let the user override the test.
@@ -2931,35 +3522,37 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RC="${ac_tool_prefix}windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
RC=$ac_cv_prog_RC
if test -n "$RC"; then
- echo "$as_me:$LINENO: result: $RC" >&5
-echo "${ECHO_T}$RC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+$as_echo "$RC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_RC"; then
ac_ct_RC=$RC
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RC"; then
ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
@@ -2969,27 +3562,38 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RC="windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
fi
fi
ac_ct_RC=$ac_cv_prog_ac_ct_RC
if test -n "$ac_ct_RC"; then
- echo "$as_me:$LINENO: result: $ac_ct_RC" >&5
-echo "${ECHO_T}$ac_ct_RC" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+$as_echo "$ac_ct_RC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- RC=$ac_ct_RC
+ if test "x$ac_ct_RC" = x; then
+ RC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RC=$ac_ct_RC
+ fi
else
RC="$ac_cv_prog_RC"
fi
@@ -2999,12 +3603,12 @@ fi
# Checks to see if the make program sets the $MAKE variable.
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
-ac_make=`echo "" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
@@ -3021,12 +3625,12 @@ esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
SET_MAKE=
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -3039,57 +3643,20 @@ fi
#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-#--------------------------------------------------------------------
-
-
- echo "$as_me:$LINENO: checking for building with threads" >&5
-echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
- # Check whether --enable-threads or --disable-threads was given.
-if test "${enable_threads+set}" = set; then
- enableval="$enable_threads"
- tcl_ok=$enableval
-else
- tcl_ok=yes
-fi;
-
- if test "$tcl_ok" = "yes"; then
- echo "$as_me:$LINENO: result: yes (default)" >&5
-echo "${ECHO_T}yes (default)" >&6
- TCL_THREADS=1
- cat >>confdefs.h <<\_ACEOF
-#define TCL_THREADS 1
-_ACEOF
-
- # USE_THREAD_ALLOC tells us to try the special thread-based
- # allocator that significantly reduces lock contention
- cat >>confdefs.h <<\_ACEOF
-#define USE_THREAD_ALLOC 1
-_ACEOF
-
- else
- TCL_THREADS=0
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- fi
-
-
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking how to build libraries" >&5
-echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
- # Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- tcl_ok=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
+$as_echo_n "checking how to build libraries... " >&6; }
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; tcl_ok=$enableval
else
tcl_ok=yes
-fi;
+fi
+
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
@@ -3099,21 +3666,20 @@ fi;
fi
if test "$tcl_ok" = "yes" ; then
- echo "$as_me:$LINENO: result: shared" >&5
-echo "${ECHO_T}shared" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
+$as_echo "shared" >&6; }
SHARED_BUILD=1
else
- echo "$as_me:$LINENO: result: static" >&5
-echo "${ECHO_T}static" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
+$as_echo "static" >&6; }
SHARED_BUILD=0
-cat >>confdefs.h <<\_ACEOF
-#define STATIC_BUILD 1
-_ACEOF
+$as_echo "#define STATIC_BUILD 1" >>confdefs.h
fi
+
#--------------------------------------------------------------------
# Locate and source the tclConfig.sh file.
#--------------------------------------------------------------------
@@ -3129,15 +3695,15 @@ _ACEOF
# we reset no_tcl in case something fails here
no_tcl=true
-# Check whether --with-tcl or --without-tcl was given.
-if test "${with_tcl+set}" = set; then
- withval="$with_tcl"
- with_tclconfig="${withval}"
-fi;
- echo "$as_me:$LINENO: checking for Tcl configuration" >&5
-echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
- if test "${ac_cv_c_tclconfig+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+# Check whether --with-tcl was given.
+if test "${with_tcl+set}" = set; then :
+ withval=$with_tcl; with_tclconfig="${withval}"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
+$as_echo_n "checking for Tcl configuration... " >&6; }
+ if ${ac_cv_c_tclconfig+:} false; then :
+ $as_echo_n "(cached) " >&6
else
@@ -3146,17 +3712,15 @@ else
case "${with_tclconfig}" in
*/tclConfig.sh )
if test -f "${with_tclconfig}"; then
- { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
-echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
fi ;;
esac
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
else
- { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
-echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
fi
fi
@@ -3220,28 +3784,26 @@ fi
if test x"${ac_cv_c_tclconfig}" = x ; then
TCL_BIN_DIR="# no Tcl configs found"
- { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&5
-echo "$as_me: error: Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
else
no_tcl=
TCL_BIN_DIR="${ac_cv_c_tclconfig}"
- echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
fi
- echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- echo "$as_me:$LINENO: result: loading" >&5
-echo "${ECHO_T}loading" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+$as_echo "loading" >&6; }
. "${TCL_BIN_DIR}/tclConfig.sh"
else
- echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
-echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
#
@@ -3263,6 +3825,7 @@ echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
# eval is required to do the TCL_DBGX substitution
#
+ eval "TCL_ZIP_FILE=\"${TCL_ZIP_FILE}\""
eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
@@ -3286,23 +3849,18 @@ echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+
+if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then
- { { echo "$as_me:$LINENO: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&5
-echo "$as_me: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then
- { { echo "$as_me:$LINENO: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&5
-echo "$as_me: error: ${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5
+fi
+if test "${TCL_MINOR_VERSION}" -lt 6; then
+ as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5
+fi
fi
#--------------------------------------------------------------------
@@ -3311,63 +3869,51 @@ fi
# after SC_ENABLE_SHARED checks the configure switches.
#--------------------------------------------------------------------
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
- # Step 0: Enable 64 bit support?
+done
- echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
-echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
- # Check whether --enable-64bit or --disable-64bit was given.
-if test "${enable_64bit+set}" = set; then
- enableval="$enable_64bit"
- do64bit=$enableval
-else
- do64bit=no
-fi;
- echo "$as_me:$LINENO: result: $do64bit" >&5
-echo "${ECHO_T}$do64bit" >&6
- # Cross-compiling options for Windows/CE builds
- echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
-echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
- # Check whether --enable-wince or --disable-wince was given.
-if test "${enable_wince+set}" = set; then
- enableval="$enable_wince"
- doWince=$enableval
-else
- doWince=no
-fi;
- echo "$as_me:$LINENO: result: $doWince" >&5
-echo "${ECHO_T}$doWince" >&6
- echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
-echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
+ # Step 0: Enable 64 bit support?
-# Check whether --with-celib or --without-celib was given.
-if test "${with_celib+set}" = set; then
- withval="$with_celib"
- CELIB_DIR=$withval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
+$as_echo_n "checking if 64bit support is requested... " >&6; }
+ # Check whether --enable-64bit was given.
+if test "${enable_64bit+set}" = set; then :
+ enableval=$enable_64bit; do64bit=$enableval
else
- CELIB_DIR=NO_CELIB
-fi;
- echo "$as_me:$LINENO: result: $CELIB_DIR" >&5
-echo "${ECHO_T}$CELIB_DIR" >&6
+ do64bit=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
+$as_echo "$do64bit" >&6; }
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
-cat >>confdefs.h <<\_ACEOF
-#define MODULE_SCOPE extern
-_ACEOF
+$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
# Extract the first word of "cygpath", so it can be a program name with args.
set dummy cygpath; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CYGPATH+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CYGPATH+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CYGPATH"; then
ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
@@ -3377,28 +3923,67 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CYGPATH="cygpath -m"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
+IFS=$as_save_IFS
test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
fi
fi
CYGPATH=$ac_cv_prog_CYGPATH
if test -n "$CYGPATH"; then
- echo "$as_me:$LINENO: result: $CYGPATH" >&5
-echo "${ECHO_T}$CYGPATH" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
+$as_echo "$CYGPATH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Extract the first word of "wine", so it can be a program name with args.
+set dummy wine; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_WINE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$WINE"; then
+ ac_cv_prog_WINE="$WINE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINE="wine"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+WINE=$ac_cv_prog_WINE
+if test -n "$WINE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINE" >&5
+$as_echo "$WINE" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+
SHLIB_SUFFIX=".dll"
# MACHINE is IX86 for LINK, but this is used by the manifest,
@@ -3407,16 +3992,12 @@ fi
if test "$GCC" = "yes"; then
- echo "$as_me:$LINENO: checking for cross-compile version of gcc" >&5
-echo $ECHO_N "checking for cross-compile version of gcc... $ECHO_C" >&6
-if test "${ac_cv_cross+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
+$as_echo_n "checking for cross-compile version of gcc... " >&6; }
+if ${ac_cv_cross+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef _WIN32
@@ -3431,40 +4012,16 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_cross=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_cross=yes
+ ac_cv_cross=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_cross" >&5
-echo "${ECHO_T}$ac_cv_cross" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
+$as_echo "$ac_cv_cross" >&6; }
if test "$ac_cv_cross" = "yes"; then
case "$do64bit" in
@@ -3499,20 +4056,20 @@ echo "${ECHO_T}$ac_cv_cross" >&6
echo "101 \"name\"" >> $conftest
echo "END" >> $conftest
- echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5
-echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows native path bug in windres" >&5
+$as_echo_n "checking for Windows native path bug in windres... " >&6; }
cyg_conftest=`$CYGPATH $conftest`
if { ac_try='$RC -o conftest.res.o $cyg_conftest'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } ; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
else
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
CYGPATH=echo
fi
conftest=
@@ -3530,16 +4087,12 @@ echo "${ECHO_T}yes" >&6
if test "${GCC}" = "yes" ; then
extra_cflags="-pipe"
extra_ldflags="-pipe -static-libgcc"
- echo "$as_me:$LINENO: checking for mingw32 version of gcc" >&5
-echo $ECHO_N "checking for mingw32 version of gcc... $ECHO_C" >&6
-if test "${ac_cv_win32+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingw32 version of gcc" >&5
+$as_echo_n "checking for mingw32 version of gcc... " >&6; }
+if ${ac_cv_win32+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef _WIN32
@@ -3554,57 +4107,73 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_win32=no
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_win32=yes
+ ac_cv_win32=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_win32" >&5
-echo "${ECHO_T}$ac_cv_win32" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win32" >&5
+$as_echo "$ac_cv_win32" >&6; }
if test "$ac_cv_win32" != "yes"; then
- { { echo "$as_me:$LINENO: error: ${CC} cannot produce win32 executables." >&5
-echo "$as_me: error: ${CC} cannot produce win32 executables." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${CC} cannot produce win32 executables." "$LINENO" 5
fi
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
- echo "$as_me:$LINENO: checking for working -municode linker flag" >&5
-echo $ECHO_N "checking for working -municode linker flag... $ECHO_C" >&6
-if test "${ac_cv_municode+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working -municode linker flag" >&5
+$as_echo_n "checking for working -municode linker flag... " >&6; }
+if ${ac_cv_municode+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <windows.h>
@@ -3618,41 +4187,17 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
ac_cv_municode=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_municode=no
+ ac_cv_municode=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_municode" >&5
-echo "${ECHO_T}$ac_cv_municode" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_municode" >&5
+$as_echo "$ac_cv_municode" >&6; }
CFLAGS=$hold_cflags
if test "$ac_cv_municode" = "yes" ; then
extra_ldflags="$extra_ldflags -municode"
@@ -3661,8 +4206,8 @@ echo "${ECHO_T}$ac_cv_municode" >&6
fi
fi
- echo "$as_me:$LINENO: checking compiler flags" >&5
-echo $ECHO_N "checking compiler flags... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5
+$as_echo_n "checking compiler flags... " >&6; }
if test "${GCC}" = "yes" ; then
SHLIB_LD=""
SHLIB_LD_LIBS='${LIBS}'
@@ -3683,23 +4228,20 @@ echo $ECHO_N "checking compiler flags... $ECHO_C" >&6
if test "${SHARED_BUILD}" = "0" ; then
# static
- echo "$as_me:$LINENO: result: using static flags" >&5
-echo "${ECHO_T}using static flags" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5
+$as_echo "using static flags" >&6; }
runtime=
LIBRARIES="\${STATIC_LIBRARIES}"
EXESUFFIX="s\${DBGX}.exe"
else
# dynamic
- echo "$as_me:$LINENO: result: using shared flags" >&5
-echo "${ECHO_T}using shared flags" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5
+$as_echo "using shared flags" >&6; }
# ad-hoc check to see if CC supports -shared.
if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
- { { echo "$as_me:$LINENO: error: ${CC} does not support the -shared option.
- You will need to upgrade to a newer version of the toolchain." >&5
-echo "$as_me: error: ${CC} does not support the -shared option.
- You will need to upgrade to a newer version of the toolchain." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "${CC} does not support the -shared option.
+ You will need to upgrade to a newer version of the toolchain." "$LINENO" 5
fi
runtime=
@@ -3725,7 +4267,7 @@ echo "$as_me: error: ${CC} does not support the -shared option.
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wdeclaration-after-statement"
+ CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -3753,20 +4295,16 @@ echo "$as_me: error: ${CC} does not support the -shared option.
case "$do64bit" in
amd64|x64|yes)
MACHINE="AMD64" ; # assume AMD64 as default 64-bit build
- echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
+$as_echo " Using 64-bit $MACHINE mode" >&6; }
;;
ia64)
MACHINE="IA64"
- echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
+$as_echo " Using 64-bit $MACHINE mode" >&6; }
;;
*)
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef _WIN64
@@ -3781,57 +4319,33 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_win_64bit=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_win_64bit=no
+ tcl_win_64bit=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$tcl_win_64bit" = "yes" ; then
do64bit=amd64
MACHINE="AMD64"
- echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
+$as_echo " Using 64-bit $MACHINE mode" >&6; }
fi
;;
esac
else
if test "${SHARED_BUILD}" = "0" ; then
# static
- echo "$as_me:$LINENO: result: using static flags" >&5
-echo "${ECHO_T}using static flags" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using static flags" >&5
+$as_echo "using static flags" >&6; }
runtime=-MT
LIBRARIES="\${STATIC_LIBRARIES}"
EXESUFFIX="s\${DBGX}.exe"
else
# dynamic
- echo "$as_me:$LINENO: result: using shared flags" >&5
-echo "${ECHO_T}using shared flags" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5
+$as_echo "using shared flags" >&6; }
runtime=-MD
# Add SHLIB_LD_LIBS to the Make rule, not here.
LIBRARIES="\${SHARED_LIBRARIES}"
@@ -3860,8 +4374,8 @@ echo "${ECHO_T}using shared flags" >&6
MACHINE="IA64"
;;
esac
- echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
-echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
+$as_echo " Using 64-bit $MACHINE mode" >&6; }
fi
LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib"
@@ -3895,111 +4409,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
LINKBIN="link"
fi
- if test "$doWince" != "no" ; then
- # Set defaults for common evc4/PPC2003 setup
- # Currently Tcl requires 300+, possibly 420+ for sockets
- CEVERSION=420; # could be 211 300 301 400 420 ...
- TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
- ARCH=ARM; # could be ARM MIPS X86EM ...
- PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
- if test "$doWince" != "yes"; then
- # If !yes then the user specified something
- # Reset ARCH to allow user to skip specifying it
- ARCH=
- eval `echo $doWince | awk -F "," '{ \
- if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
- if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
- if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
- if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
- if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
- }'`
- if test "x${ARCH}" = "x" ; then
- ARCH=$TARGETCPU;
- fi
- fi
- OSVERSION=WCE$CEVERSION;
- if test "x${WCEROOT}" = "x" ; then
- WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
- if test ! -d "${WCEROOT}" ; then
- WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
- fi
- fi
- if test "x${SDKROOT}" = "x" ; then
- SDKROOT="C:/Program Files/Windows CE Tools"
- if test ! -d "${SDKROOT}" ; then
- SDKROOT="C:/Windows CE Tools"
- fi
- fi
- # The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called.
- WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
- SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
- CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
- if test ! -d "${CELIB_DIR}/inc"; then
- { { echo "$as_me:$LINENO: error: Invalid celib directory \"${CELIB_DIR}\"" >&5
-echo "$as_me: error: Invalid celib directory \"${CELIB_DIR}\"" >&2;}
- { (exit 1); exit 1; }; }
- fi
- if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\
- -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
- { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
-echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
- { (exit 1); exit 1; }; }
- else
- CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
- if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
- CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
- fi
- CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
- fi
- fi
-
- if test "$doWince" != "no" ; then
- CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
- if test "${TARGETCPU}" = "X86"; then
- CC="${CEBINROOT}/cl.exe"
- else
- CC="${CEBINROOT}/cl${ARCH}.exe"
- fi
- CC="\"${CC}\" -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
- RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
- arch=`echo ${ARCH} | awk '{print tolower($0)}'`
- defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _DLL _WINDOWS"
- for i in $defs ; do
- cat >>confdefs.h <<_ACEOF
-#define $i 1
-_ACEOF
-
- done
-# if test "${ARCH}" = "X86EM"; then
-# AC_DEFINE_UNQUOTED(_WIN32_WCE_EMULATION)
-# fi
- cat >>confdefs.h <<_ACEOF
-#define _WIN32_WCE $CEVERSION
-_ACEOF
-
- cat >>confdefs.h <<_ACEOF
-#define UNDER_CE $CEVERSION
-_ACEOF
-
- CFLAGS_DEBUG="-nologo -Zi -Od"
- CFLAGS_OPTIMIZE="-nologo -O2"
- lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
- lflags="-nodefaultlib -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
- LINKBIN="\"${CEBINROOT}/link.exe\""
-
- if test "${CEVERSION}" -lt 400 ; then
- LIBS="coredll.lib corelibc.lib winsock.lib"
- else
- LIBS="coredll.lib corelibc.lib ws2.lib"
- fi
- # celib currently stuck at wce300 status
- #LIBS="$LIBS \${CELIB_DIR}/wince-${ARCH}-pocket-${OSVERSION}-release/celib.lib"
- LIBS="$LIBS \"\${CELIB_DIR}/wince-${ARCH}-pocket-wce300-release/celib.lib\""
- LIBS_GUI="commctrl.lib commdlg.lib"
- else
- LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib uuid.lib"
- fi
+ LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib uuid.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
SHLIB_LD_LIBS='${LIBS}'
@@ -4030,7 +4440,7 @@ _ACEOF
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
- if test "$doWince" != "no" -a "${TARGETCPU}" != "X86"; then
+ if test "${TARGETCPU}" != "X86"; then
LDFLAGS_CONSOLE="-link ${lflags}"
LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
else
@@ -4040,26 +4450,20 @@ _ACEOF
fi
if test "$do64bit" != "no" ; then
- cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_DO64BIT 1
-_ACEOF
+ $as_echo "#define TCL_CFG_DO64BIT 1" >>confdefs.h
fi
if test "${GCC}" = "yes" ; then
- echo "$as_me:$LINENO: checking for SEH support in compiler" >&5
-echo $ECHO_N "checking for SEH support in compiler... $ECHO_C" >&6
-if test "${tcl_cv_seh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
+$as_echo_n "checking for SEH support in compiler... " >&6; }
+if ${tcl_cv_seh+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then :
tcl_cv_seh=no
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define WIN32_LEAN_AND_MEAN
@@ -4078,37 +4482,22 @@ cat >>conftest.$ac_ext <<_ACEOF
}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
tcl_cv_seh=yes
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-tcl_cv_seh=no
+ tcl_cv_seh=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
-echo "$as_me:$LINENO: result: $tcl_cv_seh" >&5
-echo "${ECHO_T}$tcl_cv_seh" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
+$as_echo "$tcl_cv_seh" >&6; }
if test "$tcl_cv_seh" = "no" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_SEH 1
-_ACEOF
+$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
fi
@@ -4118,16 +4507,12 @@ _ACEOF
# with Cygwin's version as of 2002-04-10, define it to be int,
# sufficient for getting the current code to work.
#
- echo "$as_me:$LINENO: checking for EXCEPTION_DISPOSITION support in include files" >&5
-echo $ECHO_N "checking for EXCEPTION_DISPOSITION support in include files... $ECHO_C" >&6
-if test "${tcl_cv_eh_disposition+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
+$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
+if ${tcl_cv_eh_disposition+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# define WIN32_LEAN_AND_MEAN
@@ -4144,45 +4529,19 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_eh_disposition=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_eh_disposition=no
+ tcl_cv_eh_disposition=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_eh_disposition" >&5
-echo "${ECHO_T}$tcl_cv_eh_disposition" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
+$as_echo "$tcl_cv_eh_disposition" >&6; }
if test "$tcl_cv_eh_disposition" = "no" ; then
-cat >>confdefs.h <<\_ACEOF
-#define EXCEPTION_DISPOSITION int
-_ACEOF
+$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
fi
@@ -4190,16 +4549,12 @@ _ACEOF
# even if VOID has already been #defined. The win32api
# used by mingw and cygwin is known to do this.
- echo "$as_me:$LINENO: checking for winnt.h that ignores VOID define" >&5
-echo $ECHO_N "checking for winnt.h that ignores VOID define... $ECHO_C" >&6
-if test "${tcl_cv_winnt_ignore_void+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
+$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
+if ${tcl_cv_winnt_ignore_void+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define VOID void
@@ -4219,62 +4574,41 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_winnt_ignore_void=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_winnt_ignore_void=no
+ tcl_cv_winnt_ignore_void=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_winnt_ignore_void" >&5
-echo "${ECHO_T}$tcl_cv_winnt_ignore_void" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
+$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WINNT_IGNORE_VOID 1
-_ACEOF
+$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
fi
+ ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdbool_h" = xyes; then :
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+
+
# See if the compiler supports casting to a union type.
# This is used to stop gcc from printing a compiler
# warning when initializing a union member.
- echo "$as_me:$LINENO: checking for cast to union support" >&5
-echo $ECHO_N "checking for cast to union support... $ECHO_C" >&6
-if test "${tcl_cv_cast_to_union+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
+$as_echo_n "checking for cast to union support... " >&6; }
+if ${tcl_cv_cast_to_union+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4288,45 +4622,19 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_compile "$LINENO"; then :
tcl_cv_cast_to_union=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_cast_to_union=no
+ tcl_cv_cast_to_union=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_cast_to_union" >&5
-echo "${ECHO_T}$tcl_cv_cast_to_union" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
+$as_echo "$tcl_cv_cast_to_union" >&6; }
if test "$tcl_cv_cast_to_union" = "yes"; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CAST_TO_UNION 1
-_ACEOF
+$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
fi
fi
@@ -4342,217 +4650,9 @@ _ACEOF
# man2tcl needs this so that it can use errno.h
#--------------------------------------------------------------------
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-if test "${ac_cv_header_errno_h+set}" = set; then
- echo "$as_me:$LINENO: checking for errno.h" >&5
-echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
-if test "${ac_cv_header_errno_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
-echo "${ECHO_T}$ac_cv_header_errno_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking errno.h usability" >&5
-echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <errno.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking errno.h presence" >&5
-echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <errno.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for errno.h" >&5
-echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
-if test "${ac_cv_header_errno_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_errno_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
-echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes; then :
-fi
-if test $ac_cv_header_errno_h = yes; then
- :
else
MAN2TCLFLAGS="-DNO_ERRNO_H"
fi
@@ -4564,17 +4664,13 @@ fi
# Check for _strtoi64
#-------------------------------------------
-echo "$as_me:$LINENO: checking availability of _strtoi64" >&5
-echo $ECHO_N "checking availability of _strtoi64... $ECHO_C" >&6
-if test "${tcl_cv_strtoi64+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking availability of _strtoi64" >&5
+$as_echo_n "checking availability of _strtoi64... " >&6; }
+if ${tcl_cv_strtoi64+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
int
@@ -4585,45 +4681,19 @@ _strtoi64(0,0,0)
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+if ac_fn_c_try_link "$LINENO"; then :
tcl_cv_strtoi64=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-tcl_cv_strtoi64=no
+ tcl_cv_strtoi64=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $tcl_cv_strtoi64" >&5
-echo "${ECHO_T}$tcl_cv_strtoi64" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_strtoi64" >&5
+$as_echo "$tcl_cv_strtoi64" >&6; }
if test $tcl_cv_strtoi64 = no; then
-cat >>confdefs.h <<\_ACEOF
-#define NO_STRTOI64 1
-_ACEOF
+$as_echo "#define NO_STRTOI64 1" >>confdefs.h
fi
@@ -4631,118 +4701,22 @@ fi
# Windows XP theme engine header for Ttk
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking for uxtheme.h" >&5
-echo $ECHO_N "checking for uxtheme.h... $ECHO_C" >&6
-if test "${ac_cv_header_uxtheme_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <windows.h>
+ac_fn_c_check_header_compile "$LINENO" "uxtheme.h" "ac_cv_header_uxtheme_h" "#include <windows.h>
+"
+if test "x$ac_cv_header_uxtheme_h" = xyes; then :
+ $as_echo "#define HAVE_UXTHEME_H 1" >>confdefs.h
-#include <uxtheme.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_uxtheme_h=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_uxtheme_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_uxtheme_h" >&5
-echo "${ECHO_T}$ac_cv_header_uxtheme_h" >&6
-if test $ac_cv_header_uxtheme_h = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_UXTHEME_H 1
-_ACEOF
-
-else
- { echo "$as_me:$LINENO: xpnative theme will be unavailable" >&5
-echo "$as_me: xpnative theme will be unavailable" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: xpnative theme will be unavailable" >&5
+$as_echo "$as_me: xpnative theme will be unavailable" >&6;}
fi
-echo "$as_me:$LINENO: checking for vssym32.h" >&5
-echo $ECHO_N "checking for vssym32.h... $ECHO_C" >&6
-if test "${ac_cv_header_vssym32_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <windows.h>
+ac_fn_c_check_header_compile "$LINENO" "vssym32.h" "ac_cv_header_vssym32_h" "#include <windows.h>
#include <uxtheme.h>
-
-#include <vssym32.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_vssym32_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_vssym32_h=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_vssym32_h" >&5
-echo "${ECHO_T}$ac_cv_header_vssym32_h" >&6
-if test $ac_cv_header_vssym32_h = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_VSSYM32_H 1
-_ACEOF
+"
+if test "x$ac_cv_header_vssym32_h" = xyes; then :
+ $as_echo "#define HAVE_VSSYM32_H 1" >>confdefs.h
fi
@@ -4755,39 +4729,35 @@ fi
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking for build with symbols" >&5
-echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
- # Check whether --enable-symbols or --disable-symbols was given.
-if test "${enable_symbols+set}" = set; then
- enableval="$enable_symbols"
- tcl_ok=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
+$as_echo_n "checking for build with symbols... " >&6; }
+ # Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+ enableval=$enable_symbols; tcl_ok=$enableval
else
tcl_ok=no
-fi;
+fi
+
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
DBGX=""
-cat >>confdefs.h <<\_ACEOF
-#define NDEBUG 1
-_ACEOF
+$as_echo "#define NDEBUG 1" >>confdefs.h
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
- cat >>confdefs.h <<\_ACEOF
-#define TCL_CFG_OPTIMIZED 1
-_ACEOF
+ $as_echo "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
DBGX=g
if test "$tcl_ok" = "yes"; then
- echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
-echo "${ECHO_T}yes (standard debugging)" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
+$as_echo "yes (standard debugging)" >&6; }
fi
fi
@@ -4795,32 +4765,26 @@ echo "${ECHO_T}yes (standard debugging)" >&6
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
-cat >>confdefs.h <<\_ACEOF
-#define TCL_MEM_DEBUG 1
-_ACEOF
+$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
fi
if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
-cat >>confdefs.h <<\_ACEOF
-#define TCL_COMPILE_DEBUG 1
-_ACEOF
+$as_echo "#define TCL_COMPILE_DEBUG 1" >>confdefs.h
-cat >>confdefs.h <<\_ACEOF
-#define TCL_COMPILE_STATS 1
-_ACEOF
+$as_echo "#define TCL_COMPILE_STATS 1" >>confdefs.h
fi
if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
if test "$tcl_ok" = "all"; then
- echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
-echo "${ECHO_T}enabled symbols mem compile debugging" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem compile debugging" >&5
+$as_echo "enabled symbols mem compile debugging" >&6; }
else
- echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
-echo "${ECHO_T}enabled $tcl_ok debugging" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
+$as_echo "enabled $tcl_ok debugging" >&6; }
fi
fi
@@ -4832,15 +4796,15 @@ TK_DBGX=${DBGX}
#--------------------------------------------------------------------
- echo "$as_me:$LINENO: checking whether to embed manifest" >&5
-echo $ECHO_N "checking whether to embed manifest... $ECHO_C" >&6
- # Check whether --enable-embedded-manifest or --disable-embedded-manifest was given.
-if test "${enable_embedded_manifest+set}" = set; then
- enableval="$enable_embedded_manifest"
- embed_ok=$enableval
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to embed manifest" >&5
+$as_echo_n "checking whether to embed manifest... " >&6; }
+ # Check whether --enable-embedded-manifest was given.
+if test "${enable_embedded_manifest+set}" = set; then :
+ enableval=$enable_embedded_manifest; embed_ok=$enableval
else
embed_ok=yes
-fi;
+fi
+
VC_MANIFEST_EMBED_DLL=
VC_MANIFEST_EMBED_EXE=
@@ -4848,11 +4812,7 @@ fi;
if test "$embed_ok" = "yes" -a "${SHARED_BUILD}" = "1" \
-a "$GCC" != "yes" ; then
# Add the magic to embed the manifest into the dll/exe
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined(_MSC_VER) && _MSC_VER >= 1400
@@ -4861,7 +4821,7 @@ print("manifest needed")
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "manifest needed" >/dev/null 2>&1; then
+ $EGREP "manifest needed" >/dev/null 2>&1; then :
# Could do a CHECK_PROG for mt, but should always be with MSVC8+
# Could add 'if test -f' check, but manifest should be created
@@ -4880,26 +4840,26 @@ fi
rm -f conftest*
fi
- echo "$as_me:$LINENO: result: $result" >&5
-echo "${ECHO_T}$result" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5
+$as_echo "$result" >&6; }
- echo "$as_me:$LINENO: checking for tclsh in Tcl build directory" >&5
-echo $ECHO_N "checking for tclsh in Tcl build directory... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh in Tcl build directory" >&5
+$as_echo_n "checking for tclsh in Tcl build directory... " >&6; }
BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
- echo "$as_me:$LINENO: result: $BUILD_TCLSH" >&5
-echo "${ECHO_T}$BUILD_TCLSH" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_TCLSH" >&5
+$as_echo "$BUILD_TCLSH" >&6; }
- echo "$as_me:$LINENO: checking for tclsh" >&5
-echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
+$as_echo_n "checking for tclsh... " >&6; }
- if test "${ac_cv_path_tclsh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if ${ac_cv_path_tclsh+:} false; then :
+ $as_echo_n "(cached) " >&6
else
search_path=`echo ${PATH} | sed -e 's/:/ /g'`
@@ -4920,13 +4880,13 @@ fi
if test -f "$ac_cv_path_tclsh" ; then
TCLSH_PROG="$ac_cv_path_tclsh"
- echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
-echo "${ECHO_T}$TCLSH_PROG" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_PROG" >&5
+$as_echo "$TCLSH_PROG" >&6; }
else
# It is not an error if an installed version of Tcl can't be located.
TCLSH_PROG=""
- echo "$as_me:$LINENO: result: No tclsh found on PATH" >&5
-echo "${ECHO_T}No tclsh found on PATH" >&6
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: No tclsh found on PATH" >&5
+$as_echo "No tclsh found on PATH" >&6; }
fi
@@ -5089,7 +5049,8 @@ TK_WIN_VERSION="$TK_VERSION.$TK_RELEASE_LEVEL.`echo $TK_PATCH_LEVEL | tr -d ab.`
- ac_config_files="$ac_config_files Makefile tkConfig.sh wish.exe.manifest"
+ac_config_files="$ac_config_files Makefile tkConfig.sh wish.exe.manifest"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -5108,39 +5069,70 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
- echo "not updating unwritable cache $cache_file"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -5149,63 +5141,55 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
#
# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
+# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -5213,12 +5197,14 @@ LTLIBOBJS=$ac_ltlibobjs
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -5228,81 +5214,253 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-DUALCASE=1; export DUALCASE # for MKS sh
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
-done
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-
-# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -5310,148 +5468,111 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
else
- as_expr=false
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-as_executable_p="test -f"
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5460,31 +5581,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
+# values after options handling.
+ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5492,124 +5602,116 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
-cat >>$CONFIG_STATUS <<\_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+Report bugs to the package provider."
-cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -5623,32 +5725,46 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "tkConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tkConfig.sh" ;;
- "wish.exe.manifest" ) CONFIG_FILES="$CONFIG_FILES wish.exe.manifest" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ case $ac_config_target in
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "tkConfig.sh") CONFIG_FILES="$CONFIG_FILES tkConfig.sh" ;;
+ "wish.exe.manifest") CONFIG_FILES="$CONFIG_FILES wish.exe.manifest" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -5658,418 +5774,414 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
-#
-# CONFIG_FILES section.
-#
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@RC@,$RC,;t t
-s,@ac_ct_RC@,$ac_ct_RC,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@TCL_THREADS@,$TCL_THREADS,;t t
-s,@TCL_VERSION@,$TCL_VERSION,;t t
-s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
-s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
-s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
-s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
-s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
-s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
-s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
-s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
-s,@TCL_DEFS@,$TCL_DEFS,;t t
-s,@CYGPATH@,$CYGPATH,;t t
-s,@CELIB_DIR@,$CELIB_DIR,;t t
-s,@DL_LIBS@,$DL_LIBS,;t t
-s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
-s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
-s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
-s,@MAN2TCLFLAGS@,$MAN2TCLFLAGS,;t t
-s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
-s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
-s,@VC_MANIFEST_EMBED_DLL@,$VC_MANIFEST_EMBED_DLL,;t t
-s,@VC_MANIFEST_EMBED_EXE@,$VC_MANIFEST_EMBED_EXE,;t t
-s,@BUILD_TCLSH@,$BUILD_TCLSH,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;t t
-s,@TK_WIN_VERSION@,$TK_WIN_VERSION,;t t
-s,@MACHINE@,$MACHINE,;t t
-s,@TK_VERSION@,$TK_VERSION,;t t
-s,@TK_MAJOR_VERSION@,$TK_MAJOR_VERSION,;t t
-s,@TK_MINOR_VERSION@,$TK_MINOR_VERSION,;t t
-s,@TK_PATCH_LEVEL@,$TK_PATCH_LEVEL,;t t
-s,@TK_DBGX@,$TK_DBGX,;t t
-s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
-s,@TK_DLL_FILE@,$TK_DLL_FILE,;t t
-s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
-s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
-s,@TK_BUILD_STUB_LIB_SPEC@,$TK_BUILD_STUB_LIB_SPEC,;t t
-s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
-s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
-s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
-s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
-s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
-s,@TCL_DBGX@,$TCL_DBGX,;t t
-s,@CFG_TK_SHARED_LIB_SUFFIX@,$CFG_TK_SHARED_LIB_SUFFIX,;t t
-s,@CFG_TK_UNSHARED_LIB_SUFFIX@,$CFG_TK_UNSHARED_LIB_SUFFIX,;t t
-s,@CFG_TK_EXPORT_FILE_SUFFIX@,$CFG_TK_EXPORT_FILE_SUFFIX,;t t
-s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
-s,@DEPARG@,$DEPARG,;t t
-s,@CC_OBJNAME@,$CC_OBJNAME,;t t
-s,@CC_EXENAME@,$CC_EXENAME,;t t
-s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
-s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
-s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t
-s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t
-s,@TK_RES@,$TK_RES,;t t
-s,@STLIB_LD@,$STLIB_LD,;t t
-s,@SHLIB_LD@,$SHLIB_LD,;t t
-s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
-s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
-s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
-s,@TK_SHARED_BUILD@,$TK_SHARED_BUILD,;t t
-s,@LIBS_GUI@,$LIBS_GUI,;t t
-s,@DLLSUFFIX@,$DLLSUFFIX,;t t
-s,@LIBPREFIX@,$LIBPREFIX,;t t
-s,@LIBSUFFIX@,$LIBSUFFIX,;t t
-s,@EXESUFFIX@,$EXESUFFIX,;t t
-s,@LIBRARIES@,$LIBRARIES,;t t
-s,@MAKE_LIB@,$MAKE_LIB,;t t
-s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
-s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t
-s,@MAKE_DLL@,$MAKE_DLL,;t t
-s,@MAKE_EXE@,$MAKE_EXE,;t t
-s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
-s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
-s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
-s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
-s,@TK_STUB_LIB_PATH@,$TK_STUB_LIB_PATH,;t t
-s,@TK_BUILD_STUB_LIB_PATH@,$TK_BUILD_STUB_LIB_PATH,;t t
-s,@TK_CC_SEARCH_FLAGS@,$TK_CC_SEARCH_FLAGS,;t t
-s,@TK_LD_SEARCH_FLAGS@,$TK_LD_SEARCH_FLAGS,;t t
-s,@RC_OUT@,$RC_OUT,;t t
-s,@RC_TYPE@,$RC_TYPE,;t t
-s,@RC_INCLUDE@,$RC_INCLUDE,;t t
-s,@RC_DEFINE@,$RC_DEFINE,;t t
-s,@RC_DEFINES@,$RC_DEFINES,;t t
-s,@RES@,$RES,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-_ACEOF
+eval set X " :F $CONFIG_FILES "
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
esac
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+_ACEOF
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-{ (exit 0); exit 0; }
+ esac
+
+done # for ac_tag
+
+
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -6089,7 +6201,11 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/win/configure.in b/win/configure.ac
index e745000..fa3dec3 100644
--- a/win/configure.in
+++ b/win/configure.ac
@@ -4,17 +4,17 @@
# to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-AC_PREREQ(2.59)
+AC_PREREQ(2.69)
# The following define is needed when building with Cygwin since newer
# versions of autoconf incorrectly set SHELL to /bin/bash instead of
# /bin/sh. The bash shell seems to suffer from some strange failures.
SHELL=/bin/sh
-TK_VERSION=8.6
+TK_VERSION=8.7
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=6
-TK_PATCH_LEVEL=".10"
+TK_MINOR_VERSION=7
+TK_PATCH_LEVEL="a3"
VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
#------------------------------------------------------------------------
@@ -62,12 +62,6 @@ AC_OBJEXT
AC_EXEEXT
#--------------------------------------------------------------------
-# Check whether --enable-threads or --disable-threads was given.
-#--------------------------------------------------------------------
-
-SC_ENABLE_THREADS
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -81,15 +75,17 @@ SC_ENABLE_SHARED
SC_PATH_TCLCONFIG($TK_PATCH_LEVEL)
SC_LOAD_TCLCONFIG
+if test "${TCL_MAJOR_VERSION}" -lt 9 ; then
if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then
AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.])
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.])
fi
-if test "${TCL_MINOR_VERSION}" -lt "${TK_MINOR_VERSION}"; then
+if test "${TCL_MINOR_VERSION}" -lt 6; then
AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}.
-Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl ${TK_VERSION}.
-Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl ${TK_VERSION}.])
+Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+.
+Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.])
+fi
fi
#--------------------------------------------------------------------
diff --git a/win/makefile.vc b/win/makefile.vc
index 6371f0f..311be18 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -117,6 +117,13 @@ TTK_SQUARE_WIDGET = 0
!endif
!endif
+TK_NO_DEPRECATED = 0
+!if "$(CHECKS)" != "" && ![nmakehlp -f "$(CHECKS)" "none"]
+!if [nmakehlp -f $(CHECKS) "nodep"]
+TK_NO_DEPRECATED = 1
+!endif
+!endif
+
WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(VERSION)$(SUFX).exe"
TKTEST = "$(OUT_DIR)\$(PROJECT)test.exe"
@@ -210,9 +217,11 @@ TKOBJS = \
$(TMP_DIR)\tkGrid.obj \
$(TMP_DIR)\tkImage.obj \
$(TMP_DIR)\tkImgBmap.obj \
+ $(TMP_DIR)\tkImgListFormat.obj \
$(TMP_DIR)\tkImgGIF.obj \
$(TMP_DIR)\tkImgPNG.obj \
$(TMP_DIR)\tkImgPPM.obj \
+ $(TMP_DIR)\tkImgSVGnano.obj \
$(TMP_DIR)\tkImgPhoto.obj \
$(TMP_DIR)\tkImgPhInstance.obj \
$(TMP_DIR)\tkImgUtil.obj \
@@ -229,6 +238,7 @@ TKOBJS = \
$(TMP_DIR)\tkOldConfig.obj \
$(TMP_DIR)\tkOption.obj \
$(TMP_DIR)\tkPack.obj \
+ $(TMP_DIR)\tkPkgConfig.obj \
$(TMP_DIR)\tkPlace.obj \
$(TMP_DIR)\tkPointer.obj \
$(TMP_DIR)\tkRectOval.obj \
@@ -305,7 +315,7 @@ BITMAPDIR = $(ROOT)\bitmaps
PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)"
CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
- /DHAVE_STDLIB_H=1 /DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
+ /DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
/DHAVE_STRINGS_H=1 /DHAVE_INTTYPES_H=1 \
/DSUPPORT_CONFIG_EMBEDDED /DUNICODE /D_UNICODE \
!if $(HAVE_UXTHEME_H)
@@ -314,6 +324,9 @@ CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
!if $(TTK_SQUARE_WIDGET)
/DTTK_SQUARE_WIDGET=1 \
!endif
+!if $(TK_NO_DEPRECATED)
+ /DTK_NO_DEPRECATED=1
+!endif
PRJ_DEFINES = /DBUILD_ttk $(CONFIG_DEFS) /Dinline=__inline /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
@@ -652,7 +665,7 @@ install-binaries:
!if !$(STATIC_BUILD)
@echo creating package index
@type << > $(OUT_DIR)\pkgIndex.tcl
-if {[catch {package present Tcl 8.6.0}]} { return }
+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]
diff --git a/win/mkd.bat b/win/mkd.bat
deleted file mode 100644
index 1bd5ccb..0000000
--- a/win/mkd.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-
-if exist %1\nul goto end
-
-md %1
-if errorlevel 1 goto end
-
-echo Created directory %1
-
-:end
-
-
diff --git a/win/rc/tk.rc b/win/rc/tk.rc
index 6a74be3..35a9a8a 100644
--- a/win/rc/tk.rc
+++ b/win/rc/tk.rc
@@ -8,19 +8,13 @@
//
// build-up the name suffix that defines the type of build this is.
//
-#if TCL_THREADS
-#define SUFFIX_THREADS "t"
-#else
-#define SUFFIX_THREADS ""
-#endif
-
#if DEBUG && !UNCHECKED
#define SUFFIX_DEBUG "g"
#else
#define SUFFIX_DEBUG ""
#endif
-#define SUFFIX SUFFIX_THREADS SUFFIX_DEBUG
+#define SUFFIX SUFFIX_DEBUG
VS_VERSION_INFO VERSIONINFO
diff --git a/win/rc/wish.rc b/win/rc/wish.rc
index 53e02fa..4a889f4 100644
--- a/win/rc/wish.rc
+++ b/win/rc/wish.rc
@@ -8,12 +8,6 @@
//
// build-up the name suffix that defines the type of build this is.
//
-#if TCL_THREADS
-#define SUFFIX_THREADS "t"
-#else
-#define SUFFIX_THREADS ""
-#endif
-
#if STATIC_BUILD
#define SUFFIX_STATIC "s"
#else
@@ -26,7 +20,7 @@
#define SUFFIX_DEBUG ""
#endif
-#define SUFFIX SUFFIX_THREADS SUFFIX_STATIC SUFFIX_DEBUG
+#define SUFFIX SUFFIX_STATIC SUFFIX_DEBUG
VS_VERSION_INFO VERSIONINFO
diff --git a/win/rmd.bat b/win/rmd.bat
deleted file mode 100644
index 820b76f..0000000
--- a/win/rmd.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-@echo off
-
-if not exist %1\nul goto end
-
-echo Removing directory %1
-
-if "%OS%" == "Windows_NT" goto winnt
-
-deltree /y %1
-if errorlevel 1 goto end
-goto success
-
-:winnt
-rmdir /s /q %1
-if errorlevel 1 goto end
-
-:success
-echo Deleted directory %1
-
-:end
diff --git a/win/rules-ext.vc b/win/rules-ext.vc
index 58c70fa..531e070 100644
--- a/win/rules-ext.vc
+++ b/win/rules-ext.vc
@@ -35,7 +35,7 @@ macro to the name of the project makefile.
!endif
# First locate the Tcl directory that we are working with.
-!ifdef TCLDIR
+!if "$(TCLDIR)" != ""
_RULESDIR = $(TCLDIR:/=\)
diff --git a/win/rules.vc b/win/rules.vc
index 2061e9b..50911d4 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -686,6 +686,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# configuration (ignored for Tcl itself)
# _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
# (CRT library should support this)
+# TCL_UTF_MAX=6 - forces a build using 32-bit Tcl_UniChar in stead of 16-bit.
# Further, LINKERFLAGS are modified based on above.
# Default values for all the above
@@ -745,20 +746,16 @@ TCL_USE_STATIC_PACKAGES = 1
TCL_USE_STATIC_PACKAGES = 0
!endif
-!if [nmakehlp -f $(OPTS) "nothreads"]
-!message *** Compile explicitly for non-threaded tcl
-TCL_THREADS = 0
-USE_THREAD_ALLOC= 0
-!else
-TCL_THREADS = 1
-USE_THREAD_ALLOC= 1
-!endif
-
!if [nmakehlp -f $(OPTS) "time64bit"]
!message *** Force 64-bit time_t
_USE_64BIT_TIME_T = 1
!endif
+!if [nmakehlp -f $(OPTS) "utfmax"]
+!message *** Force 32-bit Tcl_UniChar
+TCL_UTF_MAX = 6
+!endif
+
# Yes, it's weird that the "symbols" option controls DEBUG and
# the "pdbs" option controls SYMBOLS. That's historical.
!if [nmakehlp -f $(OPTS) "symbols"]
@@ -796,12 +793,6 @@ PGO = 0
!message *** Warning: ignoring option "loimpact" - deprecated on modern Windows.
!endif
-# TBD - should get rid of this option
-!if [nmakehlp -f $(OPTS) "thrdalloc"]
-!message *** Doing thrdalloc
-USE_THREAD_ALLOC = 1
-!endif
-
!if [nmakehlp -f $(OPTS) "tclalloc"]
USE_THREAD_ALLOC = 0
!endif
@@ -1212,8 +1203,8 @@ tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)"
!endif # $(DOING_TK) || $(NEED_TK)
# Various output paths
-PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
-PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
+PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX:t=).lib
+PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX:t=).$(EXT)
PRJLIB = $(OUT_DIR)\$(PRJLIBNAME)
PRJSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
@@ -1341,6 +1332,9 @@ OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64
!if "$(_USE_64BIT_TIME_T)" == "1"
OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T
!endif
+!if "$(TCL_UTF_MAX)" == "6"
+OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=6
+!endif
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP
COMPILERFLAGS = /D_ATL_XP_TARGETING
@@ -1468,18 +1462,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
@@ -1524,7 +1506,7 @@ RESCMD = $(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TMP_DIR)" \
/DCOMMAVERSION=$(RCCOMMAVERSION) \
/DDOTVERSION=\"$(DOTVERSION)\" \
/DVERSION=\"$(VERSION)\" \
- /DSUFX=\"$(SUFX)\" \
+ /DSUFX=\"$(SUFX:t=)\" \
/DPROJECT=\"$(PROJECT)\" \
/DPRJLIBNAME=\"$(PRJLIBNAME)\"
diff --git a/win/stubs.c b/win/stubs.c
index 884186c..1796e17 100644
--- a/win/stubs.c
+++ b/win/stubs.c
@@ -1,4 +1,4 @@
-#include "tk.h"
+#include "tkInt.h"
/*
* Undocumented Xlib internal function
@@ -29,7 +29,7 @@ XStringListToTextProperty(
int count,
XTextProperty *text_prop_return)
{
- return (Status) 0;
+ return Success;
}
/*
@@ -50,38 +50,12 @@ XChangeProperty(
return Success;
}
-Cursor
-XCreateGlyphCursor(
- Display *display,
- Font source_font,
- Font mask_font,
- unsigned int source_char,
- unsigned int mask_char,
- XColor _Xconst *foreground_color,
- XColor _Xconst *background_color)
-{
- return 1;
-}
-
XIC
XCreateIC(XIM xim, ...)
{
return NULL;
}
-Cursor
-XCreatePixmapCursor(
- Display *display,
- Pixmap source,
- Pixmap mask,
- XColor *foreground_color,
- XColor *background_color,
- unsigned int x,
- unsigned int y)
-{
- return (Cursor) NULL;
-}
-
int
XDeleteProperty(
Display *display,
@@ -91,12 +65,6 @@ XDeleteProperty(
return Success;
}
-void
-XDestroyIC(
- XIC ic)
-{
-}
-
Bool
XFilterEvent(
XEvent *event,
@@ -152,7 +120,7 @@ XGetWMColormapWindows(
Window **windows_return,
int *count_return)
{
- return (Status) 0;
+ return Success;
}
int
@@ -472,3 +440,12 @@ XVisualIDFromVisual(
{
return visual->visualid;
}
+
+int
+XOffsetRegion(
+ Region rgn,
+ int dx,
+ int dy)
+{
+ return 0;
+}
diff --git a/win/tcl.m4 b/win/tcl.m4
index 477b582..73e0b5b 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -251,6 +251,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# TCL_BIN_DIR
# TCL_SRC_DIR
# TCL_LIB_FILE
+# TCL_ZIP_FILE
#
#------------------------------------------------------------------------
@@ -283,6 +284,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# eval is required to do the TCL_DBGX substitution
#
+ eval "TCL_ZIP_FILE=\"${TCL_ZIP_FILE}\""
eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
@@ -295,6 +297,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_SRC_DIR)
+ AC_SUBST(TCL_ZIP_FILE)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FLAG)
AC_SUBST(TCL_LIB_SPEC)
@@ -380,42 +383,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
SHARED_BUILD=0
AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
fi
-])
-
-#------------------------------------------------------------------------
-# SC_ENABLE_THREADS --
-#
-# Specify if thread support should be enabled
-#
-# Arguments:
-# none
-#
-# Results:
-#
-# Adds the following arguments to configure:
-# --enable-threads=yes|no
-#
-# Defines the following vars:
-# TCL_THREADS
-#------------------------------------------------------------------------
-
-AC_DEFUN([SC_ENABLE_THREADS], [
- AC_MSG_CHECKING(for building with threads)
- AC_ARG_ENABLE(threads, [ --enable-threads build with threads (default: on)],
- [tcl_ok=$enableval], [tcl_ok=yes])
-
- if test "$tcl_ok" = "yes"; then
- AC_MSG_RESULT([yes (default)])
- TCL_THREADS=1
- AC_DEFINE(TCL_THREADS)
- # USE_THREAD_ALLOC tells us to try the special thread-based
- # allocator that significantly reduces lock contention
- AC_DEFINE(USE_THREAD_ALLOC)
- else
- TCL_THREADS=0
- AC_MSG_RESULT(no)
- fi
- AC_SUBST(TCL_THREADS)
+ AC_SUBST(SHARED_BUILD)
])
#------------------------------------------------------------------------
@@ -544,22 +512,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
AC_MSG_RESULT($do64bit)
- # Cross-compiling options for Windows/CE builds
-
- AC_MSG_CHECKING([if Windows/CE build is requested])
- AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
- AC_MSG_RESULT($doWince)
-
- AC_MSG_CHECKING([for Windows/CE celib directory])
- AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR],
- CELIB_DIR=$withval, CELIB_DIR=NO_CELIB)
- AC_MSG_RESULT([$CELIB_DIR])
-
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
AC_DEFINE(MODULE_SCOPE, [extern], [No need to mark inidividual symbols as hidden])
AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
+ AC_CHECK_PROG(WINE, wine, wine,)
SHLIB_SUFFIX=".dll"
@@ -727,7 +685,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wdeclaration-after-statement"
+ CFLAGS_WARNING="-Wall -Wwrite-strings -Wsign-compare -Wdeclaration-after-statement -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -849,98 +807,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
LINKBIN="link"
fi
- if test "$doWince" != "no" ; then
- # Set defaults for common evc4/PPC2003 setup
- # Currently Tcl requires 300+, possibly 420+ for sockets
- CEVERSION=420; # could be 211 300 301 400 420 ...
- TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
- ARCH=ARM; # could be ARM MIPS X86EM ...
- PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
- if test "$doWince" != "yes"; then
- # If !yes then the user specified something
- # Reset ARCH to allow user to skip specifying it
- ARCH=
- eval `echo $doWince | awk -F "," '{ \
- if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
- if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
- if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
- if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
- if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
- }'`
- if test "x${ARCH}" = "x" ; then
- ARCH=$TARGETCPU;
- fi
- fi
- OSVERSION=WCE$CEVERSION;
- if test "x${WCEROOT}" = "x" ; then
- WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
- if test ! -d "${WCEROOT}" ; then
- WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
- fi
- fi
- if test "x${SDKROOT}" = "x" ; then
- SDKROOT="C:/Program Files/Windows CE Tools"
- if test ! -d "${SDKROOT}" ; then
- SDKROOT="C:/Windows CE Tools"
- fi
- fi
- # The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called.
- WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
- SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
- CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
- if test ! -d "${CELIB_DIR}/inc"; then
- AC_MSG_ERROR([Invalid celib directory "${CELIB_DIR}"])
- fi
- if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\
- -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
- AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
- else
- CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
- if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
- CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
- fi
- CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
- fi
- fi
-
- if test "$doWince" != "no" ; then
- CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
- if test "${TARGETCPU}" = "X86"; then
- CC="${CEBINROOT}/cl.exe"
- else
- CC="${CEBINROOT}/cl${ARCH}.exe"
- fi
- CC="\"${CC}\" -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
- RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
- arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
- defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _DLL _WINDOWS"
- for i in $defs ; do
- AC_DEFINE_UNQUOTED($i)
- done
-# if test "${ARCH}" = "X86EM"; then
-# AC_DEFINE_UNQUOTED(_WIN32_WCE_EMULATION)
-# fi
- AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION)
- AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION)
- CFLAGS_DEBUG="-nologo -Zi -Od"
- CFLAGS_OPTIMIZE="-nologo -O2"
- lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
- lflags="-nodefaultlib -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
- LINKBIN="\"${CEBINROOT}/link.exe\""
- AC_SUBST(CELIB_DIR)
- if test "${CEVERSION}" -lt 400 ; then
- LIBS="coredll.lib corelibc.lib winsock.lib"
- else
- LIBS="coredll.lib corelibc.lib ws2.lib"
- fi
- # celib currently stuck at wce300 status
- #LIBS="$LIBS \${CELIB_DIR}/wince-${ARCH}-pocket-${OSVERSION}-release/celib.lib"
- LIBS="$LIBS \"\${CELIB_DIR}/wince-${ARCH}-pocket-wce300-release/celib.lib\""
- LIBS_GUI="commctrl.lib commdlg.lib"
- else
- LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib uuid.lib"
- fi
+ LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib uuid.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
SHLIB_LD_LIBS='${LIBS}'
@@ -971,7 +838,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
- if test "$doWince" != "no" -a "${TARGETCPU}" != "X86"; then
+ if test "${TARGETCPU}" != "X86"; then
LDFLAGS_CONSOLE="-link ${lflags}"
LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
else
@@ -1059,6 +926,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
[Defined when cygwin/mingw ignores VOID define in winnt.h])
fi
+ AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],)
+
# See if the compiler supports casting to a union type.
# This is used to stop gcc from printing a compiler
# warning when initializing a union member.
@@ -1104,13 +973,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
#------------------------------------------------------------------------
AC_DEFUN([SC_WITH_TCL], [
- if test -d ../../tcl8.6$1/win; then
- TCL_BIN_DEFAULT=../../tcl8.6$1/win
+ if test -d ../../tcl8.7$1/win; then
+ TCL_BIN_DEFAULT=../../tcl8.7$1/win
else
- TCL_BIN_DEFAULT=../../tcl8.6/win
+ TCL_BIN_DEFAULT=../../tcl8.7/win
fi
- AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.6 binaries from DIR],
+ AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.7 binaries from DIR],
TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
if test ! -d $TCL_BIN_DIR; then
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)
@@ -1275,3 +1144,126 @@ print("manifest needed")
AC_SUBST(VC_MANIFEST_EMBED_DLL)
AC_SUBST(VC_MANIFEST_EMBED_EXE)
])
+
+#------------------------------------------------------------------------
+# SC_CC_FOR_BUILD
+# For cross compiles, locate a C compiler that can generate native binaries.
+#
+# Arguments:
+# none
+#
+# Results:
+# Substitutes the following vars:
+# CC_FOR_BUILD
+# EXEEXT_FOR_BUILD
+#------------------------------------------------------------------------
+
+dnl Get a default for CC_FOR_BUILD to put into Makefile.
+AC_DEFUN([AX_CC_FOR_BUILD],
+[# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ AC_MSG_CHECKING([for gcc])
+ AC_CACHE_VAL(ac_cv_path_cc, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ fi
+fi
+AC_SUBST(CC_FOR_BUILD)
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+else
+ OBJEXT_FOR_BUILD='.no'
+ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
+ [rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+AC_SUBST(EXEEXT_FOR_BUILD)])dnl
+AC_SUBST(OBJEXT_FOR_BUILD)])dnl
+
+
+
+#------------------------------------------------------------------------
+# SC_ZIPFS_SUPPORT
+# Locate a zip encoder installed on the system path, or none.
+#
+# Arguments:
+# none
+#
+# Results:
+# Substitutes the following vars:
+# ZIP_PROG
+# ZIP_PROG_OPTIONS
+# ZIP_PROG_VFSSEARCH
+# ZIP_INSTALL_OBJS
+#------------------------------------------------------------------------
+
+AC_DEFUN([SC_ZIPFS_SUPPORT], [
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ AC_MSG_CHECKING([for zip])
+ AC_CACHE_VAL(ac_cv_path_zip, [
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ AC_MSG_RESULT([$ZIP_PROG])
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ AC_MSG_RESULT([Found INFO Zip in environment])
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ AC_MSG_RESULT([No zip found on PATH building minizip])
+ fi
+ AC_SUBST(ZIP_PROG)
+ AC_SUBST(ZIP_PROG_OPTIONS)
+ AC_SUBST(ZIP_PROG_VFSSEARCH)
+ AC_SUBST(ZIP_INSTALL_OBJS)
+])
diff --git a/win/tkWin.h b/win/tkWin.h
index 4d278d7..ef579fe 100644
--- a/win/tkWin.h
+++ b/win/tkWin.h
@@ -18,14 +18,18 @@
* the SystemParametersInfo API doesn't like to receive structures that
* are larger than it expects which affects the font assignments.
*
- * WINVER = 0x0500 means Windows 2000 and above
+ * WINVER = 0x0600 means Windows Vista and above. Even though we still
+ * support Windows XP, but the Vista-specifics are tested at runtime.
*/
#ifndef WINVER
-#define WINVER 0x0500
+# define WINVER 0x0600
#endif
#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
+# define _WIN32_WINNT 0x0600
+#endif
+#ifndef _WIN32_IE
+# define _WIN32_IE 0x0700
#endif
#ifndef _TK
diff --git a/win/tkWinButton.c b/win/tkWinButton.c
index 7332c93..3ba3be5 100644
--- a/win/tkWinButton.c
+++ b/win/tkWinButton.c
@@ -316,14 +316,14 @@ TkpDisplayButton(
{
TkWinDCState state;
HDC dc;
- register TkButton *butPtr = (TkButton *) clientData;
+ TkButton *butPtr = clientData;
GC gc;
Tk_3DBorder border;
Pixmap pixmap;
int x = 0; /* Initialization only needed to stop compiler
* warning. */
int y, relief;
- register Tk_Window tkwin = butPtr->tkwin;
+ Tk_Window tkwin = butPtr->tkwin;
int width = 0, height = 0, haveImage = 0, haveText = 0, drawRing = 0;
RECT rect;
int defaultWidth; /* Width of default ring. */
@@ -818,7 +818,7 @@ TkpDisplayButton(
void
TkpComputeButtonGeometry(
- register TkButton *butPtr) /* Button whose geometry may have changed. */
+ TkButton *butPtr) /* Button whose geometry may have changed. */
{
int txtWidth, txtHeight; /* Width and height of text */
int imgWidth, imgHeight; /* Width and height of image */
@@ -1264,7 +1264,7 @@ ButtonProc(
PAINTSTRUCT ps;
BeginPaint(hwnd, &ps);
EndPaint(hwnd, &ps);
- TkpDisplayButton((ClientData)butPtr);
+ TkpDisplayButton(butPtr);
/*
* Special note: must cancel any existing idle handler for
@@ -1272,7 +1272,7 @@ ButtonProc(
* cleared the REDRAW_PENDING flag.
*/
- Tcl_CancelIdleCall(TkpDisplayButton, (ClientData)butPtr);
+ Tcl_CancelIdleCall(TkpDisplayButton, butPtr);
return 0;
}
case BN_CLICKED: {
@@ -1287,14 +1287,14 @@ ButtonProc(
Tcl_Interp *interp = butPtr->info.interp;
if (butPtr->info.state != STATE_DISABLED) {
- Tcl_Preserve((ClientData)interp);
+ Tcl_Preserve(interp);
code = TkInvokeButton((TkButton*)butPtr);
if (code != TCL_OK && code != TCL_CONTINUE
&& code != TCL_BREAK) {
Tcl_AddErrorInfo(interp, "\n (button invoke)");
Tcl_BackgroundException(interp, code);
}
- Tcl_Release((ClientData)interp);
+ Tcl_Release(interp);
}
Tcl_ServiceAll();
return 0;
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c
index 8886f2a..06eebbd 100644
--- a/win/tkWinClipboard.c
+++ b/win/tkWinClipboard.c
@@ -79,7 +79,8 @@ TkSelGetSelection(
goto error;
}
data = GlobalLock(handle);
- Tcl_WinTCharToUtf((LPCTSTR)data, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString((WCHAR *)data, wcslen((WCHAR *)data), &ds);
GlobalUnlock(handle);
} else if (IsClipboardFormatAvailable(CF_TEXT)) {
/*
@@ -157,7 +158,8 @@ TkSelGetSelection(
Tcl_DStringAppend(&ds, "\n", 1);
}
len = wcslen(fname);
- Tcl_WinTCharToUtf((LPCTSTR)fname, len * sizeof(WCHAR), &dsTmp);
+ Tcl_DStringInit(&dsTmp);
+ Tcl_WCharToUtfDString(fname, len, &dsTmp);
Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsTmp),
Tcl_DStringLength(&dsTmp));
Tcl_DStringFree(&dsTmp);
@@ -327,21 +329,21 @@ TkWinClipboardRender(
}
*buffer = '\0';
- Tcl_DStringInit(&ds);
- Tcl_WinUtfToTChar(rawText, -1, &ds);
- ckfree(rawText);
- handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,
- Tcl_DStringLength(&ds) + 2);
- if (!handle) {
+ Tcl_DStringInit(&ds);
+ Tcl_UtfToWCharDString(rawText, -1, &ds);
+ ckfree(rawText);
+ handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,
+ (unsigned) Tcl_DStringLength(&ds) + 2);
+ if (!handle) {
+ Tcl_DStringFree(&ds);
+ return;
+ }
+ buffer = GlobalLock(handle);
+ memcpy(buffer, Tcl_DStringValue(&ds),
+ (unsigned) Tcl_DStringLength(&ds) + 2);
+ GlobalUnlock(handle);
Tcl_DStringFree(&ds);
- return;
- }
- buffer = GlobalLock(handle);
- memcpy(buffer, Tcl_DStringValue(&ds),
- Tcl_DStringLength(&ds) + 2);
- GlobalUnlock(handle);
- Tcl_DStringFree(&ds);
- SetClipboardData(CF_UNICODETEXT, handle);
+ SetClipboardData(CF_UNICODETEXT, handle);
}
/*
@@ -419,7 +421,7 @@ UpdateClipboard(
void
TkSelEventProc(
Tk_Window tkwin, /* Window for which event was targeted. */
- register XEvent *eventPtr) /* X event: either SelectionClear,
+ XEvent *eventPtr) /* X event: either SelectionClear,
* SelectionRequest, or SelectionNotify. */
{
if (eventPtr->type == SelectionClear) {
@@ -446,7 +448,7 @@ TkSelEventProc(
void
TkSelPropProc(
- register XEvent *eventPtr) /* X PropertyChange event. */
+ XEvent *eventPtr) /* X PropertyChange event. */
{
}
diff --git a/win/tkWinColor.c b/win/tkWinColor.c
index fa3f233..8a1273a 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.c
@@ -274,7 +274,7 @@ int
TkWinIndexOfColor(
XColor *colorPtr)
{
- register WinColor *winColPtr = (WinColor *) colorPtr;
+ WinColor *winColPtr = (WinColor *) colorPtr;
if (winColPtr->info.magic == COLOR_MAGIC) {
return winColPtr->index;
}
@@ -364,7 +364,7 @@ XAllocColor(
} else {
refCount = (size_t)Tcl_GetHashValue(entryPtr) + 1;
}
- Tcl_SetHashValue(entryPtr, (void *)refCount);
+ Tcl_SetHashValue(entryPtr, INT2PTR(refCount));
} else {
/*
* Determine what color will actually be used on non-colormap systems.
@@ -446,7 +446,7 @@ XFreeColors(
}
Tcl_DeleteHashEntry(entryPtr);
} else {
- Tcl_SetHashValue(entryPtr, (size_t)refCount);
+ Tcl_SetHashValue(entryPtr, INT2PTR(refCount));
}
}
}
diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h
index 852de02..33756f8 100644
--- a/win/tkWinDefault.h
+++ b/win/tkWinDefault.h
@@ -68,7 +68,7 @@
#define DEF_BUTTON_HIGHLIGHT HIGHLIGHT
#define DEF_LABEL_HIGHLIGHT_WIDTH "0"
#define DEF_BUTTON_HIGHLIGHT_WIDTH "1"
-#define DEF_BUTTON_IMAGE ((char *) NULL)
+#define DEF_BUTTON_IMAGE NULL
#define DEF_BUTTON_INDICATOR "1"
#define DEF_BUTTON_JUSTIFY "center"
#define DEF_BUTTON_OFF_VALUE "0"
@@ -84,10 +84,10 @@
#define DEF_BUTTON_REPEAT_INTERVAL "0"
#define DEF_BUTTON_SELECT_COLOR INDICATOR
#define DEF_BUTTON_SELECT_MONO BLACK
-#define DEF_BUTTON_SELECT_IMAGE ((char *) NULL)
+#define DEF_BUTTON_SELECT_IMAGE NULL
#define DEF_BUTTON_STATE "normal"
#define DEF_LABEL_TAKE_FOCUS "0"
-#define DEF_BUTTON_TAKE_FOCUS ((char *) NULL)
+#define DEF_BUTTON_TAKE_FOCUS NULL
#define DEF_BUTTON_TEXT ""
#define DEF_BUTTON_TEXT_VARIABLE ""
#define DEF_BUTTON_TRISTATE_VALUE ""
@@ -126,7 +126,7 @@
#define DEF_CANVAS_SELECT_BD_MONO "0"
#define DEF_CANVAS_SELECT_FG_COLOR SELECT_FG
#define DEF_CANVAS_SELECT_FG_MONO WHITE
-#define DEF_CANVAS_TAKE_FOCUS ((char *) NULL)
+#define DEF_CANVAS_TAKE_FOCUS NULL
#define DEF_CANVAS_WIDTH "10c"
#define DEF_CANVAS_X_SCROLL_CMD ""
#define DEF_CANVAS_X_SCROLL_INCREMENT "0"
@@ -157,6 +157,8 @@
#define DEF_ENTRY_INSERT_ON_TIME "600"
#define DEF_ENTRY_INSERT_WIDTH "2"
#define DEF_ENTRY_JUSTIFY "left"
+#define DEF_ENTRY_PLACEHOLDER ""
+#define DEF_ENTRY_PLACEHOLDERFG "#b3b3b3"
#define DEF_ENTRY_READONLY_BG_COLOR "SystemButtonFace"
#define DEF_ENTRY_READONLY_BG_MONO WHITE
#define DEF_ENTRY_RELIEF "sunken"
@@ -167,9 +169,9 @@
#define DEF_ENTRY_SELECT_BD_MONO "0"
#define DEF_ENTRY_SELECT_FG_COLOR SELECT_FG
#define DEF_ENTRY_SELECT_FG_MONO WHITE
-#define DEF_ENTRY_SHOW ((char *) NULL)
+#define DEF_ENTRY_SHOW NULL
#define DEF_ENTRY_STATE "normal"
-#define DEF_ENTRY_TAKE_FOCUS ((char *) NULL)
+#define DEF_ENTRY_TAKE_FOCUS NULL
#define DEF_ENTRY_TEXT_VARIABLE ""
#define DEF_ENTRY_WIDTH "20"
@@ -178,7 +180,9 @@
*/
#define DEF_FRAME_BG_COLOR NORMAL_BG
+#define DEF_FRAME_BG_IMAGE NULL
#define DEF_FRAME_BG_MONO WHITE
+#define DEF_FRAME_BG_TILE "0"
#define DEF_FRAME_BORDER_WIDTH "0"
#define DEF_FRAME_CLASS "Frame"
#define DEF_FRAME_COLORMAP ""
@@ -236,36 +240,36 @@
#define DEF_LISTBOX_SELECT_MODE "browse"
#define DEF_LISTBOX_SET_GRID "0"
#define DEF_LISTBOX_STATE "normal"
-#define DEF_LISTBOX_TAKE_FOCUS ((char *) NULL)
+#define DEF_LISTBOX_TAKE_FOCUS NULL
#define DEF_LISTBOX_WIDTH "20"
/*
* Defaults for individual entries of menus:
*/
-#define DEF_MENU_ENTRY_ACTIVE_BG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACTIVE_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_ACCELERATOR ((char *) NULL)
-#define DEF_MENU_ENTRY_BG ((char *) NULL)
+#define DEF_MENU_ENTRY_ACTIVE_BG NULL
+#define DEF_MENU_ENTRY_ACTIVE_FG NULL
+#define DEF_MENU_ENTRY_ACCELERATOR NULL
+#define DEF_MENU_ENTRY_BG NULL
#define DEF_MENU_ENTRY_BITMAP NULL
#define DEF_MENU_ENTRY_COLUMN_BREAK "0"
-#define DEF_MENU_ENTRY_COMMAND ((char *) NULL)
+#define DEF_MENU_ENTRY_COMMAND NULL
#define DEF_MENU_ENTRY_COMPOUND "none"
-#define DEF_MENU_ENTRY_FG ((char *) NULL)
-#define DEF_MENU_ENTRY_FONT ((char *) NULL)
+#define DEF_MENU_ENTRY_FG NULL
+#define DEF_MENU_ENTRY_FONT NULL
#define DEF_MENU_ENTRY_HIDE_MARGIN "0"
-#define DEF_MENU_ENTRY_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_IMAGE NULL
#define DEF_MENU_ENTRY_INDICATOR "1"
-#define DEF_MENU_ENTRY_LABEL ((char *) NULL)
-#define DEF_MENU_ENTRY_MENU ((char *) NULL)
+#define DEF_MENU_ENTRY_LABEL NULL
+#define DEF_MENU_ENTRY_MENU NULL
#define DEF_MENU_ENTRY_OFF_VALUE "0"
#define DEF_MENU_ENTRY_ON_VALUE "1"
-#define DEF_MENU_ENTRY_SELECT_IMAGE ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT_IMAGE NULL
#define DEF_MENU_ENTRY_STATE "normal"
-#define DEF_MENU_ENTRY_VALUE ((char *) NULL)
-#define DEF_MENU_ENTRY_CHECK_VARIABLE ((char *) NULL)
+#define DEF_MENU_ENTRY_VALUE NULL
+#define DEF_MENU_ENTRY_CHECK_VARIABLE NULL
#define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton"
-#define DEF_MENU_ENTRY_SELECT ((char *) NULL)
+#define DEF_MENU_ENTRY_SELECT NULL
#define DEF_MENU_ENTRY_UNDERLINE "-1"
/*
@@ -277,6 +281,7 @@
#define DEF_MENU_ACTIVE_BORDER_WIDTH "0"
#define DEF_MENU_ACTIVE_FG_COLOR SELECT_FG
#define DEF_MENU_ACTIVE_FG_MONO WHITE
+#define DEF_MENU_ACTIVE_RELIEF "flat"
#define DEF_MENU_BG_COLOR MENU_BG
#define DEF_MENU_BG_MONO WHITE
#define DEF_MENU_BORDER_WIDTH "0"
@@ -290,8 +295,8 @@
#define DEF_MENU_SELECT_COLOR MENU_FG
#define DEF_MENU_SELECT_MONO BLACK
#define DEF_MENU_TAKE_FOCUS "0"
-#define DEF_MENU_TEAROFF "1"
-#define DEF_MENU_TEAROFF_CMD ((char *) NULL)
+#define DEF_MENU_TEAROFF "0"
+#define DEF_MENU_TEAROFF_CMD NULL
#define DEF_MENU_TITLE ""
#define DEF_MENU_TYPE "normal"
@@ -319,7 +324,7 @@
#define DEF_MENUBUTTON_HIGHLIGHT_BG_MONO DEF_MENUBUTTON_BG_MONO
#define DEF_MENUBUTTON_HIGHLIGHT HIGHLIGHT
#define DEF_MENUBUTTON_HIGHLIGHT_WIDTH "0"
-#define DEF_MENUBUTTON_IMAGE ((char *) NULL)
+#define DEF_MENUBUTTON_IMAGE NULL
#define DEF_MENUBUTTON_INDICATOR "0"
#define DEF_MENUBUTTON_JUSTIFY "center"
#define DEF_MENUBUTTON_MENU ""
@@ -429,7 +434,7 @@
#define DEF_SCALE_SLIDER_LENGTH "30"
#define DEF_SCALE_SLIDER_RELIEF "raised"
#define DEF_SCALE_STATE "normal"
-#define DEF_SCALE_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCALE_TAKE_FOCUS NULL
#define DEF_SCALE_TICK_INTERVAL "0"
#define DEF_SCALE_TO "100"
#define DEF_SCALE_VARIABLE ""
@@ -456,7 +461,7 @@
#define DEF_SCROLLBAR_RELIEF "sunken"
#define DEF_SCROLLBAR_REPEAT_DELAY "300"
#define DEF_SCROLLBAR_REPEAT_INTERVAL "100"
-#define DEF_SCROLLBAR_TAKE_FOCUS ((char *) NULL)
+#define DEF_SCROLLBAR_TAKE_FOCUS NULL
#define DEF_SCROLLBAR_TROUGH_COLOR TROUGH
#define DEF_SCROLLBAR_TROUGH_MONO WHITE
#define DEF_SCROLLBAR_WIDTH "10"
@@ -504,7 +509,7 @@
#define DEF_TEXT_STATE "normal"
#define DEF_TEXT_TABS ""
#define DEF_TEXT_TABSTYLE "tabular"
-#define DEF_TEXT_TAKE_FOCUS ((char *) NULL)
+#define DEF_TEXT_TAKE_FOCUS NULL
#define DEF_TEXT_UNDO "0"
#define DEF_TEXT_WIDTH "80"
#define DEF_TEXT_WRAP "char"
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index ab57ea5..b145476 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -589,8 +589,7 @@ static UINT APIENTRY OFNHookProc(HWND hdlg, UINT uMsg, WPARAM wParam,
LPARAM lParam);
static LRESULT CALLBACK MsgBoxCBTProc(int nCode, WPARAM wParam, LPARAM lParam);
static void SetTkDialog(ClientData clientData);
-static const char *ConvertExternalFilename(WCHAR *filename,
- Tcl_DString *dsPtr);
+static const char *ConvertExternalFilename(LPCWSTR, Tcl_DString *);
static void LoadShellProcs(void);
@@ -922,7 +921,8 @@ ColorDlgHookProc(
if ((title != NULL) && (title[0] != '\0')) {
Tcl_DString ds;
- SetWindowTextW(hDlg, (LPCWSTR)Tcl_WinUtfToTChar(title,-1,&ds));
+ Tcl_DStringInit(&ds);
+ SetWindowTextW(hDlg, Tcl_UtfToWCharDString(title, -1, &ds));
Tcl_DStringFree(&ds);
}
if (tsdPtr->debugFlag) {
@@ -1371,8 +1371,9 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
const char *src;
src = Tcl_GetString(optsPtr->extObj);
- wstr = (LPWSTR) Tcl_WinUtfToTChar(src, optsPtr->extObj->length, &ds);
- if (wstr[0] == L'.')
+ Tcl_DStringInit(&ds);
+ wstr = Tcl_UtfToWCharDString(src, optsPtr->extObj->length, &ds);
+ if (wstr[0] == '.')
++wstr;
hr = fdlgIf->lpVtbl->SetDefaultExtension(fdlgIf, wstr);
Tcl_DStringFree(&ds);
@@ -1385,7 +1386,8 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
const char *src;
src = Tcl_GetString(optsPtr->titleObj);
- wstr = (LPWSTR) Tcl_WinUtfToTChar(src, optsPtr->titleObj->length, &ds);
+ Tcl_DStringInit(&ds);
+ wstr = Tcl_UtfToWCharDString(src, optsPtr->titleObj->length, &ds);
hr = fdlgIf->lpVtbl->SetTitle(fdlgIf, wstr);
Tcl_DStringFree(&ds);
if (FAILED(hr))
@@ -1511,7 +1513,8 @@ static int GetFileNameVista(Tcl_Interp *interp, OFNOpts *optsPtr,
Tcl_DString ftds;
Tcl_Obj *ftobj;
- Tcl_WinTCharToUtf((LPCTSTR)filterPtr[ftix-1].pszName, -1, &ftds);
+ Tcl_DStringInit(&ftds);
+ Tcl_WCharToUtfDString(filterPtr[ftix-1].pszName, wcslen(filterPtr[ftix-1].pszName), &ftds);
ftobj = Tcl_NewStringObj(Tcl_DStringValue(&ftds),
Tcl_DStringLength(&ftds));
Tcl_ObjSetVar2(interp, optsPtr->typeVariableObj, NULL,
@@ -1622,20 +1625,22 @@ static int GetFileNameXP(Tcl_Interp *interp, OFNOpts *optsPtr, enum OFNOper oper
}
if (optsPtr->extObj != NULL) {
- str = Tcl_GetString(optsPtr->extObj);
- if (str[0] == '.')
- ++str;
- Tcl_WinUtfToTChar(str, -1, &extString);
- ofn.lpstrDefExt = (WCHAR *) Tcl_DStringValue(&extString);
+ str = Tcl_GetString(optsPtr->extObj);
+ if (str[0] == '.') {
+ ++str;
+ }
+ Tcl_DStringInit(&extString);
+ ofn.lpstrDefExt = Tcl_UtfToWCharDString(str, -1, &extString);
}
- Tcl_WinUtfToTChar(Tcl_DStringValue(&utfFilterString),
+ Tcl_DStringInit(&filterString);
+ ofn.lpstrFilter = Tcl_UtfToWCharDString(Tcl_DStringValue(&utfFilterString),
Tcl_DStringLength(&utfFilterString), &filterString);
- ofn.lpstrFilter = (WCHAR *) Tcl_DStringValue(&filterString);
ofn.nFilterIndex = filterIndex;
if (Tcl_DStringValue(&optsPtr->utfDirString)[0] != '\0') {
- Tcl_WinUtfToTChar(Tcl_DStringValue(&optsPtr->utfDirString),
+ Tcl_DStringInit(&dirString);
+ Tcl_UtfToWCharDString(Tcl_DStringValue(&optsPtr->utfDirString),
Tcl_DStringLength(&optsPtr->utfDirString), &dirString);
} else {
/*
@@ -1651,7 +1656,8 @@ static int GetFileNameXP(Tcl_Interp *interp, OFNOpts *optsPtr, enum OFNOper oper
Tcl_DStringValue(&optsPtr->utfDirString), &cwd) == NULL)) {
Tcl_ResetResult(interp);
} else {
- Tcl_WinUtfToTChar(Tcl_DStringValue(&cwd),
+ Tcl_DStringInit(&dirString);
+ Tcl_UtfToWCharDString(Tcl_DStringValue(&cwd),
Tcl_DStringLength(&cwd), &dirString);
}
Tcl_DStringFree(&cwd);
@@ -1659,8 +1665,8 @@ static int GetFileNameXP(Tcl_Interp *interp, OFNOpts *optsPtr, enum OFNOper oper
ofn.lpstrInitialDir = (WCHAR *) Tcl_DStringValue(&dirString);
if (optsPtr->titleObj != NULL) {
- Tcl_WinUtfToTChar(Tcl_GetString(optsPtr->titleObj), -1, &titleString);
- ofn.lpstrTitle = (WCHAR *) Tcl_DStringValue(&titleString);
+ Tcl_DStringInit(&titleString);
+ ofn.lpstrTitle = Tcl_UtfToWCharDString(Tcl_GetString(optsPtr->titleObj), -1, &titleString);
}
/*
@@ -2007,7 +2013,7 @@ OFNHookProc(
if (TCL_PATH_ABSOLUTE ==
Tcl_GetPathType(Tcl_DStringValue(&tmpfile))) {
/* re-get the full path to the start of the buffer */
- buffer = (WCHAR *) ofnData->dynFileBuffer;
+ buffer = ofnData->dynFileBuffer;
SendMessageW(hdlg, CDM_GETSPEC, selsize, (LPARAM) buffer);
} else {
*(buffer-1) = '\\';
@@ -2107,13 +2113,12 @@ MakeFilter(
*p = '\0';
} else {
- size_t len;
+ TkSizeT len;
if (valuePtr == NULL) {
len = 0;
} else {
- (void) Tcl_GetString(valuePtr);
- len = valuePtr->length;
+ (void) TkGetStringFromObj(valuePtr, &len);
}
/*
@@ -2220,9 +2225,9 @@ static void FreeFilterVista(DWORD count, TCLCOMDLG_FILTERSPEC *dlgFilterPtr)
DWORD dw;
for (dw = 0; dw < count; ++dw) {
if (dlgFilterPtr[dw].pszName != NULL)
- ckfree(dlgFilterPtr[dw].pszName);
+ ckfree((char *)dlgFilterPtr[dw].pszName);
if (dlgFilterPtr[dw].pszSpec != NULL)
- ckfree(dlgFilterPtr[dw].pszSpec);
+ ckfree((char *)dlgFilterPtr[dw].pszSpec);
}
ckfree(dlgFilterPtr);
}
@@ -2297,7 +2302,8 @@ static int MakeFilterVista(
initialIndex = i+1; /* Windows filter indices are 1-based */
/* First stash away the text description of the pattern */
- Tcl_WinUtfToTChar(filterPtr->name, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_UtfToWCharDString(filterPtr->name, -1, &ds);
nbytes = Tcl_DStringLength(&ds); /* # bytes, not Unicode chars */
nbytes += sizeof(WCHAR); /* Terminating \0 */
dlgFilterPtr[i].pszName = ckalloc(nbytes);
@@ -2325,7 +2331,8 @@ static int MakeFilterVista(
}
/* Again we need a Unicode form of the string */
- Tcl_WinUtfToTChar(Tcl_DStringValue(&patterns), -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_UtfToWCharDString(Tcl_DStringValue(&patterns), -1, &ds);
nbytes = Tcl_DStringLength(&ds); /* # bytes, not Unicode chars */
nbytes += sizeof(WCHAR); /* Terminating \0 */
dlgFilterPtr[i].pszSpec = ckalloc(nbytes);
@@ -2424,7 +2431,7 @@ Tk_ChooseDirectoryObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- WCHAR path[MAX_PATH];
+ WCHAR path[MAX_PATH];
int oldMode, result;
LPCITEMIDLIST pidl; /* Returned by browser */
BROWSEINFOW bInfo; /* Used by browser */
@@ -2461,7 +2468,8 @@ Tk_ChooseDirectoryObjCmd(
if (utfDir[0] != '\0') {
LPCWSTR uniStr;
- Tcl_WinUtfToTChar(Tcl_DStringValue(&ofnOpts.utfDirString), -1,
+ Tcl_DStringInit(&tempString);
+ Tcl_UtfToWCharDString(Tcl_DStringValue(&ofnOpts.utfDirString), -1,
&tempString);
uniStr = (WCHAR *) Tcl_DStringValue(&tempString);
@@ -2493,8 +2501,8 @@ Tk_ChooseDirectoryObjCmd(
bInfo.lParam = (LPARAM) &cdCBData;
if (ofnOpts.titleObj != NULL) {
- bInfo.lpszTitle = (LPCWSTR)Tcl_WinUtfToTChar(
- Tcl_GetString(ofnOpts.titleObj), -1, &titleString);
+ Tcl_DStringInit(&titleString);
+ bInfo.lpszTitle = Tcl_UtfToWCharDString(Tcl_GetString(ofnOpts.titleObj), -1, &titleString);
} else {
bInfo.lpszTitle = L"Please choose a directory, then select OK.";
}
@@ -2637,7 +2645,8 @@ ChooseDirectoryValidateProc(
* like ~ are converted correctly.
*/
- Tcl_WinTCharToUtf((LPCTSTR) lParam, -1, &initDirString);
+ Tcl_DStringInit(&initDirString);
+ Tcl_WCharToUtfDString((WCHAR *) lParam, wcslen((WCHAR *) lParam), &initDirString);
if (Tcl_TranslateFileName(chooseDirSharedData->interp,
Tcl_DStringValue(&initDirString), &tempString) == NULL) {
/*
@@ -2648,12 +2657,11 @@ ChooseDirectoryValidateProc(
chooseDirSharedData->retDir[0] = '\0';
return 1;
}
- Tcl_DStringFree(&initDirString);
- Tcl_WinUtfToTChar(Tcl_DStringValue(&tempString), -1, &initDirString);
- Tcl_DStringFree(&tempString);
- wcsncpy(string, (WCHAR *) Tcl_DStringValue(&initDirString),
+ Tcl_DStringSetLength(&initDirString, 0);
+ wcsncpy(string, Tcl_UtfToWCharDString(Tcl_DStringValue(&tempString), -1, &initDirString),
MAX_PATH);
Tcl_DStringFree(&initDirString);
+ Tcl_DStringFree(&tempString);
if (SetCurrentDirectoryW(string) == 0) {
@@ -2734,8 +2742,8 @@ ChooseDirectoryValidateProc(
ULONG ulCount, ulAttr;
if (SUCCEEDED(psfFolder->lpVtbl->ParseDisplayName(
- psfFolder, hwnd, NULL, (WCHAR *)
- initDir, &ulCount,&pidlMain,&ulAttr))
+ psfFolder, hwnd, NULL, initDir,
+ &ulCount,&pidlMain,&ulAttr))
&& (pidlMain != NULL)) {
SendMessageW(hwnd, BFFM_SETSELECTIONW, FALSE,
(LPARAM) pidlMain);
@@ -2929,10 +2937,12 @@ Tk_MessageBoxObjCmd(
tsdPtr->hMsgBoxHook = SetWindowsHookExW(WH_CBT, MsgBoxCBTProc, NULL,
GetCurrentThreadId());
src = Tcl_GetString(tmpObj);
- tmpPtr = (LPCWSTR)Tcl_WinUtfToTChar(src, tmpObj->length, &tmpBuf);
+ Tcl_DStringInit(&tmpBuf);
+ tmpPtr = Tcl_UtfToWCharDString(src, tmpObj->length, &tmpBuf);
if (titleObj != NULL) {
src = Tcl_GetString(titleObj);
- titlePtr = (LPCWSTR)Tcl_WinUtfToTChar(src, titleObj->length, &titleBuf);
+ Tcl_DStringInit(&titleBuf);
+ titlePtr = Tcl_UtfToWCharDString(src, titleObj->length, &titleBuf);
} else {
titlePtr = L"";
Tcl_DStringInit(&titleBuf);
@@ -3024,12 +3034,13 @@ SetTkDialog(
static const char *
ConvertExternalFilename(
- WCHAR *filename,
+ LPCWSTR filename,
Tcl_DString *dsPtr)
{
char *p;
- Tcl_WinTCharToUtf((LPCTSTR)filename, -1, dsPtr);
+ Tcl_DStringInit(dsPtr);
+ Tcl_WCharToUtfDString(filename, wcslen(filename), dsPtr);
for (p = Tcl_DStringValue(dsPtr); *p != '\0'; p++) {
/*
* Change the pathname to the Tcl "normalized" pathname, where back
@@ -3066,12 +3077,13 @@ GetFontObj(
int pt = 0;
resObj = Tcl_NewListObj(0, NULL);
- Tcl_WinTCharToUtf((LPCTSTR)plf->lfFaceName, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(plf->lfFaceName, wcslen(plf->lfFaceName), &ds);
Tcl_ListObjAppendElement(NULL, resObj,
Tcl_NewStringObj(Tcl_DStringValue(&ds), -1));
Tcl_DStringFree(&ds);
pt = -MulDiv(plf->lfHeight, 72, GetDeviceCaps(hdc, LOGPIXELSY));
- Tcl_ListObjAppendElement(NULL, resObj, Tcl_NewIntObj(pt));
+ Tcl_ListObjAppendElement(NULL, resObj, Tcl_NewWideIntObj(pt));
if (plf->lfWeight >= 700) {
Tcl_ListObjAppendElement(NULL, resObj, Tcl_NewStringObj("bold", -1));
}
@@ -3152,7 +3164,8 @@ HookProc(
if (phd->titleObj != NULL) {
Tcl_DString title;
- Tcl_WinUtfToTChar(Tcl_GetString(phd->titleObj), -1, &title);
+ Tcl_DStringInit(&title);
+ Tcl_UtfToWCharDString(Tcl_GetString(phd->titleObj), -1, &title);
if (Tcl_DStringLength(&title) > 0) {
SetWindowTextW(hwndDlg, (LPCWSTR) Tcl_DStringValue(&title));
}
@@ -3249,7 +3262,7 @@ FontchooserCget(
}
break;
case FontchooserVisible:
- resObj = Tcl_NewBooleanObj(hdPtr->hwnd && IsWindow(hdPtr->hwnd));
+ resObj = Tcl_NewWideIntObj((hdPtr->hwnd != NULL) && IsWindow(hdPtr->hwnd));
break;
default:
resObj = Tcl_NewStringObj("", 0);
@@ -3469,8 +3482,8 @@ FontchooserShowCmd(
}
fontPtr = (TkFont *) f;
cf.Flags |= CF_INITTOLOGFONTSTRUCT;
- Tcl_WinUtfToTChar(fontPtr->fa.family, -1, &ds);
- wcsncpy(lf.lfFaceName, (WCHAR *)Tcl_DStringValue(&ds),
+ Tcl_DStringInit(&ds);
+ wcsncpy(lf.lfFaceName, Tcl_UtfToWCharDString(fontPtr->fa.family, -1, &ds),
LF_FACESIZE-1);
Tcl_DStringFree(&ds);
lf.lfFaceName[LF_FACESIZE-1] = 0;
diff --git a/win/tkWinDraw.c b/win/tkWinDraw.c
index 042d1b1..1257d46 100644
--- a/win/tkWinDraw.c
+++ b/win/tkWinDraw.c
@@ -600,6 +600,7 @@ TkPutImage(
return Success;
}
+#undef XPutImage
int
XPutImage(
Display *display,
@@ -1402,7 +1403,7 @@ TkScrollWindow(
int x, int y, int width, int height,
/* Position rectangle to be scrolled. */
int dx, int dy, /* Distance rectangle should be moved. */
- TkRegion damageRgn) /* Region to accumulate damage in. */
+ Region damageRgn) /* Region to accumulate damage in. */
{
HWND hwnd = TkWinGetHWND(Tk_WindowId(tkwin));
RECT scrollRect;
@@ -1488,7 +1489,7 @@ TkpDrawHighlightBorder(
/*
*----------------------------------------------------------------------
*
- * TkpDrawFrame --
+ * TkpDrawFrameEx --
*
* This function draws the rectangular frame area.
*
@@ -1502,14 +1503,15 @@ TkpDrawHighlightBorder(
*/
void
-TkpDrawFrame(
+TkpDrawFrameEx(
Tk_Window tkwin,
+ Drawable drawable,
Tk_3DBorder border,
int highlightWidth,
int borderWidth,
int relief)
{
- Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, highlightWidth,
+ Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth,
highlightWidth, Tk_Width(tkwin) - 2 * highlightWidth,
Tk_Height(tkwin) - 2 * highlightWidth, borderWidth, relief);
}
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c
index 1c6ba6c..716d456 100644
--- a/win/tkWinEmbed.c
+++ b/win/tkWinEmbed.c
@@ -173,7 +173,7 @@ void Tk_MapEmbeddedWindow(
TkpWmSetState(winPtr, state);
TkWmMapWindow(winPtr);
}
- Tcl_Release((ClientData)winPtr);
+ Tcl_Release(winPtr);
}
/*
@@ -331,8 +331,8 @@ TkpUseWindow(
* window.
*/
- Tcl_Preserve((ClientData) winPtr);
- Tcl_DoWhenIdle((Tcl_IdleProc*) Tk_MapEmbeddedWindow, (ClientData) winPtr);
+ Tcl_Preserve(winPtr);
+ Tcl_DoWhenIdle((Tcl_IdleProc*) Tk_MapEmbeddedWindow, winPtr);
return TCL_OK;
}
@@ -392,7 +392,7 @@ TkpMakeContainer(
*/
Tk_CreateEventHandler(tkwin, StructureNotifyMask,
- ContainerEventProc, (ClientData) containerPtr);
+ ContainerEventProc, containerPtr);
}
/*
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index 7b70a08..451dc68 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -657,10 +657,12 @@ WinFontFamilyEnumProc(
int fontType, /* Type of font (not used). */
LPARAM lParam) /* Result object to hold result. */
{
+ WCHAR *faceName = lfPtr->elfLogFont.lfFaceName;
Tcl_Obj *resultObj = (Tcl_Obj *) lParam;
Tcl_DString faceString;
- Tcl_WinTCharToUtf((LPCTSTR)lfPtr->elfLogFont.lfFaceName, -1, &faceString);
+ Tcl_DStringInit(&faceString);
+ Tcl_WCharToUtfDString(faceName, wcslen(faceName), &faceString);
Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj(
Tcl_DStringValue(&faceString), Tcl_DStringLength(&faceString)));
Tcl_DStringFree(&faceString);
@@ -1567,7 +1569,8 @@ InitFont(
GetTextMetricsW(hdc, &tm);
GetTextFaceW(hdc, LF_FACESIZE, buf);
- Tcl_WinTCharToUtf((LPCTSTR)buf, -1, &faceString);
+ Tcl_DStringInit(&faceString);
+ Tcl_WCharToUtfDString(buf, wcslen(buf), &faceString);
fontPtr->font.fid = (Font) fontPtr;
fontPtr->hwnd = hwnd;
@@ -1744,7 +1747,8 @@ AllocFontFamily(
hFont = SelectObject(hdc, hFont);
GetTextFaceW(hdc, LF_FACESIZE, buf);
- Tcl_WinTCharToUtf((LPCTSTR)buf, -1, &faceString);
+ Tcl_DStringInit(&faceString);
+ Tcl_WCharToUtfDString(buf, wcslen(buf), &faceString);
faceName = Tk_GetUid(Tcl_DStringValue(&faceString));
Tcl_DStringFree(&faceString);
hFont = SelectObject(hdc, hFont);
@@ -2047,7 +2051,10 @@ WinFontCanUseProc(
fontPtr = canUsePtr->fontPtr;
nameTriedPtr = canUsePtr->nameTriedPtr;
- fallbackName = Tcl_WinTCharToUtf((LPCTSTR)lfPtr->elfLogFont.lfFaceName, -1, &faceString);
+ fallbackName = (char *) lfPtr->elfLogFont.lfFaceName;
+ Tcl_DStringInit(&faceString);
+ Tcl_WCharToUtfDString((WCHAR *)fallbackName, wcslen((WCHAR *)fallbackName), &faceString);
+ fallbackName = Tcl_DStringValue(&faceString);
if (SeenName(fallbackName, nameTriedPtr) == 0) {
subFontPtr = CanUseFallback(hdc, fontPtr, fallbackName, ch,
@@ -2455,7 +2462,6 @@ GetScreenFont(
double angle) /* What is the desired orientation of the
* font. */
{
- Tcl_DString ds;
HFONT hFont;
LOGFONTW lf;
@@ -2474,9 +2480,7 @@ GetScreenFont(
lf.lfQuality = DEFAULT_QUALITY;
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- Tcl_WinUtfToTChar(faceName, -1, &ds);
- wcsncpy(lf.lfFaceName, (WCHAR *)Tcl_DStringValue(&ds), LF_FACESIZE-1);
- Tcl_DStringFree(&ds);
+ MultiByteToWideChar(CP_UTF8, 0, faceName, -1, lf.lfFaceName, LF_FACESIZE);
lf.lfFaceName[LF_FACESIZE-1] = 0;
hFont = CreateFontIndirectW(&lf);
return hFont;
@@ -2509,23 +2513,8 @@ FamilyExists(
int result;
Tcl_DString faceString;
- /*
- * Just immediately rule out the following fonts, because they look so
- * ugly on windows. The caller's fallback mechanism will cause the
- * corresponding appropriate TrueType fonts to be selected.
- */
-
- if (strcasecmp(faceName, "Courier") == 0) {
- return 0;
- }
- if (strcasecmp(faceName, "Times") == 0) {
- return 0;
- }
- if (strcasecmp(faceName, "Helvetica") == 0) {
- return 0;
- }
-
- Tcl_WinUtfToTChar(faceName, -1, &faceString);
+ Tcl_DStringInit(&faceString);
+ Tcl_UtfToWCharDString(faceName, -1, &faceString);
/*
* If the family exists, WinFontExistProc() will be called and
@@ -2534,7 +2523,7 @@ FamilyExists(
* non-zero value.
*/
- result = EnumFontFamiliesW(hdc, (WCHAR*) Tcl_DStringValue(&faceString),
+ result = EnumFontFamiliesW(hdc, (WCHAR *)Tcl_DStringValue(&faceString),
(FONTENUMPROCW) WinFontExistProc, 0);
Tcl_DStringFree(&faceString);
return (result == 0);
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index a1ab098..8f4ac5d 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -137,21 +137,21 @@ TkpDisplayWarning(
len = MultiByteToWideChar(CP_UTF8, 0, title, -1, titleString, TK_MAX_WARN_LEN);
msgString = &titleString[len + 1];
- titleString[TK_MAX_WARN_LEN - 1] = L'\0';
+ titleString[TK_MAX_WARN_LEN - 1] = '\0';
MultiByteToWideChar(CP_UTF8, 0, msg, -1, msgString, (TK_MAX_WARN_LEN - 1) - len);
/*
* Truncate MessageBox string if it is too long to not overflow the screen
* and cause possible oversized window error.
*/
- if (titleString[TK_MAX_WARN_LEN - 1] != L'\0') {
+ if (titleString[TK_MAX_WARN_LEN - 1] != '\0') {
memcpy(titleString + (TK_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR));
}
if (IsDebuggerPresent()) {
- titleString[len - 1] = L':';
- titleString[len] = L' ';
+ titleString[len - 1] = ':';
+ titleString[len] = ' ';
OutputDebugStringW(titleString);
} else {
- titleString[len - 1] = L'\0';
+ titleString[len - 1] = '\0';
MessageBoxW(NULL, msgString, titleString,
MB_OK | MB_ICONEXCLAMATION | MB_SYSTEMMODAL
| MB_SETFOREGROUND | MB_TOPMOST);
@@ -196,7 +196,8 @@ TkWin32ErrorObj(
*p = '\0';
}
- Tcl_WinTCharToUtf((LPCTSTR)lpBuffer, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(lpBuffer, wcslen(lpBuffer), &ds);
errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
@@ -206,7 +207,6 @@ TkWin32ErrorObj(
return errPtr;
}
-
/*
* Local Variables:
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index ce9a482..2b5e9af 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -420,7 +420,7 @@ TkpDestroyMenu(
if (tsdPtr->menuHWND != NULL) {
Tcl_HashEntry *hashEntryPtr =
- Tcl_FindHashEntry(&tsdPtr->winMenuTable, (char *) winMenuHdl);
+ Tcl_FindHashEntry(&tsdPtr->winMenuTable, winMenuHdl);
if (hashEntryPtr != NULL) {
Tcl_DeleteHashEntry(hashEntryPtr);
@@ -609,7 +609,8 @@ ReconfigureWindowsMenu(
itemText = GetEntryText(menuPtr, mePtr);
if ((menuPtr->menuType == MENUBAR)
|| (menuPtr->menuFlags & MENU_SYSTEM_MENU)) {
- Tcl_WinUtfToTChar(itemText, -1, &translatedText);
+ Tcl_DStringInit(&translatedText);
+ Tcl_UtfToWCharDString(itemText, -1, &translatedText);
lpNewItem = (LPCWSTR) Tcl_DStringValue(&translatedText);
flags |= MF_STRING;
} else {
@@ -781,7 +782,7 @@ TkpPostMenu(
return result;
}
- if (index >= menuPtr->numEntries) {
+ if (index >= (int)menuPtr->numEntries) {
index = menuPtr->numEntries - 1;
}
if (index >= 0) {
@@ -877,7 +878,7 @@ TkpPostTearoffMenu(
int vRootX, vRootY, vRootWidth, vRootHeight;
int result;
- if (index >= menuPtr->numEntries) {
+ if (index >= (int)menuPtr->numEntries) {
index = menuPtr->numEntries - 1;
}
if (index >= 0) {
@@ -1146,7 +1147,7 @@ TkWinHandleMenuEvent(
switch (*pMessage) {
case WM_UNINITMENUPOPUP:
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
- (char *) *pwParam);
+ *pwParam);
if (hashEntryPtr != NULL) {
menuPtr = Tcl_GetHashValue(hashEntryPtr);
if ((menuPtr->menuRefPtr != NULL)
@@ -1160,7 +1161,7 @@ TkWinHandleMenuEvent(
case WM_INITMENU:
TkMenuInit();
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
- (char *) *pwParam);
+ *pwParam);
if (hashEntryPtr != NULL) {
tsdPtr->oldServiceMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
menuPtr = Tcl_GetHashValue(hashEntryPtr);
@@ -1245,11 +1246,11 @@ TkWinHandleMenuEvent(
case WM_MENUCHAR: {
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
- (char *) *plParam);
+ *plParam);
if (hashEntryPtr != NULL) {
- int i, len, underline;
+ TkSizeT i, len, underline;
Tcl_Obj *labelPtr;
- LPCWSTR wlabel;
+ WCHAR *wlabel;
int menuChar;
Tcl_DString ds;
@@ -1265,15 +1266,16 @@ TkWinHandleMenuEvent(
for (i = 0; i < menuPtr->numEntries; i++) {
underline = menuPtr->entries[i]->underline;
labelPtr = menuPtr->entries[i]->labelPtr;
- if ((underline >= 0) && (labelPtr != NULL)) {
+ if ((underline != TCL_AUTO_LENGTH) && (labelPtr != NULL)) {
/*
* Ensure we don't exceed the label length, then check
*/
- const char *src = Tcl_GetStringFromObj(labelPtr, &len);
+ const char *src = TkGetStringFromObj(labelPtr, &len);
Tcl_DStringFree(&ds);
- wlabel = (LPCWSTR) Tcl_WinUtfToTChar(src, len, &ds);
- if ((underline < len) && (menuChar ==
+ Tcl_DStringInit(&ds);
+ wlabel = Tcl_UtfToWCharDString(src, len, &ds);
+ if ((underline + 1 < len + 1) && (menuChar ==
Tcl_UniCharToUpper(wlabel[underline]))) {
*plResult = (2 << 16) | i;
returnResult = 1;
@@ -1389,7 +1391,7 @@ TkWinHandleMenuEvent(
menuPtr = NULL;
if (*plParam != 0) {
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
- (char *) *plParam);
+ *plParam);
if (hashEntryPtr != NULL) {
menuPtr = Tcl_GetHashValue(hashEntryPtr);
}
@@ -1410,7 +1412,7 @@ TkWinHandleMenuEvent(
}
mePtr = NULL;
if (flags != 0xFFFF) {
- if ((flags&MF_POPUP) && (entryIndex<menuPtr->numEntries)) {
+ if ((flags&MF_POPUP) && (entryIndex < (int)menuPtr->numEntries)) {
mePtr = menuPtr->entries[entryIndex];
} else {
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->commandTable,
@@ -1424,7 +1426,7 @@ TkWinHandleMenuEvent(
if ((mePtr == NULL) || (mePtr->state == ENTRY_DISABLED)) {
TkActivateMenuEntry(menuPtr, -1);
} else {
- if (mePtr->index >= menuPtr->numEntries) {
+ if (mePtr->index >= (int)menuPtr->numEntries) {
Tcl_Panic("Trying to activate an entry which doesn't exist");
}
TkActivateMenuEntry(menuPtr, mePtr->index);
@@ -1461,7 +1463,7 @@ void
RecursivelyClearActiveMenu(
TkMenu *menuPtr) /* The menu to reset. */
{
- int i;
+ TkSizeT i;
TkMenuEntry *mePtr;
TkActivateMenuEntry(menuPtr, -1);
@@ -1514,7 +1516,7 @@ TkpSetWindowMenuBar(
winMenuHdl = (HMENU) menuPtr->platformData;
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
- (char *) winMenuHdl);
+ winMenuHdl);
Tcl_DeleteHashEntry(hashEntryPtr);
DestroyMenu(winMenuHdl);
winMenuHdl = CreateMenu();
@@ -2257,8 +2259,7 @@ TkpInitializeMenuBindings(
*/
(void) Tcl_CreateObjCommand(interp, "tk::WinMenuKey",
- TkWinMenuKeyObjCmd,
- (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
+ TkWinMenuKeyObjCmd, Tk_MainWindow(interp), NULL);
(void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
"<Alt_L>", "tk::WinMenuKey %W %N", 0);
@@ -2580,7 +2581,7 @@ DrawTearoffEntry(
int
TkpConfigureMenuEntry(
- register TkMenuEntry *mePtr)/* Information about menu entry; may or may
+ TkMenuEntry *mePtr)/* Information about menu entry; may or may
* not already have values for some fields. */
{
ScheduleMenuReconfigure(mePtr->menuPtr);
@@ -2908,10 +2909,26 @@ DrawMenuEntryBackground(
{
if (mePtr->state == ENTRY_ACTIVE
|| (mePtr->entryFlags & ENTRY_PLATFORM_FLAG1)!=0 ) {
+ int relief;
+ int activeBorderWidth;
+
bgBorder = activeBorder;
+
+ if ((menuPtr->menuType == MENUBAR)
+ && ((menuPtr->postedCascade == NULL)
+ || (menuPtr->postedCascade != mePtr))) {
+ relief = TK_RELIEF_FLAT;
+ } else {
+ Tk_GetReliefFromObj(NULL, menuPtr->activeReliefPtr, &relief);
+ }
+ Tk_GetPixelsFromObj(NULL, menuPtr->tkwin,
+ menuPtr->activeBorderWidthPtr, &activeBorderWidth);
+ Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height,
+ activeBorderWidth, relief);
+ } else {
+ Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height, 0,
+ TK_RELIEF_FLAT);
}
- Tk_Fill3DRectangle(menuPtr->tkwin, d, bgBorder, x, y, width, height, 0,
- TK_RELIEF_FLAT);
}
/*
@@ -2969,7 +2986,7 @@ TkpComputeStandardMenuGeometry(
Tk_GetPixelsFromObj(menuPtr->interp, menuPtr->tkwin,
menuPtr->activeBorderWidthPtr, &activeBorderWidth);
- for (i = 0; i < menuPtr->numEntries; i++) {
+ for (i = 0; i < (int)menuPtr->numEntries; i++) {
if (menuPtr->entries[i]->fontPtr == NULL) {
tkfont = menuFont;
fmPtr = &menuMetrics;
@@ -3053,7 +3070,7 @@ TkpComputeStandardMenuGeometry(
if (accelWidth != 0) {
labelWidth += accelSpace;
}
- for (j = lastColumnBreak; j < menuPtr->numEntries; j++) {
+ for (j = lastColumnBreak; j < (int)menuPtr->numEntries; j++) {
menuPtr->entries[j]->indicatorSpace = indicatorSpace;
menuPtr->entries[j]->labelWidth = labelWidth;
menuPtr->entries[j]->width = indicatorSpace + labelWidth
@@ -3279,7 +3296,7 @@ TkWinGetMenuSystemDefault(
if ((strcmp(dbName, "activeBorderWidth") == 0) ||
(strcmp(dbName, "borderWidth") == 0)) {
- valuePtr = Tcl_NewIntObj(defaultBorderWidth);
+ valuePtr = Tcl_NewWideIntObj(defaultBorderWidth);
} else if (strcmp(dbName, "font") == 0) {
valuePtr = Tcl_NewStringObj(Tcl_DStringValue(&menuFontDString), -1);
}
@@ -3318,12 +3335,7 @@ SetDefaults(
int pointSize;
HFONT menuFont;
/* See: [Bug #3239768] tk8.4.19 (and later) WIN32 menu font support */
- struct {
- NONCLIENTMETRICSW metrics;
-#if (WINVER < 0x0600)
- int padding;
-#endif
- } nc;
+ NONCLIENTMETRICSW metrics;
OSVERSIONINFOW os;
/*
@@ -3342,17 +3354,17 @@ SetDefaults(
}
Tcl_DStringInit(&menuFontDString);
- nc.metrics.cbSize = sizeof(nc);
+ metrics.cbSize = sizeof(metrics);
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
GetVersionExW(&os);
if (os.dwMajorVersion < 6) {
- nc.metrics.cbSize -= sizeof(int);
+ metrics.cbSize -= sizeof(int);
}
- SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, nc.metrics.cbSize,
- &nc.metrics, 0);
- menuFont = CreateFontIndirectW(&nc.metrics.lfMenuFont);
+ SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, metrics.cbSize,
+ &metrics, 0);
+ menuFont = CreateFontIndirectW(&metrics.lfMenuFont);
SelectObject(scratchDC, menuFont);
GetTextMetricsW(scratchDC, &tm);
GetTextFaceA(scratchDC, LF_FACESIZE, faceName);
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 8cc5677..89d91a7 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -21,6 +21,7 @@
*---------------------------------------------------------------------------
*/
+#include <stdio.h>
#include <wchar.h>
#include <io.h>
#include <stdlib.h>
diff --git a/win/tkWinRegion.c b/win/tkWinRegion.c
index a2f6fd7..1eff839 100644
--- a/win/tkWinRegion.c
+++ b/win/tkWinRegion.c
@@ -11,13 +11,6 @@
#include "tkWinInt.h"
-#undef TkCreateRegion
-#undef TkDestroyRegion
-#undef TkClipBox
-#undef TkIntersectRegion
-#undef TkUnionRectWithRegion
-#undef TkRectInRegion
-#undef TkSubtractRegion
/*
*----------------------------------------------------------------------
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index a633dc2..40f7186 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -275,7 +275,7 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
- WinScrollbar *scrollPtr = (WinScrollbar *) clientData;
+ WinScrollbar *scrollPtr = clientData;
Tk_Window tkwin = scrollPtr->info.tkwin;
scrollPtr->info.flags &= ~REDRAW_PENDING;
@@ -295,7 +295,7 @@ TkpDisplayScrollbar(
DestroyWindow(hwnd);
CreateProc(tkwin, Tk_WindowId(Tk_Parent(tkwin)),
- (ClientData) scrollPtr);
+ scrollPtr);
} else {
UpdateScrollbar(scrollPtr);
}
@@ -383,7 +383,7 @@ UpdateScrollbarMetrics(void)
void
TkpComputeScrollbarGeometry(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Scrollbar whose geometry may have
* changed. */
{
@@ -591,7 +591,7 @@ ScrollbarProc(
void
TkpConfigureScrollbar(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Information about widget; may or may not
* already have values for some fields. */
{
@@ -617,7 +617,7 @@ ModalLoop(
int oldMode;
if (scrollPtr->hwnd) {
- Tcl_Preserve((ClientData)scrollPtr);
+ Tcl_Preserve(scrollPtr);
scrollPtr->winFlags |= IN_MODAL_LOOP;
oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
TkWinResendEvent(scrollPtr->oldProc, scrollPtr->hwnd, eventPtr);
@@ -626,7 +626,7 @@ ModalLoop(
if (scrollPtr->hwnd && scrollPtr->winFlags & ALREADY_DEAD) {
DestroyWindow(scrollPtr->hwnd);
}
- Tcl_Release((ClientData)scrollPtr);
+ Tcl_Release(scrollPtr);
}
}
@@ -650,7 +650,7 @@ ModalLoop(
int
TkpScrollbarPosition(
- register TkScrollbar *scrollPtr,
+ TkScrollbar *scrollPtr,
/* Scrollbar widget record. */
int x, int y) /* Coordinates within scrollPtr's window. */
{
diff --git a/win/tkWinSend.c b/win/tkWinSend.c
index 8fa1eaf..8acc568 100644
--- a/win/tkWinSend.c
+++ b/win/tkWinSend.c
@@ -254,7 +254,8 @@ TkGetInterpNames(
if (*p) {
Tcl_DString ds;
- Tcl_WinTCharToUtf((LPCTSTR)(p + 1), -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(p + 1, wcslen(p + 1), &ds);
result = Tcl_ListObjAppendElement(interp,
objList,
Tcl_NewStringObj(Tcl_DStringValue(&ds),
@@ -619,7 +620,8 @@ BuildMoniker(
LPMONIKER pmkItem = NULL;
Tcl_DString dString;
- Tcl_WinUtfToTChar(name, -1, &dString);
+ Tcl_DStringInit(&dString);
+ Tcl_UtfToWCharDString(name, -1, &dString);
hr = CreateFileMoniker((LPOLESTR)Tcl_DStringValue(&dString), &pmkItem);
Tcl_DStringFree(&dString);
if (SUCCEEDED(hr)) {
@@ -761,8 +763,8 @@ Send(
vCmd.vt = VT_BSTR;
src = Tcl_GetString(cmd);
- Tcl_WinUtfToTChar(src, cmd->length, &ds);
- vCmd.bstrVal = SysAllocString((WCHAR *) Tcl_DStringValue(&ds));
+ Tcl_DStringInit(&ds);
+ vCmd.bstrVal = SysAllocString(Tcl_UtfToWCharDString(src, cmd->length, &ds));
Tcl_DStringFree(&ds);
dp.cArgs = 1;
@@ -784,8 +786,8 @@ Send(
ehr = VariantChangeType(&vResult, &vResult, 0, VT_BSTR);
if (SUCCEEDED(ehr)) {
- Tcl_WinTCharToUtf((LPCTSTR)vResult.bstrVal, SysStringLen(vResult.bstrVal) *
- sizeof (WCHAR), &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(vResult.bstrVal, SysStringLen(vResult.bstrVal), &ds);
Tcl_DStringResult(interp, &ds);
}
@@ -797,8 +799,9 @@ Send(
if (hr == DISP_E_EXCEPTION && ei.bstrSource != NULL) {
Tcl_Obj *opError, *opErrorCode, *opErrorInfo;
- Tcl_WinTCharToUtf((LPCTSTR)ei.bstrSource, SysStringLen(ei.bstrSource) *
- sizeof (WCHAR), &ds);
+
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(ei.bstrSource, SysStringLen(ei.bstrSource), &ds);
opError = Tcl_NewStringObj(Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
@@ -869,14 +872,14 @@ TkWinSend_SetExcepInfo(
/* TODO: Handle failure to append */
src = Tcl_GetString(opError);
- Tcl_WinUtfToTChar(src, opError->length, &ds);
+ Tcl_DStringInit(&ds);
pExcepInfo->bstrDescription =
- SysAllocString((WCHAR *) Tcl_DStringValue(&ds));
+ SysAllocString(Tcl_UtfToWCharDString(src, opError->length, &ds));
Tcl_DStringFree(&ds);
src = Tcl_GetString(opErrorCode);
- Tcl_WinUtfToTChar(src, opErrorCode->length, &ds);
+ Tcl_DStringInit(&ds);
pExcepInfo->bstrSource =
- SysAllocString((WCHAR *) Tcl_DStringValue(&ds));
+ SysAllocString(Tcl_UtfToWCharDString(src, opErrorCode->length, &ds));
Tcl_DStringFree(&ds);
Tcl_DecrRefCount(opErrorCode);
pExcepInfo->scode = E_FAIL;
diff --git a/win/tkWinSendCom.c b/win/tkWinSendCom.c
index 3f4f387..2422300 100644
--- a/win/tkWinSendCom.c
+++ b/win/tkWinSendCom.c
@@ -385,8 +385,8 @@ Async(
if (SUCCEEDED(hr) && obj->interp) {
Tcl_Obj *scriptPtr;
- Tcl_WinTCharToUtf((LPCTSTR)vCmd.bstrVal, SysStringLen(vCmd.bstrVal) *
- sizeof (WCHAR), &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(vCmd.bstrVal, SysStringLen(vCmd.bstrVal), &ds);
scriptPtr =
Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
@@ -427,7 +427,7 @@ Send(
HRESULT hr = S_OK;
int result = TCL_OK;
VARIANT v;
- register Tcl_Interp *interp = obj->interp;
+ Tcl_Interp *interp = obj->interp;
Tcl_Obj *scriptPtr;
Tcl_DString ds;
@@ -440,8 +440,8 @@ Send(
return hr;
}
- Tcl_WinTCharToUtf((LPCTSTR)v.bstrVal, SysStringLen(v.bstrVal) *
- sizeof(WCHAR), &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(v.bstrVal, SysStringLen(v.bstrVal), &ds);
scriptPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
Tcl_Preserve(interp);
@@ -457,8 +457,8 @@ Send(
pvResult->vt = VT_BSTR;
obj = Tcl_GetObjResult(interp);
src = Tcl_GetString(obj);
- Tcl_WinUtfToTChar(src, obj->length, &ds);
- pvResult->bstrVal = SysAllocString((WCHAR *) Tcl_DStringValue(&ds));
+ Tcl_DStringInit(&ds);
+ pvResult->bstrVal = SysAllocString(Tcl_UtfToWCharDString(src, obj->length, &ds));
Tcl_DStringFree(&ds);
}
if (result == TCL_ERROR) {
diff --git a/win/tkWinTest.c b/win/tkWinTest.c
index 6911334..613eda3 100644
--- a/win/tkWinTest.c
+++ b/win/tkWinTest.c
@@ -67,15 +67,15 @@ TkplatformtestInit(
*/
Tcl_CreateObjCommand(interp, "testclipboard", TestclipboardObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
+ Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testwinevent", TestwineventObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
+ Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testfindwindow", TestfindwindowObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
+ Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testgetwindowinfo", TestgetwindowinfoObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
+ Tk_MainWindow(interp), NULL);
Tcl_CreateObjCommand(interp, "testwinlocale", TestwinlocaleObjCmd,
- (ClientData) Tk_MainWindow(interp), NULL);
+ Tk_MainWindow(interp), NULL);
return TCL_OK;
}
@@ -177,7 +177,8 @@ AppendSystemError(
} else {
char *msgPtr;
- Tcl_WinTCharToUtf((LPCTSTR)wMsgPtr, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(wMsgPtr, wcslen(wMsgPtr), &ds);
LocalFree(wMsgPtr);
msgPtr = Tcl_DStringValue(&ds);
@@ -241,7 +242,7 @@ TestclipboardObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument values. */
{
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
@@ -287,6 +288,16 @@ TestwineventObjCmd(
static const TkStateMap messageMap[] = {
{WM_LBUTTONDOWN, "WM_LBUTTONDOWN"},
{WM_LBUTTONUP, "WM_LBUTTONUP"},
+ {WM_LBUTTONDBLCLK, "WM_LBUTTONDBLCLK"},
+ {WM_MBUTTONDOWN, "WM_MBUTTONDOWN"},
+ {WM_MBUTTONUP, "WM_MBUTTONUP"},
+ {WM_MBUTTONDBLCLK, "WM_MBUTTONDBLCLK"},
+ {WM_RBUTTONDOWN, "WM_RBUTTONDOWN"},
+ {WM_RBUTTONUP, "WM_RBUTTONUP"},
+ {WM_RBUTTONDBLCLK, "WM_RBUTTONDBLCLK"},
+ {WM_XBUTTONDOWN, "WM_XBUTTONDOWN"},
+ {WM_XBUTTONUP, "WM_XBUTTONUP"},
+ {WM_XBUTTONDBLCLK, "WM_XBUTTONDBLCLK"},
{WM_CHAR, "WM_CHAR"},
{WM_GETTEXT, "WM_GETTEXT"},
{WM_SETTEXT, "WM_SETTEXT"},
@@ -375,20 +386,21 @@ TestwineventObjCmd(
case WM_SETTEXT: {
Tcl_DString ds;
- control = TestFindControl(hwnd, id);
- if (control == NULL) {
- Tcl_SetObjResult(interp,
- Tcl_ObjPrintf("Could not find control with id %d", id));
- return TCL_ERROR;
- }
+ control = TestFindControl(hwnd, id);
+ if (control == NULL) {
+ Tcl_SetObjResult(interp,
+ Tcl_ObjPrintf("Could not find control with id %d", id));
+ return TCL_ERROR;
+ }
+ Tcl_DStringInit(&ds);
Tcl_UtfToExternalDString(NULL, Tcl_GetString(objv[4]), -1, &ds);
- result = SendMessageA(control, WM_SETTEXT, 0,
- (LPARAM) Tcl_DStringValue(&ds));
+ result = SendMessageA(control, WM_SETTEXT, 0,
+ (LPARAM) Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
if (result == 0) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to send text to dialog: ", -1));
- AppendSystemError(interp, GetLastError());
- return TCL_ERROR;
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("failed to send text to dialog: ", -1));
+ AppendSystemError(interp, GetLastError());
+ return TCL_ERROR;
}
break;
}
@@ -416,7 +428,7 @@ TestwineventObjCmd(
/*
* testfindwindow title ?class?
- * Find a Windows window using the FindWindowW API call. This takes the window
+ * Find a Windows window using the FindWindow API call. This takes the window
* title and optionally the window class and if found returns the HWND and
* raises an error if the window is not found.
* eg: testfindwindow Console TkTopLevel
@@ -446,9 +458,11 @@ TestfindwindowObjCmd(
return TCL_ERROR;
}
- title = (LPCWSTR)Tcl_WinUtfToTChar(Tcl_GetString(objv[1]), -1, &titleString);
+ Tcl_DStringInit(&titleString);
+ title = Tcl_UtfToWCharDString(Tcl_GetString(objv[1]), -1, &titleString);
if (objc == 3) {
- windowClass = (LPCWSTR)Tcl_WinUtfToTChar(Tcl_GetString(objv[2]), -1, &classString);
+ Tcl_DStringInit(&classString);
+ windowClass = Tcl_UtfToWCharDString(Tcl_GetString(objv[2]), -1, &classString);
}
if (title[0] == 0)
title = NULL;
@@ -475,7 +489,7 @@ TestfindwindowObjCmd(
AppendSystemError(interp, GetLastError());
r = TCL_ERROR;
} else {
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)(((size_t)hwnd) + 1) - 1));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(PTR2INT(hwnd)));
}
Tcl_DStringFree(&titleString);
@@ -491,7 +505,7 @@ EnumChildrenProc(
{
Tcl_Obj *listObj = (Tcl_Obj *) lParam;
- Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewWideIntObj((Tcl_WideInt)(((size_t)hwnd) + 1) - 1));
+ Tcl_ListObjAppendElement(NULL, listObj, Tcl_NewWideIntObj(PTR2INT(hwnd)));
return TRUE;
}
@@ -523,8 +537,8 @@ TestgetwindowinfoObjCmd(
AppendSystemError(interp, GetLastError());
return TCL_ERROR;
} else {
- Tcl_DString ds;
- Tcl_WinTCharToUtf((LPCTSTR)buf, -1, &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(buf, wcslen(buf), &ds);
classObj = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
}
@@ -532,19 +546,20 @@ TestgetwindowinfoObjCmd(
dictObj = Tcl_NewDictObj();
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("class", 5), classObj);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("id", 2),
- Tcl_NewWideIntObj(GetWindowLongPtrW(INT2PTR(hwnd), GWL_ID)));
+ Tcl_NewWideIntObj(GetWindowLongPtr((HWND)(size_t)hwnd, GWL_ID)));
cch = GetWindowTextW(INT2PTR(hwnd), buf, cchBuf);
- Tcl_WinTCharToUtf((LPCTSTR)buf, cch * sizeof (WCHAR), &ds);
+ Tcl_DStringInit(&ds);
+ Tcl_WCharToUtfDString(buf, cch, &ds);
textObj = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("text", 4), textObj);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("parent", 6),
- Tcl_NewWideIntObj((Tcl_WideInt)(((size_t)GetParent((INT2PTR(hwnd)))) + 1) - 1));
+ Tcl_NewWideIntObj(PTR2INT(GetParent((HWND)(size_t)hwnd))));
childrenObj = Tcl_NewListObj(0, NULL);
- EnumChildWindows(INT2PTR(hwnd), EnumChildrenProc, (LPARAM)childrenObj);
+ EnumChildWindows((HWND)(size_t)hwnd, EnumChildrenProc, (LPARAM)childrenObj);
Tcl_DictObjPut(interp, dictObj, Tcl_NewStringObj("children", -1), childrenObj);
Tcl_SetObjResult(interp, dictObj);
@@ -562,7 +577,7 @@ TestwinlocaleObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj((int)GetThreadLocale()));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(GetThreadLocale()));
return TCL_OK;
}
diff --git a/win/tkWinWindow.c b/win/tkWinWindow.c
index 56fc87c..ff916b7 100644
--- a/win/tkWinWindow.c
+++ b/win/tkWinWindow.c
@@ -71,7 +71,7 @@ Tk_AttachHWND(
twdPtr->window.winPtr = (TkWindow *) tkwin;
} else if (twdPtr->window.handle != NULL) {
entryPtr = Tcl_FindHashEntry(&tsdPtr->windowTable,
- (char *)twdPtr->window.handle);
+ twdPtr->window.handle);
Tcl_DeleteHashEntry(entryPtr);
}
@@ -115,7 +115,7 @@ Tk_HWNDToWindow(
Tcl_InitHashTable(&tsdPtr->windowTable, TCL_ONE_WORD_KEYS);
tsdPtr->initialized = 1;
}
- entryPtr = Tcl_FindHashEntry(&tsdPtr->windowTable, (char *) hwnd);
+ entryPtr = Tcl_FindHashEntry(&tsdPtr->windowTable, hwnd);
if (entryPtr != NULL) {
return (Tk_Window) Tcl_GetHashValue(entryPtr);
}
@@ -314,7 +314,7 @@ XDestroyWindow(
TkPointerDeadWindow(winPtr);
- entryPtr = Tcl_FindHashEntry(&tsdPtr->windowTable, (char*)hwnd);
+ entryPtr = Tcl_FindHashEntry(&tsdPtr->windowTable, hwnd);
if (entryPtr != NULL) {
Tcl_DeleteHashEntry(entryPtr);
}
@@ -756,33 +756,6 @@ XChangeWindowAttributes(
/*
*----------------------------------------------------------------------
*
- * XReparentWindow --
- *
- * TODO: currently placeholder to satisfy Xlib stubs.
- *
- * Results:
- * None.
- *
- * Side effects:
- * TODO.
- *
- *----------------------------------------------------------------------
- */
-
-int
-XReparentWindow(
- Display *display,
- Window w,
- Window parent,
- int x,
- int y)
-{
- return BadWindow;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkWinSetWindowPos --
*
* Adjust the stacking order of a window relative to a second window (or
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index bddbe05..e6a0a4b 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -66,7 +66,7 @@ typedef struct ProtocolHandler {
} ProtocolHandler;
#define HANDLER_SIZE(cmdLength) \
- ((unsigned) ((Tk_Offset(ProtocolHandler, command) + 1) + cmdLength))
+ (offsetof(ProtocolHandler, command) + 1 + cmdLength)
/*
* Helper type passed via lParam to TkWmStackorderToplevelEnumProc
@@ -1241,10 +1241,10 @@ ReadIconFromFile(
if (file == NULL) {
return NULL;
}
- Tcl_WinUtfToTChar(file, -1, &ds2);
- Tcl_DStringFree(&ds);
- res = (DWORD *)SHGetFileInfoW((WCHAR *)Tcl_DStringValue(&ds2), 0, &sfiSM,
+ Tcl_DStringInit(&ds2);
+ res = (DWORD *)SHGetFileInfoW(Tcl_UtfToWCharDString(file, -1, &ds2), 0, &sfiSM,
sizeof(SHFILEINFO), SHGFI_SMALLICON|SHGFI_ICON);
+ Tcl_DStringFree(&ds);
if (res != 0) {
SHFILEINFOW sfi;
@@ -1769,7 +1769,7 @@ SetLimits(
HWND hwnd,
MINMAXINFO *info)
{
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
int maxWidth, maxHeight;
int minWidth, minHeight;
int base;
@@ -1905,7 +1905,7 @@ void
TkWmNewWindow(
TkWindow *winPtr) /* Newly-created top-level window. */
{
- register WmInfo *wmPtr = ckalloc(sizeof(WmInfo));
+ WmInfo *wmPtr = ckalloc(sizeof(WmInfo));
/*
* Initialize full structure, then set what isn't NULL
@@ -1990,7 +1990,7 @@ static void
UpdateWrapper(
TkWindow *winPtr) /* Top-level window to redecorate. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
HWND parentHWND, oldWrapper = wmPtr->wrapper;
HWND child, nextHWND, focusHWND;
int x, y, width, height, state;
@@ -2121,7 +2121,8 @@ UpdateWrapper(
*/
tsdPtr->createWindow = winPtr;
- Tcl_WinUtfToTChar(((wmPtr->title != NULL) ?
+ Tcl_DStringInit(&titleString);
+ Tcl_UtfToWCharDString(((wmPtr->title != NULL) ?
wmPtr->title : winPtr->nameUid), -1, &titleString);
wmPtr->wrapper = CreateWindowExW(wmPtr->exStyle,
@@ -2354,7 +2355,7 @@ TkWmMapWindow(
TkWindow *winPtr) /* Top-level window that's about to be
* mapped. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -2580,7 +2581,7 @@ void
TkWmDeadWindow(
TkWindow *winPtr) /* Top-level window that's being deleted. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
WmInfo *wmPtr2;
if (wmPtr == NULL) {
@@ -2594,7 +2595,7 @@ TkWmDeadWindow(
if (winPtr->dispPtr->firstWmPtr == wmPtr) {
winPtr->dispPtr->firstWmPtr = wmPtr->nextPtr;
} else {
- register WmInfo *prevPtr;
+ WmInfo *prevPtr;
for (prevPtr = winPtr->dispPtr->firstWmPtr; ;
prevPtr = prevPtr->nextPtr) {
@@ -2796,7 +2797,7 @@ Tk_WmObjCmd(
WMOPT_WITHDRAW
};
int index;
- size_t length;
+ TkSizeT length;
const char *argv1;
TkWindow *winPtr, **winPtrPtr = &winPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
@@ -2807,8 +2808,7 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
- argv1 = Tcl_GetString(objv[1]);
- length = objv[1]->length;
+ argv1 = TkGetStringFromObj(objv[1], &length);
if ((argv1[0] == 't') && !strncmp(argv1, "tracing", length)
&& (length >= 3)) {
int wmTracing;
@@ -2818,8 +2818,8 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- dispPtr->flags & TK_DISPLAY_WM_TRACING));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+ (dispPtr->flags & TK_DISPLAY_WM_TRACING) != 0));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing) != TCL_OK) {
@@ -2951,7 +2951,7 @@ WmAspectCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int numer1, denom1, numer2, denom2;
if ((objc != 3) && (objc != 7)) {
@@ -2963,10 +2963,10 @@ WmAspectCmd(
if (wmPtr->sizeHintsFlags & PAspect) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->minAspect.x);
- results[1] = Tcl_NewIntObj(wmPtr->minAspect.y);
- results[2] = Tcl_NewIntObj(wmPtr->maxAspect.x);
- results[3] = Tcl_NewIntObj(wmPtr->maxAspect.y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->minAspect.x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->minAspect.y);
+ results[2] = Tcl_NewWideIntObj(wmPtr->maxAspect.x);
+ results[3] = Tcl_NewWideIntObj(wmPtr->maxAspect.y);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -3021,11 +3021,11 @@ WmAttributesCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
LONG style, exStyle, styleBit, *stylePtr = NULL;
const char *string;
int i, boolean;
- size_t length;
+ TkSizeT length;
int config_fullscreen = 0, updatewrapper = 0;
int fullscreen_attr_changed = 0, fullscreen_attr = 0;
@@ -3055,25 +3055,24 @@ WmAttributesCmd(
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-disabled", -1));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewBooleanObj((style & WS_DISABLED)));
+ Tcl_NewWideIntObj((style & WS_DISABLED) != 0));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-fullscreen", -1));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewBooleanObj((wmPtr->flags & WM_FULLSCREEN)));
+ Tcl_NewWideIntObj((wmPtr->flags & WM_FULLSCREEN) != 0));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-toolwindow", -1));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewBooleanObj((exStyle & WS_EX_TOOLWINDOW)));
+ Tcl_NewWideIntObj((exStyle & WS_EX_TOOLWINDOW) != 0));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-topmost", -1));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewBooleanObj((exStyle & WS_EX_TOPMOST)));
+ Tcl_NewWideIntObj((exStyle & WS_EX_TOPMOST) != 0));
Tcl_SetObjResult(interp, objPtr);
return TCL_OK;
}
for (i = 3; i < objc; i += 2) {
- string = Tcl_GetString(objv[i]);
- length = objv[i]->length;
+ string = TkGetStringFromObj(objv[i], &length);
if ((length < 2) || (string[0] != '-')) {
goto configArgs;
}
@@ -3141,9 +3140,8 @@ WmAttributesCmd(
}
wmPtr->alpha = dval;
} else { /* -transparentcolor */
- const char *crefstr = Tcl_GetString(objv[i+1]);
+ const char *crefstr = TkGetStringFromObj(objv[i+1], &length);
- length = objv[i+1]->length;
if (length == 0) {
/* reset to no transparent color */
if (wmPtr->crefObj) {
@@ -3205,8 +3203,8 @@ WmAttributesCmd(
}
if (config_fullscreen) {
if (objc == 4) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- wmPtr->flags & WM_FULLSCREEN));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+ (wmPtr->flags & WM_FULLSCREEN) != 0));
} else {
fullscreen_attr_changed = 1;
fullscreen_attr = boolean;
@@ -3214,7 +3212,7 @@ WmAttributesCmd(
config_fullscreen = 0;
} else if (objc == 4) {
Tcl_SetObjResult(interp,
- Tcl_NewBooleanObj(*stylePtr & styleBit));
+ Tcl_NewWideIntObj((*stylePtr & styleBit) != 0));
} else if (boolean) {
*stylePtr |= styleBit;
} else {
@@ -3319,9 +3317,9 @@ WmClientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- size_t length;
+ TkSizeT length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name?");
@@ -3334,8 +3332,7 @@ WmClientCmd(
}
return TCL_OK;
}
- argv3 = Tcl_GetString(objv[3]);
- length = objv[3]->length;
+ argv3 = TkGetStringFromObj(objv[3], &length);
if (argv3[0] == 0) {
if (wmPtr->clientMachine != NULL) {
ckfree(wmPtr->clientMachine);
@@ -3390,7 +3387,7 @@ WmColormapwindowsCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow **cmapList, *winPtr2, **winPtr2Ptr = &winPtr2;
int i, windowObjc, gotToplevel;
Tcl_Obj **windowObjv, *resultObj;
@@ -3484,7 +3481,7 @@ WmCommandCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
int cmdArgc;
const char **cmdArgv;
@@ -3553,7 +3550,7 @@ WmDeiconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -3605,7 +3602,7 @@ WmFocusmodelCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"active", "passive", NULL
};
@@ -3661,7 +3658,7 @@ WmForgetCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
if (Tk_IsTopLevel(frameWin)) {
Tk_UnmapWindow(frameWin);
@@ -3709,7 +3706,7 @@ WmFrameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
HWND hwnd;
char buf[TCL_INTEGER_SPACE];
@@ -3754,7 +3751,7 @@ WmGeometryCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char xSign, ySign;
int width, height;
const char *argv3;
@@ -3822,7 +3819,7 @@ WmGridCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int reqWidth, reqHeight, widthInc, heightInc;
if ((objc != 3) && (objc != 7)) {
@@ -3834,10 +3831,10 @@ WmGridCmd(
if (wmPtr->sizeHintsFlags & PBaseSize) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->reqGridWidth);
- results[1] = Tcl_NewIntObj(wmPtr->reqGridHeight);
- results[2] = Tcl_NewIntObj(wmPtr->widthInc);
- results[3] = Tcl_NewIntObj(wmPtr->heightInc);
+ results[0] = Tcl_NewWideIntObj(wmPtr->reqGridWidth);
+ results[1] = Tcl_NewWideIntObj(wmPtr->reqGridHeight);
+ results[2] = Tcl_NewWideIntObj(wmPtr->widthInc);
+ results[3] = Tcl_NewWideIntObj(wmPtr->heightInc);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -3920,10 +3917,10 @@ WmGroupCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
const char *argv3;
- size_t length;
+ TkSizeT length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?pathName?");
@@ -3935,8 +3932,7 @@ WmGroupCmd(
}
return TCL_OK;
}
- argv3 = Tcl_GetString(objv[3]);
- length = objv[3]->length;
+ argv3 = TkGetStringFromObj(objv[3], &length);
if (*argv3 == '\0') {
wmPtr->hints.flags &= ~WindowGroupHint;
if (wmPtr->leaderName != NULL) {
@@ -3984,7 +3980,7 @@ WmIconbitmapCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow *useWinPtr = winPtr; /* window to apply to (NULL if -default) */
const char *string;
@@ -4120,7 +4116,7 @@ WmIconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
return TCL_ERROR;
@@ -4185,7 +4181,7 @@ WmIconmaskCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
const char *argv3;
@@ -4243,9 +4239,9 @@ WmIconnameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- size_t length;
+ TkSizeT length;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?");
@@ -4259,8 +4255,7 @@ WmIconnameCmd(
if (wmPtr->iconName != NULL) {
ckfree(wmPtr->iconName);
}
- argv3 = Tcl_GetString(objv[3]);
- length = objv[3]->length;
+ argv3 = TkGetStringFromObj(objv[3], &length);
wmPtr->iconName = ckalloc(length + 1);
memcpy(wmPtr->iconName, argv3, length + 1);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
@@ -4488,7 +4483,7 @@ WmIconpositionCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y;
if ((objc != 3) && (objc != 5)) {
@@ -4499,8 +4494,8 @@ WmIconpositionCmd(
if (wmPtr->hints.flags & IconPositionHint) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewIntObj(wmPtr->hints.icon_x);
- results[1] = Tcl_NewIntObj(wmPtr->hints.icon_y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->hints.icon_x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->hints.icon_y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
}
return TCL_OK;
@@ -4544,7 +4539,7 @@ WmIconwindowCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
WmInfo *wmPtr2;
XSetWindowAttributes atts;
@@ -4654,8 +4649,8 @@ WmManageCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!Tk_IsTopLevel(frameWin)) {
if (!Tk_IsManageable(frameWin)) {
@@ -4708,7 +4703,7 @@ WmMaxsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -4719,8 +4714,8 @@ WmMaxsizeCmd(
Tcl_Obj *results[2];
GetMaxSize(wmPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -4759,7 +4754,7 @@ WmMinsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -4770,8 +4765,8 @@ WmMinsizeCmd(
Tcl_Obj *results[2];
GetMinSize(wmPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -4810,7 +4805,7 @@ WmOverrideredirectCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int boolean, curValue;
XSetWindowAttributes atts;
@@ -4830,7 +4825,7 @@ WmOverrideredirectCmd(
curValue = Tk_Attributes((Tk_Window) winPtr)->override_redirect;
}
if (objc == 3) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(curValue));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(curValue != 0));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[3], &boolean) != TCL_OK) {
@@ -4882,7 +4877,7 @@ WmPositionfromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL
};
@@ -4950,11 +4945,11 @@ WmProtocolCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
- register ProtocolHandler *protPtr, *prevPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
+ ProtocolHandler *protPtr, *prevPtr;
Atom protocol;
const char *cmd;
- size_t cmdLength;
+ TkSizeT cmdLength;
Tcl_Obj *resultObj;
if ((objc < 3) || (objc > 5)) {
@@ -5009,8 +5004,7 @@ WmProtocolCmd(
break;
}
}
- cmd = Tcl_GetString(objv[4]);
- cmdLength = objv[4]->length;
+ cmd = TkGetStringFromObj(objv[4], &cmdLength);
if (cmdLength > 0) {
protPtr = ckalloc(HANDLER_SIZE(cmdLength));
protPtr->protocol = protocol;
@@ -5047,7 +5041,7 @@ WmResizableCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -5057,8 +5051,8 @@ WmResizableCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
- results[1] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
+ results[0] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
+ results[1] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -5109,7 +5103,7 @@ WmSizefromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL
};
@@ -5276,7 +5270,7 @@ WmStackorderCmd(
} else { /* OPT_ISBELOW */
result = index1 < index2;
}
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result));
return TCL_OK;
}
}
@@ -5306,7 +5300,7 @@ WmStateCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", "zoomed", NULL
};
@@ -5446,9 +5440,9 @@ WmTitleCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- size_t length;
+ TkSizeT length;
HWND wrapper;
if (objc > 4) {
@@ -5468,7 +5462,8 @@ WmTitleCmd(
int size = 256;
GetWindowTextW(wrapper, buf, size);
- Tcl_WinTCharToUtf((LPCTSTR)buf, -1, &titleString);
+ Tcl_DStringInit(&titleString);
+ Tcl_WCharToUtfDString(buf, wcslen(buf), &titleString);
Tcl_SetObjResult(interp, Tcl_NewStringObj(
Tcl_DStringValue(&titleString),
Tcl_DStringLength(&titleString)));
@@ -5481,15 +5476,15 @@ WmTitleCmd(
if (wmPtr->title != NULL) {
ckfree(wmPtr->title);
}
- argv3 = Tcl_GetString(objv[3]);
- length = objv[3]->length;
+ argv3 = TkGetStringFromObj(objv[3], &length);
wmPtr->title = ckalloc(length + 1);
memcpy(wmPtr->title, argv3, length + 1);
if (!(wmPtr->flags & WM_NEVER_MAPPED) && wmPtr->wrapper != NULL) {
Tcl_DString titleString;
- Tcl_WinUtfToTChar(wmPtr->title, -1, &titleString);
+ Tcl_DStringInit(&titleString);
+ Tcl_UtfToWCharDString(wmPtr->title, -1, &titleString);
SetWindowTextW(wrapper, (LPCWSTR) Tcl_DStringValue(&titleString));
Tcl_DStringFree(&titleString);
}
@@ -5522,7 +5517,7 @@ WmTransientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow *masterPtr = wmPtr->masterPtr, **masterPtrPtr = &masterPtr, *w;
WmInfo *wmPtr2;
@@ -5650,7 +5645,7 @@ WmWithdrawCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
@@ -5762,7 +5757,7 @@ Tk_SetGrid(
* of one grid unit. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
/*
* Ensure widthInc and heightInc are greater than 0
@@ -5859,7 +5854,7 @@ Tk_UnsetGrid(
* controlling gridding. */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr;
+ WmInfo *wmPtr;
/*
* Find the top-level window for tkwin, plus the window manager
@@ -5918,7 +5913,7 @@ TopLevelEventProc(
ClientData clientData, /* Window for which event occurred. */
XEvent *eventPtr) /* Event that just happened. */
{
- register TkWindow *winPtr = clientData;
+ TkWindow *winPtr = clientData;
if (eventPtr->type == DestroyNotify) {
Tk_ErrorHandler handler;
@@ -6009,8 +6004,8 @@ UpdateGeometryInfo(
int width, height; /* Size of client area. */
int min, max;
RECT rect;
- register TkWindow *winPtr = clientData;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ TkWindow *winPtr = clientData;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
wmPtr->flags &= ~WM_UPDATE_PENDING;
@@ -6290,10 +6285,10 @@ ParseGeometry(
TkWindow *winPtr) /* Pointer to top-level window whose geometry
* is to be changed. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y, width, height, flags;
char *end;
- register const char *p = string;
+ const char *p = string;
/*
* The leading "=" is optional.
@@ -6422,7 +6417,7 @@ Tk_GetRootCoords(
int *xPtr, /* Where to store x-displacement of (0,0). */
int *yPtr) /* Where to store y-displacement of (0,0). */
{
- register TkWindow *winPtr = (TkWindow *) tkwin;
+ TkWindow *winPtr = (TkWindow *) tkwin;
/*
* If the window is mapped, let Windows figure out the translation.
@@ -6551,7 +6546,7 @@ Tk_MoveToplevelWindow(
int x, int y) /* New location for window (within parent). */
{
TkWindow *winPtr = (TkWindow *) tkwin;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!(winPtr->flags & TK_TOP_LEVEL)) {
Tcl_Panic("Tk_MoveToplevelWindow called with non-toplevel window");
@@ -6602,7 +6597,7 @@ TkWmProtocolEventProc(
XEvent *eventPtr) /* X event. */
{
WmInfo *wmPtr;
- register ProtocolHandler *protPtr;
+ ProtocolHandler *protPtr;
Atom protocol;
int result;
Tcl_Interp *interp;
@@ -6678,7 +6673,7 @@ TkWmStackorderToplevelEnumProc(
/*fprintf(stderr, "Looking up HWND %d\n", hwnd);*/
- hPtr = Tcl_FindHashEntry(pair->table, (char *) hwnd);
+ hPtr = Tcl_FindHashEntry(pair->table, hwnd);
if (hPtr != NULL) {
childWinPtr = Tcl_GetHashValue(hPtr);
@@ -8355,7 +8350,7 @@ void
TkWinSetForegroundWindow(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (wmPtr->wrapper != NULL) {
SetForegroundWindow(wmPtr->wrapper);
@@ -8385,7 +8380,7 @@ void
TkpWinToplevelWithDraw(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
wmPtr->flags |= WM_WITHDRAWN;
TkpWmSetState(winPtr, WithdrawnState);
@@ -8436,7 +8431,7 @@ void
TkpWinToplevelDeiconify(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
wmPtr->flags &= ~WM_WITHDRAWN;
@@ -8504,7 +8499,7 @@ long
TkpWinToplevelIsControlledByWm(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!wmPtr) {
return 0;
@@ -8534,7 +8529,7 @@ TkpWinToplevelMove(
TkWindow *winPtr,
int x, int y)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (wmPtr && x >= 0 && y >= 0 && !TkpWinToplevelIsControlledByWm(winPtr)) {
Tk_MoveToplevelWindow((Tk_Window) winPtr, x, y);
@@ -8566,7 +8561,7 @@ TkpWinToplevelOverrideRedirect(
int reqValue)
{
int curValue;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
curValue = Tk_Attributes((Tk_Window) winPtr)->override_redirect;
if (reqValue < 0) {
@@ -8613,7 +8608,7 @@ void
TkpWinToplevelDetachWindow(
TkWindow *winPtr)
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (winPtr->flags & TK_EMBEDDED) {
int state = SendMessageW(wmPtr->wrapper, TK_STATE, -1, -1) - 1;
diff --git a/win/tkWinX.c b/win/tkWinX.c
index d2af130..7b2d004 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -13,16 +13,6 @@
#include "tkWinInt.h"
-/*
- * The w32api 1.1 package (included in Mingw 1.1) does not define _WIN32_IE by
- * default. Define it here to gain access to the InitCommonControlsEx API in
- * commctrl.h.
- */
-
-#ifndef _WIN32_IE
-#define _WIN32_IE 0x0550 /* IE 5.5 */
-#endif
-
#include <commctrl.h>
#ifdef _MSC_VER
# pragma comment (lib, "comctl32.lib")
@@ -70,7 +60,6 @@ static const char winScreenName[] = ":0"; /* Default name of windows display. */
static HINSTANCE tkInstance = NULL; /* Application instance handle. */
static int childClassInitialized; /* Registered child class? */
static WNDCLASSW childClass; /* Window class for child windows. */
-static int tkPlatformId = 0; /* version of Windows platform */
static int tkWinTheme = 0; /* See TkWinGetPlatformTheme */
static Tcl_Encoding keyInputEncoding = NULL;
/* The current character encoding for
@@ -278,7 +267,7 @@ TkWinXInit(
* Make sure we cleanup on finalize.
*/
- TkCreateExitHandler(TkWinXCleanup, (ClientData) hInstance);
+ TkCreateExitHandler(TkWinXCleanup, hInstance);
}
/*
@@ -301,7 +290,7 @@ void
TkWinXCleanup(
ClientData clientData)
{
- HINSTANCE hInstance = (HINSTANCE) clientData;
+ HINSTANCE hInstance = clientData;
/*
* Clean up our own class.
@@ -328,33 +317,26 @@ TkWinXCleanup(
/*
*----------------------------------------------------------------------
*
- * TkWinGetPlatformId --
+ * TkWinGetPlatformTheme --
*
- * Determines whether running under NT, 95, or Win32s, to allow runtime
- * conditional code. Win32s is no longer supported.
+ * Return the Windows drawing style we should be using.
*
* Results:
* The return value is one of:
- * VER_PLATFORM_WIN32s Win32s on Windows 3.1 (not supported)
- * VER_PLATFORM_WIN32_WINDOWS Win32 on Windows 95, 98, ME (not supported)
- * VER_PLATFORM_WIN32_NT Win32 on Windows XP, Vista, Windows 7, Windows 8
- * VER_PLATFORM_WIN32_CE Win32 on Windows CE
- *
- * Side effects:
- * None.
+ * TK_THEME_WIN_CLASSIC 95/98/NT or XP in classic mode
+ * TK_THEME_WIN_XP XP not in classic mode
*
*----------------------------------------------------------------------
*/
int
-TkWinGetPlatformId(void)
+TkWinGetPlatformTheme(void)
{
- if (tkPlatformId == 0) {
+ if (tkWinTheme == 0) {
OSVERSIONINFOW os;
os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
GetVersionExW(&os);
- tkPlatformId = os.dwPlatformId;
/*
* Set tkWinTheme to be TK_THEME_WIN_XP or TK_THEME_WIN_CLASSIC. The
@@ -362,8 +344,7 @@ TkWinGetPlatformId(void)
* windows classic theme was selected.
*/
- if ((os.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
- (os.dwMajorVersion == 5 && os.dwMinorVersion == 1)) {
+ if ((os.dwMajorVersion == 5 && os.dwMinorVersion == 1)) {
HKEY hKey;
LPCWSTR szSubKey = L"Control Panel\\Appearance";
LPCWSTR szCurrent = L"Current";
@@ -387,33 +368,6 @@ TkWinGetPlatformId(void)
tkWinTheme = TK_THEME_WIN_CLASSIC;
}
}
- return tkPlatformId;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TkWinGetPlatformTheme --
- *
- * Return the Windows drawing style we should be using.
- *
- * Results:
- * The return value is one of:
- * TK_THEME_WIN_CLASSIC 95/98/NT or XP in classic mode
- * TK_THEME_WIN_XP XP not in classic mode
- *
- * Side effects:
- * Could invoke TkWinGetPlatformId.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TkWinGetPlatformTheme(void)
-{
- if (tkPlatformId == 0) {
- TkWinGetPlatformId();
- }
return tkWinTheme;
}
@@ -633,6 +587,11 @@ TkpOpenDisplay(
*/
TkpInitKeymapInfo(tsdPtr->winDisplay);
+ /*
+ * Key map info must be available immediately, because of "send event".
+ */
+ TkpInitKeymapInfo(tsdPtr->winDisplay);
+
return tsdPtr->winDisplay;
}
@@ -676,7 +635,7 @@ TkpCloseDisplay(
ckfree(display->screens->root_visual);
}
if (display->screens->root != None) {
- ckfree(display->screens->root);
+ ckfree((char *)display->screens->root);
}
if (display->screens->cmap != None) {
XFreeColormap(display, display->screens->cmap);
@@ -716,7 +675,7 @@ TkClipCleanup(
dispPtr->windowAtom);
Tk_DestroyWindow(dispPtr->clipWindow);
- Tcl_Release((ClientData) dispPtr->clipWindow);
+ Tcl_Release(dispPtr->clipWindow);
dispPtr->clipWindow = NULL;
}
}
@@ -1360,7 +1319,7 @@ GenerateXEvent(
* GetState --
*
* This function constructs a state mask for the mouse buttons and
- * modifier keys as they were before the event occured.
+ * modifier keys as they were before the event occurred.
*
* Results:
* Returns a composite value of all the modifier and button state flags
@@ -1720,30 +1679,6 @@ HandleIMEComposition(
/*
*----------------------------------------------------------------------
*
- * Tk_FreeXId --
- *
- * This interface is not needed under Windows.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tk_FreeXId(
- Display *display,
- XID xid)
-{
- /* Do nothing */
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TkWinResendEvent --
*
* This function converts an X event into a Windows event and invokes the
@@ -1981,8 +1916,8 @@ Tk_SetCaretPos(
* Return the number of milliseconds the user was inactive.
*
* Results:
- * Milliseconds of user inactive time or -1 if the user32.dll doesn't
- * have the symbol GetLastInputInfo or GetLastInputInfo returns an error.
+ * Milliseconds of user inactive time or -1 if GetLastInputInfo
+ * returns an error.
*
* Side effects:
* None.
@@ -1997,7 +1932,7 @@ Tk_GetUserInactiveTime(
LASTINPUTINFO li;
li.cbSize = sizeof(li);
- if (!(BOOL)GetLastInputInfo(&li)) {
+ if (!GetLastInputInfo(&li)) {
return -1;
}
@@ -2019,7 +1954,7 @@ Tk_GetUserInactiveTime(
* none
*
* Side effects:
- * The user inactivity timer of the underlaying windowing system is reset
+ * The user inactivity timer of the underlying windowing system is reset
* to zero.
*
*----------------------------------------------------------------------
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c
index ae026b3..dff44e6 100644
--- a/win/ttkWinMonitor.c
+++ b/win/ttkWinMonitor.c
@@ -152,7 +152,7 @@ MODULE_SCOPE int Ttk_WinPlatformInit(Tcl_Interp *interp)
HWND hwnd;
hwnd = CreateThemeMonitorWindow(Tk_GetHINSTANCE(), interp);
- Ttk_RegisterCleanup(interp, (ClientData)hwnd, DestroyThemeMonitorWindow);
+ Ttk_RegisterCleanup(interp, hwnd, DestroyThemeMonitorWindow);
TtkWinTheme_Init(interp, hwnd);
TtkXPTheme_Init(interp, hwnd);
diff --git a/win/ttkWinTheme.c b/win/ttkWinTheme.c
index 63e9704..ad3c94e 100644
--- a/win/ttkWinTheme.c
+++ b/win/ttkWinTheme.c
@@ -188,7 +188,7 @@ typedef struct {
} BorderElement;
static Ttk_ElementOptionSpec BorderElementOptions[] = {
- { "-relief",TK_OPTION_RELIEF,Tk_Offset(BorderElement,reliefObj), "flat" },
+ { "-relief",TK_OPTION_RELIEF, offsetof(BorderElement,reliefObj), "flat" },
{NULL, 0, 0, NULL}
};
@@ -239,7 +239,7 @@ typedef struct {
static Ttk_ElementOptionSpec FieldElementOptions[] = {
{ "-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(FieldElement,backgroundObj), "white" },
+ offsetof(FieldElement,backgroundObj), "white" },
{ NULL, 0, 0, NULL }
};
@@ -290,11 +290,11 @@ typedef struct {
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] = {
{ "-relief",TK_OPTION_RELIEF,
- Tk_Offset(ButtonBorderElement,reliefObj), "flat" },
+ offsetof(ButtonBorderElement,reliefObj), "flat" },
{ "-highlightcolor",TK_OPTION_COLOR,
- Tk_Offset(ButtonBorderElement,highlightColorObj), "black" },
+ offsetof(ButtonBorderElement,highlightColorObj), "black" },
{ "-default", TK_OPTION_ANY,
- Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" },
+ offsetof(ButtonBorderElement,defaultStateObj), "disabled" },
{NULL, 0, 0, NULL}
};
@@ -418,7 +418,7 @@ typedef struct {
static Ttk_ElementOptionSpec FillFocusElementOptions[] = {
{ "-focusfill", TK_OPTION_COLOR,
- Tk_Offset(FillFocusElement,fillColorObj), "white" },
+ offsetof(FillFocusElement,fillColorObj), "white" },
{NULL, 0, 0, NULL}
};
@@ -542,7 +542,7 @@ typedef struct {
} ThumbElement;
static Ttk_ElementOptionSpec ThumbElementOptions[] = {
- { "-orient", TK_OPTION_ANY,Tk_Offset(ThumbElement,orientObj),"horizontal"},
+ { "-orient", TK_OPTION_ANY, offsetof(ThumbElement,orientObj),"horizontal"},
{ NULL, 0, 0, NULL }
};
@@ -598,7 +598,7 @@ typedef struct {
} SliderElement;
static Ttk_ElementOptionSpec SliderElementOptions[] = {
- { "-orient", TK_OPTION_ANY, Tk_Offset(SliderElement,orientObj),
+ { "-orient", TK_OPTION_ANY, offsetof(SliderElement,orientObj),
"horizontal" },
{ NULL, 0, 0, NULL }
};
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 1375bb6..8a97852 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -15,14 +15,12 @@
* shellcc/platform/commctls/userex/refentry.asp >
*/
+#include <tkWinInt.h>
#ifndef HAVE_UXTHEME_H
/* Stub for platforms that lack the XP theme API headers: */
-#include <tkWinInt.h>
int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) { return TCL_OK; }
#else
-#define WINVER 0x0501 /* Requires Windows XP APIs */
-
#include <windows.h>
#include <uxtheme.h>
#if defined(HAVE_VSSYM32_H) || _MSC_VER > 1500
@@ -31,8 +29,6 @@ int TtkXPTheme_Init(Tcl_Interp *interp, HWND hwnd) { return TCL_OK; }
# include <tmschema.h>
#endif
-#include <tkWinInt.h>
-
#include "ttk/ttkTheme.h"
typedef HTHEME (STDAPICALLTYPE OpenThemeDataProc)(HWND hwnd,
@@ -432,8 +428,8 @@ static void DestroyElementData(void *clientData)
ElementData *elementData = clientData;
if (elementData->info->flags & HEAP_ELEMENT) {
ckfree(elementData->info->statemap);
- ckfree(elementData->info->className);
- ckfree(elementData->info->elementName);
+ ckfree((char *)elementData->info->className);
+ ckfree((char *)elementData->info->elementName);
ckfree(elementData->info);
}
ckfree(clientData);
@@ -815,9 +811,9 @@ typedef struct
static Ttk_ElementOptionSpec TextElementOptions[] =
{
{ "-text", TK_OPTION_STRING,
- Tk_Offset(TextElement,textObj), "" },
+ offsetof(TextElement,textObj), "" },
{ "-font", TK_OPTION_FONT,
- Tk_Offset(TextElement,fontObj), DEFAULT_FONT },
+ offsetof(TextElement,fontObj), DEFAULT_FONT },
{ NULL }
};
@@ -830,20 +826,20 @@ static void TextElementSize(
RECT rc = {0, 0};
HRESULT hr = S_OK;
const char *src;
- int len;
+ TkSizeT len;
Tcl_DString ds;
if (!InitElementData(elementData, tkwin, 0))
return;
- src = Tcl_GetStringFromObj(element->textObj, &len);
- Tcl_WinUtfToTChar(src, len, &ds);
+ src = TkGetStringFromObj(element->textObj, &len);
+ Tcl_DStringInit(&ds);
hr = elementData->procs->GetThemeTextExtent(
elementData->hTheme,
elementData->hDC,
elementData->info->partId,
Ttk_StateTableLookup(elementData->info->statemap, 0),
- (WCHAR *) Tcl_DStringValue(&ds),
+ Tcl_UtfToWCharDString(src, len, &ds),
-1,
DT_LEFT,// | DT_BOTTOM | DT_NOPREFIX,
NULL,
@@ -869,20 +865,20 @@ static void TextElementDraw(
RECT rc = BoxToRect(b);
HRESULT hr = S_OK;
const char *src;
- int len;
+ TkSizeT len;
Tcl_DString ds;
if (!InitElementData(elementData, tkwin, d))
return;
- src = Tcl_GetStringFromObj(element->textObj, &len);
- Tcl_WinUtfToTChar(src, len, &ds);
+ src = TkGetStringFromObj(element->textObj, &len);
+ Tcl_DStringInit(&ds);
hr = elementData->procs->DrawThemeText(
elementData->hTheme,
elementData->hDC,
elementData->info->partId,
Ttk_StateTableLookup(elementData->info->statemap, state),
- (WCHAR *) Tcl_DStringValue(&ds),
+ Tcl_UtfToWCharDString(src, len, &ds),
-1,
DT_LEFT,// | DT_BOTTOM | DT_NOPREFIX,
(state & TTK_STATE_DISABLED) ? DTT_GRAYED : 0,
@@ -1120,13 +1116,13 @@ Ttk_CreateVsapiElement(
Ttk_StateTable *stateTable;
Ttk_Padding pad = {0, 0, 0, 0};
int flags = 0;
- int length = 0;
+ TkSizeT length = 0;
char *name;
LPWSTR wname;
Ttk_ElementSpec *elementSpec = &GenericElementSpec;
Tcl_DString classBuf;
- static const char *optionStrings[] =
+ static const char *const optionStrings[] =
{ "-padding","-width","-height","-margins", "-syssize",
"-halfheight", "-halfwidth", NULL };
enum { O_PADDING, O_WIDTH, O_HEIGHT, O_MARGINS, O_SYSSIZE,
@@ -1142,8 +1138,9 @@ Ttk_CreateVsapiElement(
if (Tcl_GetIntFromObj(interp, objv[1], &partId) != TCL_OK) {
return TCL_ERROR;
}
- name = Tcl_GetStringFromObj(objv[0], &length);
- className = (LPCWSTR) Tcl_WinUtfToTChar(name, length, &classBuf);
+ name = TkGetStringFromObj(objv[0], &length);
+ Tcl_DStringInit(&classBuf);
+ className = Tcl_UtfToWCharDString(name, length, &classBuf);
/* flags or padding */
if (objc > 3) {
diff --git a/win/winMain.c b/win/winMain.c
index 62bcbd8..f1d671f 100644
--- a/win/winMain.c
+++ b/win/winMain.c
@@ -145,6 +145,9 @@ _tWinMain(
#ifdef TK_LOCAL_MAIN_HOOK
TK_LOCAL_MAIN_HOOK(&argc, &argv);
+#elif defined(UNICODE) && ((TCL_MAJOR_VERSION > 8) || (TCL_MINOR_VERSION > 6))
+ /* This doesn't work on Windows without UNICODE, neither does it work with Tcl 8.6 */
+ TclZipfs_AppHook(&argc, &argv);
#endif
Tk_Main(argc, argv, TK_LOCAL_APPINIT);
diff --git a/xlib/X11/X.h b/xlib/X11/X.h
index c2c57af..0e2d152 100644
--- a/xlib/X11/X.h
+++ b/xlib/X11/X.h
@@ -1,15 +1,34 @@
-/*
- * $XConsortium: X.h,v 1.66 88/09/06 15:55:56 jim Exp $
- */
-
/* Definitions for the X window system likely to be used by applications */
#ifndef X_H
#define X_H
/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -17,7 +36,7 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
+supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
@@ -30,14 +49,10 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+
#define X_PROTOCOL 11 /* current protocol version */
#define X_PROTOCOL_REVISION 0 /* current minor version */
-#if defined(MAC_OSX_TK)
-# define Cursor XCursor
-# define Region XRegion
-#endif
-
/* Resources */
#ifdef _WIN64
@@ -48,7 +63,10 @@ typedef unsigned long XID;
typedef XID Window;
typedef XID Drawable;
+#ifndef _XTYPEDEF_FONT
+# define _XTYPEDEF_FONT
typedef XID Font;
+#endif
typedef XID Pixmap;
typedef XID Cursor;
typedef XID Colormap;
@@ -63,7 +81,7 @@ typedef unsigned long VisualID;
typedef unsigned long Time;
-typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
+typedef unsigned int KeyCode; /* In order to use IME, the Macintosh needs
* to pack 3 bytes into the keyCode field in
* the XEvent. In the real X.h, a KeyCode is
* defined as a short, which wouldn't be big
@@ -73,9 +91,7 @@ typedef unsigned long KeyCode; /* In order to use IME, the Macintosh needs
* RESERVED RESOURCE AND CONSTANT DEFINITIONS
*****************************************************************/
-#ifndef _WIN32
-# define None 0L /* See bug [9e31fd9449] and below */
-#endif
+/* #define None 0L See bug [9e31fd9449] and below */
#define ParentRelative 1L /* background pixmap in CreateWindow
and ChangeWindowAttributes */
@@ -173,7 +189,8 @@ are reserved in the protocol for errors and replies. */
#define ColormapNotify 32
#define ClientMessage 33
#define MappingNotify 34
-#define LASTEvent 35 /* must be bigger than any event # */
+#define GenericEvent 35
+#define LASTEvent 36 /* must be bigger than any event # */
/* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
@@ -181,9 +198,7 @@ are reserved in the protocol for errors and replies. */
#define ShiftMask (1<<0)
#define LockMask (1<<1)
-#ifndef _WIN32
-# define ControlMask (1<<2) /* See bug [9e31fd9449] and below */
-#endif
+/* #define ControlMask (1<<2) See bug [9e31fd9449] and below */
#define Mod1Mask (1<<3)
#define Mod2Mask (1<<4)
#define Mod3Mask (1<<5)
@@ -191,9 +206,7 @@ are reserved in the protocol for errors and replies. */
#define Mod5Mask (1<<7)
/* See bug [9e31fd9449], this way prevents conflicts with Win32 headers */
-#ifdef _WIN32
enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
-#endif
/* modifier names. Used to build a SetModifierMapping request or
to read a GetModifierMapping request. These correspond to the
@@ -263,9 +276,13 @@ enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
/* protocol families */
-#define FamilyInternet 0
+#define FamilyInternet 0 /* IPv4 */
#define FamilyDECnet 1
#define FamilyChaos 2
+#define FamilyInternet6 6 /* IPv6 */
+
+/* authentication families not tied to a specific protocol */
+#define FamilyServerInterpreted 5
/* Property notification */
@@ -678,9 +695,4 @@ enum _Bug9e31fd9449 { None = 0, ControlMask = (1<<2) };
#define LSBFirst 0
#define MSBFirst 1
-#if defined(MAC_OSX_TK)
-# undef Cursor
-# undef Region
-#endif
-
#endif /* X_H */
diff --git a/xlib/X11/Xfuncproto.h b/xlib/X11/Xfuncproto.h
index 6d63002..89bc96f 100644
--- a/xlib/X11/Xfuncproto.h
+++ b/xlib/X11/Xfuncproto.h
@@ -1,16 +1,26 @@
-/* $XConsortium: Xfuncproto.h,v 1.7 91/05/13 20:49:21 rws Exp $ */
/*
- * Copyright 1989, 1991 by the Massachusetts Institute of Technology
*
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of M.I.T. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
+Copyright 1989, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
*
*/
@@ -24,7 +34,7 @@
#endif /* NeedFunctionPrototypes */
#ifndef NeedVarargsPrototypes
-#define NeedVarargsPrototypes 0
+#define NeedVarargsPrototypes 1
#endif /* NeedVarargsPrototypes */
#if NeedFunctionPrototypes
@@ -37,6 +47,15 @@
#define _Xconst const
#endif /* _Xconst */
+/* Function prototype configuration (see configure for more info) */
+#if !defined(NARROWPROTO) && \
+ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
+#define NARROWPROTO
+#endif
+#ifndef FUNCPROTO
+#define FUNCPROTO 15
+#endif
+
#ifndef NeedWidePrototypes
#ifdef NARROWPROTO
#define NeedWidePrototypes 0
@@ -47,14 +66,156 @@
#endif /* NeedFunctionPrototypes */
-#ifdef __cplusplus
-#define _XFUNCPROTOBEGIN extern "C" {
-#define _XFUNCPROTOEND }
-#endif
-
#ifndef _XFUNCPROTOBEGIN
+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
+#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
+#define _XFUNCPROTOEND }
+#else
#define _XFUNCPROTOBEGIN
#define _XFUNCPROTOEND
+#endif
#endif /* _XFUNCPROTOBEGIN */
+/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+#ifndef __has_feature
+# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+#ifndef __has_extension
+# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4))
+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
+#else
+# define _X_SENTINEL(x)
+#endif /* GNUC >= 4 */
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \
+ && !defined(__CYGWIN__) && !defined(__MINGW32__)
+# define _X_EXPORT __attribute__((visibility("default")))
+# define _X_HIDDEN __attribute__((visibility("hidden")))
+# define _X_INTERNAL __attribute__((visibility("internal")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define _X_EXPORT __global
+# define _X_HIDDEN __hidden
+# define _X_INTERNAL __hidden
+#else /* not gcc >= 4 and not Sun Studio >= 8 */
+# define _X_EXPORT
+# define _X_HIDDEN
+# define _X_INTERNAL
+#endif /* GNUC >= 4 */
+
+/* Branch prediction hints for individual conditionals */
+/* requires xproto >= 7.0.9 */
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
+#else /* not gcc >= 3.3 */
+# define _X_LIKELY(x) (x)
+# define _X_UNLIKELY(x) (x)
+#endif
+
+/* Bulk branch prediction hints via marking error path functions as "cold" */
+/* requires xproto >= 7.0.25 */
+#if __has_attribute(__cold__) || \
+ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */
+# define _X_COLD __attribute__((__cold__))
+#else
+# define _X_COLD /* nothing */
+#endif
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(deprecated) \
+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130))
+# define _X_DEPRECATED __attribute__((deprecated))
+#else /* not gcc >= 3.1 */
+# define _X_DEPRECATED
+#endif
+
+/* requires xproto >= 7.0.30 */
+#if __has_extension(attribute_deprecated_with_message) || \
+ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))
+# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg)))
+#else
+# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED
+#endif
+
+/* requires xproto >= 7.0.17 */
+#if __has_attribute(noreturn) \
+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define _X_NORETURN __attribute((noreturn))
+#else
+# define _X_NORETURN
+#endif /* GNUC */
+
+/* Added in X11R6.9, so available in any version of modular xproto */
+#if __has_attribute(__format__) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
+#else /* not gcc >= 2.3 */
+# define _X_ATTRIBUTE_PRINTF(x,y)
+#endif
+
+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as
+ many legacy X clients are compiled in C89 mode still. */
+#if __has_attribute(nonnull) \
+ && defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
+#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
+#elif __has_attribute(nonnull) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
+#define _X_NONNULL(args...) __attribute__((nonnull(args)))
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
+#define _X_NONNULL(...) /* */
+#endif
+
+/* requires xproto >= 7.0.22 */
+#if __has_attribute(__unused__) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
+#define _X_UNUSED __attribute__((__unused__))
+#else
+#define _X_UNUSED /* */
+#endif
+
+/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.9
+ (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
+#if defined(inline) /* assume autoconf set it correctly */ || \
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \
+ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
+# define _X_INLINE inline
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+# define _X_INLINE __inline__
+#else
+# define _X_INLINE
+#endif
+
+/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
+/* requires xproto >= 7.0.21 */
+#ifndef _X_RESTRICT_KYWD
+# if defined(restrict) /* assume autoconf set it correctly */ || \
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \
+ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */
+# define _X_RESTRICT_KYWD restrict
+# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
+# define _X_RESTRICT_KYWD __restrict__
+# else
+# define _X_RESTRICT_KYWD
+# endif
+#endif
+
+/* requires xproto >= 7.0.30 */
+#if __has_attribute(no_sanitize_thread)
+# define _X_NOTSAN __attribute__((no_sanitize_thread))
+#else
+# define _X_NOTSAN
+#endif
+
#endif /* _XFUNCPROTO_H_ */
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h
index af8f706..2db3f10 100644
--- a/xlib/X11/Xlib.h
+++ b/xlib/X11/Xlib.h
@@ -1,20 +1,28 @@
-/* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
/*
- * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of M.I.T. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * X Window System is a Trademark of MIT.
- *
- */
+
+Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
/*
@@ -22,35 +30,64 @@
* interface library (Xlib) to the X Window System Protocol (V11).
* Structures and symbols starting with "_" are private to the library.
*/
-#ifndef _XLIB_H_
-#define _XLIB_H_
+#ifndef _X11_XLIB_H_
+#define _X11_XLIB_H_
-#define XlibSpecificationRelease 5
+#define XlibSpecificationRelease 6
-#if !defined(MAC_OSX_TK)
-# include <X11/X.h>
-#endif
-#ifdef MAC_OSX_TK
-# include <X11/X.h>
-# define Cursor XCursor
-# define Region XRegion
+#include <sys/types.h>
+
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <stdint.h>
#endif
+#include <X11/X.h>
+
/* applications should not depend on these two headers being included! */
#include <X11/Xfuncproto.h>
#ifndef X_WCHAR
-#ifdef X_NOT_STDC_ENV
-#define X_WCHAR
-#endif
-#endif
-
-#ifndef X_WCHAR
#include <stddef.h>
#else
+#ifdef __UNIXOS2__
+#include <stdlib.h>
+#else
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;
#endif
+#endif
+
+#ifndef EXTERN
+# define EXTERN extern TCL_STORAGE_CLASS
+#endif
+#if defined(STATIC_BUILD) || !defined(_WIN32)
+# ifndef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS
+# endif
+#elif defined(BUILD_tk)
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS __declspec(dllexport)
+#elif !defined(TCL_STORAGE_CLASS)
+# define TCL_STORAGE_CLASS __declspec(dllimport)
+#endif
+
+EXTERN int
+_Xmblen(
+ char *str,
+ int len
+ );
+
+/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
+ November 2000. Its presence is indicated through the following macro. */
+#define X_HAVE_UTF8_STRING 1
+
+/* The Xlib structs are full of implicit padding to properly align members.
+ We can't clean that up without breaking ABI, so tell clang not to bother
+ complaining about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
+#endif
typedef char *XPointer;
@@ -128,7 +165,9 @@ typedef int Status;
typedef struct _XExtData {
int number; /* number returned by XRegisterExtension */
struct _XExtData *next; /* next item on list of data for structure */
- int (*free_private)(); /* called to free private storage */
+ int (*free_private)( /* called to free private storage */
+ struct _XExtData *extension
+ );
XPointer private_data; /* data private to this extension. */
} XExtData;
@@ -221,6 +260,9 @@ typedef struct {
* implementation dependent. A Screen should be treated as opaque
* by application code.
*/
+
+struct _XDisplay; /* Forward declare before use for C++ */
+
typedef struct {
XExtData *ext_data; /* hook for extension to hang data */
struct _XDisplay *display;/* back pointer to display structure */
@@ -312,6 +354,16 @@ typedef struct {
} XHostAddress;
/*
+ * Data structure for ServerFamilyInterpreted addresses in host routines
+ */
+typedef struct {
+ int typelength; /* length of type string, in bytes */
+ int valuelength; /* length of value string, in bytes */
+ char *type; /* pointer to where to find the type string */
+ char *value; /* pointer to where to find the address */
+} XServerInterpretedAddress;
+
+/*
* Data structure for "image" data, used by image manipulation routines.
*/
typedef struct _XImage {
@@ -334,20 +386,22 @@ typedef struct _XImage {
int pixelpower; /* n such that pixels are 2^n x 2^n blocks*/
#endif
struct funcs { /* image manipulation routines */
- struct _XImage *(*create_image)();
-#if NeedFunctionPrototypes
+ struct _XImage *(*create_image)(
+ struct _XDisplay* /* display */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ int /* offset */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* bitmap_pad */,
+ int /* bytes_per_line */);
int (*destroy_image) (struct _XImage *);
unsigned long (*get_pixel) (struct _XImage *, int, int);
int (*put_pixel) (struct _XImage *, int, int, unsigned long);
struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
int (*add_pixel) (struct _XImage *, long);
-#else
- int (*destroy_image)();
- unsigned long (*get_pixel)();
- int (*put_pixel)();
- struct _XImage *(*sub_image)();
- int (*add_pixel)();
-#endif
} f;
} XImage;
@@ -443,46 +497,51 @@ typedef struct {
*/
typedef struct _XDisplay {
XExtData *ext_data; /* hook for extension to hang data */
- struct _XFreeFuncs *free_funcs; /* internal free functions */
+ struct _XPrivate *private1;
int fd; /* Network socket. */
- int conn_checker; /* ugly thing used by _XEventsQueued */
- int proto_major_version;/* maj. version of server's X protocol */
+ int private2;
+ int proto_major_version;/* major version of server's X protocol */
int proto_minor_version;/* minor version of servers X protocol */
char *vendor; /* vendor of the server hardware */
- XID resource_base; /* resource ID base */
- XID resource_mask; /* resource ID mask bits */
- XID resource_id; /* allocator current ID */
- int resource_shift; /* allocator shift to correct bits */
- XID (*resource_alloc)(); /* allocator function */
+ XID private3;
+ XID private4;
+ XID private5;
+ int private6;
+ XID (*resource_alloc)( /* allocator function */
+ struct _XDisplay*
+ );
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
int bitmap_unit; /* padding and data requirements */
int bitmap_pad; /* padding requirements on bitmaps */
int bitmap_bit_order; /* LeastSignificant or MostSignificant */
int nformats; /* number of pixmap formats in list */
ScreenFormat *pixmap_format; /* pixmap format list */
- int vnumber; /* Xlib's X protocol version number. */
+ int private8;
int release; /* release of the server */
- struct _XSQEvent *head, *tail; /* Input event queue. */
+ struct _XPrivate *private9, *private10;
int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
unsigned long request; /* sequence number of last request. */
- char *last_req; /* beginning of last request, or dummy */
- char *buffer; /* Output buffer starting address. */
- char *bufptr; /* Output buffer index pointer. */
- char *bufmax; /* Output buffer maximum+1 address. */
+ XPointer private11;
+ XPointer private12;
+ XPointer private13;
+ XPointer private14;
unsigned max_request_size; /* maximum number 32 bit words in request*/
struct _XrmHashBucketRec *db;
- int (*synchandler)(); /* Synchronization handler */
+ int (*private15)(
+ struct _XDisplay*
+ );
char *display_name; /* "host:display" string used on this connect*/
int default_screen; /* default screen for operations */
int nscreens; /* number of screens on this server*/
Screen *screens; /* pointer to list of screens */
unsigned long motion_buffer; /* size of motion buffer */
- unsigned long flags; /* internal connection flags */
+ unsigned long private16;
int min_keycode; /* minimum defined keycode */
int max_keycode; /* maximum defined keycode */
- KeySym *keysyms; /* This server's keysyms */
- XModifierKeymap *modifiermap; /* This server's modifier keymap */
- int keysyms_per_keycode;/* number of rows */
+ XPointer private17;
+ XPointer private18;
+ int private19;
char *xdefaults; /* contents of defaults from server */
char *scratch_buffer; /* place to hang scratch buffer */
unsigned long scratch_length; /* length of scratch buffer */
@@ -541,7 +600,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window it is reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -562,7 +621,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window it is reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -580,7 +639,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -597,7 +656,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -621,7 +680,8 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window of event */
- int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int mode; /* NotifyNormal, NotifyWhileGrabbed,
+ NotifyGrab, NotifyUngrab */
int detail;
/*
* NotifyAncestor, NotifyVirtual, NotifyInferior,
@@ -922,6 +982,33 @@ typedef struct {
Window window; /* window on which event was requested in event mask */
} XAnyEvent;
+
+/***************************************************************
+ *
+ * GenericEvent. This event is the standard event for all newer extensions.
+ */
+
+typedef struct
+ {
+ int type; /* of event. Always GenericEvent */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ int extension; /* major opcode of extension that caused the event */
+ int evtype; /* actual event type. */
+ } XGenericEvent;
+
+typedef struct {
+ int type; /* of event. Always GenericEvent */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ int extension; /* major opcode of extension that caused the event */
+ int evtype; /* actual event type. */
+ unsigned int cookie;
+ void *data;
+} XGenericEventCookie;
+
/*
* this union is defined so Xlib can always use the same sized
* event structure internally, to avoid memory fragmentation.
@@ -959,6 +1046,8 @@ typedef union _XEvent {
XMappingEvent xmapping;
XErrorEvent xerror;
XKeymapEvent xkeymap;
+ XGenericEvent xgeneric;
+ XGenericEventCookie xcookie;
XID pad[24];
} XEvent;
#endif
@@ -1040,7 +1129,12 @@ typedef struct {
XRectangle max_logical_extent;
} XFontSetExtents;
-typedef struct _XFontSet *XFontSet;
+/* unused:
+typedef void (*XOMProc)();
+ */
+
+typedef struct _XOM *XOM;
+typedef struct _XOC *XOC, *XFontSet;
typedef struct {
char *chars;
@@ -1056,11 +1150,62 @@ typedef struct {
XFontSet font_set;
} XwcTextItem;
-typedef void (*XIMProc)();
+#define XNRequiredCharSet "requiredCharSet"
+#define XNQueryOrientation "queryOrientation"
+#define XNBaseFontName "baseFontName"
+#define XNOMAutomatic "omAutomatic"
+#define XNMissingCharSet "missingCharSet"
+#define XNDefaultString "defaultString"
+#define XNOrientation "orientation"
+#define XNDirectionalDependentDrawing "directionalDependentDrawing"
+#define XNContextualDrawing "contextualDrawing"
+#define XNFontInfo "fontInfo"
+
+typedef struct {
+ int charset_count;
+ char **charset_list;
+} XOMCharSetList;
+
+typedef enum {
+ XOMOrientation_LTR_TTB,
+ XOMOrientation_RTL_TTB,
+ XOMOrientation_TTB_LTR,
+ XOMOrientation_TTB_RTL,
+ XOMOrientation_Context
+} XOrientation;
+
+typedef struct {
+ int num_orientation;
+ XOrientation *orientation; /* Input Text description */
+} XOMOrientation;
+
+typedef struct {
+ int num_font;
+ XFontStruct **font_struct_list;
+ char **font_name_list;
+} XOMFontInfo;
typedef struct _XIM *XIM;
typedef struct _XIC *XIC;
+typedef void (*XIMProc)(
+ XIM,
+ XPointer,
+ XPointer
+);
+
+typedef Bool (*XICProc)(
+ XIC,
+ XPointer,
+ XPointer
+);
+
+typedef void (*XIDProc)(
+ Display*,
+ XPointer,
+ XPointer
+);
+
typedef unsigned long XIMStyle;
typedef struct {
@@ -1079,17 +1224,20 @@ typedef struct {
#define XIMStatusNone 0x0800L
#define XNVaNestedList "XNVaNestedList"
+#define XNQueryInputStyle "queryInputStyle"
#define XNClientWindow "clientWindow"
#define XNInputStyle "inputStyle"
#define XNFocusWindow "focusWindow"
#define XNResourceName "resourceName"
#define XNResourceClass "resourceClass"
#define XNGeometryCallback "geometryCallback"
+#define XNDestroyCallback "destroyCallback"
#define XNFilterEvents "filterEvents"
#define XNPreeditStartCallback "preeditStartCallback"
#define XNPreeditDoneCallback "preeditDoneCallback"
#define XNPreeditDrawCallback "preeditDrawCallback"
#define XNPreeditCaretCallback "preeditCaretCallback"
+#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
#define XNPreeditAttributes "preeditAttributes"
#define XNStatusStartCallback "statusStartCallback"
#define XNStatusDoneCallback "statusDoneCallback"
@@ -1107,31 +1255,47 @@ typedef struct {
#define XNLineSpace "lineSpace"
#define XNCursor "cursor"
+#define XNQueryIMValuesList "queryIMValuesList"
+#define XNQueryICValuesList "queryICValuesList"
+#define XNVisiblePosition "visiblePosition"
+#define XNR6PreeditCallback "r6PreeditCallback"
+#define XNStringConversionCallback "stringConversionCallback"
+#define XNStringConversion "stringConversion"
+#define XNResetState "resetState"
+#define XNHotKey "hotKey"
+#define XNHotKeyState "hotKeyState"
+#define XNPreeditState "preeditState"
+#define XNSeparatorofNestedList "separatorofNestedList"
+
#define XBufferOverflow -1
#define XLookupNone 1
#define XLookupChars 2
#define XLookupKeySym 3
#define XLookupBoth 4
-#if NeedFunctionPrototypes
typedef void *XVaNestedList;
-#else
-typedef XPointer XVaNestedList;
-#endif
typedef struct {
XPointer client_data;
XIMProc callback;
} XIMCallback;
+typedef struct {
+ XPointer client_data;
+ XICProc callback;
+} XICCallback;
+
typedef unsigned long XIMFeedback;
-#define XIMReverse 1
-#define XIMUnderline (1<<1)
-#define XIMHighlight (1<<2)
-#define XIMPrimary (1<<5)
-#define XIMSecondary (1<<6)
-#define XIMTertiary (1<<7)
+#define XIMReverse 1L
+#define XIMUnderline (1L<<1)
+#define XIMHighlight (1L<<2)
+#define XIMPrimary (1L<<5)
+#define XIMSecondary (1L<<6)
+#define XIMTertiary (1L<<7)
+#define XIMVisibleToForward (1L<<8)
+#define XIMVisibleToBackword (1L<<9)
+#define XIMVisibleToCenter (1L<<10)
typedef struct _XIMText {
unsigned short length;
@@ -1143,12 +1307,53 @@ typedef struct _XIMText {
} string;
} XIMText;
-typedef struct _XIMPreeditDrawCallbackStruct {
- int caret; /* Cursor offset within pre-edit string */
- int chg_first; /* Starting change position */
- int chg_length; /* Length of the change in character count */
- XIMText *text;
-} XIMPreeditDrawCallbackStruct;
+typedef unsigned long XIMPreeditState;
+
+#define XIMPreeditUnKnown 0L
+#define XIMPreeditEnable 1L
+#define XIMPreeditDisable (1L<<1)
+
+typedef struct _XIMPreeditStateNotifyCallbackStruct {
+ XIMPreeditState state;
+} XIMPreeditStateNotifyCallbackStruct;
+
+typedef unsigned long XIMResetState;
+
+#define XIMInitialState 1L
+#define XIMPreserveState (1L<<1)
+
+typedef unsigned long XIMStringConversionFeedback;
+
+#define XIMStringConversionLeftEdge (0x00000001)
+#define XIMStringConversionRightEdge (0x00000002)
+#define XIMStringConversionTopEdge (0x00000004)
+#define XIMStringConversionBottomEdge (0x00000008)
+#define XIMStringConversionConcealed (0x00000010)
+#define XIMStringConversionWrapped (0x00000020)
+
+typedef struct _XIMStringConversionText {
+ unsigned short length;
+ XIMStringConversionFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *mbs;
+ wchar_t *wcs;
+ } string;
+} XIMStringConversionText;
+
+typedef unsigned short XIMStringConversionPosition;
+
+typedef unsigned short XIMStringConversionType;
+
+#define XIMStringConversionBuffer (0x0001)
+#define XIMStringConversionLine (0x0002)
+#define XIMStringConversionWord (0x0003)
+#define XIMStringConversionChar (0x0004)
+
+typedef unsigned short XIMStringConversionOperation;
+
+#define XIMStringConversionSubstitution (0x0001)
+#define XIMStringConversionRetrieval (0x0002)
typedef enum {
XIMForwardChar, XIMBackwardChar,
@@ -1160,6 +1365,21 @@ typedef enum {
XIMDontChange
} XIMCaretDirection;
+typedef struct _XIMStringConversionCallbackStruct {
+ XIMStringConversionPosition position;
+ XIMCaretDirection direction;
+ XIMStringConversionOperation operation;
+ unsigned short factor;
+ XIMStringConversionText *text;
+} XIMStringConversionCallbackStruct;
+
+typedef struct _XIMPreeditDrawCallbackStruct {
+ int caret; /* Cursor offset within pre-edit string */
+ int chg_first; /* Starting change position */
+ int chg_length; /* Length of the change in character count */
+ XIMText *text;
+} XIMPreeditDrawCallbackStruct;
+
typedef enum {
XIMIsInvisible, /* Disable caret feedback */
XIMIsPrimary, /* UI defined caret feedback */
@@ -1185,24 +1405,2655 @@ typedef struct _XIMStatusDrawCallbackStruct {
} data;
} XIMStatusDrawCallbackStruct;
+typedef struct _XIMHotKeyTrigger {
+ KeySym keysym;
+ int modifier;
+ int modifier_mask;
+} XIMHotKeyTrigger;
+
+typedef struct _XIMHotKeyTriggers {
+ int num_hot_key;
+ XIMHotKeyTrigger *key;
+} XIMHotKeyTriggers;
+
+typedef unsigned long XIMHotKeyState;
+
+#define XIMHotKeyStateON (0x0001L)
+#define XIMHotKeyStateOFF (0x0002L)
+
+typedef struct {
+ unsigned short count_values;
+ char **supported_values;
+} XIMValuesList;
+
+_XFUNCPROTOBEGIN
+
+#if defined(WIN32) && !defined(_XLIBINT_)
+#define _Xdebug (*_Xdebug_p)
+#endif
+
+EXTERN int _Xdebug;
+
+EXTERN XFontStruct *XLoadQueryFont(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+
+EXTERN XFontStruct *XQueryFont(
+ Display* /* display */,
+ XID /* font_ID */
+);
+
+
+EXTERN XTimeCoord *XGetMotionEvents(
+ Display* /* display */,
+ Window /* w */,
+ Time /* start */,
+ Time /* stop */,
+ int* /* nevents_return */
+);
+
+EXTERN XModifierKeymap *XDeleteModifiermapEntry(
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+);
+
+EXTERN XModifierKeymap *XGetModifierMapping(
+ Display* /* display */
+);
+
+EXTERN XModifierKeymap *XInsertModifiermapEntry(
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+);
+
+EXTERN XModifierKeymap *XNewModifiermap(
+ int /* max_keys_per_mod */
+);
+
+EXTERN XImage *XCreateImage(
+ Display* /* display */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ int /* offset */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* bitmap_pad */,
+ int /* bytes_per_line */
+);
+EXTERN Status XInitImage(
+ XImage* /* image */
+);
+EXTERN XImage *XGetImage(
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */
+);
+EXTERN XImage *XGetSubImage(
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */,
+ XImage* /* dest_image */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+/*
+ * X function declarations.
+ */
+EXTERN Display *XOpenDisplay(
+ _Xconst char* /* display_name */
+);
+
+EXTERN void XrmInitialize(
+ void
+);
+
+EXTERN char *XFetchBytes(
+ Display* /* display */,
+ int* /* nbytes_return */
+);
+EXTERN char *XFetchBuffer(
+ Display* /* display */,
+ int* /* nbytes_return */,
+ int /* buffer */
+);
+EXTERN char *XGetAtomName(
+ Display* /* display */,
+ Atom /* atom */
+);
+EXTERN Status XGetAtomNames(
+ Display* /* dpy */,
+ Atom* /* atoms */,
+ int /* count */,
+ char** /* names_return */
+);
+EXTERN char *XGetDefault(
+ Display* /* display */,
+ _Xconst char* /* program */,
+ _Xconst char* /* option */
+);
+EXTERN char *XDisplayName(
+ _Xconst char* /* string */
+);
+EXTERN char *XKeysymToString(
+ KeySym /* keysym */
+);
+
+EXTERN int (*XSynchronize(
+ Display* /* display */,
+ Bool /* onoff */
+))(
+ Display* /* display */
+);
+EXTERN int (*XSetAfterFunction(
+ Display* /* display */,
+ int (*) (
+ Display* /* display */
+ ) /* procedure */
+))(
+ Display* /* display */
+);
+EXTERN Atom XInternAtom(
+ Display* /* display */,
+ _Xconst char* /* atom_name */,
+ Bool /* only_if_exists */
+);
+EXTERN Status XInternAtoms(
+ Display* /* dpy */,
+ char** /* names */,
+ int /* count */,
+ Bool /* onlyIfExists */,
+ Atom* /* atoms_return */
+);
+EXTERN Colormap XCopyColormapAndFree(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+EXTERN Colormap XCreateColormap(
+ Display* /* display */,
+ Window /* w */,
+ Visual* /* visual */,
+ int /* alloc */
+);
+EXTERN Cursor XCreatePixmapCursor(
+ Display* /* display */,
+ Pixmap /* source */,
+ Pixmap /* mask */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */,
+ unsigned int /* x */,
+ unsigned int /* y */
+);
+EXTERN Cursor XCreateGlyphCursor(
+ Display* /* display */,
+ Font /* source_font */,
+ Font /* mask_font */,
+ unsigned int /* source_char */,
+ unsigned int /* mask_char */,
+ XColor _Xconst * /* foreground_color */,
+ XColor _Xconst * /* background_color */
+);
+EXTERN Cursor XCreateFontCursor(
+ Display* /* display */,
+ unsigned int /* shape */
+);
+EXTERN Font XLoadFont(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+EXTERN GC XCreateGC(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+);
+EXTERN GContext XGContextFromGC(
+ GC /* gc */
+);
+EXTERN void XFlushGC(
+ Display* /* display */,
+ GC /* gc */
+);
+EXTERN Pixmap XCreatePixmap(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* depth */
+);
+EXTERN Pixmap XCreateBitmapFromData(
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+EXTERN Pixmap XCreatePixmapFromBitmapData(
+ Display* /* display */,
+ Drawable /* d */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* fg */,
+ unsigned long /* bg */,
+ unsigned int /* depth */
+);
+EXTERN Window XCreateSimpleWindow(
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ unsigned long /* border */,
+ unsigned long /* background */
+);
+EXTERN Window XGetSelectionOwner(
+ Display* /* display */,
+ Atom /* selection */
+);
+EXTERN Window XCreateWindow(
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual* /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+);
+EXTERN Colormap *XListInstalledColormaps(
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_return */
+);
+EXTERN char **XListFonts(
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* actual_count_return */
+);
+EXTERN char **XListFontsWithInfo(
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* count_return */,
+ XFontStruct** /* info_return */
+);
+EXTERN char **XGetFontPath(
+ Display* /* display */,
+ int* /* npaths_return */
+);
+EXTERN char **XListExtensions(
+ Display* /* display */,
+ int* /* nextensions_return */
+);
+EXTERN Atom *XListProperties(
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_prop_return */
+);
+EXTERN XHostAddress *XListHosts(
+ Display* /* display */,
+ int* /* nhosts_return */,
+ Bool* /* state_return */
+);
+EXTERN KeySym XKeycodeToKeysym(
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* keycode */,
+#else
+ KeyCode /* keycode */,
+#endif
+ int /* index */
+);
+EXTERN KeySym XLookupKeysym(
+ XKeyEvent* /* key_event */,
+ int /* index */
+);
+EXTERN KeySym *XGetKeyboardMapping(
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* first_keycode */,
+#else
+ KeyCode /* first_keycode */,
+#endif
+ int /* keycode_count */,
+ int* /* keysyms_per_keycode_return */
+);
+EXTERN KeySym XStringToKeysym(
+ _Xconst char* /* string */
+);
+EXTERN long XMaxRequestSize(
+ Display* /* display */
+);
+EXTERN long XExtendedMaxRequestSize(
+ Display* /* display */
+);
+EXTERN char *XResourceManagerString(
+ Display* /* display */
+);
+EXTERN char *XScreenResourceString(
+ Screen* /* screen */
+);
+EXTERN unsigned long XDisplayMotionBufferSize(
+ Display* /* display */
+);
+EXTERN VisualID XVisualIDFromVisual(
+ Visual* /* visual */
+);
+
+/* multithread routines */
+
+EXTERN Status XInitThreads(
+ void
+);
+
+EXTERN void XLockDisplay(
+ Display* /* display */
+);
+
+EXTERN void XUnlockDisplay(
+ Display* /* display */
+);
+
+/* routines for dealing with extensions */
+
+EXTERN XExtCodes *XInitExtension(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+
+EXTERN XExtCodes *XAddExtension(
+ Display* /* display */
+);
+EXTERN XExtData *XFindOnExtensionList(
+ XExtData** /* structure */,
+ int /* number */
+);
+EXTERN XExtData **XEHeadOfExtensionList(
+ XEDataObject /* object */
+);
+
+/* these are routines for which there are also macros */
+EXTERN Window XRootWindow(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN Window XDefaultRootWindow(
+ Display* /* display */
+);
+EXTERN Window XRootWindowOfScreen(
+ Screen* /* screen */
+);
+EXTERN Visual *XDefaultVisual(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN Visual *XDefaultVisualOfScreen(
+ Screen* /* screen */
+);
+EXTERN GC XDefaultGC(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN GC XDefaultGCOfScreen(
+ Screen* /* screen */
+);
+EXTERN unsigned long XBlackPixel(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN unsigned long XWhitePixel(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN unsigned long XAllPlanes(
+ void
+);
+EXTERN unsigned long XBlackPixelOfScreen(
+ Screen* /* screen */
+);
+EXTERN unsigned long XWhitePixelOfScreen(
+ Screen* /* screen */
+);
+EXTERN unsigned long XNextRequest(
+ Display* /* display */
+);
+EXTERN unsigned long XLastKnownRequestProcessed(
+ Display* /* display */
+);
+EXTERN char *XServerVendor(
+ Display* /* display */
+);
+EXTERN char *XDisplayString(
+ Display* /* display */
+);
+EXTERN Colormap XDefaultColormap(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN Colormap XDefaultColormapOfScreen(
+ Screen* /* screen */
+);
+EXTERN Display *XDisplayOfScreen(
+ Screen* /* screen */
+);
+EXTERN Screen *XScreenOfDisplay(
+ Display* /* display */,
+ int /* screen_number */
+);
+EXTERN Screen *XDefaultScreenOfDisplay(
+ Display* /* display */
+);
+EXTERN long XEventMaskOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XScreenNumberOfScreen(
+ Screen* /* screen */
+);
+
typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
-#if NeedFunctionPrototypes
Display* /* display */,
XErrorEvent* /* error_event */
-#endif
);
-_XFUNCPROTOBEGIN
+EXTERN XErrorHandler XSetErrorHandler (
+ XErrorHandler /* handler */
+);
+typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */
+ Display* /* display */
+);
-#include "tkIntXlibDecls.h"
+EXTERN XIOErrorHandler XSetIOErrorHandler (
+ XIOErrorHandler /* handler */
+);
-_XFUNCPROTOEND
-#if defined(MAC_OSX_TK)
-# undef Cursor
-# undef Region
+EXTERN XPixmapFormatValues *XListPixmapFormats(
+ Display* /* display */,
+ int* /* count_return */
+);
+EXTERN int *XListDepths(
+ Display* /* display */,
+ int /* screen_number */,
+ int* /* count_return */
+);
+
+/* ICCCM routines for things that don't require special include files; */
+/* other declarations are given in Xutil.h */
+EXTERN Status XReconfigureWMWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */,
+ unsigned int /* mask */,
+ XWindowChanges* /* changes */
+);
+
+EXTERN Status XGetWMProtocols(
+ Display* /* display */,
+ Window /* w */,
+ Atom** /* protocols_return */,
+ int* /* count_return */
+);
+EXTERN Status XSetWMProtocols(
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* protocols */,
+ int /* count */
+);
+EXTERN Status XIconifyWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+);
+EXTERN Status XWithdrawWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+);
+EXTERN Status XGetCommand(
+ Display* /* display */,
+ Window /* w */,
+ char*** /* argv_return */,
+ int* /* argc_return */
+);
+EXTERN Status XGetWMColormapWindows(
+ Display* /* display */,
+ Window /* w */,
+ Window** /* windows_return */,
+ int* /* count_return */
+);
+EXTERN Status XSetWMColormapWindows(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* colormap_windows */,
+ int /* count */
+);
+EXTERN void XFreeStringList(
+ char** /* list */
+);
+EXTERN int XSetTransientForHint(
+ Display* /* display */,
+ Window /* w */,
+ Window /* prop_window */
+);
+
+/* The following are given in alphabetical order */
+
+EXTERN int XActivateScreenSaver(
+ Display* /* display */
+);
+
+EXTERN int XAddHost(
+ Display* /* display */,
+ XHostAddress* /* host */
+);
+
+EXTERN int XAddHosts(
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+);
+
+EXTERN int XAddToExtensionList(
+ struct _XExtData** /* structure */,
+ XExtData* /* ext_data */
+);
+
+EXTERN int XAddToSaveSet(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN Status XAllocColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* screen_in_out */
+);
+
+EXTERN Status XAllocColorCells(
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* plane_masks_return */,
+ unsigned int /* nplanes */,
+ unsigned long* /* pixels_return */,
+ unsigned int /* npixels */
+);
+
+EXTERN Status XAllocColorPlanes(
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* pixels_return */,
+ int /* ncolors */,
+ int /* nreds */,
+ int /* ngreens */,
+ int /* nblues */,
+ unsigned long* /* rmask_return */,
+ unsigned long* /* gmask_return */,
+ unsigned long* /* bmask_return */
+);
+
+EXTERN Status XAllocNamedColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* screen_def_return */,
+ XColor* /* exact_def_return */
+);
+
+EXTERN int XAllowEvents(
+ Display* /* display */,
+ int /* event_mode */,
+ Time /* time */
+);
+
+EXTERN int XAutoRepeatOff(
+ Display* /* display */
+);
+
+EXTERN int XAutoRepeatOn(
+ Display* /* display */
+);
+
+EXTERN int XBell(
+ Display* /* display */,
+ int /* percent */
+);
+
+EXTERN int XBitmapBitOrder(
+ Display* /* display */
+);
+
+EXTERN int XBitmapPad(
+ Display* /* display */
+);
+
+EXTERN int XBitmapUnit(
+ Display* /* display */
+);
+
+EXTERN int XCellsOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XChangeActivePointerGrab(
+ Display* /* display */,
+ unsigned int /* event_mask */,
+ Cursor /* cursor */,
+ Time /* time */
+);
+
+EXTERN int XChangeGC(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+);
+
+EXTERN int XChangeKeyboardControl(
+ Display* /* display */,
+ unsigned long /* value_mask */,
+ XKeyboardControl* /* values */
+);
+
+EXTERN int XChangeKeyboardMapping(
+ Display* /* display */,
+ int /* first_keycode */,
+ int /* keysyms_per_keycode */,
+ KeySym* /* keysyms */,
+ int /* num_codes */
+);
+
+EXTERN int XChangePointerControl(
+ Display* /* display */,
+ Bool /* do_accel */,
+ Bool /* do_threshold */,
+ int /* accel_numerator */,
+ int /* accel_denominator */,
+ int /* threshold */
+);
+
+EXTERN int XChangeProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ Atom /* type */,
+ int /* format */,
+ int /* mode */,
+ _Xconst unsigned char* /* data */,
+ int /* nelements */
+);
+
+EXTERN int XChangeSaveSet(
+ Display* /* display */,
+ Window /* w */,
+ int /* change_mode */
+);
+
+EXTERN int XChangeWindowAttributes(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+);
+
+EXTERN Bool XCheckIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+EXTERN Bool XCheckMaskEvent(
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+EXTERN Bool XCheckTypedEvent(
+ Display* /* display */,
+ int /* event_type */,
+ XEvent* /* event_return */
+);
+
+EXTERN Bool XCheckTypedWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ int /* event_type */,
+ XEvent* /* event_return */
+);
+
+EXTERN Bool XCheckWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+EXTERN int XCirculateSubwindows(
+ Display* /* display */,
+ Window /* w */,
+ int /* direction */
+);
+
+EXTERN int XCirculateSubwindowsDown(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XCirculateSubwindowsUp(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XClearArea(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ Bool /* exposures */
+);
+
+EXTERN int XClearWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XCloseDisplay(
+ Display* /* display */
+);
+
+EXTERN int XConfigureWindow(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* value_mask */,
+ XWindowChanges* /* values */
+);
+
+EXTERN int XConnectionNumber(
+ Display* /* display */
+);
+
+EXTERN int XConvertSelection(
+ Display* /* display */,
+ Atom /* selection */,
+ Atom /* target */,
+ Atom /* property */,
+ Window /* requestor */,
+ Time /* time */
+);
+
+EXTERN int XCopyArea(
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+EXTERN int XCopyGC(
+ Display* /* display */,
+ GC /* src */,
+ unsigned long /* valuemask */,
+ GC /* dest */
+);
+
+EXTERN int XCopyPlane(
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned long /* plane */
+);
+
+EXTERN int XDefaultDepth(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDefaultDepthOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XDefaultScreen(
+ Display* /* display */
+);
+
+EXTERN int XDefineCursor(
+ Display* /* display */,
+ Window /* w */,
+ Cursor /* cursor */
+);
+
+EXTERN int XDeleteProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */
+);
+
+EXTERN int XDestroyWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XDestroySubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XDoesBackingStore(
+ Screen* /* screen */
+);
+
+EXTERN Bool XDoesSaveUnders(
+ Screen* /* screen */
+);
+
+EXTERN int XDisableAccessControl(
+ Display* /* display */
+);
+
+
+EXTERN int XDisplayCells(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDisplayHeight(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDisplayHeightMM(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDisplayKeycodes(
+ Display* /* display */,
+ int* /* min_keycodes_return */,
+ int* /* max_keycodes_return */
+);
+
+EXTERN int XDisplayPlanes(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDisplayWidth(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDisplayWidthMM(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+EXTERN int XDrawArc(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+);
+
+EXTERN int XDrawArcs(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+);
+
+EXTERN int XDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+);
+
+EXTERN int XDrawImageString16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+);
+
+EXTERN int XDrawLine(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x1 */,
+ int /* y1 */,
+ int /* x2 */,
+ int /* y2 */
+);
+
+EXTERN int XDrawLines(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+);
+
+EXTERN int XDrawPoint(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */
+);
+
+EXTERN int XDrawPoints(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+);
+
+EXTERN int XDrawRectangle(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+EXTERN int XDrawRectangles(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+);
+
+EXTERN int XDrawSegments(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XSegment* /* segments */,
+ int /* nsegments */
+);
+
+EXTERN int XDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+);
+
+EXTERN int XDrawString16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+);
+
+EXTERN int XDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem* /* items */,
+ int /* nitems */
+);
+
+EXTERN int XDrawText16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem16* /* items */,
+ int /* nitems */
+);
+
+EXTERN int XEnableAccessControl(
+ Display* /* display */
+);
+
+EXTERN int XEventsQueued(
+ Display* /* display */,
+ int /* mode */
+);
+
+EXTERN Status XFetchName(
+ Display* /* display */,
+ Window /* w */,
+ char** /* window_name_return */
+);
+
+EXTERN int XFillArc(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+);
+
+EXTERN int XFillArcs(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+);
+
+EXTERN int XFillPolygon(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* shape */,
+ int /* mode */
+);
+
+EXTERN int XFillRectangle(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+EXTERN int XFillRectangles(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+);
+
+EXTERN int XFlush(
+ Display* /* display */
+);
+
+EXTERN int XForceScreenSaver(
+ Display* /* display */,
+ int /* mode */
+);
+
+EXTERN int XFree(
+ void* /* data */
+);
+
+EXTERN int XFreeColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+EXTERN int XFreeColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ unsigned long* /* pixels */,
+ int /* npixels */,
+ unsigned long /* planes */
+);
+
+EXTERN int XFreeCursor(
+ Display* /* display */,
+ Cursor /* cursor */
+);
+
+EXTERN int XFreeExtensionList(
+ char** /* list */
+);
+
+EXTERN int XFreeFont(
+ Display* /* display */,
+ XFontStruct* /* font_struct */
+);
+
+EXTERN int XFreeFontInfo(
+ char** /* names */,
+ XFontStruct* /* free_info */,
+ int /* actual_count */
+);
+
+EXTERN int XFreeFontNames(
+ char** /* list */
+);
+
+EXTERN int XFreeFontPath(
+ char** /* list */
+);
+
+EXTERN int XFreeGC(
+ Display* /* display */,
+ GC /* gc */
+);
+
+EXTERN int XFreeModifiermap(
+ XModifierKeymap* /* modmap */
+);
+
+EXTERN int XFreePixmap(
+ Display* /* display */,
+ Pixmap /* pixmap */
+);
+
+EXTERN int XGeometry(
+ Display* /* display */,
+ int /* screen */,
+ _Xconst char* /* position */,
+ _Xconst char* /* default_position */,
+ unsigned int /* bwidth */,
+ unsigned int /* fwidth */,
+ unsigned int /* fheight */,
+ int /* xadder */,
+ int /* yadder */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */
+);
+
+EXTERN int XGetErrorDatabaseText(
+ Display* /* display */,
+ _Xconst char* /* name */,
+ _Xconst char* /* message */,
+ _Xconst char* /* default_string */,
+ char* /* buffer_return */,
+ int /* length */
+);
+
+EXTERN int XGetErrorText(
+ Display* /* display */,
+ int /* code */,
+ char* /* buffer_return */,
+ int /* length */
+);
+
+EXTERN Bool XGetFontProperty(
+ XFontStruct* /* font_struct */,
+ Atom /* atom */,
+ unsigned long* /* value_return */
+);
+
+EXTERN Status XGetGCValues(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values_return */
+);
+
+EXTERN Status XGetGeometry(
+ Display* /* display */,
+ Drawable /* d */,
+ Window* /* root_return */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned int* /* border_width_return */,
+ unsigned int* /* depth_return */
+);
+
+EXTERN Status XGetIconName(
+ Display* /* display */,
+ Window /* w */,
+ char** /* icon_name_return */
+);
+
+EXTERN int XGetInputFocus(
+ Display* /* display */,
+ Window* /* focus_return */,
+ int* /* revert_to_return */
+);
+
+EXTERN int XGetKeyboardControl(
+ Display* /* display */,
+ XKeyboardState* /* values_return */
+);
+
+EXTERN int XGetPointerControl(
+ Display* /* display */,
+ int* /* accel_numerator_return */,
+ int* /* accel_denominator_return */,
+ int* /* threshold_return */
+);
+
+EXTERN int XGetPointerMapping(
+ Display* /* display */,
+ unsigned char* /* map_return */,
+ int /* nmap */
+);
+
+EXTERN int XGetScreenSaver(
+ Display* /* display */,
+ int* /* timeout_return */,
+ int* /* interval_return */,
+ int* /* prefer_blanking_return */,
+ int* /* allow_exposures_return */
+);
+
+EXTERN Status XGetTransientForHint(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* prop_window_return */
+);
+
+EXTERN int XGetWindowProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ long /* long_offset */,
+ long /* long_length */,
+ Bool /* delete */,
+ Atom /* req_type */,
+ Atom* /* actual_type_return */,
+ int* /* actual_format_return */,
+ unsigned long* /* nitems_return */,
+ unsigned long* /* bytes_after_return */,
+ unsigned char** /* prop_return */
+);
+
+EXTERN Status XGetWindowAttributes(
+ Display* /* display */,
+ Window /* w */,
+ XWindowAttributes* /* window_attributes_return */
+);
+
+EXTERN int XGrabButton(
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */
+);
+
+EXTERN int XGrabKey(
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */
+);
+
+EXTERN int XGrabKeyboard(
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Time /* time */
+);
+
+EXTERN int XGrabPointer(
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */,
+ Time /* time */
+);
+
+EXTERN int XGrabServer(
+ Display* /* display */
+);
+
+EXTERN int XHeightMMOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XHeightOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+EXTERN int XImageByteOrder(
+ Display* /* display */
+);
+
+EXTERN int XInstallColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+EXTERN KeyCode XKeysymToKeycode(
+ Display* /* display */,
+ KeySym /* keysym */
+);
+
+EXTERN int XKillClient(
+ Display* /* display */,
+ XID /* resource */
+);
+
+EXTERN Status XLookupColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* exact_def_return */,
+ XColor* /* screen_def_return */
+);
+
+EXTERN int XLowerWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XMapRaised(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XMapSubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XMapWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XMaskEvent(
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+EXTERN int XMaxCmapsOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XMinCmapsOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XMoveResizeWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+EXTERN int XMoveWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */
+);
+
+EXTERN int XNextEvent(
+ Display* /* display */,
+ XEvent* /* event_return */
+);
+
+EXTERN int XNoOp(
+ Display* /* display */
+);
+
+EXTERN Status XParseColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* spec */,
+ XColor* /* exact_def_return */
+);
+
+EXTERN int XParseGeometry(
+ _Xconst char* /* parsestring */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+EXTERN int XPeekEvent(
+ Display* /* display */,
+ XEvent* /* event_return */
+);
+
+EXTERN int XPeekIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+EXTERN int XPending(
+ Display* /* display */
+);
+
+EXTERN int XPlanesOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XProtocolRevision(
+ Display* /* display */
+);
+
+EXTERN int XProtocolVersion(
+ Display* /* display */
+);
+
+
+EXTERN int XPutBackEvent(
+ Display* /* display */,
+ XEvent* /* event */
+);
+
+EXTERN int XPutImage(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XImage* /* image */,
+ int /* src_x */,
+ int /* src_y */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+EXTERN int XQLength(
+ Display* /* display */
+);
+
+EXTERN Status XQueryBestCursor(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+EXTERN Status XQueryBestSize(
+ Display* /* display */,
+ int /* class */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+EXTERN Status XQueryBestStipple(
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+EXTERN Status XQueryBestTile(
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+EXTERN int XQueryColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* def_in_out */
+);
+
+EXTERN int XQueryColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* defs_in_out */,
+ int /* ncolors */
+);
+
+EXTERN Bool XQueryExtension(
+ Display* /* display */,
+ _Xconst char* /* name */,
+ int* /* major_opcode_return */,
+ int* /* first_event_return */,
+ int* /* first_error_return */
+);
+
+EXTERN int XQueryKeymap(
+ Display* /* display */,
+ char [32] /* keys_return */
+);
+
+EXTERN Bool XQueryPointer(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* child_return */,
+ int* /* root_x_return */,
+ int* /* root_y_return */,
+ int* /* win_x_return */,
+ int* /* win_y_return */,
+ unsigned int* /* mask_return */
+);
+
+EXTERN int XQueryTextExtents(
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+EXTERN int XQueryTextExtents16(
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+EXTERN Status XQueryTree(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* parent_return */,
+ Window** /* children_return */,
+ unsigned int* /* nchildren_return */
+);
+
+EXTERN int XRaiseWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XReadBitmapFile(
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ Pixmap* /* bitmap_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+);
+
+EXTERN int XReadBitmapFileData(
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned char** /* data_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+);
+
+EXTERN int XRebindKeysym(
+ Display* /* display */,
+ KeySym /* keysym */,
+ KeySym* /* list */,
+ int /* mod_count */,
+ _Xconst unsigned char* /* string */,
+ int /* bytes_string */
+);
+
+EXTERN int XRecolorCursor(
+ Display* /* display */,
+ Cursor /* cursor */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */
+);
+
+EXTERN int XRefreshKeyboardMapping(
+ XMappingEvent* /* event_map */
+);
+
+EXTERN int XRemoveFromSaveSet(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XRemoveHost(
+ Display* /* display */,
+ XHostAddress* /* host */
+);
+
+EXTERN int XRemoveHosts(
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+);
+
+EXTERN int XReparentWindow(
+ Display* /* display */,
+ Window /* w */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */
+);
+
+EXTERN int XResetScreenSaver(
+ Display* /* display */
+);
+
+EXTERN int XResizeWindow(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+EXTERN int XRestackWindows(
+ Display* /* display */,
+ Window* /* windows */,
+ int /* nwindows */
+);
+
+EXTERN int XRotateBuffers(
+ Display* /* display */,
+ int /* rotate */
+);
+
+EXTERN int XRotateWindowProperties(
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* properties */,
+ int /* num_prop */,
+ int /* npositions */
+);
+
+EXTERN int XScreenCount(
+ Display* /* display */
+);
+
+EXTERN int XSelectInput(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */
+);
+
+EXTERN Status XSendEvent(
+ Display* /* display */,
+ Window /* w */,
+ Bool /* propagate */,
+ long /* event_mask */,
+ XEvent* /* event_send */
+);
+
+EXTERN int XSetAccessControl(
+ Display* /* display */,
+ int /* mode */
+);
+
+EXTERN int XSetArcMode(
+ Display* /* display */,
+ GC /* gc */,
+ int /* arc_mode */
+);
+
+EXTERN int XSetBackground(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* background */
+);
+
+EXTERN int XSetClipMask(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* pixmap */
+);
+
+EXTERN int XSetClipOrigin(
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */
+);
+
+EXTERN int XSetClipRectangles(
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */,
+ XRectangle* /* rectangles */,
+ int /* n */,
+ int /* ordering */
+);
+
+EXTERN int XSetCloseDownMode(
+ Display* /* display */,
+ int /* close_mode */
+);
+
+EXTERN int XSetCommand(
+ Display* /* display */,
+ Window /* w */,
+ char** /* argv */,
+ int /* argc */
+);
+
+EXTERN int XSetDashes(
+ Display* /* display */,
+ GC /* gc */,
+ int /* dash_offset */,
+ _Xconst char* /* dash_list */,
+ int /* n */
+);
+
+EXTERN int XSetFillRule(
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_rule */
+);
+
+EXTERN int XSetFillStyle(
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_style */
+);
+
+EXTERN int XSetFont(
+ Display* /* display */,
+ GC /* gc */,
+ Font /* font */
+);
+
+EXTERN int XSetFontPath(
+ Display* /* display */,
+ char** /* directories */,
+ int /* ndirs */
+);
+
+EXTERN int XSetForeground(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */
+);
+
+EXTERN int XSetFunction(
+ Display* /* display */,
+ GC /* gc */,
+ int /* function */
+);
+
+EXTERN int XSetGraphicsExposures(
+ Display* /* display */,
+ GC /* gc */,
+ Bool /* graphics_exposures */
+);
+
+EXTERN int XSetIconName(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* icon_name */
+);
+
+EXTERN int XSetInputFocus(
+ Display* /* display */,
+ Window /* focus */,
+ int /* revert_to */,
+ Time /* time */
+);
+
+EXTERN int XSetLineAttributes(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned int /* line_width */,
+ int /* line_style */,
+ int /* cap_style */,
+ int /* join_style */
+);
+
+EXTERN int XSetModifierMapping(
+ Display* /* display */,
+ XModifierKeymap* /* modmap */
+);
+
+EXTERN int XSetPlaneMask(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* plane_mask */
+);
+
+EXTERN int XSetPointerMapping(
+ Display* /* display */,
+ _Xconst unsigned char* /* map */,
+ int /* nmap */
+);
+
+EXTERN int XSetScreenSaver(
+ Display* /* display */,
+ int /* timeout */,
+ int /* interval */,
+ int /* prefer_blanking */,
+ int /* allow_exposures */
+);
+
+EXTERN int XSetSelectionOwner(
+ Display* /* display */,
+ Atom /* selection */,
+ Window /* owner */,
+ Time /* time */
+);
+
+EXTERN int XSetState(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */,
+ unsigned long /* background */,
+ int /* function */,
+ unsigned long /* plane_mask */
+);
+
+EXTERN int XSetStipple(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* stipple */
+);
+
+EXTERN int XSetSubwindowMode(
+ Display* /* display */,
+ GC /* gc */,
+ int /* subwindow_mode */
+);
+
+EXTERN int XSetTSOrigin(
+ Display* /* display */,
+ GC /* gc */,
+ int /* ts_x_origin */,
+ int /* ts_y_origin */
+);
+
+EXTERN int XSetTile(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* tile */
+);
+
+EXTERN int XSetWindowBackground(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* background_pixel */
+);
+
+EXTERN int XSetWindowBackgroundPixmap(
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* background_pixmap */
+);
+
+EXTERN int XSetWindowBorder(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* border_pixel */
+);
+
+EXTERN int XSetWindowBorderPixmap(
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* border_pixmap */
+);
+
+EXTERN int XSetWindowBorderWidth(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */
+);
+
+EXTERN int XSetWindowColormap(
+ Display* /* display */,
+ Window /* w */,
+ Colormap /* colormap */
+);
+
+EXTERN int XStoreBuffer(
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */,
+ int /* buffer */
+);
+
+EXTERN int XStoreBytes(
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */
+);
+
+EXTERN int XStoreColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */
+);
+
+EXTERN int XStoreColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */,
+ int /* ncolors */
+);
+
+EXTERN int XStoreName(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */
+);
+
+EXTERN int XStoreNamedColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color */,
+ unsigned long /* pixel */,
+ int /* flags */
+);
+
+EXTERN int XSync(
+ Display* /* display */,
+ Bool /* discard */
+);
+
+EXTERN int XTextExtents(
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+EXTERN int XTextExtents16(
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+EXTERN int XTextWidth(
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* count */
+);
+
+EXTERN int XTextWidth16(
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* count */
+);
+
+EXTERN Bool XTranslateCoordinates(
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ int* /* dest_x_return */,
+ int* /* dest_y_return */,
+ Window* /* child_return */
+);
+
+EXTERN int XUndefineCursor(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XUngrabButton(
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+);
+
+EXTERN int XUngrabKey(
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+);
+
+EXTERN int XUngrabKeyboard(
+ Display* /* display */,
+ Time /* time */
+);
+
+EXTERN int XUngrabPointer(
+ Display* /* display */,
+ Time /* time */
+);
+
+EXTERN int XUngrabServer(
+ Display* /* display */
+);
+
+EXTERN int XUninstallColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+EXTERN int XUnloadFont(
+ Display* /* display */,
+ Font /* font */
+);
+
+EXTERN int XUnmapSubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XUnmapWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+EXTERN int XVendorRelease(
+ Display* /* display */
+);
+
+EXTERN int XWarpPointer(
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* src_width */,
+ unsigned int /* src_height */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+EXTERN int XWidthMMOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XWidthOfScreen(
+ Screen* /* screen */
+);
+
+EXTERN int XWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+EXTERN int XWriteBitmapFile(
+ Display* /* display */,
+ _Xconst char* /* filename */,
+ Pixmap /* bitmap */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* x_hot */,
+ int /* y_hot */
+);
+
+EXTERN Bool XSupportsLocale (void);
+
+EXTERN char *XSetLocaleModifiers(
+ const char* /* modifier_list */
+);
+
+EXTERN XOM XOpenOM(
+ Display* /* display */,
+ struct _XrmHashBucketRec* /* rdb */,
+ _Xconst char* /* res_name */,
+ _Xconst char* /* res_class */
+);
+
+EXTERN Status XCloseOM(
+ XOM /* om */
+);
+
+EXTERN char *XSetOMValues(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+EXTERN char *XGetOMValues(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+EXTERN Display *XDisplayOfOM(
+ XOM /* om */
+);
+
+EXTERN char *XLocaleOfOM(
+ XOM /* om */
+);
+
+EXTERN XOC XCreateOC(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+EXTERN void XDestroyOC(
+ XOC /* oc */
+);
+
+EXTERN XOM XOMOfOC(
+ XOC /* oc */
+);
+
+EXTERN char *XSetOCValues(
+ XOC /* oc */,
+ ...
+) _X_SENTINEL(0);
+
+EXTERN char *XGetOCValues(
+ XOC /* oc */,
+ ...
+) _X_SENTINEL(0);
+
+EXTERN XFontSet XCreateFontSet(
+ Display* /* display */,
+ _Xconst char* /* base_font_name_list */,
+ char*** /* missing_charset_list */,
+ int* /* missing_charset_count */,
+ char** /* def_string */
+);
+
+EXTERN void XFreeFontSet(
+ Display* /* display */,
+ XFontSet /* font_set */
+);
+
+EXTERN int XFontsOfFontSet(
+ XFontSet /* font_set */,
+ XFontStruct*** /* font_struct_list */,
+ char*** /* font_name_list */
+);
+
+EXTERN char *XBaseFontNameListOfFontSet(
+ XFontSet /* font_set */
+);
+
+EXTERN char *XLocaleOfFontSet(
+ XFontSet /* font_set */
+);
+
+EXTERN Bool XContextDependentDrawing(
+ XFontSet /* font_set */
+);
+
+EXTERN Bool XDirectionalDependentDrawing(
+ XFontSet /* font_set */
+);
+
+EXTERN Bool XContextualDrawing(
+ XFontSet /* font_set */
+);
+
+EXTERN XFontSetExtents *XExtentsOfFontSet(
+ XFontSet /* font_set */
+);
+
+EXTERN int XmbTextEscapement(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN int XwcTextEscapement(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+EXTERN int Xutf8TextEscapement(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN int XmbTextExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN int XwcTextExtents(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN int Xutf8TextExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN Status XmbTextPerCharExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN Status XwcTextPerCharExtents(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN Status Xutf8TextPerCharExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+EXTERN void XmbDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+);
+
+EXTERN void XwcDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XwcTextItem* /* text_items */,
+ int /* nitems */
+);
+
+EXTERN void Xutf8DrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+);
+
+EXTERN void XmbDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN void XwcDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+EXTERN void Xutf8DrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN void XmbDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN void XwcDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+EXTERN void Xutf8DrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+EXTERN XIM XOpenIM(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */
+);
+
+EXTERN Status XCloseIM(
+ XIM /* im */
+);
+
+EXTERN char *XGetIMValues(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+EXTERN char *XSetIMValues(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+EXTERN Display *XDisplayOfIM(
+ XIM /* im */
+);
+
+EXTERN char *XLocaleOfIM(
+ XIM /* im*/
+);
+
+EXTERN XIC XCreateIC(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+EXTERN void XDestroyIC(
+ XIC /* ic */
+);
+
+EXTERN void XSetICFocus(
+ XIC /* ic */
+);
+
+EXTERN void XUnsetICFocus(
+ XIC /* ic */
+);
+
+EXTERN wchar_t *XwcResetIC(
+ XIC /* ic */
+);
+
+EXTERN char *XmbResetIC(
+ XIC /* ic */
+);
+
+EXTERN char *Xutf8ResetIC(
+ XIC /* ic */
+);
+
+EXTERN char *XSetICValues(
+ XIC /* ic */, ...
+) _X_SENTINEL(0);
+
+EXTERN char *XGetICValues(
+ XIC /* ic */, ...
+) _X_SENTINEL(0);
+
+EXTERN XIM XIMOfIC(
+ XIC /* ic */
+);
+
+EXTERN Bool XFilterEvent(
+ XEvent* /* event */,
+ Window /* window */
+);
+
+EXTERN int XmbLookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+EXTERN int XwcLookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ wchar_t* /* buffer_return */,
+ int /* wchars_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+EXTERN int Xutf8LookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+EXTERN XVaNestedList XVaCreateNestedList(
+ int /*unused*/, ...
+) _X_SENTINEL(0);
+
+/* internal connections for IMs */
+
+EXTERN Bool XRegisterIMInstantiateCallback(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIDProc /* callback */,
+ XPointer /* client_data */
+);
+
+EXTERN Bool XUnregisterIMInstantiateCallback(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIDProc /* callback */,
+ XPointer /* client_data */
+);
+
+typedef void (*XConnectionWatchProc)(
+ Display* /* dpy */,
+ XPointer /* client_data */,
+ int /* fd */,
+ Bool /* opening */, /* open or close flag */
+ XPointer* /* watch_data */ /* open sets, close uses */
+);
+
+
+EXTERN Status XInternalConnectionNumbers(
+ Display* /* dpy */,
+ int** /* fd_return */,
+ int* /* count_return */
+);
+
+EXTERN void XProcessInternalConnection(
+ Display* /* dpy */,
+ int /* fd */
+);
+
+EXTERN Status XAddConnectionWatch(
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+);
+
+EXTERN void XRemoveConnectionWatch(
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+);
+
+EXTERN void XSetAuthorization(
+ char * /* name */,
+ int /* namelen */,
+ char * /* data */,
+ int /* datalen */
+);
+
+EXTERN int _Xmbtowc(
+ wchar_t * /* wstr */,
+ char * /* str */,
+ int /* len */
+);
+
+EXTERN int _Xwctomb(
+ char * /* str */,
+ wchar_t /* wc */
+);
+
+EXTERN Bool XGetEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
+EXTERN void XFreeEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
+#include "tkIntXlibDecls.h"
+
+#ifdef __clang__
+#pragma clang diagnostic pop
#endif
-#endif /* _XLIB_H_ */
+_XFUNCPROTOEND
+
+#endif /* _X11_XLIB_H_ */
diff --git a/xlib/X11/Xutil.h b/xlib/X11/Xutil.h
index bf372fb..eab1225 100644
--- a/xlib/X11/Xutil.h
+++ b/xlib/X11/Xutil.h
@@ -1,8 +1,30 @@
-/* $XConsortium: Xutil.h,v 11.73 91/07/30 16:21:37 rws Exp $ */
/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -10,7 +32,7 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
+supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
@@ -24,13 +46,19 @@ SOFTWARE.
******************************************************************/
-#ifndef _XUTIL_H_
-#define _XUTIL_H_
+#ifndef _X11_XUTIL_H_
+#define _X11_XUTIL_H_
/* You must include <X11/Xlib.h> before including this file */
+#include <X11/Xlib.h>
+#include <X11/keysym.h>
-#if defined(MAC_OSX_TK)
-# define Region XRegion
+/* The Xlib structs are full of implicit padding to properly align members.
+ We can't clean that up without breaking ABI, so tell clang not to bother
+ complaining about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
#endif
/*
@@ -112,6 +140,7 @@ typedef struct {
#define WindowGroupHint (1L << 6)
#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
IconPositionHint|IconMaskHint|WindowGroupHint)
+#define XUrgencyHint (1L << 8)
/* definitions for initial window state */
#define WithdrawnState 0 /* for windows that are not mapped */
@@ -146,7 +175,9 @@ typedef enum {
XStringStyle, /* STRING */
XCompoundTextStyle, /* COMPOUND_TEXT */
XTextStyle, /* text in owner's encoding (current locale)*/
- XStdICCTextStyle /* STRING, else COMPOUND_TEXT */
+ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
+ /* The following is an XFree86 extension, introduced in November 2000 */
+ XUTF8StringStyle /* UTF8_STRING */
} XICCEncodingStyle;
typedef struct {
@@ -160,6 +191,38 @@ typedef struct {
char *res_class;
} XClassHint;
+#ifndef EXTERN
+# define EXTERN extern TCL_STORAGE_CLASS
+#endif
+#if defined(STATIC_BUILD) || !defined(_WIN32)
+# ifndef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS
+# endif
+#elif defined(BUILD_tk)
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS __declspec(dllexport)
+#elif !defined(TCL_STORAGE_CLASS)
+# define TCL_STORAGE_CLASS __declspec(dllimport)
+#endif
+
+#ifdef XUTIL_DEFINE_FUNCTIONS
+EXTERN int XDestroyImage(
+ XImage *ximage);
+EXTERN unsigned long XGetPixel(
+ XImage *ximage,
+ int x, int y);
+EXTERN int XPutPixel(
+ XImage *ximage,
+ int x, int y,
+ unsigned long pixel);
+EXTERN XImage *XSubImage(
+ XImage *ximage,
+ int x, int y,
+ unsigned int width, unsigned int height);
+EXTERN int XAddPixel(
+ XImage *ximage,
+ long value);
+#else
/*
* These macros are used to give some sugar to the image routines so that
* naive people are more comfortable with them.
@@ -174,6 +237,7 @@ typedef struct {
((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
#define XAddPixel(ximage, value) \
((*((ximage)->f.add_pixel))((ximage), (value)))
+#endif
/*
* Compose sequence status structure, used in calling XLookupString.
@@ -187,24 +251,36 @@ typedef struct _XComposeStatus {
* Keysym macros, used on Keysyms to test for classes of symbols
*/
#define IsKeypadKey(keysym) \
- (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal))
+ (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
+
+#define IsPrivateKeypadKey(keysym) \
+ (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
#define IsCursorKey(keysym) \
- (((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select))
+ (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
#define IsPFKey(keysym) \
- (((unsigned)(keysym) >= XK_KP_F1) && ((unsigned)(keysym) <= XK_KP_F4))
+ (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
#define IsFunctionKey(keysym) \
- (((unsigned)(keysym) >= XK_F1) && ((unsigned)(keysym) <= XK_F35))
+ (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
#define IsMiscFunctionKey(keysym) \
- (((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) <= XK_Break))
+ (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
+#ifdef XK_XKB_KEYS
+#define IsModifierKey(keysym) \
+ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || (((KeySym)(keysym) >= XK_ISO_Lock) && \
+ ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \
+ || ((KeySym)(keysym) == XK_Mode_switch) \
+ || ((KeySym)(keysym) == XK_Num_Lock))
+#else
#define IsModifierKey(keysym) \
- ((((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R)) \
- || ((unsigned)(keysym) == XK_Mode_switch) \
- || ((unsigned)(keysym) == XK_Num_Lock))
+ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || ((KeySym)(keysym) == XK_Mode_switch) \
+ || ((KeySym)(keysym) == XK_Num_Lock))
+#endif
/*
* opaque reference to Region data type
*/
@@ -301,329 +377,258 @@ _XFUNCPROTOBEGIN
/* The following declarations are alphabetized. */
-extern XClassHint *XAllocClassHint (
-#if NeedFunctionPrototypes
+EXTERN XClassHint *XAllocClassHint (
void
-#endif
);
-extern XIconSize *XAllocIconSize (
-#if NeedFunctionPrototypes
+EXTERN XIconSize *XAllocIconSize (
void
-#endif
);
-extern XSizeHints *XAllocSizeHints (
-#if NeedFunctionPrototypes
+EXTERN XSizeHints *XAllocSizeHints (
void
-#endif
);
-extern XStandardColormap *XAllocStandardColormap (
-#if NeedFunctionPrototypes
+EXTERN XStandardColormap *XAllocStandardColormap (
void
-#endif
);
-extern XWMHints *XAllocWMHints (
-#if NeedFunctionPrototypes
+EXTERN XWMHints *XAllocWMHints (
void
-#endif
);
-extern void XClipBox(
-#if NeedFunctionPrototypes
+EXTERN int XClipBox(
Region /* r */,
XRectangle* /* rect_return */
-#endif
);
-extern Region XCreateRegion(
-#if NeedFunctionPrototypes
+EXTERN Region XCreateRegion(
void
-#endif
);
-extern char *XDefaultString(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+EXTERN const char *XDefaultString (void);
-extern int XDeleteContext(
-#if NeedFunctionPrototypes
+EXTERN int XDeleteContext(
Display* /* display */,
XID /* rid */,
XContext /* context */
-#endif
);
-extern void XDestroyRegion(
-#if NeedFunctionPrototypes
+EXTERN int XDestroyRegion(
Region /* r */
-#endif
);
-extern Bool XEmptyRegion(
-#if NeedFunctionPrototypes
+EXTERN int XEmptyRegion(
Region /* r */
-#endif
);
-extern Bool XEqualRegion(
-#if NeedFunctionPrototypes
+EXTERN int XEqualRegion(
Region /* r1 */,
Region /* r2 */
-#endif
);
-extern int XFindContext(
-#if NeedFunctionPrototypes
+EXTERN int XFindContext(
Display* /* display */,
XID /* rid */,
XContext /* context */,
XPointer* /* data_return */
-#endif
);
-extern Status XGetClassHint(
-#if NeedFunctionPrototypes
+EXTERN Status XGetClassHint(
Display* /* display */,
Window /* w */,
XClassHint* /* class_hints_return */
-#endif
);
-extern Status XGetIconSizes(
-#if NeedFunctionPrototypes
+EXTERN Status XGetIconSizes(
Display* /* display */,
Window /* w */,
XIconSize** /* size_list_return */,
int* /* count_return */
-#endif
);
-extern Status XGetNormalHints(
-#if NeedFunctionPrototypes
+EXTERN Status XGetNormalHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */
-#endif
);
-extern Status XGetRGBColormaps(
-#if NeedFunctionPrototypes
+EXTERN Status XGetRGBColormaps(
Display* /* display */,
Window /* w */,
XStandardColormap** /* stdcmap_return */,
int* /* count_return */,
Atom /* property */
-#endif
);
-extern Status XGetSizeHints(
-#if NeedFunctionPrototypes
+EXTERN Status XGetSizeHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
Atom /* property */
-#endif
);
-extern Status XGetStandardColormap(
-#if NeedFunctionPrototypes
+EXTERN Status XGetStandardColormap(
Display* /* display */,
Window /* w */,
XStandardColormap* /* colormap_return */,
Atom /* property */
-#endif
);
-extern Status XGetTextProperty(
-#if NeedFunctionPrototypes
+EXTERN Status XGetTextProperty(
Display* /* display */,
Window /* window */,
XTextProperty* /* text_prop_return */,
Atom /* property */
-#endif
);
+EXTERN XVisualInfo *XGetVisualInfo(
+ Display* /* display */,
+ long /* vinfo_mask */,
+ XVisualInfo* /* vinfo_template */,
+ int* /* nitems_return */
+);
-extern Status XGetWMClientMachine(
-#if NeedFunctionPrototypes
+EXTERN Status XGetWMClientMachine(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
-extern XWMHints *XGetWMHints(
-#if NeedFunctionPrototypes
+EXTERN XWMHints *XGetWMHints(
Display* /* display */,
Window /* w */
-#endif
);
-extern Status XGetWMIconName(
-#if NeedFunctionPrototypes
+EXTERN Status XGetWMIconName(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
-extern Status XGetWMName(
-#if NeedFunctionPrototypes
+EXTERN Status XGetWMName(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop_return */
-#endif
);
-extern Status XGetWMNormalHints(
-#if NeedFunctionPrototypes
+EXTERN Status XGetWMNormalHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
long* /* supplied_return */
-#endif
);
-extern Status XGetWMSizeHints(
-#if NeedFunctionPrototypes
+EXTERN Status XGetWMSizeHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints_return */,
long* /* supplied_return */,
Atom /* property */
-#endif
);
-extern Status XGetZoomHints(
-#if NeedFunctionPrototypes
+EXTERN Status XGetZoomHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* zhints_return */
-#endif
);
-extern void XIntersectRegion(
-#if NeedFunctionPrototypes
+EXTERN int XIntersectRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
-extern int XLookupString(
-#if NeedFunctionPrototypes
+EXTERN void XConvertCase(
+ KeySym /* sym */,
+ KeySym* /* lower */,
+ KeySym* /* upper */
+);
+
+EXTERN int XLookupString(
XKeyEvent* /* event_struct */,
char* /* buffer_return */,
int /* bytes_buffer */,
KeySym* /* keysym_return */,
XComposeStatus* /* status_in_out */
-#endif
);
-extern Status XMatchVisualInfo(
-#if NeedFunctionPrototypes
+EXTERN Status XMatchVisualInfo(
Display* /* display */,
int /* screen */,
int /* depth */,
int /* class */,
XVisualInfo* /* vinfo_return */
-#endif
);
-extern int XOffsetRegion(
-#if NeedFunctionPrototypes
+EXTERN int XOffsetRegion(
Region /* r */,
int /* dx */,
int /* dy */
-#endif
);
-extern Bool XPointInRegion(
-#if NeedFunctionPrototypes
+EXTERN Bool XPointInRegion(
Region /* r */,
int /* x */,
int /* y */
-#endif
);
-extern Region XPolygonRegion(
-#if NeedFunctionPrototypes
+EXTERN Region XPolygonRegion(
XPoint* /* points */,
int /* n */,
int /* fill_rule */
-#endif
);
-extern int XRectInRegion(
-#if NeedFunctionPrototypes
+EXTERN int XRectInRegion(
Region /* r */,
int /* x */,
int /* y */,
unsigned int /* width */,
unsigned int /* height */
-#endif
);
-extern int XSaveContext(
-#if NeedFunctionPrototypes
+EXTERN int XSaveContext(
Display* /* display */,
XID /* rid */,
XContext /* context */,
_Xconst char* /* data */
-#endif
);
-extern void XSetClassHint(
-#if NeedFunctionPrototypes
+EXTERN int XSetClassHint(
Display* /* display */,
Window /* w */,
XClassHint* /* class_hints */
-#endif
);
-extern void XSetIconSizes(
-#if NeedFunctionPrototypes
+EXTERN int XSetIconSizes(
Display* /* display */,
Window /* w */,
XIconSize* /* size_list */,
int /* count */
-#endif
);
-extern void XSetNormalHints(
-#if NeedFunctionPrototypes
+EXTERN int XSetNormalHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */
-#endif
);
-extern void XSetRGBColormaps(
-#if NeedFunctionPrototypes
+EXTERN void XSetRGBColormaps(
Display* /* display */,
Window /* w */,
XStandardColormap* /* stdcmaps */,
int /* count */,
Atom /* property */
-#endif
);
-extern void XSetSizeHints(
-#if NeedFunctionPrototypes
+EXTERN int XSetSizeHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */,
Atom /* property */
-#endif
);
-extern void XSetStandardProperties(
-#if NeedFunctionPrototypes
+EXTERN int XSetStandardProperties(
Display* /* display */,
Window /* w */,
_Xconst char* /* window_name */,
@@ -632,52 +637,46 @@ extern void XSetStandardProperties(
char** /* argv */,
int /* argc */,
XSizeHints* /* hints */
-#endif
);
-extern void XSetTextProperty(
-#if NeedFunctionPrototypes
+EXTERN void XSetTextProperty(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */,
Atom /* property */
-#endif
);
-extern void XSetWMHints(
-#if NeedFunctionPrototypes
+EXTERN void XSetWMClientMachine(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+);
+
+EXTERN int XSetWMHints(
Display* /* display */,
Window /* w */,
XWMHints* /* wm_hints */
-#endif
);
-extern void XSetWMIconName(
-#if NeedFunctionPrototypes
+EXTERN void XSetWMIconName(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */
-#endif
);
-extern void XSetWMName(
-#if NeedFunctionPrototypes
+EXTERN void XSetWMName(
Display* /* display */,
Window /* w */,
XTextProperty* /* text_prop */
-#endif
);
-extern void XSetWMNormalHints(
-#if NeedFunctionPrototypes
+EXTERN void XSetWMNormalHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */
-#endif
);
-extern void XSetWMProperties(
-#if NeedFunctionPrototypes
+EXTERN void XSetWMProperties(
Display* /* display */,
Window /* w */,
XTextProperty* /* window_name */,
@@ -687,11 +686,9 @@ extern void XSetWMProperties(
XSizeHints* /* normal_hints */,
XWMHints* /* wm_hints */,
XClassHint* /* class_hints */
-#endif
);
-extern void XmbSetWMProperties(
-#if NeedFunctionPrototypes
+EXTERN void XmbSetWMProperties(
Display* /* display */,
Window /* w */,
_Xconst char* /* window_name */,
@@ -701,129 +698,113 @@ extern void XmbSetWMProperties(
XSizeHints* /* normal_hints */,
XWMHints* /* wm_hints */,
XClassHint* /* class_hints */
-#endif
);
-extern void XSetWMSizeHints(
-#if NeedFunctionPrototypes
+EXTERN void Xutf8SetWMProperties(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+);
+
+EXTERN void XSetWMSizeHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* hints */,
Atom /* property */
-#endif
);
-extern void XSetRegion(
-#if NeedFunctionPrototypes
+EXTERN int XSetRegion(
Display* /* display */,
GC /* gc */,
Region /* r */
-#endif
);
-extern void XSetStandardColormap(
-#if NeedFunctionPrototypes
+EXTERN void XSetStandardColormap(
Display* /* display */,
Window /* w */,
XStandardColormap* /* colormap */,
Atom /* property */
-#endif
);
-extern void XSetZoomHints(
-#if NeedFunctionPrototypes
+EXTERN int XSetZoomHints(
Display* /* display */,
Window /* w */,
XSizeHints* /* zhints */
-#endif
);
-extern void XShrinkRegion(
-#if NeedFunctionPrototypes
+EXTERN int XShrinkRegion(
Region /* r */,
int /* dx */,
int /* dy */
-#endif
-);
-
-extern void XSubtractRegion(
-#if NeedFunctionPrototypes
- Region /* sra */,
- Region /* srb */,
- Region /* dr_return */
-#endif
);
-extern int XmbTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
+EXTERN Status XStringListToTextProperty(
char** /* list */,
int /* count */,
- XICCEncodingStyle /* style */,
XTextProperty* /* text_prop_return */
-#endif
);
-extern int XwcTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
- wchar_t** /* list */,
- int /* count */,
- XICCEncodingStyle /* style */,
- XTextProperty* /* text_prop_return */
-#endif
+EXTERN int XSubtractRegion(
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
);
-extern void XwcFreeStringList(
-#if NeedFunctionPrototypes
- wchar_t** /* list */
-#endif
+EXTERN int XmbTextListToTextProperty(
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
-extern Status XTextPropertyToStringList(
-#if NeedFunctionPrototypes
- XTextProperty* /* text_prop */,
- char*** /* list_return */,
- int* /* count_return */
-#endif
+EXTERN int Xutf8TextListToTextProperty(
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
-extern int XmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
+EXTERN Status XTextPropertyToStringList(
XTextProperty* /* text_prop */,
char*** /* list_return */,
int* /* count_return */
-#endif
);
-extern int XwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
- XTextProperty* /* text_prop */,
- wchar_t*** /* list_return */,
- int* /* count_return */
-#endif
+EXTERN int XmbTextPropertyToTextList(
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
+);
+
+EXTERN int Xutf8TextPropertyToTextList(
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
);
-extern void XUnionRectWithRegion(
-#if NeedFunctionPrototypes
+EXTERN int XUnionRectWithRegion(
XRectangle* /* rectangle */,
Region /* src_region */,
Region /* dest_region_return */
-#endif
);
-extern int XUnionRegion(
-#if NeedFunctionPrototypes
+EXTERN int XUnionRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
-extern int XWMGeometry(
-#if NeedFunctionPrototypes
+EXTERN int XWMGeometry(
Display* /* display */,
int /* screen_number */,
_Xconst char* /* user_geometry */,
@@ -835,21 +816,18 @@ extern int XWMGeometry(
int* /* width_return */,
int* /* height_return */,
int* /* gravity_return */
-#endif
);
-extern void XXorRegion(
-#if NeedFunctionPrototypes
+EXTERN int XXorRegion(
Region /* sra */,
Region /* srb */,
Region /* dr_return */
-#endif
);
-_XFUNCPROTOEND
-
-#if defined(MAC_OSX_TK)
-# undef Region
+#ifdef __clang__
+#pragma clang diagnostic pop
#endif
-#endif /* _XUTIL_H_ */
+_XFUNCPROTOEND
+
+#endif /* _X11_XUTIL_H_ */
diff --git a/xlib/X11/cursorfont.h b/xlib/X11/cursorfont.h
index 617274f..c69d508 100644
--- a/xlib/X11/cursorfont.h
+++ b/xlib/X11/cursorfont.h
@@ -1,4 +1,34 @@
-/* $XConsortium: cursorfont.h,v 1.2 88/09/06 16:44:27 jim Exp $ */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_CURSORFONT_H_
+#define _X11_CURSORFONT_H_
+
#define XC_num_glyphs 154
#define XC_X_cursor 0
#define XC_arrow 2
@@ -77,3 +107,5 @@
#define XC_ur_angle 148
#define XC_watch 150
#define XC_xterm 152
+
+#endif /* _X11_CURSORFONT_H_ */
diff --git a/xlib/X11/keysym.h b/xlib/X11/keysym.h
index 550b76d..0ffdde4 100644
--- a/xlib/X11/keysym.h
+++ b/xlib/X11/keysym.h
@@ -1,8 +1,29 @@
-/* $XConsortium: keysym.h,v 1.13 91/03/13 20:09:49 rws Exp $ */
-
/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -10,7 +31,7 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
+supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
@@ -26,10 +47,28 @@ SOFTWARE.
/* default keysyms */
#define XK_MISCELLANY
+#define XK_XKB_KEYS
#define XK_LATIN1
#define XK_LATIN2
#define XK_LATIN3
#define XK_LATIN4
+#define XK_LATIN8
+#define XK_LATIN9
+#define XK_CAUCASUS
#define XK_GREEK
+#define XK_KATAKANA
+#define XK_ARABIC
+#define XK_CYRILLIC
+#define XK_HEBREW
+#define XK_THAI
+#define XK_KOREAN
+#define XK_ARMENIAN
+#define XK_GEORGIAN
+#define XK_VIETNAMESE
+#define XK_CURRENCY
+#define XK_MATHEMATICAL
+#define XK_BRAILLE
+#define XK_SINHALA
#include <X11/keysymdef.h>
+
diff --git a/xlib/X11/keysymdef.h b/xlib/X11/keysymdef.h
index 460c72d..7fdc64f 100644
--- a/xlib/X11/keysymdef.h
+++ b/xlib/X11/keysymdef.h
@@ -1,8 +1,30 @@
-/* $XConsortium: keysymdef.h,v 1.15 93/04/02 10:57:36 rws Exp $ */
-
/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
+Copyright 1987, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
All Rights Reserved
@@ -10,7 +32,7 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
+supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
@@ -24,65 +46,140 @@ SOFTWARE.
******************************************************************/
-#define XK_VoidSymbol 0xFFFFFF /* void symbol */
+/*
+ * The "X11 Window System Protocol" standard defines in Appendix A the
+ * keysym codes. These 29-bit integer values identify characters or
+ * functions associated with each key (e.g., via the visible
+ * engraving) of a keyboard layout. This file assigns mnemonic macro
+ * names for these keysyms.
+ *
+ * This file is also compiled (by src/util/makekeys.c in libX11) into
+ * hash tables that can be accessed with X11 library functions such as
+ * XStringToKeysym() and XKeysymToString().
+ *
+ * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode
+ * character, this is noted in a comment that provides both the U+xxxx
+ * Unicode position, as well as the official Unicode name of the
+ * character.
+ *
+ * Where the correspondence is either not one-to-one or semantically
+ * unclear, the Unicode position and name are enclosed in
+ * parentheses. Such legacy keysyms should be considered deprecated
+ * and are not recommended for use in future keyboard mappings.
+ *
+ * For any future extension of the keysyms with characters already
+ * found in ISO 10646 / Unicode, the following algorithm shall be
+ * used. The new keysym code position will simply be the character's
+ * Unicode number plus 0x01000000. The keysym values in the range
+ * 0x01000100 to 0x0110ffff are reserved to represent Unicode
+ * characters in the range U+0100 to U+10FFFF.
+ *
+ * While most newer Unicode-based X11 clients do already accept
+ * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it
+ * will remain necessary for clients -- in the interest of
+ * compatibility with existing servers -- to also understand the
+ * existing legacy keysym values in the range 0x0100 to 0x20ff.
+ *
+ * Where several mnemonic names are defined for the same keysym in this
+ * file, all but the first one listed should be considered deprecated.
+ *
+ * Mnemonic names for keysyms are defined in this file with lines
+ * that match one of these Perl regular expressions:
+ *
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/
+ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/
+ *
+ * Before adding new keysyms, please do consider the following: In
+ * addition to the keysym names defined in this file, the
+ * XStringToKeysym() and XKeysymToString() functions will also handle
+ * any keysym string of the form "U0020" to "U007E" and "U00A0" to
+ * "U10FFFF" for all possible Unicode characters. In other words,
+ * every possible Unicode character has already a keysym string
+ * defined algorithmically, even if it is not listed here. Therefore,
+ * defining an additional keysym macro is only necessary where a
+ * non-hexadecimal mnemonic name is needed, or where the new keysym
+ * does not represent any existing Unicode character.
+ *
+ * When adding new keysyms to this file, do not forget to also update the
+ * following as needed:
+ *
+ * - the mappings in src/KeyBind.c in the repo
+ * git://anongit.freedesktop.org/xorg/lib/libX11.git
+ *
+ * - the protocol specification in specs/keysyms.xml
+ * in the repo git://anongit.freedesktop.org/xorg/proto/x11proto.git
+ *
+ */
+
+#define XK_VoidSymbol 0xffffff /* Void symbol */
#ifdef XK_MISCELLANY
/*
- * TTY Functions, cleverly chosen to map to ascii, for convenience of
+ * TTY function keys, cleverly chosen to map to ASCII, for convenience of
* programming, but could have been arbitrary (at the cost of lookup
- * tables in client code.
+ * tables in client code).
*/
-#define XK_BackSpace 0xFF08 /* back space, back char */
-#define XK_Tab 0xFF09
-#define XK_Linefeed 0xFF0A /* Linefeed, LF */
-#define XK_Clear 0xFF0B
-#define XK_Return 0xFF0D /* Return, enter */
-#define XK_Pause 0xFF13 /* Pause, hold */
-#define XK_Scroll_Lock 0xFF14
-#define XK_Sys_Req 0xFF15
-#define XK_Escape 0xFF1B
-#define XK_Delete 0xFFFF /* Delete, rubout */
+#define XK_BackSpace 0xff08 /* Back space, back char */
+#define XK_Tab 0xff09
+#define XK_Linefeed 0xff0a /* Linefeed, LF */
+#define XK_Clear 0xff0b
+#define XK_Return 0xff0d /* Return, enter */
+#define XK_Pause 0xff13 /* Pause, hold */
+#define XK_Scroll_Lock 0xff14
+#define XK_Sys_Req 0xff15
+#define XK_Escape 0xff1b
+#define XK_Delete 0xffff /* Delete, rubout */
/* International & multi-key character composition */
-#define XK_Multi_key 0xFF20 /* Multi-key character compose */
+#define XK_Multi_key 0xff20 /* Multi-key character compose */
+#define XK_Codeinput 0xff37
+#define XK_SingleCandidate 0xff3c
+#define XK_MultipleCandidate 0xff3d
+#define XK_PreviousCandidate 0xff3e
/* Japanese keyboard support */
-#define XK_Kanji 0xFF21 /* Kanji, Kanji convert */
-#define XK_Muhenkan 0xFF22 /* Cancel Conversion */
-#define XK_Henkan_Mode 0xFF23 /* Start/Stop Conversion */
-#define XK_Henkan 0xFF23 /* Alias for Henkan_Mode */
-#define XK_Romaji 0xFF24 /* to Romaji */
-#define XK_Hiragana 0xFF25 /* to Hiragana */
-#define XK_Katakana 0xFF26 /* to Katakana */
-#define XK_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */
-#define XK_Zenkaku 0xFF28 /* to Zenkaku */
-#define XK_Hankaku 0xFF29 /* to Hankaku */
-#define XK_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */
-#define XK_Touroku 0xFF2B /* Add to Dictionary */
-#define XK_Massyo 0xFF2C /* Delete from Dictionary */
-#define XK_Kana_Lock 0xFF2D /* Kana Lock */
-#define XK_Kana_Shift 0xFF2E /* Kana Shift */
-#define XK_Eisu_Shift 0xFF2F /* Alphanumeric Shift */
-#define XK_Eisu_toggle 0xFF30 /* Alphanumeric toggle */
+#define XK_Kanji 0xff21 /* Kanji, Kanji convert */
+#define XK_Muhenkan 0xff22 /* Cancel Conversion */
+#define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */
+#define XK_Henkan 0xff23 /* Alias for Henkan_Mode */
+#define XK_Romaji 0xff24 /* to Romaji */
+#define XK_Hiragana 0xff25 /* to Hiragana */
+#define XK_Katakana 0xff26 /* to Katakana */
+#define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */
+#define XK_Zenkaku 0xff28 /* to Zenkaku */
+#define XK_Hankaku 0xff29 /* to Hankaku */
+#define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */
+#define XK_Touroku 0xff2b /* Add to Dictionary */
+#define XK_Massyo 0xff2c /* Delete from Dictionary */
+#define XK_Kana_Lock 0xff2d /* Kana Lock */
+#define XK_Kana_Shift 0xff2e /* Kana Shift */
+#define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */
+#define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */
+#define XK_Kanji_Bangou 0xff37 /* Codeinput */
+#define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */
+#define XK_Mae_Koho 0xff3e /* Previous Candidate */
+
+/* 0xff31 thru 0xff3f are under XK_KOREAN */
/* Cursor control & motion */
-#define XK_Home 0xFF50
-#define XK_Left 0xFF51 /* Move left, left arrow */
-#define XK_Up 0xFF52 /* Move up, up arrow */
-#define XK_Right 0xFF53 /* Move right, right arrow */
-#define XK_Down 0xFF54 /* Move down, down arrow */
-#define XK_Prior 0xFF55 /* Prior, previous */
-#define XK_Page_Up 0xFF55
-#define XK_Next 0xFF56 /* Next */
-#define XK_Page_Down 0xFF56
-#define XK_End 0xFF57 /* EOL */
-#define XK_Begin 0xFF58 /* BOL */
+#define XK_Home 0xff50
+#define XK_Left 0xff51 /* Move left, left arrow */
+#define XK_Up 0xff52 /* Move up, up arrow */
+#define XK_Right 0xff53 /* Move right, right arrow */
+#define XK_Down 0xff54 /* Move down, down arrow */
+#define XK_Prior 0xff55 /* Prior, previous */
+#define XK_Page_Up 0xff55
+#define XK_Next 0xff56 /* Next */
+#define XK_Page_Down 0xff56
+#define XK_End 0xff57 /* EOL */
+#define XK_Begin 0xff58 /* BOL */
/* Special Windows keyboard keys */
@@ -90,631 +187,923 @@ SOFTWARE.
#define XK_Win_R 0xFF5C /* Right-hand Windows */
#define XK_App 0xFF5D /* Menu key */
-/* Misc Functions */
-
-#define XK_Select 0xFF60 /* Select, mark */
-#define XK_Print 0xFF61
-#define XK_Execute 0xFF62 /* Execute, run, do */
-#define XK_Insert 0xFF63 /* Insert, insert here */
-#define XK_Undo 0xFF65 /* Undo, oops */
-#define XK_Redo 0xFF66 /* redo, again */
-#define XK_Menu 0xFF67
-#define XK_Find 0xFF68 /* Find, search */
-#define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */
-#define XK_Help 0xFF6A /* Help, ? */
-#define XK_Break 0xFF6B
-#define XK_Mode_switch 0xFF7E /* Character set switch */
-#define XK_script_switch 0xFF7E /* Alias for mode_switch */
-#define XK_Num_Lock 0xFF7F
-
-/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
-
-#define XK_KP_Space 0xFF80 /* space */
-#define XK_KP_Tab 0xFF89
-#define XK_KP_Enter 0xFF8D /* enter */
-#define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */
-#define XK_KP_F2 0xFF92
-#define XK_KP_F3 0xFF93
-#define XK_KP_F4 0xFF94
-#define XK_KP_Home 0xFF95
-#define XK_KP_Left 0xFF96
-#define XK_KP_Up 0xFF97
-#define XK_KP_Right 0xFF98
-#define XK_KP_Down 0xFF99
-#define XK_KP_Prior 0xFF9A
-#define XK_KP_Page_Up 0xFF9A
-#define XK_KP_Next 0xFF9B
-#define XK_KP_Page_Down 0xFF9B
-#define XK_KP_End 0xFF9C
-#define XK_KP_Begin 0xFF9D
-#define XK_KP_Insert 0xFF9E
-#define XK_KP_Delete 0xFF9F
-#define XK_KP_Equal 0xFFBD /* equals */
-#define XK_KP_Multiply 0xFFAA
-#define XK_KP_Add 0xFFAB
-#define XK_KP_Separator 0xFFAC /* separator, often comma */
-#define XK_KP_Subtract 0xFFAD
-#define XK_KP_Decimal 0xFFAE
-#define XK_KP_Divide 0xFFAF
-
-#define XK_KP_0 0xFFB0
-#define XK_KP_1 0xFFB1
-#define XK_KP_2 0xFFB2
-#define XK_KP_3 0xFFB3
-#define XK_KP_4 0xFFB4
-#define XK_KP_5 0xFFB5
-#define XK_KP_6 0xFFB6
-#define XK_KP_7 0xFFB7
-#define XK_KP_8 0xFFB8
-#define XK_KP_9 0xFFB9
+/* Misc functions */
+
+#define XK_Select 0xff60 /* Select, mark */
+#define XK_Print 0xff61
+#define XK_Execute 0xff62 /* Execute, run, do */
+#define XK_Insert 0xff63 /* Insert, insert here */
+#define XK_Undo 0xff65
+#define XK_Redo 0xff66 /* Redo, again */
+#define XK_Menu 0xff67
+#define XK_Find 0xff68 /* Find, search */
+#define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */
+#define XK_Help 0xff6a /* Help */
+#define XK_Break 0xff6b
+#define XK_Mode_switch 0xff7e /* Character set switch */
+#define XK_script_switch 0xff7e /* Alias for mode_switch */
+#define XK_Num_Lock 0xff7f
+
+/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */
+
+#define XK_KP_Space 0xff80 /* Space */
+#define XK_KP_Tab 0xff89
+#define XK_KP_Enter 0xff8d /* Enter */
+#define XK_KP_F1 0xff91 /* PF1, KP_A, ... */
+#define XK_KP_F2 0xff92
+#define XK_KP_F3 0xff93
+#define XK_KP_F4 0xff94
+#define XK_KP_Home 0xff95
+#define XK_KP_Left 0xff96
+#define XK_KP_Up 0xff97
+#define XK_KP_Right 0xff98
+#define XK_KP_Down 0xff99
+#define XK_KP_Prior 0xff9a
+#define XK_KP_Page_Up 0xff9a
+#define XK_KP_Next 0xff9b
+#define XK_KP_Page_Down 0xff9b
+#define XK_KP_End 0xff9c
+#define XK_KP_Begin 0xff9d
+#define XK_KP_Insert 0xff9e
+#define XK_KP_Delete 0xff9f
+#define XK_KP_Equal 0xffbd /* Equals */
+#define XK_KP_Multiply 0xffaa
+#define XK_KP_Add 0xffab
+#define XK_KP_Separator 0xffac /* Separator, often comma */
+#define XK_KP_Subtract 0xffad
+#define XK_KP_Decimal 0xffae
+#define XK_KP_Divide 0xffaf
+
+#define XK_KP_0 0xffb0
+#define XK_KP_1 0xffb1
+#define XK_KP_2 0xffb2
+#define XK_KP_3 0xffb3
+#define XK_KP_4 0xffb4
+#define XK_KP_5 0xffb5
+#define XK_KP_6 0xffb6
+#define XK_KP_7 0xffb7
+#define XK_KP_8 0xffb8
+#define XK_KP_9 0xffb9
/*
- * Auxilliary Functions; note the duplicate definitions for left and right
- * function keys; Sun keyboards and a few other manufactures have such
+ * Auxiliary functions; note the duplicate definitions for left and right
+ * function keys; Sun keyboards and a few other manufacturers have such
* function key groups on the left and/or right sides of the keyboard.
* We've not found a keyboard with more than 35 function keys total.
*/
-#define XK_F1 0xFFBE
-#define XK_F2 0xFFBF
-#define XK_F3 0xFFC0
-#define XK_F4 0xFFC1
-#define XK_F5 0xFFC2
-#define XK_F6 0xFFC3
-#define XK_F7 0xFFC4
-#define XK_F8 0xFFC5
-#define XK_F9 0xFFC6
-#define XK_F10 0xFFC7
-#define XK_F11 0xFFC8
-#define XK_L1 0xFFC8
-#define XK_F12 0xFFC9
-#define XK_L2 0xFFC9
-#define XK_F13 0xFFCA
-#define XK_L3 0xFFCA
-#define XK_F14 0xFFCB
-#define XK_L4 0xFFCB
-#define XK_F15 0xFFCC
-#define XK_L5 0xFFCC
-#define XK_F16 0xFFCD
-#define XK_L6 0xFFCD
-#define XK_F17 0xFFCE
-#define XK_L7 0xFFCE
-#define XK_F18 0xFFCF
-#define XK_L8 0xFFCF
-#define XK_F19 0xFFD0
-#define XK_L9 0xFFD0
-#define XK_F20 0xFFD1
-#define XK_L10 0xFFD1
-#define XK_F21 0xFFD2
-#define XK_R1 0xFFD2
-#define XK_F22 0xFFD3
-#define XK_R2 0xFFD3
-#define XK_F23 0xFFD4
-#define XK_R3 0xFFD4
-#define XK_F24 0xFFD5
-#define XK_R4 0xFFD5
-#define XK_F25 0xFFD6
-#define XK_R5 0xFFD6
-#define XK_F26 0xFFD7
-#define XK_R6 0xFFD7
-#define XK_F27 0xFFD8
-#define XK_R7 0xFFD8
-#define XK_F28 0xFFD9
-#define XK_R8 0xFFD9
-#define XK_F29 0xFFDA
-#define XK_R9 0xFFDA
-#define XK_F30 0xFFDB
-#define XK_R10 0xFFDB
-#define XK_F31 0xFFDC
-#define XK_R11 0xFFDC
-#define XK_F32 0xFFDD
-#define XK_R12 0xFFDD
-#define XK_F33 0xFFDE
-#define XK_R13 0xFFDE
-#define XK_F34 0xFFDF
-#define XK_R14 0xFFDF
-#define XK_F35 0xFFE0
-#define XK_R15 0xFFE0
+#define XK_F1 0xffbe
+#define XK_F2 0xffbf
+#define XK_F3 0xffc0
+#define XK_F4 0xffc1
+#define XK_F5 0xffc2
+#define XK_F6 0xffc3
+#define XK_F7 0xffc4
+#define XK_F8 0xffc5
+#define XK_F9 0xffc6
+#define XK_F10 0xffc7
+#define XK_F11 0xffc8
+#define XK_L1 0xffc8
+#define XK_F12 0xffc9
+#define XK_L2 0xffc9
+#define XK_F13 0xffca
+#define XK_L3 0xffca
+#define XK_F14 0xffcb
+#define XK_L4 0xffcb
+#define XK_F15 0xffcc
+#define XK_L5 0xffcc
+#define XK_F16 0xffcd
+#define XK_L6 0xffcd
+#define XK_F17 0xffce
+#define XK_L7 0xffce
+#define XK_F18 0xffcf
+#define XK_L8 0xffcf
+#define XK_F19 0xffd0
+#define XK_L9 0xffd0
+#define XK_F20 0xffd1
+#define XK_L10 0xffd1
+#define XK_F21 0xffd2
+#define XK_R1 0xffd2
+#define XK_F22 0xffd3
+#define XK_R2 0xffd3
+#define XK_F23 0xffd4
+#define XK_R3 0xffd4
+#define XK_F24 0xffd5
+#define XK_R4 0xffd5
+#define XK_F25 0xffd6
+#define XK_R5 0xffd6
+#define XK_F26 0xffd7
+#define XK_R6 0xffd7
+#define XK_F27 0xffd8
+#define XK_R7 0xffd8
+#define XK_F28 0xffd9
+#define XK_R8 0xffd9
+#define XK_F29 0xffda
+#define XK_R9 0xffda
+#define XK_F30 0xffdb
+#define XK_R10 0xffdb
+#define XK_F31 0xffdc
+#define XK_R11 0xffdc
+#define XK_F32 0xffdd
+#define XK_R12 0xffdd
+#define XK_F33 0xffde
+#define XK_R13 0xffde
+#define XK_F34 0xffdf
+#define XK_R14 0xffdf
+#define XK_F35 0xffe0
+#define XK_R15 0xffe0
/* Modifiers */
-#define XK_Shift_L 0xFFE1 /* Left shift */
-#define XK_Shift_R 0xFFE2 /* Right shift */
-#define XK_Control_L 0xFFE3 /* Left control */
-#define XK_Control_R 0xFFE4 /* Right control */
-#define XK_Caps_Lock 0xFFE5 /* Caps lock */
-#define XK_Shift_Lock 0xFFE6 /* Shift lock */
-
-#define XK_Meta_L 0xFFE7 /* Left meta */
-#define XK_Meta_R 0xFFE8 /* Right meta */
-#define XK_Alt_L 0xFFE9 /* Left alt */
-#define XK_Alt_R 0xFFEA /* Right alt */
-#define XK_Super_L 0xFFEB /* Left super */
-#define XK_Super_R 0xFFEC /* Right super */
-#define XK_Hyper_L 0xFFED /* Left hyper */
-#define XK_Hyper_R 0xFFEE /* Right hyper */
+#define XK_Shift_L 0xffe1 /* Left shift */
+#define XK_Shift_R 0xffe2 /* Right shift */
+#define XK_Control_L 0xffe3 /* Left control */
+#define XK_Control_R 0xffe4 /* Right control */
+#define XK_Caps_Lock 0xffe5 /* Caps lock */
+#define XK_Shift_Lock 0xffe6 /* Shift lock */
+
+#define XK_Meta_L 0xffe7 /* Left meta */
+#define XK_Meta_R 0xffe8 /* Right meta */
+#define XK_Alt_L 0xffe9 /* Left alt */
+#define XK_Alt_R 0xffea /* Right alt */
+#define XK_Super_L 0xffeb /* Left super */
+#define XK_Super_R 0xffec /* Right super */
+#define XK_Hyper_L 0xffed /* Left hyper */
+#define XK_Hyper_R 0xffee /* Right hyper */
#endif /* XK_MISCELLANY */
/*
- * Latin 1
- * Byte 3 = 0
+ * Keyboard (XKB) Extension function and modifier keys
+ * (from Appendix C of "The X Keyboard Extension: Protocol Specification")
+ * Byte 3 = 0xfe
+ */
+
+#ifdef XK_XKB_KEYS
+#define XK_ISO_Lock 0xfe01
+#define XK_ISO_Level2_Latch 0xfe02
+#define XK_ISO_Level3_Shift 0xfe03
+#define XK_ISO_Level3_Latch 0xfe04
+#define XK_ISO_Level3_Lock 0xfe05
+#define XK_ISO_Level5_Shift 0xfe11
+#define XK_ISO_Level5_Latch 0xfe12
+#define XK_ISO_Level5_Lock 0xfe13
+#define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */
+#define XK_ISO_Group_Latch 0xfe06
+#define XK_ISO_Group_Lock 0xfe07
+#define XK_ISO_Next_Group 0xfe08
+#define XK_ISO_Next_Group_Lock 0xfe09
+#define XK_ISO_Prev_Group 0xfe0a
+#define XK_ISO_Prev_Group_Lock 0xfe0b
+#define XK_ISO_First_Group 0xfe0c
+#define XK_ISO_First_Group_Lock 0xfe0d
+#define XK_ISO_Last_Group 0xfe0e
+#define XK_ISO_Last_Group_Lock 0xfe0f
+
+#define XK_ISO_Left_Tab 0xfe20
+#define XK_ISO_Move_Line_Up 0xfe21
+#define XK_ISO_Move_Line_Down 0xfe22
+#define XK_ISO_Partial_Line_Up 0xfe23
+#define XK_ISO_Partial_Line_Down 0xfe24
+#define XK_ISO_Partial_Space_Left 0xfe25
+#define XK_ISO_Partial_Space_Right 0xfe26
+#define XK_ISO_Set_Margin_Left 0xfe27
+#define XK_ISO_Set_Margin_Right 0xfe28
+#define XK_ISO_Release_Margin_Left 0xfe29
+#define XK_ISO_Release_Margin_Right 0xfe2a
+#define XK_ISO_Release_Both_Margins 0xfe2b
+#define XK_ISO_Fast_Cursor_Left 0xfe2c
+#define XK_ISO_Fast_Cursor_Right 0xfe2d
+#define XK_ISO_Fast_Cursor_Up 0xfe2e
+#define XK_ISO_Fast_Cursor_Down 0xfe2f
+#define XK_ISO_Continuous_Underline 0xfe30
+#define XK_ISO_Discontinuous_Underline 0xfe31
+#define XK_ISO_Emphasize 0xfe32
+#define XK_ISO_Center_Object 0xfe33
+#define XK_ISO_Enter 0xfe34
+
+#define XK_dead_grave 0xfe50
+#define XK_dead_acute 0xfe51
+#define XK_dead_circumflex 0xfe52
+#define XK_dead_tilde 0xfe53
+#define XK_dead_perispomeni 0xfe53 /* alias for dead_tilde */
+#define XK_dead_macron 0xfe54
+#define XK_dead_breve 0xfe55
+#define XK_dead_abovedot 0xfe56
+#define XK_dead_diaeresis 0xfe57
+#define XK_dead_abovering 0xfe58
+#define XK_dead_doubleacute 0xfe59
+#define XK_dead_caron 0xfe5a
+#define XK_dead_cedilla 0xfe5b
+#define XK_dead_ogonek 0xfe5c
+#define XK_dead_iota 0xfe5d
+#define XK_dead_voiced_sound 0xfe5e
+#define XK_dead_semivoiced_sound 0xfe5f
+#define XK_dead_belowdot 0xfe60
+#define XK_dead_hook 0xfe61
+#define XK_dead_horn 0xfe62
+#define XK_dead_stroke 0xfe63
+#define XK_dead_abovecomma 0xfe64
+#define XK_dead_psili 0xfe64 /* alias for dead_abovecomma */
+#define XK_dead_abovereversedcomma 0xfe65
+#define XK_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */
+#define XK_dead_doublegrave 0xfe66
+#define XK_dead_belowring 0xfe67
+#define XK_dead_belowmacron 0xfe68
+#define XK_dead_belowcircumflex 0xfe69
+#define XK_dead_belowtilde 0xfe6a
+#define XK_dead_belowbreve 0xfe6b
+#define XK_dead_belowdiaeresis 0xfe6c
+#define XK_dead_invertedbreve 0xfe6d
+#define XK_dead_belowcomma 0xfe6e
+#define XK_dead_currency 0xfe6f
+
+/* extra dead elements for German T3 layout */
+#define XK_dead_lowline 0xfe90
+#define XK_dead_aboveverticalline 0xfe91
+#define XK_dead_belowverticalline 0xfe92
+#define XK_dead_longsolidusoverlay 0xfe93
+
+/* dead vowels for universal syllable entry */
+#define XK_dead_a 0xfe80
+#define XK_dead_A 0xfe81
+#define XK_dead_e 0xfe82
+#define XK_dead_E 0xfe83
+#define XK_dead_i 0xfe84
+#define XK_dead_I 0xfe85
+#define XK_dead_o 0xfe86
+#define XK_dead_O 0xfe87
+#define XK_dead_u 0xfe88
+#define XK_dead_U 0xfe89
+#define XK_dead_small_schwa 0xfe8a
+#define XK_dead_capital_schwa 0xfe8b
+
+#define XK_dead_greek 0xfe8c
+
+#define XK_First_Virtual_Screen 0xfed0
+#define XK_Prev_Virtual_Screen 0xfed1
+#define XK_Next_Virtual_Screen 0xfed2
+#define XK_Last_Virtual_Screen 0xfed4
+#define XK_Terminate_Server 0xfed5
+
+#define XK_AccessX_Enable 0xfe70
+#define XK_AccessX_Feedback_Enable 0xfe71
+#define XK_RepeatKeys_Enable 0xfe72
+#define XK_SlowKeys_Enable 0xfe73
+#define XK_BounceKeys_Enable 0xfe74
+#define XK_StickyKeys_Enable 0xfe75
+#define XK_MouseKeys_Enable 0xfe76
+#define XK_MouseKeys_Accel_Enable 0xfe77
+#define XK_Overlay1_Enable 0xfe78
+#define XK_Overlay2_Enable 0xfe79
+#define XK_AudibleBell_Enable 0xfe7a
+
+#define XK_Pointer_Left 0xfee0
+#define XK_Pointer_Right 0xfee1
+#define XK_Pointer_Up 0xfee2
+#define XK_Pointer_Down 0xfee3
+#define XK_Pointer_UpLeft 0xfee4
+#define XK_Pointer_UpRight 0xfee5
+#define XK_Pointer_DownLeft 0xfee6
+#define XK_Pointer_DownRight 0xfee7
+#define XK_Pointer_Button_Dflt 0xfee8
+#define XK_Pointer_Button1 0xfee9
+#define XK_Pointer_Button2 0xfeea
+#define XK_Pointer_Button3 0xfeeb
+#define XK_Pointer_Button4 0xfeec
+#define XK_Pointer_Button5 0xfeed
+#define XK_Pointer_DblClick_Dflt 0xfeee
+#define XK_Pointer_DblClick1 0xfeef
+#define XK_Pointer_DblClick2 0xfef0
+#define XK_Pointer_DblClick3 0xfef1
+#define XK_Pointer_DblClick4 0xfef2
+#define XK_Pointer_DblClick5 0xfef3
+#define XK_Pointer_Drag_Dflt 0xfef4
+#define XK_Pointer_Drag1 0xfef5
+#define XK_Pointer_Drag2 0xfef6
+#define XK_Pointer_Drag3 0xfef7
+#define XK_Pointer_Drag4 0xfef8
+#define XK_Pointer_Drag5 0xfefd
+
+#define XK_Pointer_EnableKeys 0xfef9
+#define XK_Pointer_Accelerate 0xfefa
+#define XK_Pointer_DfltBtnNext 0xfefb
+#define XK_Pointer_DfltBtnPrev 0xfefc
+
+/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */
+
+#define XK_ch 0xfea0
+#define XK_Ch 0xfea1
+#define XK_CH 0xfea2
+#define XK_c_h 0xfea3
+#define XK_C_h 0xfea4
+#define XK_C_H 0xfea5
+
+#endif /* XK_XKB_KEYS */
+
+/*
+ * 3270 Terminal Keys
+ * Byte 3 = 0xfd
+ */
+
+#ifdef XK_3270
+#define XK_3270_Duplicate 0xfd01
+#define XK_3270_FieldMark 0xfd02
+#define XK_3270_Right2 0xfd03
+#define XK_3270_Left2 0xfd04
+#define XK_3270_BackTab 0xfd05
+#define XK_3270_EraseEOF 0xfd06
+#define XK_3270_EraseInput 0xfd07
+#define XK_3270_Reset 0xfd08
+#define XK_3270_Quit 0xfd09
+#define XK_3270_PA1 0xfd0a
+#define XK_3270_PA2 0xfd0b
+#define XK_3270_PA3 0xfd0c
+#define XK_3270_Test 0xfd0d
+#define XK_3270_Attn 0xfd0e
+#define XK_3270_CursorBlink 0xfd0f
+#define XK_3270_AltCursor 0xfd10
+#define XK_3270_KeyClick 0xfd11
+#define XK_3270_Jump 0xfd12
+#define XK_3270_Ident 0xfd13
+#define XK_3270_Rule 0xfd14
+#define XK_3270_Copy 0xfd15
+#define XK_3270_Play 0xfd16
+#define XK_3270_Setup 0xfd17
+#define XK_3270_Record 0xfd18
+#define XK_3270_ChangeScreen 0xfd19
+#define XK_3270_DeleteWord 0xfd1a
+#define XK_3270_ExSelect 0xfd1b
+#define XK_3270_CursorSelect 0xfd1c
+#define XK_3270_PrintScreen 0xfd1d
+#define XK_3270_Enter 0xfd1e
+#endif /* XK_3270 */
+
+/*
+ * Latin 1
+ * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF)
+ * Byte 3 = 0
*/
#ifdef XK_LATIN1
-#define XK_space 0x020
-#define XK_exclam 0x021
-#define XK_quotedbl 0x022
-#define XK_numbersign 0x023
-#define XK_dollar 0x024
-#define XK_percent 0x025
-#define XK_ampersand 0x026
-#define XK_apostrophe 0x027
-#define XK_quoteright 0x027 /* deprecated */
-#define XK_parenleft 0x028
-#define XK_parenright 0x029
-#define XK_asterisk 0x02a
-#define XK_plus 0x02b
-#define XK_comma 0x02c
-#define XK_minus 0x02d
-#define XK_period 0x02e
-#define XK_slash 0x02f
-#define XK_0 0x030
-#define XK_1 0x031
-#define XK_2 0x032
-#define XK_3 0x033
-#define XK_4 0x034
-#define XK_5 0x035
-#define XK_6 0x036
-#define XK_7 0x037
-#define XK_8 0x038
-#define XK_9 0x039
-#define XK_colon 0x03a
-#define XK_semicolon 0x03b
-#define XK_less 0x03c
-#define XK_equal 0x03d
-#define XK_greater 0x03e
-#define XK_question 0x03f
-#define XK_at 0x040
-#define XK_A 0x041
-#define XK_B 0x042
-#define XK_C 0x043
-#define XK_D 0x044
-#define XK_E 0x045
-#define XK_F 0x046
-#define XK_G 0x047
-#define XK_H 0x048
-#define XK_I 0x049
-#define XK_J 0x04a
-#define XK_K 0x04b
-#define XK_L 0x04c
-#define XK_M 0x04d
-#define XK_N 0x04e
-#define XK_O 0x04f
-#define XK_P 0x050
-#define XK_Q 0x051
-#define XK_R 0x052
-#define XK_S 0x053
-#define XK_T 0x054
-#define XK_U 0x055
-#define XK_V 0x056
-#define XK_W 0x057
-#define XK_X 0x058
-#define XK_Y 0x059
-#define XK_Z 0x05a
-#define XK_bracketleft 0x05b
-#define XK_backslash 0x05c
-#define XK_bracketright 0x05d
-#define XK_asciicircum 0x05e
-#define XK_underscore 0x05f
-#define XK_grave 0x060
-#define XK_quoteleft 0x060 /* deprecated */
-#define XK_a 0x061
-#define XK_b 0x062
-#define XK_c 0x063
-#define XK_d 0x064
-#define XK_e 0x065
-#define XK_f 0x066
-#define XK_g 0x067
-#define XK_h 0x068
-#define XK_i 0x069
-#define XK_j 0x06a
-#define XK_k 0x06b
-#define XK_l 0x06c
-#define XK_m 0x06d
-#define XK_n 0x06e
-#define XK_o 0x06f
-#define XK_p 0x070
-#define XK_q 0x071
-#define XK_r 0x072
-#define XK_s 0x073
-#define XK_t 0x074
-#define XK_u 0x075
-#define XK_v 0x076
-#define XK_w 0x077
-#define XK_x 0x078
-#define XK_y 0x079
-#define XK_z 0x07a
-#define XK_braceleft 0x07b
-#define XK_bar 0x07c
-#define XK_braceright 0x07d
-#define XK_asciitilde 0x07e
-
-#define XK_nobreakspace 0x0a0
-#define XK_exclamdown 0x0a1
-#define XK_cent 0x0a2
-#define XK_sterling 0x0a3
-#define XK_currency 0x0a4
-#define XK_yen 0x0a5
-#define XK_brokenbar 0x0a6
-#define XK_section 0x0a7
-#define XK_diaeresis 0x0a8
-#define XK_copyright 0x0a9
-#define XK_ordfeminine 0x0aa
-#define XK_guillemotleft 0x0ab /* left angle quotation mark */
-#define XK_notsign 0x0ac
-#define XK_hyphen 0x0ad
-#define XK_registered 0x0ae
-#define XK_macron 0x0af
-#define XK_degree 0x0b0
-#define XK_plusminus 0x0b1
-#define XK_twosuperior 0x0b2
-#define XK_threesuperior 0x0b3
-#define XK_acute 0x0b4
-#define XK_mu 0x0b5
-#define XK_paragraph 0x0b6
-#define XK_periodcentered 0x0b7
-#define XK_cedilla 0x0b8
-#define XK_onesuperior 0x0b9
-#define XK_masculine 0x0ba
-#define XK_guillemotright 0x0bb /* right angle quotation mark */
-#define XK_onequarter 0x0bc
-#define XK_onehalf 0x0bd
-#define XK_threequarters 0x0be
-#define XK_questiondown 0x0bf
-#define XK_Agrave 0x0c0
-#define XK_Aacute 0x0c1
-#define XK_Acircumflex 0x0c2
-#define XK_Atilde 0x0c3
-#define XK_Adiaeresis 0x0c4
-#define XK_Aring 0x0c5
-#define XK_AE 0x0c6
-#define XK_Ccedilla 0x0c7
-#define XK_Egrave 0x0c8
-#define XK_Eacute 0x0c9
-#define XK_Ecircumflex 0x0ca
-#define XK_Ediaeresis 0x0cb
-#define XK_Igrave 0x0cc
-#define XK_Iacute 0x0cd
-#define XK_Icircumflex 0x0ce
-#define XK_Idiaeresis 0x0cf
-#define XK_ETH 0x0d0
-#define XK_Eth 0x0d0 /* deprecated */
-#define XK_Ntilde 0x0d1
-#define XK_Ograve 0x0d2
-#define XK_Oacute 0x0d3
-#define XK_Ocircumflex 0x0d4
-#define XK_Otilde 0x0d5
-#define XK_Odiaeresis 0x0d6
-#define XK_multiply 0x0d7
-#define XK_Oslash 0x0d8
-#define XK_Ooblique 0x0d8
-#define XK_Ugrave 0x0d9
-#define XK_Uacute 0x0da
-#define XK_Ucircumflex 0x0db
-#define XK_Udiaeresis 0x0dc
-#define XK_Yacute 0x0dd
-#define XK_THORN 0x0de
-#define XK_Thorn 0x0de /* deprecated */
-#define XK_ssharp 0x0df
-#define XK_agrave 0x0e0
-#define XK_aacute 0x0e1
-#define XK_acircumflex 0x0e2
-#define XK_atilde 0x0e3
-#define XK_adiaeresis 0x0e4
-#define XK_aring 0x0e5
-#define XK_ae 0x0e6
-#define XK_ccedilla 0x0e7
-#define XK_egrave 0x0e8
-#define XK_eacute 0x0e9
-#define XK_ecircumflex 0x0ea
-#define XK_ediaeresis 0x0eb
-#define XK_igrave 0x0ec
-#define XK_iacute 0x0ed
-#define XK_icircumflex 0x0ee
-#define XK_idiaeresis 0x0ef
-#define XK_eth 0x0f0
-#define XK_ntilde 0x0f1
-#define XK_ograve 0x0f2
-#define XK_oacute 0x0f3
-#define XK_ocircumflex 0x0f4
-#define XK_otilde 0x0f5
-#define XK_odiaeresis 0x0f6
-#define XK_division 0x0f7
-#define XK_oslash 0x0f8
-#define XK_ugrave 0x0f9
-#define XK_uacute 0x0fa
-#define XK_ucircumflex 0x0fb
-#define XK_udiaeresis 0x0fc
-#define XK_yacute 0x0fd
-#define XK_thorn 0x0fe
-#define XK_ydiaeresis 0x0ff
+#define XK_space 0x0020 /* U+0020 SPACE */
+#define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */
+#define XK_quotedbl 0x0022 /* U+0022 QUOTATION MARK */
+#define XK_numbersign 0x0023 /* U+0023 NUMBER SIGN */
+#define XK_dollar 0x0024 /* U+0024 DOLLAR SIGN */
+#define XK_percent 0x0025 /* U+0025 PERCENT SIGN */
+#define XK_ampersand 0x0026 /* U+0026 AMPERSAND */
+#define XK_apostrophe 0x0027 /* U+0027 APOSTROPHE */
+#define XK_quoteright 0x0027 /* deprecated */
+#define XK_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */
+#define XK_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */
+#define XK_asterisk 0x002a /* U+002A ASTERISK */
+#define XK_plus 0x002b /* U+002B PLUS SIGN */
+#define XK_comma 0x002c /* U+002C COMMA */
+#define XK_minus 0x002d /* U+002D HYPHEN-MINUS */
+#define XK_period 0x002e /* U+002E FULL STOP */
+#define XK_slash 0x002f /* U+002F SOLIDUS */
+#define XK_0 0x0030 /* U+0030 DIGIT ZERO */
+#define XK_1 0x0031 /* U+0031 DIGIT ONE */
+#define XK_2 0x0032 /* U+0032 DIGIT TWO */
+#define XK_3 0x0033 /* U+0033 DIGIT THREE */
+#define XK_4 0x0034 /* U+0034 DIGIT FOUR */
+#define XK_5 0x0035 /* U+0035 DIGIT FIVE */
+#define XK_6 0x0036 /* U+0036 DIGIT SIX */
+#define XK_7 0x0037 /* U+0037 DIGIT SEVEN */
+#define XK_8 0x0038 /* U+0038 DIGIT EIGHT */
+#define XK_9 0x0039 /* U+0039 DIGIT NINE */
+#define XK_colon 0x003a /* U+003A COLON */
+#define XK_semicolon 0x003b /* U+003B SEMICOLON */
+#define XK_less 0x003c /* U+003C LESS-THAN SIGN */
+#define XK_equal 0x003d /* U+003D EQUALS SIGN */
+#define XK_greater 0x003e /* U+003E GREATER-THAN SIGN */
+#define XK_question 0x003f /* U+003F QUESTION MARK */
+#define XK_at 0x0040 /* U+0040 COMMERCIAL AT */
+#define XK_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */
+#define XK_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */
+#define XK_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */
+#define XK_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */
+#define XK_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */
+#define XK_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */
+#define XK_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */
+#define XK_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */
+#define XK_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */
+#define XK_J 0x004a /* U+004A LATIN CAPITAL LETTER J */
+#define XK_K 0x004b /* U+004B LATIN CAPITAL LETTER K */
+#define XK_L 0x004c /* U+004C LATIN CAPITAL LETTER L */
+#define XK_M 0x004d /* U+004D LATIN CAPITAL LETTER M */
+#define XK_N 0x004e /* U+004E LATIN CAPITAL LETTER N */
+#define XK_O 0x004f /* U+004F LATIN CAPITAL LETTER O */
+#define XK_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */
+#define XK_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */
+#define XK_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */
+#define XK_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */
+#define XK_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */
+#define XK_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */
+#define XK_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */
+#define XK_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */
+#define XK_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */
+#define XK_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */
+#define XK_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */
+#define XK_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */
+#define XK_backslash 0x005c /* U+005C REVERSE SOLIDUS */
+#define XK_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */
+#define XK_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */
+#define XK_underscore 0x005f /* U+005F LOW LINE */
+#define XK_grave 0x0060 /* U+0060 GRAVE ACCENT */
+#define XK_quoteleft 0x0060 /* deprecated */
+#define XK_a 0x0061 /* U+0061 LATIN SMALL LETTER A */
+#define XK_b 0x0062 /* U+0062 LATIN SMALL LETTER B */
+#define XK_c 0x0063 /* U+0063 LATIN SMALL LETTER C */
+#define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
+#define XK_e 0x0065 /* U+0065 LATIN SMALL LETTER E */
+#define XK_f 0x0066 /* U+0066 LATIN SMALL LETTER F */
+#define XK_g 0x0067 /* U+0067 LATIN SMALL LETTER G */
+#define XK_h 0x0068 /* U+0068 LATIN SMALL LETTER H */
+#define XK_i 0x0069 /* U+0069 LATIN SMALL LETTER I */
+#define XK_j 0x006a /* U+006A LATIN SMALL LETTER J */
+#define XK_k 0x006b /* U+006B LATIN SMALL LETTER K */
+#define XK_l 0x006c /* U+006C LATIN SMALL LETTER L */
+#define XK_m 0x006d /* U+006D LATIN SMALL LETTER M */
+#define XK_n 0x006e /* U+006E LATIN SMALL LETTER N */
+#define XK_o 0x006f /* U+006F LATIN SMALL LETTER O */
+#define XK_p 0x0070 /* U+0070 LATIN SMALL LETTER P */
+#define XK_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */
+#define XK_r 0x0072 /* U+0072 LATIN SMALL LETTER R */
+#define XK_s 0x0073 /* U+0073 LATIN SMALL LETTER S */
+#define XK_t 0x0074 /* U+0074 LATIN SMALL LETTER T */
+#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */
+#define XK_v 0x0076 /* U+0076 LATIN SMALL LETTER V */
+#define XK_w 0x0077 /* U+0077 LATIN SMALL LETTER W */
+#define XK_x 0x0078 /* U+0078 LATIN SMALL LETTER X */
+#define XK_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */
+#define XK_z 0x007a /* U+007A LATIN SMALL LETTER Z */
+#define XK_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */
+#define XK_bar 0x007c /* U+007C VERTICAL LINE */
+#define XK_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */
+#define XK_asciitilde 0x007e /* U+007E TILDE */
+
+#define XK_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */
+#define XK_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */
+#define XK_cent 0x00a2 /* U+00A2 CENT SIGN */
+#define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */
+#define XK_currency 0x00a4 /* U+00A4 CURRENCY SIGN */
+#define XK_yen 0x00a5 /* U+00A5 YEN SIGN */
+#define XK_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */
+#define XK_section 0x00a7 /* U+00A7 SECTION SIGN */
+#define XK_diaeresis 0x00a8 /* U+00A8 DIAERESIS */
+#define XK_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */
+#define XK_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */
+#define XK_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_notsign 0x00ac /* U+00AC NOT SIGN */
+#define XK_hyphen 0x00ad /* U+00AD SOFT HYPHEN */
+#define XK_registered 0x00ae /* U+00AE REGISTERED SIGN */
+#define XK_macron 0x00af /* U+00AF MACRON */
+#define XK_degree 0x00b0 /* U+00B0 DEGREE SIGN */
+#define XK_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */
+#define XK_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */
+#define XK_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */
+#define XK_acute 0x00b4 /* U+00B4 ACUTE ACCENT */
+#define XK_mu 0x00b5 /* U+00B5 MICRO SIGN */
+#define XK_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */
+#define XK_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */
+#define XK_cedilla 0x00b8 /* U+00B8 CEDILLA */
+#define XK_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */
+#define XK_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */
+#define XK_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
+#define XK_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */
+#define XK_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */
+#define XK_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */
+#define XK_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */
+#define XK_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */
+#define XK_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */
+#define XK_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
+#define XK_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */
+#define XK_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */
+#define XK_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */
+#define XK_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */
+#define XK_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */
+#define XK_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */
+#define XK_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */
+#define XK_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
+#define XK_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */
+#define XK_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */
+#define XK_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */
+#define XK_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
+#define XK_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */
+#define XK_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */
+#define XK_Eth 0x00d0 /* deprecated */
+#define XK_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */
+#define XK_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */
+#define XK_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */
+#define XK_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
+#define XK_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */
+#define XK_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */
+#define XK_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */
+#define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
+#define XK_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */
+#define XK_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */
+#define XK_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
+#define XK_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */
+#define XK_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */
+#define XK_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */
+#define XK_Thorn 0x00de /* deprecated */
+#define XK_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */
+#define XK_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */
+#define XK_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */
+#define XK_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */
+#define XK_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */
+#define XK_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */
+#define XK_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */
+#define XK_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */
+#define XK_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */
+#define XK_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */
+#define XK_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
+#define XK_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */
+#define XK_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */
+#define XK_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */
+#define XK_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */
+#define XK_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */
+#define XK_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */
+#define XK_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */
+#define XK_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */
+#define XK_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */
+#define XK_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */
+#define XK_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */
+#define XK_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */
+#define XK_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */
+#define XK_division 0x00f7 /* U+00F7 DIVISION SIGN */
+#define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
+#define XK_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */
+#define XK_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */
+#define XK_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */
+#define XK_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */
+#define XK_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */
+#define XK_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */
+#define XK_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
#endif /* XK_LATIN1 */
/*
- * Latin 2
- * Byte 3 = 1
+ * Latin 2
+ * Byte 3 = 1
*/
#ifdef XK_LATIN2
-#define XK_Aogonek 0x1a1
-#define XK_breve 0x1a2
-#define XK_Lstroke 0x1a3
-#define XK_Lcaron 0x1a5
-#define XK_Sacute 0x1a6
-#define XK_Scaron 0x1a9
-#define XK_Scedilla 0x1aa
-#define XK_Tcaron 0x1ab
-#define XK_Zacute 0x1ac
-#define XK_Zcaron 0x1ae
-#define XK_Zabovedot 0x1af
-#define XK_aogonek 0x1b1
-#define XK_ogonek 0x1b2
-#define XK_lstroke 0x1b3
-#define XK_lcaron 0x1b5
-#define XK_sacute 0x1b6
-#define XK_caron 0x1b7
-#define XK_scaron 0x1b9
-#define XK_scedilla 0x1ba
-#define XK_tcaron 0x1bb
-#define XK_zacute 0x1bc
-#define XK_doubleacute 0x1bd
-#define XK_zcaron 0x1be
-#define XK_zabovedot 0x1bf
-#define XK_Racute 0x1c0
-#define XK_Abreve 0x1c3
-#define XK_Lacute 0x1c5
-#define XK_Cacute 0x1c6
-#define XK_Ccaron 0x1c8
-#define XK_Eogonek 0x1ca
-#define XK_Ecaron 0x1cc
-#define XK_Dcaron 0x1cf
-#define XK_Dstroke 0x1d0
-#define XK_Nacute 0x1d1
-#define XK_Ncaron 0x1d2
-#define XK_Odoubleacute 0x1d5
-#define XK_Rcaron 0x1d8
-#define XK_Uring 0x1d9
-#define XK_Udoubleacute 0x1db
-#define XK_Tcedilla 0x1de
-#define XK_racute 0x1e0
-#define XK_abreve 0x1e3
-#define XK_lacute 0x1e5
-#define XK_cacute 0x1e6
-#define XK_ccaron 0x1e8
-#define XK_eogonek 0x1ea
-#define XK_ecaron 0x1ec
-#define XK_dcaron 0x1ef
-#define XK_dstroke 0x1f0
-#define XK_nacute 0x1f1
-#define XK_ncaron 0x1f2
-#define XK_odoubleacute 0x1f5
-#define XK_udoubleacute 0x1fb
-#define XK_rcaron 0x1f8
-#define XK_uring 0x1f9
-#define XK_tcedilla 0x1fe
-#define XK_abovedot 0x1ff
+#define XK_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */
+#define XK_breve 0x01a2 /* U+02D8 BREVE */
+#define XK_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */
+#define XK_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */
+#define XK_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */
+#define XK_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */
+#define XK_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */
+#define XK_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */
+#define XK_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */
+#define XK_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */
+#define XK_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */
+#define XK_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */
+#define XK_ogonek 0x01b2 /* U+02DB OGONEK */
+#define XK_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */
+#define XK_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */
+#define XK_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */
+#define XK_caron 0x01b7 /* U+02C7 CARON */
+#define XK_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */
+#define XK_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */
+#define XK_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */
+#define XK_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */
+#define XK_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */
+#define XK_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */
+#define XK_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */
+#define XK_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */
+#define XK_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */
+#define XK_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */
+#define XK_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */
+#define XK_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */
+#define XK_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */
+#define XK_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */
+#define XK_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */
+#define XK_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */
+#define XK_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */
+#define XK_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */
+#define XK_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */
+#define XK_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */
+#define XK_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */
+#define XK_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */
+#define XK_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */
+#define XK_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */
+#define XK_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */
+#define XK_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */
+#define XK_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */
+#define XK_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */
+#define XK_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */
+#define XK_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */
+#define XK_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */
+#define XK_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */
+#define XK_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */
+#define XK_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */
+#define XK_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */
+#define XK_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */
+#define XK_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */
+#define XK_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */
+#define XK_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */
+#define XK_abovedot 0x01ff /* U+02D9 DOT ABOVE */
#endif /* XK_LATIN2 */
/*
- * Latin 3
- * Byte 3 = 2
+ * Latin 3
+ * Byte 3 = 2
*/
#ifdef XK_LATIN3
-#define XK_Hstroke 0x2a1
-#define XK_Hcircumflex 0x2a6
-#define XK_Iabovedot 0x2a9
-#define XK_Gbreve 0x2ab
-#define XK_Jcircumflex 0x2ac
-#define XK_hstroke 0x2b1
-#define XK_hcircumflex 0x2b6
-#define XK_idotless 0x2b9
-#define XK_gbreve 0x2bb
-#define XK_jcircumflex 0x2bc
-#define XK_Cabovedot 0x2c5
-#define XK_Ccircumflex 0x2c6
-#define XK_Gabovedot 0x2d5
-#define XK_Gcircumflex 0x2d8
-#define XK_Ubreve 0x2dd
-#define XK_Scircumflex 0x2de
-#define XK_cabovedot 0x2e5
-#define XK_ccircumflex 0x2e6
-#define XK_gabovedot 0x2f5
-#define XK_gcircumflex 0x2f8
-#define XK_ubreve 0x2fd
-#define XK_scircumflex 0x2fe
+#define XK_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */
+#define XK_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */
+#define XK_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */
+#define XK_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */
+#define XK_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */
+#define XK_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */
+#define XK_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */
+#define XK_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */
+#define XK_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */
+#define XK_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */
+#define XK_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */
+#define XK_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */
+#define XK_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */
+#define XK_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */
+#define XK_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */
+#define XK_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */
+#define XK_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */
+#define XK_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */
+#define XK_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */
+#define XK_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */
+#define XK_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */
+#define XK_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */
#endif /* XK_LATIN3 */
/*
- * Latin 4
- * Byte 3 = 3
+ * Latin 4
+ * Byte 3 = 3
*/
#ifdef XK_LATIN4
-#define XK_kra 0x3a2
-#define XK_kappa 0x3a2 /* deprecated */
-#define XK_Rcedilla 0x3a3
-#define XK_Itilde 0x3a5
-#define XK_Lcedilla 0x3a6
-#define XK_Emacron 0x3aa
-#define XK_Gcedilla 0x3ab
-#define XK_Tslash 0x3ac
-#define XK_rcedilla 0x3b3
-#define XK_itilde 0x3b5
-#define XK_lcedilla 0x3b6
-#define XK_emacron 0x3ba
-#define XK_gcedilla 0x3bb
-#define XK_tslash 0x3bc
-#define XK_ENG 0x3bd
-#define XK_eng 0x3bf
-#define XK_Amacron 0x3c0
-#define XK_Iogonek 0x3c7
-#define XK_Eabovedot 0x3cc
-#define XK_Imacron 0x3cf
-#define XK_Ncedilla 0x3d1
-#define XK_Omacron 0x3d2
-#define XK_Kcedilla 0x3d3
-#define XK_Uogonek 0x3d9
-#define XK_Utilde 0x3dd
-#define XK_Umacron 0x3de
-#define XK_amacron 0x3e0
-#define XK_iogonek 0x3e7
-#define XK_eabovedot 0x3ec
-#define XK_imacron 0x3ef
-#define XK_ncedilla 0x3f1
-#define XK_omacron 0x3f2
-#define XK_kcedilla 0x3f3
-#define XK_uogonek 0x3f9
-#define XK_utilde 0x3fd
-#define XK_umacron 0x3fe
+#define XK_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */
+#define XK_kappa 0x03a2 /* deprecated */
+#define XK_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */
+#define XK_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */
+#define XK_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */
+#define XK_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */
+#define XK_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */
+#define XK_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */
+#define XK_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */
+#define XK_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */
+#define XK_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */
+#define XK_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */
+#define XK_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */
+#define XK_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */
+#define XK_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */
+#define XK_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */
+#define XK_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */
+#define XK_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */
+#define XK_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */
+#define XK_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */
+#define XK_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */
+#define XK_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */
+#define XK_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */
+#define XK_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */
+#define XK_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */
+#define XK_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */
+#define XK_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */
+#define XK_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */
+#define XK_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */
+#define XK_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */
+#define XK_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */
+#define XK_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */
+#define XK_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */
+#define XK_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */
+#define XK_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */
+#define XK_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */
#endif /* XK_LATIN4 */
/*
+ * Latin 8
+ */
+#ifdef XK_LATIN8
+#define XK_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */
+#define XK_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */
+#define XK_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */
+#define XK_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */
+#define XK_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */
+#define XK_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */
+#define XK_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */
+#define XK_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */
+#define XK_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */
+#define XK_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */
+#define XK_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */
+#define XK_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */
+#define XK_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */
+#define XK_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */
+#define XK_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */
+#define XK_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */
+#define XK_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */
+#define XK_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */
+#define XK_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */
+#define XK_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */
+#define XK_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */
+#define XK_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */
+#define XK_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */
+#define XK_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */
+#define XK_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */
+#define XK_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */
+#endif /* XK_LATIN8 */
+
+/*
+ * Latin 9
+ * Byte 3 = 0x13
+ */
+
+#ifdef XK_LATIN9
+#define XK_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */
+#define XK_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */
+#define XK_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */
+#endif /* XK_LATIN9 */
+
+/*
* Katakana
* Byte 3 = 4
*/
#ifdef XK_KATAKANA
-#define XK_overline 0x47e
-#define XK_kana_fullstop 0x4a1
-#define XK_kana_openingbracket 0x4a2
-#define XK_kana_closingbracket 0x4a3
-#define XK_kana_comma 0x4a4
-#define XK_kana_conjunctive 0x4a5
-#define XK_kana_middledot 0x4a5 /* deprecated */
-#define XK_kana_WO 0x4a6
-#define XK_kana_a 0x4a7
-#define XK_kana_i 0x4a8
-#define XK_kana_u 0x4a9
-#define XK_kana_e 0x4aa
-#define XK_kana_o 0x4ab
-#define XK_kana_ya 0x4ac
-#define XK_kana_yu 0x4ad
-#define XK_kana_yo 0x4ae
-#define XK_kana_tsu 0x4af
-#define XK_kana_tu 0x4af /* deprecated */
-#define XK_prolongedsound 0x4b0
-#define XK_kana_A 0x4b1
-#define XK_kana_I 0x4b2
-#define XK_kana_U 0x4b3
-#define XK_kana_E 0x4b4
-#define XK_kana_O 0x4b5
-#define XK_kana_KA 0x4b6
-#define XK_kana_KI 0x4b7
-#define XK_kana_KU 0x4b8
-#define XK_kana_KE 0x4b9
-#define XK_kana_KO 0x4ba
-#define XK_kana_SA 0x4bb
-#define XK_kana_SHI 0x4bc
-#define XK_kana_SU 0x4bd
-#define XK_kana_SE 0x4be
-#define XK_kana_SO 0x4bf
-#define XK_kana_TA 0x4c0
-#define XK_kana_CHI 0x4c1
-#define XK_kana_TI 0x4c1 /* deprecated */
-#define XK_kana_TSU 0x4c2
-#define XK_kana_TU 0x4c2 /* deprecated */
-#define XK_kana_TE 0x4c3
-#define XK_kana_TO 0x4c4
-#define XK_kana_NA 0x4c5
-#define XK_kana_NI 0x4c6
-#define XK_kana_NU 0x4c7
-#define XK_kana_NE 0x4c8
-#define XK_kana_NO 0x4c9
-#define XK_kana_HA 0x4ca
-#define XK_kana_HI 0x4cb
-#define XK_kana_FU 0x4cc
-#define XK_kana_HU 0x4cc /* deprecated */
-#define XK_kana_HE 0x4cd
-#define XK_kana_HO 0x4ce
-#define XK_kana_MA 0x4cf
-#define XK_kana_MI 0x4d0
-#define XK_kana_MU 0x4d1
-#define XK_kana_ME 0x4d2
-#define XK_kana_MO 0x4d3
-#define XK_kana_YA 0x4d4
-#define XK_kana_YU 0x4d5
-#define XK_kana_YO 0x4d6
-#define XK_kana_RA 0x4d7
-#define XK_kana_RI 0x4d8
-#define XK_kana_RU 0x4d9
-#define XK_kana_RE 0x4da
-#define XK_kana_RO 0x4db
-#define XK_kana_WA 0x4dc
-#define XK_kana_N 0x4dd
-#define XK_voicedsound 0x4de
-#define XK_semivoicedsound 0x4df
-#define XK_kana_switch 0xFF7E /* Alias for mode_switch */
+#define XK_overline 0x047e /* U+203E OVERLINE */
+#define XK_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */
+#define XK_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */
+#define XK_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */
+#define XK_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */
+#define XK_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */
+#define XK_kana_middledot 0x04a5 /* deprecated */
+#define XK_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */
+#define XK_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */
+#define XK_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */
+#define XK_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */
+#define XK_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */
+#define XK_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */
+#define XK_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */
+#define XK_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */
+#define XK_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */
+#define XK_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */
+#define XK_kana_tu 0x04af /* deprecated */
+#define XK_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */
+#define XK_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */
+#define XK_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */
+#define XK_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */
+#define XK_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */
+#define XK_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */
+#define XK_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */
+#define XK_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */
+#define XK_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */
+#define XK_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */
+#define XK_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */
+#define XK_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */
+#define XK_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */
+#define XK_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */
+#define XK_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */
+#define XK_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */
+#define XK_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */
+#define XK_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */
+#define XK_kana_TI 0x04c1 /* deprecated */
+#define XK_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */
+#define XK_kana_TU 0x04c2 /* deprecated */
+#define XK_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */
+#define XK_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */
+#define XK_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */
+#define XK_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */
+#define XK_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */
+#define XK_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */
+#define XK_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */
+#define XK_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */
+#define XK_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */
+#define XK_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */
+#define XK_kana_HU 0x04cc /* deprecated */
+#define XK_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */
+#define XK_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */
+#define XK_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */
+#define XK_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */
+#define XK_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */
+#define XK_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */
+#define XK_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */
+#define XK_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */
+#define XK_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */
+#define XK_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */
+#define XK_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */
+#define XK_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */
+#define XK_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */
+#define XK_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */
+#define XK_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */
+#define XK_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */
+#define XK_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */
+#define XK_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */
+#define XK_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
+#define XK_kana_switch 0xff7e /* Alias for mode_switch */
#endif /* XK_KATAKANA */
/*
- * Arabic
- * Byte 3 = 5
+ * Arabic
+ * Byte 3 = 5
*/
#ifdef XK_ARABIC
-#define XK_Arabic_comma 0x5ac
-#define XK_Arabic_semicolon 0x5bb
-#define XK_Arabic_question_mark 0x5bf
-#define XK_Arabic_hamza 0x5c1
-#define XK_Arabic_maddaonalef 0x5c2
-#define XK_Arabic_hamzaonalef 0x5c3
-#define XK_Arabic_hamzaonwaw 0x5c4
-#define XK_Arabic_hamzaunderalef 0x5c5
-#define XK_Arabic_hamzaonyeh 0x5c6
-#define XK_Arabic_alef 0x5c7
-#define XK_Arabic_beh 0x5c8
-#define XK_Arabic_tehmarbuta 0x5c9
-#define XK_Arabic_teh 0x5ca
-#define XK_Arabic_theh 0x5cb
-#define XK_Arabic_jeem 0x5cc
-#define XK_Arabic_hah 0x5cd
-#define XK_Arabic_khah 0x5ce
-#define XK_Arabic_dal 0x5cf
-#define XK_Arabic_thal 0x5d0
-#define XK_Arabic_ra 0x5d1
-#define XK_Arabic_zain 0x5d2
-#define XK_Arabic_seen 0x5d3
-#define XK_Arabic_sheen 0x5d4
-#define XK_Arabic_sad 0x5d5
-#define XK_Arabic_dad 0x5d6
-#define XK_Arabic_tah 0x5d7
-#define XK_Arabic_zah 0x5d8
-#define XK_Arabic_ain 0x5d9
-#define XK_Arabic_ghain 0x5da
-#define XK_Arabic_tatweel 0x5e0
-#define XK_Arabic_feh 0x5e1
-#define XK_Arabic_qaf 0x5e2
-#define XK_Arabic_kaf 0x5e3
-#define XK_Arabic_lam 0x5e4
-#define XK_Arabic_meem 0x5e5
-#define XK_Arabic_noon 0x5e6
-#define XK_Arabic_ha 0x5e7
-#define XK_Arabic_heh 0x5e7 /* deprecated */
-#define XK_Arabic_waw 0x5e8
-#define XK_Arabic_alefmaksura 0x5e9
-#define XK_Arabic_yeh 0x5ea
-#define XK_Arabic_fathatan 0x5eb
-#define XK_Arabic_dammatan 0x5ec
-#define XK_Arabic_kasratan 0x5ed
-#define XK_Arabic_fatha 0x5ee
-#define XK_Arabic_damma 0x5ef
-#define XK_Arabic_kasra 0x5f0
-#define XK_Arabic_shadda 0x5f1
-#define XK_Arabic_sukun 0x5f2
-#define XK_Arabic_switch 0xFF7E /* Alias for mode_switch */
+#define XK_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */
+#define XK_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */
+#define XK_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */
+#define XK_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */
+#define XK_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */
+#define XK_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */
+#define XK_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */
+#define XK_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */
+#define XK_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */
+#define XK_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */
+#define XK_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */
+#define XK_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */
+#define XK_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */
+#define XK_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */
+#define XK_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */
+#define XK_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */
+#define XK_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */
+#define XK_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */
+#define XK_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */
+#define XK_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */
+#define XK_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */
+#define XK_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */
+#define XK_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */
+#define XK_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */
+#define XK_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */
+#define XK_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */
+#define XK_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */
+#define XK_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */
+#define XK_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */
+#define XK_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */
+#define XK_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */
+#define XK_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
+#define XK_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
+#define XK_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
+#define XK_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
+#define XK_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */
+#define XK_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */
+#define XK_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */
+#define XK_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */
+#define XK_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */
+#define XK_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */
+#define XK_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */
+#define XK_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */
+#define XK_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */
+#define XK_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */
+#define XK_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */
+#define XK_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */
+#define XK_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */
+#define XK_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */
+#define XK_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */
+#define XK_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */
+#define XK_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */
+#define XK_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */
+#define XK_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */
+#define XK_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */
+#define XK_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */
+#define XK_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */
+#define XK_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */
+#define XK_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */
+#define XK_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */
+#define XK_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */
+#define XK_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */
+#define XK_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */
+#define XK_Arabic_heh 0x05e7 /* deprecated */
+#define XK_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */
+#define XK_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */
+#define XK_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */
+#define XK_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */
+#define XK_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */
+#define XK_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */
+#define XK_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */
+#define XK_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */
+#define XK_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */
+#define XK_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */
+#define XK_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */
+#define XK_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */
+#define XK_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */
+#define XK_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */
+#define XK_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */
+#define XK_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */
+#define XK_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */
+#define XK_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */
+#define XK_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */
+#define XK_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
+#define XK_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */
+#define XK_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */
+#define XK_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */
+#define XK_Arabic_switch 0xff7e /* Alias for mode_switch */
#endif /* XK_ARABIC */
/*
@@ -722,457 +1111,1401 @@ SOFTWARE.
* Byte 3 = 6
*/
#ifdef XK_CYRILLIC
-#define XK_Serbian_dje 0x6a1
-#define XK_Macedonia_gje 0x6a2
-#define XK_Cyrillic_io 0x6a3
-#define XK_Ukrainian_ie 0x6a4
-#define XK_Ukranian_je 0x6a4 /* deprecated */
-#define XK_Macedonia_dse 0x6a5
-#define XK_Ukrainian_i 0x6a6
-#define XK_Ukranian_i 0x6a6 /* deprecated */
-#define XK_Ukrainian_yi 0x6a7
-#define XK_Ukranian_yi 0x6a7 /* deprecated */
-#define XK_Cyrillic_je 0x6a8
-#define XK_Serbian_je 0x6a8 /* deprecated */
-#define XK_Cyrillic_lje 0x6a9
-#define XK_Serbian_lje 0x6a9 /* deprecated */
-#define XK_Cyrillic_nje 0x6aa
-#define XK_Serbian_nje 0x6aa /* deprecated */
-#define XK_Serbian_tshe 0x6ab
-#define XK_Macedonia_kje 0x6ac
-#define XK_Byelorussian_shortu 0x6ae
-#define XK_Cyrillic_dzhe 0x6af
-#define XK_Serbian_dze 0x6af /* deprecated */
-#define XK_numerosign 0x6b0
-#define XK_Serbian_DJE 0x6b1
-#define XK_Macedonia_GJE 0x6b2
-#define XK_Cyrillic_IO 0x6b3
-#define XK_Ukrainian_IE 0x6b4
-#define XK_Ukranian_JE 0x6b4 /* deprecated */
-#define XK_Macedonia_DSE 0x6b5
-#define XK_Ukrainian_I 0x6b6
-#define XK_Ukranian_I 0x6b6 /* deprecated */
-#define XK_Ukrainian_YI 0x6b7
-#define XK_Ukranian_YI 0x6b7 /* deprecated */
-#define XK_Cyrillic_JE 0x6b8
-#define XK_Serbian_JE 0x6b8 /* deprecated */
-#define XK_Cyrillic_LJE 0x6b9
-#define XK_Serbian_LJE 0x6b9 /* deprecated */
-#define XK_Cyrillic_NJE 0x6ba
-#define XK_Serbian_NJE 0x6ba /* deprecated */
-#define XK_Serbian_TSHE 0x6bb
-#define XK_Macedonia_KJE 0x6bc
-#define XK_Byelorussian_SHORTU 0x6be
-#define XK_Cyrillic_DZHE 0x6bf
-#define XK_Serbian_DZE 0x6bf /* deprecated */
-#define XK_Cyrillic_yu 0x6c0
-#define XK_Cyrillic_a 0x6c1
-#define XK_Cyrillic_be 0x6c2
-#define XK_Cyrillic_tse 0x6c3
-#define XK_Cyrillic_de 0x6c4
-#define XK_Cyrillic_ie 0x6c5
-#define XK_Cyrillic_ef 0x6c6
-#define XK_Cyrillic_ghe 0x6c7
-#define XK_Cyrillic_ha 0x6c8
-#define XK_Cyrillic_i 0x6c9
-#define XK_Cyrillic_shorti 0x6ca
-#define XK_Cyrillic_ka 0x6cb
-#define XK_Cyrillic_el 0x6cc
-#define XK_Cyrillic_em 0x6cd
-#define XK_Cyrillic_en 0x6ce
-#define XK_Cyrillic_o 0x6cf
-#define XK_Cyrillic_pe 0x6d0
-#define XK_Cyrillic_ya 0x6d1
-#define XK_Cyrillic_er 0x6d2
-#define XK_Cyrillic_es 0x6d3
-#define XK_Cyrillic_te 0x6d4
-#define XK_Cyrillic_u 0x6d5
-#define XK_Cyrillic_zhe 0x6d6
-#define XK_Cyrillic_ve 0x6d7
-#define XK_Cyrillic_softsign 0x6d8
-#define XK_Cyrillic_yeru 0x6d9
-#define XK_Cyrillic_ze 0x6da
-#define XK_Cyrillic_sha 0x6db
-#define XK_Cyrillic_e 0x6dc
-#define XK_Cyrillic_shcha 0x6dd
-#define XK_Cyrillic_che 0x6de
-#define XK_Cyrillic_hardsign 0x6df
-#define XK_Cyrillic_YU 0x6e0
-#define XK_Cyrillic_A 0x6e1
-#define XK_Cyrillic_BE 0x6e2
-#define XK_Cyrillic_TSE 0x6e3
-#define XK_Cyrillic_DE 0x6e4
-#define XK_Cyrillic_IE 0x6e5
-#define XK_Cyrillic_EF 0x6e6
-#define XK_Cyrillic_GHE 0x6e7
-#define XK_Cyrillic_HA 0x6e8
-#define XK_Cyrillic_I 0x6e9
-#define XK_Cyrillic_SHORTI 0x6ea
-#define XK_Cyrillic_KA 0x6eb
-#define XK_Cyrillic_EL 0x6ec
-#define XK_Cyrillic_EM 0x6ed
-#define XK_Cyrillic_EN 0x6ee
-#define XK_Cyrillic_O 0x6ef
-#define XK_Cyrillic_PE 0x6f0
-#define XK_Cyrillic_YA 0x6f1
-#define XK_Cyrillic_ER 0x6f2
-#define XK_Cyrillic_ES 0x6f3
-#define XK_Cyrillic_TE 0x6f4
-#define XK_Cyrillic_U 0x6f5
-#define XK_Cyrillic_ZHE 0x6f6
-#define XK_Cyrillic_VE 0x6f7
-#define XK_Cyrillic_SOFTSIGN 0x6f8
-#define XK_Cyrillic_YERU 0x6f9
-#define XK_Cyrillic_ZE 0x6fa
-#define XK_Cyrillic_SHA 0x6fb
-#define XK_Cyrillic_E 0x6fc
-#define XK_Cyrillic_SHCHA 0x6fd
-#define XK_Cyrillic_CHE 0x6fe
-#define XK_Cyrillic_HARDSIGN 0x6ff
+#define XK_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */
+#define XK_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */
+#define XK_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */
+#define XK_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */
+#define XK_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */
+#define XK_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */
+#define XK_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */
+#define XK_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */
+#define XK_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */
+#define XK_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */
+#define XK_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */
+#define XK_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */
+#define XK_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */
+
+#define XK_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */
+#define XK_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */
+#define XK_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */
+#define XK_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */
+#define XK_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */
+#define XK_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */
+#define XK_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */
+#define XK_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */
+
+#define XK_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */
+#define XK_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */
+#define XK_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */
+#define XK_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */
+#define XK_Ukranian_je 0x06a4 /* deprecated */
+#define XK_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */
+#define XK_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_i 0x06a6 /* deprecated */
+#define XK_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */
+#define XK_Ukranian_yi 0x06a7 /* deprecated */
+#define XK_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */
+#define XK_Serbian_je 0x06a8 /* deprecated */
+#define XK_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */
+#define XK_Serbian_lje 0x06a9 /* deprecated */
+#define XK_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */
+#define XK_Serbian_nje 0x06aa /* deprecated */
+#define XK_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */
+#define XK_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */
+#define XK_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */
+#define XK_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */
+#define XK_Serbian_dze 0x06af /* deprecated */
+#define XK_numerosign 0x06b0 /* U+2116 NUMERO SIGN */
+#define XK_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */
+#define XK_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */
+#define XK_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */
+#define XK_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */
+#define XK_Ukranian_JE 0x06b4 /* deprecated */
+#define XK_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */
+#define XK_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */
+#define XK_Ukranian_I 0x06b6 /* deprecated */
+#define XK_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */
+#define XK_Ukranian_YI 0x06b7 /* deprecated */
+#define XK_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */
+#define XK_Serbian_JE 0x06b8 /* deprecated */
+#define XK_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */
+#define XK_Serbian_LJE 0x06b9 /* deprecated */
+#define XK_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */
+#define XK_Serbian_NJE 0x06ba /* deprecated */
+#define XK_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */
+#define XK_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */
+#define XK_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+#define XK_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */
+#define XK_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */
+#define XK_Serbian_DZE 0x06bf /* deprecated */
+#define XK_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */
+#define XK_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */
+#define XK_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */
+#define XK_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */
+#define XK_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */
+#define XK_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */
+#define XK_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */
+#define XK_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */
+#define XK_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */
+#define XK_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */
+#define XK_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */
+#define XK_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */
+#define XK_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */
+#define XK_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */
+#define XK_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */
+#define XK_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */
+#define XK_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */
+#define XK_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */
+#define XK_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */
+#define XK_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */
+#define XK_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */
+#define XK_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */
+#define XK_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */
+#define XK_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */
+#define XK_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */
+#define XK_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */
+#define XK_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */
+#define XK_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */
+#define XK_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */
+#define XK_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */
+#define XK_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */
+#define XK_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */
+#define XK_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */
+#define XK_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */
+#define XK_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */
+#define XK_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */
+#define XK_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */
+#define XK_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */
+#define XK_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */
+#define XK_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */
+#define XK_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */
+#define XK_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */
+#define XK_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */
+#define XK_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */
+#define XK_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */
+#define XK_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */
+#define XK_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */
+#define XK_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */
+#define XK_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */
+#define XK_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */
+#define XK_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */
+#define XK_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */
+#define XK_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */
+#define XK_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */
+#define XK_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */
+#define XK_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */
+#define XK_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */
+#define XK_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */
+#define XK_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */
+#define XK_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */
+#define XK_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */
+#define XK_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */
+#define XK_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */
+#define XK_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */
#endif /* XK_CYRILLIC */
/*
* Greek
+ * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7)
* Byte 3 = 7
*/
#ifdef XK_GREEK
-#define XK_Greek_ALPHAaccent 0x7a1
-#define XK_Greek_EPSILONaccent 0x7a2
-#define XK_Greek_ETAaccent 0x7a3
-#define XK_Greek_IOTAaccent 0x7a4
-#define XK_Greek_IOTAdieresis 0x7a5
-#define XK_Greek_IOTAdiaeresis 0x7a5
-#define XK_Greek_OMICRONaccent 0x7a7
-#define XK_Greek_UPSILONaccent 0x7a8
-#define XK_Greek_UPSILONdieresis 0x7a9
-#define XK_Greek_OMEGAaccent 0x7ab
-#define XK_Greek_accentdieresis 0x7ae
-#define XK_Greek_horizbar 0x7af
-#define XK_Greek_alphaaccent 0x7b1
-#define XK_Greek_epsilonaccent 0x7b2
-#define XK_Greek_etaaccent 0x7b3
-#define XK_Greek_iotaaccent 0x7b4
-#define XK_Greek_iotadieresis 0x7b5
-#define XK_Greek_iotaaccentdieresis 0x7b6
-#define XK_Greek_omicronaccent 0x7b7
-#define XK_Greek_upsilonaccent 0x7b8
-#define XK_Greek_upsilondieresis 0x7b9
-#define XK_Greek_upsilonaccentdieresis 0x7ba
-#define XK_Greek_omegaaccent 0x7bb
-#define XK_Greek_ALPHA 0x7c1
-#define XK_Greek_BETA 0x7c2
-#define XK_Greek_GAMMA 0x7c3
-#define XK_Greek_DELTA 0x7c4
-#define XK_Greek_EPSILON 0x7c5
-#define XK_Greek_ZETA 0x7c6
-#define XK_Greek_ETA 0x7c7
-#define XK_Greek_THETA 0x7c8
-#define XK_Greek_IOTA 0x7c9
-#define XK_Greek_KAPPA 0x7ca
-#define XK_Greek_LAMDA 0x7cb
-#define XK_Greek_LAMBDA 0x7cb
-#define XK_Greek_MU 0x7cc
-#define XK_Greek_NU 0x7cd
-#define XK_Greek_XI 0x7ce
-#define XK_Greek_OMICRON 0x7cf
-#define XK_Greek_PI 0x7d0
-#define XK_Greek_RHO 0x7d1
-#define XK_Greek_SIGMA 0x7d2
-#define XK_Greek_TAU 0x7d4
-#define XK_Greek_UPSILON 0x7d5
-#define XK_Greek_PHI 0x7d6
-#define XK_Greek_CHI 0x7d7
-#define XK_Greek_PSI 0x7d8
-#define XK_Greek_OMEGA 0x7d9
-#define XK_Greek_alpha 0x7e1
-#define XK_Greek_beta 0x7e2
-#define XK_Greek_gamma 0x7e3
-#define XK_Greek_delta 0x7e4
-#define XK_Greek_epsilon 0x7e5
-#define XK_Greek_zeta 0x7e6
-#define XK_Greek_eta 0x7e7
-#define XK_Greek_theta 0x7e8
-#define XK_Greek_iota 0x7e9
-#define XK_Greek_kappa 0x7ea
-#define XK_Greek_lamda 0x7eb
-#define XK_Greek_lambda 0x7eb
-#define XK_Greek_mu 0x7ec
-#define XK_Greek_nu 0x7ed
-#define XK_Greek_xi 0x7ee
-#define XK_Greek_omicron 0x7ef
-#define XK_Greek_pi 0x7f0
-#define XK_Greek_rho 0x7f1
-#define XK_Greek_sigma 0x7f2
-#define XK_Greek_finalsmallsigma 0x7f3
-#define XK_Greek_tau 0x7f4
-#define XK_Greek_upsilon 0x7f5
-#define XK_Greek_phi 0x7f6
-#define XK_Greek_chi 0x7f7
-#define XK_Greek_psi 0x7f8
-#define XK_Greek_omega 0x7f9
-#define XK_Greek_switch 0xFF7E /* Alias for mode_switch */
+#define XK_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */
+#define XK_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */
+#define XK_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */
+#define XK_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */
+#define XK_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_IOTAdiaeresis 0x07a5 /* old typo */
+#define XK_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */
+#define XK_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */
+#define XK_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */
+#define XK_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */
+#define XK_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */
+#define XK_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */
+#define XK_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */
+#define XK_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */
+#define XK_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */
+#define XK_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */
+#define XK_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */
+#define XK_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */
+#define XK_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */
+#define XK_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */
+#define XK_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */
+#define XK_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */
+#define XK_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */
+#define XK_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */
+#define XK_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */
+#define XK_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */
+#define XK_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */
+#define XK_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */
+#define XK_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */
+#define XK_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */
+#define XK_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */
+#define XK_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */
+#define XK_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */
+#define XK_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */
+#define XK_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */
+#define XK_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */
+#define XK_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */
+#define XK_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */
+#define XK_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */
+#define XK_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */
+#define XK_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */
+#define XK_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */
+#define XK_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */
+#define XK_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */
+#define XK_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */
+#define XK_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */
+#define XK_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */
+#define XK_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */
+#define XK_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */
+#define XK_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */
+#define XK_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */
+#define XK_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */
+#define XK_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */
+#define XK_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */
+#define XK_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */
+#define XK_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */
+#define XK_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */
+#define XK_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */
+#define XK_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */
+#define XK_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */
+#define XK_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */
+#define XK_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */
+#define XK_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */
+#define XK_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */
+#define XK_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */
+#define XK_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */
+#define XK_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */
+#define XK_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */
+#define XK_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */
+#define XK_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */
+#define XK_Greek_switch 0xff7e /* Alias for mode_switch */
#endif /* XK_GREEK */
/*
* Technical
+ * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html)
* Byte 3 = 8
*/
#ifdef XK_TECHNICAL
-#define XK_leftradical 0x8a1
-#define XK_topleftradical 0x8a2
-#define XK_horizconnector 0x8a3
-#define XK_topintegral 0x8a4
-#define XK_botintegral 0x8a5
-#define XK_vertconnector 0x8a6
-#define XK_topleftsqbracket 0x8a7
-#define XK_botleftsqbracket 0x8a8
-#define XK_toprightsqbracket 0x8a9
-#define XK_botrightsqbracket 0x8aa
-#define XK_topleftparens 0x8ab
-#define XK_botleftparens 0x8ac
-#define XK_toprightparens 0x8ad
-#define XK_botrightparens 0x8ae
-#define XK_leftmiddlecurlybrace 0x8af
-#define XK_rightmiddlecurlybrace 0x8b0
-#define XK_topleftsummation 0x8b1
-#define XK_botleftsummation 0x8b2
-#define XK_topvertsummationconnector 0x8b3
-#define XK_botvertsummationconnector 0x8b4
-#define XK_toprightsummation 0x8b5
-#define XK_botrightsummation 0x8b6
-#define XK_rightmiddlesummation 0x8b7
-#define XK_lessthanequal 0x8bc
-#define XK_notequal 0x8bd
-#define XK_greaterthanequal 0x8be
-#define XK_integral 0x8bf
-#define XK_therefore 0x8c0
-#define XK_variation 0x8c1
-#define XK_infinity 0x8c2
-#define XK_nabla 0x8c5
-#define XK_approximate 0x8c8
-#define XK_similarequal 0x8c9
-#define XK_ifonlyif 0x8cd
-#define XK_implies 0x8ce
-#define XK_identical 0x8cf
-#define XK_radical 0x8d6
-#define XK_includedin 0x8da
-#define XK_includes 0x8db
-#define XK_intersection 0x8dc
-#define XK_union 0x8dd
-#define XK_logicaland 0x8de
-#define XK_logicalor 0x8df
-#define XK_partialderivative 0x8ef
-#define XK_function 0x8f6
-#define XK_leftarrow 0x8fb
-#define XK_uparrow 0x8fc
-#define XK_rightarrow 0x8fd
-#define XK_downarrow 0x8fe
+#define XK_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */
+#define XK_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/
+#define XK_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/
+#define XK_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */
+#define XK_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */
+#define XK_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/
+#define XK_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */
+#define XK_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */
+#define XK_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */
+#define XK_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */
+#define XK_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */
+#define XK_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */
+#define XK_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */
+#define XK_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */
+#define XK_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */
+#define XK_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */
+#define XK_topleftsummation 0x08b1
+#define XK_botleftsummation 0x08b2
+#define XK_topvertsummationconnector 0x08b3
+#define XK_botvertsummationconnector 0x08b4
+#define XK_toprightsummation 0x08b5
+#define XK_botrightsummation 0x08b6
+#define XK_rightmiddlesummation 0x08b7
+#define XK_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */
+#define XK_notequal 0x08bd /* U+2260 NOT EQUAL TO */
+#define XK_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */
+#define XK_integral 0x08bf /* U+222B INTEGRAL */
+#define XK_therefore 0x08c0 /* U+2234 THEREFORE */
+#define XK_variation 0x08c1 /* U+221D PROPORTIONAL TO */
+#define XK_infinity 0x08c2 /* U+221E INFINITY */
+#define XK_nabla 0x08c5 /* U+2207 NABLA */
+#define XK_approximate 0x08c8 /* U+223C TILDE OPERATOR */
+#define XK_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */
+#define XK_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */
+#define XK_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */
+#define XK_identical 0x08cf /* U+2261 IDENTICAL TO */
+#define XK_radical 0x08d6 /* U+221A SQUARE ROOT */
+#define XK_includedin 0x08da /* U+2282 SUBSET OF */
+#define XK_includes 0x08db /* U+2283 SUPERSET OF */
+#define XK_intersection 0x08dc /* U+2229 INTERSECTION */
+#define XK_union 0x08dd /* U+222A UNION */
+#define XK_logicaland 0x08de /* U+2227 LOGICAL AND */
+#define XK_logicalor 0x08df /* U+2228 LOGICAL OR */
+#define XK_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */
+#define XK_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */
+#define XK_uparrow 0x08fc /* U+2191 UPWARDS ARROW */
+#define XK_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */
+#define XK_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */
#endif /* XK_TECHNICAL */
/*
- * Special
- * Byte 3 = 9
+ * Special
+ * (from the DEC VT100 Special Graphics Character Set)
+ * Byte 3 = 9
*/
#ifdef XK_SPECIAL
-#define XK_blank 0x9df
-#define XK_soliddiamond 0x9e0
-#define XK_checkerboard 0x9e1
-#define XK_ht 0x9e2
-#define XK_ff 0x9e3
-#define XK_cr 0x9e4
-#define XK_lf 0x9e5
-#define XK_nl 0x9e8
-#define XK_vt 0x9e9
-#define XK_lowrightcorner 0x9ea
-#define XK_uprightcorner 0x9eb
-#define XK_upleftcorner 0x9ec
-#define XK_lowleftcorner 0x9ed
-#define XK_crossinglines 0x9ee
-#define XK_horizlinescan1 0x9ef
-#define XK_horizlinescan3 0x9f0
-#define XK_horizlinescan5 0x9f1
-#define XK_horizlinescan7 0x9f2
-#define XK_horizlinescan9 0x9f3
-#define XK_leftt 0x9f4
-#define XK_rightt 0x9f5
-#define XK_bott 0x9f6
-#define XK_topt 0x9f7
-#define XK_vertbar 0x9f8
+#define XK_blank 0x09df
+#define XK_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */
+#define XK_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */
+#define XK_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */
+#define XK_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */
+#define XK_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */
+#define XK_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */
+#define XK_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */
+#define XK_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */
+#define XK_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */
+#define XK_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */
+#define XK_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */
+#define XK_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */
+#define XK_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */
+#define XK_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */
+#define XK_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */
+#define XK_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */
+#define XK_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */
+#define XK_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */
+#define XK_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
+#define XK_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */
+#define XK_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */
+#define XK_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */
+#define XK_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
#endif /* XK_SPECIAL */
/*
- * Publishing
- * Byte 3 = a
+ * Publishing
+ * (these are probably from a long forgotten DEC Publishing
+ * font that once shipped with DECwrite)
+ * Byte 3 = 0x0a
*/
#ifdef XK_PUBLISHING
-#define XK_emspace 0xaa1
-#define XK_enspace 0xaa2
-#define XK_em3space 0xaa3
-#define XK_em4space 0xaa4
-#define XK_digitspace 0xaa5
-#define XK_punctspace 0xaa6
-#define XK_thinspace 0xaa7
-#define XK_hairspace 0xaa8
-#define XK_emdash 0xaa9
-#define XK_endash 0xaaa
-#define XK_signifblank 0xaac
-#define XK_ellipsis 0xaae
-#define XK_doubbaselinedot 0xaaf
-#define XK_onethird 0xab0
-#define XK_twothirds 0xab1
-#define XK_onefifth 0xab2
-#define XK_twofifths 0xab3
-#define XK_threefifths 0xab4
-#define XK_fourfifths 0xab5
-#define XK_onesixth 0xab6
-#define XK_fivesixths 0xab7
-#define XK_careof 0xab8
-#define XK_figdash 0xabb
-#define XK_leftanglebracket 0xabc
-#define XK_decimalpoint 0xabd
-#define XK_rightanglebracket 0xabe
-#define XK_marker 0xabf
-#define XK_oneeighth 0xac3
-#define XK_threeeighths 0xac4
-#define XK_fiveeighths 0xac5
-#define XK_seveneighths 0xac6
-#define XK_trademark 0xac9
-#define XK_signaturemark 0xaca
-#define XK_trademarkincircle 0xacb
-#define XK_leftopentriangle 0xacc
-#define XK_rightopentriangle 0xacd
-#define XK_emopencircle 0xace
-#define XK_emopenrectangle 0xacf
-#define XK_leftsinglequotemark 0xad0
-#define XK_rightsinglequotemark 0xad1
-#define XK_leftdoublequotemark 0xad2
-#define XK_rightdoublequotemark 0xad3
-#define XK_prescription 0xad4
-#define XK_minutes 0xad6
-#define XK_seconds 0xad7
-#define XK_latincross 0xad9
-#define XK_hexagram 0xada
-#define XK_filledrectbullet 0xadb
-#define XK_filledlefttribullet 0xadc
-#define XK_filledrighttribullet 0xadd
-#define XK_emfilledcircle 0xade
-#define XK_emfilledrect 0xadf
-#define XK_enopencircbullet 0xae0
-#define XK_enopensquarebullet 0xae1
-#define XK_openrectbullet 0xae2
-#define XK_opentribulletup 0xae3
-#define XK_opentribulletdown 0xae4
-#define XK_openstar 0xae5
-#define XK_enfilledcircbullet 0xae6
-#define XK_enfilledsqbullet 0xae7
-#define XK_filledtribulletup 0xae8
-#define XK_filledtribulletdown 0xae9
-#define XK_leftpointer 0xaea
-#define XK_rightpointer 0xaeb
-#define XK_club 0xaec
-#define XK_diamond 0xaed
-#define XK_heart 0xaee
-#define XK_maltesecross 0xaf0
-#define XK_dagger 0xaf1
-#define XK_doubledagger 0xaf2
-#define XK_checkmark 0xaf3
-#define XK_ballotcross 0xaf4
-#define XK_musicalsharp 0xaf5
-#define XK_musicalflat 0xaf6
-#define XK_malesymbol 0xaf7
-#define XK_femalesymbol 0xaf8
-#define XK_telephone 0xaf9
-#define XK_telephonerecorder 0xafa
-#define XK_phonographcopyright 0xafb
-#define XK_caret 0xafc
-#define XK_singlelowquotemark 0xafd
-#define XK_doublelowquotemark 0xafe
-#define XK_cursor 0xaff
+#define XK_emspace 0x0aa1 /* U+2003 EM SPACE */
+#define XK_enspace 0x0aa2 /* U+2002 EN SPACE */
+#define XK_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */
+#define XK_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */
+#define XK_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */
+#define XK_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */
+#define XK_thinspace 0x0aa7 /* U+2009 THIN SPACE */
+#define XK_hairspace 0x0aa8 /* U+200A HAIR SPACE */
+#define XK_emdash 0x0aa9 /* U+2014 EM DASH */
+#define XK_endash 0x0aaa /* U+2013 EN DASH */
+#define XK_signifblank 0x0aac /*(U+2423 OPEN BOX)*/
+#define XK_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */
+#define XK_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */
+#define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */
+#define XK_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */
+#define XK_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */
+#define XK_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */
+#define XK_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */
+#define XK_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */
+#define XK_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */
+#define XK_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */
+#define XK_careof 0x0ab8 /* U+2105 CARE OF */
+#define XK_figdash 0x0abb /* U+2012 FIGURE DASH */
+#define XK_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
+#define XK_decimalpoint 0x0abd /*(U+002E FULL STOP)*/
+#define XK_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/
+#define XK_marker 0x0abf
+#define XK_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */
+#define XK_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */
+#define XK_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */
+#define XK_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */
+#define XK_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */
+#define XK_signaturemark 0x0aca /*(U+2613 SALTIRE)*/
+#define XK_trademarkincircle 0x0acb
+#define XK_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/
+#define XK_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/
+#define XK_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/
+#define XK_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/
+#define XK_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */
+#define XK_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */
+#define XK_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */
+#define XK_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */
+#define XK_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */
+#define XK_permille 0x0ad5 /* U+2030 PER MILLE SIGN */
+#define XK_minutes 0x0ad6 /* U+2032 PRIME */
+#define XK_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */
+#define XK_latincross 0x0ad9 /* U+271D LATIN CROSS */
+#define XK_hexagram 0x0ada
+#define XK_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/
+#define XK_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/
+#define XK_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/
+#define XK_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/
+#define XK_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/
+#define XK_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/
+#define XK_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/
+#define XK_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/
+#define XK_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/
+#define XK_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/
+#define XK_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/
+#define XK_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/
+#define XK_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/
+#define XK_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/
+#define XK_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/
+#define XK_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/
+#define XK_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/
+#define XK_club 0x0aec /* U+2663 BLACK CLUB SUIT */
+#define XK_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */
+#define XK_heart 0x0aee /* U+2665 BLACK HEART SUIT */
+#define XK_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */
+#define XK_dagger 0x0af1 /* U+2020 DAGGER */
+#define XK_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */
+#define XK_checkmark 0x0af3 /* U+2713 CHECK MARK */
+#define XK_ballotcross 0x0af4 /* U+2717 BALLOT X */
+#define XK_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */
+#define XK_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */
+#define XK_malesymbol 0x0af7 /* U+2642 MALE SIGN */
+#define XK_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */
+#define XK_telephone 0x0af9 /* U+260E BLACK TELEPHONE */
+#define XK_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */
+#define XK_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */
+#define XK_caret 0x0afc /* U+2038 CARET */
+#define XK_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */
+#define XK_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */
+#define XK_cursor 0x0aff
#endif /* XK_PUBLISHING */
/*
- * APL
- * Byte 3 = b
+ * APL
+ * Byte 3 = 0x0b
*/
#ifdef XK_APL
-#define XK_leftcaret 0xba3
-#define XK_rightcaret 0xba6
-#define XK_downcaret 0xba8
-#define XK_upcaret 0xba9
-#define XK_overbar 0xbc0
-#define XK_downtack 0xbc2
-#define XK_upshoe 0xbc3
-#define XK_downstile 0xbc4
-#define XK_underbar 0xbc6
-#define XK_jot 0xbca
-#define XK_quad 0xbcc
-#define XK_uptack 0xbce
-#define XK_circle 0xbcf
-#define XK_upstile 0xbd3
-#define XK_downshoe 0xbd6
-#define XK_rightshoe 0xbd8
-#define XK_leftshoe 0xbda
-#define XK_lefttack 0xbdc
-#define XK_righttack 0xbfc
+#define XK_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/
+#define XK_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/
+#define XK_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/
+#define XK_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/
+#define XK_overbar 0x0bc0 /*(U+00AF MACRON)*/
+#define XK_downtack 0x0bc2 /* U+22A4 DOWN TACK */
+#define XK_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/
+#define XK_downstile 0x0bc4 /* U+230A LEFT FLOOR */
+#define XK_underbar 0x0bc6 /*(U+005F LOW LINE)*/
+#define XK_jot 0x0bca /* U+2218 RING OPERATOR */
+#define XK_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */
+#define XK_uptack 0x0bce /* U+22A5 UP TACK */
+#define XK_circle 0x0bcf /* U+25CB WHITE CIRCLE */
+#define XK_upstile 0x0bd3 /* U+2308 LEFT CEILING */
+#define XK_downshoe 0x0bd6 /*(U+222A UNION)*/
+#define XK_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/
+#define XK_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/
+#define XK_lefttack 0x0bdc /* U+22A3 LEFT TACK */
+#define XK_righttack 0x0bfc /* U+22A2 RIGHT TACK */
#endif /* XK_APL */
/*
* Hebrew
- * Byte 3 = c
+ * Byte 3 = 0x0c
*/
#ifdef XK_HEBREW
-#define XK_hebrew_doublelowline 0xcdf
-#define XK_hebrew_aleph 0xce0
-#define XK_hebrew_bet 0xce1
-#define XK_hebrew_beth 0xce1 /* deprecated */
-#define XK_hebrew_gimel 0xce2
-#define XK_hebrew_gimmel 0xce2 /* deprecated */
-#define XK_hebrew_dalet 0xce3
-#define XK_hebrew_daleth 0xce3 /* deprecated */
-#define XK_hebrew_he 0xce4
-#define XK_hebrew_waw 0xce5
-#define XK_hebrew_zain 0xce6
-#define XK_hebrew_zayin 0xce6 /* deprecated */
-#define XK_hebrew_chet 0xce7
-#define XK_hebrew_het 0xce7 /* deprecated */
-#define XK_hebrew_tet 0xce8
-#define XK_hebrew_teth 0xce8 /* deprecated */
-#define XK_hebrew_yod 0xce9
-#define XK_hebrew_finalkaph 0xcea
-#define XK_hebrew_kaph 0xceb
-#define XK_hebrew_lamed 0xcec
-#define XK_hebrew_finalmem 0xced
-#define XK_hebrew_mem 0xcee
-#define XK_hebrew_finalnun 0xcef
-#define XK_hebrew_nun 0xcf0
-#define XK_hebrew_samech 0xcf1
-#define XK_hebrew_samekh 0xcf1 /* deprecated */
-#define XK_hebrew_ayin 0xcf2
-#define XK_hebrew_finalpe 0xcf3
-#define XK_hebrew_pe 0xcf4
-#define XK_hebrew_finalzade 0xcf5
-#define XK_hebrew_finalzadi 0xcf5 /* deprecated */
-#define XK_hebrew_zade 0xcf6
-#define XK_hebrew_zadi 0xcf6 /* deprecated */
-#define XK_hebrew_qoph 0xcf7
-#define XK_hebrew_kuf 0xcf7 /* deprecated */
-#define XK_hebrew_resh 0xcf8
-#define XK_hebrew_shin 0xcf9
-#define XK_hebrew_taw 0xcfa
-#define XK_hebrew_taf 0xcfa /* deprecated */
-#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */
+#define XK_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */
+#define XK_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */
+#define XK_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */
+#define XK_hebrew_beth 0x0ce1 /* deprecated */
+#define XK_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */
+#define XK_hebrew_gimmel 0x0ce2 /* deprecated */
+#define XK_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */
+#define XK_hebrew_daleth 0x0ce3 /* deprecated */
+#define XK_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */
+#define XK_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */
+#define XK_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */
+#define XK_hebrew_zayin 0x0ce6 /* deprecated */
+#define XK_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */
+#define XK_hebrew_het 0x0ce7 /* deprecated */
+#define XK_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */
+#define XK_hebrew_teth 0x0ce8 /* deprecated */
+#define XK_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */
+#define XK_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */
+#define XK_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */
+#define XK_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */
+#define XK_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */
+#define XK_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */
+#define XK_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */
+#define XK_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */
+#define XK_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */
+#define XK_hebrew_samekh 0x0cf1 /* deprecated */
+#define XK_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */
+#define XK_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */
+#define XK_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */
+#define XK_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */
+#define XK_hebrew_finalzadi 0x0cf5 /* deprecated */
+#define XK_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */
+#define XK_hebrew_zadi 0x0cf6 /* deprecated */
+#define XK_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */
+#define XK_hebrew_kuf 0x0cf7 /* deprecated */
+#define XK_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */
+#define XK_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */
+#define XK_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */
+#define XK_hebrew_taf 0x0cfa /* deprecated */
+#define XK_Hebrew_switch 0xff7e /* Alias for mode_switch */
#endif /* XK_HEBREW */
+/*
+ * Thai
+ * Byte 3 = 0x0d
+ */
+
+#ifdef XK_THAI
+#define XK_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */
+#define XK_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */
+#define XK_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */
+#define XK_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */
+#define XK_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */
+#define XK_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */
+#define XK_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */
+#define XK_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */
+#define XK_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */
+#define XK_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */
+#define XK_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */
+#define XK_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */
+#define XK_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */
+#define XK_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */
+#define XK_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */
+#define XK_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */
+#define XK_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */
+#define XK_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */
+#define XK_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */
+#define XK_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */
+#define XK_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */
+#define XK_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */
+#define XK_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */
+#define XK_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */
+#define XK_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */
+#define XK_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */
+#define XK_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */
+#define XK_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */
+#define XK_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */
+#define XK_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */
+#define XK_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */
+#define XK_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */
+#define XK_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */
+#define XK_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */
+#define XK_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */
+#define XK_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */
+#define XK_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */
+#define XK_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */
+#define XK_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */
+#define XK_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */
+#define XK_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */
+#define XK_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */
+#define XK_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */
+#define XK_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */
+#define XK_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */
+#define XK_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */
+#define XK_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */
+#define XK_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */
+#define XK_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */
+#define XK_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */
+#define XK_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */
+#define XK_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */
+#define XK_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */
+#define XK_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */
+#define XK_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */
+#define XK_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */
+#define XK_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */
+#define XK_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */
+#define XK_Thai_maihanakat_maitho 0x0dde
+#define XK_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */
+#define XK_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */
+#define XK_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */
+#define XK_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */
+#define XK_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */
+#define XK_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */
+#define XK_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */
+#define XK_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */
+#define XK_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */
+#define XK_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */
+#define XK_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */
+#define XK_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */
+#define XK_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */
+#define XK_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */
+#define XK_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */
+#define XK_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */
+#define XK_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */
+#define XK_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */
+#define XK_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */
+#define XK_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */
+#define XK_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */
+#define XK_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */
+#define XK_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */
+#define XK_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */
+#define XK_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */
+#endif /* XK_THAI */
+
+/*
+ * Korean
+ * Byte 3 = 0x0e
+ */
+
+#ifdef XK_KOREAN
+
+#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */
+#define XK_Hangul_Start 0xff32 /* Hangul start */
+#define XK_Hangul_End 0xff33 /* Hangul end, English start */
+#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */
+#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */
+#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */
+#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */
+#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */
+#define XK_Hangul_Banja 0xff39 /* Banja mode */
+#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */
+#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */
+#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */
+#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */
+#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */
+#define XK_Hangul_Special 0xff3f /* Special symbols */
+#define XK_Hangul_switch 0xff7e /* Alias for mode_switch */
+
+/* Hangul Consonant Characters */
+#define XK_Hangul_Kiyeog 0x0ea1
+#define XK_Hangul_SsangKiyeog 0x0ea2
+#define XK_Hangul_KiyeogSios 0x0ea3
+#define XK_Hangul_Nieun 0x0ea4
+#define XK_Hangul_NieunJieuj 0x0ea5
+#define XK_Hangul_NieunHieuh 0x0ea6
+#define XK_Hangul_Dikeud 0x0ea7
+#define XK_Hangul_SsangDikeud 0x0ea8
+#define XK_Hangul_Rieul 0x0ea9
+#define XK_Hangul_RieulKiyeog 0x0eaa
+#define XK_Hangul_RieulMieum 0x0eab
+#define XK_Hangul_RieulPieub 0x0eac
+#define XK_Hangul_RieulSios 0x0ead
+#define XK_Hangul_RieulTieut 0x0eae
+#define XK_Hangul_RieulPhieuf 0x0eaf
+#define XK_Hangul_RieulHieuh 0x0eb0
+#define XK_Hangul_Mieum 0x0eb1
+#define XK_Hangul_Pieub 0x0eb2
+#define XK_Hangul_SsangPieub 0x0eb3
+#define XK_Hangul_PieubSios 0x0eb4
+#define XK_Hangul_Sios 0x0eb5
+#define XK_Hangul_SsangSios 0x0eb6
+#define XK_Hangul_Ieung 0x0eb7
+#define XK_Hangul_Jieuj 0x0eb8
+#define XK_Hangul_SsangJieuj 0x0eb9
+#define XK_Hangul_Cieuc 0x0eba
+#define XK_Hangul_Khieuq 0x0ebb
+#define XK_Hangul_Tieut 0x0ebc
+#define XK_Hangul_Phieuf 0x0ebd
+#define XK_Hangul_Hieuh 0x0ebe
+
+/* Hangul Vowel Characters */
+#define XK_Hangul_A 0x0ebf
+#define XK_Hangul_AE 0x0ec0
+#define XK_Hangul_YA 0x0ec1
+#define XK_Hangul_YAE 0x0ec2
+#define XK_Hangul_EO 0x0ec3
+#define XK_Hangul_E 0x0ec4
+#define XK_Hangul_YEO 0x0ec5
+#define XK_Hangul_YE 0x0ec6
+#define XK_Hangul_O 0x0ec7
+#define XK_Hangul_WA 0x0ec8
+#define XK_Hangul_WAE 0x0ec9
+#define XK_Hangul_OE 0x0eca
+#define XK_Hangul_YO 0x0ecb
+#define XK_Hangul_U 0x0ecc
+#define XK_Hangul_WEO 0x0ecd
+#define XK_Hangul_WE 0x0ece
+#define XK_Hangul_WI 0x0ecf
+#define XK_Hangul_YU 0x0ed0
+#define XK_Hangul_EU 0x0ed1
+#define XK_Hangul_YI 0x0ed2
+#define XK_Hangul_I 0x0ed3
+
+/* Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_Kiyeog 0x0ed4
+#define XK_Hangul_J_SsangKiyeog 0x0ed5
+#define XK_Hangul_J_KiyeogSios 0x0ed6
+#define XK_Hangul_J_Nieun 0x0ed7
+#define XK_Hangul_J_NieunJieuj 0x0ed8
+#define XK_Hangul_J_NieunHieuh 0x0ed9
+#define XK_Hangul_J_Dikeud 0x0eda
+#define XK_Hangul_J_Rieul 0x0edb
+#define XK_Hangul_J_RieulKiyeog 0x0edc
+#define XK_Hangul_J_RieulMieum 0x0edd
+#define XK_Hangul_J_RieulPieub 0x0ede
+#define XK_Hangul_J_RieulSios 0x0edf
+#define XK_Hangul_J_RieulTieut 0x0ee0
+#define XK_Hangul_J_RieulPhieuf 0x0ee1
+#define XK_Hangul_J_RieulHieuh 0x0ee2
+#define XK_Hangul_J_Mieum 0x0ee3
+#define XK_Hangul_J_Pieub 0x0ee4
+#define XK_Hangul_J_PieubSios 0x0ee5
+#define XK_Hangul_J_Sios 0x0ee6
+#define XK_Hangul_J_SsangSios 0x0ee7
+#define XK_Hangul_J_Ieung 0x0ee8
+#define XK_Hangul_J_Jieuj 0x0ee9
+#define XK_Hangul_J_Cieuc 0x0eea
+#define XK_Hangul_J_Khieuq 0x0eeb
+#define XK_Hangul_J_Tieut 0x0eec
+#define XK_Hangul_J_Phieuf 0x0eed
+#define XK_Hangul_J_Hieuh 0x0eee
+
+/* Ancient Hangul Consonant Characters */
+#define XK_Hangul_RieulYeorinHieuh 0x0eef
+#define XK_Hangul_SunkyeongeumMieum 0x0ef0
+#define XK_Hangul_SunkyeongeumPieub 0x0ef1
+#define XK_Hangul_PanSios 0x0ef2
+#define XK_Hangul_KkogjiDalrinIeung 0x0ef3
+#define XK_Hangul_SunkyeongeumPhieuf 0x0ef4
+#define XK_Hangul_YeorinHieuh 0x0ef5
+
+/* Ancient Hangul Vowel Characters */
+#define XK_Hangul_AraeA 0x0ef6
+#define XK_Hangul_AraeAE 0x0ef7
+
+/* Ancient Hangul syllable-final (JongSeong) Characters */
+#define XK_Hangul_J_PanSios 0x0ef8
+#define XK_Hangul_J_KkogjiDalrinIeung 0x0ef9
+#define XK_Hangul_J_YeorinHieuh 0x0efa
+
+/* Korean currency symbol */
+#define XK_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/
+
+#endif /* XK_KOREAN */
+
+/*
+ * Armenian
+ */
+
+#ifdef XK_ARMENIAN
+#define XK_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */
+#define XK_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */
+#define XK_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */
+#define XK_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */
+#define XK_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */
+#define XK_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */
+#define XK_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */
+#define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */
+#define XK_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */
+#define XK_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */
+#define XK_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */
+#define XK_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */
+#define XK_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */
+#define XK_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */
+#define XK_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */
+#define XK_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */
+#define XK_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */
+#define XK_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */
+#define XK_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */
+#define XK_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */
+#define XK_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */
+#define XK_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */
+#define XK_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */
+#define XK_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */
+#define XK_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */
+#define XK_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */
+#define XK_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */
+#define XK_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */
+#define XK_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */
+#define XK_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */
+#define XK_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */
+#define XK_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */
+#define XK_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */
+#define XK_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */
+#define XK_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */
+#define XK_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */
+#define XK_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */
+#define XK_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */
+#define XK_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */
+#define XK_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */
+#define XK_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */
+#define XK_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */
+#define XK_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */
+#define XK_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */
+#define XK_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */
+#define XK_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */
+#define XK_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */
+#define XK_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */
+#define XK_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */
+#define XK_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */
+#define XK_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */
+#define XK_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */
+#define XK_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */
+#define XK_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */
+#define XK_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */
+#define XK_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */
+#define XK_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */
+#define XK_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */
+#define XK_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */
+#define XK_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */
+#define XK_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */
+#define XK_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */
+#define XK_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */
+#define XK_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */
+#define XK_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */
+#define XK_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */
+#define XK_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */
+#define XK_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */
+#define XK_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */
+#define XK_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */
+#define XK_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */
+#define XK_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */
+#define XK_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */
+#define XK_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */
+#define XK_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */
+#define XK_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */
+#define XK_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */
+#define XK_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */
+#define XK_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */
+#define XK_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */
+#define XK_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */
+#define XK_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */
+#define XK_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */
+#define XK_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */
+#endif /* XK_ARMENIAN */
+
+/*
+ * Georgian
+ */
+
+#ifdef XK_GEORGIAN
+#define XK_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */
+#define XK_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */
+#define XK_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */
+#define XK_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */
+#define XK_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */
+#define XK_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */
+#define XK_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */
+#define XK_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */
+#define XK_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */
+#define XK_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */
+#define XK_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */
+#define XK_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */
+#define XK_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */
+#define XK_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */
+#define XK_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */
+#define XK_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */
+#define XK_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */
+#define XK_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */
+#define XK_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */
+#define XK_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */
+#define XK_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */
+#define XK_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */
+#define XK_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */
+#define XK_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */
+#define XK_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */
+#define XK_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */
+#define XK_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */
+#define XK_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */
+#define XK_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */
+#define XK_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */
+#define XK_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */
+#define XK_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */
+#define XK_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */
+#define XK_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */
+#define XK_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */
+#define XK_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */
+#define XK_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */
+#define XK_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */
+#define XK_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */
+#endif /* XK_GEORGIAN */
+
+/*
+ * Azeri (and other Turkic or Caucasian languages)
+ */
+
+#ifdef XK_CAUCASUS
+/* latin */
+#define XK_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */
+#define XK_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */
+#define XK_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */
+#define XK_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */
+#define XK_Ocaron 0x10001d1 /* U+01D2 LATIN CAPITAL LETTER O WITH CARON */
+#define XK_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */
+#define XK_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */
+#define XK_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */
+#define XK_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */
+#define XK_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */
+#define XK_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */
+#define XK_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */
+#define XK_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */
+#define XK_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */
+#define XK_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */
+#define XK_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */
+/* those are not really Caucasus */
+/* For Inupiak */
+#define XK_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */
+#define XK_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */
+#endif /* XK_CAUCASUS */
+
+/*
+ * Vietnamese
+ */
+
+#ifdef XK_VIETNAMESE
+#define XK_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */
+#define XK_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */
+#define XK_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */
+#define XK_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */
+#define XK_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */
+#define XK_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */
+#define XK_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */
+#define XK_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */
+#define XK_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */
+#define XK_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */
+#define XK_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */
+#define XK_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */
+#define XK_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */
+#define XK_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */
+#define XK_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */
+#define XK_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */
+#define XK_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */
+#define XK_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */
+#define XK_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */
+#define XK_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */
+#define XK_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */
+#define XK_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */
+#define XK_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */
+#define XK_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */
+#define XK_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */
+#define XK_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */
+#define XK_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */
+#define XK_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */
+#define XK_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */
+#define XK_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */
+#define XK_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */
+#define XK_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */
+#define XK_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */
+#define XK_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */
+#define XK_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */
+#define XK_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */
+#define XK_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */
+#define XK_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */
+#define XK_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */
+#define XK_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */
+#define XK_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */
+#define XK_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */
+#define XK_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */
+#define XK_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */
+#define XK_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */
+#define XK_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */
+#define XK_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */
+#define XK_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */
+#define XK_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */
+#define XK_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */
+#define XK_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */
+#define XK_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */
+#define XK_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */
+#define XK_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */
+#define XK_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */
+#define XK_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */
+#define XK_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */
+#define XK_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */
+#define XK_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */
+#define XK_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */
+#define XK_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */
+#define XK_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */
+#define XK_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */
+#define XK_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */
+#define XK_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */
+#define XK_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */
+#define XK_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */
+
+#endif /* XK_VIETNAMESE */
+
+#ifdef XK_CURRENCY
+#define XK_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */
+#define XK_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */
+#define XK_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */
+#define XK_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */
+#define XK_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */
+#define XK_MillSign 0x10020a5 /* U+20A5 MILL SIGN */
+#define XK_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */
+#define XK_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */
+#define XK_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */
+#define XK_WonSign 0x10020a9 /* U+20A9 WON SIGN */
+#define XK_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */
+#define XK_DongSign 0x10020ab /* U+20AB DONG SIGN */
+#define XK_EuroSign 0x20ac /* U+20AC EURO SIGN */
+#endif /* XK_CURRENCY */
+
+#ifdef XK_MATHEMATICAL
+/* one, two and three are defined above. */
+#define XK_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */
+#define XK_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */
+#define XK_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */
+#define XK_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */
+#define XK_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */
+#define XK_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */
+#define XK_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */
+#define XK_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */
+#define XK_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */
+#define XK_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */
+#define XK_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */
+#define XK_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */
+#define XK_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */
+#define XK_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */
+#define XK_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */
+#define XK_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */
+#define XK_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */
+#define XK_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */
+#define XK_emptyset 0x1002205 /* U+2205 NULL SET */
+#define XK_elementof 0x1002208 /* U+2208 ELEMENT OF */
+#define XK_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */
+#define XK_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */
+#define XK_squareroot 0x100221A /* U+221A SQUARE ROOT */
+#define XK_cuberoot 0x100221B /* U+221B CUBE ROOT */
+#define XK_fourthroot 0x100221C /* U+221C FOURTH ROOT */
+#define XK_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */
+#define XK_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */
+#define XK_because 0x1002235 /* U+2235 BECAUSE */
+#define XK_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */
+#define XK_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */
+#define XK_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */
+#define XK_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */
+#endif /* XK_MATHEMATICAL */
+
+#ifdef XK_BRAILLE
+#define XK_braille_dot_1 0xfff1
+#define XK_braille_dot_2 0xfff2
+#define XK_braille_dot_3 0xfff3
+#define XK_braille_dot_4 0xfff4
+#define XK_braille_dot_5 0xfff5
+#define XK_braille_dot_6 0xfff6
+#define XK_braille_dot_7 0xfff7
+#define XK_braille_dot_8 0xfff8
+#define XK_braille_dot_9 0xfff9
+#define XK_braille_dot_10 0xfffa
+#define XK_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */
+#define XK_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */
+#define XK_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */
+#define XK_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */
+#define XK_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */
+#define XK_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */
+#define XK_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */
+#define XK_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */
+#define XK_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */
+#define XK_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */
+#define XK_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */
+#define XK_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */
+#define XK_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */
+#define XK_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */
+#define XK_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */
+#define XK_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */
+#define XK_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */
+#define XK_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */
+#define XK_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */
+#define XK_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */
+#define XK_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */
+#define XK_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */
+#define XK_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */
+#define XK_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */
+#define XK_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */
+#define XK_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */
+#define XK_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */
+#define XK_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */
+#define XK_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */
+#define XK_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */
+#define XK_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */
+#define XK_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */
+#define XK_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */
+#define XK_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */
+#define XK_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */
+#define XK_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */
+#define XK_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */
+#define XK_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */
+#define XK_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */
+#define XK_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */
+#define XK_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */
+#define XK_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */
+#define XK_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */
+#define XK_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */
+#define XK_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */
+#define XK_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */
+#define XK_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */
+#define XK_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */
+#define XK_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */
+#define XK_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */
+#define XK_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */
+#define XK_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */
+#define XK_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */
+#define XK_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */
+#define XK_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */
+#define XK_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */
+#define XK_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */
+#define XK_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */
+#define XK_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */
+#define XK_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */
+#define XK_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */
+#define XK_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */
+#define XK_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */
+#define XK_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */
+#define XK_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */
+#define XK_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */
+#define XK_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */
+#define XK_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */
+#define XK_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */
+#define XK_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */
+#define XK_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */
+#define XK_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */
+#define XK_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */
+#define XK_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */
+#define XK_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */
+#define XK_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */
+#define XK_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */
+#define XK_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */
+#define XK_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */
+#define XK_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */
+#define XK_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */
+#define XK_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */
+#define XK_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */
+#define XK_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */
+#define XK_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */
+#define XK_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */
+#define XK_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */
+#define XK_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */
+#define XK_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */
+#define XK_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */
+#define XK_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */
+#define XK_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */
+#define XK_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */
+#define XK_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */
+#define XK_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */
+#define XK_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */
+#define XK_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */
+#define XK_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */
+#define XK_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */
+#define XK_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */
+#define XK_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */
+#define XK_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */
+#define XK_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */
+#define XK_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */
+#define XK_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */
+#define XK_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */
+#define XK_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */
+#define XK_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */
+#define XK_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */
+#define XK_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */
+#define XK_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */
+#define XK_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */
+#define XK_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */
+#define XK_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */
+#define XK_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */
+#define XK_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */
+#define XK_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */
+#define XK_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */
+#define XK_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */
+#define XK_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */
+#define XK_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */
+#define XK_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */
+#define XK_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */
+#define XK_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */
+#define XK_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */
+#define XK_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */
+#define XK_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */
+#define XK_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */
+#define XK_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */
+#define XK_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */
+#define XK_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */
+#define XK_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */
+#define XK_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */
+#define XK_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */
+#define XK_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */
+#define XK_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */
+#define XK_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */
+#define XK_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */
+#define XK_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */
+#define XK_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */
+#define XK_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */
+#define XK_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */
+#define XK_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */
+#define XK_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */
+#define XK_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */
+#define XK_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */
+#define XK_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */
+#define XK_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */
+#define XK_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */
+#define XK_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */
+#define XK_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */
+#define XK_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */
+#define XK_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */
+#define XK_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */
+#define XK_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */
+#define XK_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */
+#define XK_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */
+#define XK_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */
+#define XK_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */
+#define XK_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */
+#define XK_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */
+#define XK_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */
+#define XK_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */
+#define XK_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */
+#define XK_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */
+#define XK_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */
+#define XK_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */
+#define XK_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */
+#define XK_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */
+#define XK_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */
+#define XK_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */
+#define XK_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */
+#define XK_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */
+#define XK_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */
+#define XK_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */
+#define XK_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */
+#define XK_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */
+#define XK_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */
+#define XK_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */
+#define XK_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */
+#define XK_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */
+#define XK_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */
+#define XK_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */
+#define XK_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */
+#define XK_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */
+#define XK_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */
+#define XK_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */
+#define XK_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */
+#define XK_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */
+#define XK_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */
+#define XK_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */
+#define XK_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */
+#define XK_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */
+#define XK_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */
+#define XK_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */
+#define XK_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */
+#define XK_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */
+#define XK_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */
+#define XK_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */
+#define XK_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */
+#define XK_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */
+#define XK_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */
+#define XK_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */
+#define XK_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */
+#define XK_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */
+#define XK_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */
+#define XK_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */
+#define XK_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */
+#define XK_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */
+#define XK_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */
+#define XK_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */
+#define XK_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */
+#define XK_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */
+#define XK_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */
+#define XK_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */
+#define XK_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */
+#define XK_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */
+#define XK_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */
+#define XK_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */
+#define XK_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */
+#define XK_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */
+#define XK_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */
+#define XK_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */
+#define XK_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */
+#define XK_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */
+#define XK_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */
+#define XK_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */
+#define XK_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */
+#define XK_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */
+#define XK_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */
+#define XK_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */
+#define XK_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */
+#define XK_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */
+#define XK_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */
+#define XK_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */
+#define XK_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */
+#define XK_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */
+#define XK_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */
+#define XK_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */
+#define XK_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */
+#define XK_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */
+#define XK_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */
+#define XK_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */
+#define XK_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */
+#define XK_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */
+#define XK_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */
+#define XK_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */
+#define XK_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */
+#define XK_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */
+#define XK_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */
+#define XK_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */
+#define XK_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */
+#define XK_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */
+#define XK_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */
+#define XK_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */
+#define XK_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */
+#endif /* XK_BRAILLE */
+
+/*
+ * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf)
+ * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html
+ */
+
+#ifdef XK_SINHALA
+#define XK_Sinh_ng 0x1000d82 /* U+0D82 SINHALA ANUSVARAYA */
+#define XK_Sinh_h2 0x1000d83 /* U+0D83 SINHALA VISARGAYA */
+#define XK_Sinh_a 0x1000d85 /* U+0D85 SINHALA AYANNA */
+#define XK_Sinh_aa 0x1000d86 /* U+0D86 SINHALA AAYANNA */
+#define XK_Sinh_ae 0x1000d87 /* U+0D87 SINHALA AEYANNA */
+#define XK_Sinh_aee 0x1000d88 /* U+0D88 SINHALA AEEYANNA */
+#define XK_Sinh_i 0x1000d89 /* U+0D89 SINHALA IYANNA */
+#define XK_Sinh_ii 0x1000d8a /* U+0D8A SINHALA IIYANNA */
+#define XK_Sinh_u 0x1000d8b /* U+0D8B SINHALA UYANNA */
+#define XK_Sinh_uu 0x1000d8c /* U+0D8C SINHALA UUYANNA */
+#define XK_Sinh_ri 0x1000d8d /* U+0D8D SINHALA IRUYANNA */
+#define XK_Sinh_rii 0x1000d8e /* U+0D8E SINHALA IRUUYANNA */
+#define XK_Sinh_lu 0x1000d8f /* U+0D8F SINHALA ILUYANNA */
+#define XK_Sinh_luu 0x1000d90 /* U+0D90 SINHALA ILUUYANNA */
+#define XK_Sinh_e 0x1000d91 /* U+0D91 SINHALA EYANNA */
+#define XK_Sinh_ee 0x1000d92 /* U+0D92 SINHALA EEYANNA */
+#define XK_Sinh_ai 0x1000d93 /* U+0D93 SINHALA AIYANNA */
+#define XK_Sinh_o 0x1000d94 /* U+0D94 SINHALA OYANNA */
+#define XK_Sinh_oo 0x1000d95 /* U+0D95 SINHALA OOYANNA */
+#define XK_Sinh_au 0x1000d96 /* U+0D96 SINHALA AUYANNA */
+#define XK_Sinh_ka 0x1000d9a /* U+0D9A SINHALA KAYANNA */
+#define XK_Sinh_kha 0x1000d9b /* U+0D9B SINHALA MAHA. KAYANNA */
+#define XK_Sinh_ga 0x1000d9c /* U+0D9C SINHALA GAYANNA */
+#define XK_Sinh_gha 0x1000d9d /* U+0D9D SINHALA MAHA. GAYANNA */
+#define XK_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA KANTAJA NAASIKYAYA */
+#define XK_Sinh_nga 0x1000d9f /* U+0D9F SINHALA SANYAKA GAYANNA */
+#define XK_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA CAYANNA */
+#define XK_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA MAHA. CAYANNA */
+#define XK_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA JAYANNA */
+#define XK_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA MAHA. JAYANNA */
+#define XK_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */
+#define XK_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */
+#define XK_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA SANYAKA JAYANNA */
+#define XK_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA TTAYANNA */
+#define XK_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA MAHA. TTAYANNA */
+#define XK_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA DDAYANNA */
+#define XK_Sinh_ddha 0x1000daa /* U+0DAA SINHALA MAHA. DDAYANNA */
+#define XK_Sinh_nna 0x1000dab /* U+0DAB SINHALA MUURDHAJA NAYANNA */
+#define XK_Sinh_ndda 0x1000dac /* U+0DAC SINHALA SANYAKA DDAYANNA */
+#define XK_Sinh_tha 0x1000dad /* U+0DAD SINHALA TAYANNA */
+#define XK_Sinh_thha 0x1000dae /* U+0DAE SINHALA MAHA. TAYANNA */
+#define XK_Sinh_dha 0x1000daf /* U+0DAF SINHALA DAYANNA */
+#define XK_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA MAHA. DAYANNA */
+#define XK_Sinh_na 0x1000db1 /* U+0DB1 SINHALA DANTAJA NAYANNA */
+#define XK_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA SANYAKA DAYANNA */
+#define XK_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA PAYANNA */
+#define XK_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA MAHA. PAYANNA */
+#define XK_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA BAYANNA */
+#define XK_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA MAHA. BAYANNA */
+#define XK_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA MAYANNA */
+#define XK_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA AMBA BAYANNA */
+#define XK_Sinh_ya 0x1000dba /* U+0DBA SINHALA YAYANNA */
+#define XK_Sinh_ra 0x1000dbb /* U+0DBB SINHALA RAYANNA */
+#define XK_Sinh_la 0x1000dbd /* U+0DBD SINHALA DANTAJA LAYANNA */
+#define XK_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA VAYANNA */
+#define XK_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA TAALUJA SAYANNA */
+#define XK_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA MUURDHAJA SAYANNA */
+#define XK_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA DANTAJA SAYANNA */
+#define XK_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA HAYANNA */
+#define XK_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA MUURDHAJA LAYANNA */
+#define XK_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA FAYANNA */
+#define XK_Sinh_al 0x1000dca /* U+0DCA SINHALA AL-LAKUNA */
+#define XK_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA AELA-PILLA */
+#define XK_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA AEDA-PILLA */
+#define XK_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA DIGA AEDA-PILLA */
+#define XK_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA IS-PILLA */
+#define XK_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA DIGA IS-PILLA */
+#define XK_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA PAA-PILLA */
+#define XK_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA DIGA PAA-PILLA */
+#define XK_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA GAETTA-PILLA */
+#define XK_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA KOMBUVA */
+#define XK_Sinh_ee2 0x1000dda /* U+0DDA SINHALA DIGA KOMBUVA */
+#define XK_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA KOMBU DEKA */
+#define XK_Sinh_o2 0x1000ddc /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/
+#define XK_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/
+#define XK_Sinh_au2 0x1000dde /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */
+#define XK_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA GAYANUKITTA */
+#define XK_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA DIGA GAETTA-PILLA */
+#define XK_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA DIGA GAYANUKITTA */
+#define XK_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA KUNDDALIYA */
+#endif /* XK_SINHALA */
+
/* Multimedia keys, defined same as on Linux
* /usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon-keysyms.h
*/
+#ifndef TK_NO_DEPRECATED
#define XK_XF86AudioLowerVolume 0x1008FF11 /* Volume control down */
#define XK_XF86AudioMute 0x1008FF12 /* Mute sound from the system */
#define XK_XF86AudioRaiseVolume 0x1008FF13 /* Volume control up */
@@ -1180,4 +2513,5 @@ SOFTWARE.
#define XK_XF86AudioStop 0x1008FF15 /* Stop playing audio */
#define XK_XF86AudioPrev 0x1008FF16 /* Previous track */
#define XK_XF86AudioNext 0x1008FF17 /* Next track */
+#endif /* !TK_NO_DEPRECATED */
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 78fd44b..31db297 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -347,7 +347,7 @@ XParseColor(
/*
* If *p does not point to the end of the string, there were invalid
- * digits in the spec. Ergo, it is not a vailid color string.
+ * digits in the spec. Ergo, it is not a valid color string.
* (Bug f0188aca9e)
*/
diff --git a/xlib/xgc.c b/xlib/xgc.c
index e2fdf52..aea8851 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -24,12 +24,9 @@
# include <tkMacOSXInt.h>
# include <X11/Xlib.h>
# include <X11/X.h>
-# define Cursor XCursor
-# define Region XRegion
# define gcCacheSize sizeof(TkpGCCache)
#endif
-#undef TkSetRegion
/*
*----------------------------------------------------------------------
@@ -84,7 +81,7 @@ static void FreeClipMask(GC gc) {
TkpReleaseRegion(((TkpClipMask*) gc->clip_mask)->value.region);
}
#endif
- ckfree(gc->clip_mask);
+ ckfree((char *) gc->clip_mask);
gc->clip_mask = None;
}
}
@@ -565,7 +562,6 @@ XDrawSegments(
}
#endif
-#if 0
char *
XFetchBuffer(
Display *display,
@@ -581,7 +577,7 @@ XFetchName(
Window w,
char **window_name_return)
{
- return (Status) 0;
+ return Success;
}
Atom *
@@ -593,29 +589,15 @@ XListProperties(
return (Atom *) 0;
}
-void
+int
XMapRaised(
Display *display,
Window w)
{
+ return Success;
}
-void
-XPutImage(
- Display *display,
- Drawable d,
- GC gc,
- XImage *image,
- int src_x,
- int src_y,
- int dest_x,
- int dest_y,
- unsigned int width,
- unsigned int height)
-{
-}
-
-void
+int
XQueryTextExtents(
Display *display,
XID font_ID,
@@ -626,9 +608,10 @@ XQueryTextExtents(
int *font_descent_return,
XCharStruct *overall_return)
{
+ return Success;
}
-void
+int
XReparentWindow(
Display *display,
Window w,
@@ -636,32 +619,207 @@ XReparentWindow(
int x,
int y)
{
+ return BadWindow;
}
-void
-XRotateBuffers(
+int
+XUndefineCursor(
Display *display,
- int rotate)
+ Window w)
+{
+ return Success;
+}
+
+XVaNestedList
+XVaCreateNestedList(
+ int unused, ...)
+{
+ return NULL;
+}
+
+char *
+XSetICValues(
+ XIC xic, ...)
{
+ return NULL;
+}
+
+char *
+XGetICValues(
+ XIC xic, ...)
+{
+ return NULL;
}
void
-XStoreBuffer(
+XSetICFocus(
+ XIC xic)
+{
+}
+
+Window
+XCreateWindow(
Display *display,
- _Xconst char *bytes,
- int nbytes,
- int buffer)
+ Window parent,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ unsigned int border_width,
+ int depth,
+ unsigned int clazz,
+ Visual *visual,
+ unsigned long value_mask,
+ XSetWindowAttributes *attributes)
+{
+ return 0;
+}
+
+int
+XPointInRegion(
+ Region rgn,
+ int x,
+ int y)
+{
+ return 0;
+}
+
+int
+XUnionRegion(
+ Region srca,
+ Region srcb,
+ Region dr_return)
{
+ return 0;
}
+Region
+XPolygonRegion(
+ XPoint *pts,
+ int n,
+ int rule)
+{
+ return 0;
+}
+
void
-XUndefineCursor(
+XDestroyIC(
+ XIC ic)
+{
+}
+
+Cursor
+XCreatePixmapCursor(
Display *display,
- Window w)
+ Pixmap source,
+ Pixmap mask,
+ XColor *foreground_color,
+ XColor *background_color,
+ unsigned int x,
+ unsigned int y)
{
+ return (Cursor) NULL;
}
-#endif
-
+
+Cursor
+XCreateGlyphCursor(
+ Display *display,
+ Font source_font,
+ Font mask_font,
+ unsigned int source_char,
+ unsigned int mask_char,
+ XColor _Xconst *foreground_color,
+ XColor _Xconst *background_color)
+{
+ return 1;
+}
+
+XFontSet
+XCreateFontSet(
+ Display *display /* display */,
+ _Xconst char *base_font_name_list /* base_font_name_list */,
+ char ***missing_charset_list /* missing_charset_list */,
+ int *missing_charset_count /* missing_charset_count */,
+ char **def_string /* def_string */
+) {
+ return (XFontSet)0;
+}
+
+void
+XFreeFontSet(
+ Display *display, /* display */
+ XFontSet fontset /* font_set */
+) {
+}
+
+void
+XFreeStringList(
+ char **list /* list */
+) {
+}
+
+Status
+XCloseIM(
+ XIM im /* im */
+) {
+ return Success;
+}
+
+Bool
+XRegisterIMInstantiateCallback(
+ Display *dpy /* dpy */,
+ struct _XrmHashBucketRec *rdb /* rdb */,
+ char *res_name /* res_name */,
+ char *res_class /* res_class */,
+ XIDProc callback /* callback */,
+ XPointer client_data /* client_data */
+) {
+ return False;
+}
+
+Bool
+XUnregisterIMInstantiateCallback(
+ Display *dpy /* dpy */,
+ struct _XrmHashBucketRec *rdb /* rdb */,
+ char *res_name /* res_name */,
+ char *res_class /* res_class */,
+ XIDProc callback /* callback */,
+ XPointer client_data /* client_data */
+) {
+ return False;
+}
+
+char *
+XSetLocaleModifiers(
+ const char *modifier_list /* modifier_list */
+) {
+ return NULL;
+}
+
+XIM XOpenIM(
+ Display *dpy /* dpy */,
+ struct _XrmHashBucketRec *rdb /* rdb */,
+ char *res_name /* res_name */,
+ char *res_class /* res_class */
+) {
+ return NULL;
+}
+
+char *
+XGetIMValues(
+ XIM im /* im */, ...
+) {
+ return NULL;
+}
+
+char *
+XSetIMValues(
+ XIM im /* im */, ...
+) {
+ return NULL;
+}
+
+
/*
* Local Variables:
* mode: c